/* ============================================================
   Angel Nova Group – Channel Partner Portal (static HTML)
   Navy / White / Gold real-estate aesthetic
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Manrope:wght@300;400;500;600;700;800&display=swap');

:root {
  --navy: #0A192F;
  --navy-2: #112240;
  --gold: #D4AF37;
  --gold-2: #B8941F;
  --bg: #F8F9FA;
  --ink: #111827;
  --muted: #6B7280;
  --line: #E5E7EB;
  --line-2: #F1F5F9;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.font-display { font-family: 'Cormorant Garamond', serif; letter-spacing: -0.01em; }

.label-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}

/* ============== Auth layout ============== */
.auth-grid {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 1024px) {
  .auth-grid { grid-template-columns: 1fr 1fr; }
}
.auth-hero {
  display: none;
  padding: 3rem;
  color: #fff;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(115deg, rgba(10,25,47,0.92) 0%, rgba(10,25,47,0.75) 60%, rgba(10,25,47,0.30) 100%),
    url('https://images.pexels.com/photos/8143683/pexels-photo-8143683.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=800&w=1200') center/cover no-repeat;
}
@media (min-width: 1024px) {
  .auth-hero { display: flex; }
}
.auth-hero h1 { font-family: 'Cormorant Garamond', serif; font-size: 3rem; line-height: 1.1; margin: 0.5rem 0; }
.auth-hero .accent { color: var(--gold); }

.auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: 2rem; background: #fff; }
.auth-form { width: 100%; max-width: 420px; }
.auth-form h2 { font-family: 'Cormorant Garamond', serif; font-size: 2rem; color: var(--navy); margin: 0.25rem 0; }

/* ============== Brand logo ============== */
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 6px;
  background: var(--gold); color: var(--navy);
  display: flex; align-items: center; justify-content: center;
}
.brand-name { font-family: 'Cormorant Garamond', serif; font-size: 1.15rem; font-weight: 600; }
.brand-sub { font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-top: -3px; }
.brand-dark .brand-name { color: #fff; }
.brand-dark .brand-sub { color: var(--gold); }

/* ============== Buttons ============== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; border-radius: 6px; font-size: 0.875rem; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: all 180ms ease;
  font-family: inherit;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-2); }
.btn-outline { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-outline:hover { border-color: var(--gold); }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover { background: var(--line-2); }
.btn-sm { padding: 6px 10px; font-size: 0.8rem; }
.btn-lg { padding: 12px 20px; }
.btn-block { width: 100%; }
.btn-wa { background: #25D366; color: #fff; }
.btn-wa:hover { background: #1fb955; }

/* ============== Form ============== */
label { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.16em; color: #4B5563; margin: 12px 0 6px; }
.input, .select, .textarea {
  width: 100%; padding: 10px 12px; font-size: 0.9rem; border: 1px solid var(--line);
  border-radius: 6px; background: #fff; font-family: inherit; color: var(--ink);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.15);
}
.input-with-icon { position: relative; }
.input-with-icon .icon { position: absolute; left: 12px; top: 12px; color: #94a3b8; width: 16px; height: 16px; }
.input-with-icon .input { padding-left: 36px; }
.textarea { min-height: 90px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .form-row.cols-2 { grid-template-columns: 1fr 1fr; } .form-row.cols-3 { grid-template-columns: repeat(3, 1fr); } }

/* Divider with label */
.divider { display: flex; align-items: center; gap: 12px; margin: 24px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.divider span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.18em; color: #94a3b8; }

/* ============== Sidebar & Bottom nav ============== */
.side {
  position: fixed; left: 0; top: 0; bottom: 0; width: 256px; z-index: 40;
  background: radial-gradient(1200px 500px at 20% -10%, #17324f 0%, transparent 60%),
              radial-gradient(1000px 500px at 100% 100%, #0e2540 0%, transparent 60%),
              var(--navy);
  color: #cbd5e1; display: none; flex-direction: column;
}
@media (min-width: 1024px) { .side { display: flex; } }
.side-head { padding: 24px 20px 16px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.side-nav { flex: 1; overflow-y: auto; padding: 16px 12px; }
.side-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  border-radius: 8px; color: #cbd5e1; font-weight: 500; font-size: 14px;
  transition: all 180ms ease; border-left: 2px solid transparent; margin: 2px 0;
}
.side-link:hover { color: #fff; background: rgba(255,255,255,0.04); }
.side-link.active {
  color: var(--gold); background: rgba(212,175,55,0.08);
  border-left-color: var(--gold);
}
.side-foot { padding: 16px; border-top: 1px solid rgba(255,255,255,0.06); }
.side-user { color: #fff; font-weight: 600; font-size: 0.875rem; }
.side-role { color: #94a3b8; font-size: 0.75rem; text-transform: capitalize; }

.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; height: 64px; z-index: 50;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr);
}
@media (min-width: 1024px) { .bottom-nav { display: none; } }
.bnav-link {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; font-size: 10px; color: #6B7280; padding: 6px 4px;
}
.bnav-link.active { color: var(--navy); }
.bnav-link.active svg { color: var(--gold); }

/* ============== Shell ============== */
.shell { min-height: 100vh; padding-bottom: 80px; }
@media (min-width: 1024px) { .shell { padding-left: 256px; padding-bottom: 0; } }

.topbar {
  position: sticky; top: 0; z-index: 30; height: 64px;
  background: rgba(255,255,255,0.85); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
}
@media (min-width: 1024px) { .topbar { padding: 0 40px; } }
.topbar-title { display: none; }
@media (min-width: 1024px) { .topbar-title { display: block; } }
.topbar-title .t { font-family: 'Cormorant Garamond', serif; font-size: 1.15rem; color: var(--navy); font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.icon-btn {
  position: relative; width: 36px; height: 36px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center; background: transparent;
  border: none; cursor: pointer; color: #374151; transition: background 180ms ease;
}
.icon-btn:hover { background: var(--line-2); }
.notif-dot {
  position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px;
  padding: 0 4px; border-radius: 999px; background: var(--gold); color: var(--navy);
  font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.avatar {
  width: 36px; height: 36px; border-radius: 999px; background: var(--navy);
  color: var(--gold); display: flex; align-items: center; justify-content: center; font-weight: 700;
}

.page { padding: 24px 20px 40px; max-width: 1440px; }
@media (min-width: 1024px) { .page { padding: 40px; } }
.page-head { margin-bottom: 24px; }
.page-head h1 { font-family: 'Cormorant Garamond', serif; font-size: 1.75rem; color: var(--navy); margin: 4px 0 6px; }
.page-head .sub { color: #6B7280; font-size: 0.875rem; }

/* ============== Cards ============== */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 20px;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.card.hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px -8px rgba(10,25,47,0.18);
  border-color: rgba(212,175,55,0.4);
}
.card-navy { background: var(--navy); color: #fff; border-color: var(--navy); }
.card-navy .label-eyebrow { color: #94a3b8; }
.card-gold { background: rgba(212,175,55,0.10); border-color: rgba(212,175,55,0.45); }
.card-title { font-family: 'Cormorant Garamond', serif; font-size: 1.25rem; color: var(--navy); margin: 4px 0 0; }
.card-navy .card-title { color: #fff; }

.icon-square {
  width: 40px; height: 40px; border-radius: 6px; background: var(--navy); color: var(--gold);
  display: flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.card-navy .icon-square { background: var(--gold); color: var(--navy); }

.kpi { font-family: 'Cormorant Garamond', serif; font-size: 1.9rem; color: var(--navy); }
.card-navy .kpi { color: #fff; }
.kpi-delta { font-size: 0.72rem; color: #059669; margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.card-navy .kpi-delta { color: #6ee7b7; }

/* ============== Grid ============== */
.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) {
  .grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid.cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .lg-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg-span-2 { grid-column: span 2 / span 2; }
  .lg-span-3 { grid-column: span 3 / span 3; }
}

/* ============== Badges & Status ============== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600;
  border: 1px solid var(--line); background: #F3F4F6; color: #374151;
}
.badge-navy { background: var(--navy); color: var(--gold); border-color: var(--navy); }
.badge-gold { background: rgba(212,175,55,0.15); color: var(--navy); border-color: rgba(212,175,55,0.5); }
.status-available { background: #ECFDF5; color: #047857; border-color: #A7F3D0; }
.status-hold      { background: #FFFBEB; color: #92400E; border-color: #FDE68A; }
.status-token     { background: #F0F9FF; color: #075985; border-color: #BAE6FD; }
.status-booked    { background: #EFF6FF; color: #1D4ED8; border-color: #BFDBFE; }
.status-sold      { background: #FFF1F2; color: #9F1239; border-color: #FECDD3; }

/* ============== Tables ============== */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; padding: 12px 20px; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.06em; color: #64748b; font-weight: 600;
  background: #F8FAFC; border-bottom: 1px solid var(--line);
}
.table td { padding: 14px 20px; font-size: 0.875rem; color: #1E293B; border-bottom: 1px solid #F1F5F9; }
.table tr:hover td { background: #FAFBFC; }
.table td.right, .table th.right { text-align: right; }

/* ============== Inventory card ============== */
.inv-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.inv-img { position: relative; height: 160px; background: #E5E7EB; }
.inv-img img { width: 100%; height: 100%; object-fit: cover; }
.inv-badge { position: absolute; top: 12px; left: 12px; }
.inv-tag { position: absolute; top: 12px; right: 12px; }
.inv-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.inv-price { font-family: 'Cormorant Garamond', serif; font-size: 1.15rem; color: var(--navy); }

/* Utility */
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; } .mt-5 { margin-top: 20px; } .mt-6 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; } .mb-5 { margin-bottom: 20px; } .mb-6 { margin-bottom: 24px; }
.text-muted { color: var(--muted); }
.text-navy { color: var(--navy); }
.text-gold { color: var(--gold); }
.text-xs { font-size: 0.72rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.05rem; }
.text-xl { font-size: 1.25rem; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.flex-1 { flex: 1; }
.hidden { display: none !important; }
.divider-line { height: 1px; background: var(--line); margin: 16px 0; }
.list-clean { list-style: none; padding: 0; margin: 0; }
.list-clean li { padding: 12px 0; border-bottom: 1px solid #F1F5F9; }
.list-clean li:last-child { border-bottom: none; }

.progress { height: 6px; background: rgba(255,255,255,0.12); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); }

/* Toast */
.toast-wrap { position: fixed; top: 20px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 16px; font-size: 0.875rem; color: var(--navy);
  box-shadow: 0 10px 30px -12px rgba(10,25,47,0.25);
  border-left: 3px solid var(--gold);
  animation: slideIn 200ms ease;
  min-width: 260px;
}
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Dialog */
.dialog-backdrop { position: fixed; inset: 0; background: rgba(10,25,47,0.55); z-index: 60; display: none; align-items: center; justify-content: center; padding: 20px; }
.dialog-backdrop.open { display: flex; }
.dialog {
  background: #fff; border-radius: 10px; max-width: 560px; width: 100%;
  padding: 24px; max-height: 90vh; overflow-y: auto;
}
.dialog h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; color: var(--navy); margin: 0 0 12px; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 20px; }
.tab { padding: 12px 16px; font-size: 0.875rem; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; }
.tab.active { color: var(--navy); border-bottom-color: var(--gold); }

/* Focus */
button:focus-visible, a:focus-visible, .input:focus-visible, .select:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px;
}

/* Calendar (custom) */
.cal { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #fff; }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cal-title { font-weight: 600; color: var(--navy); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow { font-size: 10px; color: var(--muted); text-align: center; padding: 6px 0; font-weight: 600; text-transform: uppercase; }
.cal-day { text-align: center; padding: 10px 0; font-size: 0.875rem; border-radius: 6px; cursor: pointer; color: #374151; }
.cal-day:hover { background: var(--line-2); }
.cal-day.other { color: #CBD5E1; }
.cal-day.today { border: 1px solid var(--gold); }
.cal-day.selected { background: var(--navy); color: #fff; }
.cal-day.scheduled { background: rgba(212,175,55,0.25); color: var(--navy); font-weight: 600; }

/* Sticky header title on mobile */
.mobile-title { display: block; padding: 20px 20px 0; }
@media (min-width: 1024px) { .mobile-title { display: none; } }
.mobile-title h1 { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; color: var(--navy); margin: 4px 0 4px; }
