:root {
  --bg-start: #0f172a;
  --bg-mid: #1e3a5f;
  --bg-end: #0d9488;
  --card: #1e293b;
  --card-dark: #0f172a;
  --border: #334155;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #5eead4;
  --primary: #14b8a6;
  --primary-hover: #0d9488;
  --danger: #f87171;
  --success: #4ade80;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Inter, system-ui, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: linear-gradient(135deg, var(--bg-start) 0%, var(--bg-mid) 45%, var(--bg-end) 100%);
}

.topbar {
  border-bottom: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
}

.topbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.brand h1 {
  margin: 0;
  font-size: 1.5rem;
  color: #f8fafc;
}

.subtitle {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
  background: rgba(20, 184, 166, 0.12);
}

.session {
  color: var(--muted);
  font-size: 0.85rem;
}

.page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 2rem;
}

.card {
  background: linear-gradient(180deg, var(--card) 0%, var(--card-dark) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.preview-card {
  border: 2px solid var(--primary);
}

.section-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--accent);
}

.field {
  margin-bottom: 0.75rem;
}

.field label,
.label {
  display: block;
  margin-bottom: 0.35rem;
  color: #cbd5e1;
  font-weight: 500;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="file"],
select,
textarea {
  width: 100%;
  background: #0f172a;
  color: #f1f5f9;
  border: 1px solid #475569;
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  font: inherit;
}

textarea { resize: vertical; min-height: 4rem; }

.hint, .status {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0.35rem 0 0;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 0.6rem 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: #042f2e;
}

.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }

.btn-secondary {
  background: #334155;
  color: var(--text);
}

.btn-approve {
  background: #166534;
  color: #ecfdf5;
  margin-top: 0.75rem;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-sm { padding: 0.35rem 0.65rem; font-size: 0.85rem; }

.report-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(400px, 1.4fr);
  gap: 1.25rem;
  align-items: start;
}

.image-preview {
  min-height: 200px;
  margin: 0.75rem 0;
  border: 1px dashed #475569;
  border-radius: 10px;
  background: #020617;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  overflow: hidden;
}

.image-preview img {
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
}

.approval-card {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.checkbox-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  cursor: pointer;
}

.footer-fields {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.alert-success {
  background: rgba(74, 222, 128, 0.15);
  border: 1px solid var(--success);
  color: #bbf7d0;
}

.alert-error {
  background: rgba(248, 113, 113, 0.15);
  border: 1px solid var(--danger);
  color: #fecaca;
}

.account-layout,
.admin-layout {
  max-width: 900px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.stack-form { display: grid; gap: 0.75rem; }

.btn-row { display: flex; gap: 0.5rem; }

.inline-form {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.25rem 0;
}

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.actions-cell { min-width: 220px; }

.quota-input { width: 5rem; }

.privacy-notice { color: #fda4af; }

.retrieval-row {
  align-items: stretch;
}

.retrieval-row input {
  flex: 1;
}

.lookup-results {
  min-height: 7.5rem;
}

.report-actions {
  margin-top: 0.75rem;
}

.report-actions [hidden] {
  display: none !important;
}

.forgot-link {
  color: var(--accent);
}

.reset-link-input {
  min-width: 260px;
  font-size: 0.8rem;
}

@media (max-width: 960px) {
  .report-layout { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
}
