/* First Light Co. Brand System */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

:root {
    /* Primary gold/amber */
    --gold: #E8A832;
    --gold-dark: #B8841E;
    --gold-light: #FDF4E0;

    /* Charcoal */
    --charcoal: #2C2A26;
    --charcoal-mid: #3D3A34;

    /* Warm whites */
    --page-bg: #FDFBF7;
    --surface: #F5F3EE;
    --card-bg: #FFFFFF;

    /* Text */
    --text-primary: #2C2A26;
    --text-secondary: #7A7670;
    --text-tertiary: #A8A29E;

    /* Borders */
    --border: #E8E4DD;
    --border-light: #F0EDE8;

    /* Status: Green */
    --green-bg: #E7F5E8;
    --green-text: #2D6930;
    /* Status: Amber */
    --amber-bg: #FDF4E0;
    --amber-text: #8B6914;
    /* Status: Red */
    --red-bg: #FDE8E8;
    --red-text: #9B2C2C;
    /* Status: Blue */
    --blue-bg: #E8F0FD;
    --blue-text: #1E4A8B;
    /* Status: Gray */
    --gray-bg: #F0EDE8;
    --gray-text: #7A7670;

    --font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 14px;
    --shadow: 0 1px 3px rgba(44,42,38,0.06), 0 1px 2px rgba(44,42,38,0.04);
    --shadow-md: 0 4px 12px rgba(44,42,38,0.08);
    --shadow-lg: 0 8px 24px rgba(44,42,38,0.12);
    --transition: 0.2s ease;

    --sidebar-width: 240px;
    --navbar-height: 0px;
}

/* Dark mode */
[data-theme="dark"] {
    --page-bg: #1E1C18;
    --surface: #252320;
    --card-bg: #2C2A26;
    --text-primary: #F5F3EE;
    --text-secondary: #A8A29E;
    --text-tertiary: #7A7670;
    --border: #3D3A34;
    --border-light: #353230;
    --green-bg: #1a2e1b;
    --green-text: #6fcf72;
    --amber-bg: #2e2714;
    --amber-text: #e8c44a;
    --red-bg: #2e1a1a;
    --red-text: #f08080;
    --blue-bg: #1a2340;
    --blue-text: #6ea8f0;
    --gray-bg: #353230;
    --gray-text: #A8A29E;
}

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

body {
    font-family: var(--font);
    background: var(--page-bg);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 14px;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--gold-dark); text-decoration: none; }
a:hover { color: var(--gold); }

/* === LAYOUT: SIDEBAR + MAIN === */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--charcoal);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-brand a { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.sidebar-brand img { height: 32px; filter: brightness(2) contrast(0.9); }
.sidebar-brand span {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.sidebar-nav { flex: 1; padding: 0.75rem 0; }

.nav-section {
    padding: 0.5rem 1.25rem 0.25rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.35);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 1.25rem;
    color: rgba(255,255,255,0.6);
    font-size: 0.875rem;
    font-weight: 400;
    transition: all var(--transition);
    border-left: 3px solid transparent;
    text-decoration: none;
}

.nav-link:hover {
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.05);
}

.nav-link.active {
    color: var(--gold);
    background: rgba(232,168,50,0.08);
    border-left-color: var(--gold);
    font-weight: 500;
}

.nav-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.7;
}

.nav-link.active svg { opacity: 1; }

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-footer .nav-link { padding: 0.4rem 0; border-left: none; }

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.75rem 2rem;
}

/* Theme toggle */
.theme-toggle {
    background: rgba(255,255,255,0.08);
    border: none;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}
.theme-toggle:hover { background: rgba(255,255,255,0.12); color: #fff; }
.theme-toggle svg { width: 18px; height: 18px; }

/* Mobile nav toggle */
.mobile-header {
    display: none;
    position: sticky;
    top: 0;
    z-index: 90;
    background: var(--charcoal);
    padding: 0.75rem 1rem;
    align-items: center;
    justify-content: space-between;
}

.mobile-header img { height: 28px; }

.hamburger {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
}

/* === FLASH MESSAGES === */
.flash-messages { margin-bottom: 1.25rem; }
.flash {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.flash-success { background: var(--green-bg); color: var(--green-text); }
.flash-error, .flash-danger { background: var(--red-bg); color: var(--red-text); }
.flash-warning { background: var(--amber-bg); color: var(--amber-text); }
.flash-info { background: var(--blue-bg); color: var(--blue-text); }

/* === PAGE HEADER === */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
    gap: 1rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.page-header-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.15rem;
}

/* === CARDS === */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

.card-header h2, .card-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-flush { padding: 0; }
.card-flush .card-header { padding: 1.25rem 1.25rem 0.75rem; }
.card-flush .table-wrap { margin: 0; }
.card-flush table th:first-child, .card-flush table td:first-child { padding-left: 1.25rem; }
.card-flush table th:last-child, .card-flush table td:last-child { padding-right: 1.25rem; }

/* === STAT CARDS === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1.25rem;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.stat-sub {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-top: 0.25rem;
}

.stat-card--gold { border-left: 3px solid var(--gold); }
.stat-card--green { border-left: 3px solid var(--green-text); }
.stat-card--blue { border-left: 3px solid var(--blue-text); }
.stat-card--amber { border-left: 3px solid var(--amber-text); }
.stat-card--red { border-left: 3px solid var(--red-text); }
.stat-card--default { border-left: 3px solid var(--gray-text); }

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    font-family: var(--font);
    line-height: 1.4;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gold);
    color: var(--charcoal);
}
.btn-primary:hover { background: var(--gold-dark); color: #fff; }

.btn-dark {
    background: var(--charcoal);
    color: #fff;
}
.btn-dark:hover { background: var(--charcoal-mid); }

.btn-success { background: var(--green-bg); color: var(--green-text); border: 1px solid transparent; }
.btn-success:hover { border-color: var(--green-text); }

.btn-danger { background: var(--red-bg); color: var(--red-text); border: 1px solid transparent; }
.btn-danger:hover { border-color: var(--red-text); }

.btn-warning { background: var(--amber-bg); color: var(--amber-text); border: 1px solid transparent; }
.btn-warning:hover { border-color: var(--amber-text); }

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--text-secondary); color: var(--text-primary); background: var(--surface); }

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 0.35rem 0.6rem;
}
.btn-ghost:hover { color: var(--text-primary); background: var(--surface); }

.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.8rem; }
.btn-lg { padding: 0.65rem 1.25rem; font-size: 0.95rem; }
.btn-icon { padding: 0.45rem; }
.btn-icon svg { width: 16px; height: 16px; }

.btn-group { display: flex; gap: 0.5rem; }

/* === TABLES === */
.table-wrap { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

th, td {
    padding: 0.65rem 0.75rem;
    text-align: left;
}

th {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    position: sticky;
    top: 0;
    white-space: nowrap;
}

td {
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(232,168,50,0.03); }

td a { color: var(--text-primary); font-weight: 500; }
td a:hover { color: var(--gold); }

.table-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

/* === BADGES === */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.badge-offered { background: var(--blue-bg); color: var(--blue-text); }
.badge-accepted { background: var(--green-bg); color: var(--green-text); }
.badge-declined { background: var(--red-bg); color: var(--red-text); }
.badge-confirmed { background: var(--green-bg); color: var(--green-text); }
.badge-completed { background: var(--gray-bg); color: var(--gray-text); }
.badge-cancelled { background: var(--red-bg); color: var(--red-text); }
.badge-paid { background: var(--green-bg); color: var(--green-text); }
.badge-unpaid { background: var(--amber-bg); color: var(--amber-text); }
.badge-sent { background: var(--blue-bg); color: var(--blue-text); }
.badge-unmade { background: var(--gray-bg); color: var(--gray-text); }
.badge-draft { background: var(--gray-bg); color: var(--gray-text); }
.badge-overdue { background: var(--red-bg); color: var(--red-text); }
.badge-active { background: var(--green-bg); color: var(--green-text); }
.badge-inactive { background: var(--gray-bg); color: var(--gray-text); }
.badge-open-market { background: var(--blue-bg); color: var(--blue-text); }
.badge-unallocated { background: var(--amber-bg); color: var(--amber-text); font-weight: 600; }

/* Unallocated booking row - yellow tint across the whole row */
[data-theme="light"] .row-unallocated,
.row-unallocated {
    background: #FFF8E1 !important;
}
[data-theme="dark"] .row-unallocated {
    background: rgba(232, 168, 50, 0.12) !important;
}
.row-unallocated td { position: relative; }
.row-unallocated td:first-child {
    border-left: 3px solid var(--gold);
}

/* === GIG BOARD === */
.gig-board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.gig-board-card {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}

.gig-board-venue {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.gig-board-date {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
}

.gig-board-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.gig-board-fee {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 0.75rem;
}

/* === FORMS === */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-family: var(--font);
    color: var(--text-primary);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(232,168,50,0.15);
}

.form-control::placeholder { color: var(--text-tertiary); }

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 0.2rem;
}

.form-section {
    margin-bottom: 1.75rem;
}

.form-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-light);
}

/* Checkbox */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--gold);
}

/* === FILTERS === */
.filters {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    align-items: end;
}

.filters .form-group { margin-bottom: 0; }
.filters .form-control { min-width: 150px; font-size: 0.8rem; padding: 0.4rem 0.6rem; }

/* === INLINE FORM CONTROLS === */
.inline-form { display: inline; }
.form-control-inline {
    font-size: 0.8rem;
    padding: 0.2rem 0.4rem;
    border: 1px solid transparent;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    max-width: 160px;
}
.form-control-inline:hover { border-color: var(--border); }
.form-control-inline:focus { border-color: var(--gold); outline: none; }
.badge-select { font-weight: 500; min-width: 90px; padding-right: 1rem; }
.badge-select-offered { color: var(--blue-text); }
.badge-select-accepted { color: var(--green-text); }
.badge-select-confirmed { color: var(--green-text); }
.badge-select-completed { color: var(--green-text); }
.badge-select-cancelled { color: var(--red-text); }
.badge-select-declined { color: var(--red-text); }
.badge-select-paid { color: var(--green-text); }
.badge-select-unpaid { color: var(--amber-text); }

/* === CLICK-TO-EDIT CELLS === */
.editable-cell {
    cursor: pointer;
    border-bottom: 1px dashed transparent;
    padding: 0.1rem 0.25rem;
    border-radius: 3px;
    transition: var(--transition);
}
.editable-cell:hover {
    border-bottom-color: var(--gold);
    background: var(--gold-light);
}
[data-theme="dark"] .editable-cell:hover {
    background: rgba(232,168,50,0.1);
}
.editable-input {
    width: 90px;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.15rem 0.35rem;
    border: 1px solid var(--gold);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text-primary);
    text-align: right;
    outline: none;
}

/* === BULK ACTION BAR === */
.bulk-action-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--amber-bg);
    border: 1px solid var(--gold);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--amber-text);
}

/* === SORTABLE TABLE HEADERS === */
th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 1.25rem;
}
th.sortable:hover { color: var(--gold-dark); }
th.sortable::after {
    content: '\2195';
    position: absolute;
    right: 0.25rem;
    opacity: 0.3;
    font-size: 0.75rem;
}
th.sortable.sort-asc::after { content: '\2191'; opacity: 0.7; }
th.sortable.sort-desc::after { content: '\2193'; opacity: 0.7; }

/* === KANBAN PIPELINE === */
.pipeline {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.pipeline-col {
    flex: 1;
    min-width: 220px;
}

.pipeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pipeline-header--offered { background: var(--amber-bg); color: var(--amber-text); }
.pipeline-header--accepted { background: var(--blue-bg); color: var(--blue-text); }
.pipeline-header--confirmed { background: var(--green-bg); color: var(--green-text); }
.pipeline-header--completed { background: var(--gray-bg); color: var(--gray-text); }
.pipeline-header--declined { background: var(--red-bg); color: var(--red-text); }

.pipeline-count {
    background: rgba(0,0,0,0.1);
    padding: 0.1rem 0.45rem;
    border-radius: 10px;
    font-size: 0.7rem;
}

.pipeline-body {
    background: var(--surface);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    padding: 0.5rem;
    min-height: 100px;
}

.pipeline-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: box-shadow var(--transition);
    text-decoration: none;
    display: block;
    color: var(--text-primary);
}

.pipeline-card:hover { box-shadow: var(--shadow-md); color: var(--text-primary); }
.pipeline-card-artist { font-weight: 500; margin-bottom: 0.15rem; }
.pipeline-card-venue { color: var(--text-secondary); font-size: 0.75rem; }
.pipeline-card-date { color: var(--text-tertiary); font-size: 0.7rem; margin-top: 0.25rem; }

/* === CALENDAR === */
.calendar-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

.calendar-nav h2 {
    font-size: 1.1rem;
    font-weight: 600;
    min-width: 180px;
    text-align: center;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.calendar-header {
    background: var(--charcoal);
    color: rgba(255,255,255,0.8);
    padding: 0.5rem;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.calendar-day {
    background: var(--card-bg);
    min-height: 90px;
    padding: 0.4rem;
    font-size: 0.8rem;
    vertical-align: top;
}

.calendar-day.today { background: var(--gold-light); }
.calendar-day.other-month { background: var(--surface); opacity: 0.5; }

.calendar-day .day-number {
    font-weight: 600;
    font-size: 0.75rem;
    margin-bottom: 0.2rem;
    color: var(--text-secondary);
}

.calendar-day.today .day-number { color: var(--gold-dark); }

.calendar-event {
    display: block;
    padding: 0.15rem 0.35rem;
    border-radius: 3px;
    font-size: 0.65rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    font-weight: 500;
}

.calendar-event--offered { background: var(--amber-bg); color: var(--amber-text); }
.calendar-event--accepted { background: var(--blue-bg); color: var(--blue-text); }
.calendar-event--confirmed { background: var(--green-bg); color: var(--green-text); }
.calendar-event--completed { background: var(--gray-bg); color: var(--gray-text); }
.calendar-event--cancelled { background: var(--red-bg); color: var(--red-text); }

/* === AVAILABILITY GRID === */
.avail-grid {
    overflow-x: auto;
}

.avail-grid table { font-size: 0.8rem; }

.avail-grid th {
    font-size: 0.7rem;
    padding: 0.4rem 0.3rem;
    text-align: center;
    min-width: 38px;
}

.avail-grid td { text-align: center; padding: 0.3rem; }

.avail-grid .artist-name {
    text-align: left;
    position: sticky;
    left: 0;
    background: var(--card-bg);
    z-index: 1;
    font-weight: 500;
    white-space: nowrap;
    padding-right: 0.75rem;
    min-width: 140px;
}

.avail-cell {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s;
    border: 1px solid transparent;
}

.avail-available { background: var(--green-bg); color: var(--green-text); }
.avail-unavailable { background: var(--red-bg); color: var(--red-text); }
.avail-flc_only { background: var(--amber-bg); color: var(--amber-text); }
.avail-cell:hover { transform: scale(1.1); }

/* === AVATAR / INITIALS === */
.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--gold-light);
    color: var(--gold-dark);
    flex-shrink: 0;
}

.avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-sm { width: 26px; height: 26px; font-size: 0.6rem; }
.avatar-lg { width: 40px; height: 40px; font-size: 0.85rem; }

.cell-with-avatar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* === TWO-COLUMN LAYOUT === */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.25rem;
}

/* === LOGIN PAGE === */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--charcoal);
}

.login-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 380px;
    text-align: center;
}

.login-card img { height: 48px; margin-bottom: 1.25rem; }
.login-card h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}
.login-card .form-group { text-align: left; }
.login-card .btn { width: 100%; justify-content: center; margin-top: 0.5rem; }

/* === VENUE PUBLIC PAGE === */
.venue-page {
    min-height: 100vh;
    background: var(--page-bg);
}

.venue-header {
    padding: 3rem 2rem;
    text-align: center;
    color: #fff;
    position: relative;
}

.venue-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gold);
    border-radius: 2px;
}

.venue-header img { height: 70px; margin-bottom: 0.75rem; }
.venue-header h1 { font-size: 1.75rem; font-weight: 600; }
.venue-header p { opacity: 0.8; font-size: 0.9rem; margin-top: 0.25rem; }

.venue-body {
    max-width: 700px;
    margin: -1.5rem auto 2rem;
    padding: 0 1rem;
}

.venue-bookings {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.venue-booking-row {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    gap: 1rem;
    transition: background var(--transition);
}

.venue-booking-row:last-child { border-bottom: none; }
.venue-booking-row:hover { background: var(--surface); }

.venue-booking-date {
    text-align: center;
    min-width: 52px;
}

.venue-booking-date .day-name {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.venue-booking-date .day-num {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.venue-booking-date .month {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.venue-booking-info { flex: 1; }
.venue-booking-info h3 { font-size: 0.95rem; font-weight: 500; color: var(--text-primary); }
.venue-booking-info p { font-size: 0.8rem; color: var(--text-secondary); }

.venue-footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-tertiary);
    font-size: 0.8rem;
}

.venue-footer img { height: 28px; margin-bottom: 0.5rem; opacity: 0.5; }

/* === PAGINATION === */
.pagination {
    display: flex;
    gap: 0.3rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.pagination a, .pagination span {
    padding: 0.35rem 0.7rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    text-decoration: none;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.pagination a:hover { background: var(--surface); color: var(--text-primary); }
.pagination .active { background: var(--gold); color: var(--charcoal); border-color: var(--gold); font-weight: 600; }

/* === TABS === */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.25rem;
}

.tab {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
    font-weight: 500;
}

.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--gold-dark); border-bottom-color: var(--gold); }

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-tertiary);
}

.empty-state svg { width: 48px; height: 48px; margin-bottom: 0.75rem; opacity: 0.3; }
.empty-state h3 { color: var(--text-secondary); font-size: 1rem; margin-bottom: 0.25rem; }
.empty-state p { font-size: 0.85rem; }

/* === COLOR SWATCH === */
.color-swatch {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid var(--border);
    vertical-align: middle;
}

/* === FEE SECTION === */
.fee-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.fee-divider {
    grid-column: 1 / -1;
    border-top: 1px solid var(--border-light);
    margin: 0.25rem 0;
}

.fee-total {
    grid-column: 1 / -1;
    background: var(--surface);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    text-align: center;
}

.fee-total .stat-value { font-size: 1.25rem; }
.fee-total .stat-label { font-size: 0.7rem; }

/* === NOTIFICATION LIST === */
.notif-list { list-style: none; }

.notif-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.85rem;
}

.notif-item:last-child { border-bottom: none; }

.notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    margin-top: 0.35rem;
    flex-shrink: 0;
}

.notif-dot.read { background: var(--border); }
.notif-body { flex: 1; }
.notif-time { font-size: 0.75rem; color: var(--text-tertiary); }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
    .pipeline { flex-direction: column; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); transition: transform 0.3s ease; }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.open { display: block; }
    .mobile-header { display: flex; }
    .main-content { margin-left: 0; }
    .container { padding: 1rem; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .filters { flex-direction: column; }
    .form-row { grid-template-columns: 1fr; }
    .calendar-day { min-height: 60px; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
}

/* === UTILITY === */
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-secondary { color: var(--text-secondary); }
.text-sm { font-size: 0.8rem; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.w-full { width: 100%; }
.hidden { display: none; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============================================================
   ARTIST PORTAL — warm premium layer (scoped .portal- / .p-)
   ============================================================ */

.portal-greeting { margin-bottom: 1.5rem; }
.portal-greeting h1 { font-size: 1.65rem; letter-spacing: -0.02em; }
.portal-greeting .sub { color: var(--text-secondary); font-size: 0.9rem; margin-top: 0.2rem; }

/* Next-gig hero */
.portal-hero {
    position: relative;
    background: linear-gradient(135deg, var(--charcoal) 0%, var(--charcoal-mid) 100%);
    color: #F5F3EE;
    border-radius: var(--radius-lg);
    padding: 1.75rem 2rem;
    margin-bottom: 1.25rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.portal-hero::after {
    content: '';
    position: absolute; right: -60px; top: -60px;
    width: 220px; height: 220px; border-radius: 50%;
    background: radial-gradient(circle, rgba(232,168,50,0.28) 0%, rgba(232,168,50,0) 70%);
}
.portal-hero .hero-label {
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--gold); margin-bottom: 0.5rem;
}
.portal-hero .hero-venue { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 0.35rem; }
.portal-hero .hero-meta { color: rgba(245,243,238,0.75); font-size: 0.95rem; display: flex; gap: 1.25rem; flex-wrap: wrap; }
.portal-hero .hero-meta strong { color: #F5F3EE; font-weight: 600; }
.portal-hero .hero-fee { color: var(--gold); font-weight: 700; }
.countdown-chip {
    display: inline-block; background: var(--gold); color: var(--charcoal);
    font-size: 0.75rem; font-weight: 700; padding: 0.25rem 0.75rem;
    border-radius: 100px; margin-left: 0.6rem; vertical-align: middle;
    letter-spacing: 0.02em;
}

/* Offer cards (needs response) */
.offer-card {
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    background: var(--card-bg);
    border: 1px solid var(--gold);
    border-left: 4px solid var(--gold);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow);
}
.offer-card .offer-info { flex: 1 1 220px; min-width: 0; }
.offer-card .offer-venue { font-weight: 700; font-size: 1.05rem; }
.offer-card .offer-when { color: var(--text-secondary); font-size: 0.85rem; margin-top: 0.15rem; }
.offer-card .offer-fee { font-weight: 700; color: var(--gold-dark); font-size: 1.05rem; white-space: nowrap; }
[data-theme="dark"] .offer-card .offer-fee { color: var(--gold); }
.offer-card .offer-actions { display: flex; gap: 0.5rem; }

/* List rows with date block */
.p-list { display: flex; flex-direction: column; }
.p-row {
    display: flex; align-items: center; gap: 1rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
}
.p-row:last-child { border-bottom: none; }
.p-date-block {
    flex: 0 0 52px; text-align: center;
    background: var(--surface); border-radius: var(--radius-sm);
    padding: 0.4rem 0.2rem; line-height: 1.15;
}
.p-date-block .d { font-size: 1.15rem; font-weight: 700; }
.p-date-block .m { font-size: 0.65rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-secondary); }
.p-row .p-main { flex: 1 1 auto; min-width: 0; }
.p-row .p-venue { font-weight: 600; }
.p-row .p-sub { color: var(--text-secondary); font-size: 0.82rem; margin-top: 0.1rem; }
.p-row .p-fee { font-weight: 700; white-space: nowrap; }

/* Empty state */
.p-empty { text-align: center; padding: 2.5rem 1rem; color: var(--text-tertiary); }
.p-empty .icon { font-size: 1.6rem; display: block; margin-bottom: 0.4rem; opacity: 0.6; }

/* Utility card (calendar sync) */
.p-utility {
    background: var(--surface); border: 1px dashed var(--border);
    border-radius: var(--radius); padding: 0.9rem 1.25rem; margin-top: 1.25rem;
}
.p-utility summary { cursor: pointer; font-weight: 600; font-size: 0.9rem; color: var(--text-secondary); }
.p-utility .body { display: flex; gap: 0.75rem; align-items: center; margin-top: 0.75rem; flex-wrap: wrap; }
.p-utility input { flex: 1 1 260px; font-size: 0.75rem; }

/* Gig board upgrades */
.gig-board-card { position: relative; transition: transform var(--transition), box-shadow var(--transition); }
.gig-board-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.gig-board-type {
    display: inline-block; font-size: 0.65rem; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--gold-dark); background: var(--gold-light);
    padding: 0.2rem 0.6rem; border-radius: 100px; margin-bottom: 0.6rem;
}
[data-theme="dark"] .gig-board-type { color: var(--gold); background: rgba(232,168,50,0.12); }
.gig-board-first {
    font-size: 0.72rem; color: var(--text-tertiary); text-align: center; margin-top: 0.5rem;
}

/* Payments year picker */
.year-picker { display: flex; align-items: center; gap: 0.25rem; }
.year-picker .yr { font-weight: 700; font-size: 1.05rem; padding: 0.4rem 0.9rem; }

/* Availability calendar polish */
.calendar-grid .cal-day { border-radius: var(--radius-sm); transition: background var(--transition); }
.legend-chips { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.legend-chip { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.78rem; color: var(--text-secondary); }
.legend-chip .dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

@media (max-width: 640px) {
    .portal-hero { padding: 1.25rem 1.25rem; }
    .portal-hero .hero-venue { font-size: 1.25rem; }
    .p-row { padding: 0.75rem 0.9rem; }
}

/* Portal elevation pass 2 */
.sidebar-artist {
    display: flex; align-items: center; gap: 0.7rem;
    padding: 0.65rem 0.25rem; margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-artist-photo {
    width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
    border: 2px solid var(--gold); flex: 0 0 40px;
}
.sidebar-artist-initial {
    background: var(--gold); color: var(--charcoal);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.1rem;
}
.sidebar-artist-meta .n { color: #F5F3EE; font-weight: 600; font-size: 0.9rem; line-height: 1.2; }
.sidebar-artist-meta .r { color: var(--gold); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 0.15rem; }

.hero-directions {
    color: var(--gold); text-decoration: none; font-weight: 600; font-size: 0.9rem;
}
.hero-directions:hover { text-decoration: underline; }

.p-month-header {
    padding: 0.7rem 1.25rem 0.35rem;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--text-tertiary);
    background: var(--surface);
    border-bottom: 1px solid var(--border-light);
}

/* Earnings mini chart */
.p-chart {
    display: flex; align-items: flex-end; gap: 4%;
    height: 120px; padding-top: 0.5rem;
}
.p-chart-col { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.p-chart-bar {
    width: 100%; max-width: 34px; min-height: 2px;
    background: var(--gold-light); border-radius: 4px 4px 0 0;
    border-top: 2px solid var(--gold);
    transition: background var(--transition);
}
.p-chart-bar.now { background: var(--gold); }
.p-chart-col:hover .p-chart-bar { background: var(--gold); }
.p-chart-label { font-size: 0.65rem; color: var(--text-tertiary); margin-top: 0.35rem; font-weight: 600; }
[data-theme="dark"] .p-chart-bar { background: rgba(232,168,50,0.18); }
[data-theme="dark"] .p-chart-bar.now, [data-theme="dark"] .p-chart-col:hover .p-chart-bar { background: var(--gold); }

/* Mobile bottom nav (artist portal) */
.portal-bottom-nav { display: none; }
@media (max-width: 768px) {
    .portal-bottom-nav {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
        background: var(--charcoal);
        border-top: 1px solid rgba(255,255,255,0.08);
        padding: 0.35rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom));
        justify-content: space-around;
    }
    .portal-bottom-nav a {
        display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
        color: rgba(245,243,238,0.55); text-decoration: none;
        font-size: 0.62rem; font-weight: 600; letter-spacing: 0.03em;
        padding: 0.25rem 0.6rem; border-radius: 8px;
    }
    .portal-bottom-nav a svg { width: 20px; height: 20px; }
    .portal-bottom-nav a.active { color: var(--gold); }
    body:has(.portal-bottom-nav) .main-content { padding-bottom: 4.5rem; }
}

/* ============================================================
   Portal elevation pass 3 — the epic layer
   ============================================================ */

/* Gentle entrance for portal content */
@keyframes riseIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.portal-hero, .stats-grid .stat-card, .offer-card, .card, .gig-spot {
    animation: riseIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.stats-grid .stat-card:nth-child(2) { animation-delay: 0.05s; }
.stats-grid .stat-card:nth-child(3) { animation-delay: 0.1s; }
.stats-grid .stat-card:nth-child(4) { animation-delay: 0.15s; }
.gig-spot:nth-child(2) { animation-delay: 0.07s; }
.gig-spot:nth-child(3) { animation-delay: 0.14s; }
.gig-spot:nth-child(4) { animation-delay: 0.21s; }
@media (prefers-reduced-motion: reduce) {
    .portal-hero, .stats-grid .stat-card, .offer-card, .card, .gig-spot { animation: none; }
}

/* Hero: deeper, layered light */
.portal-hero {
    background:
        radial-gradient(ellipse 60% 120% at 85% -10%, rgba(232,168,50,0.22), transparent 60%),
        radial-gradient(ellipse 40% 80% at 100% 100%, rgba(232,168,50,0.10), transparent 55%),
        linear-gradient(135deg, #26241F 0%, #33302A 100%);
    border: 1px solid rgba(232,168,50,0.25);
}

/* Stat cards: lift + money glow */
.stat-card { transition: transform var(--transition), box-shadow var(--transition); }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Open Gigs — spotlight cards */
.gig-spot-grid {
    display: grid; gap: 1.25rem;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.gig-spot {
    position: relative;
    background:
        radial-gradient(ellipse 70% 60% at 90% -20%, rgba(232,168,50,0.16), transparent 60%),
        linear-gradient(150deg, #26241F 0%, #33302A 100%);
    color: #F5F3EE;
    border: 1px solid rgba(232,168,50,0.25);
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.5rem 1.1rem;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.gig-spot:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(44,42,38,0.28);
    border-color: rgba(232,168,50,0.6);
}
.gig-spot-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.gig-spot .gig-board-type { margin-bottom: 0; background: rgba(232,168,50,0.14); color: var(--gold); }
.gig-spot-date { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.35rem; }
.gig-spot-date .dd { font-size: 2.6rem; font-weight: 700; letter-spacing: -0.04em; line-height: 1; color: var(--gold); }
.gig-spot-date .dm { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em; color: rgba(245,243,238,0.55); line-height: 1.25; }
.gig-spot-venue { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.015em; margin-bottom: 0.2rem; }
.gig-spot-meta { color: rgba(245,243,238,0.65); font-size: 0.88rem; margin-bottom: 0.9rem; }
.gig-spot-notes {
    color: rgba(245,243,238,0.7); font-size: 0.82rem; line-height: 1.5;
    background: rgba(255,255,255,0.05); border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem; margin-bottom: 0.9rem;
}
.btn-claim {
    width: 100%; border: none; cursor: pointer;
    background: linear-gradient(135deg, #F0B94B 0%, var(--gold) 55%, var(--gold-dark) 100%);
    color: var(--charcoal); font-weight: 700; font-size: 0.95rem; font-family: var(--font);
    padding: 0.75rem 1rem; border-radius: 100px;
    box-shadow: 0 6px 16px rgba(232,168,50,0.35);
    transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}
.btn-claim:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(232,168,50,0.45); filter: brightness(1.04); }
.btn-claim:active { transform: translateY(0); }
.gig-spot .gig-board-first { color: rgba(245,243,238,0.4); }

/* Live pill in headings */
.live-pill {
    display: inline-flex; align-items: center; gap: 0.4rem;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--gold-dark); background: var(--gold-light);
    padding: 0.3rem 0.8rem; border-radius: 100px; vertical-align: middle; margin-left: 0.6rem;
}
[data-theme="dark"] .live-pill { color: var(--gold); background: rgba(232,168,50,0.14); }
.live-dot {
    width: 7px; height: 7px; border-radius: 50%; background: var(--gold);
    animation: livePulse 1.6s ease-in-out infinite;
}
@keyframes livePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(232,168,50,0.5); }
    50% { box-shadow: 0 0 0 5px rgba(232,168,50,0); }
}

/* Board empty state — quiet, branded */
.board-empty {
    text-align: center; padding: 4.5rem 1.5rem;
    background: var(--card-bg); border-radius: var(--radius-lg);
    border: 1px solid var(--border-light); box-shadow: var(--shadow);
}
.board-empty-mark {
    width: 84px; height: auto; opacity: 0.25; filter: grayscale(35%);
    margin-bottom: 1.25rem;
}
.board-empty h2 { font-size: 1.25rem; letter-spacing: -0.01em; margin-bottom: 0.5rem; }
.board-empty p { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.6; }

/* Notifications: quieter, warmer */
.notif-item { transition: background var(--transition); }
.notif-item:hover { background: var(--surface); }

/* === INVOICING (Xero-style) === */
.text-red { color: var(--red-text); }
.badge-inv-draft { background: var(--gray-bg); color: var(--gray-text); }
.badge-inv-awaiting_payment { background: var(--amber-bg); color: var(--amber-text); }
.badge-inv-overdue { background: var(--red-bg); color: var(--red-text); }
.badge-inv-paid { background: var(--green-bg); color: var(--green-text); }
.badge-inv-void { background: var(--gray-bg); color: var(--gray-text); text-decoration: line-through; }

.inv-summary a.stat-card { display: block; color: inherit; text-decoration: none; }
.inv-summary a.stat-card:hover { border-color: var(--gold); }

.inv-tabs { flex-wrap: wrap; }
.tab-count {
    display: inline-block; margin-left: 0.35rem; padding: 0.05rem 0.45rem; border-radius: 100px;
    background: var(--gray-bg); color: var(--gray-text); font-size: 0.7rem; font-weight: 600;
}
.tab.active .tab-count { background: var(--gold-light); color: var(--gold-dark); }
.tab-count--red { background: var(--red-bg); color: var(--red-text); }

.inv-table td, .inv-table th { white-space: nowrap; vertical-align: middle; }
.inv-table td.col-venue { white-space: normal; min-width: 180px; }
.inv-table tfoot td { border-top: 2px solid var(--border); background: var(--surface); padding-top: 0.6rem; padding-bottom: 0.6rem; }
.inv-row--overdue td:first-child { box-shadow: inset 3px 0 0 var(--red-text); }
.inv-row--draft td { color: var(--text-secondary); }
.inv-days { display: inline-block; margin-left: 0.3rem; font-size: 0.65rem; font-weight: 600; color: var(--red-text); }
.inv-sent { font-size: 0.7rem; color: var(--green-text); font-weight: 500; }
.inv-unsent { font-size: 0.7rem; color: var(--text-tertiary); }

/* Editor */
.inv-head-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0.75rem 1rem;
}
.inv-head-grid .form-group { margin-bottom: 0; }
.inv-head-to { grid-row: span 2; }
.inv-number-static { background: var(--surface); font-weight: 600; cursor: default; }
.inv-lines th, .inv-lines td { vertical-align: top; padding: 0.55rem 0.5rem; }
.inv-lines .form-control { padding: 0.45rem 0.6rem; font-size: 0.875rem; }
.inv-lines textarea.form-control { resize: none; overflow: hidden; min-height: 38px; line-height: 1.4; }
.inv-lines .line-amount { padding-top: 0.95rem; white-space: nowrap; }
.inv-lines input[type="number"] { -moz-appearance: textfield; }
.inv-lines input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }
.inv-line-remove {
    background: none; border: none; color: var(--text-tertiary); font-size: 1.15rem; line-height: 1;
    cursor: pointer; padding: 0.55rem 0.3rem; border-radius: 6px;
}
.inv-line-remove:hover { color: var(--red-text); background: var(--red-bg); }
.inv-gig-tag {
    display: inline-block; margin-top: 0.3rem; padding: 0.1rem 0.5rem; border-radius: 100px;
    font-size: 0.65rem; font-weight: 600; background: var(--blue-bg); color: var(--blue-text); text-decoration: none;
}
.inv-lines-actions { display: flex; gap: 0.5rem; padding: 0.75rem 1.25rem 1rem; border-top: 1px solid var(--border-light); }
.inv-foot-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.25rem; }
.inv-foot-grid .card { margin-bottom: 0; }
.inv-totals { align-self: start; }
.inv-total-row { display: flex; justify-content: space-between; padding: 0.4rem 0; font-size: 0.9rem; }
.inv-total-row--grand { border-top: 1px solid var(--border); margin-top: 0.3rem; padding-top: 0.7rem; font-weight: 600; font-size: 1.05rem; }
.inv-total-row--due { background: var(--gold-light); color: var(--gold-dark); border-radius: 8px; padding: 0.6rem 0.75rem; font-weight: 700; margin-top: 0.5rem; }
[data-theme="dark"] .inv-total-row--due { background: var(--amber-bg); color: var(--amber-text); }
.inv-actions { margin-top: 1.25rem; }

/* Modal */
.inv-modal { position: fixed; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.inv-modal[hidden] { display: none; }
.inv-modal-backdrop { position: absolute; inset: 0; background: rgba(28,26,22,0.55); }
.inv-modal-panel {
    position: relative; background: var(--card-bg); border-radius: var(--radius-lg); width: min(760px, 100%);
    max-height: calc(100vh - 2rem); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); margin: 0;
}
.inv-modal-panel--sm { width: min(520px, 100%); }
.inv-modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1.1rem 1.25rem 0.75rem; border-bottom: 1px solid var(--border-light); }
.inv-modal-head h3 { font-size: 1rem; font-weight: 600; }
.inv-modal-close { background: none; border: none; font-size: 1.4rem; color: var(--text-tertiary); cursor: pointer; line-height: 1; }
.inv-modal-close:hover { color: var(--text-primary); }
.inv-modal-filters { display: flex; gap: 0.75rem; align-items: flex-end; flex-wrap: wrap; padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--border-light); font-size: 0.8rem; color: var(--text-secondary); }
.inv-modal-filters label { display: flex; flex-direction: column; gap: 0.2rem; }
.inv-modal-filters .form-control { padding: 0.35rem 0.5rem; font-size: 0.8rem; }
.inv-modal-selectall { flex-direction: row !important; align-items: center; gap: 0.4rem !important; margin-left: auto; }
.inv-modal-body { overflow-y: auto; flex: 1; }
.inv-modal-form { padding: 1rem 1.25rem; }
.inv-modal-form .form-group { margin-bottom: 0.85rem; }
.inv-modal-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.85rem 1.25rem; border-top: 1px solid var(--border-light); }
.inv-gig-table { width: 100%; }
.inv-gig-table td, .inv-gig-table th { padding: 0.5rem 0.75rem; white-space: nowrap; }
.inv-gig-table tbody tr { cursor: pointer; }
.inv-gig-table tbody tr:hover { background: var(--surface); }

/* View */
.inv-crumb { font-size: 0.8rem; color: var(--text-tertiary); margin-bottom: 0.2rem; }
.inv-crumb a { color: var(--text-secondary); }
.inv-view-header { align-items: flex-start; }
.inv-amount-due { text-align: right; }
.inv-amount-due .stat-value { font-size: 1.9rem; }
.inv-actionbar { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.25rem; }
.inv-actionbar form { margin: 0; }
.inv-actionbar-more { position: relative; margin-left: auto; }
.inv-menu {
    position: absolute; right: 0; top: calc(100% + 4px); min-width: 220px; background: var(--card-bg);
    border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 0.35rem; z-index: 50;
}
.inv-menu[hidden] { display: none; }
.inv-menu a, .inv-menu button {
    display: block; width: 100%; text-align: left; padding: 0.5rem 0.7rem; border-radius: 6px; background: none; border: none;
    font: inherit; font-size: 0.85rem; color: var(--text-primary); cursor: pointer; text-decoration: none;
}
.inv-menu a:hover, .inv-menu button:hover { background: var(--surface); }
.inv-menu .danger { color: var(--red-text); }
.inv-menu form { margin: 0; }
.inv-view-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.25rem; align-items: start; }
.inv-side .card { margin-bottom: 1.25rem; }
.inv-doc { padding: 2rem; }
.inv-doc-head { display: flex; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.inv-doc-logo { height: 60px; }
[data-theme="dark"] .inv-doc-logo { filter: brightness(2) contrast(0.9); }
.inv-doc-org { text-align: right; font-size: 0.85rem; color: var(--text-secondary); }
.inv-doc-title { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-primary); margin-bottom: 0.2rem; }
.inv-doc-meta { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; font-size: 0.9rem; }
.inv-doc-kv td { padding: 0.15rem 0; font-size: 0.875rem; }
.inv-doc-kv td:first-child { color: var(--text-secondary); padding-right: 1.25rem; white-space: nowrap; }
.inv-doc-kv td:last-child { white-space: nowrap; font-weight: 500; }
.inv-doc-lines td:first-child { min-width: 220px; }
.inv-doc-lines td:not(:first-child), .inv-doc-lines th:not(:first-child) { white-space: nowrap; }
.inv-doc-lines th { border-bottom: 1.5px solid var(--text-primary); }
.inv-doc-lines td { vertical-align: top; }
.inv-doc-totals { margin: 1rem 0 0 auto; max-width: 340px; }
.inv-doc-notes { margin-top: 1.5rem; font-size: 0.85rem; color: var(--text-secondary); white-space: pre-line; }
.inv-doc-bank { margin-top: 1.5rem; padding: 1rem 1.25rem; background: var(--surface); border-radius: 10px; border-left: 3px solid var(--gold); }
.inv-doc-bank-grid { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 1.25rem; font-size: 0.875rem; margin-top: 0.4rem; }
.inv-doc-bank-grid span:nth-child(odd) { color: var(--text-secondary); }
.inv-payments { display: flex; flex-direction: column; gap: 0.6rem; }
.inv-payment { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.6rem 0.75rem; background: var(--surface); border-radius: 8px; }
.inv-history { display: flex; flex-direction: column; gap: 0.75rem; max-height: 420px; overflow-y: auto; }
.inv-history-item { display: flex; gap: 0.6rem; font-size: 0.85rem; }
.inv-history-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-tertiary); margin-top: 0.4rem; flex-shrink: 0; }
.inv-history-dot--approved, .inv-history-dot--sent, .inv-history-dot--reminder_sent { background: var(--blue-text); }
.inv-history-dot--payment, .inv-history-dot--paid { background: var(--green-text); }
.inv-history-dot--voided, .inv-history-dot--payment_removed { background: var(--red-text); }
.inv-settings-grid .card { margin-bottom: 1.25rem; }

/* Bookings list: invoice column */
.inv-link-chip {
    display: inline-block; padding: 0.15rem 0.5rem; border-radius: 100px; font-size: 0.68rem; font-weight: 600; white-space: nowrap;
}

@media (max-width: 1240px) {
    .inv-view-grid { grid-template-columns: 1fr; }
    .inv-side { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
    .inv-side .card { margin-bottom: 0; }
}
@media (max-width: 900px) {
    .inv-side { grid-template-columns: 1fr; }
    .inv-head-grid { grid-template-columns: 1fr 1fr; }
    .inv-head-to { grid-column: span 2; grid-row: auto; }
    .inv-foot-grid { grid-template-columns: 1fr; }
    .inv-doc { padding: 1.25rem; }
    .inv-doc-meta { grid-template-columns: 1fr; }
    .inv-doc-org { text-align: left; }
    .inv-amount-due { text-align: left; }
    .inv-view-header { flex-direction: column; }
}

.inv-new-client { margin-top: 0.6rem; padding: 0.9rem 1rem; background: var(--surface); border-radius: 10px; border-left: 3px solid var(--gold); }
.inv-new-client .form-group { margin-bottom: 0.6rem; }
