/* ========================================
   AHDDi - Unified Premium Theme
   Light warm theme for user-facing pages
   ======================================== */

:root {
  --premium-ink: #15130f;
  --premium-muted: #6f6a60;
  --premium-soft: #6a6257;
  --premium-line: #e8e2d7;
  --premium-paper: #fbfaf7;
  --premium-cream: #f4efe6;
  --premium-gold: #a77b35;
  --premium-gold-soft: #d8bd84;
  --premium-shadow: 0 22px 70px rgba(38, 31, 22, 0.11);

  /* Legacy variable mappings for compatibility */
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --secondary: #7c3aed;
  --accent: #2563eb;
  --bg-dark: var(--premium-paper);
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-card-hover: #f8fafc;
  --bg-glass: rgba(251, 250, 247, 0.86);
  --text-primary: var(--premium-ink);
  --text-secondary: var(--premium-muted);
  --border: var(--premium-line);
  --border-light: rgba(167, 123, 53, 0.16);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-sm: 6px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 36px rgba(37, 28, 18, 0.08);
}

/* Base overrides */
body {
  background: var(--premium-paper) !important;
  color: var(--premium-ink) !important;
}

/* Navbar */
#navbar {
  background: rgba(251, 250, 247, 0.82) !important;
  border-bottom-color: rgba(168, 123, 53, 0.16) !important;
}

#navbar a:not(.btn):not(.btn-gradient),
footer a {
  color: var(--premium-muted);
}

#navbar a:not(.btn):not(.btn-gradient):hover,
footer a:hover {
  color: var(--premium-ink) !important;
}

/* Buttons */
.btn-gradient {
  background: linear-gradient(135deg, #17130d, #4b3920) !important;
  color: #fff !important;
  box-shadow: 0 14px 34px rgba(27, 20, 11, 0.22) !important;
}

.btn-gradient:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(27, 20, 11, 0.28) !important;
}

.btn-gradient::before {
  background: linear-gradient(90deg, transparent, rgba(255, 238, 196, 0.22), transparent) !important;
}

.btn-ghost,
.btn-outline {
  border-color: var(--premium-line) !important;
  color: var(--premium-ink) !important;
  background: rgba(255, 255, 255, 0.68) !important;
}

.btn-ghost:hover,
.btn-outline:hover {
  background: rgba(167, 123, 53, 0.09) !important;
  border-color: rgba(167, 123, 53, 0.4) !important;
}

/* Text gradients */
.text-gradient {
  background: linear-gradient(135deg, #14110c, #a77b35) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
}

/* Links */
a:not(.btn):not(.btn-gradient),
.text-indigo-500:not(.btn):not(.btn-gradient),
.hover\:text-indigo-600:hover,
.hover\:text-indigo-500:hover {
  color: #8b6530 !important;
}

/* Ensure dark buttons keep white text */
.btn-gradient,
.btn-gradient *,
.btn.text-white,
.text-white {
  color: #ffffff !important;
}

/* Gray text overrides for contrast */
.text-gray-400 { color: #736d63 !important; }
.text-gray-500 { color: #655f55 !important; }
.text-gray-600 { color: #4f493f !important; }
.text-gray-700 { color: #383328 !important; }
.text-gray-900 { color: #1f1a13 !important; }

/* Sidebar (user pages) */
.sidebar-white {
  background: rgba(255, 255, 255, 0.92) !important;
  border-right: 1px solid var(--premium-line) !important;
}

.sidebar-link-w {
  color: var(--premium-muted) !important;
}

.sidebar-link-w svg {
  color: var(--premium-muted) !important;
}

.sidebar-link-w:hover,
.sidebar-link-w.active {
  color: var(--premium-ink) !important;
  background: rgba(167, 123, 53, 0.11) !important;
}

/* Glass & headers */
.glass-w,
.input-area-w {
  background: rgba(251, 250, 247, 0.86) !important;
  border-color: rgba(167, 123, 53, 0.16) !important;
}

/* Cards */
.card,
.card-light,
.chat-ai-w,
.preview-modal-w,
.user-dropdown,
.login-card {
  background: rgba(255, 255, 255, 0.9) !important;
  border-color: var(--premium-line) !important;
  box-shadow: 0 12px 36px rgba(37, 28, 18, 0.08) !important;
}

/* Inputs */
.input,
.input-w,
.custom-select,
input[type='date'],
select,
textarea {
  background: #fff !important;
  border-color: var(--premium-line) !important;
  color: var(--premium-ink) !important;
}

.input:focus,
.input-w:focus,
.custom-select:focus,
input[type='date']:focus,
select:focus,
textarea:focus {
  border-color: rgba(167, 123, 53, 0.56) !important;
  box-shadow: 0 0 0 3px rgba(167, 123, 53, 0.15) !important;
}

/* Tables */
.table-wrapper,
.data-table thead th,
.data-table tbody td,
.divider {
  border-color: var(--premium-line) !important;
}

.data-table thead th {
  background: #f8f3ea !important;
  color: var(--premium-muted) !important;
}

.data-table tbody tr:hover {
  background: rgba(167, 123, 53, 0.06) !important;
}

/* Tags */
.tag,
.tag-primary,
.tag-success,
.tag-warning,
.tag-danger {
  border-color: rgba(167, 123, 53, 0.24) !important;
}

/* Login background */
.login-bg {
  background:
    radial-gradient(circle at 16% 18%, rgba(216, 189, 132, 0.2), transparent 42%),
    radial-gradient(circle at 82% 72%, rgba(167, 123, 53, 0.12), transparent 40%),
    linear-gradient(180deg, #fffdf9 0%, #f6f0e7 58%, #fbfaf7 100%) !important;
}

/* Card hover & pricing */
.card-hover,
.pricing-highlight,
.faq-item {
  border-color: var(--premium-line) !important;
  background: rgba(255,255,255,0.72) !important;
  box-shadow: none !important;
}

.card-hover {
  border-radius: 14px !important;
}

.card-hover:hover {
  transform: translateY(-3px) !important;
  border-color: rgba(167,123,53,0.26) !important;
  box-shadow: 0 18px 48px rgba(49, 39, 25, 0.08) !important;
}

.border-gradient {
  background: rgba(255,255,255,0.72) !important;
  border: 1px solid var(--premium-line) !important;
}

.pricing-highlight::before {
  background: linear-gradient(90deg, var(--premium-gold), var(--premium-gold-soft)) !important;
}

/* Footer */
footer {
  background: #11100d;
  border-top-color: rgba(255,255,255,0.08) !important;
}

footer h4,
footer p {
  color: rgba(255,250,240,0.78) !important;
}

footer a {
  color: rgba(255,250,240,0.55) !important;
}

footer a:hover {
  color: #fffaf0 !important;
}

/* Scrollbar */
::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
}

/* Image skeleton */
.img-skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%) !important;
}

/* Selection */
::selection {
  background: rgba(167, 123, 53, 0.25);
  color: var(--premium-ink);
}
