.admin-login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top right, rgba(255,255,255,0.18), transparent 30%),
              linear-gradient(135deg, #eef2f5 0%, #cfd6dc 40%, #8b94a0 100%);
  font-family: Arial, sans-serif;
  padding: 20px;
  box-sizing: border-box;
}

.login-shell {
  width: min(420px, calc(100% - 32px));
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(38, 50, 66, 0.12);
  border-radius: 24px;
  box-shadow: 0 26px 60px rgba(15, 23, 34, 0.18);
  padding: 36px 32px;
  backdrop-filter: blur(14px);
}

.login-shell.view-shell {
  width: calc(100% - 48px);
  max-width: none;
  min-width: 800px;
}

.login-shell.view-shell .login-form {
  gap: 12px;
}

.table-search-wrapper {
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-selects {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 260px;
}

.table-search-input,
.table-search-select {
  padding: 12px 16px;
  border: 1px solid #bbc4cc;
  border-radius: 14px;
  background: #ffffff;
  color: #1c242d;
  font-size: 0.96rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.table-search-input:focus,
.table-search-select:focus {
  border-color: #6d8cbf;
  box-shadow: 0 0 0 4px rgba(108, 140, 191, 0.12);
}

.table-search-input {
  width: 100%;
  max-width: 420px;
  max-width: 420px;
  padding: 12px 16px;
  border: 1px solid #bbc4cc;
  border-radius: 14px;
  background: #ffffff;
  color: #1c242d;
  font-size: 0.96rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.table-search-input:focus {
  border-color: #6d8cbf;
  box-shadow: 0 0 0 4px rgba(108, 140, 191, 0.12);
}

.login-shell.view-shell .login-form > .table-scroll {
  overflow: auto;
  max-height: calc(70vh);
}

.table-scroll {
  overflow: auto;
}

.login-shell.view-shell .login-footer {
  text-align: left;
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.brand-logo {
  max-width: 120px;
  margin: 0 auto 18px;
  display: block;
}

.login-header h1 {
  font-size: 1.8rem;
  margin: 0;
  color: #1f252b;
}

.login-header p {
  margin: 10px 0 0;
  color: #4a5662;
  font-size: 0.96rem;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form label {
  display: block;
  font-size: 0.95rem;
  color: #3e4a57;
  margin-bottom: 6px;
}

.login-form input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #bbc4cc;
  border-radius: 14px;
  background: #f9fbfd;
  font-size: 1rem;
  color: #1c242d;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-form input:focus {
  border-color: #6d8cbf;
  box-shadow: 0 0 0 4px rgba(108, 140, 191, 0.12);
}

.login-form button {
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 14px;
  background: #1f4d9e;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.login-form button:hover {
  background: #173f7d;
  transform: translateY(-1px);
}

.login-footer {
  margin-top: 18px;
  font-size: 0.9rem;
  color: #54616f;
  text-align: center;
}

.login-footer a {
  color: #1f4d9e;
  text-decoration: none;
}

.login-footer a:hover {
  text-decoration: underline;
}

/* Admin dashboard page shared styles */
.container {
  display: flex;
  height: 100vh;
}

.sidebar {
  width: 250px;
  background: #2c3e50;
  color: white;
  padding: 20px 0;
  display: none;
}

.sidebar h2 {
  text-align: center;
  margin-bottom: 30px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: 10px;
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar ul li {
  padding: 15px 25px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar ul li i {
  width: 18px;
  display: inline-flex;
  justify-content: center;
}

.sidebar ul li:hover,
.sidebar ul li.active {
  background: #34495e;
}

.content {
  flex: 1;
  padding: 30px;
  background: #f5f5f5;
  overflow-y: auto;
}

.page-title {
  margin-bottom: 20px;
  color: #2c3e50;
}

.excel-table {
  width: 100%;
  min-width: 800px;
  background: white;
  border-collapse: collapse;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  font-size: 0.9rem;
}

.excel-table th,
.excel-table td {
  border: 1px solid #ddd;
  padding: 8px 6px;
  text-align: left;
  white-space: nowrap;
}

.excel-table th {
  background: #2c3e50;
  color: white;
  position: sticky;
  top: 0;
  z-index: 2;
}

.excel-table tr:nth-child(even) {
  background: #f9f9f9;
}

.excel-table td img {
  max-width: 120px;
  height: auto;
  display: block;
  border-radius: 8px;
}

.image-cell {
  display: grid;
  gap: 8px;
  align-items: center;
}

.image-cell img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #d1d9e3;
}

.image-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.image-upload-btn,
.image-remove-btn {
  padding: 6px 10px;
  border: 1px solid #bbc4cc;
  border-radius: 8px;
  background: #f5f6f8;
  color: #2c3e50;
  cursor: pointer;
  font-size: 0.88rem;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.image-upload-btn:hover,
.image-remove-btn:hover {
  background: #eef2f7;
  border-color: #95a5b6;
  transform: translateY(-1px);
}

.image-remove-btn {
  border-color: #e74c3c;
  color: #e74c3c;
}

.image-remove-btn:hover {
  background: rgba(231, 76, 60, 0.1);
  border-color: #c0392b;
}

.image-cell {
  display: grid;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
}

.image-cell:hover {
  background: rgba(46, 125, 235, 0.04);
}

.edit-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #bbc4cc;
  border-radius: 6px;
  font-size: 0.95rem;
  box-sizing: border-box;
}

th.sortable {
  cursor: pointer;
  user-select: none;
}

th.sortable::after {
  content: '\25B6';
  display: inline-block;
  margin-left: 8px;
  opacity: 0.45;
  transform: rotate(90deg);
}

th.sortable.sort-asc::after {
  content: '\25B2';
}

th.sortable.sort-desc::after {
  content: '\25BC';
}

.export-btn {
  padding: 8px 12px;
  background: #27ae60;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin: 0 5px;
}

.add-btn {
  padding: 10px 20px;
  background: #2c3e50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 15px;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .login-shell.view-shell {
    min-width: 700px;
  }

  .excel-table {
    min-width: 700px;
    font-size: 0.85rem;
  }

  .excel-table th,
  .excel-table td {
    padding: 6px 4px;
  }
}

@media (max-width: 900px) {
  .login-shell.view-shell {
    min-width: 600px;
    width: calc(100% - 24px);
  }

  .excel-table {
    min-width: 600px;
    font-size: 0.8rem;
  }

  .table-search-wrapper {
    flex-direction: column;
    gap: 8px;
  }

  .filter-selects {
    min-width: auto;
    width: 100%;
  }

  .table-search-input {
    max-width: none;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .admin-login-body {
    padding: 10px;
  }

  .login-shell.view-shell {
    min-width: 500px;
    width: calc(100% - 20px);
    padding: 20px 16px;
  }

  .excel-table {
    min-width: 500px;
    font-size: 0.75rem;
  }

  .excel-table th,
  .excel-table td {
    padding: 4px 2px;
  }

  .section-card {
    padding: 16px !important;
  }

  .login-header h1 {
    font-size: 1.5rem;
  }

  /* Make form grid more responsive */
  .login-form div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  .login-form div[style*="display:flex"] {
    flex-direction: column !important;
    gap: 8px !important;
  }

  /* Ensure table scrolls properly on small screens */
  .table-scroll {
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 600px) {
  .admin-login-body {
    padding: 5px;
  }

  .login-shell.view-shell {
    min-width: 400px;
    width: calc(100% - 10px);
    padding: 16px 12px;
  }

  .excel-table {
    min-width: 400px;
    font-size: 0.7rem;
  }

  .login-header h1 {
    font-size: 1.3rem;
  }

  .section-card {
    padding: 12px !important;
  }
}

.admin-only {
  display: none;
}

/* adminuser.php moved styles */
.page-login-form {
  display: block;
  gap: 0;
}
.section-card {
  padding: 24px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
}
.section-heading {
  margin-bottom: 16px;
}
.section-note {
  margin-bottom: 16px;
  color: #666;
  font-size: 0.9rem;
}
.table-scroll {
  overflow-x: auto;
}
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.modal-overlay.hidden {
  display: none;
}
.modal {
  width: min(560px, 95%);
  background: #fff;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.18);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 10px;
}
.modal-header h3 {
  margin: 0;
  font-size: 1.15rem;
  color: #0f172a;
}
.modal-close {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #475569;
}
.modal-field {
  margin-bottom: 16px;
}
.modal-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: #334155;
}
.modal-field input,
.modal-field select,
.modal-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 0.95rem;
  color: #0f172a;
  background: #f8fafc;
}
.modal-field textarea {
  resize: vertical;
  min-height: 100px;
}
.role-info {
  font-size: 0.85rem;
  color: #64748b;
  background: #f1f5f9;
  padding: 10px 12px;
  border-radius: 8px;
  margin-top: 6px;
  line-height: 1.5;
  border-left: 3px solid #3b82f6;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.modal-actions .crud-btn {
  min-width: 110px;
}

.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  border-radius: 9999px;
  background: #0f172a;
  color: #fff;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin-top: 0.5rem;
}
.upload-button:hover {
  background: #111827;
}
.file-name {
  display: block;
  margin-top: 0.5rem;
  color: #475569;
  font-size: 0.92rem;
}
input[type="file"] {
  display: none;
}

.editable {
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.editable:hover {
  background-color: rgba(52, 152, 219, 0.05);
}
.editable.editing {
  background-color: rgba(46, 204, 113, 0.1);
  border: 1px solid #2ecc71 !important;
}
.validation-error {
  background-color: #fee2e2 !important;
  border: 1px solid #dc2626 !important;
}
.excel-table th,
.excel-table td {
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}
.excel-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #1e293b;
}
.table-search-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: nowrap;
  width: 100%;
  overflow-x: auto;
  white-space: nowrap;
}
.table-search-left,
.table-search-center,
.table-search-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  min-width: 0;
}
.table-search-left {
  flex: 0 0 auto;
  min-width: 220px;
}
.table-search-center {
  flex: 0 0 auto;
  justify-content: center;
  min-width: 240px;
}
.table-search-right {
  flex: 0 0 auto;
  justify-content: flex-end;
}
.table-search-input {
  width: 100%;
  min-width: 220px;
  max-width: 320px;
}
.table-search-input,
.table-search-select,
.table-search-wrapper .export-btn,
.table-search-wrapper .add-btn {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 0.95rem;
}
.table-search-input {
  width: 100%;
  min-width: 220px;
}
.table-search-select {
  min-width: 160px;
}
.table-search-wrapper .export-btn,
.table-search-wrapper .add-btn {
  white-space: nowrap;
}
button.crud-btn {
  padding: 6px 10px;
  margin: 0 3px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.92rem;
  transition: transform 0.2s ease, background 0.2s ease;
}
button.crud-btn:hover {
  transform: translateY(-1px);
}
button.crud-btn.delete {
  background: #ef4444;
  color: white;
}
button.crud-btn.edit {
  background: #16a34a;
  color: white;
}

.admin-sidebar {
  width: 280px;
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #fff;
  padding: 20px;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
}
.admin-menu-bar {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: stretch;
}
.admin-menu-bar .export-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  justify-content: flex-start;
  width: 100%;
  text-align: left;
}
.admin-menu-bar .export-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(5px);
  color: #fff;
}

.main-content {
  margin-left: 280px;
  width: calc(100% - 280px);
  min-height: 100vh;
}

.table-search-center button:hover {
  background: #163d85 !important;
}

