/* All Code Zone — admin panel, client portal, auth and invoice styles */
:root {
  --red: #D31216; --red-dark: #A30E12; --red-tint: #FDECEC;
  --green: #009900; --green-deep: #007A00; --pixel: #30B010; --green-tint: #E8F5E6;
  --ink: #1A1A1A; --graphite: #2A2B30; --steel: #5F636B; --fog: #E4E5E2; --paper: #F5F6F4; --bg: #F3F4F2;
  --display: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
  --body: 'Inter', 'Segoe UI', Roboto, Arial, sans-serif;
  --code: 'Fira Code', Consolas, monospace;
  --radius: 10px; --side: 256px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--body); font-size: 15px; line-height: 1.55; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -0.01em; margin: 0 0 .4em; line-height: 1.2; }
p { margin: 0 0 .8em; }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
code { font-family: var(--code); font-size: 13px; background: var(--paper); padding: 2px 6px; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.muted { color: var(--steel); } .small { font-size: 13.5px; } .tiny { font-size: 12px; margin-top: 6px; } .block { display: block; } .nowrap { white-space: nowrap; } .strong { font-weight: 600; color: var(--ink); text-decoration: none; } .strong:hover { color: var(--red); }
.ico { width: 20px; height: 20px; flex: none; } .ico--sm { width: 16px; height: 16px; }
.eyebrow { font-family: var(--code); font-size: 12.5px; color: var(--green-deep); margin: 0 0 6px; }
.h2 { font-size: 26px; } .h4 { font-size: 17px; }
.stack { display: grid; gap: 10px; } .stack-lg { display: grid; gap: 18px; align-content: start; }
.narrow { max-width: 680px; }
[hidden] { display: none !important; }

/* buttons */
.btn { --bg: var(--ink); --fg: #fff; --bd: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 8px 16px; border-radius: var(--radius); border: 1.5px solid var(--bd); background: var(--bg); color: var(--fg); font-weight: 600; font-size: 14.5px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { color: var(--fg); }
.btn--primary { --bg: var(--red); --bd: var(--red); } .btn--primary:hover { --bg: var(--red-dark); --bd: var(--red-dark); }
.btn--dark:hover { --bg: #000; }
.btn--outline { --bg: #fff; --fg: var(--ink); --bd: #CFD1CC; } .btn--outline:hover { --bd: var(--ink); }
.btn--light { --bg: #fff; --fg: var(--ink); --bd: #fff; }
.btn--ghost { --bg: transparent; --fg: var(--ink); --bd: transparent; } .btn--ghost:hover { --bg: rgba(26,26,26,.06); }
.btn--danger { --fg: var(--red-dark); }
.btn--sm { min-height: 34px; padding: 5px 12px; font-size: 13.5px; }
.btn--xs { min-height: 28px; padding: 3px 10px; font-size: 12.5px; }
.btn--lg { min-height: 50px; padding: 12px 22px; font-size: 16px; }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.iconbtn { background: none; border: 0; padding: 6px; border-radius: 8px; cursor: pointer; color: var(--steel); display: inline-flex; }
.iconbtn:hover { background: var(--paper); color: var(--red); }
.linklike { background: none; border: 0; padding: 0; color: var(--red); cursor: pointer; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; vertical-align: middle; }
.badge--ok { background: var(--green-tint); color: var(--green-deep); }
.badge--warn { background: #FFF4D6; color: #8A5A00; }
.badge--bad { background: var(--red-tint); color: var(--red-dark); }
.badge--info { background: #E7EEFB; color: #1F4FA8; }
.badge--muted { background: #ECEDEA; color: var(--steel); }

.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; border: 1px solid; font-size: 14.5px; }
.alert--success { background: var(--green-tint); border-color: #BFE3BA; color: #0D4D0D; }
.alert--error { background: var(--red-tint); border-color: #F3C2C3; color: #7A0B0E; }
.alert--warn { background: #FFF7E1; border-color: #F2DB9A; color: #6B4600; }
.alert--row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

/* app shell */
.app { display: flex; min-height: 100vh; }
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--ink); color: #C9CCD1; display: flex; flex-direction: column; z-index: 50; overflow-y: auto; }
.side__brand { display: flex; align-items: center; gap: 10px; padding: 20px 18px; color: #fff; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 17px; border-bottom: 1px solid #2A2B30; }
.side__brand b { color: #FF5A5F; }
.side__brand small { display: block; font-family: var(--code); font-weight: 500; font-size: 11px; color: var(--pixel); letter-spacing: 0; }
.side__brand:hover { color: #fff; }
.side__nav { padding: 12px 10px 24px; display: grid; gap: 2px; }
.side__label { font-family: var(--code); font-size: 11px; text-transform: lowercase; color: #7D8087; margin: 16px 10px 6px; }
.side__label::before { content: "// "; }
.side__link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: #C9CCD1; text-decoration: none; font-size: 14px; font-weight: 500; }
.side__link .ico { width: 18px; height: 18px; opacity: .85; }
.side__link:hover { background: #26272B; color: #fff; }
.side__link.is-active { background: #fff; color: var(--ink); }
.side__count { margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 700; background: var(--red); color: #fff; border-radius: 999px; padding: 1px 7px; }
.side__help { margin: auto 14px 18px; padding: 14px; border-radius: 12px; background: #26272B; font-size: 13.5px; display: grid; gap: 6px; }
.side__help p { margin: 0; color: #fff; font-weight: 600; }
.side__help a { color: #C9CCD1; display: inline-flex; gap: 6px; align-items: center; text-decoration: none; }
.side__help a:hover { color: #fff; }
.main { flex: 1; margin-left: var(--side); min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 24px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--fog); }
.topbar__title { font-size: 19px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar__menu { display: none; background: none; border: 1px solid var(--fog); border-radius: 8px; width: 40px; height: 40px; align-items: center; justify-content: center; cursor: pointer; }
.usermenu { position: relative; }
.usermenu summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 8px 4px 4px; border-radius: 999px; font-weight: 600; font-size: 14px; }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu summary:hover { background: var(--paper); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.usermenu__panel { position: absolute; right: 0; top: calc(100% + 8px); width: 240px; background: #fff; border: 1px solid var(--fog); border-radius: 12px; box-shadow: 0 16px 40px rgba(26,26,26,.14); padding: 12px; display: grid; gap: 4px; }
.usermenu__panel a, .usermenu__panel button { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; background: none; border: 0; width: 100%; text-align: left; cursor: pointer; font-size: 14px; }
.usermenu__panel a:hover, .usermenu__panel button:hover { background: var(--paper); }
.content { padding: 24px; max-width: 1360px; width: 100%; }
@media (max-width: 960px) {
  .side { transform: translateX(-100%); transition: transform .2s; }
  .side.is-open { transform: none; box-shadow: 20px 0 60px rgba(0,0,0,.3); }
  .main { margin-left: 0; }
  .topbar__menu { display: inline-flex; }
  .content { padding: 16px; }
  .hide-sm { display: none; }
}

/* panels & layout */
.panel { background: #fff; border: 1px solid var(--fog); border-radius: 14px; padding: 20px; margin-bottom: 18px; }
.panel--flush { padding: 0; overflow: hidden; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.panel__head h2 { font-size: 17px; margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.panel__head a { font-size: 13.5px; font-weight: 600; }
.panel__head--mt { margin-top: 24px; }
.panel__sub { font-family: var(--body); font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--steel); margin: 22px 0 10px; }
.panel > .stack > form { margin: 0; }
.dash { display: grid; gap: 18px; }
.dash > .panel { margin-bottom: 0; }
@media (min-width: 1100px) { .dash { grid-template-columns: 1.6fr 1fr; } .dash--3 { grid-template-columns: repeat(3, 1fr); } }
.dash + .dash { margin-top: 18px; }
.detail { display: grid; gap: 18px; align-items: start; }
@media (min-width: 1100px) { .detail { grid-template-columns: 1.7fr 1fr; } }
.detail .panel { margin-bottom: 0; }
.split { display: grid; gap: 18px; margin-top: 10px; }
@media (min-width: 700px) { .split { grid-template-columns: 1fr 1fr; } }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar p { margin: 0; }
.toolbar__right { display: flex; gap: 8px; flex-wrap: wrap; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters input, .filters select { min-height: 34px; padding: 5px 10px; border: 1px solid #CFD1CC; border-radius: 8px; background: #fff; font-size: 14px; }
.filters input[type=search] { min-width: 240px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; background: #fff; border: 1px solid var(--fog); padding: 4px; border-radius: 10px; }
.tab { padding: 6px 12px; border-radius: 7px; color: var(--steel); text-decoration: none; font-weight: 600; font-size: 13.5px; }
.tab:hover { color: var(--ink); background: var(--paper); }
.tab.is-active { background: var(--ink); color: #fff; }
.empty { padding: 28px 20px; text-align: center; color: var(--steel); margin: 0; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.cards { display: grid; gap: 12px; }
.cards--grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.danger-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.danger-row form { margin: 0; }

/* kpis */
.kpis { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-bottom: 18px; }
.kpi { display: grid; gap: 4px; padding: 18px 20px; background: #fff; border: 1px solid var(--fog); border-radius: 14px; text-decoration: none; color: var(--ink); }
a.kpi:hover { border-color: var(--ink); color: var(--ink); }
.kpi__label { font-size: 13px; color: var(--steel); font-weight: 600; }
.kpi__value { font-family: var(--display); font-weight: 800; font-size: 32px; line-height: 1.1; }
.kpi__value--sm { font-size: 22px; }
.kpi__sub { font-size: 12.5px; color: var(--steel); }
.kpis--report { margin: 8px 0 14px; }
.bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; align-items: end; height: 170px; padding: 8px 0 0; border-bottom: 1px solid var(--fog); }
.bars__col { display: grid; grid-template-rows: auto 1fr auto; height: 100%; text-align: center; align-items: end; }
.bars__bar { display: block; width: 100%; max-width: 30px; margin: 0 auto; background: var(--ink); border-radius: 5px 5px 0 0; min-height: 3px; }
.bars__col:last-child .bars__bar { background: var(--red); }
.bars__n { font-size: 11px; color: var(--steel); }
.bars__d { font-size: 11px; color: var(--steel); padding-top: 4px; }
.kv { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.kv li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--fog); font-size: 14px; }
.kv li:last-child { border-bottom: 0; }
.kv a { color: var(--ink); }
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--fog); }
.list li:last-child { border-bottom: 0; }
.list a { color: var(--ink); text-decoration: none; min-width: 0; }
.list a:hover b { color: var(--red); }
.list b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.list small { display: block; color: var(--steel); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 360px; }
.list__meta { text-align: right; font-size: 12.5px; color: var(--steel); white-space: nowrap; }
.list--tight li { padding: 7px 0; font-size: 14px; }
.list--tight a { display: inline-flex; align-items: center; gap: 6px; }
.list--tight form { margin: 0; }

/* tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--steel); text-transform: uppercase; letter-spacing: .04em; padding: 10px 14px; background: #FAFAF9; border-bottom: 1px solid var(--fog); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--fog); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #FBFBFA; }
.table tr.is-new td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.table .num { text-align: right; white-space: nowrap; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions a { margin-left: 12px; font-weight: 600; font-size: 13.5px; }
.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--fog); }

/* forms */
.form-grid { display: grid; gap: 16px; }
@media (min-width: 760px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid--3 { grid-template-columns: repeat(3, 1fr); } .field--wide { grid-column: 1 / -1; } }
.field { min-width: 0; }
.field label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 5px; }
.field .req { color: var(--red); }
.field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select, .field textarea, .stack > input[type=text], .copy input {
  width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid #CFD1CC; border-radius: 8px; background: #fff; font-size: 14.5px; }
.field textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.field textarea.mono { font-family: var(--code); font-size: 13px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(0,153,0,.14); }
.field input[type=file] { font-size: 13.5px; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--red) !important; }
.field__error { color: var(--red-dark); font-size: 13px; margin: 5px 0 0; }
.help { color: var(--steel); font-size: 12.5px; margin: 5px 0 0; }
.help code { font-size: 12px; }
.readonly { padding: 8px 12px; background: var(--paper); border-radius: 8px; min-height: 40px; }
.input-prefix { display: flex; }
.input-prefix span { display: inline-flex; align-items: center; padding: 0 12px; background: var(--paper); border: 1px solid #CFD1CC; border-right: 0; border-radius: 8px 0 0 8px; color: var(--steel); }
.input-prefix input { border-radius: 0 8px 8px 0 !important; }
.input-pair { display: flex; gap: 6px; align-items: center; }
.input-pair input:first-child { max-width: 90px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 14px; padding-top: 22px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__ui { width: 40px; height: 22px; border-radius: 999px; background: #CFD1CC; position: relative; transition: background .15s; flex: none; }
.switch__ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .switch__ui { background: var(--green); }
.switch input:checked + .switch__ui::after { transform: translateX(18px); }
.switch input:focus-visible + .switch__ui { outline: 3px solid var(--green); outline-offset: 2px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.image-current { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.image-current img { width: 96px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--fog); }
.day-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-check input { position: absolute; opacity: 0; }
.chip-check span { display: inline-block; padding: 6px 12px; border: 1.5px solid var(--fog); border-radius: 8px; font-weight: 600; font-size: 13.5px; cursor: pointer; }
.chip-check input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.copy { display: flex; gap: 6px; }
.dl { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; margin: 0 0 14px; font-size: 14.5px; }
.dl dt { color: var(--steel); font-size: 13px; padding-top: 1px; }
.dl dd { margin: 0; word-break: break-word; }
.dl--wide { grid-template-columns: 180px 1fr; }
@media (max-width: 600px) { .dl, .dl--wide { grid-template-columns: 1fr; } .dl dd { margin-bottom: 8px; } }
.message { background: var(--paper); border-radius: 10px; padding: 14px 16px; white-space: normal; }

/* settings */
.settings { display: grid; gap: 18px; align-items: start; }
@media (min-width: 1000px) { .settings { grid-template-columns: 220px 1fr; } .settings > .panel { grid-column: 2; } }
.settings__tabs { display: grid; gap: 2px; background: #fff; border: 1px solid var(--fog); border-radius: 14px; padding: 8px; grid-row: span 3; }
.settings__tab { padding: 9px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.settings__tab:hover { background: var(--paper); color: var(--ink); }
.settings__tab.is-active { background: var(--ink); color: #fff; }
@media (max-width: 999px) { .settings__tabs { display: flex; overflow-x: auto; } .settings__tab { white-space: nowrap; } }

/* tickets, threads */
.thread { display: grid; gap: 12px; margin-bottom: 20px; }
.msg { padding: 14px 16px; border-radius: 12px; background: var(--paper); border: 1px solid var(--fog); max-width: 92%; }
.msg header { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; margin-bottom: 6px; }
.msg header span { color: var(--steel); }
.msg--staff { background: #fff; border-color: #CFE7CB; box-shadow: inset 3px 0 0 var(--green); justify-self: end; }
.app--portal .msg--staff { justify-self: start; }
.app--portal .msg--mine { justify-self: end; background: #fff; }
.msg__file { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13.5px; font-weight: 600; }
.reply { border-top: 1px solid var(--fog); padding-top: 16px; display: grid; gap: 12px; }
.reply__row { display: grid; gap: 12px; align-items: end; }
@media (min-width: 760px) { .reply__row { grid-template-columns: repeat(3, 1fr); } }
.sla { margin-top: 10px; }

/* projects */
.progress { height: 8px; border-radius: 999px; background: var(--paper); overflow: hidden; margin: 8px 0; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--pixel)); border-radius: 999px; }
.progress--lg { height: 12px; }
.timeline { display: grid; gap: 14px; margin-top: 16px; }
.timeline__item { padding-left: 16px; border-left: 2px solid var(--fog); }
.timeline__item span { font-size: 12.5px; color: var(--steel); }
.timeline__item p { margin: 4px 0 0; }
.project-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.project-card { display: block; padding: 16px; border: 1px solid var(--fog); border-radius: 12px; text-decoration: none; color: var(--ink); }
.project-card:hover { border-color: var(--ink); color: var(--ink); }
.project-card__top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.project-card p { margin: 4px 0; }
.milestones { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.milestone { display: flex; gap: 14px; padding: 12px 0; position: relative; }
.milestone:not(:last-child)::before { content: ""; position: absolute; left: 11px; top: 38px; bottom: -4px; width: 2px; background: var(--fog); }
.milestone__dot { width: 24px; height: 24px; flex: none; border-radius: 50%; border: 2px solid #CFD1CC; background: #fff; display: inline-flex; align-items: center; justify-content: center; margin-top: 2px; }
.milestone--done .milestone__dot { background: var(--green); border-color: var(--green); color: #fff; }
.milestone--in_progress .milestone__dot { border-color: var(--green); box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 12px var(--pixel); }
.milestone p { margin: 2px 0; }
.welcome { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.welcome .h2 { margin: 0; }
.welcome p { margin: 0; }
.report-card { text-decoration: none; color: var(--ink); display: block; margin: 0; }
.report-card:hover { border-color: var(--ink); color: var(--ink); }
.mini-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.mini-metrics small { display: block; color: var(--steel); font-size: 12px; }
.mini-metrics b { font-family: var(--display); font-size: 18px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); font-size: 14px; }

/* bookings */
.booking-row { display: grid; gap: 16px; margin: 0; }
@media (min-width: 900px) { .booking-row { grid-template-columns: 110px 1fr 300px; align-items: start; } }
.booking-row__when { background: var(--ink); color: #fff; border-radius: 12px; padding: 12px; text-align: center; }
.booking-row__when b { display: block; font-family: var(--display); font-size: 16px; }
.booking-row__when span { color: var(--pixel); font-family: var(--code); font-size: 13px; }
.booking-row__who p { margin: 6px 0; }
.booking-row__actions { display: grid; gap: 8px; }
.booking-row__actions select, .booking-row__actions textarea { width: 100%; padding: 6px 10px; border: 1px solid #CFD1CC; border-radius: 8px; background: #fff; }

/* invoices */
.items input { width: 100%; padding: 7px 10px; border: 1px solid #CFD1CC; border-radius: 8px; min-height: 36px; }
.items input.num { text-align: right; }
.totals { margin: 16px 0 16px auto; max-width: 360px; display: grid; gap: 6px; }
.totals > div { display: flex; justify-content: space-between; gap: 20px; font-size: 14.5px; }
.totals__grand { padding-top: 8px; border-top: 1px solid var(--fog); font-size: 16px !important; }
.totals__grand b { font-family: var(--display); font-weight: 800; }

/* media */
.media-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.media-item { margin: 0; background: #fff; border: 1px solid var(--fog); border-radius: 12px; overflow: hidden; }
.media-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: var(--paper); }
.media-item figcaption { padding: 10px; display: grid; gap: 6px; }
.media-item__actions { display: flex; justify-content: space-between; align-items: center; }
.media-item__actions form { margin: 0; }

/* quill editor */
.ql-toolbar.ql-snow { border-color: #CFD1CC; border-radius: 8px 8px 0 0; background: #FAFAF9; font-family: var(--body); }
.ql-container.ql-snow { border-color: #CFD1CC; border-radius: 0 0 8px 8px; font-family: var(--body); font-size: 15px; min-height: 260px; background: #fff; }
.ql-editor { min-height: 260px; line-height: 1.65; }
.ql-editor h2 { font-family: var(--display); font-size: 22px; }
.ql-editor h3 { font-family: var(--display); font-size: 18px; }

/* auth */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: var(--paper); position: relative; overflow: hidden; }
.auth__orbit { position: absolute; width: 900px; right: -260px; bottom: -200px; opacity: .1; pointer-events: none; }
.auth__box { position: relative; width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--fog); border-radius: 18px; padding: 32px; box-shadow: 0 24px 60px rgba(26,26,26,.08); }
.auth__box--wide { max-width: 720px; }
.auth__logo { display: block; margin: 0 auto 20px; width: 150px; }
.auth__logo img { margin: 0 auto; }
.auth__title { font-size: 24px; text-align: center; }
.auth .muted { text-align: center; }
.auth .stack { gap: 14px; margin-top: 18px; }
.auth__alt { text-align: center; margin: 16px 0 0; font-size: 14px; }
.auth--install .auth__title, .auth--install .muted { text-align: left; }
.checklist { list-style: none; padding: 0; display: grid; gap: 6px; margin: 0 0 18px; }
.checklist li { padding: 8px 12px; border-radius: 8px; background: var(--green-tint); font-size: 14px; }
.checklist li.bad { background: var(--red-tint); }
.checklist li span { font-weight: 700; margin-right: 4px; }
.checklist small { display: block; color: var(--steel); margin-top: 2px; }
.steps-list { padding-left: 20px; display: grid; gap: 8px; }

/* invoice document */
.doc { background: var(--bg); padding: 20px 16px 60px; }
.doc__flash { max-width: 1080px; margin: 0 auto 16px; }
.doc__bar { max-width: 1080px; margin: 0 auto 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.doc__layout { max-width: 1080px; margin: 0 auto; display: grid; gap: 20px; align-items: start; }
@media (min-width: 960px) { .doc__layout { grid-template-columns: 1fr 300px; } .paybox { position: sticky; top: 20px; } }
.invoice { background: #fff; border: 1px solid var(--fog); border-radius: 14px; padding: clamp(20px, 4vw, 44px); }
.invoice__head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-bottom: 20px; border-bottom: 3px solid var(--red); margin-bottom: 20px; }
.invoice__head img { margin-bottom: 10px; }
.invoice__meta { text-align: right; }
.invoice__meta h1 { font-size: 30px; text-transform: uppercase; letter-spacing: .04em; margin: 0; }
.invoice__meta p { margin: 4px 0; }
.invoice__to { margin-bottom: 18px; }
.invoice__items th { background: var(--ink); color: #fff; }
.invoice__foot { border-top: 1px solid var(--fog); padding-top: 16px; margin-top: 20px; display: grid; gap: 4px; }
.paybox { background: #fff; border: 1px solid var(--fog); border-radius: 14px; padding: 22px; display: grid; gap: 8px; }
.paybox__amt { font-family: var(--display); font-weight: 800; font-size: 30px; margin: 0; }
.paybox__paid { text-align: center; color: var(--green-deep); }
.paybox__paid .ico { width: 40px; height: 40px; }
.paybox__bank summary { cursor: pointer; font-weight: 600; font-size: 14px; }
@media print {
  .no-print, .doc__flash { display: none !important; }
  .doc { background: #fff; padding: 0; }
  .doc__layout { display: block; max-width: none; }
  .invoice { border: 0; padding: 0; }
  .invoice__items th { background: #eee !important; color: #000 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .badge { border: 1px solid #ccc; }
}
