/* ============================================================
   AI Tourism Quotation Generator - Modern SaaS Theme
   ============================================================ */

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --secondary-color: #475569;
    --success-color: #10b981;
    --success-light: #ecfdf5;
    --warning-color: #f59e0b;
    --warning-light: #fffbeb;
    --danger-color: #ef4444;
    --danger-light: #fef2f2;
    --info-color: #06b6d4;
    --info-light: #ecfeff;
    --dark-color: #0f172a;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --sidebar-width: 260px;
    --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    font-family: var(--font-main);
    background-color: var(--light-bg);
    color: #334155;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Sidebar & Layout */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: var(--sidebar-width);
    background: #0f172a;
    color: #f8fafc;
    flex-shrink: 0;
    transition: all 0.3s ease;
    z-index: 1040;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    padding: 1.25rem 1.5rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand i {
    font-size: 1.4rem;
    color: #38bdf8;
}

.sidebar-nav {
    padding: 1rem 0.75rem;
    flex: 1;
    overflow-y: auto;
}

.sidebar-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    padding: 0.75rem 0.75rem 0.25rem;
    font-weight: 700;
}

.nav-link-custom {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.92rem;
    transition: all 0.2s ease;
    margin-bottom: 0.25rem;
}

.nav-link-custom i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.nav-link-custom:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.nav-link-custom.active {
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.app-topbar {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.app-content {
    padding: 1.5rem;
    flex: 1;
}

/* Cards & UI Components */
.card-custom {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: box-shadow 0.2s ease;
}

.card-custom:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

/* Tables */
.table-custom {
    margin-bottom: 0;
}

.table-custom th {
    background-color: #f8fafc;
    color: #64748b;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
    padding: 0.85rem 1rem;
}

.table-custom td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

/* Forms */
.form-control, .form-select {
    border-color: #cbd5e1;
    border-radius: 0.5rem;
    padding: 0.55rem 0.85rem;
    font-size: 0.92rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-label {
    font-weight: 500;
    font-size: 0.88rem;
    color: #334155;
    margin-bottom: 0.35rem;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* Quotation Document View Styling */
.quotation-paper {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    max-width: 900px;
    margin: 0 auto;
    padding: 2.5rem;
}

.quote-header-brand {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.quote-logo {
    max-height: 75px;
    max-width: 220px;
    object-fit: contain;
}

.quote-meta-pill {
    background: #f1f5f9;
    border-radius: 0.5rem;
    padding: 0.85rem 1.2rem;
    border-left: 4px solid var(--primary-color);
}

.itinerary-day-card {
    border-left: 3px solid var(--primary-color);
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    border-radius: 0 0.5rem 0.5rem 0;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.inclusion-box {
    background: var(--success-light);
    border: 1px solid #bbf7d0;
    border-radius: 0.5rem;
    padding: 1.25rem;
}

.exclusion-box {
    background: var(--danger-light);
    border: 1px solid #fecaca;
    border-radius: 0.5rem;
    padding: 1.25rem;
}

/* Print Optimization */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 11pt;
    }

    .app-sidebar,
    .app-topbar,
    .no-print,
    .btn,
    .alert {
        display: none !important;
    }

    .app-main, .app-content {
        padding: 0 !important;
        margin: 0 !important;
        display: block !important;
    }

    .quotation-paper {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    .itinerary-day-card, .inclusion-box, .exclusion-box, .table {
        page-break-inside: avoid;
    }
}

/* Mobile Responsiveness */
@media (max-width: 991.98px) {
    .app-sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        bottom: 0;
    }

    .app-sidebar.show {
        left: 0;
    }

    .app-topbar {
        padding: 0.75rem 1rem;
    }

    .app-content {
        padding: 1rem;
    }

    .quotation-paper {
        padding: 1.25rem;
    }
}
