/* =========================================================================
   1. Variables & Resets
   ========================================================================= */
:root {
    /* Refined & Subdued Color Palette */
    --bg-color: #fcfcfc;
    --primary-color: #d1d1d1;
    --primary-dark: #4a4a4a;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --border-color: rgba(0, 0, 0, 0.05);
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(0, 0, 0, 0.05);

    /* Layout & Shadow */
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.04);

    /* Animation Constants */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    line-height: 1.6;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 10% 20%, rgba(0, 0, 0, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(0, 0, 0, 0.02) 0%, transparent 50%),
        var(--bg-color);
}

/* Floating Hearts Background */
.bg-decor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.floating-dot {
    position: absolute;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.1;
    animation: float 15s linear infinite;
}

@keyframes float {
    0% {
        transform: translateY(110vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.2;
    }

    90% {
        opacity: 0.2;
    }

    100% {
        transform: translateY(-10vh) rotate(360deg);
        opacity: 0;
    }
}

/* Background animation */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 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='%23000000' fill-opacity='0.01'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2v-4h4v-2h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2v-4h4v-2H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.main-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 800px;
    overflow: hidden;
    position: relative;
    padding-bottom: 20px;
    animation: slideUpFade 0.8s var(--transition);
}

@keyframes slideUpFade {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

header {
    text-align: center;
    padding: 60px 20px;
    background: transparent;
}



h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    color: var(--text-primary);
    margin-bottom: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.8;
}

/* =========================================================================
   3. Tabs Navigation
   ========================================================================= */
.tabs-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px 30px;
    background: transparent;
    position: relative;
}

.tab-btn {
    position: relative;
    padding: 12px 32px;
    background: transparent;
    border: none;
    border-radius: 100px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    z-index: 1;
}

.tab-btn:hover {
    color: var(--text-primary);
    opacity: 1;
}

.tab-btn.active {
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Sliding Background Indicator */
.tab-indicator {
    position: absolute;
    top: 10px;
    left: 0;
    height: 48px;
    background: var(--primary-dark);
    border-radius: 100px;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 10px 20px rgba(229, 152, 155, 0.3);
    z-index: 0;
    display: none;
    /* Initial state, will be revealed by JS */
}

.tabs-content {
    padding: 15px 15px 25px;
    min-height: auto;
}

.tab-pane {
    display: none;
    opacity: 0;
    animation: simpleFadeIn 0.3s ease forwards;
}

.tab-pane.active {
    display: block;
}

@keyframes simpleFadeIn {
    to {
        opacity: 1;
    }
}

.pane-title {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 40px;
    text-align: center;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* =========================================================================
   4. Schedule Tab (Timeline)
   ========================================================================= */
.timeline {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    padding-left: 0;
}

.timeline-day {
    position: relative;
    z-index: 1;
    display: inline-block;
    margin: 40px 0 15px 0;
    padding: 8px 16px;
    background: var(--text-primary);
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.timeline-day:first-child {
    margin-top: 0;
}

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

.timeline-item .time {
    position: absolute;
    left: -90px;
    top: 2px;
    width: 70px;
    text-align: right;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.95rem;
}



.timeline-item .content {
    background: white;
    padding: 18px 22px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.timeline-item:hover .content {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.timeline-item h3 {
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
}

.timeline-item p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

/* =========================================================================
   5. Route Tab
   ========================================================================= */
.route-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

.route-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--border-color);
}

.route-header {
    margin-bottom: 15px;
}

.badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge.forward {
    background: #f0f7ff;
    color: #0066cc;
}

.badge.return {
    background: #fff5f5;
    color: #cc0000;
}

.route-body {
    padding-left: 5px;
}

.location-point {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot.origin {
    background: #666;
}

.dot.dest {
    background: #333;
}

.location-point h4 {
    margin-bottom: 4px;
    font-size: 1.15rem;
    font-weight: 600;
}

.time-estim {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.transit-line {
    border-left: 1px dashed #ccc;
    margin-left: 3px;
    padding: 15px 0 15px 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.vehicle {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.duration {
    font-size: 0.95rem;
    color: var(--text-secondary);
}



/* =========================================================================
   6. Budget Tab
   ========================================================================= */
.budget-main-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.budget-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid #eee;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}

.card-header {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f8f8f8;
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.budget-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    color: #444;
}

.row-label {
    font-weight: 400;
}

.row-cost {
    font-weight: 600;
    color: #222;
}

.card-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #eee;
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    gap: 12px;
}

.footer-label {
    font-size: 0.85rem;
    color: #999;
    font-weight: 500;
}

.footer-amount {
    font-size: 1.6rem;
    font-weight: 800;
    color: #000;
}

/* Grand Total - Balanced & Premium */
.grand-total-section {
    background: #1a1a1a;
    color: #ffffff;
    padding: 30px;
    border-radius: var(--radius-md);
    text-align: center;
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.total-label {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0.7;
}

.total-amount {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* Admin/Management Section - Subtle */
.admin-card {
    background: #fcfcfc;
    border: 1px solid #eee;
    border-radius: var(--radius-md);
    padding: 20px;
    margin-top: 20px;
}

.admin-header h3 {
    font-size: 0.85rem;
    color: #999;
    font-weight: 500;
    margin-bottom: 15px;
    text-align: center;
}

.admin-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.9rem;
    color: #888;
}

/* Sub-items Styling */
.budget-item-group {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.has-sub-items {
    cursor: pointer;
}

.budget-row,
.admin-row {
    transition: background-color 0.2s ease;
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    margin: 0 -8px;
}

.has-sub-items:hover .budget-row,
.has-sub-items:hover .admin-row {
    background-color: rgba(0, 0, 0, 0.02);
}

.row-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.arrow-icon {
    display: flex;
    align-items: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.5;
}

.budget-item-group.expanded .arrow-icon {
    transform: rotate(180deg);
}

.budget-sub-items {
    padding-left: 28px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-left: 2px solid #f8f8f8;
    margin-left: 12px;
    margin-top: 4px;
    margin-bottom: 12px;
    /* Collapsed state */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.budget-item-group.expanded .budget-sub-items {
    max-height: 500px;
    /* Large enough to fit content */
    opacity: 1;
    margin-bottom: 16px;
}

.budget-sub-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #888;
    padding: 2px 0;
}

.sub-row-label {
    font-weight: 400;
}

.sub-row-cost {
    font-weight: 500;
}

.admin-sub {
    border-left-color: #f0f0f0;
}

.admin-footer {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
    text-align: right;
}

.admin-footer .footer-amount {
    font-size: 1.1rem;
    color: #888;
}

/* =========================================================================
   7. Responsive Design
   ========================================================================= */
@media (max-width: 600px) {
    h1 {
        font-size: 2.2rem;
    }

    .main-container {
        padding: 10px;
        margin: 10px;
    }

    .budget-main-wrapper {
        padding: 0 10px;
    }

    .total-amount {
        font-size: 2.2rem;
    }

    .footer-amount {
        font-size: 1.4rem;
    }
}