@import url('https://fonts.googleapis.com/css2?family=Geologica:wght@400;500;600;700&display=swap');

:root {
    --ink: #0a0a0a;
    --ink-2: #151515;
    --paper: #f4f2ed;
    --surface: #fff;
    --line: #dedbd3;
    --line-dark: #2b2b2b;
    --muted: #76736d;
    --gold: #e0b252;
    --gold-2: #f1cc7d;
    --green: #2f8d66;
    --red: #c24d46;
    --blue: #4169a1;
    --shadow: 0 18px 48px rgba(10, 10, 10, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: "Geologica", Arial, sans-serif; color: var(--ink); background: var(--paper); font-size: 14px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
input, select, textarea {
    width: 100%;
    border: 1px solid #cfcac0;
    background: #fff;
    color: var(--ink);
    border-radius: 0;
    padding: 12px 14px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(224, 178, 82, .15); }
textarea { resize: vertical; }
label { display: grid; gap: 7px; font-size: 12px; font-weight: 600; letter-spacing: .02em; }
button:disabled { opacity: .45; cursor: not-allowed; }

.eyebrow { margin: 0 0 6px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .18em; }
.muted { color: var(--muted); }
.grow { flex: 1; }
.centered { text-align: center; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    transition: transform .18s, background .18s, color .18s;
}
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--gold); color: var(--ink); }
.button-primary:hover { background: var(--gold-2); }
.button-secondary { background: transparent; border-color: #bab5aa; }
.button-secondary:hover { background: #fff; }
.button-small { min-height: 34px; padding: 7px 12px; font-size: 11px; }
.button-wide { width: 100%; min-height: 49px; }
.text-link { color: #4b4945; font-size: 11px; font-weight: 700; }
.text-link:hover { color: var(--ink); }

.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
    display: grid;
    place-items: center;
    width: 39px;
    height: 39px;
    border: 1px solid currentColor;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: -.04em;
    transform: rotate(-4deg);
}
.brand > span:last-child { display: grid; gap: 1px; }
.brand strong { font-size: 12px; letter-spacing: .13em; }
.brand small { font-size: 7px; letter-spacing: .17em; opacity: .58; }
.brand-large .brand-mark { width: 47px; height: 47px; }
.brand-large strong { font-size: 14px; }

/* App shell */
.app-shell { min-height: 100vh; padding-left: 244px; }
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    width: 244px;
    color: #f7f5ef;
    background: var(--ink);
    border-right: 1px solid var(--line-dark);
}
.sidebar > .brand { height: 98px; padding: 0 26px; border-bottom: 1px solid var(--line-dark); }
.nav { display: grid; padding: 24px 12px; gap: 3px; }
.nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 47px;
    padding: 0 14px;
    color: #9c9a94;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid transparent;
}
.nav a span { width: 22px; color: #5e5d59; font-size: 9px; letter-spacing: .1em; }
.nav a:hover { color: #fff; }
.nav a.active { color: #fff; border-color: #333; background: #171717; }
.nav a.active::after { position: absolute; right: -13px; width: 3px; height: 24px; background: var(--gold); content: ""; }
.nav a.active span { color: var(--gold); }
.sidebar-footer { margin-top: auto; border-top: 1px solid var(--line-dark); }
.booking-link { display: block; padding: 15px 25px; color: var(--gold); border-bottom: 1px solid var(--line-dark); font-size: 10px; font-weight: 600; }
.user-mini { display: flex; align-items: center; gap: 10px; padding: 18px 20px; }
.user-mini > span { display: grid; place-items: center; width: 34px; height: 34px; color: var(--ink); background: var(--gold); font-size: 11px; font-weight: 700; }
.user-mini div { display: grid; flex: 1; }
.user-mini strong { font-size: 10px; }
.user-mini small { color: #777; font-size: 9px; }
.user-mini > a { color: #777; font-size: 15px; }
.main { min-height: 100vh; }
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 98px;
    padding: 18px 34px;
    background: rgba(244, 242, 237, .92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}
.topbar h1 { margin: 0; font-size: 24px; line-height: 1.1; letter-spacing: -.04em; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.today { color: var(--muted); font-size: 10px; letter-spacing: .1em; }
.menu-toggle { display: none; border: 0; background: transparent; font-size: 22px; }
.content { max-width: 1540px; margin: auto; padding: 30px 34px 60px; }

.flash-stack { position: fixed; z-index: 90; top: 18px; right: 22px; display: grid; gap: 8px; width: min(390px, calc(100vw - 40px)); }
.flash { display: flex; justify-content: space-between; padding: 13px 15px; color: #fff; background: var(--ink); box-shadow: var(--shadow); font-size: 12px; }
.flash button { color: inherit; background: none; border: 0; cursor: pointer; }
.flash-success { border-left: 4px solid var(--green); }
.flash-error { border-left: 4px solid var(--red); }
.flash-info { border-left: 4px solid var(--gold); }

/* Shared dashboard components */
.panel { background: var(--surface); border: 1px solid var(--line); }
.panel-header { display: flex; align-items: center; justify-content: space-between; min-height: 76px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.panel-header h2 { margin: 0; font-size: 17px; letter-spacing: -.025em; }
.panel-number { color: #4b4946; font-size: 34px; font-weight: 300; }
.panel-lead { margin: 0; padding: 20px; color: #a19e96; max-width: 430px; }
.dark-panel { color: #fff; background: var(--ink-2); border-color: var(--ink-2); }
.dark-panel .panel-header { border-color: #303030; }
.dark-panel .eyebrow { color: #666; }
.count-label { color: var(--muted); font-size: 10px; letter-spacing: .06em; }
.empty { display: grid; place-items: start; gap: 5px; min-height: 150px; padding: 44px 20px; color: var(--muted); }
.empty strong { color: #373531; font-size: 14px; }
.empty-large { place-items: center; min-height: 360px; text-align: center; }
.empty-number { color: #d0ccc2; font-size: 42px; font-weight: 700; }
.compact-empty { min-height: 90px; padding: 28px 0; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 12px; }
.stat-card { position: relative; min-height: 168px; padding: 21px; overflow: hidden; background: #fff; border: 1px solid var(--line); }
.stat-card::after { position: absolute; right: -33px; bottom: -58px; width: 130px; height: 130px; border: 1px solid #e7e4dd; border-radius: 50%; content: ""; }
.stat-card.accent { background: var(--gold); border-color: var(--gold); }
.stat-card.accent::after { border-color: rgba(10,10,10,.18); }
.stat-card p { margin: 15px 0 3px; color: var(--muted); font-size: 11px; }
.stat-card.accent p { color: #4a3a1b; }
.stat-card > strong { display: block; font-size: 43px; line-height: 1; letter-spacing: -.08em; }
.stat-card small { color: var(--muted); font-size: 9px; }
.stat-card.accent small { color: #6a5429; }
.stat-index { color: #aaa69d; font-size: 9px; letter-spacing: .16em; }
.stat-card.accent .stat-index { color: #755c27; }

.dashboard-grid, .project-detail-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; }
.span-7 { grid-column: span 7; }
.span-5 { grid-column: span 5; }
.activity-panel { margin-top: 12px; }
.activity-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.activity-grid article { display: flex; gap: 11px; min-height: 82px; padding: 18px; border-right: 1px solid var(--line); }
.activity-grid article:last-child { border-right: 0; }
.activity-grid div { display: grid; align-content: start; gap: 4px; }
.activity-grid strong { font-size: 10px; font-weight: 600; }
.activity-grid small { color: var(--muted); font-size: 8px; }
.activity-dot { flex: 0 0 auto; width: 7px; height: 7px; margin-top: 4px; background: var(--gold); border-radius: 50%; }

.appointment-list article { display: flex; align-items: center; gap: 14px; min-height: 75px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.appointment-list article:last-child { border-bottom: 0; }
.appointment-list time { display: grid; place-items: center; flex: 0 0 auto; width: 45px; height: 48px; color: #fff; background: var(--ink); }
.appointment-list time strong { font-size: 17px; line-height: 1; }
.appointment-list time span { color: var(--gold); font-size: 7px; letter-spacing: .12em; }
.appointment-list .grow { display: grid; }
.appointment-list .grow strong { font-size: 11px; }
.appointment-list .grow span { color: var(--muted); font-size: 9px; }
.quick-links { display: grid; padding: 0 20px 20px; }
.quick-links a { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; min-height: 52px; border-top: 1px solid #303030; }
.quick-links span { color: #666; font-size: 9px; }
.quick-links strong { font-size: 11px; }
.quick-links b { color: var(--gold); }
.quick-links a:hover strong { color: var(--gold); }
.project-list > a { display: grid; grid-template-columns: 1.5fr .8fr auto; align-items: center; gap: 20px; min-height: 78px; padding: 13px 20px; border-bottom: 1px solid var(--line); }
.project-list > a:last-child { border-bottom: 0; }
.project-list > a:hover { background: #faf9f6; }
.project-list > a > div:first-child { display: grid; }
.project-list strong { font-size: 11px; }
.project-list small { color: var(--muted); font-size: 8px; }
.project-code { color: #8a867e; font-size: 8px; font-weight: 700; letter-spacing: .12em; }
.progress-cell { display: grid; grid-template-columns: 1fr 30px; align-items: center; gap: 7px; min-width: 130px; }
.progress-cell > span, .progress { display: block; height: 4px; overflow: hidden; background: #e5e1d8; }
.progress-cell b, .progress b { display: block; height: 100%; background: var(--gold); }
.revision-mini-list > a { display: flex; align-items: center; gap: 11px; min-height: 67px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.revision-mini-list > a:last-child { border: 0; }
.revision-mini-list div { display: grid; flex: 1; }
.revision-mini-list strong { font-size: 10px; }
.revision-mini-list small { color: var(--muted); font-size: 8px; }
.priority-dot { display: inline-block; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; }
.priority-low { background: #aaa; }
.priority-normal { background: var(--blue); }
.priority-high { background: var(--gold); }
.priority-urgent { background: var(--red); }

.badge { display: inline-flex; align-items: center; justify-content: center; width: max-content; padding: 5px 8px; color: #4f4b44; background: #ebe8e1; font-size: 8px; font-weight: 700; letter-spacing: .04em; white-space: nowrap; }
.badge-success { color: #226248; background: #dceee5; }
.badge-primary { color: #725612; background: #f5e7c2; }
.badge-warning { color: #7a5519; background: #fae2bf; }
.badge-muted { color: #6f6c65; background: #e8e6e1; }
.badge-large { padding: 8px 12px; font-size: 9px; }

/* Toolbar / filters */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.filter-tabs { display: flex; flex-wrap: wrap; gap: 2px; }
.filter-tabs a { padding: 10px 15px; color: var(--muted); background: #e7e4dc; font-size: 10px; font-weight: 600; }
.filter-tabs a.active { color: #fff; background: var(--ink); }
.month-switcher { display: flex; align-items: center; gap: 14px; }
.month-switcher > a:not(.today-link) { display: grid; place-items: center; width: 36px; height: 36px; background: #fff; border: 1px solid var(--line); }
.month-switcher strong { min-width: 115px; text-align: center; font-size: 12px; }
.today-link { color: var(--muted); font-size: 10px; font-weight: 600; }
.search-form { display: flex; width: min(440px, 100%); }
.search-form input { background: #fff; }
.search-form button { padding: 0 18px; color: #fff; background: var(--ink); border: 0; cursor: pointer; font-size: 10px; font-weight: 700; }

/* Calendar & table */
.calendar { margin-bottom: 14px; overflow-x: auto; }
.calendar-head, .calendar-grid { min-width: 820px; }
.calendar-head { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--ink); color: #aaa; }
.calendar-head span { padding: 12px; border-right: 1px solid #2b2b2b; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-align: center; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.calendar-day { position: relative; min-height: 132px; padding: 32px 7px 7px; border: solid var(--line); border-width: 0 1px 1px 0; }
.calendar-day.outside { color: #bcb8af; background: #f5f4f0; }
.calendar-day.today-cell::before { position: absolute; top: 0; left: 0; width: 100%; height: 3px; background: var(--gold); content: ""; }
.day-number { position: absolute; top: 8px; left: 10px; font-size: 10px; font-weight: 700; }
.today-cell .day-number { color: #8a671b; }
.day-events { display: grid; gap: 4px; }
.calendar-event { display: grid; padding: 6px 7px; overflow: hidden; background: #f1eee8; border-left: 3px solid #aaa; }
.calendar-event:hover { background: #e9e5db; }
.calendar-event time { font-size: 7px; font-weight: 700; }
.calendar-event strong { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event small { overflow: hidden; color: var(--muted); font-size: 6px; text-overflow: ellipsis; white-space: nowrap; }
.event-primary { border-color: var(--gold); }
.event-success { border-color: var(--green); }
.event-muted { opacity: .56; }
.data-table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 850px; }
.data-table th { padding: 12px 15px; color: var(--muted); background: #f7f5f1; border-bottom: 1px solid var(--line); font-size: 8px; letter-spacing: .09em; text-align: left; text-transform: uppercase; }
.data-table td { padding: 14px 15px; border-bottom: 1px solid var(--line); font-size: 10px; }
.data-table td > strong, .data-table td > small { display: block; }
.data-table td > small { color: var(--muted); font-size: 8px; }
.data-table tr:last-child td { border-bottom: 0; }
.table-actions { text-align: right; }
.table-actions a { font-weight: 700; }

/* Project list */
.project-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.project-card { display: flex; flex-direction: column; min-height: 345px; background: #fff; border: 1px solid var(--line); transition: transform .18s, box-shadow .18s; }
.project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.project-card-top { display: flex; align-items: center; justify-content: space-between; padding: 15px 17px; border-bottom: 1px solid var(--line); }
.project-card-main { flex: 1; padding: 23px 18px; }
.project-card-main > small { color: var(--gold); font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.project-card-main h2 { margin: 9px 0; font-size: 19px; line-height: 1.15; letter-spacing: -.04em; }
.project-card-main p { display: -webkit-box; margin: 0; overflow: hidden; color: var(--muted); font-size: 10px; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.progress-block { padding: 0 18px 18px; }
.progress-block > div { display: flex; justify-content: space-between; margin-bottom: 7px; font-size: 9px; }
.project-meta { display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; min-height: 69px; border-top: 1px solid var(--line); }
.project-meta > span { display: grid; padding: 0 16px; }
.project-meta small { color: var(--muted); font-size: 7px; }
.project-meta strong { font-size: 10px; }
.project-meta .arrow { display: grid; place-items: center; align-self: stretch; min-width: 52px; padding: 0; color: #fff; background: var(--ink); font-size: 17px; }

/* Project detail */
.project-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; padding: 12px 0 28px; }
.project-title-block { max-width: 830px; }
.back-link { display: inline-block; margin-bottom: 25px; color: var(--muted); font-size: 10px; font-weight: 600; }
.project-kicker { display: flex; gap: 16px; margin-bottom: 9px; }
.project-title-block h2 { margin: 0 0 12px; font-size: clamp(32px, 4.2vw, 58px); line-height: .98; letter-spacing: -.065em; }
.project-title-block p { max-width: 760px; margin: 0; color: var(--muted); font-size: 12px; }
.project-hero-actions { display: flex; flex-direction: column; align-items: stretch; gap: 9px; min-width: 150px; }
.priority-label { font-size: 8px; font-weight: 700; letter-spacing: .1em; }
.priority-text-low { color: #777; }
.priority-text-normal { color: var(--blue); }
.priority-text-high { color: #97721d; }
.priority-text-urgent { color: var(--red); }
.project-overview { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 12px; background: #fff; border: 1px solid var(--line); }
.project-overview article { display: grid; min-height: 112px; padding: 20px; border-right: 1px solid var(--line); }
.project-overview article:last-child { border: 0; }
.project-overview small { color: var(--muted); font-size: 8px; letter-spacing: .05em; }
.project-overview strong { align-self: end; font-size: 14px; }
.project-overview span { color: var(--muted); font-size: 8px; }
.overview-progress > div { display: flex; justify-content: space-between; }
.overview-progress > .progress { align-self: end; }
.revision-board { display: grid; }
.revision-card { position: relative; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.revision-card:last-child { border-bottom: 0; }
.revision-card.done { opacity: .62; }
.revision-card-head { display: flex; justify-content: space-between; gap: 12px; }
.revision-card-head > div { display: flex; align-items: center; gap: 9px; }
.revision-card-head strong { font-size: 11px; }
.revision-card-head a { color: var(--muted); font-size: 8px; font-weight: 700; }
.revision-card p { margin: 12px 0; color: #55524d; font-size: 10px; }
.revision-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 8px; }
.revision-meta a { color: var(--ink); font-weight: 700; }
.inline-status { position: absolute; right: 18px; bottom: 14px; }
.inline-status select { width: 145px; padding: 6px 8px; border-color: var(--line); font-size: 8px; }
.note-form { display: grid; gap: 8px; padding: 16px; border-bottom: 1px solid var(--line); }
.note-form textarea { font-size: 10px; }
.note-form > div { display: flex; align-items: center; gap: 8px; }
.note-form select { width: 110px; padding: 8px; font-size: 9px; }
.check { display: flex; grid-gap: 5px; align-items: center; margin-right: auto; color: var(--muted); font-size: 9px; }
.check input { width: auto; }
.notes-list { max-height: 640px; overflow: auto; }
.notes-list article { padding: 16px; border-bottom: 1px solid var(--line); }
.notes-list article.pinned { background: #fffaf0; border-left: 3px solid var(--gold); }
.notes-list article > div { display: flex; justify-content: space-between; color: #9a7a34; font-size: 7px; font-weight: 700; letter-spacing: .08em; }
.notes-list time { color: var(--muted); font-weight: 400; }
.notes-list p { margin: 9px 0; color: #484641; font-size: 10px; }
.notes-list small { color: var(--muted); font-size: 8px; }

/* Global revisions */
.revision-table article { position: relative; display: grid; grid-template-columns: 48px minmax(280px, 1fr) 110px 105px 32px; align-items: center; gap: 14px; min-height: 118px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.revision-table article:last-child { border: 0; }
.priority-rail { position: absolute; inset: 0 auto 0 0; width: 3px; }
.priority-bg-low { background: #aaa; }
.priority-bg-normal { background: var(--blue); }
.priority-bg-high { background: var(--gold); }
.priority-bg-urgent { background: var(--red); }
.revision-round { display: grid; place-items: center; width: 42px; height: 42px; color: #fff; background: var(--ink); font-size: 11px; font-weight: 700; }
.revision-table-main { display: grid; min-width: 0; }
.revision-table-main > div { display: flex; align-items: center; gap: 10px; }
.revision-table-main > div small { color: var(--muted); font-size: 8px; }
.revision-table-main > a { margin: 4px 0; font-size: 13px; font-weight: 700; }
.revision-table-main p { margin: 0; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.revision-table-meta { display: grid; }
.revision-table-meta small, .revision-table-meta span { color: var(--muted); font-size: 8px; }
.revision-table-meta strong { font-size: 11px; }
.row-arrow { font-size: 16px; }

/* Clients */
.client-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.client-card { min-height: 258px; padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.client-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.client-card-head > span { display: grid; place-items: center; width: 48px; height: 48px; color: #fff; background: var(--ink); font-size: 11px; font-weight: 700; }
.client-card-head a { color: var(--muted); font-size: 8px; font-weight: 700; }
.client-card > small { color: #9a7425; font-size: 8px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.client-card h2 { margin: 5px 0 14px; font-size: 18px; letter-spacing: -.035em; }
.client-contact { display: grid; gap: 3px; color: var(--muted); font-size: 9px; }
.client-stats { display: flex; gap: 30px; margin-top: 25px; padding-top: 15px; border-top: 1px solid var(--line); }
.client-stats span { display: grid; }
.client-stats strong { font-size: 16px; }
.client-stats small { color: var(--muted); font-size: 7px; }

/* Drawer / forms */
.drawer-backdrop { position: fixed; z-index: 100; inset: 0; display: flex; justify-content: flex-end; background: rgba(0,0,0,.56); backdrop-filter: blur(3px); }
.drawer { width: min(560px, 100%); height: 100%; overflow-y: auto; background: #f7f5f0; box-shadow: -15px 0 50px rgba(0,0,0,.18); }
.drawer-head { position: sticky; z-index: 2; top: 0; display: flex; align-items: center; justify-content: space-between; min-height: 88px; padding: 20px 25px; background: #f7f5f0; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 22px; letter-spacing: -.04em; }
.drawer-head > a { display: grid; place-items: center; width: 34px; height: 34px; background: var(--ink); color: #fff; font-size: 20px; }
.stack-form { display: grid; gap: 16px; padding: 25px; }
.form-grid { display: grid; gap: 12px; }
.form-grid.two { grid-template-columns: repeat(2, 1fr); }
.range-value { float: right; color: #8c6b24; }
input[type="range"] { padding: 0; accent-color: var(--gold); box-shadow: none; border: 0; }

/* Auth */
.auth-page { display: grid; min-height: 100vh; background: var(--ink); }
.auth-panel { display: grid; grid-template-columns: 1.15fr .85fr; min-height: 100vh; }
.auth-art { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 46px; overflow: hidden; color: #fff; background: var(--ink); }
.auth-art::before, .auth-art::after { position: absolute; border: 1px solid #2a2a2a; border-radius: 50%; content: ""; }
.auth-art::before { right: -15vw; bottom: -35vw; width: 70vw; height: 70vw; }
.auth-art::after { right: 4vw; bottom: -14vw; width: 38vw; height: 38vw; border-color: var(--gold); opacity: .5; }
.auth-art > * { position: relative; z-index: 1; }
.auth-art h1 { max-width: 780px; margin: 10px 0; font-size: clamp(42px, 6vw, 86px); line-height: .91; letter-spacing: -.07em; }
.auth-art > div p:last-child { max-width: 470px; color: #8d8b86; }
.art-index { color: #666; font-size: 10px; letter-spacing: .2em; }
.auth-form-wrap { display: grid; place-items: center; padding: 38px; background: var(--paper); }
.auth-form { display: grid; gap: 17px; width: min(390px, 100%); }
.auth-form h2 { margin: 0; font-size: 30px; letter-spacing: -.05em; }
.auth-form > p { margin: 0; }
.form-error { padding: 12px 14px; color: #7c2722; background: #f6ddda; border-left: 3px solid var(--red); font-size: 10px; }
.setup-warning { display: grid; gap: 3px; padding: 13px; background: #f4e5bd; border-left: 3px solid var(--gold); }
.setup-warning strong { font-size: 10px; }
.setup-warning span { color: #705e36; font-size: 9px; }

/* Public booking */
.booking-page { min-height: 100vh; color: #fff; background: var(--ink); }
.booking-header, .booking-footer { display: flex; align-items: center; justify-content: space-between; max-width: 1500px; margin: auto; padding: 26px 42px; }
.booking-header { border-bottom: 1px solid #2a2a2a; }
.booking-header > span, .booking-footer { color: #64625f; font-size: 8px; letter-spacing: .16em; }
.booking-main { display: grid; grid-template-columns: 1.08fr .92fr; min-height: calc(100vh - 173px); max-width: 1500px; margin: auto; }
.booking-copy { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 55px 7vw 55px 42px; overflow: hidden; border-right: 1px solid #2a2a2a; }
.booking-copy::after { position: absolute; right: -250px; bottom: -390px; width: 730px; height: 730px; border: 1px solid #333; border-radius: 50%; content: ""; }
.booking-copy h1 { position: relative; z-index: 1; margin: 10px 0 25px; font-size: clamp(44px, 5.8vw, 86px); line-height: .95; letter-spacing: -.075em; }
.booking-copy h1 em { color: var(--gold); font-style: normal; }
.booking-copy > p:not(.eyebrow) { max-width: 620px; color: #8d8a84; font-size: 13px; }
.booking-steps { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 28px; margin-top: 45px; }
.booking-steps span { display: grid; color: #98958f; font-size: 9px; }
.booking-steps b { margin-bottom: 4px; color: var(--gold); font-size: 8px; letter-spacing: .1em; }
.booking-card { display: grid; place-items: center; padding: 45px; background: #121212; }
.booking-form { display: grid; gap: 14px; width: min(540px, 100%); padding: 28px; color: var(--ink); background: var(--paper); }
.booking-form input, .booking-form select, .booking-form textarea { background: #fff; }
.form-heading { display: flex; justify-content: space-between; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.form-heading span { font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.form-heading strong { color: var(--muted); font-size: 8px; }
.privacy-note { color: var(--muted); font-size: 7px; text-align: center; }
.honey { position: absolute !important; left: -9999px !important; }
.success-state { display: grid; justify-items: start; max-width: 480px; }
.success-state h2 { margin: 6px 0; font-size: 44px; letter-spacing: -.06em; }
.success-state p { color: #88857f; }
.success-icon { display: grid; place-items: center; width: 65px; height: 65px; margin-bottom: 28px; color: var(--ink); background: var(--gold); font-size: 28px; }

/* Magic Flow v2 */
.nav { overflow-y: auto; }
.table-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; white-space: nowrap; }
.flow-link { color: #8c6718; font-size: 8px; font-weight: 700; }
.conversion-summary { display: flex; align-items: center; gap: 14px; padding: 20px 25px; background: #111; color: #fff; }
.conversion-summary .brand-mark { color: var(--gold); }
.conversion-summary div { display: grid; }
.conversion-summary strong { font-size: 12px; }
.conversion-summary small { color: #85827c; font-size: 9px; }
.form-callout { display: grid; gap: 3px; padding: 13px 14px; background: #f4e6c3; border-left: 3px solid var(--gold); }
.form-callout strong { font-size: 10px; }
.form-callout span { color: #725c2f; font-size: 9px; }
.money-stat > strong { margin-top: 5px; font-size: clamp(24px, 2.8vw, 38px); letter-spacing: -.06em; }
.task-due-mini { display: grid; min-width: 90px; }
.task-due-mini small { color: var(--muted); font-size: 7px; }
.task-due-mini strong { font-size: 10px; }
.compact-search { margin-left: auto; max-width: 330px; }

/* Kanban workflow */
.kanban-wrap { width: 100%; overflow-x: auto; padding-bottom: 12px; }
.kanban-board { display: grid; grid-template-columns: repeat(6, minmax(245px, 1fr)); gap: 10px; min-width: 1530px; }
.kanban-board.single-kanban { grid-template-columns: minmax(300px, 1fr); min-width: 0; }
.kanban-column { align-self: start; background: #e9e6df; border: 1px solid #d9d5cc; }
.kanban-column > header { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px; background: #f8f6f1; border-bottom: 1px solid var(--line); }
.kanban-column > header strong { flex: 1; font-size: 9px; letter-spacing: .02em; }
.kanban-column > header b { display: grid; place-items: center; min-width: 22px; height: 22px; color: var(--muted); background: #e8e4dc; font-size: 8px; }
.stage-signal { width: 7px; height: 7px; background: #999; border-radius: 50%; }
.stage-recording_planned .stage-signal { background: #9c9b97; }
.stage-recording_done .stage-signal { background: #6c83a5; }
.stage-files_sent .stage-signal { background: #9775a8; }
.stage-mix_mastering .stage-signal { background: var(--gold); }
.stage-revision_stage .stage-signal { background: #d47c51; }
.stage-ready_delivery .stage-signal { background: #65a085; }
.stage-completed .stage-signal { background: var(--green); }
.kanban-cards { display: grid; gap: 8px; padding: 8px; }
.task-card { display: grid; padding: 14px; background: #fff; border: 1px solid #d8d4cb; transition: transform .15s, box-shadow .15s; }
.task-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(10,10,10,.08); }
.task-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.task-card > small { color: #9a7629; font-size: 7px; font-weight: 700; text-transform: uppercase; }
.task-card h3 { margin: 4px 0 7px; font-size: 14px; line-height: 1.2; letter-spacing: -.035em; }
.task-card > p { display: -webkit-box; margin: 0 0 12px; overflow: hidden; color: var(--muted); font-size: 8px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.task-card-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.task-card-facts span { display: grid; }
.task-card-facts b { font-size: 9px; }
.task-card-facts small { color: var(--muted); font-size: 6px; letter-spacing: .06em; }
.task-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 11px; color: var(--muted); font-size: 7px; }
.kanban-empty { padding: 28px 8px; color: #aaa69e; font-size: 8px; text-align: center; }

/* Task workspace */
.task-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; padding: 8px 0 26px; }
.task-page-head .back-link { margin-bottom: 18px; }
.task-page-head h2 { max-width: 850px; margin: 4px 0; font-size: clamp(34px, 4.2vw, 58px); line-height: .98; letter-spacing: -.065em; }
.task-page-head > div:first-child > p:last-child { margin: 10px 0 0; color: var(--muted); }
.stage-track { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 12px; background: #fff; border: 1px solid var(--line); }
.stage-track form { position: relative; border-right: 1px solid var(--line); }
.stage-track form:last-child { border: 0; }
.stage-track form::after { position: absolute; left: 0; bottom: -1px; width: 0; height: 3px; background: var(--gold); content: ""; }
.stage-track form.passed::after, .stage-track form.current::after { width: 100%; }
.stage-track form.passed::after { background: #aaa; }
.stage-track button { display: grid; width: 100%; min-height: 70px; padding: 12px; text-align: left; background: transparent; border: 0; cursor: pointer; }
.stage-track button:hover { background: #f8f6f1; }
.stage-track button span { color: #aaa69e; font-size: 7px; letter-spacing: .08em; }
.stage-track button strong { align-self: end; font-size: 8px; }
.stage-track .current button { background: #fff8e9; }
.stage-track .current button span { color: #8b691f; }
.task-workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) 315px; gap: 12px; align-items: start; }
.task-document { background: #fff; border: 1px solid var(--line); }
.task-intro, .notion-section { padding: 34px; border-bottom: 1px solid var(--line); }
.task-intro h3, .notion-section h3, .task-properties h3 { margin: 0; font-size: 20px; letter-spacing: -.04em; }
.task-intro > p:last-of-type { max-width: 850px; margin: 18px 0 0; color: #4e4b45; font-size: 11px; }
.file-link-card { display: flex; align-items: center; gap: 13px; max-width: 520px; margin-top: 24px; padding: 13px; color: #fff; background: var(--ink); }
.file-link-card > span { display: grid; place-items: center; width: 38px; height: 38px; color: var(--ink); background: var(--gold); font-size: 16px; }
.file-link-card > div { display: grid; }
.file-link-card strong { font-size: 10px; }
.file-link-card small { color: #7d7a74; font-size: 7px; }
.notion-section-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; }
.notion-section-head > span { color: var(--muted); font-size: 9px; }
.checklist-list { display: grid; }
.checklist-list form { border-top: 1px solid #ebe8e1; }
.checklist-list button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 2px; background: transparent; border: 0; cursor: pointer; text-align: left; }
.checklist-list button span { display: grid; place-items: center; flex: 0 0 auto; width: 17px; height: 17px; border: 1px solid #bcb8af; font-size: 9px; }
.checklist-list button strong { font-size: 10px; font-weight: 500; }
.checklist-list form.done button span { color: #fff; background: var(--green); border-color: var(--green); }
.checklist-list form.done button strong { color: #9a9790; text-decoration: line-through; }
.checklist-add { display: flex; margin-top: 10px; }
.checklist-add input { border-style: dashed; font-size: 9px; }
.checklist-add button { padding: 0 18px; color: #fff; background: var(--ink); border: 0; cursor: pointer; font-size: 9px; }
.notion-note-form { display: grid; gap: 0; margin-bottom: 26px; background: #faf9f6; border: 1px solid var(--line); }
.notion-toolbar { display: flex; align-items: center; gap: 14px; min-height: 43px; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.notion-toolbar select { width: 135px; padding: 7px; background: #fff; font-size: 8px; }
.notion-title-input, .notion-note-form textarea { border: 0; box-shadow: none !important; background: transparent; }
.notion-title-input { padding: 18px 18px 4px; font-size: 16px; font-weight: 700; letter-spacing: -.03em; }
.notion-note-form textarea { padding: 12px 18px 18px; font-size: 10px; line-height: 1.7; }
.notion-note-form .button { justify-self: end; margin: 0 10px 10px; }
.notion-blocks { display: grid; gap: 10px; }
.notion-block { padding: 19px 20px; background: #faf9f6; border: 1px solid #e3e0d9; border-left: 3px solid #c6c2b9; }
.notion-block.pinned { background: #fffaf0; border-left-color: var(--gold); }
.notion-block.type-brief { border-left-color: #6c83a5; }
.notion-block.type-recording { border-left-color: #9775a8; }
.notion-block.type-mix { border-left-color: var(--gold); }
.notion-block.type-revision { border-left-color: #d47c51; }
.notion-block.type-delivery { border-left-color: var(--green); }
.notion-block-meta { display: flex; justify-content: space-between; color: #9a7629; font-size: 7px; font-weight: 700; letter-spacing: .08em; }
.notion-block h4 { margin: 11px 0 3px; font-size: 13px; }
.notion-block p { margin: 7px 0; color: #4f4c46; font-size: 10px; line-height: 1.7; }
.notion-block > small { color: var(--muted); font-size: 7px; }
.task-properties { display: grid; gap: 12px; }
.task-properties > section { padding: 22px; background: #fff; border: 1px solid var(--line); }
.task-properties dl { display: grid; margin: 18px 0 0; }
.task-properties dl > div { display: grid; grid-template-columns: 83px 1fr; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.task-properties dt { color: var(--muted); font-size: 8px; }
.task-properties dd { margin: 0; font-size: 9px; font-weight: 600; text-align: right; }
.task-money { color: #fff; background: var(--ink) !important; border-color: var(--ink) !important; }
.task-money .eyebrow { color: #686661; }
.task-money > strong { display: block; margin: 18px 0 10px; color: var(--gold); font-size: 30px; letter-spacing: -.06em; }
.payment-track { height: 5px; margin-bottom: 14px; overflow: hidden; background: #333; }
.payment-track span { display: block; height: 100%; background: var(--gold); }
.task-money > div:not(.payment-track) { display: flex; justify-content: space-between; padding: 6px 0; color: #8d8981; font-size: 8px; }
.task-money > div b { color: #fff; }
.mini-timeline { display: grid; margin-top: 18px; }
.mini-timeline article { display: flex; gap: 10px; min-height: 46px; }
.mini-timeline article > span { position: relative; flex: 0 0 auto; width: 8px; height: 8px; margin-top: 3px; background: var(--gold); border-radius: 50%; }
.mini-timeline article > span::after { position: absolute; top: 8px; left: 3px; width: 1px; height: 38px; background: var(--line); content: ""; }
.mini-timeline article:last-child > span::after { display: none; }
.mini-timeline div { display: grid; align-content: start; }
.mini-timeline strong { font-size: 9px; }
.mini-timeline small { color: var(--muted); font-size: 7px; }

/* Client history */
.client-profile-head { display: flex; align-items: center; gap: 22px; padding: 5px 0 28px; }
.client-profile-head .back-link { margin: 0 0 13px; }
.client-profile-head h2 { margin: 2px 0; font-size: clamp(32px, 4vw, 55px); line-height: 1; letter-spacing: -.06em; }
.client-profile-head p { margin: 0; color: var(--muted); }
.client-avatar-large { display: grid; place-items: center; flex: 0 0 auto; width: 94px; height: 94px; color: var(--ink); background: var(--gold); font-size: 23px; font-weight: 700; }
.client-note-strip { display: grid; grid-template-columns: 190px 1fr; gap: 15px; margin-bottom: 12px; padding: 18px 20px; background: #fff8e8; border: 1px solid #ead8ad; }
.client-note-strip > span { color: #8c6718; font-size: 8px; font-weight: 700; letter-spacing: .08em; }
.client-note-strip p { margin: 0; color: #5c5038; font-size: 10px; }
.client-history-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; }
.span-8 { grid-column: span 8; }
.span-4 { grid-column: span 4; }
.client-task-history > a { display: grid; grid-template-columns: 8px minmax(220px,1fr) 95px 80px auto 18px; align-items: center; gap: 13px; min-height: 82px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.client-task-history > a:hover { background: #faf9f6; }
.client-task-history > a > div { display: grid; }
.client-task-history strong { font-size: 10px; }
.client-task-history small { color: var(--muted); font-size: 7px; }
.client-projects-panel { margin-top: 12px; }
.client-detail-link { display: inline-block; margin-top: 12px; color: #87651e; font-size: 8px; font-weight: 700; }

/* Finance */
.finance-mode { display: grid; margin-left: auto; margin-right: 10px; }
.finance-mode span { font-size: 8px; font-weight: 700; letter-spacing: .09em; }
.finance-mode small { color: var(--muted); font-size: 7px; }
.finance-period-nav { display: flex; align-items: center; gap: 10px; }
.finance-period-nav a { display: grid; place-items: center; width: 30px; height: 30px; background: #fff; border: 1px solid var(--line); }
.finance-period-nav strong { min-width: 105px; font-size: 9px; text-align: center; }
.finance-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.finance-kpi { min-height: 150px; padding: 20px; background: #fff; border: 1px solid var(--line); }
.finance-kpi.revenue { background: var(--gold); border-color: var(--gold); }
.finance-kpi.net { color: #fff; background: var(--ink); border-color: var(--ink); }
.finance-kpi.net.negative { background: #5f2622; border-color: #5f2622; }
.finance-kpi > span { color: var(--muted); font-size: 7px; font-weight: 700; letter-spacing: .1em; }
.finance-kpi.revenue > span { color: #765c25; }
.finance-kpi > strong { display: block; margin: 23px 0 2px; font-size: clamp(24px, 2.7vw, 39px); line-height: 1; letter-spacing: -.07em; }
.finance-kpi small { color: var(--muted); font-size: 7px; }
.finance-chart-panel { margin-bottom: 12px; }
.chart-legend { display: flex; gap: 14px; color: var(--muted); font-size: 8px; }
.chart-legend span { display: flex; align-items: center; gap: 5px; }
.chart-legend i { width: 9px; height: 9px; }
.legend-revenue { background: var(--gold); }
.legend-expense { background: #4d4b47; }
.canvas-wrap { position: relative; height: 340px; padding: 20px; }
.canvas-wrap canvas { width: 100%; height: 100%; }
.finance-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; margin-bottom: 12px; }
.panel-total { font-size: 15px; }
.finance-job-list > a { display: grid; grid-template-columns: 70px minmax(180px,1fr) 90px 90px 15px; align-items: center; gap: 12px; min-height: 72px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.finance-job-list > a:hover { background: #faf9f6; }
.finance-job-list div { display: grid; }
.finance-job-list strong { font-size: 10px; }
.finance-job-list small { color: var(--muted); font-size: 7px; }
.revenue-mix { display: grid; padding: 20px; }
.revenue-mix article { position: relative; display: grid; padding: 13px 0; border-bottom: 1px solid var(--line); }
.revenue-mix article > div { display: flex; justify-content: space-between; font-size: 9px; }
.mix-bar { height: 4px; margin: 8px 0 3px; overflow: hidden; background: #e6e2d9; }
.mix-bar b { display: block; height: 100%; background: var(--gold); }
.revenue-mix article > small { color: var(--muted); font-size: 7px; }
.expense-categories { display: grid; gap: 7px; padding: 0 20px 20px; }
.expense-categories > div { display: flex; justify-content: space-between; font-size: 8px; }
.transaction-type { padding: 4px 7px; font-size: 7px; font-weight: 700; }
.transaction-type.income { color: #236249; background: #dceee5; }
.transaction-type.expense { color: #802f2a; background: #f3dfdc; }
.amount-positive { color: var(--green); }
.amount-negative { color: var(--red); }

/* Composition catalog */
.composition-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 8px 0 26px; }
.composition-hero h2 { margin: 0; font-size: clamp(38px, 5vw, 68px); line-height: .95; letter-spacing: -.07em; }
.composition-hero p:last-child { max-width: 660px; margin: 13px 0 0; color: var(--muted); }
.composition-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 12px; background: #fff; border: 1px solid var(--line); }
.composition-stats article { display: flex; align-items: center; gap: 18px; min-height: 105px; padding: 20px; border-right: 1px solid var(--line); }
.composition-stats article:last-child { border: 0; }
.composition-stats article > span { color: #b0aca3; font-size: 8px; letter-spacing: .1em; }
.composition-stats article > div { display: grid; }
.composition-stats strong { font-size: 22px; letter-spacing: -.05em; }
.composition-stats small { color: var(--muted); font-size: 8px; }
.song-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.song-card { display: flex; flex-direction: column; min-height: 460px; background: #fff; border: 1px solid var(--line); }
.song-card > header { display: flex; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.song-index { color: #aaa69e; font-size: 8px; letter-spacing: .1em; }
.song-wave { display: flex; align-items: center; justify-content: center; gap: 4px; height: 74px; overflow: hidden; background: var(--ink); }
.song-wave i { display: block; width: 3px; height: 18px; background: var(--gold); }
.song-wave i:nth-child(2n) { height: 38px; }
.song-wave i:nth-child(3n) { height: 55px; }
.song-wave i:nth-child(5n) { height: 25px; }
.song-main { flex: 1; padding: 22px 18px; }
.song-main h2 { margin: 4px 0 18px; font-size: 23px; letter-spacing: -.05em; }
.song-authors { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.song-authors span { display: grid; }
.song-authors small, .song-rights small { color: var(--muted); font-size: 7px; }
.song-authors strong { font-size: 9px; }
.song-main blockquote { margin: 20px 0 0; padding: 12px; color: #77736b; background: #f7f5f1; border-left: 2px solid var(--gold); font-size: 8px; white-space: pre-line; }
.song-rights { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.song-rights span { display: grid; padding: 14px 18px; border-right: 1px solid var(--line); }
.song-rights span:last-child { border: 0; }
.song-rights strong { font-size: 13px; }
.sold-to { display: grid; grid-template-columns: 50px 1fr auto; align-items: center; gap: 8px; padding: 11px 17px; color: #fff; background: #245f47; }
.sold-to span, .sold-to small { color: #b9d8ca; font-size: 7px; }
.sold-to strong { font-size: 9px; }
.song-card > footer { display: flex; align-items: center; justify-content: space-between; min-height: 54px; padding: 0 17px; color: var(--muted); background: #f7f5f1; border-top: 1px solid var(--line); font-size: 8px; font-weight: 700; }
.song-card > footer a:last-child { color: var(--ink); }
.drawer-wide { width: min(680px, 100%); }
.sold-fields { display: grid; gap: 16px; padding: 16px; background: #eef6f1; border: 1px solid #c9dfd2; }
.sold-fields.hidden { display: none; }

@media (max-width: 1180px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .activity-grid { grid-template-columns: repeat(2, 1fr); }
    .project-card-grid { grid-template-columns: repeat(2, 1fr); }
    .client-grid { grid-template-columns: repeat(2, 1fr); }
    .finance-kpis { grid-template-columns: repeat(2, 1fr); }
    .song-grid { grid-template-columns: repeat(2, 1fr); }
    .booking-main { grid-template-columns: 1fr; }
    .booking-copy { min-height: 560px; border-right: 0; border-bottom: 1px solid #2a2a2a; }
}

@media (max-width: 900px) {
    .app-shell { padding-left: 0; }
    .sidebar { transform: translateX(-100%); transition: transform .25s; }
    .sidebar.open { transform: translateX(0); box-shadow: 15px 0 60px rgba(0,0,0,.32); }
    .menu-toggle { display: block; }
    .topbar { min-height: 82px; padding: 14px 20px; }
    .topbar > div:nth-child(2) { flex: 1; margin-left: 15px; }
    .topbar h1 { font-size: 19px; }
    .topbar-actions .today { display: none; }
    .content { padding: 20px 18px 50px; }
    .span-7, .span-5 { grid-column: span 12; }
    .span-8, .span-4 { grid-column: span 12; }
    .task-workspace-grid { grid-template-columns: 1fr; }
    .stage-track { overflow-x: auto; grid-template-columns: repeat(7, minmax(130px,1fr)); }
    .stage-track form { min-width: 130px; }
    .client-history-grid, .finance-grid { grid-template-columns: repeat(12, 1fr); }
    .song-grid { grid-template-columns: repeat(2, 1fr); }
    .project-overview { grid-template-columns: repeat(2, 1fr); }
    .project-overview article:nth-child(2) { border-right: 0; }
    .project-overview article { border-bottom: 1px solid var(--line); }
    .project-overview article:nth-child(n+3) { border-bottom: 0; }
    .project-hero { align-items: flex-start; flex-direction: column; }
    .project-hero-actions { flex-direction: row; }
    .revision-table article { grid-template-columns: 48px 1fr auto; }
    .revision-table-meta { display: none; }
    .revision-table article > .badge { display: none; }
    .auth-panel { grid-template-columns: 1fr; }
    .auth-art { min-height: 48vh; padding: 32px; }
    .auth-form-wrap { padding: 45px 25px; }
}

@media (max-width: 650px) {
    .topbar-actions .button { display: none; }
    .stats-grid, .project-card-grid, .client-grid { grid-template-columns: 1fr; }
    .finance-kpis, .song-grid, .composition-stats { grid-template-columns: 1fr; }
    .composition-stats article { border-right: 0; border-bottom: 1px solid var(--line); }
    .composition-hero, .task-page-head, .client-profile-head { align-items: flex-start; flex-direction: column; }
    .task-page-head .project-hero-actions { width: 100%; }
    .task-intro, .notion-section { padding: 23px 17px; }
    .task-properties { grid-template-columns: 1fr; }
    .client-note-strip { grid-template-columns: 1fr; }
    .client-task-history > a { grid-template-columns: 8px 1fr auto; }
    .client-task-history > a > div:nth-of-type(n+2), .client-task-history > a > .badge { display: none; }
    .finance-job-list > a { grid-template-columns: 58px 1fr auto; }
    .finance-job-list > a > div:nth-of-type(n+2) { display: none; }
    .finance-mode { display: none; }
    .canvas-wrap { height: 280px; padding: 10px; }
    .stat-card { min-height: 132px; }
    .activity-grid { grid-template-columns: 1fr; }
    .activity-grid article { border-right: 0; border-bottom: 1px solid var(--line); }
    .project-list > a { grid-template-columns: 1fr auto; }
    .progress-cell { display: none; }
    .toolbar { align-items: stretch; flex-direction: column; }
    .filter-tabs { overflow-x: auto; flex-wrap: nowrap; }
    .filter-tabs a { white-space: nowrap; }
    .month-switcher { justify-content: space-between; }
    .form-grid.two { grid-template-columns: 1fr; }
    .project-title-block h2 { font-size: 38px; }
    .project-overview { grid-template-columns: 1fr; }
    .project-overview article, .project-overview article:nth-child(2), .project-overview article:nth-child(n+3) { border: 0; border-bottom: 1px solid var(--line); }
    .project-overview article:last-child { border-bottom: 0; }
    .inline-status { position: static; margin-top: 12px; }
    .revision-table article { grid-template-columns: 42px 1fr 20px; padding: 13px 12px; }
    .revision-table-main p { max-width: 55vw; }
    .client-grid { display: block; }
    .client-card { border-right: 0; }
    .booking-header, .booking-footer { padding: 22px; }
    .booking-header > span { display: none; }
    .booking-copy { min-height: 500px; padding: 45px 22px; }
    .booking-copy h1 { font-size: 48px; }
    .booking-card { padding: 20px 12px; }
    .booking-form { padding: 20px 16px; }
    .booking-footer { gap: 20px; }
}
