/* Admin layout */
.admin-page .main-content {
  padding: 2rem 1.5rem 3rem;
}

.admin-auth-wrapper {
  max-width: 480px;
  margin: 0 auto;
}

.admin-auth-card {
  background: var(--white);
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.admin-auth-card h2 {
  font-size: 1.5rem;
  color: var(--onesb-navy);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.admin-auth-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.75rem;
}

.admin-auth-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.admin-auth-footer + .admin-auth-footer {
  margin-top: 0.75rem;
}

.admin-auth-footer a {
  color: var(--onesb-navy);
  font-weight: 600;
  text-decoration: none;
}

.admin-auth-footer a:hover {
  text-decoration: underline;
}

/* Admin shell with sidebar */
.admin-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.admin-sidebar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1.25rem;
  position: sticky;
  top: 1.5rem;
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

.admin-sidebar-header {
  padding-bottom: 1rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.admin-sidebar-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.admin-nav-link {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  color: var(--text-dark);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}

.admin-nav-link:hover {
  background: var(--bg-light);
  color: var(--onesb-navy);
}

.admin-nav-link.active {
  background: linear-gradient(135deg, var(--onesb-navy), var(--onesb-blue));
  color: var(--white);
}

.admin-sidebar-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-sidebar-footer .admin-name {
  font-size: 0.85rem;
}

.admin-sidebar-footer .btn-logout {
  text-align: center;
}

.admin-main {
  min-width: 0;
}

.bulk-upload-body {
  padding: 2rem 1.5rem;
  color: var(--text-muted);
}

.bulk-upload-info {
  margin-bottom: 1.5rem;
}

.bulk-upload-info p {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.bulk-upload-info code {
  display: block;
  padding: 0.85rem 1rem;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--onesb-navy);
  font-size: 0.85rem;
  word-break: break-word;
}

.bulk-upload-note a {
  color: var(--onesb-navy);
  font-weight: 600;
  text-decoration: none;
}

.bulk-upload-note a:hover {
  text-decoration: underline;
}

.bulk-upload-body .form-group input[type="file"] {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  font-family: inherit;
}

.bulk-upload-body .btn-submit,
.change-password-card .btn-submit {
  width: auto;
  min-width: 180px;
}

.change-password-card {
  max-width: 520px;
}

.upload-results {
  display: none;
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-dark);
  font-size: 0.9rem;
}

.upload-results.visible {
  display: block;
}

.upload-summary {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.upload-error-list ul {
  margin-top: 0.5rem;
  padding-left: 1.25rem;
}

.upload-error-list li {
  margin-bottom: 0.25rem;
}

/* Dashboard */
.dashboard-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.dashboard-header h1 {
  font-size: 1.75rem;
  color: var(--onesb-navy);
  font-weight: 700;
}

.dashboard-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

.dashboard-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.admin-name {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

.btn-logout {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
  background: var(--onesb-navy);
  border: none;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s;
  font-family: inherit;
}

.btn-logout:hover {
  background: var(--onesb-navy-dark);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--onesb-navy);
  margin-top: 0.35rem;
}

.data-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.data-card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.data-card-header-with-search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.data-card-header h2 {
  font-size: 1.15rem;
  color: var(--onesb-navy);
  font-weight: 600;
}

.search-box {
  flex: 1;
  min-width: 220px;
  max-width: 380px;
}

.search-box input {
  width: 100%;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--text-dark);
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input:focus {
  outline: none;
  border-color: var(--onesb-navy);
  box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1);
}

.empty-state.hidden {
  display: none;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.btn-delete {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--white);
  background: var(--error);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
  white-space: nowrap;
}

.btn-delete:hover {
  background: #b91c1c;
}

.btn-delete:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.data-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table thead {
  background: var(--bg-light);
}

.data-table th,
.data-table td {
  padding: 0.9rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table th {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--onesb-navy);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.data-table tbody tr:hover {
  background: #f8fafc;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
}

.scroll-hint {
  display: none;
  padding: 0.65rem 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-light);
  border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
  .admin-auth-card {
    padding: 1.75rem 1.25rem;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    min-height: auto;
  }

  .admin-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .admin-nav-link {
    flex: 1;
    min-width: 140px;
    text-align: center;
  }

  .admin-sidebar-footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .admin-sidebar-footer .btn-logout {
    width: auto;
    padding: 0.5rem 1rem;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .scroll-hint {
    display: block;
  }
}
