/* 
   Dumi Travel - Booking Automation Dashboard CSS
   Premium Glassmorphism & High-end Dark Theme
*/

/* 1. Global Reset & Variables */
/* Dumi Travel brand palette — light theme, redesigned for readability during
   long daily use (dark backgrounds were causing eye strain and low contrast
   on data-dense tables). Same brand identity (tropical green primary, teal
   and gold accents from the logo) — now on soft mint-white surfaces matching
   the customer-facing confirmation voucher and quotation pages, so the whole
   app shares one consistent, easy-to-read visual language. */
:root {
    --bg-app: #f4faf6;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #eefbf3;
    --border-color: rgba(13, 59, 38, 0.09);
    --border-highlight: rgba(34, 163, 93, 0.3);

    /* Core Accent Colors */
    --color-primary: #1f9d5c; /* Tropical Palm Green — brand primary */
    --color-primary-rgb: 31, 157, 92;
    --color-success: #15803d; /* Fresh Leaf Green — darkened slightly from the dark-theme value for AA text contrast on white */
    --color-success-rgb: 21, 128, 61;
    --color-warning: #b45309; /* Starfish Gold, darkened for text contrast on white (icon fills can still use the brighter #d4a72c) */
    --color-warning-bright: #d4a72c;
    --color-danger: #dc2626;  /* Vivid Crimson, standard red-600 for AA contrast on white */
    --color-purple: #7c3aed;  /* Royal Violet, darkened for contrast on white */
    --color-purple-rgb: 124, 58, 237;
    --color-teal: #0f766e;    /* Marble Wave Teal, darkened for contrast on white */

    /* Text Colors */
    --text-main: #0d3b26;
    --text-muted: #5b6b63;
    --text-dim: #8a9a92;

    /* Transitions & Shadows */
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --card-shadow: 0 2px 12px 0 rgba(13, 59, 38, 0.06);
    --card-shadow-hover: 0 10px 30px 0 rgba(13, 59, 38, 0.12);
    --glass-blur: blur(12px);
    --border-radius-lg: 16px;
    --border-radius-md: 10px;
    --border-radius-sm: 6px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-app);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.5;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-app);
}

::-webkit-scrollbar-thumb {
    background: var(--border-highlight);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* 2. Main App Shell Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100vw;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    transition: var(--transition-smooth);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px 28px 12px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    box-shadow: 0 4px 14px rgba(34, 163, 93, 0.4);
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid rgba(212, 167, 44, 0.5); /* thin gold ring, echoing the logo's starfish accent */
}

.brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-text h2 {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(to right, #0d3b26, #1f9d5c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-text span {
    font-size: 10px;
    font-weight: 600;
    color: var(--color-primary);
    letter-spacing: 2px;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--border-radius-md);
    transition: var(--transition-fast);
}

.nav-item i {
    font-size: 18px;
    width: 24px;
    text-align: center;
    transition: var(--transition-fast);
}

.nav-item:hover {
    color: var(--text-main);
    background-color: rgba(13, 59, 38, 0.04);
}

.nav-item.active {
    color: var(--color-primary);
    background: linear-gradient(90deg, rgba(34, 163, 93, 0.12) 0%, rgba(15, 118, 110, 0.05) 100%);
    border-left: 3px solid var(--color-primary);
    font-weight: 700;
}

.nav-item.active i {
    color: var(--color-primary);
    transform: scale(1.1);
}

.sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
}

.user-info h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.user-info span {
    font-size: 11px;
    color: var(--text-muted);
}

/* Main Content Area */
.main-content {
    margin-left: 260px;
    padding: 32px 40px;
    width: calc(100% - 260px);
    min-height: 100vh;
}

/* 3. Top Header Styling */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.header-title h1 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.current-date {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sheet-status-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-fast);
}

.sheet-status-badge.uninitialized {
    background-color: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: var(--color-warning);
}

.sheet-status-badge.connected {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--color-success);
}

.sheet-status-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.notification-bell {
    width: 52px;
    height: 52px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--card-shadow);
}

.notification-bell i {
    font-size: 22px;
    color: var(--text-muted);
    transition: all 0.3s;
}

.notification-bell:hover {
    background: var(--bg-card-hover);
    border-color: rgba(34, 163, 93, 0.4);
    box-shadow: 0 4px 16px rgba(34, 163, 93, 0.18);
    transform: translateY(-2px) scale(1.05);
}

.notification-bell:hover i {
    color: var(--color-primary);
}

/* Pulsing effect when bell is active (has unread notifications) */
.notification-bell.has-unread {
    animation: bell-pulse 2s infinite;
    border-color: rgba(220, 38, 38, 0.35);
    background: #fef2f2;
}

@keyframes bell-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.notification-bell .badge {
    position: absolute;
    top: 0px;
    right: 0px;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0f172a;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
}

/* Notification Dropdown Styles */
.notification-dropdown {
    position: absolute;
    top: 60px;
    right: 0;
    width: 360px;
    background: rgba(7, 21, 15, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    text-align: left;
    cursor: default;
}

.notification-dropdown.active {
    display: flex;
    animation: slideDown 0.2s ease-out;
}

.notification-dropdown .dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(13, 59, 38, 0.02);
}

.notification-dropdown .dropdown-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
}

.notification-dropdown .dropdown-header .mark-all-read {
    font-size: 11px;
    color: var(--color-primary-light);
    cursor: pointer;
}

.notification-dropdown .dropdown-header .mark-all-read:hover {
    color: var(--color-primary);
}

.notification-dropdown .dropdown-body {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(13, 59, 38, 0.05);
    transition: var(--transition-fast);
    cursor: pointer;
}

.notification-item:hover {
    background: rgba(13, 59, 38, 0.03);
}

.notification-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon.invoice {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.notification-icon.payment {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
}

.notification-icon.checkin {
    background: rgba(20, 184, 166, 0.15);
    color: #14b8a6;
}

.notification-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.notification-info h4 {
    margin: 0 0 4px 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
}

.notification-info p {
    margin: 0 0 8px 0;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

.notification-info .notification-time {
    font-size: 9px;
    color: var(--text-dim);
}

.notification-dropdown .dropdown-empty {
    padding: 32px 16px;
    text-align: center;
    color: var(--text-muted);
}

.notification-dropdown .dropdown-empty i {
    font-size: 28px;
    color: var(--text-dim);
    margin-bottom: 10px;
    opacity: 0.5;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 4. Content Sections Navigation */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

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

/* 5. Dashboard Overview Section */
/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background-color: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--card-shadow);
    transition: var(--transition-smooth);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-highlight);
    box-shadow: var(--card-shadow-hover);
    background-color: var(--bg-card-hover);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

/* Colors for icons */
.stat-icon.bg-blue { background: rgba(34, 163, 93, 0.12); color: var(--color-primary); }
.stat-icon.bg-green { background: rgba(16, 185, 129, 0.12); color: var(--color-success); }
.stat-icon.bg-orange { background: rgba(245, 158, 11, 0.12); color: var(--color-warning); }
.stat-icon.bg-purple { background: rgba(139, 92, 246, 0.12); color: var(--color-purple); }
.stat-icon.bg-teal { background: rgba(20, 184, 166, 0.12); color: var(--color-teal); }
.stat-icon.bg-red { background: rgba(239, 68, 68, 0.12); color: var(--color-danger); }

.stat-info h3 {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-info h2 {
    font-size: 22px;
    font-weight: 800;
    margin: 4px 0;
    letter-spacing: -0.5px;
}

.stat-info p {
    font-size: 11px;
    color: var(--text-dim);
}

/* Dashboard Grid Layouts */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 24px;
}

.glass-card {
    background-color: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h2, .card-header h3 {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h2 i, .card-header h3 i {
    font-size: 18px;
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
}

/* Payment ratio visualizer */
.payment-ratio-bar {
    height: 18px;
    width: calc(100% - 48px);
    margin: 32px 24px 16px 24px;
    border-radius: 10px;
    display: flex;
    overflow: hidden;
    background-color: rgba(13, 59, 38, 0.05);
}

.ratio-segment {
    height: 100%;
    transition: width 0.6s ease;
}

.ratio-segment.paid { background-color: var(--color-success); }
.ratio-segment.deposit { background-color: var(--color-teal); }
.ratio-segment.unpaid { background-color: var(--color-danger); }

.ratio-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 24px 32px 24px;
}

.legend-item {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-item i {
    font-size: 8px;
}

.text-green { color: var(--color-success); }
.text-teal { color: var(--color-teal); }
.text-red { color: var(--color-danger); }

/* Recent activity list */
.recent-list-container {
    display: flex;
    flex-direction: column;
    max-height: 380px;
    overflow-y: auto;
}

.recent-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.recent-item:hover {
    background-color: rgba(13, 59, 38, 0.02);
}

.recent-item:last-child {
    border-bottom: none;
}

.recent-item-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.recent-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: rgba(34, 163, 93, 0.1);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.recent-details h4 {
    font-size: 13px;
    font-weight: 600;
}

.recent-details span {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
}

.recent-item-status {
    text-align: right;
}

.recent-item-status .amount {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}

.recent-item-status .status-badge {
    margin-top: 4px;
}

.empty-state {
    padding: 48px;
    text-align: center;
    color: var(--text-dim);
}

.empty-state i {
    font-size: 40px;
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 14px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: var(--border-radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), #2563eb);
    color: #fff;
    box-shadow: 0 4px 12px rgba(34, 163, 93, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(34, 163, 93, 0.45);
}

.btn-secondary {
    background-color: rgba(13, 59, 38, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: rgba(13, 59, 38, 0.08);
}

.btn-purple {
    background: linear-gradient(135deg, var(--color-purple), #7c3aed);
    color: #fff;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-purple:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(139, 92, 246, 0.45);
}

.btn-success {
    background: linear-gradient(135deg, var(--color-success), #059669);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
}

.btn-text-link {
    color: var(--color-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.btn-text-link:hover {
    text-decoration: underline;
}

/* 6. AI Parser Styling */
.form-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.ai-input-wrapper textarea {
    width: 100%;
    height: 160px;
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 16px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 13px;
    resize: none;
    outline: none;
    transition: var(--transition-fast);
}

.ai-input-wrapper textarea:focus {
    border-color: var(--color-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.ai-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.parser-feedback-box {
    margin-top: 20px;
    padding: 14px 20px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 500;
}

.parser-feedback-box.success {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--color-success);
}

/* 7. Grid Form Controls */
.grid-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 24px;
}

.col-span-2 {
    grid-column: span 2;
}

.form-group-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.form-group-title i {
    color: var(--color-primary);
}

.form-control {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-control label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.form-control label span.required {
    color: var(--color-danger);
}

.form-control input[type="text"],
.form-control input[type="number"],
.form-control input[type="email"],
.form-control input[type="tel"],
.form-control input[type="date"],
.form-control select,
.form-control textarea {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 11px 16px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 13px;
    outline: none;
    transition: var(--transition-fast);
}

.form-control input:focus,
.form-control select:focus,
.form-control textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(34, 163, 93, 0.15);
}

.form-control textarea {
    height: 80px;
    resize: none;
}

.form-control .readonly-input {
    background-color: rgba(13, 59, 38, 0.03);
    color: var(--text-muted);
    border-color: rgba(13, 59, 38, 0.03);
    cursor: not-allowed;
}

.form-control .readonly-input.highlight-total {
    color: var(--color-purple);
    font-weight: 700;
    font-size: 14px;
}

.form-control .readonly-input.highlight-remaining {
    color: var(--color-warning);
    font-weight: 700;
    font-size: 14px;
}

.checkbox-control {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.checkbox-control input {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.checkbox-control label {
    cursor: pointer;
    user-select: none;
}

.input-with-button {
    display: flex;
    gap: 12px;
}

.input-with-button input {
    flex-grow: 1;
}

.flex-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    padding: 12px 0;
}

.action-hint {
    font-size: 12px;
    color: var(--text-muted);
    max-width: 500px;
    line-height: 1.4;
}

/* Badges */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
}

.badge-purple { background-color: rgba(139, 92, 246, 0.15); color: var(--color-purple); border: 1px solid rgba(139, 92, 246, 0.2); }
.badge-blue { background-color: rgba(34, 163, 93, 0.15); color: var(--color-primary); border: 1px solid rgba(34, 163, 93, 0.2); }
.badge-green { background-color: rgba(16, 185, 129, 0.15); color: var(--color-success); border: 1px solid rgba(16, 185, 129, 0.2); }

/* 8. Bookings List & Table Styling */
.flex-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filters-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.search-box {
    position: relative;
    width: 320px;
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 14px;
}

.search-box input {
    width: 100%;
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 11px 16px 11px 44px;
    color: var(--text-main);
    outline: none;
    font-size: 13px;
    transition: var(--transition-fast);
}

.search-box input:focus {
    border-color: var(--color-primary);
}

.filter-group {
    display: flex;
    gap: 12px;
}

.filter-group select {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 11px 16px;
    color: var(--text-main);
    outline: none;
    font-size: 13px;
    cursor: pointer;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
}

.data-table th {
    background-color: #f4faf6;
    padding: 16px 20px;
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: var(--transition-fast);
}

.data-table tbody tr:hover {
    background-color: rgba(13, 59, 38, 0.02);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.guest-info-cell h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.guest-info-cell p {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Status Labels */
.status-label {
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-label::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-label.confirmed {
    background-color: rgba(16, 185, 129, 0.12);
    color: var(--color-success);
}
.status-label.confirmed::before { background-color: var(--color-success); }

.status-label.pending {
    background-color: rgba(245, 158, 11, 0.12);
    color: var(--color-warning);
}
.status-label.pending::before { background-color: var(--color-warning); }

.status-label.cancelled {
    background-color: rgba(239, 68, 68, 0.12);
    color: var(--color-danger);
}
.status-label.cancelled::before { background-color: var(--color-danger); }

/* Sync Badges */
.sync-badge {
    padding: 4px 10px;
    border-radius: var(--border-radius-sm);
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sync-badge.synced {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
}

.sync-badge.pending {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
}

/* Action Buttons inside Table */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background-color: rgba(13, 59, 38, 0.03);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
}

.btn-icon:hover {
    color: var(--color-primary);
    background-color: rgba(13, 59, 38, 0.06);
}

.btn-icon.btn-edit:hover { border-color: var(--color-primary); color: var(--color-primary); }
.btn-icon.btn-sync:hover { border-color: var(--color-success); color: var(--color-success); }
.btn-icon.btn-email:hover { border-color: var(--color-purple); color: var(--color-purple); }
.btn-icon.btn-delete:hover { border-color: var(--color-danger); color: var(--color-danger); }

/* Disabled states */
.disabled-link {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}

/* 9. Setting Actions */
.disabled-link.btn {
    background-color: rgba(13, 59, 38, 0.02);
    border-color: rgba(13, 59, 38, 0.02);
}

/* 10. Toasts alerts style */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
}

.toast {
    background-color: #111827;
    border-left: 4px solid var(--color-primary);
    border-radius: var(--border-radius-md);
    padding: 16px 24px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 320px;
    max-width: 450px;
    animation: slideIn 0.3s cubic-bezier(0, 0, 0.2, 1);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
}

.toast.success { border-left-color: var(--color-success); }
.toast.error { border-left-color: var(--color-danger); }
.toast.info { border-left-color: var(--color-primary); }
.toast.warning { border-left-color: var(--color-warning); }

.toast i {
    font-size: 18px;
}
.toast.success i { color: var(--color-success); }
.toast.error i { color: var(--color-danger); }
.toast.info i { color: var(--color-primary); }
.toast.warning i { color: var(--color-warning); }

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

.toast.fade-out {
    animation: fadeOut 0.4s ease forwards;
}

@keyframes fadeOut {
    to { transform: translateY(12px); opacity: 0; }
}

/* --- Reminders and Debt Control Styling --- */
.reminder-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.reminder-item:hover {
    background-color: rgba(13, 59, 38, 0.02);
}

.reminder-item:last-child {
    border-bottom: none;
}

.reminder-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 70%;
}

.reminder-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.reminder-avatar.invoice {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.reminder-avatar.payment {
    background-color: rgba(249, 115, 22, 0.1);
    color: #f97316;
}

.reminder-details {
    min-width: 0;
}

.reminder-details h4 {
    font-size: 13px;
    font-weight: 600;
    margin: 0;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reminder-details span {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reminder-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-reminder {
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    border: none;
    outline: none;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-reminder.btn-invoice {
    background-color: rgba(16, 185, 129, 0.12);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.btn-reminder.btn-invoice:hover {
    background-color: var(--color-success);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
}

.btn-reminder.btn-payment {
    background-color: rgba(249, 115, 22, 0.12);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.2);
}

.btn-reminder.btn-payment:hover {
    background-color: #f97316;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.2);
}

/* Bell Animation */
.animate-bell {
    animation: ring 2s ease infinite;
    transform-origin: 50% 0;
}

@keyframes ring {
    0% { transform: rotate(0); }
    5% { transform: rotate(15deg); }
    10% { transform: rotate(-15deg); }
    15% { transform: rotate(10deg); }
    20% { transform: rotate(-10deg); }
    25% { transform: rotate(5deg); }
    30% { transform: rotate(-5deg); }
    35% { transform: rotate(0); }
    100% { transform: rotate(0); }
}

/* Form Input Cells inside table rows */
.form-input-cell {
    background-color: #f8fafc !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 4px !important;
    padding: 6px 10px !important;
    color: var(--text-main) !important;
    font-family: inherit;
    font-size: 13px !important;
    outline: none;
    transition: var(--transition-fast);
}
.form-input-cell:focus {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 2px rgba(34, 163, 93, 0.15);
}


/* ==========================================
   8. Revenue Report & Analytics Styles
   ========================================== */
.reports-layout-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 1024px) {
    .reports-layout-grid {
        grid-template-columns: 1fr;
    }
    .reports-layout-grid .col-span-2 {
        grid-column: span 1;
    }
}

.chart-box {
    transition: var(--transition-smooth);
}

.chart-box:hover {
    transform: translateY(-4px);
    border-color: var(--border-highlight);
    box-shadow: var(--card-shadow-hover);
    background-color: var(--bg-card-hover);
}

.text-right {
    text-align: right !important;
}

.text-center {
    text-align: center !important;
}

.growth-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
}

.growth-up {
    color: var(--color-success);
    background-color: rgba(16, 185, 129, 0.1);
}

.growth-down {
    color: var(--color-danger);
    background-color: rgba(239, 68, 68, 0.1);
}

.growth-none {
    color: var(--text-dim);
    background-color: rgba(13, 59, 38, 0.05);
}

.report-stat-growth {
    font-size: 11px;
    margin-top: 4px;
}

/* Supplier Quick Action Buttons */
.btn-quick-pay {
    background-color: rgba(16, 185, 129, 0.12);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-quick-pay:hover {
    background-color: var(--color-success);
    color: #fff;
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.2);
}

.btn-quick-pay:disabled {
    background-color: rgba(13, 59, 38, 0.02);
    color: var(--text-dim);
    border-color: transparent;
    cursor: not-allowed;
    box-shadow: none;
}

.reminder-avatar.checkin {
    background-color: rgba(20, 184, 166, 0.1);
    color: #14b8a6;
}

.btn-reminder.btn-checkin {
    background-color: rgba(20, 184, 166, 0.12);
    color: #14b8a6;
    border: 1px solid rgba(20, 184, 166, 0.2);
}

.btn-reminder.btn-checkin:hover {
    background-color: #14b8a6;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(20, 184, 166, 0.2);
}

/* Print Styling for PDF Exports */
@media print {
    body {
        background-color: #ffffff !important;
        color: #000000 !important;
        font-size: 12px;
    }

    .sidebar,
    .top-header,
    .card-header .filter-group,
    .card-header .btn,
    .export-actions,
    .toast-container,
    .card-footer,
    .sidebar-footer,
    aside {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .glass-card,
    .stat-card {
        background: #ffffff !important;
        border: 1px solid #e5e7eb !important;
        box-shadow: none !important;
        color: #000000 !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        margin-bottom: 20px !important;
        page-break-inside: avoid;
    }

    .stat-icon {
        background: #f3f4f6 !important;
        color: #000000 !important;
        border: 1px solid #e5e7eb !important;
    }

    .stat-info h3,
    .stat-info p,
    .legend-item,
    .report-stat-growth {
        color: #4b5563 !important;
    }

    .stat-info h2,
    .card-header h2,
    .card-header h3 {
        color: #000000 !important;
    }

    .data-table {
        color: #000000 !important;
    }

    .data-table th {
        background-color: #f3f4f6 !important;
        color: #000000 !important;
        border-bottom: 2px solid #e5e7eb !important;
    }

    .data-table td {
        border-bottom: 1px solid #e5e7eb !important;
        color: #000000 !important;
    }

    canvas {
        max-width: 100% !important;
        height: auto !important;
    }

    .reports-layout-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .reports-layout-grid .col-span-2 {
        grid-column: span 1 !important;
    }
}

/* Invoice Control Custom Styles */
.badge-red {
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--color-danger, #ef4444);
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.badge-orange {
    background-color: rgba(249, 115, 22, 0.15);
    color: var(--color-warning, #f97316);
    border: 1px solid rgba(249, 115, 22, 0.2);
}
.badge-grey {
    background-color: rgba(107, 114, 128, 0.15);
    color: var(--text-muted, #9ca3af);
    border: 1px solid rgba(107, 114, 128, 0.2);
}

.text-danger-bold {
    color: var(--color-danger, #ef4444) !important;
    font-weight: 700;
}

.text-warning-bold {
    color: var(--color-warning, #f97316) !important;
    font-weight: 700;
}

.text-success-bold {
    color: var(--color-success, #10b981) !important;
    font-weight: 700;
}

.invoice-info-snippet {
    display: block;
    max-width: 250px;
    white-space: pre-line;
    word-break: break-all;
    font-size: 11px;
    line-height: 1.3;
    color: var(--text-muted);
    background: rgba(13, 59, 38, 0.03);
    padding: 6px;
    border-radius: 4px;
    border: 1px dashed rgba(13, 59, 38, 0.15);
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
}

.invoice-info-snippet:hover {
    background: rgba(13, 59, 38, 0.08);
}

.invoice-info-snippet::after {
    content: "\f0c5";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 6px;
    bottom: 6px;
    font-size: 10px;
    opacity: 0.5;
}

.btn-invoice-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.1s;
    color: #fff;
    margin: 2px;
}

.btn-invoice-action:active {
    transform: scale(0.95);
}

.btn-invoice-action.btn-done {
    background-color: var(--color-success, #10b981);
}
.btn-invoice-action.btn-done:hover {
    background-color: #059669;
}

.btn-invoice-action.btn-wait {
    background-color: var(--color-warning, #f97316);
}
.btn-invoice-action.btn-wait:hover {
    background-color: #ea580c;
}

.btn-invoice-action.btn-template {
    background-color: var(--color-primary, #3b82f6);
}
.btn-invoice-action.btn-template:hover {
    background-color: #2563eb;
}

/* AI OCR & Invoice Management Styles */
.ocr-drag-drop-zone:hover {
    border-color: var(--color-primary) !important;
    background: rgba(34, 163, 93, 0.08) !important;
}

.btn-invoice-action.btn-edit-quick {
    background-color: var(--color-purple, #8b5cf6);
}
.btn-invoice-action.btn-edit-quick:hover {
    background-color: #7c3aed;
}

.ocr-match-item {
    transition: var(--transition-fast);
}
.ocr-match-item:hover {
    border-color: rgba(34, 163, 93, 0.35) !important;
    background: rgba(13, 59, 38, 0.03) !important;
    box-shadow: 0 4px 12px rgba(13,59,38,0.08);
}

.btn-close-modal {
    transition: var(--transition-fast);
}
.btn-close-modal:hover {
    color: var(--text-main) !important;
    transform: rotate(90deg);
}

/* Custom Scrollbar for OCR Match List */
#ocr-matching-list::-webkit-scrollbar {
    width: 4px;
}
#ocr-matching-list::-webkit-scrollbar-thumb {
    background: var(--border-highlight);
    border-radius: 4px;
}

/* UNC Proof Badges & Viewer Styling */
.btn-unc-view {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-unc-view:hover {
    background: rgba(139, 92, 246, 0.35) !important;
    border-color: rgba(139, 92, 246, 0.7) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.badge-supplier-paid {
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.15);
}

.badge-supplier-deposit {
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.15);
}

.badge-supplier-unpaid {
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.1);
}

#modal-unc-preview .modal-content,
#modal-scan-results .modal-content {
    animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Pagination Bar & Date Filter Controls */
.pagination-bar {
    user-select: none;
}

.pagination-controls button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.date-filter-wrap input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

/* Mobile & Tablet Responsive Enhancements */
@media (max-width: 992px) {
    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .search-box {
        width: 100% !important;
    }
    .filter-group {
        width: 100%;
        flex-wrap: wrap;
    }
    .filter-group select,
    .filter-group button,
    .filter-group .date-filter-wrap {
        flex: 1 1 calc(50% - 6px);
        min-width: 140px;
    }
}

@media (max-width: 768px) {
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 16px !important;
    }
    .sidebar {
        position: fixed;
        left: -260px;
        z-index: 1000;
        transition: left 0.3s ease;
    }
    .sidebar.open {
        left: 0;
    }
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
}


