@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); }
.filter-tabs a b { margin-left: 5px; color: var(--gold); }
.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; }
.appointment-table { min-width: 1180px; }
.appointment-table .time-value { color: #8e6a1d; font-size: 15px; }
.phone-link { font-weight: 600; white-space: nowrap; }
.service-chip { display: inline-flex; max-width: 230px; padding: 7px 9px; background: #f4efe3; border-left: 3px solid var(--gold); font-size: 9px; font-weight: 700; }
.inline-form { margin: 0; }
.inline-form select { min-width: 125px; padding: 8px 9px; border-color: var(--line); font-size: 9px; }
.workflow-added { color: #287150; font-size: 9px; font-weight: 700; white-space: nowrap; }

/* 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, .client-stats a { display: grid; }
.client-stats strong { font-size: 16px; }
.client-stats small { color: var(--muted); font-size: 7px; }
.client-stats a:hover strong { color: #926d1d; }

/* 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); }
.form-section-title { display: flex; align-items: center; gap: 12px; margin-top: 5px; padding-top: 17px; border-top: 1px solid var(--line); }
.form-section-title:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.form-section-title > span { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; color: var(--ink); background: var(--gold); font-size: 9px; font-weight: 700; }
.form-section-title > div { display: grid; }
.form-section-title strong { font-size: 11px; }
.form-section-title small { color: var(--muted); font-size: 8px; font-weight: 400; }
.form-help { display: block; margin-top: -8px; color: var(--muted); font-size: 7px; }
.existing-client-picker { display: grid; gap: 6px; padding: 14px; background: #eeeae1; border-left: 3px solid var(--gold); }
.existing-client-picker[hidden] { display: none; }
.existing-client-picker small { color: var(--muted); font-size: 8px; }
.service-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.service-options.single-option { grid-template-columns: 1fr; }
.service-option { position: relative; cursor: pointer; }
.service-option input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.service-option > span { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 10px; background: #fff; border: 1px solid var(--line); transition: border-color .15s, background .15s; }
.service-option b { display: grid; place-items: center; flex: 0 0 auto; width: 28px; height: 28px; color: var(--muted); background: #f0eee8; font-size: 8px; }
.service-option strong { font-size: 9px; line-height: 1.3; }
.service-option input:checked + span { background: #fff9eb; border-color: var(--gold); box-shadow: inset 3px 0 var(--gold); }
.service-option input:checked + span b { color: var(--ink); background: var(--gold); }
.range-value { float: right; color: #8c6b24; }
input[type="range"] { padding: 0; accent-color: var(--gold); box-shadow: none; border: 0; }

/* Workflow */
.workflow-guide { display: flex; margin-bottom: 12px; overflow-x: auto; background: var(--ink); scrollbar-color: var(--gold) #242424; scrollbar-width: thin; }
.workflow-guide article { display: grid; flex: 1 0 auto; gap: 7px; min-width: max-content; min-height: 82px; padding: 16px; color: #a6a39d; border-right: 1px solid #303030; }
.workflow-guide article:last-child { border-right: 0; }
.workflow-guide article span { color: var(--gold); font-size: 8px; letter-spacing: .12em; }
.workflow-guide article strong { color: #fff; font-size: 9px; line-height: 1.35; white-space: nowrap; }
.workflow-guide article.done { background: #173b2e; }
.workflow-toolbar-actions { display: flex; align-items: center; gap: 8px; }
.workflow-table { min-width: 1200px; }
.workflow-select-form select { min-width: 175px; }
.status-select { font-weight: 700; }
.status-select-success { color: #226248; background: #e5f1ea; }
.status-select-primary { color: #725612; background: #fff5dc; }
.status-select-warning { color: #7a5519; background: #fff0dc; }
.task-note-cell { max-width: 240px; }
.task-note-cell p { display: -webkit-box; max-width: 220px; margin: 0; overflow: hidden; color: #55524d; font-size: 9px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.task-note-cell > span { color: #aaa69e; font-size: 8px; }
.task-context { padding: 25px 25px 4px; }
.task-context h3 { margin: 12px 0 2px; font-size: 25px; letter-spacing: -.045em; }
.task-context p { margin: 0; color: var(--muted); }
.task-note-form { padding-top: 15px; }
.task-note-form textarea { min-height: 360px; line-height: 1.7; }
.task-note-form > small { margin-top: -8px; color: var(--muted); font-size: 8px; }
.active-filter { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 12px; padding: 12px 15px; color: #5b4a25; background: #f3e4bd; border-left: 3px solid var(--gold); font-size: 10px; }
.active-filter a { font-weight: 700; }
.manual-task-label { display: inline-flex; width: max-content; padding: 5px 8px; color: #68501d; background: #f5e7c2; font-size: 8px; font-weight: 700; white-space: nowrap; }

/* Workflow revisions */
.workflow-revisions-panel { margin-bottom: 12px; }
.workflow-revision-list { display: grid; }
.workflow-revision-card { border-bottom: 1px solid var(--line); }
.workflow-revision-card:last-child { border-bottom: 0; }
.workflow-revision-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 25px; padding: 20px; background: #faf8f3; border-bottom: 1px solid var(--line); }
.workflow-revision-card h3 { margin: 8px 0 3px; font-size: 20px; letter-spacing: -.04em; }
.workflow-revision-card header p { margin: 0; color: var(--muted); font-size: 9px; }
.revision-card-labels { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.workflow-revision-content { display: grid; grid-template-columns: .8fr 1.2fr; }
.revision-brief, .revision-notes-block { min-width: 0; padding: 20px; }
.revision-brief { background: #f4f1ea; border-right: 1px solid var(--line); }
.revision-brief > p:not(.eyebrow) { margin: 12px 0 0; color: #4c4943; font-size: 10px; line-height: 1.7; }
.revision-brief > span { color: var(--muted); font-size: 9px; }
.revision-notes-heading > div { display: flex; align-items: center; justify-content: space-between; }
.revision-notes-heading strong { color: #8e6c22; font-size: 9px; }
.workflow-revision-notes { display: grid; max-height: 390px; margin-top: 12px; overflow-y: auto; border: 1px solid var(--line); }
.workflow-revision-notes article { padding: 14px; background: #fff; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; }
.workflow-revision-notes article.completed { background: #f2f8f4; border-left-color: #2d7255; }
.workflow-revision-notes article:last-child { border-bottom: 0; }
.revision-note-top { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.revision-note-top > div { display: flex; align-items: center; gap: 7px; }
.workflow-revision-notes .revision-number { font-size: 10px; }
.revision-note-status { padding: 4px 6px; color: #7a5519; background: #fff0dc; font-size: 7px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.revision-note-status.is-completed { color: #225f46; background: #dceee3; }
.workflow-revision-notes time { color: var(--muted); font-size: 7px; }
.revision-note-author { display: block; margin-top: 5px; color: var(--muted); font-size: 7px; }
.workflow-revision-notes p { margin: 8px 0 0; color: #4c4943; font-size: 10px; line-height: 1.6; }
.revision-note-actions { display: flex; justify-content: flex-end; margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line); }
.revision-completed-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 11px; padding-top: 10px; color: #225f46; border-top: 1px solid #cfe0d5; font-size: 8px; font-weight: 800; }
.revision-completed-meta small { color: #688276; font-size: 7px; font-weight: 600; }
.revision-note-empty { margin-top: 12px; padding: 17px; color: var(--muted); background: #f7f5f0; border: 1px dashed #d2cec4; font-size: 9px; }
.revision-note-form { display: grid; gap: 9px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.revision-note-form textarea { font-size: 10px; }
.revision-note-form .button { justify-self: end; }

/* Finance */
.finance-filter-panel {
    display: grid;
    gap: 13px;
    margin-bottom: 16px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
}
.finance-filter-head,
.finance-filter-forms {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}
.finance-filter-head h2 {
    margin: 3px 0;
    font-size: 16px;
}
.finance-filter-head small {
    color: var(--muted);
    font-size: 8px;
}
.finance-period-tabs {
    display: inline-flex;
    gap: 3px;
    padding: 4px;
    overflow-x: auto;
    background: #f3f4f6;
    border-radius: 11px;
}
.finance-period-tabs a {
    padding: 8px 10px;
    color: #777982;
    border-radius: 8px;
    font-size: 8px;
    font-weight: 800;
    white-space: nowrap;
}
.finance-period-tabs a.active {
    color: #fff;
    background: var(--ink);
    box-shadow: 0 4px 12px rgba(20,21,25,.14);
}
.finance-search-form,
.finance-custom-date-form {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}
.finance-search-form { flex: 1; }
.finance-search-form label {
    display: grid;
    flex: 1;
    gap: 5px;
    min-width: 220px;
}
.finance-custom-date-form label {
    display: grid;
    gap: 5px;
}
.finance-search-form label > span,
.finance-custom-date-form label > span {
    color: #8b8d95;
    font-size: 7px;
    font-weight: 700;
}
.finance-search-form input,
.finance-custom-date-form input {
    min-height: 42px;
    background: #fafafb;
    border-color: #e6e7eb;
    border-radius: 10px;
    box-shadow: none;
}
.finance-custom-date-form input { width: 142px; }

.finance-kpi-grid {
    display: grid;
    grid-template-columns: 1.12fr repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}
.finance-kpi-grid > article {
    min-width: 0;
    min-height: 220px;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
}
.finance-kpi-total {
    display: grid;
    align-content: center;
    color: #fff;
    background: linear-gradient(135deg, #ff9b68, #ff7841) !important;
    border-color: transparent !important;
}
.finance-kpi-total .eyebrow,
.finance-kpi-total small { color: rgba(255,255,255,.73); }
.finance-kpi-total > strong {
    margin: 9px 0;
    font-size: clamp(30px, 3vw, 48px);
    line-height: 1;
    letter-spacing: -.065em;
}
.finance-kpi-breakdown {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 13px;
}
.finance-kpi-breakdown > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 11px;
    border-bottom: 1px solid #eff0f2;
}
.finance-kpi-breakdown h3 {
    margin: 4px 0 0;
    font-size: 11px;
    line-height: 1.3;
}
.finance-kpi-breakdown > header > strong {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    min-width: 27px;
    height: 27px;
    color: #a7522e;
    background: #fff0e8;
    border-radius: 8px;
    font-size: 9px;
}
.finance-kpi-list {
    display: grid;
    align-content: start;
    max-height: 145px;
    overflow-y: auto;
}
.finance-kpi-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 1px;
    border-bottom: 1px solid #f0f1f3;
}
.finance-kpi-list > div:last-child { border-bottom: 0; }
.finance-kpi-list span {
    overflow: hidden;
    color: #656770;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.finance-kpi-list strong {
    flex: 0 0 auto;
    color: var(--ink);
    font-size: 8px;
}
.finance-kpi-empty {
    align-self: center;
    margin: 0;
    color: #999ba3;
    font-size: 8px;
    line-height: 1.55;
}

.finance-table { min-width: 1080px; }
.finance-main-table th:nth-child(1) { width: 6%; }
.finance-main-table th:nth-child(2) { width: 17%; }
.finance-main-table th:nth-child(3) { width: 28%; }
.finance-main-table th:nth-child(4) { width: 14%; }
.finance-main-table th:nth-child(5) { width: 18%; }
.finance-main-table th:nth-child(6) { width: 17%; }
.finance-main-row { cursor: pointer; }
.finance-main-row.is-open { background: #fff8f3 !important; }
.finance-actions-cell { width: 64px; }
.finance-work-cell {
    display: block;
}
.finance-work-cell > div {
    display: grid;
    gap: 4px;
    min-width: 0;
}
.finance-work-cell > div > strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.finance-work-cell small {
    overflow: hidden;
    color: #8b8d95;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.finance-accordion-indicator {
    width: 36px;
    height: 32px;
    border-radius: 9px;
}
.finance-accordion-indicator svg { width: 14px; height: 14px; }
.finance-main-row.is-open .finance-accordion-indicator {
    color: #fff;
    background: #b85125;
    border-color: #b85125;
}
.finance-main-row.is-open .finance-accordion-indicator svg { transform: rotate(180deg); }
.finance-row-total {
    color: #b85125;
    font-size: 11px;
}
.finance-accordion-content { padding: 19px 22px 22px; }
.finance-item-table-wrap {
    margin-top: 13px;
    overflow-x: auto;
    background: #fff;
    border: 1px solid #e7e8eb;
    border-radius: 12px;
}
.finance-item-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}
.finance-item-table th,
.finance-item-table td {
    padding: 11px 13px;
    border-bottom: 1px solid #eff0f2;
    text-align: left;
}
.finance-item-table th {
    color: #8c8e96;
    background: #fafafb;
    font-size: 7px;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.finance-item-table td {
    color: #55575e;
    font-size: 9px;
}
.finance-item-table tr:last-child td { border-bottom: 0; }
.finance-item-table th:nth-child(1) { width: 26%; }
.finance-item-table th:nth-child(2) { width: 26%; }
.finance-item-table th:nth-child(3) { width: 27%; }
.finance-item-table th:nth-child(4) { width: 21%; }
.finance-item-table td:first-child strong { color: var(--ink); }
.money-input { position: relative; width: 160px; }
.money-input span { position: absolute; top: 50%; left: 11px; color: #8d6b20; font-weight: 700; transform: translateY(-50%); }
.money-input input { padding: 9px 10px 9px 28px; font-weight: 700; }
.finance-item-money { width: 190px; }
.finance-item-money input {
    width: 100%;
    min-height: 38px;
    background: #fafafb;
    border-color: #e4e5e8;
    border-radius: 9px;
    box-shadow: none;
}
.finance-table tfoot td { background: var(--ink); color: #fff; border: 0; }
.table-total { color: var(--gold); font-size: 16px; }

/* Team */
.page-lead { max-width: 660px; margin: 0; color: var(--muted); font-size: 11px; }
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.team-card { display: grid; grid-template-columns: auto 1fr; gap: 15px; min-height: 220px; padding: 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.team-avatar { display: grid; place-items: center; width: 55px; height: 55px; color: var(--ink); background: var(--gold); font-size: 12px; font-weight: 700; }
.team-main h2 { margin: 10px 0 3px; font-size: 17px; letter-spacing: -.035em; }
.team-main a { color: var(--muted); font-size: 8px; }
.team-stats { grid-column: 1 / -1; display: flex; align-self: end; gap: 34px; padding-top: 15px; border-top: 1px solid var(--line); }
.team-stats span { display: grid; }
.team-stats strong { font-size: 17px; }
.team-stats small { color: var(--muted); font-size: 7px; }

/* 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; }

@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); }
    .team-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; }
    .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; }
    .workflow-revision-content { grid-template-columns: 1fr; }
    .revision-brief { border-right: 0; border-bottom: 1px solid var(--line); }
    .finance-summary { grid-template-columns: 1fr 1fr; }
    .finance-summary .finance-total { grid-column: span 2; }
    .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, .team-grid { grid-template-columns: 1fr; }
    .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; }
    .workflow-toolbar-actions { align-items: stretch; flex-direction: column; }
    .workflow-toolbar-actions .button { width: 100%; }
    .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; }
    .service-options { grid-template-columns: 1fr; }
    .workflow-guide article { min-height: 68px; padding: 13px; }
    .finance-summary { grid-template-columns: 1fr; }
    .finance-summary .finance-total { grid-column: auto; }
    .finance-summary article { min-height: 120px; }
    .active-filter { align-items: flex-start; flex-direction: column; }
    .workflow-revision-card > header { flex-direction: column; }
    .workflow-revision-card > header .button { width: 100%; }
    .revision-brief, .revision-notes-block { padding: 15px; }
    .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; }
}

/* Modern light dashboard theme */
:root {
    --ink: #111114;
    --ink-2: #222226;
    --paper: #f5f6f8;
    --surface: #fff;
    --line: #e7e8ec;
    --line-dark: #dadce2;
    --muted: #888a93;
    --gold: #ff8950;
    --gold-2: #ffa06f;
    --green: #2f9d68;
    --red: #dc5b59;
    --blue: #6571d8;
    --shadow: 0 14px 40px rgba(22, 24, 29, .055);
}

body { color: var(--ink); background: var(--paper); }

input, select, textarea {
    min-height: 44px;
    padding: 11px 13px;
    background: #fafafd;
    border-color: #dfe1e7;
    border-radius: 11px;
}
textarea { min-height: 100px; }
input:hover, select:hover, textarea:hover { border-color: #cfd2da; }
input:focus, select:focus, textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(255, 137, 80, .13);
}

.eyebrow {
    margin-bottom: 5px;
    color: #a0a2aa;
    font-size: 8px;
    letter-spacing: .15em;
}

.button {
    min-height: 42px;
    padding: 10px 17px;
    border-radius: 10px;
    letter-spacing: 0;
    box-shadow: none;
}
.button-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--gold), #ff7540);
    box-shadow: 0 8px 18px rgba(255, 117, 64, .18);
}
.button-primary:hover { color: #fff; background: linear-gradient(135deg, #ff965f, #ff7540); }
.button-secondary { background: #fff; border-color: #d9dbe1; }
.button-secondary:hover { background: #f7f7f9; }
.button-small { min-height: 35px; border-radius: 9px; }
.text-link { color: #696b73; }
.text-link:hover { color: var(--gold); }

.app-shell {
    padding-left: 258px;
    transition: padding-left .22s ease;
}
.sidebar {
    width: 258px;
    color: var(--ink);
    background: #fff;
    border-right-color: var(--line);
    transition: width .22s ease, transform .25s ease;
}
.sidebar > .brand {
    height: 92px;
    padding: 0 25px;
    border-bottom-color: var(--line);
}
.brand { gap: 12px; }
.brand-mark {
    width: 40px;
    height: 40px;
    color: #fff;
    background: var(--ink);
    border: 0;
    border-radius: 11px;
    transform: none;
    box-shadow: 0 8px 18px rgba(17, 17, 20, .16);
}
.brand strong { font-size: 12px; letter-spacing: .12em; }
.brand small { color: #92949d; opacity: 1; }

.nav {
    gap: 5px;
    padding: 22px 16px;
    overflow-y: auto;
}
.nav a {
    min-height: 48px;
    gap: 11px;
    padding: 6px 9px;
    color: #6f7179;
    border: 0;
    border-radius: 11px;
    font-size: 11px;
    font-weight: 550;
    transition: color .18s, background .18s, transform .18s, box-shadow .18s;
}
.nav a:hover {
    color: var(--ink);
    background: #f4f4f6;
    transform: translateX(2px);
}
.nav a.active {
    color: #fff;
    background: var(--ink);
    border: 0;
    box-shadow: 0 9px 22px rgba(17, 17, 20, .15);
}
.nav a.active::after { display: none; }
.nav a .nav-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    color: #9698a0;
    background: #f0f1f3;
    border-radius: 8px;
}
.nav a.active .nav-icon { color: var(--gold); background: #29292d; }
.nav a .nav-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.nav a .nav-label { width: auto; color: inherit; font-size: inherit; letter-spacing: 0; }

.sidebar-footer {
    padding: 12px;
    border-top: 0;
}
.booking-link {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 9px;
    padding: 12px 13px;
    color: #5d5f67;
    background: #f3f4f6;
    border: 0;
    border-radius: 10px;
    font-size: 9px;
}
.booking-link:hover { color: var(--ink); background: #eceef1; }
.booking-link svg, .user-mini > a svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.user-mini {
    padding: 11px 10px;
    background: #fff8f3;
    border: 1px solid #ffe4d6;
    border-radius: 11px;
}
.user-mini > span {
    width: 35px;
    height: 35px;
    color: #fff;
    background: var(--gold);
    border-radius: 9px;
}
.user-mini strong { color: var(--ink); }
.user-mini small { color: #92949c; }
.user-mini > a { display: grid; place-items: center; color: #8d8f97; }
.user-mini > a:hover { color: var(--red); }
.sidebar-collapse-toggle {
    position: absolute;
    z-index: 3;
    top: 69px;
    right: -15px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    color: #74767e;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 9px;
    box-shadow: 0 7px 18px rgba(22,24,29,.12);
    cursor: pointer;
}
.sidebar-collapse-toggle:hover { color: var(--ink); background: #f7f7f9; }
.sidebar-collapse-toggle svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .22s ease;
}

@media (min-width: 901px) {
    .sidebar-collapsed-state .app-shell { padding-left: 78px; }
    .sidebar-collapsed-state .sidebar { width: 78px; }
    .sidebar-collapsed-state .sidebar > .brand { justify-content: center; padding: 0 10px; }
    .sidebar-collapsed-state .sidebar > .brand > span:last-child { display: none; }
    .sidebar-collapsed-state .nav { padding-right: 10px; padding-left: 10px; }
    .sidebar-collapsed-state .nav a {
        justify-content: center;
        padding-right: 6px;
        padding-left: 6px;
    }
    .sidebar-collapsed-state .nav a:hover { transform: none; }
    .sidebar-collapsed-state .nav a .nav-label { display: none; }
    .sidebar-collapsed-state .sidebar-footer { padding: 10px; }
    .sidebar-collapsed-state .booking-link {
        justify-content: center;
        padding-right: 10px;
        padding-left: 10px;
    }
    .sidebar-collapsed-state .booking-link span { display: none; }
    .sidebar-collapsed-state .sidebar-collapse-toggle svg { transform: rotate(180deg); }
}

.main { background: var(--paper); }
.topbar {
    position: sticky;
    z-index: 20;
    top: 0;
    min-height: 92px;
    padding: 16px 32px;
    background: rgba(255, 255, 255, .94);
    border-bottom-color: var(--line);
    box-shadow: 0 4px 18px rgba(22, 24, 29, .025);
}
.topbar h1 { font-size: 25px; letter-spacing: -.045em; }
.topbar-actions { gap: 12px; }
.today {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 13px;
    color: #73757d;
    background: #f5f6f8;
    border: 1px solid #eceef1;
    border-radius: 10px;
    font-size: 9px;
    letter-spacing: .04em;
}
.today svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.topbar-account { position: relative; }
.topbar-account summary {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 48px;
    padding: 5px 10px 5px 6px;
    color: var(--ink);
    background: #fff8f3;
    border: 1px solid #ffe1d1;
    border-radius: 12px;
    list-style: none;
    cursor: pointer;
    user-select: none;
}
.topbar-account summary::-webkit-details-marker { display: none; }
.topbar-account-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    color: #fff;
    background: linear-gradient(135deg, var(--gold), #ff7540);
    border-radius: 9px;
    font-size: 10px;
    font-weight: 700;
}
.topbar-account-copy { display: grid; min-width: 92px; line-height: 1.25; }
.topbar-account-copy strong { font-size: 9px; }
.topbar-account-copy small { color: #92949c; font-size: 7px; }
.topbar-account-chevron {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: #8a8c94;
    stroke-width: 2;
    transition: transform .18s ease;
}
.topbar-account[open] .topbar-account-chevron { transform: rotate(180deg); }
.topbar-account-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    display: grid;
    gap: 10px;
    width: 230px;
    padding: 13px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 18px 42px rgba(22,24,29,.16);
}
.topbar-account-menu > div { display: grid; }
.topbar-account-menu > div strong { font-size: 10px; }
.topbar-account-menu > div small {
    overflow: hidden;
    color: #8f9199;
    font-size: 8px;
    text-overflow: ellipsis;
}
.topbar-account-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    color: #ad4743;
    background: #fff1f1;
    border-radius: 9px;
    font-size: 9px;
    font-weight: 700;
}
.topbar-account-menu a svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.menu-toggle {
    width: 40px;
    height: 40px;
    color: var(--ink);
    background: #f4f5f7;
    border-radius: 10px;
}
.content {
    max-width: 1600px;
    padding: 30px 32px 64px;
}

.flash {
    border: 1px solid #2d2d32;
    border-radius: 12px;
    box-shadow: 0 16px 36px rgba(17, 17, 20, .2);
}

.panel {
    overflow: hidden;
    background: var(--surface);
    border-color: var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
}
.panel-header {
    min-height: 74px;
    padding: 18px 21px;
    border-bottom-color: #eff0f2;
}
.panel-header h2 { font-size: 16px; letter-spacing: -.03em; }
.panel-number { color: var(--gold); }
.count-label {
    padding: 6px 9px;
    color: #777982;
    background: #f4f5f7;
    border-radius: 8px;
    font-size: 8px;
}
.empty { color: #9a9ca4; }
.empty strong { color: #45464c; }
.empty-number { color: #e4e5e9; }

.stats-grid,
.dashboard-grid,
.project-detail-grid,
.project-card-grid,
.finance-summary { gap: 16px; }
.stats-grid,
.finance-summary { margin-bottom: 16px; }
.activity-panel { margin-top: 16px; }
.workflow-revisions-panel { margin: 0 0 16px; }

.stat-card {
    min-height: 175px;
    padding: 19px;
    background: #fff;
    border-color: var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
}
.stat-card::after { display: none; }
.stat-card.accent {
    background: #fff;
    border-color: #ffdaca;
}
.stat-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.stat-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: var(--ink);
    background: #fff3ed;
    border: 1px solid #ffe0d2;
    border-radius: 11px;
}
.stat-icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.stat-card:nth-child(2) .stat-icon { color: #5863c5; background: #f0f1ff; border-color: #e1e4ff; }
.stat-card:nth-child(3) .stat-icon { color: #25835a; background: #edf9f2; border-color: #d8f0e2; }
.stat-card:nth-child(4) .stat-icon { color: #9b6b25; background: #fff8e9; border-color: #f6e9c5; }
.stat-card p,
.stat-card.accent p { margin: 18px 0 3px; color: #93959d; }
.stat-card > strong { font-size: 39px; letter-spacing: -.065em; }
.stat-card small,
.stat-card.accent small { color: #a0a2aa; }
.stat-index,
.stat-card.accent .stat-index {
    width: auto;
    padding: 5px 8px;
    color: #db6b36;
    background: #fff0e8;
    border-radius: 999px;
    font-size: 7px;
    font-weight: 700;
    letter-spacing: .08em;
}

.quick-action-panel {
    background: linear-gradient(145deg, #fff 0%, #fff7f2 100%);
    border-color: #ffe2d5;
}
.quick-action-panel .panel-number {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #fff;
    background: var(--gold);
    border-radius: 10px;
    font-size: 21px;
}
.panel-lead { color: #777982; }
.quick-links a { border-top-color: #f0e5df; }
.quick-links span {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    color: #d96530;
    background: #ffe8dc;
    border-radius: 8px;
}
.quick-links strong { color: var(--ink); }
.quick-links b { color: var(--gold); }
.quick-links a:hover strong { color: #d9622c; }

.appointment-list article,
.project-list > a,
.revision-mini-list > a,
.activity-grid article { border-color: #eff0f2; }
.appointment-list article:hover,
.project-list > a:hover,
.revision-mini-list > a:hover { background: #fafafb; }
.appointment-list time {
    color: #c45726;
    background: #fff0e8;
    border-radius: 10px;
}
.appointment-list time span { color: #df6e3a; }
.activity-dot { background: var(--gold); box-shadow: 0 0 0 4px #fff0e8; }

.dashboard-calendar-card {
    min-height: 175px;
    padding: 11px 13px 10px;
    border-color: #ffdaca;
}
.dashboard-mini-calendar-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 29px; }
.dashboard-mini-calendar-head > div:first-child { display: grid; gap: 1px; }
.dashboard-mini-calendar-head span { color: #d56a38; font-size: 5.5px; font-weight: 850; letter-spacing: .11em; }
.dashboard-mini-calendar-head strong { font-size: 10px; letter-spacing: -.025em; }
.dashboard-mini-calendar-nav { display: flex; gap: 3px; }
.dashboard-mini-calendar-nav a {
    display: grid;
    place-items: center;
    width: 23px;
    height: 23px;
    color: #73757d;
    background: #f5f6f8;
    border-radius: 7px;
}
.dashboard-mini-calendar-nav a:hover { color: #ce5c2a; background: #fff0e8; }
.dashboard-mini-calendar-nav svg,
.dashboard-calendar-control svg,
.dashboard-calendar-close svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.dashboard-mini-calendar-weekdays,
.dashboard-mini-calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.dashboard-mini-calendar-weekdays { min-height: 14px; color: #aaaab1; }
.dashboard-mini-calendar-weekdays span { display: grid; place-items: center; font-size: 5.5px; font-weight: 800; }
.dashboard-mini-calendar-days { gap: 1px 2px; }
.dashboard-mini-calendar-day {
    position: relative;
    display: grid;
    place-items: center;
    min-width: 0;
    height: 17px;
    padding: 0;
    color: #55575e;
    background: transparent;
    border: 0;
    border-radius: 5px;
    cursor: pointer;
}
.dashboard-mini-calendar-day > span { font-size: 6.5px; font-weight: 750; }
.dashboard-mini-calendar-day > b {
    position: absolute;
    top: 1px;
    right: 1px;
    display: grid;
    place-items: center;
    min-width: 7px;
    height: 7px;
    padding: 0 1px;
    color: #fff;
    background: #ff7f49;
    border-radius: 999px;
    font-size: 4px;
}
.dashboard-mini-calendar-day:hover { color: #c95625; background: #fff0e8; }
.dashboard-mini-calendar-day.is-outside { color: #c8c9ce; }
.dashboard-mini-calendar-day.is-today { box-shadow: inset 0 0 0 1px #ff9b6d; }
.dashboard-mini-calendar-day.is-selected { color: #fff; background: #17171a; }
.dashboard-mini-calendar-day.is-selected > b { background: #ff7f49; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
body.dashboard-calendar-open,
body.dashboard-appointment-dialog-open,
body.dashboard-appointment-detail-open { overflow: hidden; }
.dashboard-calendar-overlay {
    position: fixed;
    z-index: 19;
    top: 92px;
    right: 0;
    bottom: 0;
    left: 258px;
    padding: 16px;
    overflow: auto;
    background: #f4f5f7;
    animation: dashboard-calendar-workspace-in .22s ease both;
    transition: left .22s ease;
}
.sidebar-collapsed-state .dashboard-calendar-overlay { left: 78px; }
.dashboard-calendar-overlay[hidden],
.dashboard-week-panel[hidden],
.dashboard-calendar-day-summaries section[hidden] { display: none; }
@keyframes dashboard-calendar-workspace-in {
    from { opacity: 0; transform: scale(.985); }
    to { opacity: 1; transform: scale(1); }
}
.dashboard-calendar-workspace {
    min-width: 1040px;
    min-height: calc(100vh - 124px);
    overflow: hidden;
    background: #fff;
    border: 1px solid #e0e2e7;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(24, 26, 31, .13);
}
.dashboard-calendar-workspace-head {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 96px;
    padding: 15px 18px;
    border-bottom: 1px solid #eceef1;
}
.dashboard-calendar-date-tile {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 61px;
    height: 66px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e6e7eb;
    border-radius: 12px;
}
.dashboard-calendar-date-tile span { align-self: stretch; display: grid; place-items: center; width: 100%; color: #fff; background: linear-gradient(135deg, #ff8c55, #ff7540); font-size: 7px; font-weight: 850; letter-spacing: .08em; }
.dashboard-calendar-date-tile strong { font-size: 24px; line-height: 1; }
.dashboard-calendar-heading { min-width: 0; }
.dashboard-calendar-heading .eyebrow { margin-bottom: 3px; }
.dashboard-calendar-heading h2 { margin: 0; font-size: 18px; letter-spacing: -.04em; }
.dashboard-calendar-heading small { color: #9698a0; font-size: 7px; }
.dashboard-calendar-workspace-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.dashboard-calendar-control,
.dashboard-calendar-close {
    display: grid;
    place-items: center;
    min-height: 38px;
    padding: 0 12px;
    color: #656770;
    background: #f5f6f8;
    border: 1px solid #e9eaee;
    border-radius: 9px;
    cursor: pointer;
    font-size: 8px;
    font-weight: 800;
}
.dashboard-calendar-control.icon,
.dashboard-calendar-close { width: 38px; padding: 0; }
.dashboard-calendar-control:hover { color: #c85a29; background: #fff0e8; border-color: #ffddcd; }
.dashboard-calendar-control.appointments { color: #fff; background: #17171a; border-color: #17171a; }
.dashboard-calendar-close { color: #a94a45; background: #fff0f0; border-color: #f5dede; }
.dashboard-calendar-close:hover { color: #fff; background: #b44e49; }
.dashboard-calendar-workspace-body {
    display: grid;
    grid-template-columns: 258px minmax(0, 1fr);
    min-height: calc(100vh - 221px);
}
.dashboard-calendar-sidebar { background: #fbfbfc; border-right: 1px solid #eceef1; }
.dashboard-expanded-month { padding: 17px 17px 19px; border-bottom: 1px solid #eceef1; }
.dashboard-expanded-month-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.dashboard-expanded-month-head strong { font-size: 11px; }
.dashboard-expanded-month-head span { color: #a0a2aa; font-size: 6px; font-weight: 700; }
.dashboard-calendar-month-selects { display: flex; align-items: center; gap: 5px; }
.dashboard-calendar-month-selects label { display: block; }
.dashboard-calendar-month-selects select {
    width: auto;
    height: 29px;
    padding: 0 23px 0 8px;
    color: #303138;
    background-color: #fff;
    border: 1px solid #e4e5e9;
    border-radius: 8px;
    font-size: 7px;
    font-weight: 800;
}
.dashboard-expanded-month-weekdays,
.dashboard-expanded-month-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.dashboard-expanded-month-weekdays { min-height: 24px; color: #a0a2aa; }
.dashboard-expanded-month-weekdays span { display: grid; place-items: center; font-size: 5.5px; font-weight: 800; }
.dashboard-expanded-month-days { gap: 3px; }
.dashboard-expanded-month-day {
    position: relative;
    display: grid;
    place-items: center;
    height: 28px;
    padding: 0;
    color: #4f5159;
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}
.dashboard-expanded-month-day span { font-size: 7px; font-weight: 750; }
.dashboard-expanded-month-day i { position: absolute; right: 4px; bottom: 3px; width: 3px; height: 3px; background: #ff8250; border-radius: 50%; }
.dashboard-expanded-month-day:hover { color: #c95727; background: #fff0e8; }
.dashboard-expanded-month-day.is-outside { color: #c4c5ca; }
.dashboard-expanded-month-day.is-today { box-shadow: inset 0 0 0 1px #ffb18b; }
.dashboard-expanded-month-day.is-selected { color: #fff; background: #17171a; box-shadow: 0 5px 12px rgba(21, 21, 24, .16); }
.dashboard-expanded-month-day.is-selected i { background: #ff8c58; }
.dashboard-calendar-day-summaries { padding: 16px 17px; }
.dashboard-calendar-summary-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.dashboard-calendar-summary-head > div { display: grid; }
.dashboard-calendar-summary-head span { color: #a0a2aa; font-size: 5.5px; font-weight: 850; letter-spacing: .12em; }
.dashboard-calendar-summary-head strong { margin-top: 3px; font-size: 12px; }
.dashboard-calendar-summary-head small { color: #90929a; font-size: 7px; }
.dashboard-calendar-summary-head > b { display: grid; place-items: center; width: 31px; height: 31px; color: #c45a29; background: #fff0e8; border-radius: 9px; font-size: 12px; }
.dashboard-calendar-summary-empty { display: grid; gap: 4px; padding: 17px 12px; color: #989aa2; background: #fff; border: 1px dashed #dddfe4; border-radius: 10px; }
.dashboard-calendar-summary-empty strong { color: #555760; font-size: 9px; }
.dashboard-calendar-summary-empty small { font-size: 6.5px; }
.dashboard-calendar-summary-list { display: grid; gap: 7px; max-height: 260px; overflow-y: auto; scrollbar-width: thin; }
.dashboard-calendar-summary-list > button { display: grid; width: 100%; grid-template-columns: 37px minmax(0, 1fr); gap: 8px; padding: 9px; color: inherit; background: #fff; border: 1px solid #e8e9ed; border-radius: 10px; cursor: pointer; text-align: left; }
.dashboard-calendar-summary-list > button:hover { border-color: #ffd3bf; box-shadow: 0 6px 14px rgba(25, 26, 31, .06); }
.dashboard-calendar-summary-list time { color: #c55b2b; font-size: 8px; font-weight: 850; }
.dashboard-calendar-summary-list > button > span { display: grid; min-width: 0; }
.dashboard-calendar-summary-list strong { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-calendar-summary-list small { color: #92949c; font-size: 6px; }
.dashboard-calendar-summary-list i { grid-column: 2; font-style: normal; }
.dashboard-calendar-add-link { display: grid; place-items: center; width: 100%; min-height: 36px; margin-top: 10px; color: #fff; background: linear-gradient(135deg, #ff8c55, #ff7540); border: 0; border-radius: 9px; cursor: pointer; font-size: 7px; font-weight: 850; }
.dashboard-week-calendar { min-width: 0; overflow: hidden; background: #fff; }
.dashboard-week-panel { min-width: 780px; }
.dashboard-week-head { display: grid; grid-template-columns: 58px repeat(7, minmax(102px, 1fr)); min-height: 78px; border-bottom: 1px solid #e9eaee; }
.dashboard-week-time-label { display: grid; place-items: center; color: #a1a3aa; border-right: 1px solid #eceef1; font-size: 5.5px; font-weight: 850; letter-spacing: .1em; }
.dashboard-week-head button { display: grid; place-items: center; align-content: center; gap: 1px; padding: 8px 4px; color: #70727a; background: #fff; border: 0; border-right: 1px solid #eceef1; cursor: pointer; }
.dashboard-week-head button span { font-size: 6.5px; font-weight: 700; }
.dashboard-week-head button strong { color: #292a30; font-size: 14px; line-height: 1.1; }
.dashboard-week-head button small { color: #a1a3aa; font-size: 5.5px; }
.dashboard-week-head button:hover { background: #fff7f2; }
.dashboard-week-head button.is-today strong { color: #e0642f; }
.dashboard-week-head button.is-selected { background: #17171a; }
.dashboard-week-head button.is-selected span,
.dashboard-week-head button.is-selected strong { color: #fff; }
.dashboard-week-head button.is-selected small { color: #ff9a6c; }
.dashboard-week-scroll { max-height: calc(100vh - 299px); overflow: auto; scrollbar-color: #d1d3d8 transparent; scrollbar-width: thin; }
.dashboard-week-timeline { position: relative; min-width: 780px; }
.dashboard-week-hours { position: absolute; inset: 0 auto 0 0; width: 58px; border-right: 1px solid #e9eaee; }
.dashboard-week-hours time { position: absolute; left: 0; width: 100%; color: #9c9ea6; font-size: 6.5px; font-weight: 750; text-align: center; transform: translateY(-50%); }
.dashboard-week-day-lanes { position: absolute; inset: 0 0 0 58px; display: grid; grid-template-columns: repeat(7, minmax(102px, 1fr)); }
.dashboard-week-day-lane {
    position: relative;
    min-width: 0;
    background: repeating-linear-gradient(to bottom, transparent 0, transparent 63px, #eff0f3 63px, #eff0f3 64px);
    border-right: 1px solid #eff0f3;
}
.dashboard-week-day-lane.is-selected { background-color: #fffaf7; }
.dashboard-week-day-lane.is-bookable { cursor: crosshair; }
.dashboard-week-day-lane.is-bookable:hover { box-shadow: inset 0 0 0 1px rgba(255, 130, 80, .2); }
.dashboard-week-now-line { position: absolute; z-index: 5; right: 0; left: 58px; height: 1px; background: #ff7440; pointer-events: none; }
.dashboard-week-now-line::before { position: absolute; top: -3px; left: -3px; width: 7px; height: 7px; background: #ff7440; border-radius: 50%; content: ''; }
.dashboard-week-now-line span { position: absolute; top: -9px; left: 5px; padding: 2px 5px; color: #fff; background: #ff7440; border-radius: 5px; font-size: 5.5px; font-weight: 850; }
.dashboard-week-event {
    position: absolute;
    z-index: 2;
    right: 5px;
    left: 5px;
    display: grid;
    align-content: start;
    gap: 2px;
    min-height: 48px;
    padding: 7px 8px;
    overflow: hidden;
    color: #294c76;
    background: #eef5ff;
    border: 1px solid #d6e5f8;
    border-top: 3px solid #6597d7;
    border-radius: 9px;
    box-shadow: 0 5px 12px rgba(37, 76, 120, .08);
    transition: transform .16s ease, box-shadow .16s ease;
}
.dashboard-week-event.studio-studio_b { color: #a84e26; background: #fff1e9; border-color: #ffddca; border-top-color: #ff8250; }
.dashboard-week-event.is-split.studio-studio_a { right: calc(50% + 2px); }
.dashboard-week-event.is-split.studio-studio_b { left: calc(50% + 2px); }
.dashboard-week-event:hover { z-index: 4; color: inherit; transform: translateY(-1px); box-shadow: 0 9px 20px rgba(25, 26, 31, .13); }
.dashboard-week-event strong { overflow: hidden; font-size: 7px; line-height: 1.3; text-overflow: ellipsis; }
.dashboard-week-event time { font-size: 6px; font-weight: 800; }
.dashboard-week-event small { opacity: .7; font-size: 5.5px; }
.dashboard-week-event.status-cancelled { opacity: .48; filter: grayscale(.45); }

.dashboard-appointment-create-backdrop { z-index: 130; }
.dashboard-appointment-detail-backdrop { z-index: 135; }
.dashboard-appointment-create-backdrop[hidden],
.dashboard-appointment-detail-backdrop[hidden] { display: none; }
.dashboard-appointment-create-backdrop .drawer-head > button,
.dashboard-appointment-detail-backdrop .modal-head > button {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    padding: 0;
    color: #656770;
    background: #f1f2f4;
    border: 0;
    border-radius: 9px;
    cursor: pointer;
    font-size: 20px;
}
.dashboard-appointment-create-backdrop .drawer-head > button:hover,
.dashboard-appointment-detail-backdrop .modal-head > button:hover { color: #fff; background: #17171a; }

.badge {
    padding: 6px 9px;
    border-radius: 999px;
    letter-spacing: .01em;
}
.badge-success { color: #21754e; background: #e7f7ee; }
.badge-primary { color: #c45d2d; background: #fff0e8; }
.badge-warning { color: #9a661f; background: #fff5dd; }
.badge-muted { color: #6f7179; background: #f0f1f3; }

.toolbar { margin-bottom: 16px; }
.filter-tabs {
    gap: 5px;
    padding: 4px;
    background: #e9eaee;
    border-radius: 11px;
}
.filter-tabs a {
    padding: 9px 13px;
    background: transparent;
    border-radius: 8px;
}
.filter-tabs a:hover { color: var(--ink); background: rgba(255,255,255,.65); }
.filter-tabs a.active {
    color: #fff;
    background: var(--ink);
    box-shadow: 0 6px 14px rgba(17, 17, 20, .12);
}
.filter-tabs a b { color: var(--gold); }
.month-switcher > a:not(.today-link) {
    border-color: var(--line);
    border-radius: 10px;
}
.search-form {
    gap: 7px;
    padding: 5px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
}
.search-form input { border: 0; background: transparent; box-shadow: none; }
.search-form button {
    border-radius: 8px;
    background: var(--ink);
}

.appointment-filter-bar {
    display: grid;
    grid-template-columns: minmax(240px, 1.5fr) repeat(4, minmax(135px, .8fr)) auto;
    align-items: end;
    gap: 9px;
    margin-bottom: 16px;
    padding: 13px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
}
.appointment-filter-bar label {
    display: grid;
    gap: 5px;
    min-width: 0;
}
.appointment-filter-bar label > span {
    color: #8b8d95;
    font-size: 7px;
    font-weight: 700;
}
.appointment-filter-bar input,
.appointment-filter-bar select {
    width: 100%;
    min-height: 42px;
    padding-top: 0;
    padding-bottom: 0;
    background-color: #fafafb;
    border-color: #e6e7eb;
    border-radius: 10px;
    box-shadow: none;
    font-size: 9px;
}
.appointment-filter-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 42px;
}
.appointment-table-wrap { overflow-x: visible; }
.appointment-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}
.appointment-table th,
.appointment-table td {
    padding-right: 7px;
    padding-left: 7px;
    overflow-wrap: anywhere;
    vertical-align: middle;
}
.appointment-table th:first-child,
.appointment-table td:first-child {
    position: static;
    width: 108px;
    min-width: 0;
    background: #fff;
    box-shadow: none;
}
.appointment-table th:first-child {
    background: #fafafb;
}
.appointment-table th:nth-child(2) { width: 75px; }
.appointment-table th:nth-child(3) { width: 78px; }
.appointment-table th:nth-child(4) { width: 14%; }
.appointment-table th:nth-child(5) { width: 11%; }
.appointment-table th:nth-child(6) { width: 8%; }
.appointment-table th:nth-child(7) { width: 13%; }
.appointment-table th:nth-child(8) { width: 9%; }
.appointment-table th:nth-child(9) { width: 84px; }
.appointment-row-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}
.appointment-row-actions .icon-action { width: 29px; height: 29px; }
.appointment-main-row { cursor: pointer; }
.appointment-accordion-indicator {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 29px;
    height: 29px;
    padding: 0;
    color: #bb5427;
    background: #fff0e8;
    border: 1px solid #ffe0d1;
    border-radius: 8px;
    cursor: pointer;
    transition: color .18s ease,background .18s ease,border-color .18s ease;
}
.appointment-accordion-indicator svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s ease; }
.appointment-main-row.is-open .appointment-accordion-indicator { color: #fff; background: var(--gold); border-color: var(--gold); }
.appointment-main-row.is-open .appointment-accordion-indicator svg { transform: rotate(180deg); }
.appointment-accordion-row[hidden] { display: none; }
.appointment-accordion-row > td { padding: 0 !important; background: #f7f7f9; border-bottom: 1px solid #e4e6ea; }
.appointment-accordion-row:hover { background: #f7f7f9 !important; }
.appointment-accordion-content { padding: 17px 22px 21px 108px; border-left: 3px solid var(--gold); }
.appointment-accordion-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 11px; }
.appointment-accordion-head > div { display: grid; gap: 3px; }
.appointment-accordion-head > strong { font-size: 11px; }
.appointment-accordion-head > span { padding: 6px 9px; color: #b85024; background: #fff0e8; border-radius: 999px; font-size: 8px; font-weight: 800; }
.appointment-work-detail-wrap { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.appointment-work-detail-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.appointment-work-detail-table th, .appointment-work-detail-table td { width: 50%; padding: 11px 14px; border-bottom: 1px solid #eff0f2; text-align: left; }
.appointment-work-detail-table th { color: #8c8e96; background: #fafafb; font-size: 7px; letter-spacing: .08em; text-transform: uppercase; }
.appointment-work-detail-table td { font-size: 9px; }
.appointment-work-detail-table tbody tr:last-child td { border-bottom: 0; }
.appointment-work-assignee-form { width: min(100%, 280px); }
.appointment-work-assignee-form select {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    padding: 7px 32px 7px 10px;
    background-color: #fafafb;
    border-color: #e1e3e7;
    font-size: 9px;
    font-weight: 700;
}
.appointment-work-detail-empty { padding: 16px; color: var(--muted); background: #fff; border: 1px dashed var(--line); border-radius: 11px; font-size: 8px; text-align: center; }
.appointment-table .phone-link { white-space: normal; }
.appointment-table .service-chip {
    max-width: 100%;
    padding-right: 7px;
    padding-left: 7px;
    white-space: normal;
}
.appointment-table .recording-type-badge { padding-right: 8px; padding-left: 8px; }
.icon-action.workflow-create-action { color: #bd5729; background: #fff1ea; border-color: #ffe2d4; }
.icon-action.workflow-linked-action { color: #21754e; background: #e7f7ee; border-color: #d0eddd; }
.recording-type-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 700;
}
.recording-type-badge.music { color: #405e86; background: #edf3fa; }
.recording-type-badge.dubbing { color: #9a661f; background: #fff5dd; }
.existing-client-picker { display: grid; gap: 7px; }
.existing-client-picker > label {
    color: #777982;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.searchable-select { position: relative; }
.searchable-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    min-height: 48px;
    padding: 0 15px;
    color: var(--ink);
    text-align: left;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 11px;
    cursor: pointer;
}
.searchable-select-trigger svg {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: transform .18s ease;
}
.searchable-select.is-open .searchable-select-trigger {
    border-color: #df6e3a;
    box-shadow: 0 0 0 3px rgba(223,110,58,.12);
}
.searchable-select.is-open .searchable-select-trigger svg { transform: rotate(180deg); }
.searchable-select-menu {
    position: absolute;
    z-index: 30;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(24,25,29,.16);
}
.searchable-select-menu[hidden] { display: none; }
.searchable-select-search {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    padding: 0 12px;
    margin-bottom: 8px;
    background: #fff;
    border: 1px solid #dedfe4;
    border-radius: 9px;
}
.searchable-select-search svg {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #8d8f97;
    stroke-width: 2;
}
.searchable-select-search input {
    min-width: 0;
    min-height: 40px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
.searchable-select-options {
    display: grid;
    gap: 3px;
    max-height: 260px;
    overflow-y: auto;
}
.searchable-select-options button {
    width: 100%;
    padding: 11px 12px;
    color: #45464c;
    font: inherit;
    text-align: left;
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}
.searchable-select-options button:hover,
.searchable-select-options button[aria-selected="true"] {
    color: var(--ink);
    background: #f4f4f7;
}
.searchable-select-empty {
    padding: 18px 12px;
    color: var(--muted);
    text-align: center;
}
.appointment-work-summary {
    display: grid;
    gap: 7px;
    margin: -8px 0 20px;
}
.appointment-work-summary > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 13px;
    background: #fff8f4;
    border: 1px solid #ffe1d2;
    border-radius: 10px;
}
.appointment-work-summary strong { font-size: 10px; }
.appointment-work-summary span { color: var(--muted); font-size: 9px; }
.workflow-project-url-form {
    display: grid;
    gap: 7px;
    margin-top: 10px;
    padding: 13px;
    background: #fafafb;
    border: 1px solid var(--line);
    border-radius: 11px;
}
.workflow-project-url-form > label {
    color: #777982;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.workflow-project-url-form .workflow-link-control {
    grid-template-columns: minmax(0, 1fr) auto;
}
.workflow-project-url-form small { color: var(--muted); font-size: 8px; }
.appointment-detail-modal { width: min(1120px, 100%); }
.appointment-detail-layout {
    display: grid;
    grid-template-columns: 1.04fr .96fr;
}
.appointment-detail-main {
    min-width: 0;
    padding: 23px;
}
.appointment-detail-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin: 0 0 20px;
}
.appointment-detail-summary > div {
    display: grid;
    gap: 5px;
    min-height: 72px;
    padding: 13px;
    background: #fafafb;
    border: 1px solid var(--line);
    border-radius: 11px;
}
.appointment-detail-summary dt {
    color: #9698a0;
    font-size: 7px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.appointment-detail-summary dd {
    margin: 0;
    color: var(--ink);
    font-size: 10px;
    font-weight: 700;
}
.appointment-time-form {
    display: grid;
    gap: 14px;
}
.appointment-notes-panel { min-height: 620px; }

.calendar {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
}
.calendar-head { color: #858790; background: #f4f5f7; }
.calendar-head span { border-color: #e5e6ea; }
.calendar-day { border-color: #eff0f2; }
.calendar-day.outside { background: #fafafb; }
.calendar-event { background: #f5f6f8; border-radius: 7px; }
.calendar-event:hover { background: #eff0f3; }

.data-table th {
    padding: 13px 16px;
    color: #8c8e96;
    background: #fafafb;
    border-color: #eceef1;
}
.data-table td {
    padding: 15px 16px;
    border-color: #eff0f2;
}
.data-table tbody tr { transition: background .15s; }
.data-table tbody tr:hover { background: #fcfcfd; }
.service-chip {
    color: #bd5729;
    background: #fff1ea;
    border: 0;
    border-radius: 8px;
}
.inline-form select { border-radius: 9px; }

.project-card {
    overflow: hidden;
    border-color: var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
}
.project-card:hover { box-shadow: 0 18px 42px rgba(22, 24, 29, .09); }
.project-card-main > small { color: var(--gold); }
.project-meta .arrow { background: var(--ink); }
.progress-cell > span,
.progress { height: 5px; background: #eef0f2; border-radius: 999px; }
.progress-cell b,
.progress b { background: linear-gradient(90deg, var(--gold), #ffb077); border-radius: inherit; }
.project-overview {
    overflow: hidden;
    border-color: var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
}
.project-overview article,
.revision-card,
.notes-list article,
.revision-table article { border-color: #eff0f2; }
.revision-round {
    color: #ca5c29;
    background: #fff0e8;
    border-radius: 10px;
}

.drawer-backdrop { background: rgba(20, 21, 25, .48); }
.drawer {
    background: #fff;
    border-radius: 18px 0 0 18px;
    box-shadow: -22px 0 55px rgba(18, 20, 25, .16);
}
.drawer-head {
    min-height: 82px;
    background: rgba(255,255,255,.96);
    border-bottom-color: var(--line);
    backdrop-filter: blur(12px);
}
.drawer-head > a {
    color: var(--ink);
    background: #f1f2f4;
    border-radius: 9px;
}
.stack-form { padding: 24px; }
.form-section-title > span {
    color: #c65a29;
    background: #fff0e8;
    border-radius: 9px;
}
.service-option > span { border-radius: 10px; }
.service-option input:checked + span {
    color: var(--ink);
    background: #fff5ef;
    border-color: #ffbb99;
    box-shadow: inset 3px 0 var(--gold);
}
.existing-client-picker {
    background: #fff5ef;
    border-color: var(--gold);
    border-radius: 0 11px 11px 0;
}
.service-option b { border-radius: 8px; }

.workflow-guide {
    gap: 7px;
    padding: 7px;
    background: #e9eaee;
    border: 1px solid #dfe1e6;
    border-radius: 14px;
    scrollbar-color: var(--gold) #e9eaee;
}
.workflow-guide article {
    min-height: 74px;
    color: #8b8d95;
    background: #fff;
    border: 0;
    border-radius: 10px;
}
.workflow-guide article span { color: var(--gold); }
.workflow-guide article strong { color: var(--ink); }
.workflow-guide article.done { background: #e9f7ef; }
.workflow-guide article.done span,
.workflow-guide article.done strong { color: #25744f; }
.status-select-success { color: #21754e; background: #e7f7ee; }
.status-select-primary { color: #c45d2d; background: #fff0e8; }
.status-select-warning { color: #9a661f; background: #fff5dd; }
.active-filter {
    color: #9c4f2b;
    background: #fff1ea;
    border-color: var(--gold);
    border-radius: 0 11px 11px 0;
}
.manual-task-label { color: #bd5729; background: #fff0e8; border-radius: 999px; }

.workflow-revision-card > header { background: #fafafb; border-color: #eff0f2; }
.revision-brief { background: #f7f7f9; border-color: #eff0f2; }
.workflow-revision-notes {
    overflow: hidden auto;
    border-color: var(--line);
    border-radius: 11px;
}
.workflow-revision-notes article { border-color: #eff0f2; }
.revision-note-status { border-radius: 999px; }
.revision-note-empty { background: #fafafb; border-color: #dfe1e6; border-radius: 11px; }

.workflow-create-drawer { width: min(720px, 100%); }
.workflow-operation-options { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.workflow-operation-options .service-option > span {
    justify-content: flex-start;
    min-height: 62px;
}
.workflow-assignment-panel {
    display: grid;
    gap: 8px;
    padding: 12px;
    background: #f7f7f9;
    border: 1px solid var(--line);
    border-radius: 12px;
}
.workflow-assignment-empty {
    padding: 15px;
    color: var(--muted);
    background: #fff;
    border: 1px dashed #d8dbe0;
    border-radius: 9px;
    font-size: 10px;
    text-align: center;
}
.workflow-assignment-empty[hidden] { display: none; }
.workflow-assignment-row {
    display: grid;
    grid-template-columns: minmax(120px, .65fr) minmax(180px, 1fr);
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e7e8eb;
    border-radius: 10px;
}
.workflow-assignment-row[hidden] { display: none; }
.workflow-assignment-row > span {
    display: grid;
    gap: 3px;
}
.workflow-assignment-row strong { font-size: 10px; }
.workflow-assignment-row small { color: var(--muted); font-size: 8px; }
.workflow-assignment-row select { width: 100%; }
.workflow-operation-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 7px;
}
.workflow-operation-list > span {
    padding: 5px 7px;
    color: #a94d25;
    background: #fff0e8;
    border-radius: 7px;
    font-size: 8px;
    font-weight: 800;
}
.workflow-operation-assignments {
    display: grid;
    gap: 7px;
    min-width: 250px;
}
.workflow-operation-assign-form {
    display: grid;
    grid-template-columns: 70px minmax(145px, 1fr);
    align-items: center;
    gap: 7px;
}
.workflow-operation-assign-form > span {
    overflow: hidden;
    font-size: 8px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.workflow-operation-assign-form select { min-width: 0; width: 100%; }
.workflow-delivery-cell a {
    display: block;
    margin-top: 5px;
    color: #bd5729;
    font-size: 8px;
    font-weight: 800;
}
.workflow-filter-bar {
    grid-template-columns: minmax(240px, 1.5fr) repeat(3, minmax(135px, .8fr)) auto;
}
.workflow-table.workflow-main-table { min-width: 1120px; }
.workflow-main-row {
    cursor: pointer;
    outline: 0;
}
.workflow-main-row:hover,
.workflow-main-row:focus-visible,
.workflow-main-row.is-open {
    background: #fff8f4 !important;
}
.workflow-main-row:focus-visible {
    box-shadow: inset 3px 0 var(--gold);
}
.workflow-main-row > td:first-child {
    width: 172px;
    min-width: 172px;
}
.workflow-main-row > td:nth-child(2) { min-width: 190px; }
.workflow-main-row > td:nth-child(3) { min-width: 240px; }
.workflow-song-cell { position: relative; }
.workflow-song-cell > strong,
.workflow-song-cell > small { display: block; }
.workflow-song-cell > small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 8px;
}
.workflow-row-actions {
    display: grid;
    gap: 6px;
    width: 154px;
}
.workflow-primary-actions {
    display: grid;
    grid-template-columns: repeat(4, 34px);
    gap: 6px;
}
.workflow-revision-action {
    color: #92621b;
    background: #fff5dd;
    border-color: #f7e5b7;
}
.workflow-revision-action:hover {
    color: #fff;
    background: #b47b28;
    border-color: #b47b28;
}
.workflow-complete-action {
    color: #21754e;
    background: #e7f7ee;
    border-color: #d0eddd;
}
.workflow-complete-action:hover {
    color: #fff;
    background: #2f8a61;
    border-color: #2f8a61;
}
.workflow-cancel-action {
    color: #b84a47;
    background: #fff0f0;
    border-color: #f8dada;
}
.workflow-cancel-action:hover {
    color: #fff;
    background: var(--red);
    border-color: var(--red);
}
.workflow-accordion-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 154px;
    height: 28px;
    padding: 0;
    color: #bb5427;
    background: #fff0e8;
    border: 1px solid #ffe0d1;
    border-radius: 8px;
    cursor: pointer;
    transition: color .18s ease, background .18s ease, border-color .18s ease;
}
.workflow-accordion-indicator svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .18s ease;
}
.workflow-main-row.is-open .workflow-accordion-indicator {
    color: #fff;
    background: var(--gold);
    border-color: var(--gold);
}
.workflow-main-row.is-open .workflow-accordion-indicator svg {
    transform: rotate(180deg);
}
.workflow-accordion-row[hidden] { display: none; }
.workflow-accordion-row > td {
    padding: 0 !important;
    background: #f7f7f9;
    border-bottom: 1px solid #e4e6ea;
}
.workflow-accordion-row:hover { background: #f7f7f9 !important; }
.workflow-accordion-content {
    padding: 18px 22px 22px 108px;
    border-left: 3px solid var(--gold);
}
.workflow-accordion-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 12px;
}
.workflow-accordion-head > div { display: grid; gap: 3px; }
.workflow-accordion-head > strong { font-size: 11px; }
.workflow-accordion-head > span {
    padding: 6px 9px;
    color: #b85024;
    background: #fff0e8;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 800;
}
.workflow-operation-table-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
}
.workflow-operation-table {
    width: 100%;
    min-width: 690px;
    border-collapse: collapse;
}
.workflow-operation-table th,
.workflow-operation-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #eff0f2;
    text-align: left;
}
.workflow-operation-table th {
    color: #8c8e96;
    background: #fafafb;
    font-size: 7px;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.workflow-operation-table td {
    color: #55575e;
    font-size: 9px;
}
.workflow-operation-table tr:last-child td { border-bottom: 0; }
.workflow-operation-table td:first-child { width: 27%; color: var(--ink); }
.workflow-operation-status-form select {
    min-width: 150px;
    min-height: 38px;
}
.workflow-operation-assignee-form select {
    min-width: 170px;
    min-height: 38px;
}
.project-main-table { min-width: 1050px; }
.project-main-row > td:first-child {
    width: 108px;
    min-width: 108px;
}
.project-main-row > td:nth-child(2) { min-width: 185px; }
.project-main-row > td:nth-child(3) { min-width: 220px; }
.project-row-actions {
    display: grid;
    grid-template-columns: 36px 44px;
    align-items: center;
    gap: 7px;
}
.project-grid-status-form select {
    min-width: 128px;
    min-height: 36px;
}
.project-accordion-indicator {
    width: 44px;
    height: 36px;
}
.project-task-count {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    color: #b85024;
    background: #fff0e8;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 800;
}
.project-accordion-content { padding-left: 110px; }
.project-task-attach-form {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) auto;
    align-items: end;
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
}
.project-task-attach-form label {
    display: grid;
    gap: 6px;
    margin: 0;
}
.project-task-attach-form label > span {
    color: #858790;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.project-task-attach-form select { min-height: 38px; }
.project-task-empty {
    padding: 22px;
    color: var(--muted);
    background: #fff;
    border: 1px dashed var(--line);
    border-radius: 12px;
    text-align: center;
    font-size: 9px;
}
.project-task-table { min-width: 900px; }
.project-task-table td:first-child { width: 20%; }
.project-task-table td:first-child strong,
.project-task-table td:first-child small,
.project-detail-task-table td:first-child strong,
.project-detail-task-table td:first-child small {
    display: block;
}
.project-task-table td:first-child small,
.project-detail-task-table td:first-child small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 8px;
}
.project-task-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.project-task-actions form { margin: 0; }
.project-task-detach {
    color: #b84a47;
    background: #fff0f0;
    border-color: #f8dada;
}
.project-task-detach:hover {
    color: #fff;
    background: var(--red);
    border-color: var(--red);
}
.project-linked-workflow-panel { margin-bottom: 16px; }
.project-detail-task-attach {
    margin: 0 20px 16px;
    background: #fafafb;
}
.project-detail-task-table { min-width: 880px; }
.project-client-picker > label { display: block; margin-bottom: 6px; }
.workflow-project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #bd5729;
    font-weight: 800;
}
.workflow-project-link small {
    color: var(--muted);
    font-size: 7px;
}
.muted-text { color: var(--muted); }
.workflow-project-assign-form {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    align-items: center;
    gap: 10px;
}
.workflow-project-assign-form select { min-height: 40px; }
.project-detail-popup { width: min(1180px, 100%); }
.project-detail-popup-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.22fr) minmax(330px, .78fr);
}
.project-detail-popup-main {
    display: grid;
    align-content: start;
    gap: 18px;
    min-width: 0;
    padding: 23px;
}
.project-auto-progress {
    display: grid;
    gap: 13px;
    padding: 18px;
    background: linear-gradient(135deg, #fff8f4, #fff);
    border: 1px solid #ffdbc8;
    border-radius: 14px;
}
.project-auto-progress > div:first-child {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 3px 14px;
}
.project-auto-progress > div:first-child > span {
    color: #a64b25;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}
.project-auto-progress > div:first-child > strong {
    grid-row: 1 / span 2;
    grid-column: 2;
    color: #b94e20;
    font-size: 28px;
    letter-spacing: -.05em;
}
.project-auto-progress > div:first-child > small { color: var(--muted); font-size: 8px; }
.project-progress-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.project-progress-legend span {
    padding: 4px 7px;
    color: #7b7d84;
    background: #fff;
    border: 1px solid #f0ded5;
    border-radius: 999px;
    font-size: 7px;
    font-weight: 700;
}
.project-detail-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
}
.project-detail-summary > div { min-height: 82px; }
.project-detail-status-form select { min-width: 150px; min-height: 36px; }
.project-detail-description {
    padding: 15px;
    background: #fafafb;
    border: 1px solid var(--line);
    border-radius: 12px;
}
.project-detail-description > span {
    color: #8b8d95;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.project-detail-description p { margin: 8px 0 0; color: #55575e; font-size: 9px; line-height: 1.65; }
.project-detail-task-section { display: grid; gap: 12px; }
.project-detail-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.project-detail-section-head h3 { margin: 0; font-size: 17px; letter-spacing: -.03em; }
.project-detail-section-head > span {
    padding: 6px 9px;
    color: #b85024;
    background: #fff0e8;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 800;
}
.project-detail-song-list {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 13px;
}
.project-detail-song-list > a {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto 18px;
    align-items: center;
    gap: 11px;
    min-height: 66px;
    padding: 11px 14px;
    color: inherit;
    background: #fff;
    border-bottom: 1px solid var(--line);
    transition: background .16s ease;
}
.project-detail-song-list > a:last-child { border-bottom: 0; }
.project-detail-song-list > a:hover { background: #fff8f4; }
.project-song-number {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    color: #b85024;
    background: #fff0e8;
    border-radius: 9px;
    font-size: 9px;
    font-weight: 900;
}
.project-song-copy { display: grid; gap: 4px; min-width: 0; }
.project-song-copy strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.project-song-copy small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.project-detail-song-list svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: #b85024;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.project-notes-popup-panel { min-height: 620px; }
.project-note-form-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
}
.project-note-form-actions .check { grid-column: 1; margin: 0; }
.project-note-form-actions .button { grid-row: 1 / span 2; grid-column: 2; }
.project-note-history { max-height: 485px; }
.project-note-history article.is-pinned { background: #fff8f4; border-color: #ffd7c2; }
.project-note-type {
    padding: 4px 6px;
    color: #8a5b47;
    background: #fff0e8;
    border-radius: 6px;
    font-size: 7px;
    font-weight: 700;
}
.project-task-detail-modal { width: min(1160px, 100%); }
.project-task-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
}
.project-task-detail-main {
    display: grid;
    align-content: start;
    gap: 20px;
    min-width: 0;
    padding: 23px;
}
.project-task-readonly-section { display: grid; gap: 12px; }
.project-task-readonly-table { min-width: 820px; }
.project-task-link-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.project-task-link-actions > a {
    color: #b85024;
    font-size: 8px;
    font-weight: 800;
    white-space: nowrap;
}
.project-task-link-actions .copy-link-button {
    width: auto;
    min-height: 28px;
    padding: 0 8px;
}
.project-task-notes-panel { min-height: 560px; }
.project-task-note-history { max-height: 500px; }
.project-create-notes {
    display: grid;
    gap: 11px;
    padding: 14px;
    background: #fafafb;
    border: 1px solid var(--line);
    border-radius: 12px;
}
.project-create-notes-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.project-create-notes-head > div { display: grid; gap: 3px; }
.project-create-notes-head strong { font-size: 10px; }
.project-create-notes-head small { color: var(--muted); font-size: 8px; line-height: 1.45; }
.project-create-note-list { display: grid; gap: 9px; }
.project-create-note-row {
    display: grid;
    grid-template-columns: 125px minmax(0, 1fr) 30px;
    align-items: start;
    gap: 8px;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
}
.project-create-note-row select { min-height: 38px; }
.project-create-note-row textarea { min-height: 76px; resize: vertical; }
.project-create-note-remove {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    color: #b84a47;
    background: #fff0f0;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
}
.project-create-note-remove:hover { color: #fff; background: var(--red); }
.status-select-muted { color: #676a72; background: #eff0f2; }
.workflow-revision-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 28px;
    padding: 0 9px;
    color: #92621b;
    background: #fff5dd;
    border: 1px solid #f7e5b7;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    text-decoration: none;
    transition: transform .16s ease, box-shadow .16s ease;
}
.workflow-revision-count:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 13px rgba(146, 98, 27, .14);
}
.workflow-revision-count.is-over-limit {
    color: #b63f3c;
    background: #fff0f0;
    border-color: #f4cccc;
}

.workflow-detail-modal { width: min(1160px, 100%); }
.workflow-detail-layout {
    display: grid;
    grid-template-columns: 1.12fr .88fr;
}
.workflow-detail-main {
    min-width: 0;
    padding: 23px;
}
.workflow-detail-summary { margin-bottom: 18px; }
.appointment-detail-summary > div.workflow-origin-assignment {
    background: #fff8f4;
    border-color: #ffd8c5;
    box-shadow: inset 3px 0 0 #ff7d48;
}
.appointment-detail-summary > div.workflow-origin-assignment dt { color: #b85a31; }
.workflow-resource-section {
    display: grid;
    gap: 12px;
    margin-bottom: 22px;
}
.workflow-resource-list,
.workflow-link-fields {
    display: grid;
    border-top: 1px solid var(--line);
}
.workflow-resource-row,
.workflow-link-row {
    display: grid;
    grid-template-columns: minmax(150px, .7fr) minmax(0, 1.3fr);
    align-items: center;
    gap: 16px;
    min-width: 0;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}
.workflow-resource-row {
    grid-template-columns: minmax(0, 1fr) auto;
}
.workflow-resource-row > div,
.workflow-link-row > label {
    display: grid;
    gap: 4px;
    min-width: 0;
}
.workflow-resource-row strong,
.workflow-link-row strong { font-size: 9px; }
.workflow-resource-row a {
    overflow: hidden;
    color: #b85125;
    font-size: 8px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.workflow-resource-row > div > span,
.workflow-link-row small {
    color: var(--muted);
    font-size: 7px;
}
.workflow-links-form { display: grid; gap: 15px; }
.workflow-link-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.workflow-link-control input { min-width: 0; background: #fff; }
.copy-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 92px;
    min-height: 38px;
    padding: 0 12px;
    color: #b85125;
    background: #fff0e8;
    border: 1px solid #ffe0d1;
    border-radius: 9px;
    cursor: pointer;
    font-size: 8px;
    font-weight: 800;
}
.copy-link-button:hover,
.copy-link-button.is-copied {
    color: #fff;
    background: var(--gold);
    border-color: var(--gold);
}
.copy-link-button svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.workflow-notes-panel { min-height: 610px; }
.workflow-confirm-task {
    display: block;
    margin: 0 0 11px;
    color: #4f5158;
    font-size: 9px;
}
.confirm-icon.is-success {
    color: #21754e;
    background: #e7f7ee;
}
.confirm-icon.is-danger {
    color: #b74946;
    background: #fff0f0;
}
.workflow-revision-request-modal { width: min(680px, 100%); }
.workflow-revision-request-summary {
    display: grid;
    grid-template-columns: 1fr 1.25fr .55fr;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
}
.workflow-revision-request-summary > div {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 13px;
    background: #fafafb;
    border-right: 1px solid var(--line);
}
.workflow-revision-request-summary > div:last-child { border-right: 0; }
.workflow-revision-request-summary span {
    color: #9698a0;
    font-size: 7px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.workflow-revision-request-summary strong {
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.workflow-revision-request-summary strong.is-over-limit { color: var(--red); }
.workflow-revision-request-form textarea { min-height: 150px; }

.revision-request-table { min-width: 1100px; }
.revision-task-filter-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 12px;
    padding: 13px 15px;
    background: #fff8ec;
    border: 1px solid #f3dfbd;
    border-radius: 14px;
}
.revision-task-filter-banner > div {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.revision-task-filter-banner span {
    color: #9a7339;
    font-size: 7px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.revision-task-filter-banner strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.revision-task-filter-banner small {
    color: #7c7f87;
    font-size: 8px;
}
.revision-request-search {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 16px;
    padding: 13px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
}
.revision-request-search label {
    display: grid;
    flex: 1;
    gap: 5px;
    min-width: 0;
}
.revision-request-search label > span {
    color: #8b8d95;
    font-size: 7px;
    font-weight: 700;
}
.revision-request-search input {
    width: 100%;
    min-height: 42px;
    background: #fafafb;
    border-color: #e6e7eb;
    border-radius: 10px;
    box-shadow: none;
}
.revision-request-table th:nth-child(1) { width: 16%; }
.revision-request-table th:nth-child(2) { width: 18%; }
.revision-request-table th:nth-child(3) { width: 29%; }
.revision-request-table th:nth-child(4) { width: 16%; }
.revision-request-table th:nth-child(5) { width: 12%; }
.revision-request-table th:nth-child(6) { width: 13%; }
.revision-task-link {
    color: #b85125;
    font-size: 10px;
    font-weight: 800;
}
.revision-reason-cell { text-align: center; }
.revision-reason-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 11px;
    color: #9a562d;
    background: #fff5ee;
    border: 1px solid #f4dfd2;
    border-radius: 9px;
    font-size: 9px;
    font-weight: 800;
    transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.revision-reason-button:hover {
    background: #ffebe0;
    border-color: #efcdb9;
    transform: translateY(-1px);
}
.revision-reason-button svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.revision-request-status-form select {
    min-width: 132px;
    min-height: 38px;
}
.revision-reason-modal { width: min(760px, 100%); }
.revision-reason-modal-body {
    display: grid;
    gap: 18px;
    padding: 22px;
}
.revision-reason-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid var(--line);
    border-radius: 13px;
    overflow: hidden;
}
.revision-reason-summary > div {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 13px;
    border-right: 1px solid var(--line);
}
.revision-reason-summary > div:last-child { border-right: 0; }
.revision-reason-summary span,
.revision-reason-text > span {
    color: #92949c;
    font-size: 7px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .07em;
}
.revision-reason-summary strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.revision-reason-text {
    display: grid;
    gap: 9px;
    padding: 16px;
    background: #fafafb;
    border: 1px solid #e8e9ec;
    border-radius: 13px;
}
.revision-reason-text p {
    margin: 0;
    color: #44464d;
    font-size: 10px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.finance-summary article {
    border-color: var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
}
.finance-summary .finance-total {
    color: #fff;
    background: linear-gradient(135deg, #ff9b68, #ff7841);
    border-color: transparent;
}
.finance-total .eyebrow,
.finance-total small { color: rgba(255,255,255,.72) !important; }
.money-input span { color: #c55a2a; }
.finance-table tfoot td { background: var(--ink); }
.table-total { color: #ff9a68; }

.client-card,
.team-card { border-color: #eff0f2; }
.client-toolbar { align-items: flex-end; }
.client-toolbar-controls {
    display: flex;
    align-items: flex-end;
    flex: 1;
    gap: 10px;
    min-width: 0;
}
.client-toolbar-controls .search-form { flex: 1 1 340px; }
.client-filter-form {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}
.client-filter-form label {
    display: grid;
    gap: 5px;
}
.client-filter-form label > span {
    color: #8b8d95;
    font-size: 7px;
    font-weight: 700;
}
.client-filter-form select {
    min-width: 150px;
    min-height: 42px;
    padding: 0 34px 0 12px;
    background-color: #fff;
    border: 1px solid var(--line);
    border-radius: 11px;
    box-shadow: var(--shadow);
    font-size: 9px;
}
.client-table { min-width: 1240px; }
.client-table th:last-child,
.client-table td:last-child {
    position: sticky;
    z-index: 2;
    right: 0;
    width: 150px;
    min-width: 150px;
    background: #fff;
    box-shadow: -12px 0 18px -18px rgba(20, 21, 25, .55);
}
.client-table th:last-child {
    z-index: 3;
    background: #fafafb;
}
.client-type-badge {
    display: inline-flex;
    align-items: center;
    width: max-content;
    padding: 6px 9px;
    color: #4d607a;
    background: #edf3fa;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 700;
    white-space: nowrap;
}
.client-type-badge.corporate { color: #a64d24; background: #fff0e8; }
.job-count-link {
    display: inline-grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 7px;
    min-width: 105px;
}
.job-count-link strong {
    display: grid;
    place-items: center;
    width: 29px;
    height: 29px;
    color: #34363d;
    background: #f0f1f4;
    border-radius: 8px;
    font-size: 11px;
}
.job-count-link span { color: #858790; font-size: 7px; font-weight: 600; white-space: nowrap; }
.job-count-link:hover span { color: var(--gold); }
.job-count-link.active-jobs strong { color: #b24f23; background: #fff0e8; }
.client-row-actions { display: flex; align-items: center; gap: 6px; }
.icon-action {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #666972;
    background: #f3f4f6;
    border: 1px solid #ebecf0;
    border-radius: 9px;
    transition: color .15s, background .15s, border-color .15s, transform .15s;
}
.icon-action:hover { color: var(--ink); background: #fff; border-color: #d9dbe1; transform: translateY(-1px); }
.icon-action.appointment-action { color: #bd5729; background: #fff1ea; border-color: #ffe2d4; }
.icon-action.is-disabled {
    opacity: .38;
    pointer-events: none;
}
.client-status-action-form { display: inline-flex; margin: 0; }
.icon-action.status-action { padding: 0; cursor: pointer; }
.icon-action.make-passive { color: #b84a47; background: #fff0f0; border-color: #f8dada; }
.icon-action.make-passive:hover { color: #fff; background: var(--red); border-color: var(--red); }
.icon-action.make-active { color: #21754e; background: #e7f7ee; border-color: #d0eddd; }
.icon-action.make-active:hover { color: #fff; background: #2f8a61; border-color: #2f8a61; }
.icon-action svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.modal-backdrop {
    position: fixed;
    z-index: 120;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(20, 21, 25, .52);
    backdrop-filter: blur(5px);
}
.modal {
    width: min(720px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    background: #fff;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 18px;
    box-shadow: 0 30px 90px rgba(15, 16, 20, .25);
}
.modal-head {
    position: sticky;
    z-index: 4;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 82px;
    padding: 18px 22px;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}
.modal-head h2 { margin: 0; font-size: 21px; letter-spacing: -.04em; }
.modal-head > a {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    color: #656770;
    background: #f1f2f4;
    border-radius: 9px;
    font-size: 20px;
}
.client-modal { width: min(1120px, 100%); }
.client-new-modal { width: min(720px, 100%); }
.client-modal-layout { display: grid; grid-template-columns: 1.08fr .92fr; }
.client-modal-layout.single { grid-template-columns: 1fr; }
.client-info-form {
    display: grid;
    align-content: start;
    gap: 15px;
    min-width: 0;
    padding: 23px;
}
.client-info-form label > small {
    color: #9a9ca4;
    font-size: 7px;
    font-weight: 400;
}
[data-source-detail-wrap][hidden] { display: none !important; }
.client-info-form label.is-required > small { color: #c25a2a; }
.client-state-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 700;
}
.client-state-badge.is-active {
    color: #21754e;
    background: #e7f7ee;
    border-color: #d0eddd;
}
.client-state-badge.is-passive {
    color: #6f7179;
    background: #f0f1f3;
    border-color: #e0e1e5;
}
.choice-toggle {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.choice-toggle label { position: relative; cursor: pointer; }
.choice-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.choice-toggle span {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 9px 11px;
    color: #71737b;
    background: #fafafd;
    border: 1px solid #dfe1e7;
    border-radius: 11px;
}
.choice-toggle b {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    color: #858790;
    background: #eeeff2;
    border-radius: 8px;
    font-size: 9px;
}
.choice-toggle strong { font-size: 9px; }
.choice-toggle input:checked + span {
    color: #b64f22;
    background: #fff4ee;
    border-color: #ffb994;
    box-shadow: inset 3px 0 var(--gold);
}
.choice-toggle input:checked + span b { color: #fff; background: var(--gold); }

.client-notes-panel {
    min-width: 0;
    padding: 22px;
    background: #f7f7f9;
    border-left: 1px solid var(--line);
}
.client-notes-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.client-notes-head h3 { margin: 0; font-size: 17px; letter-spacing: -.03em; }
.client-notes-head > span {
    padding: 6px 8px;
    color: #b74f22;
    background: #fff0e8;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 700;
}
.client-note-add-form {
    display: grid;
    gap: 9px;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
}
.client-note-add-form textarea { min-height: 88px; font-size: 9px; }
.client-note-add-form .button { justify-self: end; }
.client-note-history { display: grid; gap: 9px; max-height: 440px; margin-top: 12px; overflow-y: auto; }
.client-note-history article {
    padding: 13px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 11px;
}
.client-note-history article > div {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.client-note-history article > div > span { display: grid; }
.client-note-history strong { font-size: 8px; }
.client-note-history time { color: #9a9ca4; font-size: 7px; }
.client-note-history p { margin: 10px 0 0; color: #53555c; font-size: 9px; line-height: 1.65; }
.note-delete-button {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    padding: 0;
    color: #ac4e4b;
    background: #fff0f0;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
}
.note-delete-button:hover { color: #fff; background: var(--red); }
.client-note-empty {
    padding: 22px 14px;
    color: #999ba3;
    background: #fff;
    border: 1px dashed #d9dbe1;
    border-radius: 11px;
    font-size: 9px;
    text-align: center;
}
.client-task-list-modal { width: min(1080px, 100%); }
.client-task-list-body { display: grid; gap: 16px; padding: 22px; }
.client-task-list-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 17px;
    background: #fafafb;
    border: 1px solid var(--line);
    border-radius: 12px;
}
.client-task-list-summary > div { display: grid; gap: 3px; }
.client-task-list-summary span,
.client-task-list-summary small { color: var(--muted); font-size: 8px; }
.client-task-list-summary strong { font-size: 11px; }
.client-task-list-summary > b {
    flex: 0 0 auto;
    padding: 7px 10px;
    color: #b74f22;
    background: #fff0e8;
    border-radius: 999px;
    font-size: 8px;
}
.client-task-popup-table-wrap { max-height: 520px; border: 1px solid var(--line); border-radius: 12px; }
.client-task-popup-table { min-width: 840px; }
.client-task-popup-table th:nth-child(1) { width: 23%; }
.client-task-popup-table th:nth-child(2) { width: 30%; }
.client-task-popup-table th:nth-child(3) { width: 16%; }
.client-task-popup-table th:nth-child(4),
.client-task-popup-table th:nth-child(5) { width: 15.5%; }
.client-task-operation-copy { color: #565860; font-size: 9px; line-height: 1.55; }
.client-task-list-empty {
    display: grid;
    gap: 6px;
    padding: 38px 20px;
    color: var(--muted);
    background: #fafafb;
    border: 1px dashed #d9dbe1;
    border-radius: 12px;
    text-align: center;
}
.client-task-list-empty strong { color: var(--ink); font-size: 11px; }
.client-task-list-empty span { font-size: 8px; }

.confirm-modal {
    width: min(460px, 100%);
    padding: 30px;
    text-align: center;
}
.confirm-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin: 0 auto 17px;
    color: #b74946;
    background: #fff0f0;
    border-radius: 14px;
}
.confirm-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.confirm-modal h2 { margin: 4px 0 10px; font-size: 21px; line-height: 1.25; letter-spacing: -.04em; }
.confirm-modal > p:not(.eyebrow) { margin: 0; color: #7d7f87; font-size: 10px; }
.confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 24px;
}
.confirm-actions form,
.confirm-actions .button { width: 100%; }
.button-danger { color: #fff; background: var(--red); }
.button-danger:hover { color: #fff; background: #c94846; }

.impersonation-banner { position: sticky; z-index: 110; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 46px; padding: 8px 22px; color: #fff; background: #8f3f1f; box-shadow: 0 8px 24px rgba(91,36,16,.22); font-size: 9px; }
.impersonation-banner form { margin: 0; }
.impersonation-banner button { min-height: 30px; padding: 0 12px; color: #8f3f1f; background: #fff; border: 0; border-radius: 8px; font-size: 8px; font-weight: 800; cursor: pointer; }
.team-toolbar > div { display: grid; gap: 4px; }
.team-toolbar small { color: var(--muted); font-size: 8px; }
.team-filter-bar { display: grid; grid-template-columns: minmax(240px,1.5fr) repeat(3,minmax(145px,.75fr)) auto; align-items: end; gap: 9px; margin-bottom: 16px; padding: 13px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.team-filter-bar label { display: grid; gap: 5px; min-width: 0; }
.team-filter-bar label > span { color: #8b8d95; font-size: 7px; font-weight: 700; }
.team-filter-bar input, .team-filter-bar select { width: 100%; min-height: 42px; background: #fafafb; border-color: #e6e7eb; border-radius: 10px; box-shadow: none; font-size: 9px; }
.team-filter-actions { display: flex; align-items: center; gap: 6px; }
.team-user-panel { overflow: hidden; }
.team-user-panel .data-table-wrap { width: 100%; max-width: 100%; overflow-x: clip; }
.team-user-table { width: 100% !important; max-width: 100%; min-width: 0 !important; table-layout: fixed; }
.team-user-table .team-col-profile { width: 4%; }
.team-user-table .team-col-name { width: 14%; }
.team-user-table .team-col-email { width: 17%; }
.team-user-table .team-col-position { width: 9%; }
.team-user-table .team-col-role { width: 12%; }
.team-user-table .team-col-status { width: 10%; }
.team-user-table .team-col-active { width: 6%; }
.team-user-table .team-col-login { width: 10%; }
.team-user-table .team-col-created { width: 11%; }
.team-user-table .team-col-actions { width: 7%; }
.team-user-table th, .team-user-table td { min-width: 0; padding: 10px 6px; vertical-align: middle; }
.team-user-table th { font-size: 6.5px; letter-spacing: .06em; white-space: normal; }
.team-user-table td { font-size: 8px; overflow: hidden; overflow-wrap: anywhere; }
.team-user-table td > small { font-size: 6.5px; }
.team-user-table th:last-child, .team-user-table td:last-child { position: static; background: inherit; box-shadow: none; }
.team-user-table td:last-child { overflow: hidden; text-align: center; }
.team-email { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-profile-photo, .team-profile-fallback { display: grid; place-items: center; width: 32px; height: 32px; overflow: hidden; border-radius: 9px; object-fit: cover; }
.team-profile-fallback { color: #fff; background: linear-gradient(135deg,#111114,#555861); font-size: 9px; font-weight: 900; }
.team-profile-photo.large, .team-profile-fallback.large { width: 52px; height: 52px; border-radius: 14px; }
.team-role-badge, .team-status-badge { display: inline-flex; align-items: center; width: max-content; max-width: 100%; min-height: 25px; padding: 0 7px; border: 1px solid transparent; border-radius: 999px; font-size: 7px; font-weight: 800; white-space: normal; text-align: center; }
.team-role-badge.role-system_manager { color: #fff; background: #17171a; }
.team-role-badge.role-admin { color: #b14f24; background: #fff0e8; border-color: #ffdfcf; }
.team-role-badge.role-user { color: #4f647d; background: #edf3fa; border-color: #dce7f3; }
.team-status-badge.status-active { color: #21754e; background: #e7f7ee; border-color: #d0eddd; }
.team-status-badge.status-invited { color: #9a661f; background: #fff5dd; border-color: #f2e1b9; }
.team-status-badge.status-passive { color: #70727a; background: #f0f1f3; border-color: #e0e1e5; }
.team-task-count { display: grid; place-items: center; width: 30px; height: 30px; color: #b14f24; background: #fff0e8; border-radius: 8px; }
.team-action-trigger { display: grid; place-items: center; width: 30px; height: 30px; margin: 0 auto; padding: 0; color: #60636c; background: #f3f4f6; border: 1px solid #e8e9ed; border-radius: 8px; font-size: 10px; font-weight: 900; cursor: pointer; }
.team-action-trigger:hover, .team-action-trigger:focus-visible { color: var(--ink); background: #fff; border-color: #d7d8dd; outline: none; }
.team-action-modal-backdrop[hidden] { display: none; }
body.team-action-modal-open { overflow: hidden; }
.team-action-modal { width: min(720px,100%); }
.team-action-modal-head { position: relative; }
.team-action-modal-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.team-action-modal-identity > div { display: grid; gap: 3px; min-width: 0; }
.team-action-modal-identity h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-action-modal-identity > div > span { color: var(--muted); font-size: 8px; }
.team-action-modal-close { display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; padding: 0; color: #656770; background: #f1f2f4; border: 0; border-radius: 9px; font-size: 20px; cursor: pointer; }
.team-action-modal-close:hover { color: var(--ink); background: #e8e9ed; }
.team-action-modal-body { display: grid; gap: 17px; padding: 22px; }
.team-action-modal-copy { display: grid; gap: 4px; }
.team-action-modal-copy h3 { margin: 0; font-size: 16px; }
.team-action-modal-copy > span { color: var(--muted); font-size: 8px; }
.team-action-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.team-action-choice-form { display: flex; margin: 0; }
.team-action-choice { display: grid; grid-template-columns: 38px minmax(0,1fr) 18px; align-items: center; gap: 10px; width: 100%; min-height: 74px; padding: 12px; color: #4d5059; background: #fafafb; border: 1px solid #e9eaee; border-radius: 12px; text-align: left; cursor: pointer; transition: transform .15s,border-color .15s,background .15s,box-shadow .15s; }
.team-action-choice:hover { color: var(--ink); background: #fff; border-color: #ffd5c1; box-shadow: 0 12px 26px rgba(20,21,25,.08); transform: translateY(-1px); }
.team-action-choice-icon { display: grid; place-items: center; width: 38px; height: 38px; color: #bf5529; background: #fff0e8; border-radius: 10px; }
.team-action-choice-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.team-action-choice > span:nth-child(2) { display: grid; gap: 4px; min-width: 0; }
.team-action-choice strong { color: inherit; font-size: 9px; }
.team-action-choice small { color: var(--muted); font-size: 7px; line-height: 1.35; }
.team-action-choice-arrow { color: #c2c4ca; font-size: 14px; }
.team-action-choice.is-warning .team-action-choice-icon { color: #a34f2d; background: #fff1e9; }
.team-action-choice.is-success .team-action-choice-icon { color: #21754e; background: #e7f7ee; }
.team-action-choice.is-dark { color: #fff; background: #18181b; border-color: #18181b; }
.team-action-choice.is-dark:hover { color: #fff; background: #27272b; border-color: #27272b; }
.team-action-choice.is-dark .team-action-choice-icon { color: #fff; background: rgba(255,255,255,.12); }
.team-action-choice.is-dark small, .team-action-choice.is-dark .team-action-choice-arrow { color: #b9bbc2; }
.team-user-form-modal { width: min(820px,100%); }
.team-user-form { display: grid; gap: 14px; padding: 22px; }
.team-user-form.compact { padding: 0; }
.team-invite-info { display: grid; gap: 4px; padding: 13px; color: #80503b; background: #fff5ef; border: 1px solid #ffddcb; border-radius: 11px; }
.team-invite-info strong { font-size: 9px; }
.team-invite-info span { font-size: 8px; line-height: 1.5; }
.team-user-detail-modal { width: min(1260px,100%); }
.team-detail-identity { display: flex; align-items: center; gap: 12px; }
.team-detail-identity > div { display: grid; gap: 3px; }
.team-detail-identity > div > span { color: var(--muted); font-size: 8px; }
.team-one-time-link { display: grid; gap: 9px; padding: 14px 20px; color: #68442f; background: #fff5ef; border-bottom: 1px solid #ffddcb; }
.team-one-time-link > div:first-child { display: grid; gap: 3px; }
.team-one-time-link strong { font-size: 9px; }
.team-one-time-link span { font-size: 8px; }
.team-one-time-link > div:last-child { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px; }
.team-one-time-link input { min-width: 0; background: #fff; }
.team-one-time-link button { padding: 0 13px; color: #fff; background: #b85024; border: 0; border-radius: 9px; font-size: 8px; font-weight: 800; cursor: pointer; }
.team-user-detail-layout { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(300px,.55fr); }
.team-user-detail-main { display: grid; align-content: start; gap: 16px; min-width: 0; padding: 20px; }
.team-detail-section { display: grid; gap: 14px; padding: 17px; background: #fff; border: 1px solid var(--line); border-radius: 13px; }
.team-detail-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.team-detail-section-head h3 { margin: 0; font-size: 15px; }
.team-detail-section-head > span { color: var(--muted); font-size: 7px; }
.team-readonly-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 0; }
.team-readonly-grid > div { display: grid; gap: 4px; padding: 11px; background: #fafafb; border-radius: 9px; }
.team-readonly-grid dt { color: var(--muted); font-size: 7px; }
.team-readonly-grid dd { margin: 0; font-size: 9px; font-weight: 700; }
.team-readonly-grid > .wide { grid-column: 1 / -1; }
.team-user-security-panel { display: grid; align-content: start; gap: 13px; min-width: 0; padding: 20px; background: #f7f7f9; border-left: 1px solid var(--line); }
.team-user-security-panel section { display: grid; gap: 10px; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.team-user-security-panel h3 { margin: 0; font-size: 13px; }
.team-open-counts { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.team-open-counts span { display: grid; gap: 3px; padding: 9px; background: #fafafb; border-radius: 9px; text-align: center; }
.team-open-counts strong { font-size: 15px; }
.team-open-counts small { color: var(--muted); font-size: 6px; line-height: 1.3; }
.stack-form.compact { gap: 9px; }
.check.warning { color: #9c4d2c; padding: 9px; background: #fff4ee; border-radius: 8px; font-size: 7px; }
.team-security-actions { display: grid; gap: 7px; }
.team-security-actions form { margin: 0; }
.team-security-actions button { width: 100%; min-height: 38px; padding: 0 10px; color: #555861; background: #f4f5f7; border: 1px solid #e7e8ec; border-radius: 9px; font-size: 8px; font-weight: 800; cursor: pointer; }
.team-security-actions button:hover { color: var(--ink); background: #fff; }
.team-security-actions button.impersonate { color: #fff; background: #17171a; border-color: #17171a; }
.team-permission-form { display: grid; gap: 12px; }
.team-permission-form fieldset { display: grid; gap: 7px; margin: 0; padding: 12px; background: #fafafb; border: 1px solid var(--line); border-radius: 10px; }
.team-permission-form legend { padding: 0 6px; color: #b85024; font-size: 8px; font-weight: 900; text-transform: uppercase; }
.team-permission-form fieldset > label { display: grid; grid-template-columns: minmax(0,1fr) 150px; align-items: center; gap: 12px; padding: 8px; background: #fff; border-radius: 8px; }
.team-permission-form label > span { display: grid; gap: 3px; }
.team-permission-form label strong { font-size: 8px; }
.team-permission-form label small { color: var(--muted); font-size: 6px; overflow-wrap: anywhere; }
.team-permission-form select { min-height: 36px; font-size: 8px; }
.team-audit-list { display: grid; max-height: 320px; overflow-y: auto; }
.team-audit-list article { display: grid; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.team-audit-list article:last-child { border-bottom: 0; }
.team-audit-list span { font-size: 8px; font-weight: 700; }
.team-audit-list small { color: var(--muted); font-size: 7px; }

.team-avatar {
    color: #c25726;
    background: #fff0e8;
    border-radius: 12px;
}
.notes-list article.pinned { background: #fff8f3; border-color: var(--gold); }

@media (max-width: 1180px) {
    .dashboard-calendar-workspace { min-width: 0; }
    .dashboard-calendar-workspace-body { grid-template-columns: 230px minmax(760px, 1fr); overflow-x: auto; }
    .dashboard-expanded-month { padding-right: 13px; padding-left: 13px; }
    .dashboard-calendar-day-summaries { padding-right: 13px; padding-left: 13px; }
    .finance-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .finance-filter-head,
    .finance-filter-forms { align-items: stretch; flex-direction: column; }
    .finance-period-tabs { width: 100%; }
    .finance-period-tabs a { flex: 1 0 auto; text-align: center; }
    .finance-search-form,
    .finance-custom-date-form { width: 100%; }
    .team-filter-bar { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .team-general-search,
    .team-filter-actions { grid-column: 1 / -1; }
    .team-user-detail-layout { grid-template-columns: 1fr; }
    .team-user-security-panel { border-top: 1px solid var(--line); border-left: 0; }
    .team-user-table th, .team-user-table td { padding: 8px 4px; }
    .team-user-table th { font-size: 6px; }
    .team-user-table td { font-size: 7px; }
    .team-user-table td > small { font-size: 5.8px; }
    .team-profile-photo, .team-profile-fallback { width: 27px; height: 27px; border-radius: 8px; }
    .team-role-badge, .team-status-badge { min-height: 23px; padding: 0 5px; font-size: 6.2px; }
    .team-task-count { width: 27px; height: 27px; }
    .team-action-trigger { width: 28px; height: 28px; }
}

@media (max-width: 900px) {
    .app-shell { padding-left: 0; }
    .sidebar { box-shadow: 16px 0 40px rgba(20, 21, 25, .16); }
    .sidebar-collapse-toggle { display: none; }
    .topbar { min-height: 78px; padding: 12px 18px; }
    .topbar-copy { flex: 1; margin-left: 12px; }
    .topbar-copy .eyebrow { display: none; }
    .content { padding: 20px 18px 50px; }
    .dashboard-calendar-overlay { top: 78px; left: 0; padding: 10px; }
    .sidebar-collapsed-state .dashboard-calendar-overlay { left: 0; }
    .dashboard-calendar-workspace { min-height: calc(100vh - 98px); border-radius: 14px; }
    .dashboard-calendar-workspace-head { min-width: 760px; }
    .dashboard-calendar-workspace-body { min-height: calc(100vh - 195px); }
    .dashboard-week-scroll { max-height: calc(100vh - 273px); }
    .appointment-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .appointment-general-search,
    .appointment-filter-actions { grid-column: 1 / -1; }
    .appointment-detail-layout { grid-template-columns: 1fr; }
    .appointment-notes-panel { min-height: 0; }
    .appointment-table-wrap { overflow-x: auto; }
    .appointment-table { min-width: 980px; }
    .client-toolbar,
    .client-toolbar-controls { align-items: stretch; flex-direction: column; }
    .client-filter-form { align-items: stretch; }
    .client-filter-form label { flex: 1; }
    .client-filter-form select { width: 100%; }
    .client-modal-layout { grid-template-columns: 1fr; }
    .client-notes-panel { border-top: 1px solid var(--line); border-left: 0; }
    .workflow-operation-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .workflow-detail-layout { grid-template-columns: 1fr; }
    .project-detail-popup-layout { grid-template-columns: 1fr; }
    .project-task-detail-layout { grid-template-columns: 1fr; }
    .project-notes-popup-panel {
        min-height: 0;
        border-top: 1px solid var(--line);
        border-left: 0;
    }
    .project-task-notes-panel {
        min-height: 0;
        border-top: 1px solid var(--line);
        border-left: 0;
    }
    .project-task-attach-form,
    .workflow-project-assign-form { grid-template-columns: 1fr; }
    .project-task-attach-form .button,
    .workflow-project-assign-form .button { width: 100%; }
    .finance-custom-date-form label { flex: 1; }
    .finance-custom-date-form input { width: 100%; }
    .workflow-notes-panel {
        min-height: 0;
        border-top: 1px solid var(--line);
        border-left: 0;
    }
    .team-toolbar { align-items: stretch; flex-direction: column; }
}

@media (max-width: 650px) {
    .stats-grid,
    .dashboard-grid,
    .project-detail-grid,
    .project-card-grid,
    .finance-summary { gap: 12px; }
    .stat-card { min-height: 155px; }
    .panel { border-radius: 13px; }
    .dashboard-calendar-card { min-height: 198px; padding: 14px 18px; }
    .dashboard-mini-calendar-head { min-height: 32px; }
    .dashboard-mini-calendar-weekdays { min-height: 18px; }
    .dashboard-mini-calendar-day { height: 21px; }
    .dashboard-mini-calendar-day > span { font-size: 7.5px; }
    .dashboard-calendar-overlay { padding: 0; }
    .dashboard-calendar-workspace { min-height: calc(100vh - 78px); border: 0; border-radius: 0; }
    .dashboard-calendar-workspace-head { flex-wrap: wrap; min-width: 0; min-height: 126px; padding: 12px; }
    .dashboard-calendar-date-tile { width: 52px; height: 57px; }
    .dashboard-calendar-heading { flex: 1; }
    .dashboard-calendar-heading h2 { font-size: 14px; }
    .dashboard-calendar-workspace-actions { order: 3; width: 100%; }
    .dashboard-calendar-control { flex: 1; }
    .dashboard-calendar-control.appointments { display: none; }
    .dashboard-calendar-close { margin-left: auto; }
    .dashboard-calendar-workspace-body { display: block; min-height: 0; overflow: visible; }
    .dashboard-calendar-sidebar { border-right: 0; }
    .dashboard-expanded-month { padding: 14px; }
    .dashboard-expanded-month-day { height: 31px; }
    .dashboard-calendar-day-summaries { padding: 14px; border-bottom: 1px solid #eceef1; }
    .dashboard-calendar-summary-list { max-height: 180px; }
    .dashboard-week-calendar { overflow-x: auto; }
    .dashboard-week-scroll { max-height: 560px; }
    .filter-tabs { width: 100%; border-radius: 10px; }
    .appointment-filter-bar { grid-template-columns: 1fr; }
    .appointment-general-search,
    .appointment-filter-actions { grid-column: auto; }
    .appointment-filter-actions .button { flex: 1; }
    .appointment-detail-summary { grid-template-columns: 1fr; }
    .appointment-accordion-content { padding: 15px; }
    .appointment-accordion-head { align-items: flex-start; flex-direction: column; }
    .project-detail-summary { grid-template-columns: 1fr; }
    .project-detail-popup-main { padding: 17px; }
    .project-detail-song-list > a { grid-template-columns: 36px minmax(0, 1fr) 18px; }
    .project-detail-song-list .badge { grid-column: 2; justify-self: start; }
    .project-create-notes-head { align-items: stretch; flex-direction: column; }
    .project-create-notes-head .button { width: 100%; }
    .project-create-note-row { grid-template-columns: 1fr 30px; }
    .project-create-note-row select,
    .project-create-note-row textarea { grid-column: 1; }
    .project-create-note-remove { grid-row: 1; grid-column: 2; }
    .client-filter-form { flex-direction: column; }
    .drawer { border-radius: 0; }
    .today { display: none; }
    .topbar-account-copy { display: none; }
    .topbar-account summary { padding-right: 7px; }
    .workflow-guide { border-radius: 11px; }
    .workflow-operation-options { grid-template-columns: 1fr; }
    .workflow-assignment-row { grid-template-columns: 1fr; }
    .workflow-accordion-content { padding: 16px; }
    .workflow-accordion-head { align-items: flex-start; }
    .project-detail-task-attach { margin: 0 14px 14px; }
    .workflow-link-row { grid-template-columns: 1fr; gap: 8px; }
    .workflow-resource-row { align-items: flex-start; }
    .workflow-link-control { grid-template-columns: 1fr; }
    .copy-link-button { width: 100%; }
    .workflow-revision-request-summary { grid-template-columns: 1fr; }
    .workflow-revision-request-summary > div {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
    .workflow-revision-request-summary > div:last-child { border-bottom: 0; }
    .revision-request-search {
        align-items: stretch;
        flex-direction: column;
    }
    .revision-request-search .button { width: 100%; }
    .revision-task-filter-banner {
        align-items: stretch;
        flex-direction: column;
    }
    .revision-task-filter-banner .button { width: 100%; }
    .revision-reason-summary { grid-template-columns: 1fr; }
    .revision-reason-summary > div {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
    .revision-reason-summary > div:last-child { border-bottom: 0; }
    .finance-kpi-grid { grid-template-columns: 1fr; }
    .finance-kpi-grid > article { min-height: 190px; }
    .finance-search-form,
    .finance-custom-date-form {
        align-items: stretch;
        flex-direction: column;
    }
    .finance-search-form label { min-width: 0; }
    .finance-search-form .button,
    .finance-custom-date-form .button { width: 100%; }
    .finance-filter-head { align-items: stretch; }
    .finance-period-tabs a { flex: 0 0 auto; }
    .revision-note-top,
    .revision-completed-meta { align-items: flex-start; flex-direction: column; }
    .modal-backdrop { align-items: stretch; padding: 0; }
    .modal { max-height: 100vh; border: 0; border-radius: 0; }
    .choice-toggle,
    .confirm-actions { grid-template-columns: 1fr; }
    .client-info-form,
    .client-notes-panel { padding: 17px; }
    .team-filter-bar { grid-template-columns: 1fr; }
    .team-general-search,
    .team-filter-actions { grid-column: auto; }
    .team-filter-actions .button { flex: 1; }
    .team-one-time-link > div:last-child,
    .team-readonly-grid,
    .team-permission-form fieldset > label { grid-template-columns: 1fr; }
    .team-action-grid { grid-template-columns: 1fr; }
    .team-action-modal-body { padding: 17px; }
    .team-user-detail-main,
    .team-user-security-panel,
    .team-user-form { padding: 17px; }
    .confirm-modal { display: grid; align-content: center; width: 100%; min-height: 100vh; padding: 25px; }
}
.client-info-fieldset {
    display: contents;
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
}

.client-info-fieldset:disabled {
    opacity: .78;
}

.workflow-upload-section {
    display: grid;
    gap: 14px;
}

.workflow-upload-list {
    display: grid;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
}

.workflow-upload-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 15px;
    background: #fff;
}

.workflow-upload-row + .workflow-upload-row {
    border-top: 1px solid var(--line);
}

.workflow-upload-row div,
.workflow-upload-row small {
    display: block;
}

.workflow-upload-row strong {
    overflow-wrap: anywhere;
}

.workflow-upload-row small,
.workflow-upload-empty {
    color: var(--muted);
}

.workflow-upload-form {
    display: flex;
    align-items: end;
    gap: 12px;
}

.workflow-upload-form label {
    flex: 1;
}

@media (max-width: 640px) {
    .workflow-upload-row,
    .workflow-upload-form {
        align-items: stretch;
        flex-direction: column;
    }
}
