
/* ═══════════════════════════════════════════════════
   Estate HDR — Global Stylesheet
   Dark glassmorphism + gold accent premium aesthetic
═══════════════════════════════════════════════════ */

/* ── Custom Properties ─────────────────────────────── */
:root {
  --gold:       #C9A84C;
  --gold-light: #E8C97B;
  --gold-dark:  #9A7A2E;
  --dark:       #0A0A0F;
  --dark-card:  #111118;
  --dark-border:#1E1E2E;
  --text-muted: #6B7280;
  --radius-lg:  1rem;
  --radius-xl:  1.5rem;
  --radius-2xl: 2rem;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--dark);
  color: #fff;
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Typography ──────────────────────────────────── */
.text-gradient {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Buttons ─────────────────────────────────────── */
.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
  color: #0A0A0F;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  padding: 0.75rem 1.75rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  background-size: 200% 200%;
  background-position: left center;
}
.btn-gold:hover {
  background-position: right center;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(201,168,76,0.4);
}
.btn-gold:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: #fff;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.75rem 1.75rem;
  border-radius: 0.75rem;
  border: 1px solid var(--dark-border);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}
.btn-ghost:hover {
  border-color: rgba(201,168,76,0.5);
  background: rgba(201,168,76,0.06);
  color: var(--gold);
}

.shadow-glow {
  box-shadow: 0 4px 24px rgba(201,168,76,0.35);
}

/* ── Cards ────────────────────────────────────────── */
.glass-card {
  background: rgba(17,17,24,0.8);
  border: 1px solid var(--dark-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition);
}
.glass-card:hover {
  border-color: rgba(201,168,76,0.25);
  box-shadow: 0 0 40px rgba(201,168,76,0.05);
}

.pricing-popular {
  background: rgba(17,17,24,0.95);
  border: 1px solid rgba(201,168,76,0.4);
  backdrop-filter: blur(12px);
  box-shadow: 0 0 60px rgba(201,168,76,0.1), inset 0 0 40px rgba(201,168,76,0.03);
}

/* ── Navbar ───────────────────────────────────────── */
#navbar {
  background: transparent;
  border-bottom: 1px solid transparent;
}
#navbar.nav-scrolled {
  background: rgba(10,10,15,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--dark-border);
  box-shadow: 0 4px 30px rgba(0,0,0,0.4);
}

/* ── Section Tag ─────────────────────────────────── */
.section-tag {
  display: inline-block;
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  border: 1px solid rgba(201,168,76,0.3);
  background: rgba(201,168,76,0.08);
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── Scroll Reveal ───────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Flash Messages ──────────────────────────────── */
.flash-msg {
  padding: 0.875rem 1.25rem;
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
}
.flash-success {
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.3);
  color: #4ade80;
}
.flash-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #f87171;
}

/* ── Status Badges ───────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-pending       { background: rgba(107,114,128,0.2); color: #9ca3af; border: 1px solid rgba(107,114,128,0.3); }
.badge-inprogress    { background: rgba(59,130,246,0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }
.badge-delivered     { background: rgba(201,168,76,0.15); color: var(--gold); border: 1px solid rgba(201,168,76,0.3); }
.badge-amendment     { background: rgba(251,146,60,0.15); color: #fb923c; border: 1px solid rgba(251,146,60,0.3); }
.badge-completed     { background: rgba(34,197,94,0.15);  color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }

/* ── Form Elements ───────────────────────────────── */
.form-input {
  width: 100%;
  background: rgba(10,10,15,0.8);
  border: 1px solid var(--dark-border);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  color: #fff;
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
}
.form-input:focus {
  border-color: rgba(201,168,76,0.5);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.08);
}
.form-input::placeholder { color: #4b5563; }

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #9ca3af;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.form-select {
  width: 100%;
  background: rgba(10,10,15,0.8);
  border: 1px solid var(--dark-border);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  color: #fff;
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
  appearance: none;
  cursor: pointer;
}
.form-select:focus {
  border-color: rgba(201,168,76,0.5);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.08);
}

/* ── Portal Layout ───────────────────────────────── */
.portal-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--dark);
}
.portal-header {
  background: rgba(17,17,24,0.95);
  border-bottom: 1px solid var(--dark-border);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 40;
}
.portal-main {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  width: 100%;
}

/* ── Ticket Thread ───────────────────────────────── */
.message-bubble {
  max-width: 80%;
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  line-height: 1.6;
  word-break: break-word;
}
.message-bubble.client {
  background: rgba(30,30,50,0.8);
  border: 1px solid var(--dark-border);
  margin-left: auto;
  border-bottom-right-radius: 0.25rem;
}
.message-bubble.admin {
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.2);
  margin-right: auto;
  border-bottom-left-radius: 0.25rem;
}
.message-type-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
}
.type-order       { background: rgba(59,130,246,0.2); color: #60a5fa; }
.type-delivery    { background: rgba(201,168,76,0.2); color: var(--gold); }
.type-amendment   { background: rgba(251,146,60,0.2); color: #fb923c; }
.type-reply       { background: rgba(34,197,94,0.2);  color: #4ade80; }

/* ── Auth Pages ───────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dark);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(201,168,76,0.12), transparent),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(201,168,76,0.05), transparent);
  padding: 2rem 1rem;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(17,17,24,0.9);
  border: 1px solid var(--dark-border);
  border-radius: 1.5rem;
  padding: 2.5rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

/* ── Dashboard Table ─────────────────────────────── */
.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.dashboard-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  color: #6b7280;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--dark-border);
}
.dashboard-table td {
  padding: 1rem;
  border-bottom: 1px solid rgba(30,30,46,0.5);
  vertical-align: middle;
}
.dashboard-table tr:hover td {
  background: rgba(201,168,76,0.03);
}
.dashboard-table tr:last-child td {
  border-bottom: none;
}

/* ── Before/After Slider ─────────────────────────── */
.ba-divider { cursor: ew-resize; transition: none; }

/* ── Scrollbar ───────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--dark-card); }
::-webkit-scrollbar-thumb { background: var(--dark-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(201,168,76,0.4); }

/* ── Loading Spinner ─────────────────────────────── */
.spinner {
  width: 1.5rem; height: 1.5rem;
  border: 2px solid rgba(201,168,76,0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive Utilities ────────────────────────── */
@media (max-width: 768px) {
  .portal-main { padding: 1.25rem 1rem; }
  .auth-card { padding: 1.75rem; }
  .message-bubble { max-width: 95%; }
}

/* ── Light Mode Day Theme ──────────────────────────── */
html.light {
  --dark:        #F8F9FC;
  --dark-card:   #FFFFFF;
  --dark-border: #E2E8F0;
  --text-muted:  #64748B;
}

html.light body {
  background-color: #F8F9FC;
  color: #0F172A;
}

html.light .glass-card {
  background: rgba(255, 255, 255, 0.96) !important;
  border-color: #E2E8F0 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
}

html.light .text-white {
  color: #0F172A !important;
}

html.light .text-gray-200,
html.light .text-gray-300 {
  color: #1E293B !important;
}

html.light .text-gray-400,
html.light .text-gray-500 {
  color: #64748B !important;
}

html.light .bg-dark {
  background-color: #F8F9FC !important;
}

html.light .bg-dark-card {
  background-color: #FFFFFF !important;
}

html.light .bg-dark\/60,
html.light .bg-dark\/70,
html.light .bg-dark\/80 {
  background-color: rgba(241, 245, 249, 0.9) !important;
}

html.light .border-dark-border {
  border-color: #E2E8F0 !important;
}

html.light .portal-header,
html.light .nav-scrolled {
  background: rgba(255, 255, 255, 0.96) !important;
  border-color: #E2E8F0 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
}

html.light .dashboard-table th {
  background: #F1F5F9 !important;
  color: #475569 !important;
  border-color: #E2E8F0 !important;
}

html.light .dashboard-table td {
  border-color: #F1F5F9 !important;
  color: #1E293B !important;
}

html.light .dashboard-table tbody tr:hover td {
  background: #F8FAFC !important;
}

html.light .form-input,
html.light .form-select {
  background: #FFFFFF !important;
  border-color: #CBD5E1 !important;
  color: #0F172A !important;
}

html.light .form-input:focus,
html.light .form-select:focus {
  background: #FFFFFF !important;
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.2) !important;
}

html.light .btn-ghost {
  color: #0F172A !important;
  border-color: #CBD5E1 !important;
}

html.light .btn-ghost:hover {
  background: rgba(201, 168, 76, 0.1) !important;
  color: var(--gold-dark) !important;
  border-color: var(--gold) !important;
}

html.light .message-bubble.client {
  background: #EEF2F6 !important;
  border-color: #E2E8F0 !important;
}

html.light .message-bubble.admin {
  background: #FDFBF4 !important;
  border-color: rgba(201, 168, 76, 0.3) !important;
}

