:root {
  --bg: oklch(97% 0.008 85); --panel: #fff; --ink: oklch(24% 0.03 260); --muted: oklch(50% 0.02 260);
  --line: oklch(89% 0.012 80); --red: oklch(50% 0.17 27); --red-2: oklch(42% 0.15 27); --blue: oklch(45% 0.12 255);
  --ok: oklch(52% 0.13 150); --warn: oklch(70% 0.14 75); --side: oklch(22% 0.025 260);
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.5 'Work Sans', system-ui, sans-serif; }
img { max-width: 100%; display: block; }
a { color: var(--blue); }
h1 { font: 500 1.9rem/1.2 'Fraunces', Georgia, serif; margin: 0; }
h2 { font: 500 1.25rem/1.3 'Fraunces', Georgia, serif; margin: 0 0 12px; }
.btn { display: inline-flex; align-items: center; gap: 6px; justify-content: center; min-height: 40px; padding: 0 16px; border-radius: 8px; background: var(--red); color: #fff; font: 600 .9rem 'Work Sans', sans-serif; border: 1px solid var(--red); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--red-2); }
.btn.ghost { background: var(--panel); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.small { min-height: 32px; padding: 0 10px; font-size: .82rem; }
.btn.danger { background: var(--panel); color: var(--red); border-color: var(--line); }
.btn[disabled] { opacity: .55; cursor: wait; }
.linkish { background: none; border: 0; color: inherit; cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: min(380px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 32px; display: grid; gap: 14px; }
.brand { font: 500 1.3rem 'Fraunces', serif; color: inherit; text-decoration: none; margin: 0 0 8px; display: block; }
.brand span { font: 600 .7rem 'Work Sans', sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--red); margin-left: 6px; }
.err { color: var(--red); margin: 0; min-height: 1.2em; }

.app { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.side { background: var(--side); color: oklch(92% 0.01 85); padding: 22px 14px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; }
.side .brand { color: #fff; padding: 0 10px; }
.side nav { display: grid; gap: 2px; }
.side nav a { color: inherit; text-decoration: none; padding: 9px 10px; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; }
.side nav a:hover { background: oklch(30% 0.03 260); }
.side nav a.on { background: oklch(34% 0.04 260); color: #fff; }
.side nav b { background: var(--red); color: #fff; border-radius: 99px; padding: 0 7px; font-size: .75rem; }
.side-foot { margin-top: auto; display: grid; gap: 8px; padding: 0 10px; font-size: .85rem; }
.side-foot a { color: inherit; }
.view { padding: 28px clamp(16px, 3vw, 40px) 80px; min-width: 0; }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; padding: 12px 16px; }
  .side nav { grid-auto-flow: column; overflow-x: auto; }
  .side nav a { white-space: nowrap; }
  .side-foot { display: none; }
}

.head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.head .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1100px) { .grid2 { grid-template-columns: 1fr; } }
.stack { display: grid; gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; text-decoration: none; color: inherit; }
.kpi strong { display: block; font: 500 2rem/1.1 'Fraunces', serif; }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.quick a { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; text-decoration: none; color: inherit; }
.quick a:hover { border-color: var(--red); }
.quick strong { display: block; margin-bottom: 4px; }

/* lists */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.tile:hover { border-color: var(--red); }
.tile img { aspect-ratio: 1; object-fit: cover; width: 100%; background: var(--bg); }
.tile div { padding: 8px 10px 10px; font-size: .85rem; }
.tile strong { display: block; font-weight: 600; font-size: .9rem; line-height: 1.3; }
.pill { display: inline-block; font-size: .72rem; font-weight: 600; padding: 1px 8px; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); }
.pill.ok { background: oklch(94% 0.05 150); border-color: transparent; color: oklch(38% 0.1 150); }
.pill.red { background: oklch(94% 0.04 27); border-color: transparent; color: var(--red-2); }
.pill.warn { background: oklch(95% 0.06 85); border-color: transparent; color: oklch(45% 0.1 70); }
.table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.table th, .table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; background: oklch(98.5% 0.004 85); }
.table tr:last-child td { border-bottom: 0; }
.table td img { width: 56px; height: 40px; object-fit: cover; border-radius: 4px; }
.table a.row-link { color: var(--ink); font-weight: 600; text-decoration: none; }
.table-wrap { overflow-x: auto; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input[type=search] { min-width: 240px; }

/* forms */
label.f { display: grid; gap: 5px; font-weight: 500; font-size: .88rem; }
input, select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px; min-height: 40px; width: 100%; }
input:focus, select:focus, textarea:focus, .rich:focus { outline: 2px solid var(--blue); outline-offset: -1px; }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.choice { display: flex; gap: 14px; flex-wrap: wrap; font-size: .9rem; }
.choice label { display: flex; gap: 6px; align-items: center; }
.langtabs { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.langtabs button { border: 0; background: #fff; padding: 6px 14px; font: 600 .85rem 'Work Sans', sans-serif; cursor: pointer; }
.langtabs button.on { background: var(--ink); color: #fff; }
[data-l][hidden] { display: none !important; }
.rich-wrap { border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.rich-bar { display: flex; gap: 2px; flex-wrap: wrap; padding: 6px; border-bottom: 1px solid var(--line); background: oklch(98.5% 0.004 85); border-radius: 8px 8px 0 0; }
.rich-bar button { border: 0; background: none; padding: 4px 9px; border-radius: 6px; cursor: pointer; font: 600 .85rem 'Work Sans', sans-serif; color: var(--ink); }
.rich-bar button:hover { background: var(--line); }
.rich-bar .sep { width: 1px; background: var(--line); margin: 2px 4px; }
.rich { min-height: 220px; max-height: 60vh; overflow: auto; padding: 14px 16px; font-size: 1rem; line-height: 1.6; }
.rich img { max-width: 100%; height: auto; border-radius: 4px; }
.rich h2 { font: 500 1.4rem 'Fraunces', serif; }
.rich iframe { width: 100%; aspect-ratio: 16/9; height: auto; }
.imgfield { display: grid; gap: 8px; }
.imgfield .pic { background: var(--bg) center/contain no-repeat; border: 1px dashed var(--line); border-radius: 8px; aspect-ratio: 4/3; display: grid; place-items: center; color: var(--muted); font-size: .85rem; overflow: hidden; }
.imgfield .pic img { width: 100%; height: 100%; object-fit: contain; }
.drop { border: 2px dashed var(--line); border-radius: 12px; padding: 18px; text-align: center; background: #fff; cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--red); background: oklch(98% 0.01 27); }
.drop strong { display: block; }
.hint { background: oklch(96% 0.03 255); border-radius: 8px; padding: 10px 12px; font-size: .85rem; }
.sticky-save { position: sticky; bottom: 0; background: color-mix(in oklch, var(--bg) 92%, transparent); backdrop-filter: blur(6px); padding: 12px 0; margin-top: 16px; display: flex; gap: 10px; align-items: center; border-top: 1px solid var(--line); z-index: 2; }

/* mockups */
.rooms { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: .88rem; margin-bottom: 10px; }
.rooms label { display: flex; gap: 6px; align-items: center; }
.mocks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.mock { position: relative; }
.mock img { width: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: 6px; cursor: zoom-in; }
.mock span { font-size: .78rem; }
.mock button { position: absolute; top: 4px; right: 4px; background: #fffd; border: 0; border-radius: 6px; cursor: pointer; padding: 2px 6px; }
.gen { display: flex; gap: 10px; align-items: center; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.qrpanel { display: flex; gap: 14px; align-items: center; }
.qrpanel img { width: 110px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }

/* newsletter */
.mail-frame { width: 100%; height: 640px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.confirm { border: 2px solid var(--red); border-radius: 12px; padding: 16px; background: oklch(98% 0.01 27); }
.timeline { display: grid; gap: 8px; font-size: .9rem; }
.timeline div { display: flex; gap: 10px; align-items: center; }

.msg { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: grid; gap: 6px; }
.msg.unread { border-left: 4px solid var(--red); }
.msg header { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.msg p { margin: 0; white-space: pre-wrap; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 10px; z-index: 20; max-width: calc(100% - 32px); box-shadow: 0 8px 24px #0003; }
.toast.err { background: var(--red); }
.lightbox { position: fixed; inset: 0; background: #000c; display: grid; place-items: center; z-index: 30; padding: 24px; cursor: zoom-out; }
.lightbox img { max-height: 92vh; border-radius: 8px; }
