/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Lato', sans-serif;
    color: #3a3a3a;
    background: #faf8f5;
    line-height: 1.6;
    display: flex;
    min-height: 100vh;
}

/* ===== Hide number input spinners ===== */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] { -moz-appearance: textfield; }

/* ===== Number input style ===== */
.num-input {
    width: 80px;
    text-align: right;
    border: 1px solid #d4c8ba;
    border-radius: 4px;
    padding: 0.2rem 0.3rem;
    font-size: 0.85rem;
    font-family: 'Lato', sans-serif;
    background: #fff;
}
.num-input:focus {
    outline: 2px solid #c9a87c;
    outline-offset: 1px;
    border-color: #c9a87c;
}

/* ===== Date input style ===== */
.date-input {
    border: 1px solid #d4c8ba;
    border-radius: 4px;
    padding: 0.2rem;
    font-size: 0.8rem;
    background: #fff;
    font-family: 'Lato', sans-serif;
}

/* ===== Sidebar ===== */
.sidebar {
    width: 260px;
    background: #2c2420;
    color: #e8ddd3;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}
.sidebar-header {
    padding: 2rem 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-align: center;
}
.logo {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: #e8d5c4;
}
.logo span { color: #c9a87c; font-style: italic; }
.logo-sub {
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #a08e7e;
    margin-top: 0.2rem;
}
.nav-links {
    list-style: none;
    padding: 1rem 0;
    flex: 1;
    overflow-y: auto;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.5rem;
    color: #c4b5a5;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}
.nav-link:hover { background: rgba(255,255,255,0.05); color: #fff; }
.nav-link.active {
    background: rgba(255,255,255,0.08);
    color: #e8d5c4;
    border-left-color: #c9a87c;
    font-weight: 700;
}
.nav-icon { font-size: 1.1rem; width: 1.4rem; text-align: center; }
.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.export-btn, .import-btn {
    display: block;
    width: 100%;
    padding: 0.55rem;
    border: 1px solid rgba(255,255,255,0.15);
    background: transparent;
    color: #c4b5a5;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}
.export-btn:hover, .import-btn:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* ===== Mobile Header ===== */
.mobile-header {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 56px;
    background: #2c2420;
    color: #e8d5c4;
    align-items: center;
    padding: 0 1rem;
    z-index: 99;
    gap: 1rem;
}
.hamburger {
    background: none;
    border: none;
    color: #e8d5c4;
    font-size: 1.5rem;
    cursor: pointer;
}
.mobile-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
}

/* ===== Main Content ===== */
.main-content {
    margin-left: 260px;
    flex: 1;
    min-height: 100vh;
}
.tab-content { display: none; padding: 2rem; }
.tab-content.active { display: block; }

/* ===== Hero Banner (Dashboard) ===== */
.hero-banner {
    background: linear-gradient(135deg, #f5e6d3 0%, #e8d5c4 30%, #d4b896 60%, #c9a87c 100%);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}
.hero-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.25) 0%, transparent 50%);
}
.hero-inner { position: relative; z-index: 1; }
.hero-label {
    font-size: 0.85rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #6b5b4f;
}
.hero-names {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    color: #4a3728;
    margin: 0.3rem 0 1.5rem;
}
.amp { font-style: italic; color: #8b6f47; margin: 0 0.15em; }

/* ===== Dual Countdown ===== */
.dual-countdown {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}
.countdown-block {
    flex: 1;
    min-width: 280px;
    max-width: 450px;
}
.countdown-label {
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    color: #6b5b4f;
    margin-bottom: 0.75rem;
    letter-spacing: 0.05em;
}
.countdown { display: flex; justify-content: center; gap: 0.6rem; flex-wrap: wrap; }
.cd-item { display: flex; flex-direction: column; align-items: center; min-width: 65px; }
.cd-num {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    color: #4a3728;
    background: rgba(255,255,255,0.4);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 10px;
    padding: 0.3em 0.5em;
    min-width: 65px;
    backdrop-filter: blur(4px);
}
.cd-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #7a6a5e;
    margin-top: 0.3rem;
}

/* ===== Dashboard Grid ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
}
.dash-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border: 1px solid #ece6de;
}
.dash-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    color: #4a3728;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #ece6de;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.btn-add-sm {
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
}

/* Key Dates */
.key-date-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f5f0eb;
}
.key-date-row:last-child { border-bottom: none; }
.kd-event { font-weight: 700; color: #4a3728; font-size: 0.9rem; }
.kd-detail { font-size: 0.8rem; color: #8b7b6b; text-align: right; }
.kd-actions {
    display: flex;
    gap: 0.3rem;
    margin-top: 0.2rem;
    justify-content: flex-end;
}
.kd-actions .btn-icon { font-size: 0.85rem; }

/* Progress bars */
.progress-row { margin-bottom: 1rem; }
.progress-row:last-child { margin-bottom: 0; }
.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
    color: #5a4a3e;
}
.progress-bar {
    height: 8px;
    background: #ece6de;
    border-radius: 4px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}
.fill-green { background: #6a9e6a; }
.fill-gold { background: #c9a87c; }

/* Budget summary */
.budget-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}
.budget-summary-row.total {
    font-weight: 700;
    border-top: 2px solid #ece6de;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    font-size: 1rem;
    color: #4a3728;
}

/* Upcoming tasks */
.upcoming-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f5f0eb;
    font-size: 0.85rem;
}
.upcoming-item:last-child { border-bottom: none; }
.upcoming-date {
    font-size: 0.7rem;
    background: #f5e6d3;
    color: #6b5b4f;
    padding: 0.2em 0.5em;
    border-radius: 4px;
    white-space: nowrap;
    font-weight: 700;
}
.upcoming-overdue .upcoming-date {
    background: #f5d5d5;
    color: #a04040;
}

/* ===== Tab Header ===== */
.tab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.tab-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: #4a3728;
}
.tab-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.filter-label { font-size: 0.85rem; color: #7a6a5e; }
select {
    padding: 0.4rem 0.6rem;
    border: 1px solid #d4c8ba;
    border-radius: 6px;
    background: #fff;
    font-size: 0.85rem;
    color: #4a3728;
}
.btn-add {
    padding: 0.45rem 1rem;
    background: #4a3728;
    color: #fdfbf9;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-add:hover { background: #6b5b4f; }

/* ===== Data Tables ===== */
.table-wrap { overflow-x: auto; }
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    font-size: 0.85rem;
}
.data-table thead th {
    background: #2c2420;
    color: #e8d5c4;
    padding: 0.75rem 0.8rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
    position: sticky;
    top: 0;
}
.data-table tbody td {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid #f0ebe5;
    vertical-align: top;
}
.data-table tbody tr:hover { background: #faf6f1; }
.data-table tbody tr.completed-row { opacity: 0.55; }
.num-col { text-align: right; }

/* Editable cells */
.editable {
    cursor: text;
    min-width: 60px;
    padding: 0.2em 0.3em;
    border-radius: 4px;
    transition: background 0.15s;
}
.editable:hover { background: #f5f0eb; }
.editable:focus {
    background: #fff;
    outline: 2px solid #c9a87c;
    outline-offset: 1px;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 0.2em 0.6em;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}
.status-completed { background: #d4edda; color: #28603a; }
.status-in-progress { background: #fff3cd; color: #856404; }
.status-not-started { background: #e8e0d8; color: #6b5b4f; }

/* Guest side badges */
.side-esther { background: #f0d4e8; color: #8b3a6f; }
.side-lekan { background: #d4e0f0; color: #3a5e8b; }
.side-both { background: #e8e0d8; color: #6b5b4f; }

/* Action buttons */
.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.2em;
    opacity: 0.5;
    transition: opacity 0.2s;
}
.btn-icon:hover { opacity: 1; }
.btn-delete { color: #c44; }
.btn-cal { color: #4a3728; font-size: 0.85rem; }

/* ===== Deadline cell ===== */
.deadline-cell {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* ===== Budget Sections ===== */
.budget-section {
    margin-bottom: 2.5rem;
}
.budget-section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: #4a3728;
    margin-bottom: 0.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #d4b896;
}
.budget-section-totals {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: #5a4a3e;
}
.budget-section-totals strong { color: #4a3728; }

/* ===== Budget Table ===== */
.budget-table .category-header td {
    background: #f5f0eb;
    font-weight: 700;
    color: #4a3728;
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
}
.budget-totals {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.budget-total-item {
    background: #fff;
    border: 1px solid #ece6de;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}
.budget-total-item strong { color: #4a3728; }
.budget-table tfoot td {
    background: #2c2420;
    color: #e8d5c4;
    font-weight: 700;
    padding: 0.75rem 0.8rem;
}
.diff-positive { color: #28603a; }
.diff-negative { color: #c44; }

/* ===== Checklist ===== */
.checklist-group { margin-bottom: 2rem; }
.checklist-group-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: #4a3728;
    padding: 0.5rem 0;
    border-bottom: 2px solid #d4b896;
    margin-bottom: 0.75rem;
}
.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0.5rem;
    border-radius: 6px;
    transition: background 0.15s;
}
.checklist-item:hover { background: #faf6f1; }
.checklist-item input[type="checkbox"] {
    margin-top: 0.25rem;
    accent-color: #4a3728;
    width: 16px;
    height: 16px;
    cursor: pointer;
}
.checklist-item.done .cl-text { text-decoration: line-through; opacity: 0.5; }
.cl-text { font-size: 0.9rem; flex: 1; }
.checklist-item .btn-delete {
    opacity: 0;
    transition: opacity 0.2s;
    font-size: 0.85rem;
}
.checklist-item:hover .btn-delete { opacity: 0.5; }
.checklist-item:hover .btn-delete:hover { opacity: 1; }

/* ===== Tables Tab ===== */
.tables-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}
.table-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border: 1px solid #ece6de;
}
.table-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #d4b896;
}
.table-card-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: #4a3728;
}
.table-count {
    font-size: 0.8rem;
    color: #8b7b6b;
    background: #f5e6d3;
    padding: 0.2em 0.6em;
    border-radius: 12px;
}
.table-notes {
    font-size: 0.8rem;
    color: #6b5b4f;
    margin-bottom: 0.75rem;
}
.table-guests-list { }
.table-guest-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid #f5f0eb;
    font-size: 0.85rem;
}
.table-guest-item:last-child { border-bottom: none; }

/* ===== Timeline (Day Schedule) ===== */
.timeline-wrap { max-width: 700px; }
.timeline-item {
    display: flex;
    gap: 1.5rem;
    position: relative;
    padding-bottom: 1.5rem;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: 52px;
    top: 28px;
    bottom: 0;
    width: 2px;
    background: #d4c8ba;
}
.timeline-item:last-child::before { display: none; }
.tl-time {
    min-width: 55px;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: #4a3728;
    padding-top: 0.4rem;
    text-align: right;
}
.tl-dot {
    width: 12px;
    height: 12px;
    background: #c9a87c;
    border: 2px solid #fff;
    border-radius: 50%;
    margin-top: 0.5rem;
    box-shadow: 0 0 0 2px #c9a87c;
    flex-shrink: 0;
}
.tl-content {
    flex: 1;
    background: #fff;
    border: 1px solid #ece6de;
    border-radius: 8px;
    padding: 0.75rem 1rem;
}
.tl-activity {
    font-weight: 700;
    color: #4a3728;
    font-size: 0.9rem;
}
.tl-duration {
    font-size: 0.75rem;
    color: #8b7b6b;
    margin-top: 0.15rem;
}
.tl-notes-field {
    margin-top: 0.3rem;
    font-size: 0.8rem;
    color: #6b5b4f;
}

/* ===== Shot List ===== */
.shots-group { margin-bottom: 2rem; }
.shots-group-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: #4a3728;
    padding: 0.5rem 0;
    border-bottom: 2px solid #d4b896;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.shots-count {
    font-family: 'Lato', sans-serif;
    font-size: 0.75rem;
    color: #8b7b6b;
}
.shot-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.4rem 0.5rem;
    border-radius: 6px;
}
.shot-item:hover { background: #faf6f1; }
.shot-item input[type="checkbox"] {
    margin-top: 0.2rem;
    accent-color: #4a3728;
    width: 16px;
    height: 16px;
    cursor: pointer;
}
.shot-item.done .shot-text { text-decoration: line-through; opacity: 0.5; }
.shot-text { font-size: 0.85rem; flex: 1; }

/* ===== Modal / Overlay ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}
.modal {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}
.modal h3 {
    font-family: 'Playfair Display', serif;
    color: #4a3728;
    margin-bottom: 1.2rem;
}
.modal label {
    display: block;
    font-size: 0.8rem;
    color: #6b5b4f;
    margin-bottom: 0.25rem;
    margin-top: 0.75rem;
}
.modal input, .modal select, .modal textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d4c8ba;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: 'Lato', sans-serif;
}
.modal textarea { resize: vertical; min-height: 60px; }
.modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    justify-content: flex-end;
}
.btn-primary {
    padding: 0.5rem 1.2rem;
    background: #4a3728;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}
.btn-primary:hover { background: #6b5b4f; }
.btn-secondary {
    padding: 0.5rem 1.2rem;
    background: transparent;
    color: #4a3728;
    border: 1px solid #d4c8ba;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

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

.tab-content.active { animation: fadeIn 0.3s ease; }

.dash-card { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.dash-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

.table-card { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.table-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

.tl-content { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.tl-content:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0,0,0,0.06); }

.modal { animation: modalIn 0.25s ease; }
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .mobile-header { display: flex; }
    .main-content { margin-left: 0; margin-top: 56px; }
    .tab-content { padding: 1rem; }
    .hero-banner { padding: 2rem 1rem; }
    .dual-countdown { gap: 1.5rem; }
    .countdown-block { min-width: 240px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .tables-wrap { grid-template-columns: 1fr; }
    .tab-header { flex-direction: column; align-items: flex-start; }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d4c8ba; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #b8a898; }

/* ===== Focus styles ===== */
input:focus, select:focus, textarea:focus {
    outline: 2px solid #c9a87c;
    outline-offset: 1px;
    border-color: #c9a87c;
}

/* ===== Toast notification ===== */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #2c2420;
    color: #e8d5c4;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-size: 0.85rem;
    z-index: 300;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2s forwards;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; } }
