/* ==================
   Reset and Base
   ================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
}

/* ==================
   Header
   ================== */

.admin-header {
  background: #fff;
  border-bottom: 2px solid #000;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-title {
  font-size: 20px;
  font-weight: bold;
  text-transform: uppercase;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ==================
   Main Content
   ================== */

.admin-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

/* ==================
   Stats Section
   ================== */

.stats-section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: #fff;
  border: 1px solid #000;
  padding: 16px;
  text-align: center;
}

.stat-label {
  font-size: 12px;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 32px;
  font-weight: bold;
}

/* ==================
   Sections
   ================== */

.admin-section {
  background: #fff;
  border: 1px solid #000;
  padding: 24px;
  margin-bottom: 24px;
}

.section-title {
  font-size: 16px;
  text-transform: uppercase;
  margin-bottom: 16px;
  border-bottom: 1px solid #000;
  padding-bottom: 8px;
}

/* ==================
   Tables
   ================== */

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid #ddd;
}

.admin-table th {
  background: #f0f0f0;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 12px;
}

.admin-table tbody tr:hover {
  background: #f9f9f9;
}

/* ==================
   Buttons
   ================== */

button,
select {
  font-family: inherit;
  font-size: 12px;
  padding: 6px 12px;
  border: 1px solid #000;
  background: #fff;
  cursor: pointer;
  text-transform: uppercase;
}

button:hover,
select:hover {
  background: #000;
  color: #fff;
}

button:active {
  transform: translateY(1px);
}

.btn-danger {
  border-color: #c00;
  color: #c00;
}

.btn-danger:hover {
  background: #c00;
  color: #fff;
}

.btn-view {
  border-color: #000;
  color: #000;
  margin-right: 8px;
}

.btn-view:hover {
  background: #000;
  color: #fff;
}

/* ==================
   User Selector
   ================== */

.user-selector {
  margin-bottom: 16px;
}

.user-selector label {
  margin-right: 8px;
  font-weight: bold;
}

.user-selector select {
  font-size: 14px;
  padding: 6px 12px;
}

/* ==================
   Notes Grid
   ================== */

.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.note-card {
  border: 1px solid #000;
  padding: 16px;
  background: #fff;
}

.note-card-title {
  font-weight: bold;
  margin-bottom: 8px;
}

.note-card-content {
  font-size: 12px;
  color: #666;
  margin-bottom: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}

.note-card-meta {
  font-size: 11px;
  color: #999;
}

/* ==================
   Utility
   ================== */

.hidden {
  display: none;
}

/* ==================
   Role Select
   ================== */

.role-select {
  padding: 4px 8px;
  font-size: 12px;
}

.role-select:hover {
  background: #fff;
  color: #000;
}

/* ==================
   Responsive
   ================== */

@media (max-width: 1024px) {
  .stats-section {
    grid-template-columns: repeat(2, 1fr);
  }

  .notes-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .admin-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .stats-section {
    grid-template-columns: 1fr;
  }

  .admin-table {
    font-size: 12px;
  }

  .admin-table th,
  .admin-table td {
    padding: 6px 8px;
  }
}
