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

:root {
    --primary: #075E54;
    --primary-hover: #054840;
    --primary-light: #e6f4f1;
    --secondary: #0F766E;
    --secondary-hover: #0d645e;
    --secondary-light: #f0fdfa;
    --gold: #C9A227;
    --gold-hover: #b08d1f;
    --gold-light: #fef9c3;
    --bg-body: #F7F8F6;
    --bg-card: #FFFFFF;
    --text-dark: #1F2937;
    --text-muted: #6B7280;
    --text-light: #9CA3AF;
    --border-color: #E5E7EB;
    --border-light: #F3F4F6;
    --sidebar-width: 270px;
    --topbar-height: 70px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 25px rgba(7, 94, 84, 0.08);
    --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.03), 0 10px 20px rgba(0, 0, 0, 0.02);
}

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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-dark);
    font-size: 0.925rem;
    line-height: 1.5;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--text-dark);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
}

/* ========================================================
   LAYOUT & SHELL
======================================================== */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.app-sidebar {
    width: var(--sidebar-width);
    background: #064E46;
    color: #FFFFFF;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    transition: all 0.3s ease;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.08);
}

.sidebar-brand {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    background: rgba(0, 0, 0, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: var(--gold);
    color: #FFFFFF;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-right: 14px;
    box-shadow: 0 4px 10px rgba(201, 162, 39, 0.4);
}

.brand-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 0.5px;
    line-height: 1.1;
    color: #FFFFFF;
}

.brand-subtitle {
    font-size: 0.725rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-menu-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 16px 14px;
}

.sidebar-menu-wrapper::-webkit-scrollbar {
    width: 5px;
}

.sidebar-menu-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

.menu-category {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, 0.45);
    padding: 14px 14px 6px 14px;
}

.nav-link-custom {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    color: rgba(255, 255, 255, 0.82);
    border-radius: var(--radius-sm);
    font-weight: 500;
    margin-bottom: 3px;
    transition: all 0.2s ease;
}

.nav-link-custom i {
    width: 24px;
    font-size: 1rem;
    margin-right: 12px;
    opacity: 0.85;
    text-align: center;
}

.nav-link-custom:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(3px);
}

.nav-link-custom.active {
    color: #FFFFFF;
    background: var(--gold);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(201, 162, 39, 0.35);
}

.nav-link-custom.active i {
    color: #FFFFFF;
    opacity: 1;
}

/* MAIN CONTENT AREA */
.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* TOPBAR */
.app-topbar {
    height: var(--topbar-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: var(--shadow-sm);
}

.topbar-search-form {
    position: relative;
    width: 360px;
}

.topbar-search-input {
    width: 100%;
    padding: 9px 16px 9px 42px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    background: #F9FAFB;
    font-size: 0.875rem;
    color: var(--text-dark);
    transition: all 0.2s ease;
}

.topbar-search-input:focus {
    outline: none;
    background: #FFFFFF;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.topbar-search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.topbar-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #F3F4F6;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.badge-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #DC2626;
    border-radius: 50%;
    border: 2px solid #FFFFFF;
}

.user-profile-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 30px;
    transition: background 0.2s;
}

.user-profile-menu:hover {
    background: #F3F4F6;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold);
}

.user-avatar-initial {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    border: 2px solid var(--gold);
}

.user-info-text {
    line-height: 1.2;
}

.user-name-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.user-role-badge {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* CONTENT BODY */
.app-content {
    flex: 1;
    padding: 28px 32px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
}

.page-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ========================================================
   CARDS & STATS
======================================================== */
.card-custom {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    margin-bottom: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-custom:hover {
    box-shadow: var(--shadow-md);
}

.card-custom-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #FFFFFF;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
}

.card-custom-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-custom-body {
    padding: 24px;
}

/* STAT CARDS */
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 22px 24px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-card);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(7, 94, 84, 0.2);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
}

.stat-card.gold::after {
    background: var(--gold);
}

.stat-card.emerald::after {
    background: var(--secondary);
}

.stat-card.blue::after {
    background: #2563EB;
}

.stat-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-right: 18px;
    flex-shrink: 0;
}

.stat-card.gold .stat-icon-wrapper {
    background: var(--gold-light);
    color: var(--gold-hover);
}

.stat-card.emerald .stat-icon-wrapper {
    background: #e0f2fe;
    color: #0369a1;
}

.stat-card.blue .stat-icon-wrapper {
    background: #dbeafe;
    color: #1d4ed8;
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--text-dark);
    font-family: 'Outfit', sans-serif;
    line-height: 1.2;
}

.stat-change {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-change.up {
    color: #16A34A;
}

.stat-change.down {
    color: #DC2626;
}

/* ========================================================
   BADGES & STATUS
======================================================== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.badge-ready {
    background: #D1FAE5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.badge-processing {
    background: #E0E7FF;
    color: #3730A3;
    border: 1px solid #C7D2FE;
}

.badge-warning {
    background: #FEF3C7;
    color: #92400E;
    border: 1px solid #FDE68A;
}

.badge-danger {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.badge-info {
    background: #E0F2FE;
    color: #075985;
    border: 1px solid #BAE6FD;
}

.badge-success {
    background: #DCFCE7;
    color: #166534;
    border: 1px solid #BBF7D0;
}

.badge-gold {
    background: #FEF9C3;
    color: #854D0E;
    border: 1px solid #FEF08A;
}

.badge-secondary {
    background: #F3F4F6;
    color: #4B5563;
    border: 1px solid #E5E7EB;
}

/* ========================================================
   BUTTONS
======================================================== */
.btn-primary-custom {
    background: var(--primary);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-sm);
    padding: 9px 18px;
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-primary-custom:hover {
    background: var(--primary-hover);
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(7, 94, 84, 0.25);
}

.btn-gold-custom {
    background: linear-gradient(135deg, #C9A227 0%, #B38F1E 100%);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-sm);
    padding: 9px 18px;
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 3px 10px rgba(201, 162, 39, 0.3);
    transition: all 0.2s ease;
}

.btn-gold-custom:hover {
    background: linear-gradient(135deg, #b89320 0%, #9e7c15 100%);
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(201, 162, 39, 0.4);
}

.btn-outline-custom {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    border-radius: var(--radius-sm);
    padding: 9px 16px;
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-outline-custom:hover {
    background: #F9FAFB;
    border-color: #D1D5DB;
    color: var(--text-dark);
}

/* ========================================================
   TABLES & DATATABLES
======================================================== */
.table-custom-wrapper {
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.table-custom {
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.table-custom thead th {
    background: #F9FAFB;
    color: var(--text-muted);
    font-size: 0.775rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.table-custom tbody td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-dark);
    font-size: 0.875rem;
    vertical-align: middle;
}

.table-custom tbody tr:hover {
    background-color: #F8FAF9;
}

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

/* ========================================================
   PROGRESS BARS
======================================================== */
.progress-custom {
    height: 8px;
    background-color: #E5E7EB;
    border-radius: 20px;
    overflow: hidden;
}

.progress-bar-custom {
    background: linear-gradient(90deg, var(--secondary) 0%, var(--primary) 100%);
    border-radius: 20px;
    transition: width 0.6s ease;
}

.progress-bar-gold {
    background: linear-gradient(90deg, #F59E0B 0%, var(--gold) 100%);
}

/* ========================================================
   WIZARD COMPONENT
======================================================== */
.wizard-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    position: relative;
}

.wizard-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    height: 3px;
    background: #E5E7EB;
    z-index: 1;
}

.wizard-step-item {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    cursor: pointer;
}

.wizard-step-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 3px solid #E5E7EB;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 8px;
    transition: all 0.25s ease;
}

.wizard-step-item.active .wizard-step-circle {
    background: var(--primary);
    border-color: var(--primary);
    color: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(7, 94, 84, 0.15);
}

.wizard-step-item.completed .wizard-step-circle {
    background: var(--gold);
    border-color: var(--gold);
    color: #FFFFFF;
}

.wizard-step-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.wizard-step-item.active .wizard-step-title {
    color: var(--primary);
    font-weight: 700;
}

/* ========================================================
   TIMELINE / ITINERARY
======================================================== */
.timeline-custom {
    position: relative;
    padding-left: 36px;
}

.timeline-custom::before {
    content: '';
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 15px;
    width: 2px;
    background: #E5E7EB;
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
}

.timeline-icon-dot {
    position: absolute;
    left: -36px;
    top: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    box-shadow: 0 0 0 4px #FFFFFF;
}

.timeline-content-card {
    background: #FFFFFF;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
}

/* ========================================================
   EMPTY STATE
======================================================== */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #F3F4F6;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 16px;
}

/* ========================================================
   INVOICE PRINT
======================================================== */
@media print {
    .app-sidebar, .app-topbar, .btn-no-print, .modal-backdrop, .nav-tabs {
        display: none !important;
    }
    .app-main {
        margin-left: 0 !important;
    }
    .app-content {
        padding: 0 !important;
    }
    .card-custom {
        box-shadow: none !important;
        border: none !important;
    }
}

/* ========================================================
   RESPONSIVE (MOBILE & TABLET)
======================================================== */
@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
    }
    .app-sidebar.show {
        transform: translateX(0);
    }
    .app-main {
        margin-left: 0;
    }
    .topbar-search-form {
        display: none;
    }
    .app-content {
        padding: 20px 16px;
    }
}
