:root {
    --primary-color: #d4af37; /* Gold */
    --secondary-color: #fcf9f2; /* Soft Cream */
    --accent-color: #e6b8a2; /* Soft Rose */
    --text-color: #333333;
    --text-light: #777777;
    --bg-color: #f7f5f0;
    --card-bg: #ffffff;
    --sidebar-bg: #ffffff;
    --border-radius: 12px;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

h1, h2, h3, h4, .logo h2 {
    font-family: 'Playfair Display', serif;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: var(--sidebar-bg);
    box-shadow: 2px 0 10px rgba(0,0,0,0.03);
    padding: 2rem 0;
    position: fixed;
    height: 100vh;
    z-index: 10;
}

.logo {
    text-align: center;
    margin-bottom: 3rem;
}

.logo h2 {
    font-size: 1.5rem;
    color: var(--text-color);
}

.logo span {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-style: italic;
}

.nav-links {
    list-style: none;
    padding-top: 1rem;
}

.nav-links li {
    padding: 12px 16px;
    margin: 0 16px 8px 16px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 15px;
    border-radius: 20px;
    color: #4a4a4a;
}

.nav-links li:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.nav-links li.active {
    background-color: #6a1a36; /* Deep Maroon */
    color: #ffffff;
    border-right: none;
    box-shadow: 0 4px 15px rgba(106, 26, 54, 0.3);
}

.menu-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 1.1rem;
    background-color: transparent;
    transition: var(--transition);
}

.nav-links li.active .menu-icon-box {
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-links li i {
    font-size: 1.1rem;
}

.menu-text {
    display: flex;
    flex-direction: column;
}

.menu-title {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
}

.menu-subtitle {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 2px;
    font-weight: 400;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 2rem 3rem;
}

header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.header-info h1 {
    font-size: 2.2rem;
    color: var(--text-color);
}

.header-info p {
    color: var(--text-light);
}

/* Views */
.view {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.view.active {
    display: block;
}

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

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* Cards & Containers */
.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0,0,0,0.02);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

.countdown-card {
    text-align: center;
    background: linear-gradient(135deg, var(--secondary-color), #ffffff);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.countdown-timer {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin: 1.5rem 0;
}

.time-box {
    background: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    min-width: 80px;
}

.time-box span {
    display: block;
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-color);
}

.time-box label {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: var(--border-radius);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-item i {
    font-size: 2rem;
    color: var(--accent-color);
    background: white;
    padding: 1rem;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.stat-item h4 {
    font-size: 1.2rem;
    color: var(--text-color);
}

.stat-item p {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

th {
    font-weight: 500;
    color: var(--text-light);
    background-color: var(--secondary-color);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: rgba(212, 175, 55, 0.05);
}

/* Spreadsheet specific styles */
.spreadsheet-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #792b45; /* Deep reddish/maroon from the image */
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    margin-top: 1rem;
}

.spreadsheet-section-header h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.spreadsheet-table {
    border-collapse: collapse;
    width: 100%;
    border: 1px solid #ddd;
}

.spreadsheet-table th, .spreadsheet-table td {
    border: 1px solid #ddd;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

.spreadsheet-table th {
    background-color: #f3e5e9; /* Light pinkish background for headers */
    color: #333;
    font-weight: 600;
    text-align: center;
}

.spreadsheet-table tbody tr.section-row td {
    background-color: #f3e5e9;
    font-weight: 600;
    text-align: left;
}

.spreadsheet-table tbody tr:hover td {
    background-color: rgba(0,0,0,0.02);
}

.spreadsheet-table td {
    vertical-align: middle;
}

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

.mb-4 {
    margin-bottom: 1.5rem;
}

.progress-select {
    padding: 4px;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 0.8rem;
    width: 100%;
    font-weight: 500;
}
.progress-select.done { background-color: #f8d7da; color: #721c24; }
.progress-select.dalam { background-color: #cce5ff; color: #004085; }
.progress-select.survey { background-color: #fff3cd; color: #856404; }
.progress-select.prepare { background-color: #d4edda; color: #155724; }
.progress-select.belum { background-color: #e2e3e5; color: #383d41; }
.progress-select.dp { background-color: #d1ecf1; color: #0c5460; }


/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background-color: #c5a02e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.w-100 {
    width: 100%;
    justify-content: center;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px;
    margin: 0 3px;
    transition: var(--transition);
}

.action-btn.edit { color: #3498db; }
.action-btn.delete { color: #e74c3c; }

.action-btn:hover {
    transform: scale(1.1);
}

/* Tasks */
.tasks-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.task-item {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.task-item:hover {
    transform: translateY(-3px);
}

.task-item.completed {
    border-left-color: #2ecc71;
    opacity: 0.7;
}

.task-item.completed .task-info h4 {
    text-decoration: line-through;
    color: var(--text-light);
}

.task-info h4 {
    margin-bottom: 0.3rem;
}

.task-info span {
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 12px;
    background: var(--secondary-color);
    color: var(--primary-color);
}

.task-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Budget */
.budget-summary {
    margin-bottom: 2rem;
}

.budget-bar {
    height: 12px;
    background-color: #eee;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.budget-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    width: 0%;
    transition: width 1s ease-in-out;
}

.budget-stats {
    display: flex;
    justify-content: space-between;
    font-weight: 500;
}

/* Badges */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}
.badge.hadir { background: #e8f8f5; color: #1abc9c; }
.badge.tidak-hadir { background: #fdedec; color: #e74c3c; }
.badge.belum { background: #fef9e7; color: #f1c40f; }

.badge.Done { background: #f8d7da; color: #721c24; }
.badge.Dalam.Proses { background: #cce5ff; color: #004085; }
.badge.Survey { background: #fff3cd; color: #856404; }
.badge.Prepare { background: #d4edda; color: #155724; }
.badge.DP { background: #d1ecf1; color: #0c5460; }


/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 400px;
    position: relative;
    animation: zoomIn 0.3s ease forwards;
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-light);
    cursor: pointer;
}

.close:hover {
    color: var(--text-color);
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    /* Fixed Bottom Navigation */
    .sidebar {
        width: 100%;
        height: 65px;
        position: fixed;
        bottom: 0;
        top: auto;
        padding: 0;
        display: flex;
        align-items: center;
        box-shadow: 0 -4px 15px rgba(0,0,0,0.05);
        z-index: 1000;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border-top: 1px solid rgba(0,0,0,0.05);
    }
    
    .logo { 
        display: none; 
    }
    
    .nav-links {
        display: flex;
        width: 100%;
        overflow-x: auto;
        justify-content: flex-start;
        align-items: center;
        margin: 0;
        padding: 0;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-links::-webkit-scrollbar {
        display: none;
    }
    
    .nav-links li {
        flex-direction: column;
        padding: 0.5rem 10px;
        gap: 4px;
        border-right: none;
        border-top: 3px solid transparent;
        flex: 0 0 auto;
        min-width: 75px;
        text-align: center;
        border-radius: 0;
        color: var(--text-light);
        margin: 0;
    }
    
    .nav-links li.active {
        border-top: 3px solid #6a1a36;
        background-color: transparent;
        color: #6a1a36;
        box-shadow: none;
    }

    .nav-links li.active .menu-icon-box {
        background-color: transparent;
    }

    .menu-icon-box {
        width: auto;
        height: auto;
    }

    .menu-text {
        align-items: center;
    }

    .menu-subtitle {
        display: none;
    }

    .menu-title {
        font-size: 0.7rem;
        font-weight: 500;
    }

    .nav-links li.active .menu-title {
        font-weight: 600;
    }

    .nav-links li i { 
        font-size: 1.3rem; 
        margin-bottom: 2px;
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
        padding-bottom: 85px; /* Space for bottom nav */
    }

    /* Header formatting */
    header {
        text-align: center;
        margin-bottom: 1.5rem;
    }

    .header-info h1 {
        font-size: 1.6rem;
    }

    .header-info p {
        font-size: 0.9rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .summary-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-item {
        padding: 0.8rem;
    }

    .stat-item i {
        font-size: 1.5rem;
        padding: 0.8rem;
    }

    .view-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        text-align: center;
    }

    .view-header button {
        width: 100%;
        justify-content: center;
    }

    .time-box {
        min-width: 60px;
        padding: 0.5rem;
    }
    
    .time-box span {
        font-size: 1.3rem;
    }

    /* Modals for Mobile */
    .modal-content {
        width: 95%;
        padding: 1.5rem;
        margin-bottom: 50px; /* Prevent keyboard overlap */
    }

    /* Responsive Tables as Cards */
    .table-container {
        box-shadow: none;
        padding: 0;
        background: transparent;
        border: none;
    }

    table {
        display: block;
    }

    thead {
        display: none; /* Hide table headers */
    }
    
    tbody {
        display: block;
        width: 100%;
    }

    tr {
        display: block;
        background-color: var(--card-bg);
        border-radius: var(--border-radius);
        margin-bottom: 1rem;
        padding: 1rem;
        box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    }
    
    td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border-bottom: 1px dashed rgba(0,0,0,0.05);
        text-align: right;
    }
    
    td:last-child {
        border-bottom: none;
        justify-content: flex-end;
        padding-bottom: 0;
        padding-top: 1rem;
    }

    /* Add labels for Guest Table */
    #guestTable td:nth-child(1)::before { content: "Nama:"; color: var(--text-light); font-weight: 500; }
    #guestTable td:nth-child(2)::before { content: "Grup:"; color: var(--text-light); font-weight: 500; }
    #guestTable td:nth-child(3)::before { content: "RSVP:"; color: var(--text-light); font-weight: 500; }
    
    /* Add labels for Budget Table */
    #budgetTable td:nth-child(1)::before { content: "Item:"; color: var(--text-light); font-weight: 500; }
    #budgetTable td:nth-child(2)::before { content: "Kategori:"; color: var(--text-light); font-weight: 500; }
    #budgetTable td:nth-child(3)::before { content: "Biaya:"; color: var(--text-light); font-weight: 500; }
    
    /* Spreadsheet table overrides for mobile */
    .spreadsheet-table td:nth-child(1)::before { content: attr(data-label); color: var(--text-light); font-weight: 500; }
    .spreadsheet-table td:nth-child(2)::before { content: attr(data-label); color: var(--text-light); font-weight: 500; }
    .spreadsheet-table td:nth-child(3)::before { content: attr(data-label); color: var(--text-light); font-weight: 500; }
    .spreadsheet-table td:nth-child(4)::before { content: attr(data-label); color: var(--text-light); font-weight: 500; }
    .spreadsheet-table td:nth-child(5)::before { content: attr(data-label); color: var(--text-light); font-weight: 500; }
    .spreadsheet-table td:nth-child(6)::before { content: attr(data-label); color: var(--text-light); font-weight: 500; }
    .spreadsheet-table td:nth-child(7)::before { content: attr(data-label); color: var(--text-light); font-weight: 500; }
    
    .spreadsheet-table tbody tr.section-row {
        background-color: #792b45;
        color: white;
        text-align: center;
        border-radius: var(--border-radius);
    }
    .spreadsheet-table tbody tr.section-row td {
        justify-content: center;
        border-bottom: none;
    }
}
