﻿:root {
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: #111827;
  background: #f4f6f8;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #f4f6f8;
}

body {
  min-height: 100vh;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.view {
  min-height: 100vh;
}

#login-view {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: min(100%, 430px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-card > .brand {
  margin-bottom: 20px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #111827;
  color: #fff;
  font-weight: 800;
  font-size: 20px;
}

.brand h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.brand p {
  margin: 3px 0 0;
  color: #6b7280;
  font-size: 13px;
}

.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(17, 24, 39, 0.06);
}

.auth-card > .card {
  padding: 28px;
}

.card h2 {
  margin: 0;
  font-size: 18px;
}

.muted {
  color: #6b7280;
}

.card > .muted,
.auth-card .muted {
  margin-top: 7px;
  font-size: 14px;
}

form {
  margin-top: 22px;
}

label {
  display: block;
  margin: 0 0 7px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

input,
textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  color: #111827;
  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

input {
  height: 44px;
  padding: 0 13px;
}

textarea {
  min-height: 110px;
  padding: 11px 13px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: #6b7280;
  box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.12);
}

form label + input {
  margin-bottom: 16px;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  padding: 0 15px;
  font-weight: 650;
  transition:
    transform 0.05s ease,
    opacity 0.15s ease,
    background 0.15s ease;
}

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

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

button.full {
  width: 100%;
  margin-top: 4px;
}

button.primary {
  background: #111827;
  color: #fff;
}

button.primary:hover:not(:disabled) {
  background: #1f2937;
}

button.secondary {
  background: #fff;
  color: #374151;
  border: 1px solid #d1d5db;
}

button.secondary:hover:not(:disabled) {
  background: #f9fafb;
}

button.approve {
  background: #166534;
  color: #fff;
}

button.approve:hover:not(:disabled) {
  background: #15803d;
}

button.danger {
  background: #b91c1c;
  color: #fff;
}

button.danger:hover:not(:disabled) {
  background: #dc2626;
}

.status {
  margin-top: 16px;
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 13px;
  line-height: 1.45;
  background: #f3f4f6;
  color: #374151;
}

.status.error {
  background: #fef2f2;
  color: #991b1b;
}

.status.success {
  background: #f0fdf4;
  color: #166534;
}

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 24px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.admin-email {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #6b7280;
  font-size: 13px;
}

.container {
  width: min(1400px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.summary-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.summary-card {
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
}

.summary-label {
  display: block;
  margin-bottom: 5px;
  color: #6b7280;
  font-size: 13px;
}

.summary-card strong {
  font-size: 25px;
}

.container > .card {
  padding: 20px;
  margin-bottom: 18px;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 17px;
}

.search {
  width: min(360px, 100%);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
  font-size: 13px;
}

thead {
  background: #f9fafb;
}

th,
td {
  padding: 12px 13px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid #eef0f2;
}

th {
  color: #4b5563;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

tbody tr {
  transition: background 0.12s ease;
}

tbody tr:hover {
  background: #f9fafb;
}

tbody tr.selected {
  background: #f3f4f6;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.empty-state {
  padding: 34px 16px 14px;
  text-align: center;
  color: #6b7280;
  font-size: 14px;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-item {
  min-width: 0;
  padding: 13px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fafafa;
}

.detail-label {
  margin-bottom: 5px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 650;
}

.detail-value {
  color: #111827;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(17, 24, 39, 0.48);
}

.modal {
  width: min(100%, 500px);
  padding: 24px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 55px rgba(17, 24, 39, 0.22);
}

.modal h2 {
  margin: 0;
  font-size: 18px;
}

.modal .muted {
  margin: 7px 0 18px;
  font-size: 14px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 14px;
}

@media (max-width: 760px) {
  #login-view {
    padding: 16px;
  }

  .auth-card > .card {
    padding: 22px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 16px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .admin-email {
    width: 100%;
    max-width: none;
    order: -1;
  }

  .container {
    padding: 16px;
  }

  .summary-row {
    grid-template-columns: 1fr;
  }

  .section-header {
    flex-direction: column;
  }

  .search {
    width: 100%;
  }

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

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions button {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .brand h1 {
    font-size: 18px;
  }

  .container > .card {
    padding: 15px;
  }

  .summary-card {
    padding: 15px;
  }

  .action-row button {
    width: 100%;
  }
}
