/* ============================================================
   JOVIS HOTEL - Premium Gold & Black / Gold & White Theme
   Central design system — change colors here to retheme globally
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@500;600;700;800&display=swap');

/* ── Design Tokens ──────────────────────────────────────────── */
:root {
    /* Gold palette */
    --gold-50:  #FFFBEB;
    --gold-100: #FEF3C7;
    --gold-200: #FDE68A;
    --gold-300: #FCD34D;
    --gold-400: #FBBF24;
    --gold-500: #F59E0B;
    --gold-600: #D97706;
    --gold-700: #B45309;
    --gold-800: #92400E;
    --gold-900: #78350F;

    /* Black/Charcoal palette */
    --black-900: #0A0A0A;
    --black-800: #111111;
    --black-700: #1A1A1A;
    --black-600: #222222;
    --black-500: #2D2D2D;
    --black-400: #3D3D3D;
    --black-300: #555555;
    --black-200: #888888;
    --black-100: #BBBBBB;
    --black-50:  #F0EDE8;

    /* ── DARK MODE VARIABLES (Default) ────────────────────────── */
    --primary:   #D97706;      /* rich gold */
    --primary-hover: #B45309;
    --primary-light: #FEF3C7;
    
    --sidebar-bg: #111111;
    --sidebar-border: rgba(212, 175, 55, 0.2);
    --sidebar-text: #CCCCCC;
    --sidebar-hover: rgba(212, 175, 55, 0.08);
    --sidebar-active: rgba(212, 175, 55, 0.18);
    --sidebar-active-text: #F59E0B;
    
    --header-bg: #111111;
    --header-border: rgba(212, 175, 55, 0.15);
    
    --body-bg: #1A1A1A;
    --card-bg: #1E1E1E;
    --card-border: rgba(212, 175, 55, 0.12);
    
    --text-primary: #F5F0E8;
    --text-secondary: #AAAAAA;
    --text-muted: #666666;
    
    --text-900: #F5F0E8;
    --text-800: #E0D8CC;
    --text-700: #C8C0B4;
    --text-600: #AAAAAA;
    --text-500: #666666;
    --text-400: #555555;
    --text-300: #444444;

    --bg-gray-800: #222222;
    --table-header-bg: #222222;
    --input-bg: #2D2D2D;
    
    --success: #22C55E;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;

    /* Gold gradient accent */
    --gold-gradient: linear-gradient(135deg, #F59E0B 0%, #D97706 50%, #92400E 100%);
    --gold-shimmer:  linear-gradient(90deg, transparent, rgba(212,175,55,0.15), transparent);

    --page-loader-bg: rgba(17, 17, 17, 0.95);
    --modal-bg: var(--card-bg);
}

/* ── LIGHT MODE VARIABLES ────────────────────────────────────── */
body.light {
    --sidebar-bg: #FFFFFF;
    --sidebar-border: rgba(217, 119, 6, 0.15);
    --sidebar-text: #4B5563;
    --sidebar-hover: rgba(217, 119, 6, 0.05);
    --sidebar-active: rgba(217, 119, 6, 0.12);
    --sidebar-active-text: #D97706;
    
    --header-bg: #FFFFFF;
    --header-border: rgba(217, 119, 6, 0.1);
    
    --body-bg: #F9FAFB;
    --card-bg: #FFFFFF;
    --card-border: rgba(0, 0, 0, 0.08);
    
    --text-primary: #1F2937;
    --text-secondary: #4B5563;
    --text-muted: #9CA3AF;
    
    --text-900: #111827;
    --text-800: #1F2937;
    --text-700: #374151;
    --text-600: #4B5563;
    --text-500: #6B7280;
    --text-400: #9CA3AF;
    --text-300: #D1D5DB;

    --bg-gray-800: #F3F4F6;
    --table-header-bg: #F3F4F6;
    --input-bg: #FFFFFF;

    --page-loader-bg: rgba(255, 255, 255, 0.95);
    --modal-bg: #FFFFFF;
}

/* ── Base ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--body-bg);
    color: var(--text-primary);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    color: var(--text-primary);
}

/* ── Tailwind overrides: body & layout ──────────────────────── */
body.bg-gray-50,
.bg-gray-50 {
    background-color: var(--body-bg) !important;
}

/* ── Sidebar ────────────────────────────────────────────────── */
aside#sidebar,
[id="sidebar"] {
    background-color: var(--sidebar-bg) !important;
    border-right: 1px solid var(--sidebar-border);
}

/* Sidebar logo strip */
aside#sidebar .border-b {
    border-color: var(--sidebar-border) !important;
}

aside#sidebar span.text-xl {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    letter-spacing: 0.03em;
}

/* Role badge area */
aside#sidebar .bg-gray-800\/30 {
    background-color: var(--sidebar-hover) !important;
}

/* Nav section labels */
aside#sidebar .text-gray-500.uppercase {
    color: var(--gold-500) !important;
    opacity: 0.8;
    letter-spacing: 0.1em;
}

/* Nav links - default */
aside#sidebar a.text-gray-300,
aside#sidebar button.text-gray-300 {
    color: var(--sidebar-text) !important;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

aside#sidebar a:hover,
aside#sidebar button:hover {
    background-color: var(--sidebar-hover) !important;
    color: var(--gold-600) !important;
}

/* Active nav link */
aside#sidebar a.bg-primary\/90,
aside#sidebar a[class*="bg-primary"],
aside#sidebar a[class*="bg-indigo"] {
    background: var(--sidebar-active) !important;
    color: var(--sidebar-active-text) !important;
    border-left: 3px solid var(--gold-500);
}

/* Sidebar footer */
aside#sidebar .border-t {
    border-color: var(--sidebar-border) !important;
}

aside#sidebar .text-gray-400 {
    color: var(--text-muted) !important;
}

/* ── Header ─────────────────────────────────────────────────── */
header {
    background-color: var(--header-bg) !important;
    border-bottom: 1px solid var(--header-border) !important;
}

header h1 {
    color: var(--gold-600) !important;
    font-weight: 600;
}

header .text-gray-600,
header .text-gray-400 {
    color: var(--text-secondary) !important;
}

header button:hover {
    color: var(--gold-500) !important;
    background-color: var(--sidebar-hover) !important;
}

/* User avatar circle in header */
header .bg-primary {
    background: var(--gold-gradient) !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
}

/* Header dropdown */
header #user-menu-dropdown {
    background-color: var(--modal-bg) !important;
    border: 1px solid var(--card-border) !important;
}

header #user-menu-dropdown a {
    color: var(--text-primary) !important;
}

header #user-menu-dropdown a:hover {
    background-color: var(--sidebar-hover) !important;
    color: var(--gold-500) !important;
}

/* ── Cards / Panels ─────────────────────────────────────────── */
.bg-white {
    background-color: var(--card-bg) !important;
    border-color: var(--card-border) !important;
}

.bg-gray-50 {
    background-color: var(--body-bg) !important;
}

.border-gray-200,
.border-gray-100 {
    border-color: var(--card-border) !important;
}

/* ── Typography ─────────────────────────────────────────────── */
.text-gray-900 { color: var(--text-900) !important; }
.text-gray-800 { color: var(--text-800) !important; }
.text-gray-700 { color: var(--text-700) !important; }
.text-gray-600 { color: var(--text-600) !important; }
.text-gray-500 { color: var(--text-500) !important; }
.text-gray-400 { color: var(--text-400) !important; }
.text-gray-300 { color: var(--text-300) !important; }

/* ── Primary color overrides (indigo → gold) ─────────────────── */
.text-primary,
.text-indigo-600,
.text-indigo-700 {
    color: var(--gold-500) !important;
}

.bg-primary,
.bg-indigo-600,
.bg-indigo-700 {
    background: var(--gold-gradient) !important;
    color: #FFFFFF !important;
}

.bg-primary:hover,
.bg-indigo-600:hover,
.bg-indigo-700:hover,
.hover\:bg-indigo-700:hover {
    background: linear-gradient(135deg, #D97706, #B45309) !important;
}

.border-primary,
.border-indigo-500,
.focus\:border-primary:focus {
    border-color: var(--gold-500) !important;
}

.ring-primary\/30,
.focus\:ring-primary\/30:focus {
    --tw-ring-color: rgba(245, 158, 11, 0.3);
}

.bg-primary\/90 {
    background: rgba(217, 119, 6, 0.9) !important;
}

.bg-primary\/20 {
    background: rgba(217, 119, 6, 0.2) !important;
}

.bg-indigo-50 { background-color: rgba(212, 175, 55, 0.08) !important; }
.ring-indigo-100 { --tw-ring-color: rgba(212, 175, 55, 0.15); }
.bg-indigo-700\/60 { background-color: rgba(212, 175, 55, 0.2) !important; }

/* ── Buttons ────────────────────────────────────────────────── */
button[type="submit"],
.btn-primary {
    background: var(--gold-gradient);
    color: #FFFFFF;
    font-weight: 600;
    transition: all 0.2s ease;
}

button[type="submit"]:hover,
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

/* ── Form Inputs ────────────────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="search"],
select,
textarea {
    background-color: var(--input-bg) !important;
    border-color: var(--card-border) !important;
    color: var(--text-primary) !important;
    transition: all 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--gold-500) !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2) !important;
    outline: none;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted) !important;
}

/* ── Tables ─────────────────────────────────────────────────── */
table thead.bg-gray-50,
table thead {
    background-color: var(--table-header-bg) !important;
}

table th {
    color: var(--gold-600) !important;
    border-color: var(--card-border) !important;
    font-weight: 600;
    letter-spacing: 0.06em;
}

table td {
    color: var(--text-secondary) !important;
    border-color: var(--card-border) !important;
}

table tbody tr:hover,
table tr.hover\:bg-gray-50:hover {
    background-color: var(--sidebar-hover) !important;
}

table .divide-y.divide-gray-200 tr {
    border-color: var(--card-border) !important;
}

/* ── Page Loader ────────────────────────────────────────────── */
#page-loader {
    background-color: var(--page-loader-bg) !important;
}

#page-loader .border-primary {
    border-bottom-color: var(--gold-500) !important;
}

#page-loader p {
    color: var(--gold-600) !important;
}

/* ── Toast Notifications ────────────────────────────────────── */
#toast-container .bg-green-500 { background-color: #16A34A !important; }
#toast-container .bg-red-500   { background-color: #DC2626 !important; }
#toast-container .bg-yellow-500{ background-color: #D97706 !important; }
#toast-container .bg-blue-500  { background-color: #2563EB !important; }

/* ── Flash Messages ─────────────────────────────────────────── */
.flash-message.bg-green-50  { background-color: rgba(22, 163, 74,  0.1) !important; border-left-color: #22C55E !important; }
.flash-message.bg-red-50    { background-color: rgba(220, 38, 38,  0.1) !important; border-left-color: #EF4444 !important; }
.flash-message.bg-yellow-50 { background-color: rgba(217, 119, 6,  0.1) !important; border-left-color: #F59E0B !important; }
.flash-message.bg-blue-50   { background-color: rgba(37, 99, 235,  0.1) !important; border-left-color: #3B82F6 !important; }

body:not(.light) .flash-message .text-green-800 { color: #86EFAC !important; }
body:not(.light) .flash-message .text-red-800   { color: #FCA5A5 !important; }
body:not(.light) .flash-message .text-yellow-800{ color: #FDE68A !important; }
body:not(.light) .flash-message .text-blue-800  { color: #BFDBFE !important; }

body.light .flash-message .text-green-800 { color: #16A34A !important; }
body.light .flash-message .text-red-800   { color: #DC2626 !important; }
body.light .flash-message .text-yellow-800{ color: #B45309 !important; }
body.light .flash-message .text-blue-800  { color: #1D4ED8 !important; }

/* ── Status Badges ──────────────────────────────────────────── */
.bg-yellow-100 { background-color: rgba(217, 119, 6,  0.15) !important; }
.text-yellow-800{ color: var(--gold-600) !important; }
.bg-blue-100   { background-color: rgba(37, 99, 235,  0.15) !important; }
.text-blue-800 { color: #2563EB !important; }
.bg-purple-100 { background-color: rgba(147, 51, 234, 0.15) !important; }
.text-purple-800{ color: #9333EA !important; }
.bg-green-100  { background-color: rgba(22, 163, 74,  0.15) !important; }
.text-green-800{ color: #16A34A !important; }
.bg-red-100    { background-color: rgba(220, 38, 38,  0.15) !important; }
.text-red-800  { color: #DC2626 !important; }
.bg-gray-100   { background-color: rgba(80, 80, 80,   0.15) !important; }
.text-gray-800 { color: var(--text-secondary) !important; }

body:not(.light) .text-yellow-800 { color: #FDE68A !important; }
body:not(.light) .text-blue-800   { color: #BFDBFE !important; }
body:not(.light) .text-purple-800 { color: #E9D5FF !important; }
body:not(.light) .text-green-800  { color: #A7F3D0 !important; }
body:not(.light) .text-red-800    { color: #FCA5A5 !important; }

/* ── Transfer Step indicators ───────────────────────────────── */
.bg-green-500  { background-color: #16A34A !important; }
.bg-blue-500   { background-color: #2563EB !important; }
.bg-gray-200   { background-color: var(--text-300) !important; }
.text-green-600{ color: #16A34A !important; }
.text-blue-600 { color: #2563EB !important; }

body:not(.light) .text-green-600 { color: #4ADE80 !important; }
body:not(.light) .text-blue-600  { color: #60A5FA !important; }

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--body-bg); }
::-webkit-scrollbar-thumb { background: var(--gold-700); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-500); }

/* ── Glassmorphism ──────────────────────────────────────────── */
.glass {
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(212, 175, 55, 0.15);
}

body.light .glass {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(217, 119, 6, 0.15);
}

.glass-dark {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(212, 175, 55, 0.1);
}

/* ── Hero Pattern ───────────────────────────────────────────── */
.bg-hero-pattern {
    background-color: var(--body-bg);
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23D97706' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ── Animations ─────────────────────────────────────────────── */
.fade-in {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.slide-in-right {
    animation: slideInRight 0.4s ease-out;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);   opacity: 1; }
}

/* Gold shimmer on hover for cards */
.card-shimmer {
    position: relative;
    overflow: hidden;
}
.card-shimmer::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: var(--gold-shimmer);
    transition: left 0.5s ease;
    pointer-events: none;
}
.card-shimmer:hover::after { left: 140%; }

/* ── Sidebar transition ─────────────────────────────────────── */
.sidebar-transition { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }

/* ── Additional golden accents ──────────────────────────────── */
/* Divider lines in cards */
.border-gray-700, .border-gray-800 {
    border-color: var(--sidebar-border) !important;
}

/* User avatar in sidebar */
.bg-primary\/20 {
    background-color: rgba(212, 175, 55, 0.15) !important;
}

.text-primary { color: var(--gold-500) !important; }

/* Focus rings */
.focus\:ring-2:focus { --tw-ring-color: rgba(212, 175, 55, 0.35); }

/* Notification dot */
.bg-red-500 { background-color: #DC2626 !important; }

/* Modal overlays */
.bg-gray-600 { background-color: rgba(0, 0, 0, 0.7) !important; }

/* Modal inner box */
.bg-white.shadow-lg.rounded-md {
    background-color: var(--modal-bg) !important;
    border: 1px solid var(--card-border) !important;
}