/* ==========================================================
   NLS EVICTIONS | Nevada Landlord Services — Portal CSS
   Extends main site design system (same CSS variables)
   ========================================================== */

/* ── Variables (identical to main site) ──────────────────── */
:root {
  --navy-900: #070b14;
  --navy-800: #0d1425;
  --navy-700: #111827;
  --navy-600: #1a2744;
  --navy-500: #243556;
  --gold-500: #c9a84c;
  --gold-400: #d9bc6a;
  --gold-300: #e8cf8a;
  --white:    #ffffff;
  --off-white:#f5f6f7;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --text-light: #d1d5db;
  --transition: all 0.35s ease;
  --radius:   4px;
  --shadow:   0 8px 32px rgba(0,0,0,0.18);
  --shadow-gold: 0 4px 24px rgba(201,168,76,0.18);

  /* Status badge colors */
  --status-pending:     #6b7280;
  --status-in-progress: #c9a84c;
  --status-served:      #3b82f6;
  --status-completed:   #22c55e;
}

/* ── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  background: var(--off-white);
  color: var(--navy-800);
  min-height: 100vh;
}
a { color: var(--gold-500); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ── Typography ──────────────────────────────────────────── */
.serif { font-family: 'Playfair Display', serif; }
h1,h2,h3 { font-family: 'Playfair Display', serif; line-height: 1.25; }
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h2 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h3 { font-size: 1.2rem; }

/* ── Portal Nav ──────────────────────────────────────────── */
.portal-nav {
  background: var(--navy-900);
  border-bottom: 1px solid rgba(201,168,76,0.2);
  position: sticky; top: 0; z-index: 100;
  padding: 0 24px;
}
.portal-nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.portal-nav-logo {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
}
.portal-nav-logo img {
  height: 42px; width: auto;
  background: rgba(7,11,20,0.55);
  border-radius: 6px; padding: 3px 6px;
}
.portal-nav-logo-text .brand-top {
  display: block; font-family: 'Playfair Display', serif;
  font-size: .9rem; font-weight: 700; color: var(--gold-500); line-height: 1.1;
}
.portal-nav-logo-text .brand-bottom {
  display: block; font-size: .72rem; color: var(--text-light);
  letter-spacing: .04em; text-transform: uppercase;
}
.portal-nav-links {
  display: flex; align-items: center; gap: 6px; list-style: none;
}
.portal-nav-links a {
  color: var(--text-light); font-size: .85rem; padding: 6px 14px;
  border-radius: var(--radius); transition: var(--transition);
  text-decoration: none;
}
.portal-nav-links a:hover { color: var(--gold-500); background: rgba(255,255,255,0.05); }
.portal-nav-links .nav-badge {
  background: var(--navy-600); color: var(--gold-400);
  font-size: .7rem; font-weight: 600; padding: 2px 8px;
  border-radius: 20px; border: 1px solid rgba(201,168,76,0.3);
}
.portal-nav-links .btn-logout {
  background: rgba(201,168,76,0.12); color: var(--gold-400);
  border: 1px solid rgba(201,168,76,0.3); padding: 6px 14px;
  border-radius: var(--radius); font-size: .82rem; cursor: pointer;
  transition: var(--transition);
}
.portal-nav-links .btn-logout:hover { background: rgba(201,168,76,0.22); color: var(--gold-500); }

/* ── Layout ──────────────────────────────────────────────── */
.portal-wrap { max-width: 1200px; margin: 0 auto; padding: 32px 24px 60px; }
.portal-wrap-sm { max-width: 520px; margin: 0 auto; padding: 48px 24px 80px; }
.portal-wrap-md { max-width: 800px; margin: 0 auto; padding: 40px 24px 80px; }

/* ── Portal Card ─────────────────────────────────────────── */
.portal-card {
  background: var(--white);
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: 32px 36px;
  margin-bottom: 24px;
}
.portal-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-200);
}
.portal-card-header h2 { color: var(--navy-800); }
.portal-card-title { font-family: 'Playfair Display', serif; font-size: 1.4rem; color: var(--navy-800); }
.gold-accent { display: block; width: 36px; height: 3px; background: var(--gold-500); border-radius: 2px; margin-bottom: 12px; }

/* ── Auth Pages ──────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  background: var(--navy-900);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.auth-card {
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  padding: 44px 40px;
  width: 100%; max-width: 460px;
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo img {
  height: 56px; margin: 0 auto 12px;
  background: var(--navy-900); border-radius: 6px; padding: 4px 10px;
}
.auth-logo h1 { font-size: 1.25rem; color: var(--navy-800); }
.auth-logo p  { font-size: .85rem; color: var(--gray-500); margin-top: 4px; }
.auth-divider { text-align: center; margin: 20px 0; color: var(--gray-400); font-size: .85rem; position: relative; }
.auth-divider::before, .auth-divider::after {
  content: ''; display: inline-block; width: 40%; height: 1px;
  background: var(--gray-200); vertical-align: middle; margin: 0 8px;
}

/* ── Forms ───────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: .78rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--gray-700); margin-bottom: 6px;
}
.form-label .req { color: #dc3545; }
.form-control {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif; font-size: .9rem;
  color: var(--navy-800); background: var(--white);
  transition: border-color .2s, box-shadow .2s;
}
.form-control:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%236b7280' d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 12px; padding-right: 32px; }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-hint { font-size: .78rem; color: var(--gray-500); margin-top: 4px; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn-gold {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--gold-500); color: var(--navy-900);
  font-weight: 700; font-size: .88rem; letter-spacing: .03em;
  padding: 11px 24px; border: none; border-radius: var(--radius);
  cursor: pointer; transition: var(--transition); text-decoration: none;
  white-space: nowrap;
}
.btn-gold:hover { background: var(--gold-400); transform: translateY(-1px); box-shadow: var(--shadow-gold); text-decoration: none; }
.btn-gold:active { transform: none; }
.btn-gold-full { width: 100%; padding: 13px; font-size: .95rem; }
.btn-outline {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; color: var(--gray-700);
  border: 1px solid var(--gray-200); padding: 9px 18px;
  border-radius: var(--radius); font-size: .85rem;
  cursor: pointer; transition: var(--transition); text-decoration: none;
}
.btn-outline:hover { border-color: var(--gold-500); color: var(--gold-500); text-decoration: none; }
.btn-danger {
  background: #fee2e2; color: #dc2626; border: 1px solid #fca5a5;
  padding: 6px 14px; border-radius: var(--radius); font-size: .82rem;
  cursor: pointer; transition: var(--transition);
}
.btn-danger:hover { background: #fca5a5; }
.btn-print {
  background: var(--navy-800); color: var(--gold-400);
  border: 1px solid rgba(201,168,76,0.3); padding: 6px 14px;
  border-radius: var(--radius); font-size: .82rem; cursor: pointer;
  transition: var(--transition); text-decoration: none; display: inline-flex; align-items: center; gap: 5px;
}
.btn-print:hover { background: var(--navy-600); color: var(--gold-300); text-decoration: none; }

.btn-photos {
  background: var(--navy-800); color: #7dd3b0;
  border: 1px solid rgba(125,211,176,0.3); padding: 6px 14px;
  border-radius: var(--radius); font-size: .82rem; cursor: pointer;
  transition: var(--transition); text-decoration: none; display: inline-flex; align-items: center; gap: 5px;
}
.btn-photos:hover { background: var(--navy-600); color: #a7f3d8; text-decoration: none; }
.photo-badge {
  background: #7dd3b0; color: var(--navy-900);
  border-radius: 999px; padding: 1px 7px; font-size: .72rem; font-weight: 700; line-height: 1.5;
}

/* ── Form Alerts ─────────────────────────────────────────── */
.form-alert {
  padding: 14px 18px; border-radius: var(--radius);
  margin-bottom: 20px; font-size: .9rem; display: none;
}
.form-alert.success { background: #d1fae5; border: 1px solid #6ee7b7; color: #065f46; }
.form-alert.error   { background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; }
.form-alert.warning { background: #fef3c7; border: 1px solid #fcd34d; color: #92400e; }

/* ── Loading spinner ─────────────────────────────────────── */
.btn-spinner {
  display: none; width: 16px; height: 16px;
  border: 2px solid rgba(7,11,20,0.3); border-top-color: var(--navy-900);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-loading .btn-label { display: none; }
.btn-loading .btn-spinner { display: block; }

/* ── Tabs ────────────────────────────────────────────────── */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--gray-200); margin-bottom: 28px; }
.tab-btn {
  padding: 10px 24px; border: none; background: none;
  font-family: 'Inter', sans-serif; font-size: .9rem; font-weight: 500;
  color: var(--gray-500); cursor: pointer; transition: var(--transition);
  border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.tab-btn:hover { color: var(--gold-500); }
.tab-btn.active { color: var(--gold-500); border-bottom-color: var(--gold-500); font-weight: 600; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── Data Table ──────────────────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.portal-table {
  width: 100%; border-collapse: collapse; font-size: .88rem;
}
.portal-table th {
  background: var(--navy-800); color: var(--gold-400);
  font-family: 'Playfair Display', serif; font-weight: 600;
  padding: 12px 16px; text-align: left; white-space: nowrap;
  font-size: .82rem; letter-spacing: .04em;
}
.portal-table td {
  padding: 12px 16px; border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700); vertical-align: middle;
}
.portal-table tr:last-child td { border-bottom: none; }
.portal-table tr:nth-child(even) td { background: var(--off-white); }
.portal-table tr:hover td { background: #fef9ec; }
.portal-table .actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.table-empty { text-align: center; padding: 48px 20px; color: var(--gray-400); }
.table-empty svg { width: 48px; height: 48px; opacity: .3; margin: 0 auto 12px; }

/* ── Status Badges ───────────────────────────────────────── */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: .75rem; font-weight: 600; text-transform: capitalize; white-space: nowrap;
}
.badge-pending     { background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb; }
.badge-in-progress { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.badge-served      { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
.badge-completed   { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }

/* ── Stats Strip ─────────────────────────────────────────── */
.stats-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px; margin-bottom: 28px;
}
.stat-box {
  background: var(--white); border-radius: 6px; padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06); text-align: center;
  border-top: 3px solid var(--gold-500);
}
.stat-box .stat-num { font-family: 'Playfair Display', serif; font-size: 2rem; color: var(--navy-800); font-weight: 700; }
.stat-box .stat-lbl { font-size: .78rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }

/* ── Search / Filter Bar ─────────────────────────────────── */
.filter-bar {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  margin-bottom: 20px;
}
.filter-bar input, .filter-bar select {
  padding: 9px 14px; border: 1px solid var(--gray-200);
  border-radius: var(--radius); font-size: .88rem; color: var(--navy-800);
  background: var(--white); transition: border-color .2s;
}
.filter-bar input:focus, .filter-bar select:focus {
  outline: none; border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.12);
}
.filter-bar input { flex: 1; min-width: 180px; }

/* ── CSV Upload Zone ─────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--gray-200); border-radius: 6px;
  padding: 40px 24px; text-align: center; cursor: pointer;
  transition: border-color .3s, background .3s; background: var(--off-white);
}
.upload-zone.dragover { border-color: var(--gold-500); background: #fef9ec; }
.upload-zone svg { width: 40px; height: 40px; color: var(--gray-400); margin: 0 auto 12px; }
.upload-zone p { color: var(--gray-500); font-size: .9rem; }
.upload-zone strong { color: var(--gold-500); }
#csvFileInput { display: none; }

/* ── CSV Preview Table ───────────────────────────────────── */
.csv-preview-wrap { margin-top: 20px; }
.csv-preview-title {
  font-size: .85rem; font-weight: 600; color: var(--gray-700);
  margin-bottom: 10px;
}
.csv-progress { margin-top: 14px; }
.csv-progress-bar {
  height: 6px; background: var(--gray-200); border-radius: 3px; overflow: hidden;
}
.csv-progress-bar-fill {
  height: 100%; background: var(--gold-500); border-radius: 3px;
  width: 0%; transition: width .3s ease;
}
.csv-progress-text { font-size: .82rem; color: var(--gray-500); margin-top: 6px; }

/* ── Page Header ─────────────────────────────────────────── */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 24px;
}
.page-header h1 { color: var(--navy-800); }
.page-header p  { color: var(--gray-500); font-size: .9rem; margin-top: 4px; }

/* ── Welcome Banner ──────────────────────────────────────── */
.welcome-banner {
  background: linear-gradient(120deg, var(--navy-800), var(--navy-600));
  border-radius: 8px; padding: 28px 32px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-bottom: 28px;
  border-left: 4px solid var(--gold-500);
}
.welcome-banner h2 { color: var(--white); margin-bottom: 4px; }
.welcome-banner p  { color: var(--text-light); font-size: .9rem; }

/* ── Notice-specific (print_notice) ─────────────────────── */
.notice-page { background: var(--white); max-width: 720px; margin: 40px auto; padding: 40px; font-size: 14px; }
.notice-header { text-align: center; margin-bottom: 32px; border-bottom: 2px solid var(--navy-800); padding-bottom: 20px; }
.notice-header img { height: 70px; margin: 0 auto 10px; }
.notice-title { font-family: 'Playfair Display', serif; font-size: 1.6rem; text-transform: uppercase; letter-spacing: .05em; color: var(--navy-800); }
.notice-subtitle { font-size: .9rem; color: var(--gray-500); margin-top: 4px; }
.notice-body { line-height: 1.8; }
.notice-body .notice-field { margin: 10px 0; }
.notice-body .notice-field strong { display: inline-block; min-width: 160px; color: var(--navy-800); }
.notice-signature { margin-top: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.sig-line { border-top: 1px solid var(--navy-800); padding-top: 8px; font-size: .82rem; color: var(--gray-500); }

/* ── Footer ──────────────────────────────────────────────── */
.portal-footer {
  background: var(--navy-900); color: var(--text-light);
  text-align: center; padding: 20px;
  font-size: .8rem; margin-top: 60px;
  border-top: 1px solid rgba(201,168,76,0.15);
}
.portal-footer a { color: var(--gold-500); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .portal-card { padding: 24px 20px; }
  .auth-card   { padding: 32px 24px; }
  .portal-nav-logo-text { display: none; }
  .welcome-banner { padding: 22px 20px; }
  .portal-table th, .portal-table td { padding: 10px 10px; }
  .notice-signature { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .tabs { overflow-x: auto; }
  .tab-btn { padding: 10px 16px; font-size: .82rem; white-space: nowrap; }
  .filter-bar { flex-direction: column; }
  .filter-bar input, .filter-bar select { width: 100%; }
}

/* ── Print styles ────────────────────────────────────────── */
@media print {
  .portal-nav, .portal-footer, .no-print,
  .btn-gold, .btn-outline, .btn-print, .btn-danger { display: none !important; }
  body { background: white; }
  .notice-page { margin: 0; padding: 20px; box-shadow: none; }
}
