/*
 * YMU 13th Gala - Hybrid Theme
 * Havana Nights: Header & Dashboard
 * Clean Professional: Vendors, Budget, Timeline
 */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #faf8f3;
    color: #2d2d2d;
    line-height: 1.6;
}

/* Navigation - HAVANA NIGHTS THEME */
.navbar {
    background: linear-gradient(90deg, #0f2621 0%, #1a3a35 100%);
    color: #c9a961;
    padding: 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(201, 169, 97, 0.25);
}

.nav-container {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    padding: 0 20px;
}

.nav-brand {
    font-size: 1.8rem;
    font-weight: 700;
    padding: 1rem 0;
    color: #c9a961;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: 'Didot', 'Bodoni MT', 'Cochin', Georgia, serif;
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    align-items: stretch;
    gap: 0;
}

/* Nav links with icons */
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(212, 184, 150, 0.85);
    text-decoration: none;
    padding: 1.1rem 1.25rem;
    transition: color 0.25s ease, background-color 0.25s ease;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
    position: relative;
}

.nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.nav-link:hover {
    color: #c9a961;
    background-color: rgba(201, 169, 97, 0.08);
}

.nav-link.active {
    color: #c9a961;
    background-color: rgba(201, 169, 97, 0.12);
}

/* Gold underline indicator for active link */
.nav-menu > .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: #c9a961;
    border-radius: 2px 2px 0 0;
}

/* Nav groups (dropdown containers) */
.nav-group {
    position: relative;
    display: flex;
    align-items: stretch;
}

.nav-group-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: rgba(212, 184, 150, 0.85);
    padding: 1.1rem 1.25rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: color 0.25s ease, background-color 0.25s ease;
    white-space: nowrap;
    position: relative;
}

.nav-chevron {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
    margin-left: 0.1rem;
}

.nav-group:hover .nav-group-toggle,
.nav-group.has-active .nav-group-toggle {
    color: #c9a961;
    background-color: rgba(201, 169, 97, 0.08);
}

/* Active child indicator on group toggle */
.nav-group.has-active .nav-group-toggle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: #c9a961;
    border-radius: 2px 2px 0 0;
}

/* Dropdown panel */
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: linear-gradient(180deg, #132e29 0%, #0f2621 100%);
    border: 1px solid rgba(201, 169, 97, 0.15);
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 200;
}

.nav-group:hover .nav-dropdown,
.nav-group.open .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-group:hover .nav-chevron,
.nav-group.open .nav-chevron {
    transform: rotate(180deg);
}

.nav-dropdown .nav-link {
    display: flex;
    padding: 0.85rem 1.25rem;
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(201, 169, 97, 0.08);
}

.nav-dropdown .nav-link:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

.nav-dropdown .nav-link::after {
    display: none;
}

.nav-dropdown .nav-link.active {
    border-left: 3px solid #c9a961;
    padding-left: calc(1.25rem - 3px);
    background-color: rgba(201, 169, 97, 0.08);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Dashboard gets dark background - HAVANA NIGHTS */
#dashboard {
    background: linear-gradient(135deg, #1a3a35 0%, #0f2621 100%);
    margin: -2rem;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding: 2rem calc(50vw - 50%);
    min-height: calc(100vh - 60px);
}

/* Page Management */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* Page Header - Different for Dashboard vs Others */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: #1a3a35;
    letter-spacing: 0.5px;
}

/* Dashboard Page Header - HAVANA NIGHTS */
#dashboard .page-header h1 {
    font-size: 2.5rem;
    color: #c9a961;
    font-family: 'Didot', 'Bodoni MT', Georgia, serif;
    font-weight: 700;
    letter-spacing: 2px;
}

/* Buttons - Default (Blue) */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-primary {
    background: linear-gradient(135deg, #1a3a35, #0f2621);
    color: #c9a961;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 8px;
}

.btn-primary:hover {
    box-shadow: 0 4px 16px rgba(15, 38, 33, 0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: #1a3a35;
    border: 1px solid #f0ece3;
}

.btn-secondary:hover {
    background: #faf8f3;
    border-color: #ebe6dc;
}

.btn-danger {
    background: transparent;
    color: #8b4532;
    border: 1px solid rgba(139, 69, 50, 0.2);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-danger:hover {
    background: rgba(139, 69, 50, 0.08);
    border-color: rgba(139, 69, 50, 0.4);
}

.btn-edit {
    background: transparent;
    color: #1a3a35;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    margin-right: 0.5rem;
    border: 1px solid #f0ece3;
}

.btn-edit:hover {
    background: #faf8f3;
    border-color: #c9a961;
}

/* Dashboard Buttons Override - HAVANA NIGHTS */
#dashboard .btn {
    border: 2px solid #c9a961;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: Georgia, serif;
}

#dashboard .btn-primary {
    background-color: #c9a961;
    color: #1a3a35;
}

#dashboard .btn-primary:hover {
    background-color: #d4b896;
    box-shadow: 0 6px 16px rgba(201, 169, 97, 0.4);
}

/* Countdown Card - HAVANA NIGHTS (Dashboard only) */
.countdown-card {
    background: linear-gradient(135deg, #2a4a45 0%, #1a3a35 100%);
    border-radius: 16px;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    border: 2px solid rgba(201, 169, 97, 0.3);
    position: relative;
    overflow: hidden;
}

.countdown-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(201, 169, 97, 0.05) 0%, transparent 70%);
    animation: shimmer 8s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(10%, 10%); }
}

.countdown-content h2 {
    color: #c9a961;
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    font-family: 'Didot', 'Bodoni MT', Georgia, serif;
    letter-spacing: 3px;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.countdown-display {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.countdown-item {
    text-align: center;
    background: rgba(42, 74, 69, 0.5);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(201, 169, 97, 0.2);
    min-width: 100px;
}

.countdown-number {
    display: block;
    font-size: 3.5rem;
    font-weight: bold;
    color: #c9a961;
    line-height: 1;
    font-family: 'Didot', Georgia, serif;
}

.countdown-label {
    display: block;
    color: #d4b896;
    font-size: 0.9rem;
    margin-top: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.event-date {
    text-align: center;
    color: #c9a961;
    font-size: 1.2rem;
    margin-top: 1.5rem;
    font-style: italic;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

/* Stats Grid - Default (Warm) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #faf8f3;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
    border: 1px solid #f0ece3;
    border-left: 4px solid #c9a961;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(201, 169, 97, 0.12);
}

.staff-stat-clickable {
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.2s, background 0.2s;
}

.staff-stat-clickable:hover {
    border-left-color: #e8a87c;
}

.staff-stat-clickable.active {
    border-left-color: #e8a87c;
    background: #fdf5ee;
    box-shadow: 0 4px 12px rgba(232, 168, 124, 0.2);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    flex-shrink: 0;
}

.budget-icon {
    background-color: #e8f5e9;
    color: #4caf50;
}

.spent-icon {
    background-color: #fff3e0;
    color: #ff9800;
}

.remaining-icon {
    background-color: #e3f2fd;
    color: #2196f3;
}

.vendor-icon {
    background-color: #f3e5f5;
    color: #9c27b0;
}

.stat-content {
    flex: 1;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #8a8778;
    margin-bottom: 0.25rem;
}

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 600;
    color: #2d2d2d;
    font-family: 'Cormorant Garamond', Georgia, serif;
}

.stat-value.warning {
    color: #e74c3c;
}

/* Dashboard Stats Override - HAVANA NIGHTS */
#dashboard .stat-card {
    background: linear-gradient(135deg, #2a4a45 0%, #1f3f3a 100%);
    border: 1px solid rgba(201, 169, 97, 0.2);
}

#dashboard .stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(201, 169, 97, 0.2);
    border-color: rgba(201, 169, 97, 0.4);
}

#dashboard .stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    font-size: 1.8rem;
}

#dashboard .budget-icon {
    background: linear-gradient(135deg, #c9a961 0%, #d4b896 100%);
    color: #1a3a35;
}

#dashboard .spent-icon {
    background: linear-gradient(135deg, #8b7355 0%, #a08968 100%);
    color: #d4b896;
}

#dashboard .remaining-icon {
    background: linear-gradient(135deg, #4a6b5f 0%, #5a7b6f 100%);
    color: #d4b896;
}

#dashboard .vendor-icon {
    background: linear-gradient(135deg, #6b5a4a 0%, #7b6a5a 100%);
    color: #d4b896;
}

#dashboard .stat-label {
    color: rgba(212, 184, 150, 0.7);
    letter-spacing: 1px;
    text-transform: uppercase;
}

#dashboard .stat-value {
    color: #c9a961;
    font-family: 'Didot', Georgia, serif;
    font-size: 2rem;
}

#dashboard .stat-value.warning {
    color: #d9a366;
}

/* Card - Default (Warm) */
.card {
    background: white;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
    overflow: hidden;
    border: 1px solid #f0ece3;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #ebe6dc;
    background: #fdfcfa;
}

.card-header h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a3a35;
}

.card-body {
    padding: 1.5rem;
}

/* Dashboard Cards Override - HAVANA NIGHTS */
#dashboard .card {
    background: linear-gradient(135deg, #2a4a45 0%, #1f3f3a 100%);
    border: 1px solid rgba(201, 169, 97, 0.2);
}

#dashboard .card-header {
    border-bottom: 2px solid rgba(201, 169, 97, 0.3);
    background: rgba(26, 58, 53, 0.5);
}

#dashboard .card-header h2 {
    color: #c9a961;
    font-family: 'Didot', Georgia, serif;
    letter-spacing: 2px;
    font-size: 1.5rem;
}

/* Progress Bar - Default (Clean) */
.progress-container {
    margin: 1rem 0;
}

.progress-bar {
    width: 100%;
    height: 24px;
    background-color: #f0ece3;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #c9a961 0%, #d4b896 100%);
    border-radius: 12px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.5rem;
    min-width: 0;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.progress-labels span:first-child {
    font-weight: 600;
    color: #2c3e50;
}

/* Dashboard Progress Override - HAVANA NIGHTS */
#dashboard .progress-bar {
    background: rgba(15, 38, 33, 0.6);
    border: 1px solid rgba(201, 169, 97, 0.2);
    height: 28px;
    border-radius: 14px;
}

#dashboard .progress-fill {
    background: linear-gradient(90deg, #c9a961 0%, #d4b896 100%);
    box-shadow: 0 0 12px rgba(201, 169, 97, 0.4);
}

#dashboard .progress-labels {
    color: rgba(212, 184, 150, 0.7);
}

#dashboard .progress-labels span:first-child {
    color: #c9a961;
}

/* Status Grid - Default */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.status-item {
    text-align: center;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.status-label {
    display: block;
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

.status-count {
    display: block;
    font-size: 2rem;
    font-weight: 600;
}

.status-count.confirmed {
    color: #2ecc71;
}

.status-count.pending {
    color: #f39c12;
}

.status-count.issue {
    color: #e74c3c;
}

/* Dashboard Status Override - HAVANA NIGHTS */
#dashboard .status-item {
    background: rgba(42, 74, 69, 0.4);
    border: 1px solid rgba(201, 169, 97, 0.2);
    padding: 1.5rem 1rem;
    border-radius: 12px;
}

#dashboard .status-label {
    color: rgba(212, 184, 150, 0.7);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

#dashboard .status-count {
    font-size: 2.5rem;
    font-family: 'Didot', Georgia, serif;
}

#dashboard .status-count.confirmed {
    color: #7ba888;
}

#dashboard .status-count.pending {
    color: #c9a961;
}

#dashboard .status-count.issue {
    color: #d9a366;
}

/* Deadline List - Default */
.deadline-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.deadline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.deadline-item.overdue {
    border-left-color: #e74c3c;
    background-color: #fee;
}

.deadline-info {
    flex: 1;
}

.deadline-task {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.deadline-date {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.deadline-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.deadline-badge.upcoming {
    background-color: #fff3cd;
    color: #856404;
}

.deadline-badge.overdue {
    background-color: #f8d7da;
    color: #721c24;
}

/* Dashboard Deadlines Override - HAVANA NIGHTS */
#dashboard .deadline-item {
    background: rgba(42, 74, 69, 0.4);
    border: 1px solid rgba(201, 169, 97, 0.2);
    border-left: 4px solid #c9a961;
    padding: 1.25rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

#dashboard .deadline-item:hover {
    background: rgba(42, 74, 69, 0.6);
    border-left-width: 6px;
}

#dashboard .deadline-item.overdue {
    border-left-color: #d9a366;
    background: rgba(139, 58, 58, 0.2);
}

#dashboard .deadline-task {
    color: #d4b896;
    font-weight: 600;
    font-size: 1.05rem;
}

#dashboard .deadline-date {
    color: rgba(212, 184, 150, 0.7);
}

#dashboard .deadline-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

#dashboard .deadline-badge.upcoming {
    background-color: rgba(201, 169, 97, 0.2);
    color: #c9a961;
    border: 1px solid rgba(201, 169, 97, 0.4);
}

#dashboard .deadline-badge.overdue {
    background-color: rgba(217, 163, 102, 0.2);
    color: #d9a366;
    border: 1px solid rgba(217, 163, 102, 0.4);
}

/* Toolbar */
.toolbar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 250px;
    padding: 0.75rem 1rem;
    border: 1px solid #f0ece3;
    border-radius: 8px;
    font-size: 1rem;
    background: #faf8f3;
}

.search-input:focus {
    outline: none;
    border-color: #c9a961;
    box-shadow: 0 0 0 2px rgba(201, 169, 97, 0.3);
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: #3498db;
}

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

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

.data-table thead {
    background: #1a3a35;
}

.data-table th {
    padding: 0.85rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #f0ece3;
    border-bottom: 2px solid rgba(201, 169, 97, 0.3);
    white-space: nowrap;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.data-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f0ece3;
    color: #2d2d2d;
}

.data-table tbody tr:hover {
    background-color: rgba(250, 248, 243, 0.8);
}

.data-table tbody tr:nth-child(even) {
    background-color: rgba(250, 248, 243, 0.5);
}

.data-table .empty-state {
    text-align: center;
    padding: 3rem;
    color: #95a5a6;
}

/* Status Badges - Earth-toned pills */
.status-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.status-badge.confirmed {
    background-color: rgba(26, 58, 53, 0.1);
    color: #1a3a35;
}

.status-badge.pending {
    background-color: rgba(201, 169, 97, 0.15);
    color: #8a7234;
}

.status-badge.issue {
    background-color: rgba(180, 90, 60, 0.12);
    color: #8b4532;
}

.status-badge.paid {
    background-color: rgba(26, 58, 53, 0.1);
    color: #1a3a35;
}

.status-badge.partial {
    background-color: rgba(201, 169, 97, 0.15);
    color: #8a7234;
}

.status-badge.not-paid {
    background-color: rgba(180, 90, 60, 0.12);
    color: #8b4532;
}

/* Budget Categories */
.budget-categories {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.budget-category {
    border: 1px solid #ecf0f1;
    border-radius: 8px;
    padding: 1.5rem;
    background-color: #f8f9fa;
}

.budget-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.budget-category-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #2c3e50;
}

.budget-category-amounts {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
}

.budget-amount {
    display: flex;
    flex-direction: column;
}

.budget-amount-label {
    color: #7f8c8d;
    font-size: 0.85rem;
}

.budget-amount-value {
    font-weight: 600;
    color: #2c3e50;
}

.budget-category-progress {
    width: 100%;
    height: 6px;
    background-color: #f0ece3;
    border-radius: 3px;
    overflow: hidden;
}

.budget-category-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #c9a961, #d4b896);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Timeline Container */
.timeline-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.timeline-item.overdue {
    border-left-color: #e74c3c;
    background-color: #fee;
}

.timeline-item.complete {
    border-left-color: #2ecc71;
    opacity: 0.7;
}

.timeline-checkbox {
    margin-top: 0.2rem;
}

.timeline-checkbox input {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.timeline-content {
    flex: 1;
}

.timeline-task {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.timeline-task.complete {
    text-decoration: line-through;
    color: #95a5a6;
}

.timeline-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: #7f8c8d;
    flex-wrap: wrap;
}

.timeline-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.timeline-actions {
    display: flex;
    gap: 0.5rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    overflow-y: auto;
    padding: 2rem;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #ecf0f1;
}

.modal-header h2 {
    font-size: 1.5rem;
    color: #2c3e50;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #95a5a6;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #2c3e50;
}

.modal-body {
    padding: 1.5rem;
}

/* Form */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #c9a961;
    box-shadow: 0 0 0 2px rgba(201, 169, 97, 0.3);
}

.form-group textarea {
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #ecf0f1;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: #95a5a6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    #dashboard {
        margin: -1rem;
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
        padding: 1rem calc(50vw - 50%);
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

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

    #dashboard .page-header h1 {
        font-size: 2rem;
    }

    .countdown-display {
        gap: 1.5rem;
    }

    .countdown-number {
        font-size: 2.5rem;
    }

    .countdown-item {
        padding: 1rem;
        min-width: 80px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .toolbar {
        flex-direction: column;
    }

    .search-input {
        width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .table-container {
        font-size: 0.9rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
    }

    .modal {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .countdown-item {
        flex: 1;
        padding: 0.75rem;
        min-width: 70px;
    }

    .countdown-number {
        font-size: 2rem;
    }

    .countdown-label {
        font-size: 0.7rem;
        letter-spacing: 1px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    #dashboard .stat-value {
        font-size: 1.6rem;
    }
}

/* Day Tabs for Timeline */
.day-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 1.25rem;
}

.day-tab {
    flex: 1;
    padding: 0.85rem 1.25rem;
    background: white;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    color: #7a8a9b;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-family: 'DM Sans', sans-serif;
    position: relative;
}

.day-tab-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.day-tab-date {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.7;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.day-tab:hover {
    background: #faf8f3;
    border-color: #c9a961;
    color: #1a3a35;
}

.day-tab.active {
    background: linear-gradient(135deg, #1a3a35, #0f2621);
    color: #c9a961;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(15, 38, 33, 0.25);
}

.day-tab.active .day-tab-name {
    color: #c9a961;
}

.day-tab.active .day-tab-date {
    color: rgba(201, 169, 97, 0.7);
    opacity: 1;
}

/* Toolbar styles for budget sorting */
.card-header .toolbar {
    display: inline-block;
    margin-left: auto;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Header Actions for Export/Print Buttons */
.header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Icon-only utility buttons */
.btn.btn-icon {
    padding: 0.55rem;
    background: transparent;
    border: 1px solid #dce1e8;
    border-radius: 8px;
    color: #7a8a9b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn.btn-icon:hover {
    background: #f0ece3;
    border-color: #c9a961;
    color: #1a3a35;
    transform: none;
    box-shadow: none;
}

.btn.btn-icon:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.btn.btn-icon:disabled:hover {
    background: transparent;
    border-color: #dce1e8;
    color: #7a8a9b;
}

/* Gold primary button for timeline */
.btn-primary-gold {
    background: linear-gradient(135deg, #1a3a35, #0f2621);
    color: #c9a961;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-family: 'DM Sans', sans-serif;
    border-radius: 8px;
    padding: 0.6rem 1.25rem;
    font-size: 0.95rem;
    border: none;
    transition: all 0.25s ease;
}

.btn-primary-gold:hover {
    box-shadow: 0 4px 16px rgba(15, 38, 33, 0.3);
    transform: translateY(-1px);
}

/* Timeline page header title */
#timeline .page-header h1 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: #1a3a35;
    letter-spacing: 0.5px;
}

/* Timeline Card */
.timeline-card {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.timeline-card-header {
    padding: 1.25rem 1.5rem;
    background: #fdfcfa;
    border-bottom: 1px solid #ebe6dc;
}

.timeline-header-left {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.timeline-card-header h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a3a35;
}

/* Timeline Table Specific Styles */
.timeline-table {
    width: 100%;
}

.timeline-table thead {
    background: #fdfcfa;
}

.timeline-table th {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #8a96a3;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #ebe6dc;
}

.timeline-table th.checkbox-col,
.timeline-table td.checkbox-col {
    width: 44px;
    text-align: center;
}

.timeline-table th.time-col,
.timeline-table td.time-col {
    width: 105px;
}

.timeline-table th.event-col,
.timeline-table td.event-col {
    min-width: 280px;
}

.timeline-table th.responsible-col,
.timeline-table td.responsible-col {
    width: 150px;
}

.timeline-table th.staff-col,
.timeline-table td.staff-col {
    width: 150px;
}

.timeline-table th.actions-col,
.timeline-table td.actions-col {
    width: 130px;
}

/* Timeline row styling */
.timeline-table .tl-row {
    border-left: 3px solid var(--row-accent, transparent);
    animation: tl-row-in 0.35s ease both;
}

/* Pastel highlight background for color-tagged rows */
.timeline-table .tl-row.tl-highlighted {
    background-color: var(--row-accent) !important;
}

@keyframes tl-row-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.timeline-table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #f0ece3;
    font-size: 0.93rem;
    color: #3a4a5c;
    vertical-align: middle;
}

.timeline-table tbody tr:nth-child(even) {
    background-color: rgba(250, 248, 243, 0.5);
}

/* Time column styling */
.tl-time {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: #1a3a35;
    letter-spacing: 0.3px;
}

/* Custom checkbox */
.tl-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #1a3a35;
}

/* Actions row */
.actions-row {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.tl-row:hover .actions-row {
    opacity: 1;
}

.action-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 6px;
    transition: all 0.15s ease;
    line-height: 1;
    color: #8a96a3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-icon:hover {
    background: rgba(26, 58, 53, 0.08);
    color: #1a3a35;
}

.action-icon.action-icon-danger:hover {
    background: rgba(220, 53, 69, 0.08);
    color: #c0392b;
}

.action-icon.action-icon-link {
    color: #3498db;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.action-icon.action-icon-link:hover {
    background: rgba(52, 152, 219, 0.1);
    color: #2980b9;
}

.action-icon.action-icon-link .link-label {
    font-size: 0.75rem;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.action-icon.action-icon-assign {
    color: #aaa;
    border: 1px dashed #ccc;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-icon.action-icon-assign:hover {
    color: #3498db;
    border-color: #3498db;
    background: rgba(52, 152, 219, 0.05);
}

.setlist-col, .stageplot-col {
    text-align: center;
    white-space: nowrap;
}

/* Form section divider for modals */
.form-section-divider {
    border-top: 1px solid #e0e0e0;
    padding-top: 12px;
    margin-top: 4px;
    margin-bottom: 0;
}

.form-section-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@keyframes setlist-highlight-pulse {
    0%, 100% { outline-color: #3498db; }
    50% { outline-color: #85c1e9; }
}

/* Timeline toolbar */
.timeline-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 1rem;
}

.timeline-filters {
    display: flex;
    align-items: center;
    gap: 4px;
    background: white;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    padding: 3px;
}

.timeline-columns-wrapper {
    position: relative;
}

.btn-columns-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.45rem 0.9rem;
    background: white;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    color: #7a8a9b;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'DM Sans', sans-serif;
}

.btn-columns-toggle:hover {
    border-color: #c9a961;
    color: #1a3a35;
    background: #faf8f3;
}

.timeline-columns-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: white;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    padding: 0.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    z-index: 50;
    min-width: 150px;
}

.timeline-columns-dropdown.open {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.col-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #3a4a5c;
    cursor: pointer;
    user-select: none;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.col-toggle:hover {
    background: #faf8f3;
}

.col-toggle input[type="checkbox"] {
    cursor: pointer;
    accent-color: #1a3a35;
}

/* Column hide classes */
.timeline-table.hide-time .time-col { display: none; }
.timeline-table.hide-event .event-col { display: none; }
.timeline-table.hide-prod .prod-col { display: none; }
.timeline-table.hide-andi .andi-col { display: none; }
.timeline-table.hide-pedro .pedro-col { display: none; }
.timeline-table.hide-responsible .responsible-col { display: none; }
.timeline-table.hide-staff .staff-col { display: none; }
.timeline-table.hide-setlist .setlist-col { display: none; }
.timeline-table.hide-stageplot .stageplot-col { display: none; }

.filter-btn {
    padding: 0.4rem 1rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: #7a8a9b;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'DM Sans', sans-serif;
}

.filter-btn:hover {
    background: #f0ece3;
    color: #1a3a35;
}

.filter-btn.active {
    background: #1a3a35;
    color: #c9a961;
}

/* Prod & Andi checkbox columns */
.prod-col,
.andi-col,
.pedro-col {
    width: 50px;
    text-align: center;
}

.color-swatch-wrapper {
    position: relative;
    display: inline-block;
    vertical-align: middle;
}

.color-swatch-btn {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    border: 1.5px solid #d0d5dd;
    cursor: pointer;
    padding: 0;
    transition: all 0.15s ease;
}

.color-swatch-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.color-swatch-dropdown {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    padding: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 100;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
}

.color-swatch-dropdown.open {
    display: grid;
}

.color-swatch {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    border: 1.5px solid rgba(0,0,0,0.08);
    cursor: pointer;
    padding: 0;
    transition: all 0.15s ease;
}

.color-swatch:hover {
    transform: scale(1.2);
    border-color: #1a3a35;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

tr.task-completed td:not(.checkbox-col):not(.actions-col) {
    text-decoration: line-through;
    opacity: 0.5;
}

.timeline-date {
    font-size: 0.85rem;
    color: #b0a48c;
    font-weight: 400;
    font-family: 'DM Sans', sans-serif;
    letter-spacing: 0.3px;
}

/* Print Styles */
@media print {
    /* Hide elements not needed in print */
    .navbar,
    .no-print,
    .actions-col,
    .btn,
    .page-header button,
    .header-actions,
    .day-tabs,
    .stats-grid,
    .budget-search-bar,
    .page-search-bar,
    .vendor-filters,
    .timeline-toolbar {
        display: none !important;
    }

    /* Ensure proper page layout */
    body {
        background: white;
        color: black;
        font-size: 11pt;
    }

    .container {
        max-width: 100%;
        padding: 0;
        margin: 0;
    }

    /* Only show the active page when printing */
    .page {
        display: none !important;
    }

    .page.active {
        display: block !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
        margin-bottom: 1rem;
    }

    .card-header {
        background: #f8f9fa !important;
        border-bottom: 2px solid #333;
        padding: 10px;
    }

    .card-header h2 {
        font-size: 16pt;
        margin: 0;
    }

    .timeline-date {
        font-size: 12pt;
        color: #333;
    }

    .timeline-table .tl-row {
        animation: none !important;
        border-left: none !important;
    }

    .actions-row {
        opacity: 1 !important;
    }

    /* Table print styling */
    .data-table {
        width: 100%;
        border-collapse: collapse;
    }

    .data-table th,
    .data-table td {
        border: 1px solid #333;
        padding: 3px 6px;
        font-size: 9pt;
    }

    .timeline-table td {
        padding: 2px 6px;
        line-height: 1.3;
    }

    .data-table th {
        background: #e9ecef !important;
        font-weight: bold;
    }

    .data-table tbody tr:nth-child(even) {
        background: #f8f9fa !important;
    }

    /* Timeline table specific */
    .timeline-table th.checkbox-col,
    .timeline-table td.checkbox-col {
        width: 30px;
    }

    .timeline-table th.time-col,
    .timeline-table td.time-col {
        width: auto;
        font-weight: bold;
        white-space: nowrap;
    }

    /* Page breaks */
    .page-header {
        page-break-after: avoid;
    }

    table {
        page-break-inside: auto;
    }

    tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }

    thead {
        display: table-header-group;
    }

    /* Set Lists print */
    .setlist-accordion-item {
        box-shadow: none !important;
        border: 1px solid #ccc;
        animation: none !important;
        page-break-inside: avoid;
    }
    .setlist-accordion-body { display: block !important; }
    .setlist-header-actions { display: none !important; }
    .setlist-expand-controls { display: none !important; }

    /* Timeline day header - prominent in print */
    .timeline-card-header {
        padding: 0.5rem 0 !important;
        border-bottom: 2px solid #000 !important;
        margin-bottom: 0.25rem;
        background: none !important;
    }

    .timeline-card-header h2 {
        font-size: 16pt !important;
        font-weight: 700 !important;
        color: #000 !important;
    }

    .timeline-header-left {
        display: flex !important;
        gap: 0.5rem;
    }

    #timeline-date-subtitle {
        font-size: 12pt !important;
        color: #333 !important;
    }

    /* Print title */
    @page {
        margin: 0.5in;
    }
}

/* Inline Editing Styles */
tr.editing {
    background-color: rgba(250, 248, 243, 0.9) !important;
    border: 2px solid #c9a961;
}

.inline-edit-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #c9a961;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    background: white;
}

.inline-edit-input:focus {
    outline: none;
    border-color: #c9a961;
    box-shadow: 0 0 0 2px rgba(201, 169, 97, 0.3);
}

tr.editing td {
    padding: 0.5rem;
}

/* Single-click cell editing cursor */
.timeline-table tbody tr:not(.editing) td[data-field] {
    cursor: cell;
}
.timeline-table tbody tr:not(.editing):hover {
    background-color: rgba(250, 248, 243, 0.8);
}
.timeline-table tbody td[data-field]:hover {
    background-color: rgba(201, 169, 97, 0.08);
}

/* Active editing cell gold highlight */
.timeline-table td[data-field] .inline-edit-input {
    border-color: #c9a961;
}
.timeline-table td[data-field] .inline-edit-input:focus {
    border-color: #c9a961;
    box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.18);
}

/* Phantom row (inline add) */
.tl-phantom-row {
    opacity: 0.5;
    transition: opacity 0.2s ease;
}
.tl-phantom-row:hover,
.tl-phantom-row:focus-within {
    opacity: 1;
}
.tl-phantom-row.editing {
    opacity: 1;
    background-color: transparent !important;
    border: none;
}
.phantom-placeholder {
    color: #aaa;
    font-style: italic;
    font-size: 0.88rem;
    user-select: none;
}

/* Cell hover hints for Budget and Stage tables */
.budget-table tbody tr:not(.editing) td[data-field],
.stage-table tbody tr:not(.editing) td[data-field] {
    cursor: cell;
}
.budget-table tbody td[data-field]:hover,
.stage-table tbody td[data-field]:hover {
    background-color: rgba(201, 169, 97, 0.08);
}

/* Phantom row styles for Budget and Stage */
.budget-phantom-row, .stage-phantom-row {
    opacity: 0.5;
    transition: opacity 0.2s;
}
.budget-phantom-row:hover, .stage-phantom-row:hover,
.budget-phantom-row:focus-within, .stage-phantom-row:focus-within {
    opacity: 1;
}
.budget-phantom-row.editing, .stage-phantom-row.editing {
    opacity: 1;
    background-color: transparent !important;
    border: none;
}
.stage-phantom-row .drag-handle {
    cursor: default;
    color: transparent;
}

/* Skip entrance animation on edit-triggered re-renders */
.tl-row.no-anim {
    animation: none !important;
}

/* Keyboard hints bar */
.timeline-keyboard-hints {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    padding: 0.5rem 1rem;
    font-size: 0.78rem;
    color: #8a9bae;
    letter-spacing: 0.2px;
    flex-wrap: wrap;
}
.timeline-keyboard-hints span {
    white-space: nowrap;
}
.timeline-keyboard-hints kbd {
    display: inline-block;
    padding: 1px 5px;
    font-size: 0.72rem;
    font-family: inherit;
    background: #f0ece3;
    border: 1px solid #ddd6c6;
    border-radius: 3px;
    margin: 0 1px;
}

/* Budget Category Accordion */
.accordion-header {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.accordion-header:hover {
    background-color: #f8f9fa;
}

.accordion-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.accordion-content {
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

/* Budget Search Bar */
.budget-search-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.budget-search-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.budget-search-icon {
    position: absolute;
    left: 0.85rem;
    color: #95a5a6;
    pointer-events: none;
}

.budget-search-bar .search-input {
    padding-left: 2.5rem;
    padding-right: 2.25rem;
}

.budget-search-clear {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #95a5a6;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    line-height: 1;
    border-radius: 50%;
    transition: color 0.15s, background-color 0.15s;
}

.budget-search-clear:hover {
    color: #2c3e50;
    background-color: #ecf0f1;
}

.budget-search-count {
    font-size: 0.85rem;
    color: #8a8778;
    white-space: nowrap;
    background: rgba(201, 169, 97, 0.1);
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    border: 1px solid #f0ece3;
}

/* Shared Page Search Bar (Vendors, Staff) */
.page-search-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-search-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.page-search-icon {
    position: absolute;
    left: 0.85rem;
    color: #95a5a6;
    pointer-events: none;
}

.page-search-bar .search-input {
    padding-left: 2.5rem;
    padding-right: 2.25rem;
}

.page-search-clear {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #95a5a6;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    line-height: 1;
    border-radius: 50%;
    transition: color 0.15s, background-color 0.15s;
}

.page-search-clear:hover {
    color: #2c3e50;
    background-color: #ecf0f1;
}

.page-search-count {
    font-size: 0.85rem;
    color: #8a8778;
    white-space: nowrap;
    background: rgba(201, 169, 97, 0.1);
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    border: 1px solid #f0ece3;
}

/* Budget Category Sections */
.budget-category-section {
    margin-bottom: 1.5rem;
}

.category-section-header {
    cursor: pointer;
    user-select: none;
    padding: 1rem 1.5rem;
    background: #faf8f3;
    border-bottom: 2px solid #f0ece3;
    transition: all 0.2s ease;
    flex-wrap: wrap;
}

.category-section-header .budget-category-progress {
    flex-basis: 100%;
}

.category-section-header:hover {
    background: #f5f1ea;
}

.category-section-header h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    color: #1a3a35;
    font-size: 1.15rem;
    font-weight: 700;
}

.category-arrow {
    display: inline-block;
    transition: transform 0.2s ease;
    font-size: 1rem;
    color: #c9a961;
    font-weight: bold;
}

.category-count {
    color: #8a8778;
    font-size: 0.85rem;
    background: rgba(201, 169, 97, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    border: 1px solid #f0ece3;
}

.category-section-content {
    overflow: hidden;
    transition: all 0.3s ease-out;
}

/* Budget table specific styles */
.budget-table tbody tr:not(.editing):hover {
    background-color: rgba(250, 248, 243, 0.8);
}

/* Sortable header styling */
.sortable-th {
    cursor: pointer;
    transition: color 0.15s ease;
}

.sortable-th:hover {
    color: #c9a961 !important;
}

/* Budget action buttons - hover-reveal icons */
.budget-actions-cell {
    white-space: nowrap;
}

.budget-actions-cell .actions-row {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.budget-table tbody tr:hover .budget-actions-cell .actions-row {
    opacity: 1;
}

/* Over/Under budget indicators */
.over-budget {
    color: #e74c3c;
    font-weight: 600;
}

.under-budget {
    color: #27ae60;
    font-weight: 600;
}

/* Notes column */
.budget-table td[data-field="notes"] {
    max-width: 250px;
    white-space: normal;
    word-wrap: break-word;
}

.budget-table tr.editing td[data-field="notes"] {
    max-width: none;
    white-space: normal;
}

/* Print styles for budget */
@media print {
    .budget-category-section .category-section-content {
        display: block !important;
    }

    .category-arrow,
    .accordion-arrow {
        display: none !important;
    }

    .category-section-header {
        background: #f8f9fa !important;
        page-break-after: avoid;
    }
}

/* Stage Input Tables */
.stage-table tbody tr:not(.editing):hover {
    background-color: rgba(250, 248, 243, 0.8);
}

/* Stage table action buttons - hover-reveal icons */
.stage-actions-cell .actions-row {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.stage-table tbody tr:hover .stage-actions-cell .actions-row {
    opacity: 1;
}

/* Drag handle column */
.drag-col {
    width: 32px;
}

.drag-handle {
    width: 32px;
    text-align: center;
    cursor: grab;
    color: #c9a961;
    font-size: 1.1rem;
    user-select: none;
    padding: 4px !important;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.drag-handle:hover {
    color: #1a3a35;
    opacity: 1;
}

.stage-table tbody tr.dragging {
    opacity: 0.4;
    background: #e9ecef;
}

.stage-table tbody tr[draggable="true"] {
    transition: opacity 0.15s;
}

/* Channel # column */
.stage-table th:nth-child(2),
.stage-table td:nth-child(2) {
    width: 50px;
    text-align: center;
    font-weight: 600;
}

/* Subsnake */
.stage-table th:nth-child(3),
.stage-table td:nth-child(3) {
    width: 100px;
}

/* Instrument */
.stage-table th:nth-child(4),
.stage-table td:nth-child(4) {
    min-width: 200px;
}

/* Mics */
.stage-table th:nth-child(5),
.stage-table td:nth-child(5) {
    min-width: 150px;
}

/* Symbol */
.stage-table th:nth-child(8),
.stage-table td:nth-child(8) {
    width: 80px;
    text-align: center;
}

/* =============================================
   MOBILE OPTIMIZATION
   Media queries for responsive design
   ============================================= */

/* Tablet and smaller (768px and below) */
@media (max-width: 768px) {
    /* Scroll padding for sticky navbar */
    html {
        scroll-padding-top: 60px;
    }

    /* Container */
    .container {
        padding: 1rem;
    }

    #dashboard {
        margin: -1rem;
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
        padding: 1rem calc(50vw - 50%);
    }

    /* Page Header */
    .page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

    .header-actions {
        width: 100%;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .header-actions button {
        flex: 1;
        min-width: fit-content;
    }

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

    /* Stats Grid */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .stat-card h3 {
        font-size: 0.9rem;
    }

    .stat-card .stat-value {
        font-size: 1.5rem;
    }

    /* Tables - Horizontal Scroll */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -1rem;
        padding: 0 1rem;
    }

    .data-table {
        min-width: 600px; /* Force horizontal scroll for wide tables */
    }

    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }

    /* Buttons */
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .btn-group {
        flex-direction: column;
        width: 100%;
    }

    .btn-group .btn {
        width: 100%;
    }

    /* Forms */
    .form-row {
        flex-direction: column;
    }

    .form-group {
        width: 100%;
    }

    /* Modals */
    .modal-content {
        width: 95%;
        max-width: 95%;
        margin: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-header {
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .modal-header h2 {
        font-size: 1.3rem;
    }

    .form-actions {
        position: sticky;
        bottom: 0;
        background: #faf8f3;
        z-index: 10;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(201, 169, 97, 0.2);
    }

    .modal-lg {
        max-width: 95%;
    }

    /* Hide keyboard hints on mobile */
    .timeline-keyboard-hints {
        display: none !important;
    }

    /* Timeline Tabs */
    .day-tabs {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .day-tab {
        flex: 1;
        min-width: 100px;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    /* Budget Categories */
    .category-section {
        margin-bottom: 1rem;
    }

    .category-header {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .category-summary {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    /* Cards */
    .card {
        margin-bottom: 1rem;
    }

    .card-header h2 {
        font-size: 1.2rem;
    }

    /* Filter Bar */
    .filter-bar {
        flex-direction: column;
        gap: 0.75rem;
    }

    .search-box,
    .filter-group select {
        width: 100%;
    }

    /* Countdown */
    .countdown-timer {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .time-unit .time-value {
        font-size: 2rem;
    }

    .time-unit .time-label {
        font-size: 0.8rem;
    }
}

/* Mobile phones (480px and below) */
@media (max-width: 480px) {
    /* Container */
    .container {
        padding: 0.75rem;
    }

    /* Page Header */
    .page-header h1 {
        font-size: 1.5rem;
    }

    /* Stats Grid - Single Column on Small Phones */
    .stats-grid {
        grid-template-columns: 1fr;
    }

    /* Tables */
    .data-table th,
    .data-table td {
        padding: 0.6rem 0.4rem;
        font-size: 0.85rem;
    }

    /* Make action buttons stack vertically in tables */
    .data-table td .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.25rem;
        font-size: 0.8rem;
        padding: 0.5rem;
    }

    /* Timeline Tabs - Full Width */
    .day-tab {
        width: 100%;
        min-width: auto;
    }

    /* Buttons */
    .btn {
        padding: 0.7rem 0.9rem;
        font-size: 0.85rem;
        min-height: 44px; /* iOS recommended touch target */
    }

    /* Forms - Larger touch targets */
    input,
    select,
    textarea {
        font-size: 16px; /* Prevents iOS zoom on focus */
        padding: 0.75rem;
    }

    /* Modals - Full Screen */
    .modal-content,
    .modal-content.modal-lg {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }

    .modal-body {
        padding: 1rem;
        padding-bottom: 5rem;
    }

    /* Form Actions */
    .form-actions {
        flex-direction: column-reverse;
        gap: 0.5rem;
    }

    .form-actions .btn {
        width: 100%;
    }

    /* Budget Category Summary */
    .category-summary {
        grid-template-columns: 1fr;
        gap: 0.3rem;
    }

    .summary-item {
        font-size: 0.85rem;
    }

    /* Countdown - Stack Vertically */
    .countdown-timer {
        grid-template-columns: 1fr 1fr;
    }

    .time-unit {
        padding: 0.75rem;
    }

    .time-unit .time-value {
        font-size: 1.75rem;
    }

    .time-unit .time-label {
        font-size: 0.75rem;
    }

    /* Inline Editing */
    .inline-edit-input {
        font-size: 16px; /* Prevents iOS zoom */
        padding: 0.5rem;
    }

    /* Status Badges */
    .status-badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }

    /* Empty State */
    .empty-state {
        padding: 2rem 1rem;
        font-size: 0.9rem;
    }

    /* Print Button - Hide on Mobile */
    #print-timeline-btn {
        display: none;
    }
}

/* Landscape Phones */
@media (max-width: 768px) and (orientation: landscape) {
    .modal-content {
        max-height: 85vh;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .btn,
    .nav-link,
    .nav-group-toggle,
    .day-tab,
    input,
    select,
    button {
        min-height: 44px;
        min-width: 44px;
    }

    /* Remove hover states for touch devices - use JS .open class instead */
    .nav-link:hover {
        background-color: transparent;
    }

    .nav-group:hover .nav-group-toggle {
        background-color: transparent;
        color: rgba(212, 184, 150, 0.85);
    }

    .nav-group:hover .nav-dropdown {
        opacity: 0;
        visibility: hidden;
    }

    .nav-group.open .nav-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-group.open .nav-group-toggle {
        color: #c9a961;
        background-color: rgba(201, 169, 97, 0.08);
    }

    /* Add active/tap states instead */
    .btn:active,
    .nav-link:active,
    .nav-group-toggle:active,
    .day-tab:active {
        opacity: 0.7;
        transform: scale(0.98);
    }

    /* Larger double-click area for inline editing */
    .data-table tr {
        min-height: 44px;
    }
}

/* Prevent horizontal scroll on mobile */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    /* Ensure tables don't break layout */
    .table-container {
        width: 100%;
        overflow-x: auto;
    }

    /* Prevent long text from breaking layout */
    .data-table td {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}



/* =============================================
   MOBILE CARD VIEWS
   Replaces tables with readable cards on mobile
   ============================================= */

/* Hidden on desktop, shown on mobile */
.mobile-cards-container {
    display: none;
}

@media (max-width: 768px) {
    .mobile-cards-container {
        display: block;
        padding: 0.5rem;
    }

    /* Hide the timeline and stage input tables on mobile — cards replace them */
    .timeline-card .table-container,
    #input-lists .card .table-container {
        display: none;
    }
}

/* Mobile Card Base */
.mobile-card {
    background: #fff;
    border: 1px solid rgba(201, 169, 97, 0.2);
    border-left: 4px solid #c9a961;
    border-radius: 8px;
    padding: 0.875rem 1rem;
    margin-bottom: 0.625rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s ease;
}

.mobile-card:active {
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.mobile-card.completed {
    opacity: 0.65;
    border-left-color: #27ae60;
}

.mobile-card-row {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.375rem;
}

.mobile-card-row:last-child {
    margin-bottom: 0;
}

.mobile-card-time {
    background: linear-gradient(135deg, #0f2621, #1a3a35);
    color: #d4b896;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    white-space: nowrap;
    min-width: 70px;
    text-align: center;
    font-family: 'DM Sans', sans-serif;
}

.mobile-card-event {
    font-size: 1rem;
    font-weight: 600;
    color: #1a3a35;
    flex: 1;
    line-height: 1.3;
}

.mobile-card-checkbox {
    width: 22px;
    height: 22px;
    accent-color: #27ae60;
    cursor: pointer;
    flex-shrink: 0;
}

.mobile-card-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem 0.75rem;
    padding-top: 0.375rem;
    border-top: 1px solid rgba(201, 169, 97, 0.1);
}

.mobile-card-detail {
    font-size: 0.8rem;
    color: #555;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.mobile-card-detail strong {
    color: #1a3a35;
    font-weight: 600;
}

.mobile-card-badges {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.mobile-card-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.mobile-card-badge.prod {
    background: rgba(201, 169, 97, 0.15);
    color: #8a6d2b;
}

.mobile-card-badge.andi {
    background: rgba(93, 173, 226, 0.15);
    color: #2c5282;
}

/* Channel badge for input lists */
.mobile-card-channel {
    background: #c9a961;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mobile-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a3a35;
    flex: 1;
}

.mobile-card-subtitle {
    font-size: 0.8rem;
    color: #777;
}

/* Budget mobile card specifics */
.mobile-card-amount {
    font-size: 1rem;
    font-weight: 700;
    color: #1a3a35;
    font-family: 'DM Sans', sans-serif;
}

.mobile-card-amount.over {
    color: #c0392b;
}

.mobile-card-amount.under {
    color: #27ae60;
}

.mobile-card-progress {
    height: 4px;
    background: #eee;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.375rem;
}

.mobile-card-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #27ae60, #c9a961);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.mobile-card-progress-bar.over-budget {
    background: linear-gradient(90deg, #c9a961, #c0392b);
}

.mobile-card-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #999;
    font-style: italic;
}

/* Budget mobile cards within category sections */
.budget-mobile-cards {
    display: none;
}

@media (max-width: 768px) {
    .budget-mobile-cards {
        display: block;
        padding: 0.5rem;
    }

    .category-section-content .table-container {
        display: none;
    }
}

/* Highlight colors on mobile cards */
.mobile-card[data-highlight] {
    border-left-width: 4px;
}

/* =============================================
   HAMBURGER MENU FOR MOBILE
   ============================================= */

/* Hamburger button - hidden on desktop */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background: #c9a961;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Hamburger animation when active */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Navigation Styles */
@media (max-width: 768px) {
    /* Show hamburger on mobile */
    .hamburger {
        display: flex;
    }

    /* Navigation container adjustments */
    .nav-container {
        position: relative;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 0 1rem;
    }

    .nav-brand {
        padding: 1rem 0;
        font-size: 1.4rem;
        width: auto;
    }

    /* Hide nav menu by default on mobile */
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(180deg, #0f2621 0%, #1a3a35 100%);
        flex-direction: column;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, box-shadow 0.3s ease;
        box-shadow: none;
        z-index: 200;
    }

    /* Show nav menu when active */
    .nav-menu.active {
        max-height: 600px;
        box-shadow: 0 12px 24px rgba(0,0,0,0.4);
    }

    /* Nav links in mobile menu */
    .nav-link {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid rgba(201, 169, 97, 0.12);
        text-align: left;
        width: 100%;
    }

    .nav-menu > .nav-link.active::after {
        display: none;
    }

    .nav-link.active {
        border-left: 3px solid #c9a961;
        padding-left: calc(1.5rem - 3px);
    }

    /* Nav groups become accordion sections */
    .nav-group {
        flex-direction: column;
    }

    .nav-group-toggle {
        width: 100%;
        padding: 1rem 1.5rem;
        justify-content: flex-start;
        border-bottom: 1px solid rgba(201, 169, 97, 0.12);
    }

    .nav-group.has-active .nav-group-toggle::after {
        display: none;
    }

    .nav-group.has-active .nav-group-toggle {
        border-left: 3px solid rgba(201, 169, 97, 0.4);
        padding-left: calc(1.5rem - 3px);
    }

    /* Dropdown becomes accordion */
    .nav-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(0,0,0,0.15);
        border: none;
        border-radius: 0;
        box-shadow: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        min-width: 0;
    }

    .nav-group.open .nav-dropdown {
        max-height: 300px;
    }

    .nav-group.open .nav-chevron {
        transform: rotate(180deg);
    }

    /* Disable hover-open on mobile */
    .nav-group:hover .nav-dropdown {
        opacity: 1;
        visibility: visible;
        max-height: 0;
    }

    .nav-group:hover.open .nav-dropdown {
        max-height: 300px;
    }

    .nav-dropdown .nav-link {
        padding-left: 2.75rem;
        font-size: 0.875rem;
        border-bottom: 1px solid rgba(201, 169, 97, 0.08);
    }

    .nav-dropdown .nav-link.active {
        padding-left: calc(2.75rem - 3px);
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .nav-brand {
        font-size: 1.2rem;
        letter-spacing: 1px;
    }
}

/* Landscape phones */
@media (max-width: 768px) and (orientation: landscape) {
    .nav-menu.active {
        max-height: 400px;
    }
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Backdrop overlay when mobile menu is open */
body.menu-open::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 38, 33, 0.5);
    z-index: 99;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


/* =============================================
   STAFF PAGE
   ============================================= */

/* View toggle */
.staff-view-toggle {
    display: flex;
    background: #f0ece3;
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}

.staff-view-btn {
    padding: 6px 16px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #8a8778;
    cursor: pointer;
    transition: all 0.2s ease;
}

.staff-view-btn.active {
    background: #c9a961;
    color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Team section */
.staff-team-section {
    margin-bottom: 1.5rem;
}

.staff-team-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 2px solid #c9a961;
    cursor: pointer;
    user-select: none;
}

.staff-team-header:hover {
    opacity: 0.85;
}

.staff-team-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a3a35;
}

.staff-team-count {
    font-size: 0.85rem;
    color: #8a8778;
    font-weight: 400;
    margin-left: 0.5rem;
}

.staff-team-chevron {
    color: #8a8778;
    transition: transform 0.2s ease;
    font-size: 0.8rem;
}

.staff-team-section.collapsed .staff-team-chevron {
    transform: rotate(-90deg);
}

.staff-team-section.collapsed .staff-team-cards {
    display: none;
}

/* Card grid within a team */
.staff-team-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    padding-bottom: 0.5rem;
}

/* Individual staff card */
@keyframes staff-card-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.staff-card {
    position: relative;
    background: #faf8f3;
    border-radius: 10px;
    padding: 1rem 1.1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #f0ece3;
    border-left: 4px solid var(--team-color, #c9a961);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: staff-card-in 0.3s ease both;
}

.staff-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 169, 97, 0.15);
}

.staff-card.placeholder {
    opacity: 0.5;
    border-left-style: dashed;
}

.staff-card-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a3a35;
    line-height: 1.2;
}

.staff-card-role {
    font-size: 0.85rem;
    color: #c9a961;
    font-weight: 500;
    margin-top: 0.15rem;
}

.staff-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 0.4rem;
}

.staff-team-badge {
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(201, 169, 97, 0.12);
    color: #8a7a4a;
}

.staff-budget-badge {
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(106, 154, 106, 0.15);
    color: #4a7a4a;
}

.staff-budget-corner {
    position: absolute;
    top: 6px;
    right: 8px;
}

/* Schedule at a glance on cards */
.staff-card-schedule {
    display: flex;
    gap: 3px;
    margin-top: 0.6rem;
}

.staff-sched-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 0;
    padding: 4px 1px;
    border-radius: 4px;
    background: #f5f1e8;
    font-size: 0.6rem;
    line-height: 1.2;
}

.staff-sched-day.off {
    opacity: 0.3;
}

.staff-sched-day-label {
    font-weight: 600;
    color: #8a8778;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.staff-sched-day-time {
    color: #1a3a35;
    font-weight: 500;
    text-align: center;
    line-height: 1.3;
}

/* Empty states */
.staff-empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    background: #faf8f3;
    border: 1px solid #f0ece3;
    border-radius: 12px;
    color: #8a8778;
    font-size: 1rem;
}

/* === GANTT SCHEDULE VIEW === */

.staff-day-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 1.25rem;
    align-items: center;
}

.staff-day-tab {
    padding: 6px 18px;
    border: none;
    background: #f0ece3;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #8a8778;
    cursor: pointer;
    transition: all 0.2s ease;
}

.staff-day-tab.active {
    background: #c9a961;
    color: #fff;
}

.staff-day-count {
    font-size: 0.85rem;
    color: #8a8778;
    margin-left: 0.5rem;
}

/* Gantt chart */
.staff-gantt-team {
    margin-bottom: 1.25rem;
}

.staff-gantt-team-header {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a3a35;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid #e8e3d8;
    margin-bottom: 0.5rem;
}

.staff-gantt-time-axis {
    display: flex;
    margin-left: 140px;
    margin-right: 4px;
    margin-bottom: 4px;
    font-size: 0.7rem;
    color: #8a8778;
}

.staff-gantt-time-label {
    flex: 1;
    text-align: left;
}

.staff-gantt-row {
    display: flex;
    align-items: center;
    margin-bottom: 3px;
    height: 26px;
}

.staff-gantt-row:hover {
    background: rgba(201, 169, 97, 0.04);
    border-radius: 4px;
}

.staff-gantt-name {
    width: 140px;
    min-width: 140px;
    font-size: 0.8rem;
    color: #1a3a35;
    padding-right: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.staff-gantt-name:hover {
    color: #c9a961;
}

.staff-gantt-name .placeholder-name {
    color: #8a8778;
    font-style: italic;
}

.staff-gantt-name .multi-team-tag {
    font-size: 0.65rem;
    color: #8888cc;
    margin-left: 4px;
}

.staff-gantt-name .budget-tag {
    font-size: 0.65rem;
    color: #4a7a4a;
    margin-left: 2px;
}

.staff-gantt-bar-area {
    flex: 1;
    position: relative;
    height: 100%;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent calc(100% / 19 - 1px),
        #f0ece3 calc(100% / 19 - 1px),
        #f0ece3 calc(100% / 19)
    );
    border-radius: 4px;
}

.staff-gantt-bar {
    position: absolute;
    top: 3px;
    bottom: 3px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 500;
    color: #fff;
    padding: 0 6px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: filter 0.15s ease;
}

.staff-gantt-bar:hover {
    filter: brightness(1.1);
}

.staff-gantt-bar.placeholder-bar {
    opacity: 0.4;
}

/* Modal team tags input */
.staff-teams-input {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 6px 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    background: #fff;
    position: relative;
}

.staff-teams-input:focus-within {
    border-color: #c9a961;
    box-shadow: 0 0 0 2px rgba(201, 169, 97, 0.2);
}

.staff-teams-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.staff-team-tag {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #c9a961;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.staff-team-tag-remove {
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    opacity: 0.7;
}

.staff-team-tag-remove:hover {
    opacity: 1;
}

.staff-teams-input input {
    border: none;
    outline: none;
    flex: 1;
    min-width: 100px;
    font-size: 0.9rem;
    padding: 4px;
    background: transparent;
}

.staff-team-suggestions {
    width: 100%;
    background: #f9f7f2;
    border: 1px solid #e0dcd3;
    border-radius: 8px;
    margin-top: 4px;
    display: none;
    max-height: 180px;
    overflow-y: auto;
}

.staff-team-suggestion {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.85rem;
}

.staff-team-suggestion:hover {
    background: #f5f1e8;
}

.staff-team-suggestion-create {
    color: #8a7a4a;
    font-style: italic;
    border-top: 1px solid #eee;
}

/* Modal schedule grid */
.staff-schedule-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.staff-schedule-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.staff-schedule-day {
    width: 32px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #8a8778;
}

.staff-schedule-row input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

.staff-schedule-row input:focus {
    border-color: #c9a961;
    outline: none;
    box-shadow: 0 0 0 2px rgba(201, 169, 97, 0.2);
}

/* Checkbox label for placeholder toggle */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #555;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    accent-color: #c9a961;
}

/* Mobile */
@media (max-width: 768px) {
    .staff-team-cards {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .staff-view-toggle {
        width: 100%;
    }

    .staff-view-btn {
        flex: 1;
        text-align: center;
    }

    .staff-gantt-name {
        width: 90px;
        min-width: 90px;
        font-size: 0.7rem;
    }

    .staff-gantt-time-axis {
        margin-left: 90px;
        font-size: 0.6rem;
    }

    .staff-card-schedule {
        gap: 2px;
    }

    .staff-sched-day {
        font-size: 0.6rem;
        padding: 3px 1px;
    }
}

/* =============================================
   SET LISTS PAGE
   ============================================= */

/* Accordion layout */
.setlist-accordion {
    margin-top: 0.5rem;
}

.setlist-accordion-item {
    background: #faf8f3;
    border: 1px solid #f0ece3;
    border-left: 4px solid #c9a961;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    animation: staff-card-in 0.35s ease both;
    overflow: hidden;
}

.setlist-accordion-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}

.setlist-accordion-header:hover {
    background: #f5f2eb;
}

.setlist-toggle-icon {
    color: #c9a961;
    font-size: 0.75rem;
    flex-shrink: 0;
    width: 14px;
    text-align: center;
    transition: transform 0.2s ease;
}

.setlist-performer {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a3a35;
    white-space: nowrap;
}

.setlist-stage-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}
.setlist-stage-badge.stage-main { background: #d4edda; color: #155724; }
.setlist-stage-badge.stage-cocktail { background: #cce5ff; color: #004085; }

.setlist-song-count {
    font-size: 0.85rem;
    color: #888;
    margin-left: auto;
    white-space: nowrap;
    flex-shrink: 0;
}

.setlist-header-actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

.setlist-accordion-body {
    padding: 0 1.25rem 1rem 2.75rem;
}

.setlist-songs-list {
    margin-bottom: 0.5rem;
}

.setlist-song-row {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
    padding: 0.3rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid #f0ece3;
}
.setlist-song-row:last-child { border-bottom: none; }

.song-number { color: #999; min-width: 24px; }
.song-title { flex: 1; }
.song-duration { color: #888; font-size: 0.8rem; }
.song-notes { color: #aaa; font-size: 0.8rem; font-style: italic; }

.setlist-notes {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
    padding: 0.5rem;
    background: #f5f2eb;
    border-radius: 6px;
}

/* Stage Plot Upload */
#stage-plot-upload-area {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

#stage-plot-current {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.setlist-stage-plot-link {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e0d5;
}

.upload-status {
    font-size: 0.85rem;
    color: #666;
    margin-left: 0.5rem;
}

.upload-error {
    color: #c0392b;
}

.upload-success {
    color: #27ae60;
}

/* Stats row with expand controls */
.setlist-stats-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.setlist-stats-row .stats-grid {
    flex: 1;
}

.setlist-expand-controls {
    display: flex;
    gap: 0.4rem;
    padding-top: 0.5rem;
    flex-shrink: 0;
}

/* Accordion highlight animation (for timeline linking) */
.setlist-accordion-highlight {
    outline: 3px solid #3498db;
    outline-offset: 2px;
    animation: setlist-highlight-pulse 0.6s ease-in-out 2;
}

/* Song edit rows in modal */
.song-edit-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    align-items: center;
}
.song-edit-row input { flex: 1; }
.song-edit-row .song-duration-input { flex: 0 0 70px; }

/* Wider modal for set lists */
.modal-lg { max-width: 700px; }

@media (max-width: 768px) {
    .setlist-accordion-header {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }
    .setlist-performer { font-size: 1.1rem; }
    .setlist-song-count { margin-left: 0; }
    .setlist-header-actions {
        width: 100%;
    }
    .setlist-header-actions .btn { flex: 1; }
    .setlist-accordion-body { padding-left: 1rem; }
    .setlist-stats-row { flex-direction: column; }
    .song-edit-row {
        flex-wrap: wrap;
    }
    .song-edit-row .song-notes-input { flex-basis: 100%; }
}

/* Print: expand all accordion items */
@media print {
    .setlist-accordion-body { display: block !important; }
    .setlist-expand-controls { display: none; }
    .setlist-header-actions { display: none; }
}

/* =============================================
   VENDORS PAGE
   Card-based vendor view with issue tracking
   ============================================= */

/* Vendor Filter Buttons - Pill Group */
.vendor-filters {
    display: flex;
    gap: 4px;
    margin-bottom: 1.5rem;
    background: #faf8f3;
    border-radius: 10px;
    padding: 3px;
    border: 1px solid #f0ece3;
}

.vendor-filter-btn {
    flex: 1;
    padding: 0.55rem 1.25rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #7a8a9b;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'DM Sans', sans-serif;
}

.vendor-filter-btn:hover {
    background: #f0ece3;
    color: #1a3a35;
}

.vendor-filter-btn.active {
    background: #1a3a35;
    color: #c9a961;
    font-weight: 600;
}

.vendor-filter-btn[data-filter="issues"].active {
    background: #5a3a2a;
    color: #f0d8c0;
}

.vendor-filter-count {
    display: inline-block;
    background: rgba(0, 0, 0, 0.08);
    color: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.1rem 0.45rem;
    border-radius: 10px;
    margin-left: 0.25rem;
    min-width: 1.2rem;
    text-align: center;
}

.vendor-filter-btn.active .vendor-filter-count {
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
}

.vendor-filter-btn[data-filter="issues"] .vendor-filter-count {
    background: rgba(180, 90, 60, 0.15);
    color: #8b4532;
}

.vendor-filter-btn[data-filter="issues"].active .vendor-filter-count {
    background: rgba(255,255,255,0.2);
    color: #f0d8c0;
}

/* Vendor Category Section (collapsible groups) */
.vendor-category-section {
    margin-bottom: 1.5rem;
}

.vendor-category-header {
    cursor: pointer;
    user-select: none;
    padding: 1rem 1.5rem;
    background: #faf8f3;
    border: 1px solid #f0ece3;
    border-radius: 12px 12px 0 0;
    border-bottom: 2px solid #f0ece3;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.vendor-category-header:hover {
    background: #f5f1ea;
}

.vendor-category-header h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    color: #1a3a35;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    flex: 1;
}

.vendor-category-content {
    overflow: hidden;
    transition: all 0.3s ease-out;
}

/* Vendor Grid */
.vendor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem 0;
}

@keyframes vendor-card-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Vendor Card */
.vendor-card {
    background: #faf8f3;
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #f0ece3;
    border-left: 4px solid #8a8778;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-left-color 0.2s ease;
    animation: vendor-card-in 0.35s ease both;
}

.vendor-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 169, 97, 0.15);
    border-left-color: #c9a961;
}

.vendor-confirmed {
    border-left-color: #1a3a35;
}

.vendor-pending {
    border-left-color: #c9a961;
}

.vendor-has-issues {
    border-left-color: #8b4532;
}

.vendor-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
}

.vendor-card-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a3a35;
}

.vendor-card-description {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.vendor-card-category {
    display: inline-block;
    font-size: 0.78rem;
    color: #8a7234;
    background: rgba(201, 169, 97, 0.12);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.vendor-card-details {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.vendor-detail {
    font-size: 0.9rem;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.vendor-detail-icon {
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.vendor-detail a {
    color: #1a3a35;
    text-decoration: none;
}

.vendor-detail a:hover {
    color: #c9a961;
    text-decoration: underline;
}

.vendor-card-budget {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f0ece3;
}

/* Issue Pills */
.vendor-issues {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.vendor-issues-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #8b4532;
    margin-right: 0.15rem;
}

.vendor-issue-pill {
    display: inline-block;
    background: rgba(180, 90, 60, 0.1);
    color: #8b4532;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.55rem;
    border-radius: 10px;
    border: 1px solid rgba(180, 90, 60, 0.2);
}

/* Vendor Card Actions */
.vendor-card-actions {
    padding-top: 0.75rem;
    border-top: 1px solid #f0ece3;
    display: flex;
    gap: 0.5rem;
}

.vendor-card-actions .btn {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
}

/* Hover-reveal icon actions on vendor cards */
.vendor-card-actions .vendor-action-icons {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.vendor-card:hover .vendor-action-icons {
    opacity: 1;
}

.vendor-action-icons .action-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 6px;
    transition: all 0.15s ease;
    line-height: 1;
    color: #8a8778;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.vendor-action-icons .action-icon:hover {
    background: rgba(26, 58, 53, 0.08);
    color: #1a3a35;
}

.vendor-action-icons .action-icon.action-icon-danger:hover {
    background: rgba(139, 69, 50, 0.08);
    color: #8b4532;
}

.btn-fix-issues {
    background-color: #5a3a2a;
    color: #f0d8c0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-fix-issues:hover {
    background-color: #6b4535;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(90, 58, 42, 0.3);
}

/* Clickable dashboard status item */
.status-item-clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.status-item-clickable:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

#dashboard .status-item-clickable:hover {
    border-color: rgba(201, 169, 97, 0.5);
    background: rgba(42, 74, 69, 0.6);
}

/* Vendor page mobile */
@media (max-width: 768px) {
    .vendor-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .vendor-card {
        padding: 1.25rem;
    }

    .vendor-card-title {
        font-size: 1.1rem;
    }

    .vendor-card-budget {
        flex-direction: column;
        gap: 0.25rem;
    }

    .vendor-filters {
        flex-wrap: wrap;
    }

    .vendor-filter-btn {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }

    .vendor-category-header {
        padding: 0.85rem 1rem;
    }

    .vendor-card-actions .vendor-action-icons {
        opacity: 1;
    }
}

/* =============================================
   STAGE PLOTS PAGE
   Canvas-based stage plot builder
   ============================================= */

/* Header: Title + Stage Tabs + Print */
.sp-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
}

.sp-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a2332;
    margin: 0;
    white-space: nowrap;
}

.sp-stage-tabs {
    display: flex;
    background: #e8eaed;
    border-radius: 6px;
    padding: 3px;
    gap: 2px;
}

.sp-tab {
    padding: 0.4rem 1.25rem;
    border: none;
    background: transparent;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #5f6368;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.sp-tab:hover {
    color: #1a2332;
    background: rgba(255,255,255,0.5);
}

.sp-tab.active {
    background: #1a3a2a;
    color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.sp-icon-btn {
    margin-left: auto;
    padding: 6px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    color: #5f6368;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.sp-icon-btn:hover {
    border-color: #c9a961;
    color: #c9a961;
}

/* Single Toolbar Row */
.sp-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    background: #f5f6f7;
    border: 1px solid #e0e2e6;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    min-height: 38px;
}

.sp-toolbar-section {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.sp-toolbar-divider {
    width: 1px;
    height: 22px;
    background: #d0d3d8;
    flex-shrink: 0;
    margin: 0 2px;
}

.sp-toolbar-spacer {
    flex: 1;
    min-width: 4px;
}

/* Plot selector & name */
.sp-select {
    padding: 4px 24px 4px 8px;
    border: 1px solid #d0d3d8;
    border-radius: 5px;
    font-size: 0.8rem;
    background: #fff;
    color: #1a2332;
    max-width: 180px;
    height: 28px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%235f6368' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.sp-select:focus {
    outline: none;
    border-color: #c9a961;
    box-shadow: 0 0 0 2px rgba(201,169,97,0.15);
}

.sp-name-input {
    padding: 4px 8px;
    border: 1px solid #d0d3d8;
    border-radius: 5px;
    font-size: 0.8rem;
    color: #1a2332;
    width: 140px;
    height: 28px;
}

.sp-name-input:focus {
    outline: none;
    border-color: #c9a961;
    box-shadow: 0 0 0 2px rgba(201,169,97,0.15);
}

.sp-name-input:disabled {
    background: #f0f0f0;
    color: #999;
}

/* Tool buttons (icon-only) */
.sp-tool-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #d0d3d8;
    background: #fff;
    border-radius: 5px;
    cursor: pointer;
    color: #5f6368;
    transition: all 0.12s ease;
    flex-shrink: 0;
}

.sp-tool-btn:hover:not(:disabled) {
    border-color: #b0b3b8;
    color: #1a2332;
    background: #ecedef;
}

.sp-tool-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.sp-tool-btn.active {
    background: #e8d5a3;
    border-color: #c9a961;
    color: #6b5620;
}

.sp-tool-btn.sp-primary {
    background: #c9a961;
    border-color: #b8963d;
    color: #fff;
}

.sp-tool-btn.sp-primary:hover {
    background: #b8963d;
    border-color: #a6852e;
    color: #fff;
}

.sp-tool-btn.sp-danger:hover {
    border-color: #e74c3c;
    color: #e74c3c;
    background: #fdf0ef;
}

/* Draw/Move toggle group */
.sp-toggle-group {
    display: flex;
    background: #e8eaed;
    border-radius: 5px;
    padding: 2px;
    gap: 1px;
}

.sp-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border: none;
    background: transparent;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #5f6368;
    cursor: pointer;
    transition: all 0.12s ease;
    white-space: nowrap;
    height: 24px;
}

.sp-toggle:hover {
    color: #1a2332;
}

.sp-toggle.active {
    background: #fff;
    color: #1a2332;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Inline properties */
.sp-props {
    transition: opacity 0.15s ease;
}

.sp-props.hidden {
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
    width: 0;
    overflow: hidden;
    gap: 0;
    margin: 0;
    padding: 0;
}

.sp-color-input {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 2px solid #d0d3d8;
    border-radius: 4px;
    cursor: pointer;
    background: none;
}

.sp-color-input::-webkit-color-swatch-wrapper {
    padding: 1px;
}

.sp-color-input::-webkit-color-swatch {
    border: none;
    border-radius: 2px;
}

.sp-fill-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.sp-checkbox {
    margin: 0;
    cursor: pointer;
}

.sp-mini-select {
    padding: 2px 4px;
    border: 1px solid #d0d3d8;
    border-radius: 4px;
    font-size: 0.75rem;
    background: #fff;
    height: 24px;
}

/* Zoom */
.sp-zoom-level {
    font-size: 0.75rem;
    font-weight: 600;
    color: #5f6368;
    min-width: 38px;
    text-align: center;
}

/* Save status */
.sp-save-status {
    font-size: 0.75rem;
    color: #5f6368;
    white-space: nowrap;
    min-width: 50px;
    text-align: right;
}

.save-status-saved { color: #38a169; }
.save-status-saving { color: #d69e2e; }
.save-status-error { color: #e53e3e; font-weight: 600; }
.save-status-draft { color: #718096; font-style: italic; }

/* ========================================
   Venue Map Page
   ======================================== */

/* Toolbar */
.vm-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.vm-tools {
    display: flex;
    gap: 4px;
}

.vm-tool-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a5568;
    transition: all 0.15s;
}

.vm-tool-btn:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
}

.vm-tool-btn.active {
    background: #1a3a35;
    border-color: #1a3a35;
    color: #c9a961;
}

.vm-separator {
    width: 1px;
    height: 28px;
    background: #e2e8f0;
    flex-shrink: 0;
}

/* Color swatches */
.vm-colors {
    display: flex;
    gap: 4px;
}

.vm-color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.15s;
    padding: 0;
}

.vm-color-swatch:hover {
    transform: scale(1.15);
}

.vm-color-swatch.active {
    border-color: #1a3a35;
    box-shadow: 0 0 0 2px rgba(201, 169, 97, 0.4);
}

/* Stroke width */
.vm-stroke-control {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #4a5568;
}

.vm-stroke-control select {
    padding: 4px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.85rem;
    background: #fff;
}

/* Fill toggle */
.vm-fill-control {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: #4a5568;
}

.vm-fill-control label {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

/* Action buttons */
.vm-action-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 0.8rem;
    color: #4a5568;
    transition: all 0.15s;
}

.vm-action-btn:hover {
    background: #fee2e2;
    border-color: #feb2b2;
    color: #c53030;
}

/* Zoom controls */
.vm-zoom-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.vm-zoom-level {
    font-size: 0.85rem;
    color: #4a5568;
    min-width: 40px;
    text-align: center;
    font-weight: 500;
}

/* Layout */
.vm-layout {
    display: flex;
    gap: 0.75rem;
    min-height: 600px;
}

/* Layers Panel */
.vm-layers-panel {
    width: 220px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.vm-layers-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.vm-layers-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

.vm-layers-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.vm-layer-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 0.85rem;
    color: #4a5568;
    border: 2px solid transparent;
}

.vm-layer-item:hover {
    background: #f7fafc;
}

.vm-layer-item.active {
    background: #f0f9f7;
    border-color: #1a3a35;
    color: #1a3a35;
    font-weight: 500;
}

.vm-layer-color {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    flex-shrink: 0;
}

.vm-layer-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vm-layer-name-input {
    flex: 1;
    min-width: 0;
    padding: 2px 4px;
    border: 1px solid #c9a961;
    border-radius: 3px;
    font-size: 0.85rem;
    outline: none;
}

.vm-layer-visibility {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    font-size: 1rem;
    opacity: 0.7;
    flex-shrink: 0;
}

.vm-layer-visibility:hover {
    opacity: 1;
}

.vm-layer-delete {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    font-size: 0.85rem;
    opacity: 0;
    color: #e53e3e;
    flex-shrink: 0;
    transition: opacity 0.15s;
}

.vm-layer-item:hover .vm-layer-delete {
    opacity: 0.7;
}

.vm-layer-delete:hover {
    opacity: 1 !important;
}

.vm-layer-item[draggable="true"] {
    cursor: grab;
}
.vm-layer-item.vm-layer-dragging {
    opacity: 0.4;
}
.vm-layer-item.vm-layer-drop-above {
    border-top: 2px solid #c9a961;
}
.vm-layer-item.vm-layer-drop-below {
    border-bottom: 2px solid #c9a961;
}

/* Canvas Area */
.vm-canvas-area {
    flex: 1;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    overflow: auto;
    min-width: 0;
}

.vm-canvas-wrapper {
    width: 100%;
    height: 100%;
    min-height: 600px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0;
}

.vm-canvas-wrapper canvas,
.vm-canvas-wrapper .canvas-container {
    border-radius: 8px;
}

/* Context menu for z-order */
.vm-context-menu {
    position: fixed;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 4px 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.vm-context-menu button {
    display: block;
    width: 100%;
    padding: 8px 16px;
    background: none;
    border: none;
    color: #e2e8f0;
    font-size: 0.85rem;
    text-align: left;
    cursor: pointer;
}
.vm-context-menu button:hover {
    background: #334155;
}

.context-menu-divider {
    border: none;
    border-top: 1px solid #334155;
    margin: 4px 0;
}

/* Save status */
.vm-save-status {
    font-size: 0.85rem;
    color: #718096;
    font-weight: 400;
}

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

    .vm-layers-panel {
        width: 100%;
        max-height: 120px;
        overflow-y: auto;
    }

    .vm-toolbar {
        gap: 0.375rem;
        flex-wrap: wrap;
        padding: 0.5rem;
    }

    .vm-tools {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .vm-tools button {
        width: 32px;
        height: 32px;
        padding: 4px;
    }

    .vm-color-swatches {
        gap: 0.25rem;
    }

    .vm-color-swatch {
        width: 24px;
        height: 24px;
    }

    .vm-canvas-wrapper {
        min-height: 250px;
    }

    .vm-zoom-controls {
        gap: 0.25rem;
    }

    .vm-zoom-controls button {
        min-width: 32px;
        height: 32px;
        padding: 4px;
    }
}

/* ========================================
   Stage Plots Page
   ======================================== */

/* Main Container */
.stage-plot-container {
    display: flex;
    gap: 1.5rem;
    height: calc(100vh - 400px);
    min-height: 600px;
}

/* Element Library Sidebar */
.element-library {
    width: 220px;
    background: white;
    border-radius: 8px;
    padding: 1.5rem 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow-y: auto;
    flex-shrink: 0;
}

.element-library h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    color: #2c3e50;
    border-bottom: 2px solid #c9a961;
    padding-bottom: 0.5rem;
}

.library-section {
    margin-bottom: 1.5rem;
}

.library-section h4 {
    font-size: 0.85rem;
    color: #7f8c8d;
    text-transform: uppercase;
    margin: 0 0 0.5rem 0;
    letter-spacing: 0.5px;
}

.element-btn {
    display: block;
    width: 100%;
    padding: 0.6rem 0.8rem;
    margin-bottom: 0.4rem;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.element-btn:hover {
    background: #e8f4f8;
    border-color: #3498db;
    transform: translateX(3px);
}

.element-btn:active {
    background: #d4e9f3;
}

/* Canvas Area */
.canvas-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.canvas-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    padding: 2rem;
    overflow: hidden; /* Changed from auto to prevent scrollbars */
    min-height: 500px; /* Ensure minimum height */
}

#stage-canvas {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    background: white;
}

.canvas-info {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#canvas-dimensions {
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.canvas-help {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin: 0;
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .plot-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .controls-left,
    .controls-center,
    .controls-right {
        flex-direction: column;
        width: 100%;
        margin-left: 0;
    }

    .plot-selector {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .plot-dropdown {
        width: 100%;
    }

    .save-status {
        text-align: center;
    }

    .stage-plot-container {
        flex-direction: column;
        height: auto;
        min-height: 500px;
    }

    .element-library {
        width: 100%;
        max-height: 0;
        padding: 0 1rem;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }

    .element-library.mobile-expanded {
        max-height: 250px;
        padding: 1rem;
        overflow-y: auto;
    }

    .element-library h3 {
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .element-library h3::after {
        content: 'Tap to show elements';
        font-size: 0.75rem;
        font-weight: 400;
        color: #999;
    }

    .element-library.mobile-expanded h3::after {
        content: 'Tap to hide';
    }

    .library-section {
        margin-bottom: 1rem;
    }

    .element-btn {
        padding: 0.5rem;
        font-size: 0.85rem;
    }

    .canvas-wrapper {
        padding: 0.5rem;
        min-height: 300px;
    }

    .canvas-info {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    /* Simplify controls layout */
    .controls-center .btn-group {
        flex-direction: row;
        flex-wrap: wrap;
    }
}


/* Print Styles for Stage Plots */
@media print {
    .element-library,
    .plot-controls,
    .properties-panel,
    .canvas-info,
    .page-header {
        display: none !important;
    }

    .stage-plot-container {
        display: block;
    }

    .canvas-wrapper {
        padding: 0;
        background: white;
    }

    #stage-canvas {
        box-shadow: none;
        max-width: 100%;
    }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 8px;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.21, 1.02, 0.73, 1), opacity 0.35s ease;
    max-width: 380px;
    line-height: 1.4;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.hiding {
    transform: translateX(120%);
    opacity: 0;
}

.toast-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.toast-success {
    background: #1a6b3c;
}

.toast-error {
    background: #b33234;
}

.toast-info {
    background: #2a5a8a;
}

.toast-warning {
    background: #8a6d2a;
}

@media (max-width: 480px) {
    .toast-container {
        bottom: 16px;
        right: 16px;
        left: 16px;
    }

    .toast {
        max-width: 100%;
    }
}

/* Sortable table headers */
.sortable-th {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.sortable-th:hover {
    background-color: rgba(0, 0, 0, 0.08);
}

/* Confirmed checkbox */
.confirmed-cell {
    text-align: center;
}

.confirmed-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #4CAF50;
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #4CAF50;
}

/* ==========================================
   PACKING LIST
   ========================================== */

/* Filter selects inline with search */
.filter-select {
    padding: 8px 12px;
    border: 1px solid #e2e0d8;
    border-radius: 8px;
    background: #fff;
    font-size: 0.85rem;
    color: #2d2d2d;
    cursor: pointer;
    min-width: 140px;
}

.filter-select:focus {
    outline: none;
    border-color: #c9a961;
}

/* Progress bar */
.packing-progress-bar-container {
    margin-bottom: 20px;
}

.packing-progress-bar {
    display: flex;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    background: #e8e6df;
}

.packing-progress-segment {
    transition: width 0.4s ease;
    min-width: 0;
}

.segment-to-pack { background: #9ca3af; }
.segment-packed { background: #3b82f6; }
.segment-loaded { background: #f59e0b; }
.segment-at-venue { background: #22c55e; }

.packing-progress-legend {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    font-size: 0.78rem;
    color: #666;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.dot-to-pack { background: #9ca3af; }
.dot-packed { background: #3b82f6; }
.dot-loaded { background: #f59e0b; }
.dot-at-venue { background: #22c55e; }

/* Category accordion */
.packing-category-section {
    background: #fff;
    border: 1px solid #e8e6df;
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
}

.packing-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    cursor: pointer;
    user-select: none;
    background: #faf8f3;
    border-bottom: 1px solid #e8e6df;
    transition: background 0.15s;
}

.packing-category-header:hover {
    background: #f5f2eb;
}

.packing-category-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.packing-chevron {
    width: 14px;
    height: 14px;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.packing-chevron.collapsed {
    transform: rotate(-90deg);
}

.packing-category-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.packing-category-count {
    font-size: 0.8rem;
    color: #888;
    background: #eee;
    padding: 2px 8px;
    border-radius: 10px;
}

.packing-category-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.packing-mini-progress {
    width: 60px;
    height: 6px;
    border-radius: 3px;
    background: #e8e6df;
    overflow: hidden;
}

.packing-mini-progress-fill {
    height: 100%;
    background: #3b82f6;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.packing-mini-progress-fill.complete {
    background: #22c55e;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}

.btn-advance-all {
    background: #e8e6df;
    color: #555;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.btn-advance-all:hover {
    background: #c9a961;
    color: #fff;
}

/* Accordion body */
.packing-category-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.packing-category-body.open {
    max-height: 2000px;
}

/* Item rows */
.packing-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    border-bottom: 1px solid #f0ede6;
    transition: background 0.1s;
}

.packing-item-row:last-child {
    border-bottom: none;
}

.packing-item-row:hover {
    background: #faf8f3;
}

.packing-item-row.done {
    opacity: 0.65;
}

/* Status badges */
.packing-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    border: none;
    cursor: default;
    white-space: nowrap;
    letter-spacing: 0.3px;
    min-width: 85px;
    justify-content: center;
}

.packing-status-badge.advanceable {
    cursor: pointer;
    transition: filter 0.15s, transform 0.1s;
}

.packing-status-badge.advanceable:hover {
    filter: brightness(0.9);
    transform: scale(1.05);
}

.packing-status-badge.advanceable:active {
    transform: scale(0.97);
}

.status-to-pack {
    background: #f3f4f6;
    color: #6b7280;
}

.status-packed {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-loaded {
    background: #fef3c7;
    color: #b45309;
}

.status-at-venue {
    background: #dcfce7;
    color: #15803d;
}

.packing-item-info {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.packing-item-name {
    font-size: 0.9rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.packing-item-qty {
    font-size: 0.78rem;
    color: #888;
    background: #f0ede6;
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 500;
}

.packing-item-assignee {
    font-size: 0.78rem;
    color: #7c6d42;
    background: rgba(201, 169, 97, 0.15);
    padding: 2px 8px;
    border-radius: 8px;
    white-space: nowrap;
}

.packing-item-notes {
    font-size: 0.85rem;
    cursor: help;
    flex-shrink: 0;
}

.packing-item-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.btn-icon-sm {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #888;
    transition: background 0.15s, color 0.15s;
}

.btn-icon-sm:hover {
    background: #eee;
    color: #333;
}

.btn-icon-sm.delete:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .packing-item-row {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 14px;
    }

    .packing-item-info {
        order: -1;
        flex-basis: calc(100% - 100px);
    }

    .packing-status-badge {
        min-width: 75px;
        font-size: 0.7rem;
        padding: 3px 8px;
    }

    .packing-item-assignee {
        font-size: 0.72rem;
    }

    .packing-item-actions {
        margin-left: auto;
    }

    .filter-select {
        min-width: 110px;
        font-size: 0.8rem;
    }

    .packing-progress-legend {
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* ==================== PRINTED MATERIALS PAGE ==================== */

.print-materials-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.print-materials-table thead {
    background: #f5f3ee;
    border-bottom: 2px solid #e8e6df;
}

.print-materials-table th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b6b6b;
    white-space: nowrap;
    user-select: none;
}

.print-materials-table th.print-sortable {
    cursor: pointer;
}

.print-materials-table th.print-sortable:hover {
    color: #1a3a35;
}

.print-materials-table .sort-indicator {
    font-size: 0.7rem;
}

.print-materials-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.print-materials-table tbody tr {
    cursor: pointer;
    transition: background 0.15s;
}

.print-materials-table tbody tr:hover {
    background: #f9f7f2;
}

.print-name-cell {
    font-weight: 500;
    color: #1a3a35;
    max-width: 220px;
}

.print-notes-cell {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #888;
    font-size: 0.85rem;
}

.print-link-cell {
    text-align: center;
    width: 50px;
}

.print-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    color: #1a3a35;
    background: #f0ede6;
    border: 1px solid #e0ddd6;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
}

.print-link-btn:hover {
    background: #c9a961;
    color: #fff;
    border-color: #c9a961;
}

.print-no-link {
    color: #ccc;
    font-size: 0.8rem;
}

.print-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
}

.print-status-pending {
    background: #f0ede6;
    color: #888;
}

.print-status-ordered {
    background: #e3edf7;
    color: #2a6cb6;
}

.print-status-received {
    background: #fdf6e3;
    color: #b8941f;
}

.print-status-done {
    background: #e6f5ec;
    color: #2a8a4b;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

#printed-materials .form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

#printed-materials .form-actions .form-actions-right,
#print-modal .form-actions .form-actions-right {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

#print-modal .form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

@media (max-width: 768px) {
    .print-materials-table {
        font-size: 0.82rem;
    }
    .print-materials-table th,
    .print-materials-table td {
        padding: 8px 8px;
    }
    .print-name-cell {
        max-width: 140px;
    }
    .print-notes-cell {
        max-width: 100px;
    }
}

/* ==================== MENU PAGE ==================== */

/* View bar */
.menu-view-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.menu-view-toggle {
    display: flex;
    border: 1px solid #e8e6df;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.menu-view-btn {
    padding: 7px 16px;
    font-size: 0.82rem;
    font-weight: 500;
    border: none;
    background: #fff;
    color: #666;
    cursor: pointer;
    transition: all 0.15s;
}

.menu-view-btn + .menu-view-btn {
    border-left: 1px solid #e8e6df;
}

.menu-view-btn.active {
    background: #1a3a35;
    color: #c9a961;
}

.menu-view-btn:hover:not(.active) {
    background: #f5f2eb;
}

/* Category tabs */
.menu-category-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex: 1;
}

.menu-category-tabs::-webkit-scrollbar {
    display: none;
}

.menu-cat-tab {
    padding: 7px 14px;
    font-size: 0.82rem;
    font-weight: 500;
    border: none;
    background: transparent;
    color: #888;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
    border-radius: 6px 6px 0 0;
}

.menu-cat-tab:hover {
    color: #555;
    background: rgba(201, 169, 97, 0.06);
}

.menu-cat-tab.active {
    color: #c9a961;
    border-bottom-color: #c9a961;
    background: rgba(201, 169, 97, 0.08);
}

/* Dietary pills */
.dietary-pill {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    line-height: 1.5;
}

.pill-v { background: #dcfce7; color: #15803d; }
.pill-vg { background: #d1fae5; color: #065f46; }
.pill-gf { background: #fef3c7; color: #92400e; }
.pill-df { background: #dbeafe; color: #1e40af; }
.pill-nf { background: #fee2e2; color: #991b1b; }

.dietary-pill-sm {
    display: inline-block;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 0px 4px;
    border-radius: 3px;
    letter-spacing: 0.3px;
    vertical-align: middle;
}

.dietary-pill-sm.pill-v { background: #dcfce7; color: #15803d; }
.dietary-pill-sm.pill-vg { background: #d1fae5; color: #065f46; }
.dietary-pill-sm.pill-gf { background: #fef3c7; color: #92400e; }
.dietary-pill-sm.pill-df { background: #dbeafe; color: #1e40af; }
.dietary-pill-sm.pill-nf { background: #fee2e2; color: #991b1b; }

/* Dietary summary bar */
.menu-dietary-summary {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.dietary-summary-pill {
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
}

.dietary-summary-pill.pill-v { background: #dcfce7; color: #15803d; }
.dietary-summary-pill.pill-vg { background: #d1fae5; color: #065f46; }
.dietary-summary-pill.pill-gf { background: #fef3c7; color: #92400e; }
.dietary-summary-pill.pill-df { background: #dbeafe; color: #1e40af; }
.dietary-summary-pill.pill-nf { background: #fee2e2; color: #991b1b; }

/* Dietary checkboxes in modal */
.menu-dietary-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px 0;
}

.menu-dietary-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #555;
}

.menu-dietary-check input[type="checkbox"] {
    margin: 0;
}

/* Menu category sections */
.menu-category-section {
    background: #fff;
    border: 1px solid #e8e6df;
    border-radius: 14px;
    margin-bottom: 14px;
    overflow: hidden;
    border-left: 4px solid #888;
}

.menu-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    cursor: pointer;
    user-select: none;
    background: #faf8f3;
    border-bottom: 1px solid #e8e6df;
    transition: background 0.15s;
}

.menu-category-header:hover {
    background: #f5f2eb;
}

.menu-category-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-category-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.menu-category-count {
    font-size: 0.78rem;
    color: #888;
}

.menu-category-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.menu-category-body.open {
    max-height: 5000px;
}

/* Full view */
.menu-full-view {
    border-radius: 14px;
}

.menu-category-heading {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 16px 18px 8px;
    border-bottom: 1px solid #e8e6df;
}

.menu-category-heading .menu-category-name {
    font-size: 1.05rem;
    font-weight: 700;
}

.menu-category-heading .menu-category-count {
    font-size: 0.78rem;
    color: #999;
}

/* Subcategory headings */
.menu-subcategory-heading {
    font-size: 0.85rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 18px 4px;
    border-top: 1px solid #f0eee8;
}

/* Menu item cards */
.menu-item-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 12px 18px;
    border-bottom: 1px solid #f0eee8;
    transition: background 0.15s;
}

.menu-item-card:last-child {
    border-bottom: none;
}

.menu-item-card:hover {
    background: #faf8f3;
}

.menu-item-main {
    flex: 1;
    min-width: 0;
}

.menu-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.menu-item-name {
    font-weight: 600;
    font-size: 0.92rem;
    color: #2d2d2d;
}

.menu-item-pills {
    display: inline-flex;
    gap: 3px;
}

.menu-item-desc {
    font-size: 0.82rem;
    color: #888;
    margin-top: 2px;
    font-style: italic;
}

.menu-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.menu-serving-badge {
    font-size: 0.72rem;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 4px;
    background: #f0eee8;
    color: #666;
    text-transform: capitalize;
}

.menu-status-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

.menu-status-confirmed {
    background: #d1fae5;
    color: #065f46;
}

.menu-status-pending {
    background: #fef3c7;
    color: #92400e;
}

.menu-qty-badge {
    font-size: 0.72rem;
    color: #999;
}

.menu-item-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    margin-left: 12px;
    padding-top: 2px;
}

/* Presentation / Print view */
.menu-print-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    z-index: 200;
    overflow-y: auto;
}

.menu-print-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 40px;
    position: relative;
}

.menu-print-close {
    position: fixed;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    z-index: 210;
    line-height: 1;
    padding: 8px;
}

.menu-print-close:hover {
    color: #333;
}

.menu-print-header {
    text-align: center;
    margin-bottom: 48px;
}

.menu-print-header h1 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 2.4rem;
    font-weight: 600;
    color: #1a3a35;
    margin-bottom: 4px;
    letter-spacing: 1px;
}

.menu-print-date {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.1rem;
    color: #888;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.menu-print-divider {
    width: 60px;
    height: 2px;
    background: #c9a961;
    margin: 16px auto;
}

.menu-print-header h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 500;
    color: #c9a961;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.menu-print-category {
    margin-bottom: 36px;
}

.menu-print-cat-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: #1a3a35;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.menu-print-rule {
    width: 40px;
    height: 1px;
    background: #c9a961;
    margin: 8px auto 20px;
}

.menu-print-subcat {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.05rem;
    font-style: italic;
    color: #888;
    text-align: center;
    margin: 20px 0 10px;
}

.menu-print-item {
    text-align: center;
    margin-bottom: 14px;
}

.menu-print-item-name {
    font-size: 1rem;
    font-weight: 600;
    color: #2d2d2d;
}

.menu-print-item-desc {
    font-size: 0.9rem;
    font-style: italic;
    color: #888;
    margin-top: 2px;
}

/* Print media query */
@media print {
    .navbar, .page-header, .page-search-bar, .menu-view-bar, .stats-grid, .menu-dietary-summary, #menu-container, .menu-print-close, .toast-container {
        display: none !important;
    }

    .menu-print-overlay {
        position: static !important;
        display: block !important;
    }

    .menu-print-content {
        padding: 20px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .menu-view-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .menu-category-tabs {
        padding-bottom: 4px;
    }

    .menu-item-card {
        padding: 10px 14px;
    }

    .menu-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .menu-dietary-checkboxes {
        flex-direction: column;
        gap: 8px;
    }

    .menu-print-content {
        padding: 30px 20px;
    }

    .menu-print-header h1 {
        font-size: 1.8rem;
    }
}
