/* Cardonart: paper and ink, fine lines, serif italic titles. Built on Bootstrap 5 (local copy). */

@font-face { font-family: "Pagella"; src: url("../fonts/pagella-regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Pagella"; src: url("../fonts/pagella-italic.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "InterLocal"; src: url("../fonts/inter-400.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "InterLocal"; src: url("../fonts/inter-500.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "InterLocal"; src: url("../fonts/inter-600.woff") format("woff"); font-weight: 600 700; font-display: swap; }

:root {
  --ink: #161513;
  --ink-2: #3a3631;
  --muted: #5e584f;
  --paper: #f3efe7;
  --card: #fbf9f4;
  --line: #d9d2c5;
  --line-2: #e6e0d4;
  --accent: #9c3b22;
  --accent-soft: #f7eee8;
  --serif: "Pagella", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "InterLocal", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius: 12px;
  --bs-body-bg: var(--paper);
  --bs-body-color: var(--ink);
  --bs-body-font-family: var(--sans);
  --bs-border-color: var(--line);
  --bs-link-color-rgb: 22, 21, 19;
  --bs-link-hover-color-rgb: 156, 59, 34;
}
html { -webkit-text-size-adjust: 100%; }
body { background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.5; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3 { color: var(--ink); }
.muted, .text-muted { color: var(--muted) !important; }
.text-accent { color: var(--accent) !important; }
.serif-i { font-family: var(--serif); font-style: italic; }
.serif-lg { font-family: var(--serif); font-size: 19px; line-height: 1.55; }
.serif-num, .big-num, .big-num-sm, .kpi-n { font-family: var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.pre-line { white-space: pre-line; }
.fw-medium { font-weight: 500; }
.small { font-size: 13px; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

/* ---------------------------------------------------------------- buttons and forms */
.btn { min-height: 44px; border-radius: 8px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 0 16px; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 16px; }
.btn-main { background: var(--ink); color: var(--paper); border: 1px solid var(--ink); }
.btn-main:hover, .btn-main:focus { background: #000; color: #fff; border-color: #000; }
.btn-line { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn-line:hover, .btn-line:focus { background: #fff; color: var(--ink); border-color: var(--ink); }
.btn-line.copied { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.btn-icon { width: 44px; padding: 0; }
.link-btn { background: none; border: 0; padding: 4px 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; font: inherit; cursor: pointer; }
.link-btn:hover { color: var(--accent); }
.form-control, .form-select { min-height: 44px; border-color: #cfc7b8; border-radius: 8px; background-color: #fff; color: var(--ink); }
textarea.form-control { min-height: 0; }
.form-control:focus, .form-select:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(22, 21, 19, .12); }
.form-label { font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.form-text { color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; margin: 8px 0 0; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 1px; flex: none; accent-color: var(--ink); }
.alert { border-radius: 10px; }
.alert-success { background: #eef1ea; border-color: #c9d3bf; color: #22301b; }
.alert-danger { background: var(--accent-soft); border-color: #e2c2b6; color: #6b2412; }
.alert-warning { background: #f6efe0; border-color: #e5d5b3; color: #4d3a12; }
.alert-info { background: #edf0f2; border-color: #cdd5db; color: #1f2a33; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }

/* ---------------------------------------------------------------- app shell */
.app-top { position: sticky; top: 0; z-index: 1020; background: rgba(243, 239, 231, .96); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.app-top-row { max-width: 1360px; margin: 0 auto; padding: 12px 28px; display: flex; align-items: center; gap: 12px 24px; }
.brand { font-family: var(--serif); font-style: italic; font-size: 30px; line-height: 1; text-decoration: none; color: var(--ink); }
.brand-lg { font-family: var(--serif); font-style: italic; font-size: 44px; line-height: 1.1; font-weight: 400; }
.app-nav { display: flex; flex-wrap: wrap; gap: 2px; flex: 1 1 auto; }
.app-nav-link { display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px; text-decoration: none; color: var(--muted); border-bottom: 1.5px solid transparent; font-size: 15px; }
.app-nav-link i { display: none; }
.app-nav-link:hover { color: var(--ink); }
.app-nav-link.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.nav-badge, .tab-badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; line-height: 20px; text-align: center; }
.app-top-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-switch button { min-height: 34px; padding: 0 10px; border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 500; }
.lang-switch button.on { background: var(--ink); color: var(--paper); }
.avatar { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--ink); background: var(--card); display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-style: italic; font-size: 20px; text-decoration: none; }
.app-icon-btn { width: 40px; height: 40px; border: 0; background: transparent; color: var(--muted); border-radius: 8px; }
.app-icon-btn:hover { color: var(--ink); background: var(--card); }
.app-main { max-width: 1360px; margin: 0 auto; padding: 26px 28px 64px; }
.app-tabbar { display: none; }
.app-offcanvas { background: var(--paper); }
.app-nav-vertical { display: flex; flex-direction: column; }
.app-nav-vertical .app-nav-link { border-bottom: 1px solid var(--line-2); padding: 14px 4px; font-size: 16px; }
.app-nav-vertical .app-nav-link i { display: inline-block; width: 20px; }
.app-nav-vertical .app-nav-link.active { border-bottom-color: var(--line-2); }

.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px 20px; margin-bottom: 22px; }
.kicker { margin: 0 0 4px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.page-h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 4vw, 44px); line-height: 1.08; overflow-wrap: anywhere; }
.page-head-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.section-h { font-family: var(--serif); font-weight: 400; font-size: 26px; margin: 0 0 12px; }

.layout-2 { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.layout-main { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.layout-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.layout-2-left .layout-side { order: -1; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin: 0; }
.panel-quiet { background: transparent; }
.panel-h { font-family: var(--serif); font-weight: 400; font-size: 25px; margin: 0 0 12px; line-height: 1.15; }
.panel-ink { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.panel-ink .kicker, .panel-ink .small { color: #cfc7b8; }
.panel-ink a { color: var(--paper); }
.big-num { font-size: 40px; line-height: 1.1; }
.big-num-sm { font-size: 28px; }
.form-narrow { max-width: 820px; }

.list-lines { list-style: none; margin: 0; padding: 0; }
.list-lines > li { padding: 11px 0; border-top: 1px solid var(--line-2); }
.list-lines > li:first-child { border-top: 0; padding-top: 2px; }
.list-lines.numbered { counter-reset: n; }
.list-lines.numbered > li { counter-increment: n; position: relative; padding-left: 30px; }
.list-lines.numbered > li::before { content: counter(n); position: absolute; left: 0; top: 7px; font-family: var(--serif); font-size: 22px; }
.todo { display: flex; gap: 10px; align-items: flex-start; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; background: currentColor; flex: none; }
.dot-open { margin-top: 7px; color: var(--accent); background: transparent; }
.total-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 6px; padding-top: 12px; border-top: 1.5px solid var(--ink); }

.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; border: 1px solid var(--line); color: var(--muted); }
.pill-ink { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.pill-open { border-color: #c9a79a; color: var(--accent); background: var(--accent-soft); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); border-bottom: 1.5px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.cards-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.req-card { display: block; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; color: var(--ink); }
.req-card:hover { border-color: var(--ink); color: var(--ink); }
.req-card.is-past { opacity: .65; }
.req-idea { font-size: 18px; line-height: 1.35; margin-top: 6px; }
.copy-row, .search-row { display: flex; gap: 8px; flex-wrap: wrap; }
.copy-row .form-control, .search-row .form-control { flex: 1 1 240px; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px 18px; margin: 0; }
.facts-1 { grid-template-columns: 1fr; }
.facts-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.facts dt { font-size: 12px; font-weight: 400; color: var(--muted); }
.facts dd { margin: 2px 0 0; }

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-top: 12px; }
.thumb { margin: 0; }
.thumb img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #efeae0; display: block; }
.thumb figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; display: flex; justify-content: space-between; gap: 6px; }
.upload-inline { display: flex; flex-wrap: wrap; gap: 8px; }
.upload-inline .form-select { flex: 0 1 200px; }
.upload-inline .form-control { flex: 1 1 240px; }

/* ---------------------------------------------------------------- agenda */
.week-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.week { display: grid; grid-template-columns: repeat(7, minmax(128px, 1fr)); min-width: 896px; }
.day { border-right: 1px solid var(--line-2); min-height: 520px; display: flex; flex-direction: column; }
.day:last-child { border-right: 0; }
.day.is-today { background: #fffdf8; }
.day-head { padding: 12px 12px 10px; border-bottom: 1px solid var(--line-2); }
.day-dow { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.day-num { font-family: var(--serif); font-size: 30px; line-height: 1.1; }
.is-today .day-num { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
.day-place { font-size: 12px; color: var(--muted); }
.day-body { padding: 8px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.appt { display: block; text-decoration: none; padding: 9px 10px 10px; border: 1px solid var(--ink); border-radius: 8px; background: var(--card); color: var(--ink); }
.appt:hover { color: var(--ink); box-shadow: 0 2px 0 var(--ink); }
.appt-pending_deposit { border-color: #c9a79a; background: var(--accent-soft); }
.appt-done { border-color: var(--line); opacity: .8; }
.appt-no_show { border-color: var(--line); opacity: .6; }
.appt-k-touchup, .appt-k-consult { border-color: var(--line); background: var(--paper); }
.appt-time { display: block; font-size: 12px; color: var(--muted); }
.appt-client { display: block; font-weight: 600; margin-top: 2px; font-size: 14px; }
.appt-piece { display: block; font-family: var(--serif); font-style: italic; font-size: 16px; line-height: 1.2; margin-top: 2px; }
.appt-status { display: flex; align-items: center; gap: 6px; margin-top: 7px; font-size: 12px; }
.appt-pending_deposit .appt-status { color: var(--accent); }
.appt-pending_deposit .appt-status .dot { background: transparent; }
.appt-k-touchup .appt-status, .appt-k-consult .appt-status { color: var(--muted); }
.appt-k-touchup .appt-status .dot, .appt-k-consult .appt-status .dot { background: transparent; }
.day-add { margin-top: auto; align-self: flex-start; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--muted); opacity: .45; }
.day-add:hover, .day-add:focus { opacity: 1; background: var(--paper); color: var(--ink); }
.legend { font-size: 13px; color: var(--muted); margin: 10px 0 0; }

/* ---------------------------------------------------------------- finance */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.kpi-l { font-size: 13px; color: var(--muted); }
.kpi-n { font-size: 38px; line-height: 1.15; margin-top: 2px; }
.kpi-s { font-size: 13px; color: var(--muted); }
.kpi-ink { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.kpi-ink .kpi-l, .kpi-ink .kpi-s { color: #cfc7b8; }
.bar { height: 12px; border-radius: 999px; background: var(--line-2); overflow: hidden; margin: 14px 0 10px; }
.bar-fill { height: 100%; background: var(--ink); }
.bar-fill.warn { background: var(--accent); }
.bars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; align-items: end; height: 200px; }
.bars-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; height: 100%; }
.bars-v { font-size: 11px; color: var(--muted); white-space: nowrap; }
.bars-b { width: 100%; max-width: 30px; background: #b9b0a1; border-radius: 4px 4px 0 0; min-height: 1px; }
.bars-col.on .bars-b { background: var(--ink); }
.bars-l { font-size: 12px; color: var(--muted); text-decoration: none; }
.bars-col.on .bars-l { color: var(--ink); font-weight: 600; }
.table-wrap { overflow-x: auto; }
.table-lines { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14px; }
.table-lines th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 8px 8px 8px 0; }
.table-lines td { padding: 10px 8px 10px 0; border-top: 1px solid var(--line-2); vertical-align: top; }

/* ---------------------------------------------------------------- login and 2FA */
.page-login, .page-center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.card-login { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; color: var(--ink); box-shadow: none !important; }
.card-2fa { max-width: 480px; }
.card-login .input-group-text { background: var(--paper); border-color: #cfc7b8; color: var(--muted); }
.login-lang a { color: var(--muted); }
.backup-codes { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-size: 15px; }

/* ---------------------------------------------------------------- public pages */
.page-public { background: var(--paper); }
.pub-wrap { max-width: 1160px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.pub-top { border-bottom: 1px solid var(--line); }
.pub-top-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 20px; padding-top: 16px; padding-bottom: 14px; }
.pub-brand { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.pub-sub { font-size: 13px; color: var(--muted); }
.lang-links { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-links a { min-height: 36px; padding: 0 12px; display: inline-flex; align-items: center; text-decoration: none; color: var(--muted); font-size: 13px; }
.lang-links a.on { background: var(--ink); color: var(--paper); }
.pub-main { padding-top: 36px; padding-bottom: 56px; }
.pub-h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 6vw, 56px); line-height: 1.05; margin: 0; }
.lead-text { max-width: 640px; color: var(--muted); margin: 12px 0 28px; font-size: 16px; line-height: 1.6; }
.pub-done { max-width: 640px; padding: 40px 0; }
.pub-grid { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.pub-form { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.pub-form fieldset.panel { padding: 22px 24px; }
.pub-form legend { float: none; width: auto; padding: 0 6px; margin: 0 0 8px -6px; font-family: var(--serif); font-size: 26px; line-height: 1.2; }
.pub-form legend span { font-style: italic; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.upload-row { display: flex; flex-wrap: wrap; gap: 12px; }
.dropzone { flex: 1 1 220px; min-height: 120px; border: 1.5px dashed #9e9586; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; text-align: center; padding: 12px; cursor: pointer; background: #fff; }
.dropzone:hover, #images:focus + .dropzone, .dropzone:focus-within { border-color: var(--ink); }
.dropzone i { font-size: 22px; }
.previews { display: contents; }
.preview { position: relative; width: 120px; height: 120px; margin: 0; }
.preview img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.preview-rm { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(22, 21, 19, .8); color: #fff; font-size: 18px; line-height: 1; }
.body-pick { display: flex; flex-wrap: wrap; gap: 24px; }
.body-figure { flex: 0 0 200px; display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 0 auto; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; font-size: 13px; }
.seg input:checked + span { background: var(--ink); color: var(--paper); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }
.figure { width: 170px; height: auto; }
.figure > * { fill: transparent; stroke: var(--ink); stroke-width: 1.2; transition: fill .15s; }
.figure .on { fill: var(--accent); }
.figure.is-back circle { fill: #e6e0d4; }
.body-fields { flex: 1 1 300px; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid #cfc7b8; background: var(--card); font-size: 14px; }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.size-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.unit { display: flex; align-items: center; gap: 6px; }
.unit .form-control { width: 90px; }
.times { padding-bottom: 12px; }
.date-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.date-row .form-control { flex: 1 1 170px; max-width: 220px; }
.date-row .form-select { flex: 1 1 150px; max-width: 200px; }
.date-n { font-family: var(--serif); font-size: 22px; width: 18px; }
.send-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.pub-summary { flex: 1 1 280px; min-width: 0; position: sticky; top: 16px; background: var(--ink); color: var(--paper); border-radius: var(--radius); padding: 22px 24px; }
.pub-summary .panel-h { color: var(--paper); }
.pub-summary dl { display: flex; flex-direction: column; gap: 12px; margin: 0 0 16px; font-size: 14px; }
.pub-summary dt { color: #cfc7b8; font-size: 12px; font-weight: 400; }
.pub-summary dd { margin: 2px 0 0; }
.pub-summary p { margin: 0; padding-top: 14px; border-top: 1px solid #3a3733; color: #cfc7b8; line-height: 1.6; }
.pub-foot { padding-top: 20px; padding-bottom: 32px; border-top: 1px solid var(--line); }
.legal p { max-width: 720px; line-height: 1.7; color: var(--ink-2); font-size: 16px; }

/* ---------------------------------------------------------------- phones */
@media (max-width: 991px) {
  .app-nav { display: none; }
  .app-top-row { padding: 10px 16px; }
  .app-top-right .lang-switch { display: none; }
  .app-main { padding: 20px 16px 96px; }
  .app-tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
    background: var(--card); border-top: 1px solid var(--line); padding: 4px 6px calc(8px + env(safe-area-inset-bottom)); }
  .app-tab { position: relative; min-height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none;
    color: var(--muted); font-size: 11px; border: 0; background: transparent; }
  .app-tab i { font-size: 18px; }
  .app-tab.active { color: var(--ink); font-weight: 600; }
  .app-tab .tab-badge { position: absolute; top: 4px; right: calc(50% - 22px); min-width: 18px; line-height: 18px; font-size: 11px; }
  .pub-summary { position: static; }
}
@media (max-width: 575px) {
  .pub-wrap { padding-left: 16px; padding-right: 16px; }
  .panel, .pub-form fieldset.panel { padding: 16px; }
  .cards-list { grid-template-columns: 1fr; }
  .facts-2 { grid-template-columns: 1fr 1fr; }
  .bars { gap: 3px; }
  .bars-v { display: none; }
  .date-row .form-control, .date-row .form-select { max-width: none; }
  .page-head-actions { width: 100%; }
}
@media print {
  .app-top, .app-tabbar, .app-side { display: none !important; }
  body.has-app-nav { padding-left: 0 !important; }
}
.app-main > .panel { margin-bottom: 20px; }
@media (max-width: 575px) {
  .week-scroll { overflow: visible; }
  .week { grid-template-columns: 1fr; min-width: 0; }
  .day { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line-2); }
  .day:last-child { border-bottom: 0; }
  .day-head { display: flex; align-items: baseline; gap: 10px; padding: 10px 12px; }
  .day-num { font-size: 24px; }
  .day-place { margin-left: auto; }
  .day-body { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
  .day-body .appt { flex: 1 1 100%; }
  .day-add { margin-top: 0; }
}

/* ---- stage 2a: photo of the work, portfolio, posts, notifications ---- */
.seg-btn { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; font-size: 13px; color: var(--ink); text-decoration: none; }
.seg-btn.on { background: var(--ink); color: var(--paper); }
.photo-pick { display: flex; flex-wrap: wrap; gap: 10px; }
.photo-pick .btn { position: relative; }
.photo-stage { position: relative; width: 100%; max-width: 420px; aspect-ratio: 4 / 5; border: 1px solid var(--ink); background: var(--paper); overflow: hidden; }
.photo-stage canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.photo-stage canvas:active { cursor: grabbing; }
.photo-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to right, transparent 33.2%, rgba(255,255,255,.35) 33.3%, transparent 33.5%, transparent 66.5%, rgba(255,255,255,.35) 66.6%, transparent 66.8%),
              linear-gradient(to bottom, transparent 33.2%, rgba(255,255,255,.35) 33.3%, transparent 33.5%, transparent 66.5%, rgba(255,255,255,.35) 66.6%, transparent 66.8%); }
.photo-hint { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); background: rgba(22, 21, 19, .7); color: #fff; font-size: 12px; padding: 4px 10px; border-radius: 999px; pointer-events: none; white-space: nowrap; }
.photo-tools { max-width: 420px; }
.folio { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.folio-item { position: relative; margin: 0; }
.folio-item img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; border: 1px solid var(--line); }
.folio-item figcaption { font-size: 12px; line-height: 1.35; margin-top: 6px; }
.folio-check { position: absolute; top: 8px; left: 8px; width: 30px; height: 30px; border-radius: 50%; background: rgba(243, 239, 231, .92); border: 1px solid var(--ink);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; cursor: pointer; }
.folio-check input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.folio-item.is-on img { outline: 3px solid var(--ink); outline-offset: -3px; }
.folio-item.is-on .folio-check { background: var(--ink); color: var(--paper); }
.folio-item.is-blocked img { opacity: .55; }
.folio-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 12px 0; background: var(--paper); border-top: 1px solid var(--line); margin-top: 16px; }
@media (max-width: 575.98px) { .folio { grid-template-columns: repeat(2, 1fr); } .folio-bar { bottom: 64px; } }
.post-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.post-strip figure { position: relative; flex: 0 0 120px; margin: 0; }
.post-strip img { width: 120px; aspect-ratio: 4 / 5; object-fit: cover; border: 1px solid var(--line); display: block; }
.post-strip b { position: absolute; top: 6px; left: 6px; background: var(--ink); color: var(--paper); border-radius: 50%; width: 22px; height: 22px; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.post-preview { white-space: pre-wrap; font-size: 13px; background: #fff; border: 1px solid var(--line); padding: 12px; max-height: 340px; overflow: auto; }
.post-row { display: flex; gap: 12px; align-items: flex-start; }
.post-row img { width: 56px; aspect-ratio: 4 / 5; object-fit: cover; border: 1px solid var(--line); }
.lang-block + .lang-block { margin-top: 14px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters .form-select, .filters .form-control { width: auto; min-width: 150px; flex: 0 1 200px; }
@media (max-width: 575.98px) { .filters .form-select, .filters .form-control { flex: 1 1 45%; min-width: 0; } }
.note { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 10px 14px; font-size: 14px; }
.form-range { accent-color: var(--ink); }
.form-range::-webkit-slider-thumb { background: var(--ink); }
.form-range::-moz-range-thumb { background: var(--ink); }
.form-range:focus::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(22, 21, 19, .2); }

/* ---- menu on the left (computers, 992px and wider); the top bar stays only on phones ---- */
.app-side { display: none; }
@media (min-width: 992px) {
  .app-top { display: none; }
  body.has-app-nav { padding-left: 240px; }
  .app-side { position: fixed; top: 0; bottom: 0; left: 0; z-index: 1020; width: 240px; display: flex; flex-direction: column; gap: 18px;
    padding: 22px 14px 16px; background: var(--card); border-right: 1px solid var(--line); overflow-y: auto; }
  .side-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 14px; border-bottom: 1px solid var(--line); text-decoration: none; }
  .side-brand img { border-radius: 8px; }
  .side-brand .brand { font-size: 28px; }
  .side-nav { display: flex; flex-direction: column; gap: 2px; }
  .side-nav .app-nav-link { display: flex; padding: 10px 12px; border-bottom: 0; border-radius: 8px; border-left: 2px solid transparent; }
  .side-nav .app-nav-link i { display: inline-block; width: 18px; text-align: center; color: var(--muted); }
  .side-nav .app-nav-link:hover { background: var(--paper); }
  .side-nav .app-nav-link.active { background: var(--paper); border-left-color: var(--ink); }
  .side-nav .app-nav-link.active i { color: var(--ink); }
  .side-nav .nav-badge { margin-left: auto; }
  .side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
  .side-foot .lang-switch { align-self: flex-start; }
  .side-user { display: flex; align-items: center; gap: 10px; }
  .side-user .avatar { flex: 0 0 auto; width: 36px; height: 36px; font-size: 18px; }
  .side-user-name { flex: 1 1 auto; min-width: 0; font-size: 14px; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side-user-name:hover { text-decoration: underline; }
}
