/* ╔══════════════════════════════════════════════════════════════╗
   ║  Casa de Booking · V1.1 · stylesheet · engelhardt.space     ║
   ╚══════════════════════════════════════════════════════════════╝ */

/* ── Fonts ─────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Mono:wght@300;400;500&display=swap');

/* ── Tokens ────────────────────────────────────────────────────── */
:root {
  --accent:        #f97316;
  --accent-dim:    rgba(249,115,22,.12);
  --accent-hover:  #ea6c0a;
  --radius:        12px;
  --radius-sm:     7px;
  --radius-xs:     5px;
  --transition:    .16s ease;
  --font-main:     'Syne', sans-serif;
  --font-mono:     'DM Mono', monospace;
  --topnav-h:      54px;
  --sidebar-w:     220px;
}

[data-theme="dark"] {
  --bg:      #0d0d0f;
  --bg2:     #141416;
  --bg3:     #1c1c1f;
  --bg4:     #242428;
  --border:  rgba(255,255,255,.06);
  --border2: rgba(255,255,255,.11);
  --text:    #eeecf5;
  --text2:   #9895a6;
  --text3:   #5e5c6d;
  --shadow:  0 8px 32px rgba(0,0,0,.55);
  --shadow-sm: 0 2px 8px rgba(0,0,0,.45);
  --glow:    0 0 0 3px rgba(249,115,22,.18);
}

[data-theme="light"] {
  --bg:      #f2f1f7;
  --bg2:     #ffffff;
  --bg3:     #eceaf3;
  --bg4:     #e4e2ee;
  --border:  rgba(0,0,0,.07);
  --border2: rgba(0,0,0,.13);
  --text:    #17161e;
  --text2:   #54516b;
  --text3:   #9c99b3;
  --shadow:  0 8px 32px rgba(0,0,0,.09);
  --shadow-sm: 0 2px 8px rgba(0,0,0,.07);
  --glow:    0 0 0 3px rgba(249,115,22,.15);
}

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  transition: background .2s, color .2s;
}
a { color: var(--accent); text-decoration: none; }
a:hover { opacity: .82; }
img { max-width: 100%; display: block; }
button { font-family: var(--font-main); }
.mono { font-family: var(--font-mono); }

/* ── Top Nav ────────────────────────────────────────────────────── */
.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--topnav-h);
  background: color-mix(in srgb, var(--bg2) 92%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 1.25rem;
  gap: 1rem;
}
.topnav-left  { display: flex; align-items: center; gap: .6rem; flex: 1; min-width: 0; }
.topnav-right { display: flex; align-items: center; gap: .4rem; flex-shrink: 0; }

/* Brand */
.nav-brand {
  display: flex; align-items: center; gap: .5rem;
  font-weight: 800; font-size: .88rem; letter-spacing: .06em;
  color: var(--text); white-space: nowrap;
}
.nav-brand:hover { opacity: 1; }
.brand-mark-sm {
  width: 26px; height: 26px; border-radius: 6px;
  background: var(--accent); color: #fff;
  font-size: .65rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: .02em; flex-shrink: 0;
}

/* Nav links */
.nav-links {
  display: flex; align-items: center; gap: 0;
  overflow-x: auto; scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-link {
  padding: .28rem .6rem; border-radius: var(--radius-xs);
  font-size: .8rem; font-weight: 500; letter-spacing: .01em;
  color: var(--text3); white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}
.nav-link:hover { background: var(--bg3); color: var(--text); opacity: 1; }
.nav-link.active { background: var(--accent-dim); color: var(--accent); }

/* Sidebar toggle */
.sidebar-toggle {
  display: flex; flex-direction: column; gap: 4px;
  background: none; border: none; cursor: pointer;
  padding: 5px; border-radius: var(--radius-xs); flex-shrink: 0;
}
.sidebar-toggle span {
  display: block; width: 16px; height: 1.5px;
  background: var(--text3); border-radius: 2px;
  transition: var(--transition);
}
.sidebar-toggle:hover span { background: var(--text); }

/* Theme toggle */
.theme-toggle {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--border2);
  background: var(--bg3); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; transition: var(--transition); flex-shrink: 0;
  color: var(--text2);
}
.theme-toggle:hover { background: var(--bg4); }
[data-theme="dark"]  .icon-sun  { display: none; }
[data-theme="light"] .icon-moon { display: none; }

/* Lang flags */
.lang-switcher { display: flex; align-items: center; gap: 2px; }
.lang-flag {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid transparent; cursor: pointer;
  transition: border-color var(--transition), transform var(--transition);
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem;
}
.lang-flag:hover { transform: scale(1.1); opacity: 1; }
.lang-flag.active { border-color: var(--accent); }

/* Logout */
.btn-logout {
  padding: .28rem .7rem; border-radius: var(--radius-xs);
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); font-size: .78rem; font-weight: 500;
  cursor: pointer; transition: var(--transition); white-space: nowrap;
}
.btn-logout:hover { background: var(--bg4); color: var(--text); opacity: 1; }

/* Mobile hamburger */
.mobile-nav-toggle {
  display: none;
  flex-direction: column; justify-content: center; gap: 4px;
  background: none; border: none; cursor: pointer; padding: 5px;
  border-radius: var(--radius-xs); flex-shrink: 0;
  width: 34px; height: 34px;
}
.mobile-nav-toggle span {
  display: block; width: 18px; height: 1.5px;
  background: var(--text2); border-radius: 2px; transition: var(--transition);
}
.mobile-nav-toggle:hover span { background: var(--text); }

/* Mobile drawer */
.mobile-nav-drawer {
  display: none;
  position: fixed; top: var(--topnav-h); left: 0; right: 0; z-index: 98;
  background: var(--bg2); border-bottom: 1px solid var(--border);
  padding: .6rem .75rem .85rem;
  box-shadow: var(--shadow-sm);
  flex-direction: column; gap: .15rem;
}
.mobile-nav-drawer.open { display: flex; }
.mobile-nav-drawer .nav-link {
  display: block; padding: .55rem .7rem;
  font-size: .88rem; border-radius: var(--radius-sm);
}

/* ── App Layout ─────────────────────────────────────────────────── */
.app-layout {
  display: flex;
  margin-top: var(--topnav-h);
  min-height: calc(100vh - var(--topnav-h) - 44px);
}

/* ── Sidebar ────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  position: sticky; top: var(--topnav-h);
  height: calc(100vh - var(--topnav-h));
  overflow-y: auto; overflow-x: hidden;
  transition: transform var(--transition);
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}
.sidebar-inner { padding: 1rem .5rem; }
.sidebar-section-title {
  font-size: .65rem; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--text3);
  padding: .2rem .6rem .45rem;
}
.sidebar-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: .38rem .6rem; border-radius: var(--radius-xs);
  color: var(--text2); font-size: .82rem; font-weight: 500;
  transition: background var(--transition), color var(--transition);
  margin-bottom: 1px;
}
.sidebar-item:hover { background: var(--bg3); color: var(--text); opacity: 1; }
.sidebar-item.active { background: var(--accent-dim); color: var(--accent); }
.sidebar-badge {
  font-size: .65rem; padding: 1px 6px; border-radius: 20px;
  background: var(--bg3); color: var(--text3);
  font-family: var(--font-mono); flex-shrink: 0; line-height: 1.6;
}
.sidebar-item.active .sidebar-badge { background: var(--accent); color: #fff; }
.sidebar-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 90;
}
.sidebar-backdrop.visible { display: block; }

/* ── Main Content ───────────────────────────────────────────────── */
.main-content { flex: 1; padding: 1.75rem 2rem; min-width: 0; }
.main-content--single { max-width: 1200px; }

/* Content header */
.content-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 1rem;
  margin-bottom: 1.5rem; flex-wrap: wrap;
}
.content-title h1 {
  font-size: 1.45rem; font-weight: 700; letter-spacing: -.02em;
  line-height: 1.2;
}
.result-count {
  font-size: .75rem; color: var(--text3);
  font-family: var(--font-mono); margin-top: 3px; display: block;
}

/* Search */
.search-form { display: flex; align-items: center; }
.search-wrap {
  display: flex; align-items: center;
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm); overflow: hidden;
  background: var(--bg2);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-wrap:focus-within { border-color: var(--accent); box-shadow: var(--glow); }
.search-input {
  border: none; background: transparent; outline: none;
  padding: .5rem .85rem; width: 250px; max-width: 100%;
  font-family: var(--font-main); font-size: .84rem; color: var(--text);
}
.search-input::placeholder { color: var(--text3); }
.search-btn, .search-clear {
  padding: .5rem .7rem; background: none; border: none;
  color: var(--text3); cursor: pointer; font-size: .82rem;
  transition: color var(--transition);
}
.search-btn:hover, .search-clear:hover { color: var(--accent); }

/* Sort bar */
.content-header-controls { display: flex; flex-direction: column; gap: .5rem; align-items: flex-end; }
.sort-bar { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.sort-label { font-size: .73rem; color: var(--text3); white-space: nowrap; margin-right: .1rem; }
.sort-btn {
  padding: .22rem .58rem; border-radius: var(--radius-xs);
  font-size: .73rem; font-weight: 500; color: var(--text2);
  background: var(--bg3); border: 1px solid var(--border);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.sort-btn:hover { background: var(--bg4); color: var(--text); opacity: 1; }
.sort-btn.active { background: var(--accent-dim); color: var(--accent); border-color: var(--accent); }

/* ── Cards / Grid ───────────────────────────────────────────────── */
.venue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 1rem;
}
.venue-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  animation: fadeUp .25s ease both;
}
.venue-card:hover { border-color: var(--border2); transform: translateY(-2px); box-shadow: var(--shadow); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.venue-card-inner { padding: 1.1rem 1.15rem; }
.venue-tag {
  display: inline-block; font-size: .65rem; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-dim);
  padding: 2px 8px; border-radius: 20px; margin-bottom: .55rem;
}
.genre-tag {
  display: inline-block; font-size: .62rem; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase;
  color: #fff; padding: 2px 7px; border-radius: 20px;
  margin-left: .35rem; vertical-align: middle;
}
.venue-name {
  font-size: .98rem; font-weight: 700; margin-bottom: .12rem;
  letter-spacing: -.01em; line-height: 1.3;
}
.venue-city { font-size: .8rem; color: var(--text2); margin-bottom: .7rem; }
.venue-meta { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .8rem; }
.meta-item { font-size: .78rem; color: var(--text2); display: flex; align-items: center; gap: .35rem; }
.meta-icon { font-size: .82rem; }
.venue-actions { display: flex; gap: .4rem; flex-wrap: wrap; }

/* Card images */
.venue-card-image { height: 210px; overflow: hidden; background: var(--bg3); }
.venue-card-image img { width: 100%; height: 100%; object-fit: cover; }
.venue-card-placeholder {
  background: linear-gradient(135deg, var(--bg3), var(--bg4)) !important;
  display: flex; align-items: center; justify-content: center;
}
.venue-card-placeholder-inner { text-align: center; color: var(--text3); padding: 1rem; }
.venue-card-placeholder-inner span { display: block; font-size: 2.2rem; margin-bottom: .4rem; }
.venue-card-placeholder-inner strong { display: block; font-size: .85rem; color: var(--text2); margin-bottom: .2rem; }
.venue-card-placeholder-inner small { font-size: .72rem; opacity: .7; }
.venue-placeholder-img { width: 100%; height: 100%; object-fit: cover; }

/* ── Stats Row ──────────────────────────────────────────────────── */
.stats-row {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .85rem; margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.1rem;
  transition: border-color var(--transition);
}
.stat-card:hover { border-color: var(--border2); }
.stat-icon { font-size: 1.1rem; margin-bottom: .4rem; min-height: 1.2rem; }
.stat-value { font-size: 1.75rem; font-weight: 800; line-height: 1; font-family: var(--font-mono); margin-bottom: .18rem; }
.stat-label { font-size: .7rem; color: var(--text3); text-transform: uppercase; letter-spacing: .07em; }

/* ── Buttons ────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .5rem 1.1rem;
  background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-size: .83rem; font-weight: 600;
  cursor: pointer; transition: background var(--transition), transform var(--transition);
  white-space: nowrap;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); opacity: 1; color: #fff; }
.btn-primary:active { transform: none; }
.btn-primary.btn-full { width: 100%; justify-content: center; }

.btn-secondary {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .5rem 1.1rem;
  background: var(--bg3); color: var(--text);
  border: 1px solid var(--border2); border-radius: var(--radius-sm);
  font-size: .83rem; font-weight: 500;
  cursor: pointer; transition: var(--transition);
  white-space: nowrap;
}
.btn-secondary:hover { background: var(--bg4); opacity: 1; color: var(--text); }

.btn-card {
  display: inline-flex; align-items: center;
  padding: .28rem .65rem; border-radius: var(--radius-xs);
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); font-size: .76rem; font-weight: 500;
  transition: var(--transition);
}
.btn-card:hover { background: var(--accent); border-color: var(--accent); color: #fff; opacity: 1; }

.btn-card-ghost {
  display: inline-flex; align-items: center;
  padding: .28rem .65rem; border-radius: var(--radius-xs);
  background: transparent; border: 1px solid var(--border);
  color: var(--text3); font-size: .76rem; font-weight: 500;
  transition: var(--transition);
}
.btn-card-ghost:hover { border-color: var(--accent); color: var(--accent); opacity: 1; }

.btn-danger {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .5rem 1.1rem;
  background: #ef4444; color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-size: .83rem; font-weight: 600;
  cursor: pointer; transition: var(--transition);
}
.btn-danger:hover { background: #dc2626; opacity: 1; color: #fff; }

.btn-icon {
  width: 28px; height: 28px; border-radius: var(--radius-xs);
  border: 1px solid var(--border); background: var(--bg3);
  color: var(--text3); font-size: .75rem; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.btn-icon:hover { background: var(--bg4); color: var(--text); opacity: 1; }
.btn-icon.danger:hover { background: #ef4444; border-color: #ef4444; color: #fff; }

/* ── Forms ──────────────────────────────────────────────────────── */
.form-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.6rem;
  margin-bottom: 1.25rem;
}
.field-group { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .9rem; }
.field-group label {
  font-size: .72rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text3);
}
.field-group input,
.field-group select,
.field-group textarea {
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: var(--radius-xs);
  padding: .58rem .8rem; color: var(--text);
  font-family: var(--font-main); font-size: .87rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%; outline: none;
}
.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus { border-color: var(--accent); box-shadow: var(--glow); }
.field-group select { appearance: none; cursor: pointer; }
.field-group textarea { resize: vertical; min-height: 110px; }
.field-group input::placeholder,
.field-group textarea::placeholder { color: var(--text3); }

.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
.form-divider { height: 1px; background: var(--border); margin: 1rem 0; }
.form-actions { display: flex; gap: .65rem; justify-content: flex-end; margin-top: 1.25rem; }

/* Quill */
.ql-toolbar { border-radius: var(--radius-xs) var(--radius-xs) 0 0 !important; border-color: var(--border2) !important; background: var(--bg3) !important; }
.ql-container { border-radius: 0 0 var(--radius-xs) var(--radius-xs) !important; border-color: var(--border2) !important; background: var(--bg3) !important; font-family: var(--font-main) !important; font-size: .87rem !important; min-height: 160px; }
.ql-editor { color: var(--text) !important; min-height: 140px; }
.ql-editor.ql-blank::before { color: var(--text3) !important; }
[data-theme="dark"] .ql-stroke { stroke: var(--text2) !important; }
[data-theme="dark"] .ql-fill { fill: var(--text2) !important; }
[data-theme="dark"] .ql-picker { color: var(--text2) !important; }
[data-theme="dark"] .ql-picker-options { background: var(--bg3) !important; border-color: var(--border2) !important; }
.template-select-row { display: flex; gap: .4rem; align-items: center; margin-bottom: .5rem; }
.template-select-row select { flex: 1; }

/* ── Alerts ─────────────────────────────────────────────────────── */
.alert {
  padding: .7rem 1rem; border-radius: var(--radius-xs);
  font-size: .83rem; margin-bottom: .85rem;
  border: 1px solid transparent;
}
.alert-error   { background: rgba(239,68,68,.08);  border-color: rgba(239,68,68,.2);  color: #f87171; }
.alert-success { background: rgba(16,185,129,.08); border-color: rgba(16,185,129,.2); color: #34d399; }
.alert-info    { background: rgba(99,102,241,.08); border-color: rgba(99,102,241,.2); color: #818cf8; }

/* ── Tables ─────────────────────────────────────────────────────── */
.table-wrap { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .83rem; }
.data-table th { padding: .65rem 1rem; text-align: left; font-size: .67rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--text3); background: var(--bg3); border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: .7rem 1rem; border-bottom: 1px solid var(--border); color: var(--text2); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg3); }
.data-table td strong { color: var(--text); font-weight: 600; }
.data-table td small { font-size: .73rem; color: var(--text3); }
.data-table .actions-cell { display: flex; gap: .3rem; }

/* ── Badges ─────────────────────────────────────────────────────── */
.status-badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: .67rem; font-weight: 600; letter-spacing: .04em; background: var(--bg3); color: var(--text2); }
.status-badge.sent  { background: rgba(16,185,129,.12); color: #34d399; }
.status-badge.saved { background: rgba(99,102,241,.12); color: #818cf8; }
.status-badge.draft { background: rgba(245,158,11,.12); color: #fbbf24; }

/* ── Empty State ────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 3.5rem 2rem; color: var(--text3); }
.empty-icon { font-size: 2rem; margin-bottom: .65rem; color: var(--text3); }
.empty-state p { margin-bottom: 1.2rem; font-size: .88rem; }

/* ── Detail ─────────────────────────────────────────────────────── */
.back-bar { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.back-link { font-size: .82rem; color: var(--text2); transition: color var(--transition); }
.back-link:hover { color: var(--accent); }
.back-bl-tag { font-size: .67rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text3); background: var(--bg3); padding: 2px 8px; border-radius: 20px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 1.25rem; }
.detail-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; }
.detail-card-header { margin-bottom: 1rem; }
.detail-name { font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; }
.detail-city { font-size: .83rem; color: var(--text2); margin-top: .15rem; }
.detail-section-title { font-size: .88rem; font-weight: 700; margin-bottom: .9rem; padding-bottom: .55rem; border-bottom: 1px solid var(--border); }
.detail-fields { display: flex; flex-direction: column; gap: .55rem; margin-bottom: .9rem; }
.detail-row { display: flex; gap: .7rem; font-size: .83rem; }
.detail-label { color: var(--text3); min-width: 120px; flex-shrink: 0; font-size: .76rem; }
.detail-value { color: var(--text); }
.detail-actions { display: flex; gap: .45rem; margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--border); }

/* Mailout history */
.mailout-history { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; }
.section-title { font-size: .93rem; font-weight: 700; margin-bottom: .9rem; }
.mailout-list { display: flex; flex-direction: column; gap: .65rem; }
.mailout-item { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-xs); padding: .85rem 1rem; }
.mailout-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: .35rem; gap: 1rem; }
.mailout-subject { font-weight: 600; font-size: .86rem; }
.mailout-date { font-size: .7rem; color: var(--text3); font-family: var(--font-mono); white-space: nowrap; }
.mailout-msg { font-size: .8rem; color: var(--text2); line-height: 1.5; }

/* ── Login ──────────────────────────────────────────────────────── */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 1rem; }
.login-wrap { width: 100%; max-width: 390px; }
.login-brand { display: flex; align-items: center; gap: .7rem; justify-content: center; margin-bottom: 1.75rem; }
.brand-mark { width: 42px; height: 42px; border-radius: 10px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1rem; letter-spacing: .03em; }
.brand-text { display: flex; flex-direction: column; }
.brand-title { font-size: 1.1rem; font-weight: 800; letter-spacing: .06em; line-height: 1; }
.brand-sub { font-size: .7rem; color: var(--text2); margin-top: 2px; }
.login-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.85rem; box-shadow: var(--shadow); }
.login-heading { font-size: 1.15rem; font-weight: 700; margin-bottom: .25rem; }
.login-hint { font-size: .82rem; color: var(--text2); margin-bottom: 1.4rem; }
.login-form { display: flex; flex-direction: column; gap: .8rem; }
.login-extras { display: flex; justify-content: flex-end; margin-top: .2rem; }
.login-forgot { font-size: .76rem; color: var(--text2); }
.login-forgot:hover { color: var(--accent); }
.theme-toggle-login { position: fixed; top: 1rem; right: 1rem; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border2); background: var(--bg3); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: .85rem; }
.lang-switcher-login { display: flex; justify-content: center; gap: .3rem; margin-top: 1.1rem; }

/* ── User management ────────────────────────────────────────────── */
.user-role-badge { font-size: .65rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; padding: 2px 8px; border-radius: 20px; }
.user-role-badge.admin { background: rgba(249,115,22,.12); color: var(--accent); }
.user-role-badge.user  { background: var(--bg3); color: var(--text3); }
.page-title { font-size: 1.35rem; font-weight: 700; letter-spacing: -.01em; margin-bottom: 1.15rem; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.4rem; gap: 1rem; flex-wrap: wrap; }

/* Admin tabs */
.admin-tab { display: inline-flex; align-items: center; gap: .35rem; padding: .38rem .8rem; border-radius: var(--radius-xs); font-size: .8rem; font-weight: 500; color: var(--text2); background: var(--bg3); border: 1px solid var(--border); transition: var(--transition); }
.admin-tab:hover { background: var(--bg4); color: var(--text); opacity: 1; }
.admin-tab.active { background: var(--accent-dim); color: var(--accent); border-color: var(--accent); }

/* ── Mailbox ────────────────────────────────────────────────────── */
.mailbox-wrap { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); }
.mailbox-toolbar { padding: .7rem 1rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.mailbox-subject { font-weight: 600; color: var(--text); }
.mail-preview { padding: .85rem 1rem; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: auto 1fr auto; gap: .45rem .9rem; cursor: pointer; align-items: start; transition: background var(--transition); }
.mail-preview:hover { background: var(--bg3); }
.mail-preview.unread .mailbox-subject { font-weight: 700; }
.mail-unread-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-top: 5px; flex-shrink: 0; }
.mail-from { font-size: .78rem; color: var(--text2); }
.mail-snippet { font-size: .75rem; color: var(--text3); grid-column: 2; margin-top: -2px; }
.mail-date { font-size: .7rem; color: var(--text3); font-family: var(--font-mono); white-space: nowrap; }
.mail-body-panel { padding: 1.15rem; border-top: 1px solid var(--border); font-size: .86rem; line-height: 1.6; color: var(--text); white-space: pre-wrap; word-break: break-word; max-height: 380px; overflow-y: auto; display: none; }
.mail-body-panel.open { display: block; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--border2); border-top-color: var(--accent); border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Genres ─────────────────────────────────────────────────────── */
.genre-pill { display: inline-flex; align-items: center; gap: .45rem; background: var(--bg2); border: 1px solid var(--border); border-radius: 30px; padding: .35rem .9rem .35rem .35rem; font-size: .8rem; font-weight: 500; margin: 0 .35rem .35rem 0; transition: var(--transition); }
.genre-pill:hover { border-color: var(--accent); }
.genre-dot { width: 13px; height: 13px; border-radius: 50%; flex-shrink: 0; }
.genre-container { display: flex; flex-wrap: wrap; margin-bottom: 1.4rem; }
.color-input { width: 48px !important; height: 34px !important; padding: 2px 3px !important; cursor: pointer; }

/* ── Footer ─────────────────────────────────────────────────────── */
.app-footer {
  padding: .7rem 2rem;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-size: .72rem; color: var(--text3); flex-wrap: wrap; gap: .4rem;
  background: var(--bg2);
}
.app-footer a { color: var(--text3); }
.app-footer a:hover { color: var(--accent); }

/* ── Modals ─────────────────────────────────────────────────────── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 200; align-items: center; justify-content: center; padding: 1rem; }
.modal-overlay.open { display: flex; }
.modal { background: var(--bg2); border: 1px solid var(--border2); border-radius: var(--radius); padding: 1.65rem; max-width: 460px; width: 100%; box-shadow: var(--shadow); animation: modalIn .18s ease; }
@keyframes modalIn { from { opacity: 0; transform: scale(.96) translateY(-8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal h2 { font-size: .97rem; font-weight: 700; margin-bottom: .45rem; }
.modal p  { font-size: .83rem; color: var(--text2); margin-bottom: 1.15rem; }
.modal-actions { display: flex; gap: .65rem; justify-content: flex-end; }

/* ── Cover / Gallery ────────────────────────────────────────────── */
.venue-cover-wrap { position: relative; width: 100%; margin-bottom: 1.15rem; border-radius: var(--radius-xs); overflow: hidden; transition: box-shadow var(--transition); }
.venue-cover-wrap.dz--over { box-shadow: 0 0 0 3px var(--accent); }
.venue-cover-img { width: 100%; height: 175px; object-fit: cover; display: block; border-radius: var(--radius-xs); }
.venue-cover-change { position: absolute; bottom: 7px; right: 7px; background: rgba(0,0,0,.55); color: #fff; font-size: .7rem; font-weight: 600; padding: 3px 9px; border-radius: 20px; cursor: pointer; display: inline-flex; align-items: center; gap: .25rem; transition: background var(--transition); backdrop-filter: blur(4px); }
.venue-cover-change:hover { background: rgba(0,0,0,.8); }
.venue-cover-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 175px; border: 2px dashed var(--border2); border-radius: var(--radius-xs); cursor: pointer; background: var(--bg3); transition: border-color var(--transition), background var(--transition); margin-bottom: 1.15rem; }
.venue-cover-placeholder:hover, .venue-cover-placeholder.dz--over { border-color: var(--accent); background: var(--accent-dim); }
.venue-cover-placeholder-inner { display: flex; flex-direction: column; align-items: center; gap: .25rem; pointer-events: none; }
.cover-ph-icon { font-size: 1.6rem; line-height: 1; }
.cover-ph-label { font-size: .85rem; font-weight: 700; color: var(--text2); }
.cover-ph-sub { font-size: .7rem; color: var(--text3); }
.cover-ph-btn { margin-top: .35rem; background: var(--bg2); border: 1px solid var(--border2); color: var(--text2); font-size: .72rem; font-weight: 600; padding: 4px 12px; border-radius: 20px; transition: border-color var(--transition), color var(--transition); }
.venue-cover-placeholder:hover .cover-ph-btn { border-color: var(--accent); color: var(--accent); }
.venue-gallery-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .85rem; }
.venue-gallery-title { font-size: .93rem; font-weight: 700; }
.gallery-dropzone { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 130px; border: 2px dashed var(--border2); border-radius: var(--radius-xs); background: var(--bg3); cursor: pointer; transition: border-color var(--transition), background var(--transition); }
.gallery-dropzone:hover, .gallery-dropzone.dz--over { border-color: var(--accent); background: var(--accent-dim); }
.gallery-dropzone-inner { display: flex; flex-direction: column; align-items: center; gap: .25rem; pointer-events: none; }
.img-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .65rem; }
.img-tile { position: relative; border-radius: var(--radius-xs); overflow: hidden; aspect-ratio: 4/3; border: 2px solid var(--border); background: var(--bg3); transition: border-color var(--transition), transform var(--transition); }
.img-tile:hover { transform: translateY(-1px); border-color: var(--border2); }
.img-tile--cover { border-color: var(--accent); }
.img-tile img { width: 100%; height: 100%; object-fit: cover; }
.img-tile-badge { position: absolute; top: 4px; left: 4px; background: var(--accent); color: #fff; font-size: .58rem; font-weight: 700; letter-spacing: .04em; padding: 2px 6px; border-radius: 20px; }
.img-tile-actions { position: absolute; bottom: 0; left: 0; right: 0; display: flex; gap: 2px; padding: 3px; background: linear-gradient(to top, rgba(0,0,0,.6), transparent); opacity: 0; transition: opacity var(--transition); }
.img-tile:hover .img-tile-actions { opacity: 1; }
.img-tile-btn { flex: 1; padding: 3px 3px; border: none; background: rgba(255,255,255,.16); color: #fff; font-size: .62rem; border-radius: 3px; cursor: pointer; backdrop-filter: blur(4px); transition: background var(--transition); }
.img-tile-btn:hover { background: rgba(255,255,255,.32); }
.img-tile-btn--del:hover { background: rgba(239,68,68,.7); }
.img-tile--add { display: flex; align-items: center; justify-content: center; cursor: pointer; border-style: dashed; font-size: 1.4rem; color: var(--text3); transition: color var(--transition), border-color var(--transition); }
.img-tile--add:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
.upload-status-msg { font-size: .76rem; color: var(--text3); }
.upload-status-msg--ok  { color: #22c55e; }
.upload-status-msg--err { color: #f97316; }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .main-content { padding: 1.5rem 1.5rem; }
}

@media (max-width: 900px) {
  .sidebar { position: fixed; top: var(--topnav-h); left: 0; z-index: 95; height: calc(100vh - var(--topnav-h)); transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .detail-grid { grid-template-columns: 1fr; }
  .main-content { padding: 1.25rem 1.25rem; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-nav-toggle { display: flex; }
  .content-header { flex-direction: column; align-items: flex-start; gap: .65rem; }
  .content-header-controls { width: 100%; align-items: flex-start; }
  .sort-bar { flex-wrap: wrap; }
  .search-form, .search-wrap { width: 100%; }
  .search-input { width: 100% !important; }
  .form-row-2 { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  :root { --topnav-h: 50px; }
  .topnav { padding: 0 .85rem; gap: .5rem; }
  .topnav-right .lang-switcher { display: none; }
  .main-content { padding: 1rem; }
  .venue-grid { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column; }
  .form-actions .btn-primary,
  .form-actions .btn-secondary { width: 100%; justify-content: center; }
  .app-footer { flex-direction: column; text-align: center; padding: .65rem 1rem; }
  .venue-card-image { height: 180px; }
  .detail-card { padding: 1.1rem; }
}

@media (max-width: 380px) {
  .stats-row { grid-template-columns: 1fr; }
  .nav-brand span { display: none; }
}

/* ── Reduced motion ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
