/* PortföyPro — panel styles. No inline styles anywhere (strict CSP): everything lives here. */
:root {
  --bg: #f4f2ee;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --ink: #15212b;
  --ink-2: #3a4650;
  --muted: #747069;
  --line: #e8e4dc;
  --line-2: #d9d3c7;
  --brand: #1d4a42;
  --brand-ink: #0f2e29;
  --brand-2: #2c6a5d;
  --brand-soft: #e5efec;
  --accent: #c39a5b;
  --accent-soft: #f6eedf;
  --green: #1f8a5b; --green-soft: #e3f4ea;
  --amber: #b7791f; --amber-soft: #fbf0d9;
  --red: #c2413a;   --red-soft: #fbe6e3;
  --blue: #2f63b5;  --blue-soft: #e4ecfa;
  --gray: #6b6f76;  --gray-soft: #eeeeec;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(21, 33, 43, .05), 0 4px 16px rgba(21, 33, 43, .05);
  --shadow-lg: 0 12px 40px rgba(21, 33, 43, .14);
  --side: 248px;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Cormorant Garamond', Georgia, serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 500 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { color: var(--brand); }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 800; }
h2 { font-size: 18px; font-weight: 800; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0 0 .8em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.ic { width: 18px; height: 18px; flex: none; stroke-width: 1.9; vertical-align: middle; }
.ic.sm { width: 15px; height: 15px; }
.ic.lg { width: 22px; height: 22px; }
.ic.xl { width: 30px; height: 30px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden, [hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .92em; }
.pre { white-space: pre-line; }
.right { text-align: right; }
.center { text-align: center; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 36px; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.top { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 16px; }

/* ── app shell ── */
.app { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: var(--brand-ink); color: #cfe0db; display: flex; flex-direction: column; padding: 18px 14px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 20px; color: #fff; }
.brand:hover { color: #fff; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(140deg, var(--accent), #e2c08a); color: var(--brand-ink); display: grid; place-items: center; flex: none; }
.brand-mark .ic { width: 21px; height: 21px; stroke-width: 2.2; }
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: -.01em; line-height: 1.1; }
.brand-sub { font-size: 11.5px; color: #8fb0a8; font-weight: 600; }
.brand-logo { max-height: 40px; max-width: 170px; object-fit: contain; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: #6f958c; font-weight: 700; padding: 16px 12px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: #cfe0db; font-weight: 600; font-size: 14.5px; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.is-active { background: rgba(255,255,255,.1); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.nav a .count { margin-left: auto; background: var(--accent); color: var(--brand-ink); font-size: 11.5px; font-weight: 800; border-radius: 99px; padding: 1px 8px; }
.side-foot { margin-top: auto; padding-top: 16px; }
.me-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.06); color: #fff; }
.me-card:hover { background: rgba(255,255,255,.1); color: #fff; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--brand); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.avatar.dark { background: var(--brand); color: #fff; }
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }
.me-name { font-weight: 700; font-size: 14px; line-height: 1.2; }
.me-role { font-size: 12px; color: #8fb0a8; }
.side .logout { margin-top: 8px; width: 100%; background: none; border: 0; color: #8fb0a8; font: inherit; font-size: 13.5px; font-weight: 600; display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 10px; cursor: pointer; }
.side .logout:hover { color: #fff; background: rgba(255,255,255,.06); }

.side-back { display: none; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 14px 32px; background: rgba(244, 242, 238, .88); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; }
.topbar.scrolled { border-bottom-color: var(--line); }
.search { flex: 1; max-width: 460px; position: relative; }
.search .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input[type=search] { width: 100%; padding: 10px 14px 10px 40px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font: inherit; color: var(--ink); }
.search input:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 4px var(--brand-soft); }
.topbar .spacer { flex: 1; }
.mobile-brand, .menu-btn { display: none; }
.content { padding: 8px 32px 48px; max-width: 1360px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 12px 0 22px; }
.page-head .sub { color: var(--muted); margin-top: 4px; font-size: 14px; }
.crumb { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.crumb:hover { color: var(--brand); }

/* ── buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 11px; border: 1px solid transparent; font: 700 14px/1.2 var(--font); cursor: pointer; white-space: nowrap; transition: background .15s, box-shadow .15s, color .15s, border-color .15s, transform .05s; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 2px 8px rgba(29, 74, 66, .25); }
.btn-primary:hover { background: var(--brand-ink); color: #fff; }
.btn-accent { background: var(--accent); color: var(--brand-ink); }
.btn-accent:hover { background: #b38a4c; color: var(--brand-ink); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--line-2); background: var(--surface-2); color: var(--ink); }
.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-soft:hover { background: #d6e7e2; color: var(--brand-ink); }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-wa { background: #25d366; color: #fff; }
.btn-wa:hover { background: #1fb457; color: #fff; }
.btn-sm { padding: 7px 11px; font-size: 13px; border-radius: 9px; }
.btn-lg { padding: 13px 20px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { padding: 8px; border-radius: 9px; }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--brand-2); cursor: pointer; font-weight: 700; }
.link-btn:hover { color: var(--brand); }
.link-btn.danger { color: var(--red); }

/* ── cards ── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.card-head h2 { font-size: 16px; display: flex; align-items: center; gap: 9px; }
.card-head h2 .ic { color: var(--brand-2); }
.card-body { padding: 20px 22px; }
.card-foot { padding: 14px 22px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.layout-side { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.sticky { position: sticky; top: 84px; }

/* ── stats ── */
.stat { padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start; }
.stat-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--brand-soft); color: var(--brand); }
.stat-ic.gold { background: var(--accent-soft); color: #9a7436; }
.stat-ic.red { background: var(--red-soft); color: var(--red); }
.stat-ic.blue { background: var(--blue-soft); color: var(--blue); }
.stat-num { font-size: 27px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.stat-label { color: var(--muted); font-size: 13px; font-weight: 600; }
.hello { background: linear-gradient(120deg, var(--brand-ink), var(--brand) 60%, var(--brand-2)); color: #fff; border-radius: var(--radius); padding: 26px 28px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; position: relative; overflow: hidden; }
.hello::after { content: ''; position: absolute; right: -60px; top: -80px; width: 280px; height: 280px; border-radius: 50%; border: 50px solid rgba(195, 154, 91, .14); }
.hello h1 { font-size: 24px; }
.hello p { color: #bcd4ce; margin: 6px 0 0; }
.hello .btn { position: relative; z-index: 1; }
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 96px 1fr 34px; gap: 10px; align-items: center; font-size: 13.5px; font-weight: 600; }
.bar { height: 9px; background: var(--gray-soft); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--brand-2); transition: width .6s ease; }
.bar i.green { background: var(--green); } .bar i.amber { background: var(--amber); } .bar i.blue { background: var(--blue); } .bar i.red { background: var(--red); } .bar i.gray { background: #a6a39c; }

/* ── badges / chips ── */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; line-height: 1.5; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-gray { background: var(--gray-soft); color: var(--gray); }
.badge-muted { background: var(--gray-soft); color: #9a978f; }
.badge.plain::before { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.chip .ic { width: 14px; height: 14px; color: var(--brand-2); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-ref { font: 700 12px/1 ui-monospace, Consolas, monospace; color: var(--muted); letter-spacing: .02em; }

/* ── filters / tabs ── */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.filters .field { margin: 0; }
.filters select, .filters input:not([type=checkbox]) { width: auto; min-width: 150px; flex: 0 1 auto; }
.filters input[type=search] { flex: 1 1 240px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; overflow-x: auto; max-width: 100%; }
.seg a, .seg button { padding: 7px 13px; border-radius: 8px; font-weight: 700; font-size: 13px; color: var(--muted); white-space: nowrap; background: none; border: 0; font-family: inherit; cursor: pointer; }
.seg a:hover { color: var(--ink); }
.seg a.is-active, .seg button.is-active { background: var(--brand); color: #fff; }
.seg a .n { opacity: .7; margin-left: 3px; }

/* ── listing cards ── */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.lcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; position: relative; color: inherit; }
.lcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: inherit; }
.lcard-img { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(135deg, #e9e5dd, #f6f3ee); overflow: hidden; }
.lcard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.lcard:hover .lcard-img img { transform: scale(1.04); }
.lcard-img .noimg { position: absolute; inset: 0; display: grid; place-items: center; color: #b9b2a5; }
.lcard-img .noimg .ic { width: 40px; height: 40px; stroke-width: 1.4; }
.lcard-tags { position: absolute; left: 12px; top: 12px; display: flex; gap: 6px; }
.lcard-tags .badge { background: rgba(255,255,255,.94); box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.lcard-deal { position: absolute; right: 12px; top: 12px; background: var(--brand-ink); color: #fff; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 5px 10px; border-radius: 8px; }
.lcard-deal.kiralik { background: var(--accent); color: var(--brand-ink); }
.lcard-photos { position: absolute; right: 12px; bottom: 12px; background: rgba(15, 25, 30, .7); color: #fff; font-size: 12px; font-weight: 700; border-radius: 8px; padding: 3px 8px; display: flex; gap: 5px; align-items: center; }
.lcard-photos .ic { width: 13px; height: 13px; }
.lcard-body { padding: 15px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.lcard-price { font-size: 19px; font-weight: 800; letter-spacing: -.02em; color: var(--brand-ink); }
.lcard-title { font-weight: 700; font-size: 14.5px; line-height: 1.35; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lcard-loc { color: var(--muted); font-size: 13px; display: flex; gap: 5px; align-items: center; }
.lcard-loc .ic { width: 14px; height: 14px; }
.lcard-facts { display: flex; gap: 14px; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line); color: var(--ink-2); font-size: 13px; font-weight: 600; flex-wrap: wrap; }
.lcard-facts span { display: inline-flex; align-items: center; gap: 5px; }
.lcard-facts .ic { width: 15px; height: 15px; color: var(--brand-2); }
.lcard-foot { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.lcard-select { position: absolute; left: 10px; bottom: 10px; z-index: 2; display: none; }
.select-mode .lcard-select { display: block; }
.lcard-select input { width: 24px; height: 24px; accent-color: var(--brand); cursor: pointer; }
.select-mode .lcard.is-picked { outline: 3px solid var(--accent); outline-offset: -1px; }
.select-bar { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 40; background: var(--brand-ink); color: #fff; border-radius: 16px; padding: 12px 14px 12px 20px; display: flex; gap: 12px; align-items: center; box-shadow: var(--shadow-lg); width: min(760px, calc(100% - 24px)); flex-wrap: wrap; }
.select-bar select { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.2); border-radius: 9px; padding: 8px 10px; font: inherit; font-size: 13.5px; max-width: 220px; }
.select-bar select option { color: var(--ink); }
.select-bar .count { font-weight: 800; }

/* ── tables / lists ── */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.t td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr:hover { background: var(--surface-2); }
.t .who { display: flex; align-items: center; gap: 11px; }
.t .who b { display: block; color: var(--ink); }
.list { display: flex; flex-direction: column; }
.list-item { display: flex; gap: 13px; align-items: center; padding: 13px 22px; border-bottom: 1px solid var(--line); color: inherit; }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover { background: var(--surface-2); color: inherit; }
.list-item .thumb { width: 64px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--gray-soft); flex: none; }
.list-item .t1 { font-weight: 700; color: var(--ink); font-size: 14px; line-height: 1.3; }
.list-item .t2 { color: var(--muted); font-size: 12.5px; }
.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty .ic { width: 42px; height: 42px; color: #c4bdb0; stroke-width: 1.4; margin: 0 auto 12px; display: block; }
.empty h3 { color: var(--ink); margin-bottom: 4px; }

/* ── forms ── */
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px 18px; }
.col-12 { grid-column: span 12; } .col-8 { grid-column: span 8; } .col-6 { grid-column: span 6; } .col-4 { grid-column: span 4; } .col-3 { grid-column: span 3; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 0; }
.field > label, .label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--muted); font-weight: 500; }
.req { color: var(--red); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=search], input[type=number], input[type=url], input[type=datetime-local], input[type=date], select, textarea {
  width: 100%; padding: 10px 13px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink); font: 500 14.5px/1.4 var(--font); transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
textarea.tall { min-height: 260px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23747069' stroke-width='2'%3E%3Cpath d='m2 4 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 4px var(--brand-soft); }
.is-bad input, .is-bad select, .is-bad textarea, input.is-bad { border-color: var(--red); background: #fffafa; }
.field-err { color: var(--red); font-size: 12.5px; font-weight: 600; }
.input-group { display: flex; }
.input-group input { border-radius: 10px 0 0 10px; }
.input-group select { width: auto; border-radius: 0 10px 10px 0; border-left: 0; background-color: var(--surface-2); font-weight: 700; }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 44px; }
.input-suffix span { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; font-weight: 700; pointer-events: none; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.check { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 13.5px; font-weight: 600; background: var(--surface); user-select: none; transition: border-color .12s, background .12s; }
.check:hover { border-color: var(--line-2); }
.check input { width: 17px; height: 17px; accent-color: var(--brand); margin: 0; flex: none; }
.check:has(input:checked) { border-color: var(--brand-2); background: var(--brand-soft); color: var(--brand-ink); }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 600; font-size: 14px; }
.switch input { appearance: none; width: 42px; height: 24px; background: #d4cfc4; border-radius: 99px; position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; }
.switch input::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked { background: var(--brand-2); }
.switch input:checked::after { transform: translateX(18px); }
.form-section { scroll-margin-top: 90px; }
.form-section + .form-section { margin-top: 20px; }
.section-nav { display: flex; flex-direction: column; gap: 2px; }
.section-nav a { padding: 9px 12px; border-radius: 9px; color: var(--ink-2); font-weight: 600; font-size: 14px; display: flex; gap: 10px; align-items: center; }
.section-nav a:hover { background: var(--surface-2); color: var(--ink); }
.section-nav a.is-active { background: var(--brand-soft); color: var(--brand); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(to top, var(--bg) 70%, rgba(244,242,238,0)); z-index: 5; }
.group-title { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: var(--muted); margin: 18px 0 10px; }
.group-title:first-child { margin-top: 0; }

/* description generator */
.gen { border: 1px dashed var(--accent); background: linear-gradient(180deg, #fffdf9, var(--accent-soft)); border-radius: 12px; padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.gen-title { display: flex; align-items: center; gap: 8px; font-weight: 800; color: #8a6730; margin-right: auto; }
.gen select { width: auto; min-width: 170px; padding: 8px 34px 8px 12px; }
.suggest { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.suggest button { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; font: 700 13px/1.35 var(--font); color: var(--ink-2); cursor: pointer; display: flex; gap: 8px; align-items: center; }
.suggest button:hover { border-color: var(--brand-2); color: var(--brand); }
.suggest button .ic { color: var(--accent); }

/* ── flash / alerts ── */
.flashes { position: fixed; top: 76px; right: 16px; z-index: 100; display: flex; flex-direction: column; gap: 10px; width: min(400px, calc(100% - 32px)); }
.flash { display: flex; gap: 11px; align-items: flex-start; padding: 13px 15px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-lg); border-left: 4px solid var(--green); font-size: 14px; font-weight: 600; animation: slidein .3s ease; }
.flash .ic { color: var(--green); margin-top: 1px; }
.flash.err { border-left-color: var(--red); } .flash.err .ic { color: var(--red); }
.flash.info { border-left-color: var(--blue); } .flash.info .ic { color: var(--blue); }
.flash.out { opacity: 0; transform: translateX(20px); transition: all .3s; }
.flash button { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; }
@keyframes slidein { from { opacity: 0; transform: translateY(-8px); } }
.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; font-size: 14px; background: var(--blue-soft); color: #1f4a8a; align-items: flex-start; }
.alert.warn { background: var(--amber-soft); color: #7b4f0c; }
.alert.err { background: var(--red-soft); color: #8b2a24; }
.alert.ok { background: var(--green-soft); color: #145c3c; }
.alert .ic { margin-top: 1px; }
.secret-box { font: 700 18px/1.3 ui-monospace, Consolas, monospace; background: var(--surface); border: 2px dashed var(--accent); border-radius: 10px; padding: 12px 16px; letter-spacing: .04em; word-break: break-all; user-select: all; color: var(--brand-ink); }

/* ── listing detail ── */
.gallery { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 8; background: var(--gray-soft); }
.gallery a { position: relative; overflow: hidden; display: block; }
.gallery a:first-child { grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery a:hover img { transform: scale(1.03); }
.gallery .more { position: absolute; inset: 0; background: rgba(15, 25, 30, .55); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 18px; }
.gallery.one { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.gallery.one a:first-child { grid-row: auto; }
.gallery.two { grid-template-rows: 1fr; grid-template-columns: 1fr 1fr; }
.gallery.two a:first-child { grid-row: auto; }
.gallery-empty { border: 2px dashed var(--line-2); border-radius: var(--radius); padding: 40px; text-align: center; color: var(--muted); background: var(--surface); }
.price-big { font-size: 30px; font-weight: 800; letter-spacing: -.02em; color: var(--brand-ink); line-height: 1.1; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.fact { padding: 12px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.fact dt { font-size: 12px; color: var(--muted); font-weight: 600; display: flex; gap: 6px; align-items: center; }
.fact dt .ic { width: 14px; height: 14px; color: var(--brand-2); }
.fact dd { margin: 3px 0 0; font-weight: 700; font-size: 14.5px; }
.desc { white-space: pre-line; line-height: 1.75; color: var(--ink-2); }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; font-size: 14px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }
.private-box { background: repeating-linear-gradient(-45deg, #fffaf0, #fffaf0 10px, #fdf5e6 10px, #fdf5e6 20px); border: 1px solid #efdcb8; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 26px; font-size: 13.5px; }
.timeline li::before { content: ''; position: absolute; left: 6px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--brand-2); box-shadow: 0 0 0 4px var(--brand-soft); }
.timeline li::after { content: ''; position: absolute; left: 10px; top: 18px; bottom: 0; width: 1px; background: var(--line-2); }
.timeline li:last-child::after { display: none; }
.timeline .when { color: var(--muted); font-size: 12px; }
.share-box { display: flex; gap: 8px; }
.share-box input { font-size: 13px; background: var(--surface-2); }
.qr { width: 150px; height: 150px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.qr svg { width: 100%; height: 100%; display: block; }
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 210px; z-index: 30; display: none; }
.menu.open .menu-pop { display: block; }
.menu-pop a, .menu-pop button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px 11px; border-radius: 8px; color: var(--ink); font: 600 14px var(--font); background: none; border: 0; cursor: pointer; text-align: left; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--surface-2); }
.menu-pop .danger { color: var(--red); }
.status-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.status-pick label { cursor: pointer; }
.status-pick input { position: absolute; opacity: 0; pointer-events: none; }
.status-pick span { display: block; text-align: center; padding: 9px 6px; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.status-pick input:checked + span { border-color: var(--brand); background: var(--brand); color: #fff; }
.status-pick input:focus-visible + span { box-shadow: 0 0 0 3px var(--brand-soft); }

/* ── photos manager ── */
.dropzone { border: 2px dashed var(--line-2); border-radius: var(--radius); background: var(--surface); padding: 36px 20px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; display: block; }
.dropzone:hover, .dropzone.over { border-color: var(--brand-2); background: var(--brand-soft); }
.dropzone .ic { width: 42px; height: 42px; color: var(--brand-2); margin: 0 auto 10px; stroke-width: 1.5; }
.dropzone b { display: block; font-size: 16px; margin-bottom: 4px; }
.dropzone input { display: none; }
.uploads { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.up-item { display: flex; gap: 10px; align-items: center; font-size: 13px; font-weight: 600; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.up-item .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-item .prog { width: 120px; height: 6px; background: var(--gray-soft); border-radius: 99px; overflow: hidden; }
.up-item .prog i { display: block; height: 100%; width: 0; background: var(--brand-2); transition: width .2s; }
.up-item.done .prog i { background: var(--green); }
.up-item.fail { border-color: #f1c4bf; color: var(--red); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.ph { position: relative; border-radius: 12px; overflow: hidden; background: var(--gray-soft); aspect-ratio: 4 / 3; box-shadow: var(--shadow); cursor: grab; user-select: none; }
.ph img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ph.dragging { opacity: .4; }
.ph.drop-before { box-shadow: -4px 0 0 var(--accent); }
.ph .cover-tag { position: absolute; left: 8px; top: 8px; background: var(--accent); color: var(--brand-ink); font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 6px; display: none; text-transform: uppercase; letter-spacing: .05em; }
.ph:first-child .cover-tag { display: block; }
.ph .ph-actions { position: absolute; inset: auto 0 0 0; display: flex; gap: 6px; justify-content: flex-end; padding: 8px; background: linear-gradient(to top, rgba(0,0,0,.55), transparent); opacity: 0; transition: opacity .15s; }
.ph:hover .ph-actions, .ph:focus-within .ph-actions { opacity: 1; }
.ph-actions button { background: rgba(255,255,255,.95); border: 0; border-radius: 8px; padding: 6px; cursor: pointer; color: var(--ink); display: grid; place-items: center; }
.ph-actions button:hover { background: #fff; color: var(--brand); }
.ph-actions button.del:hover { color: var(--red); }
.ph .num { position: absolute; right: 8px; top: 8px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; font-weight: 800; border-radius: 6px; padding: 2px 7px; }

/* ── customers / meetings ── */
.temp-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.note-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface); }
.note-card + .note-card { margin-top: 12px; }
.note-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.note-head .ch { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; color: var(--brand); background: var(--brand-soft); border-radius: 99px; padding: 3px 10px; }
.note-head .ch .ic { width: 14px; height: 14px; }
.note-body { white-space: pre-line; font-size: 14.5px; color: var(--ink-2); }
.note-foot { display: flex; gap: 12px; align-items: center; margin-top: 10px; font-size: 13px; flex-wrap: wrap; }
.follow { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; color: var(--amber); background: var(--amber-soft); border-radius: 8px; padding: 3px 9px; font-size: 12.5px; }
.follow.done { color: var(--green); background: var(--green-soft); text-decoration: line-through; }
.follow.late { color: var(--red); background: var(--red-soft); }
.agenda-col h3 { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.agenda-col h3 .n { background: var(--ink); color: #fff; border-radius: 99px; padding: 0 8px; font-size: 12px; }
.task { display: flex; gap: 12px; padding: 13px 15px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; align-items: flex-start; }
.task + .task { margin-top: 10px; }
.task.late { border-left: 4px solid var(--red); }
.task.today { border-left: 4px solid var(--accent); }
.task .tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); background: none; cursor: pointer; flex: none; margin-top: 2px; display: grid; place-items: center; color: transparent; padding: 0; }
.task .tick:hover { border-color: var(--green); color: var(--green); }
.task .tick .ic { width: 13px; height: 13px; stroke-width: 3; }
.task b { display: block; font-size: 14.5px; }
.task .meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.task .txt { font-size: 13.5px; color: var(--ink-2); margin-top: 5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ── modal ── */
.modal-back { position: fixed; inset: 0; background: rgba(15, 25, 30, .5); z-index: 90; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); width: min(440px, 100%); padding: 24px; }
.modal h3 { font-size: 18px; margin-bottom: 8px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
@keyframes fade { from { opacity: 0; } }

/* ── pager ── */
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; color: var(--ink-2); padding: 0 10px; }
.pager .cur { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ── auth ── */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(380px, 520px); background: var(--surface); }
.auth-art { position: relative; background: var(--brand-ink) center / cover no-repeat; background-image: url(../img/login.jpg); color: #fff; padding: 42px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.auth-art::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 30, 27, .55) 0%, rgba(10, 30, 27, .15) 40%, rgba(10, 30, 27, .85) 100%); }
.auth-art > * { position: relative; }
.auth-art .brand { padding: 0; }
.auth-quote { max-width: 520px; }
.auth-quote h2 { font: 600 40px/1.1 var(--serif); letter-spacing: 0; margin-bottom: 14px; }
.auth-quote p { color: #d5e4e0; font-size: 15px; }
.auth-feats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.auth-feats span { background: rgba(255,255,255,.12); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.18); border-radius: 99px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.auth-feats .ic { width: 14px; height: 14px; color: var(--accent); }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 28px; }
.auth-box { width: 100%; max-width: 380px; }
.auth-box h1 { font-size: 28px; margin-bottom: 6px; }
.auth-box .lead { color: var(--muted); margin-bottom: 26px; }
.auth-box .field { margin-bottom: 16px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 46px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 8px; display: grid; place-items: center; }
.pw-toggle:hover { color: var(--ink); }
.auth-foot { margin-top: 28px; font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.auth-foot .ic { color: var(--green); }
.code-input { font: 800 26px/1 ui-monospace, Consolas, monospace !important; letter-spacing: .4em; text-align: center; padding: 14px !important; }
.pw-meter { height: 5px; border-radius: 99px; background: var(--gray-soft); overflow: hidden; margin-top: 4px; }
.pw-meter i { display: block; height: 100%; width: 0; background: var(--red); transition: width .25s, background .25s; }
.bare { min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; }
.bare .big { font-size: 64px; font-weight: 800; color: var(--accent); letter-spacing: -.04em; line-height: 1; }

/* ── mobile ── */
.tabbar { display: none; }
@media (max-width: 1100px) {
  .layout-side { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 60; transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow-lg); }
  .nav-open .side { transform: none; }
  .nav-open .side-back { display: block; position: fixed; inset: 0; background: rgba(15,25,30,.45); z-index: 55; }
  .menu-btn { display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; width: 40px; height: 40px; cursor: pointer; color: var(--ink); flex: none; }
  .mobile-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--brand-ink); }
  .mobile-brand .brand-mark { width: 32px; height: 32px; border-radius: 9px; }
  .mobile-brand .brand-mark .ic { width: 17px; height: 17px; }
  .topbar { padding: 10px 16px; gap: 10px; }
  .topbar .search { display: none; }
  .topbar .new-btn span { display: none; }
  .content { padding: 4px 16px 110px; }
  h1 { font-size: 22px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-grid { gap: 14px; }
  .col-8, .col-6, .col-4 { grid-column: span 12; }
  .col-3 { grid-column: span 6; }
  .gallery { aspect-ratio: 4 / 3; grid-template-columns: 1fr; grid-template-rows: 1fr; }
  .gallery a:not(:first-child) { display: none; }
  .gallery a:first-child { grid-row: auto; }
  .hello { padding: 22px; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--muted); padding: 5px 10px; border-radius: 10px; flex: 1; }
  .tabbar a.is-active { color: var(--brand); }
  .tabbar a .ic { width: 22px; height: 22px; }
  .tabbar .fab { flex: none; width: 54px; height: 54px; margin-top: -24px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 20px rgba(29, 74, 66, .4); padding: 0; }
  .tabbar .fab .ic { width: 26px; height: 26px; }
  .select-bar { bottom: 84px; }
  .flashes { top: auto; bottom: 90px; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { min-height: 230px; padding: 24px; }
  .auth-quote h2 { font-size: 28px; }
  .auth-quote p, .auth-feats { display: none; }
  .t .hide-sm { display: none; }
  .form-actions { bottom: 70px; }
  .kv { grid-template-columns: 110px 1fr; }
}
@media (max-width: 520px) {
  .cards { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat { padding: 14px; flex-direction: column; gap: 10px; }
  .stat-num { font-size: 23px; }
  .page-head { margin: 8px 0 16px; }
  .page-head .btn { flex: 1; }
  .card-pad, .card-body { padding: 16px; }
  .card-head { padding: 14px 16px; }
  .list-item { padding: 12px 16px; }
  .filters select, .filters input:not([type=checkbox]) { min-width: 0; flex: 1 1 140px; }
  .status-pick { grid-template-columns: repeat(2, 1fr); }
}
@media print { .side, .topbar, .tabbar, .form-actions, .flashes { display: none !important; } .app { display: block; } }

/* lightbox (listing detail) */
.lb { position: fixed; inset: 0; background: rgba(8, 12, 14, .95); z-index: 200; display: flex; align-items: center; justify-content: center; }
.lb img { max-width: 94vw; max-height: 86vh; object-fit: contain; border-radius: 6px; user-select: none; }
.lb button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 46px; height: 46px; border-radius: 50%; font-size: 22px; cursor: pointer; }
.lb button:hover { background: rgba(255,255,255,.22); }
.lb .lb-x { right: 18px; top: 18px; font-size: 18px; }
.lb .lb-p { left: 18px; top: 50%; transform: translateY(-50%); }
.lb .lb-n { right: 18px; top: 50%; transform: translateY(-50%); }
.lb .lb-c { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: #fff; font-weight: 700; font-size: 14px; background: rgba(255,255,255,.12); padding: 5px 12px; border-radius: 99px; }
.big { font-size: 64px; font-weight: 800; color: var(--accent); letter-spacing: -.04em; line-height: 1; }
.brand-logo-prev { max-height: 90px; max-width: 100%; object-fit: contain; background: repeating-conic-gradient(#f2efe9 0 25%, #fff 0 50%) 0 0 / 16px 16px; border-radius: 10px; padding: 8px; border: 1px solid var(--line); }
.list-item input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
label.list-item { cursor: pointer; }
.empty.small { padding: 22px 16px; }
@media (max-width: 900px) { .lb .lb-p, .lb .lb-n { display: none; } }
