/* ===========================================
   SHALIMAR CORP — Luxury Gold & Dark Theme
   =========================================== */

:root {
    --gold: #b8860b;
    --gold-light: #d4a843;
    --gold-dark: #8b6914;
    --gold-pale: #f5e6c8;
    --dark: #1a1a1a;
    --dark-2: #222222;
    --dark-3: #2e2e2e;
    --white: #ffffff;
    --off-white: #f5f5f2;
    --gray: #999999;
    --gray-light: #e5e5e5;
    --text: #444444;
    --text-light: #777777;
    --danger: #c0392b;
    --success: #27ae60;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.10);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.25s ease;
    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    --sidebar-w: 250px;
    --header-h: 60px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--off-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }
ul { list-style: none; }

/* ===========================================
   BUTTONS
   =========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.5rem;
    border: 2px solid transparent;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
}
.btn-gold {
    background: var(--gold);
    color: var(--white);
    border-color: var(--gold);
}
.btn-gold:hover {
    background: var(--gold-dark);
    border-color: var(--gold-dark);
    box-shadow: 0 4px 16px rgba(184, 134, 11, 0.25);
}
.btn-outline {
    background: transparent;
    color: var(--gold);
    border-color: var(--gold);
}
.btn-outline:hover {
    background: var(--gold);
    color: var(--white);
}
.btn-google {
    background: var(--white);
    color: var(--dark);
    border: 1px solid var(--gray-light);
}
.btn-google:hover {
    background: var(--off-white);
    box-shadow: var(--shadow);
}
.btn-sm { padding: 0.4rem 1rem; font-size: 0.7rem; }
.btn-full { width: 100%; }
.btn-icon { padding: 0.65rem; border-radius: 50%; }

/* ===========================================
   LOGIN / REGISTER (Auth Pages)
   =========================================== */
.login-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(160deg, var(--off-white) 0%, var(--gold-pale) 50%, var(--off-white) 100%);
}
.login-container {
    width: 100%;
    max-width: 440px;
}
.login-brand {
    text-align: center;
    margin-bottom: 2.5rem;
}
.login-logo {
    height: 60px;
    margin-bottom: 1.5rem;
}
.login-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
}
.login-subtitle {
    font-size: 0.9rem;
    color: var(--text-light);
}
.login-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
.form-group {
    margin-bottom: 1.25rem;
}
.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 0.5rem;
}
.input-wrapper {
    position: relative;
}
.input-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 0.85rem;
}
.input-wrapper input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.75rem;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--dark);
    transition: var(--transition);
    background: var(--off-white);
}
.input-wrapper input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.1);
    background: var(--white);
}
.login-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}
.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gray-light);
}
.login-divider span {
    background: var(--white);
    padding: 0 1rem;
    position: relative;
    font-size: 0.8rem;
    color: var(--text-light);
}
.login-footer-text {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-light);
}
.login-footer-text a {
    color: var(--gold);
    font-weight: 500;
}
.login-footer-text a:hover {
    text-decoration: underline;
}
.login-copyright {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Alerts */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.alert-error {
    background: #fdf2f2;
    color: var(--danger);
    border: 1px solid #f5c6cb;
}
.alert-success {
    background: #f0fdf4;
    color: var(--success);
    border: 1px solid #bbf7d0;
}

/* ===========================================
   DASHBOARD — Full Layout
   =========================================== */
.dash {
    display: flex;
    min-height: 100vh;
}

/* --- Sidebar --- */
.dash-sidebar {
    width: var(--sidebar-w);
    background: var(--dark);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    overflow-y: auto;
}

.dash-sidebar-logo {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--dark-3);
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--header-h);
}
.dash-sidebar-logo img {
    height: 36px;
    filter: brightness(0) invert(1);
}

.dash-sidebar-nav {
    flex: 1;
    padding: 0.75rem 0;
}

.dash-sidebar-bottom {
    border-top: 1px solid var(--dark-3);
    padding: 0.5rem 0;
}

.dash-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.5rem;
    font-size: 0.82rem;
    color: #aaa;
    transition: var(--transition);
    position: relative;
}
.dash-nav-item i {
    width: 18px;
    text-align: center;
    font-size: 0.85rem;
}
.dash-nav-item:hover {
    color: var(--white);
    background: var(--dark-2);
}
.dash-nav-item.active {
    color: var(--gold-light);
    background: var(--dark-2);
}
.dash-nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gold);
    border-radius: 0 3px 3px 0;
}

/* --- Overlay (mobile) --- */
.dash-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* --- Body (header + content) --- */
.dash-body {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Top Header --- */
.dash-header {
    height: var(--header-h);
    background: var(--white);
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 900;
}

.dash-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dash-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.15rem;
    color: var(--dark);
    cursor: pointer;
    padding: 0.25rem;
}

.dash-search {
    position: relative;
}
.dash-search i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 0.8rem;
}
.dash-search input {
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    border: 1px solid var(--gray-light);
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--dark);
    background: var(--off-white);
    width: 220px;
    transition: var(--transition);
}
.dash-search input:focus {
    outline: none;
    border-color: var(--gold);
    width: 280px;
    background: var(--white);
}

.dash-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dash-header-icon {
    background: none;
    border: none;
    font-size: 1rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.4rem;
    position: relative;
    transition: var(--transition);
}
.dash-header-icon:hover {
    color: var(--gold);
}
.dash-badge {
    position: absolute;
    top: 0;
    right: -2px;
    background: var(--danger);
    color: var(--white);
    font-size: 0.6rem;
    font-weight: 600;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Profile dropdown */
.dash-profile {
    position: relative;
}
.dash-profile-trigger {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    padding: 0.35rem 0.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
}
.dash-profile-trigger:hover {
    background: var(--off-white);
}
.dash-profile-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
}
.dash-profile-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.dash-profile-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--dark);
}
.dash-profile-email {
    font-size: 0.68rem;
    color: var(--text-light);
}
.dash-profile-arrow {
    font-size: 0.6rem;
    color: var(--text-light);
    transition: var(--transition);
}
.dash-profile.open .dash-profile-arrow {
    transform: rotate(180deg);
}
.dash-profile-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--white);
    border: 1px solid var(--gray-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    z-index: 999;
    overflow: hidden;
}
.dash-profile.open .dash-profile-menu {
    display: block;
}
.dash-profile-menu a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1rem;
    font-size: 0.8rem;
    color: var(--text);
    transition: var(--transition);
}
.dash-profile-menu a:hover {
    background: var(--off-white);
    color: var(--gold);
}
.dash-profile-menu a i {
    width: 16px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--gray);
}
.dash-profile-menu a:hover i {
    color: var(--gold);
}
.dash-profile-divider {
    height: 1px;
    background: var(--gray-light);
}

/* --- Page Content --- */
.dash-content {
    flex: 1;
    padding: 1.75rem 2rem;
}

.dash-page-header {
    margin-bottom: 1.5rem;
}
.dash-page-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 0.2rem;
}
.dash-page-subtitle {
    font-size: 0.82rem;
    color: var(--text-light);
}

.dash-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
    min-height: calc(100vh - var(--header-h) - 140px);
}

/* --- Chat Panel --- */
.chat-panel {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.chat-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-light);
    background: var(--white);
}
.chat-header-info {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 0.9rem;
}
.chat-header h3 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: var(--dark);
}
.chat-status {
    font-size: 0.7rem;
    color: var(--success);
}
.chat-status i {
    font-size: 0.45rem;
    vertical-align: middle;
    margin-right: 0.2rem;
}
.chat-messages {
    flex: 1;
    padding: 1.25rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--off-white);
}
.chat-message {
    display: flex;
    gap: 0.6rem;
    max-width: 80%;
}
.chat-message.bot { align-self: flex-start; }
.chat-message.user { align-self: flex-end; flex-direction: row-reverse; }
.message-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}
.chat-message.bot .message-avatar {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--white);
}
.chat-message.user .message-avatar {
    background: var(--dark);
    color: var(--white);
}
.message-bubble {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    font-size: 0.85rem;
    line-height: 1.6;
}
.chat-message.bot .message-bubble {
    background: var(--white);
    color: var(--text);
    border: 1px solid var(--gray-light);
}
.chat-message.user .message-bubble {
    background: var(--gold);
    color: var(--white);
}
.message-time {
    display: block;
    font-size: 0.65rem;
    margin-top: 0.3rem;
    opacity: 0.5;
}
.chat-input-area {
    padding: 0.85rem 1.25rem;
    border-top: 1px solid var(--gray-light);
    background: var(--white);
}
.chat-form {
    display: flex;
    gap: 0.65rem;
    align-items: center;
}
.chat-form input {
    flex: 1;
    padding: 0.7rem 1.1rem;
    border: 1px solid var(--gray-light);
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--dark);
    background: var(--off-white);
    transition: var(--transition);
}
.chat-form input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.1);
}
.chat-form .btn-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

/* --- Right Info Panel --- */
.dash-info {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.info-card {
    background: var(--white);
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.info-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.85rem;
    color: var(--gold);
}
.info-card-header h4 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: var(--dark);
}
.info-list li {
    padding: 0.45rem 0;
    font-size: 0.8rem;
    color: var(--text-light);
    border-bottom: 1px solid var(--gray-light);
}
.info-list li:last-child { border-bottom: none; }
.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
}
.quick-action-btn {
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius);
    background: var(--off-white);
    font-family: var(--font-body);
    font-size: 0.72rem;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.quick-action-btn i { color: var(--gold); font-size: 0.65rem; }
.quick-action-btn:hover {
    border-color: var(--gold);
    background: var(--gold-pale);
}
.info-contact {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.2rem;
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 1200px) {
    .dash-grid {
        grid-template-columns: 1fr 260px;
    }
}

@media (max-width: 1024px) {
    .dash-sidebar {
        left: calc(-1 * var(--sidebar-w));
    }
    .dash-sidebar.open {
        left: 0;
    }
    .dash-overlay.open {
        display: block;
    }
    .dash-menu-btn {
        display: block;
    }
    .dash-body {
        margin-left: 0;
    }
    .dash-grid {
        grid-template-columns: 1fr;
    }
    .dash-info {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .dash-info {
        grid-template-columns: 1fr;
    }
    .dash-content {
        padding: 1.25rem;
    }
    .dash-search input {
        width: 160px;
    }
    .dash-search input:focus {
        width: 200px;
    }
    .dash-profile-info {
        display: none;
    }
}

@media (max-width: 480px) {
    .dash-content {
        padding: 1rem;
    }
    .dash-search {
        display: none;
    }
}

/* ===========================================
   SCROLLBAR
   =========================================== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-light); }

.dash-sidebar::-webkit-scrollbar-thumb { background: var(--dark-3); }
.dash-sidebar::-webkit-scrollbar-track { background: var(--dark); }

/* ===========================================
   GLOBAL SKELETON LOADING
   =========================================== */

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, var(--gray-light) 25%, #efefef 50%, var(--gray-light) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 14px;
    width: 120px;
}

.skeleton-text-sm {
    height: 14px;
    width: 60px;
}

.skeleton-text-lg {
    height: 20px;
    width: 80px;
}

.skeleton-badge {
    height: 22px;
    width: 75px;
    border-radius: 12px;
}

.skeleton-circle {
    width: 48px;
    height: 48px;
    border-radius: 12px;
}

.skeleton-bar {
    height: 8px;
    width: 100%;
    border-radius: 8px;
}

.skeleton-chart {
    height: 200px;
    width: 100%;
    border-radius: var(--radius);
}

/* Stat card skeleton value (replaces the -- placeholder) */
.skeleton-value {
    height: 24px;
    width: 50px;
    border-radius: 4px;
    display: inline-block;
    vertical-align: middle;
}
