/* ============================================================
   STYLE.CSS — Tomáš Morawiec · Redesign 2026
   Inter · Dark · Yellow accent · Fully responsive
   ============================================================ */

.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --yellow:     #F5C518;
    --yellow-dim: #c9a010;
    --bg:         #0c0c0e;
    --bg-2:       #111114;
    --bg-3:       #18181c;
    --bg-4:       #222228;
    --border:     #2a2a32;
    --text:       #f0f0f4;
    --text-muted: #8888a0;
    --text-dim:   #4a4a5a;
    --radius:     16px;
    --radius-sm:  8px;
    --font:       'Inter', system-ui, sans-serif;
    --font-mono:  'JetBrains Mono', monospace;
    --tr:         0.16s ease;
    --green:      #22c55e;
    --red:        #ef4444;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Jemná mřížka — pouze veřejná část, skryta v admin */
body:not(.admin-body)::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 58px 58px;
    pointer-events: none;
    z-index: 0;
}

/* Ensure content sits above grid */
.site-header, .taxi-widget-wrap, .main-content, .site-footer {
    position: relative;
    z-index: 1;
}

a { color: inherit; text-decoration: none; }

/* ═══════════════════════════════════════════════
   HEADER & NAV
═══════════════════════════════════════════════ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(12,12,14,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 58px;
    gap: 12px;
}

/* Logo */
.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    text-decoration: none;
}

.logo-mark {
    width: 34px;
    height: 34px;
    background: transparent;
    border: 2px solid var(--yellow);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    color: var(--yellow);
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
}

.logo-mark::after {
    display: none;
}

.logo-mark img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.logo-mark img.hidden { display: none; }

.logo-fallback { position: relative; z-index: 1; }

.logo-text {
    color: var(--text);
    font-size: 20px;
    font-weight: 600;
    white-space: nowrap;
}

@media (min-width: 769px) {
    .logo-text { font-size: 20px; }
}

/* Pill navigation */
.site-nav {
    display: flex;
    gap: 2px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 3px;
}

.nav-link {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    padding: 5px 14px;
    border-radius: 100px;
    transition: all var(--tr);
    white-space: nowrap;
    text-decoration: none;
}

.nav-link:hover  { background: var(--bg-4); color: var(--text); }
.nav-link.active { background: var(--yellow); color: #000; font-weight: 700; }
.nav-admin       { color: var(--text-dim); font-size: 12px; }

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 6px;
    background: transparent;
    border: none;
    flex-shrink: 0;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-muted);
    border-radius: 2px;
    transition: all var(--tr);
}

.nav-toggle.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile nav dropdown */
.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 2px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    padding: 8px 16px 12px;
}

.mobile-nav.open { display: flex; }

.mobile-nav .nav-link {
    font-size: 14px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    width: 100%;
}

.mobile-nav .nav-link.active { background: var(--yellow); color: #000; }

/* ═══════════════════════════════════════════════
   TAXI STATUS WIDGET
═══════════════════════════════════════════════ */
.taxi-widget-wrap {
    padding: 19px 24px;
    background: var(--bg);
    display: flex;
    justify-content: center;
}

.taxi-widget {
    width: 100%;
    max-width: 560px;
    border-radius: var(--radius);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.3s ease;
}

.taxi-widget.taxi-available {
    background: rgba(34,197,94,0.07);
    border: 1.5px solid rgba(34,197,94,0.38);
}

.taxi-widget.taxi-unavailable {
    background: rgba(239,68,68,0.07);
    border: 1.5px solid rgba(239,68,68,0.38);
}

.taxi-dot-wrap {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.taxi-available .taxi-dot-wrap { background: rgba(34,197,94,0.14); }
.taxi-unavailable .taxi-dot-wrap { background: rgba(239,68,68,0.14); }

.taxi-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
}

.taxi-available .taxi-dot {
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(34,197,94,0.2);
    animation: taxi-pulse 2s infinite;
}

.taxi-unavailable .taxi-dot { background: var(--red); }

@keyframes taxi-pulse {
    0%,100% { box-shadow: 0 0 0 4px rgba(34,197,94,0.18); }
    50%      { box-shadow: 0 0 0 8px rgba(34,197,94,0.06); }
}

.taxi-info { flex: 1; min-width: 0; }

.taxi-label {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 3px;
}

.taxi-status-text {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.taxi-available .taxi-status-text { color: var(--green); }
.taxi-unavailable .taxi-status-text { color: var(--red); }


.taxi-call-btn {
    font-size: 13px;
    font-weight: 700;
    padding: 9px 20px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: none;
    font-family: var(--font);
    flex-shrink: 0;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--tr);
}

.taxi-available .taxi-call-btn {
    background: var(--yellow);
    color: #000;
}

.taxi-available .taxi-call-btn:hover {
    background: #ffd84d;
    transform: translateY(-1px);
}

.taxi-unavailable .taxi-call-btn {
    background: var(--bg-4);
    color: var(--text-dim);
    cursor: not-allowed;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════
   MAIN CONTENT WRAPPER
═══════════════════════════════════════════════ */
.main-content {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

/* ═══════════════════════════════════════════════
   CARDS — responsive grid
═══════════════════════════════════════════════ */
.cards-section { padding-top: 4px; }

.section-label {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

/*
  Grid logic:
  PC / Tablet landscape:  3 cols
  Tablet portrait:        2 cols, last odd = span 2
  Mobile landscape:       2 cols, last odd = span 2
  Mobile portrait:        1 col
*/
.cards-grid {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(3, 1fr);
}

/* Last card spans full row when remainder after dividing by cols = 1 */
.cards-grid .card-span { grid-column: 1 / -1; }

/* Tablet portrait & mobile landscape → 2 cols */
@media (max-width: 768px) {
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile portrait → 1 col, no span needed */
@media (max-width: 480px) {
    .cards-grid { grid-template-columns: 1fr; }
    .cards-grid .card-span { grid-column: auto; }
}

/* Card */
.card {
    border-radius: var(--radius);
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 0;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: border-color var(--tr), background var(--tr);
    /* Výchozí žlutý přechod — viditelný i bez hoveru */
    background: linear-gradient(135deg, #2a2610 0%, #1a1608 40%, #111114 100%);
    border: 1px solid rgba(245,197,24,0.28);
}

/* Glow overlay — zesílí při hoveru */
.card:hover {
    border-color: rgba(245,197,24,0.65);
    background: linear-gradient(135deg, #332e12 0%, #201a08 40%, #111114 100%);
}
.card:hover .card-arrow { color: var(--yellow); transform: translateX(3px); }

/* Span card: horizontal layout */
.card-span { flex-direction: row; align-items: center; gap: 20px; }
.card-span .card-body { flex: 1; }
.card-body { display: flex; flex-direction: column; gap: 0; flex: 1; }
.card-span .card-icon { margin-bottom: 0; flex-shrink: 0; }

@media (max-width: 480px) {
    .card-span { flex-direction: column; align-items: flex-start; }
    .card-span .card-icon { margin-bottom: 14px; }
}

.card-icon {
    width: 46px;
    height: 46px;
    border-radius: 11px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    font-size: 22px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
.card-icon { color: var(--yellow); }

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
    line-height: 1.3;
    padding-right: 22px;
    position: relative;
    z-index: 1;
    letter-spacing: -0.2px;
}

.card-span .card-title { padding-right: 0; }

.card-excerpt {
    font-size: 13px;
    color: #a0a0b8;
    line-height: 1.65;
    flex: 1;
    position: relative;
    z-index: 1;
}

.card-arrow {
    position: absolute;
    bottom: 18px;
    right: 18px;
    font-size: 15px;
    color: var(--text-dim);
    transition: color var(--tr), transform var(--tr);
    z-index: 1;
}

/* ═══════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--tr);
    white-space: nowrap;
    text-decoration: none;
}

.btn-primary { background: var(--yellow); color: #000; }
.btn-primary:hover { background: #ffd84d; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--bg-3); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-full { width: 100%; justify-content: center; }
.btn-danger { background: transparent; color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.btn-danger:hover { background: rgba(239,68,68,0.1); }

/* ═══════════════════════════════════════════════
   PAGE ARTICLE (podstránky)
═══════════════════════════════════════════════ */
.page-article { max-width: 740px; margin: 48px auto 0; }

.page-header {
    margin-bottom: 36px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border);
}

.back-link {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 18px;
    transition: color var(--tr);
    text-decoration: none;
}

.back-link:hover { color: var(--yellow); }

.page-title {
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.1;
}

/* ═══════════════════════════════════════════════
   PROSE
═══════════════════════════════════════════════ */
.prose { color: var(--text-muted); line-height: 1.8; font-size: 16px; }
.prose h1,.prose h2,.prose h3 { font-family: var(--font); color: var(--text); font-weight: 700; margin: 28px 0 12px; }
.prose h1 { font-size: 28px; }
.prose h2 { font-size: 24px; }
.prose h3 { font-size: 20px; }
.prose p  { margin-bottom: 16px; }
.prose ul,.prose ol { padding-left: 22px; margin-bottom: 16px; }
.prose li { margin-bottom: 5px; }
.prose ul li::marker { color: var(--yellow); }
.prose a  { color: var(--yellow); text-decoration: underline; text-decoration-color: rgba(245,197,24,.35); }
.prose a:hover { text-decoration-color: var(--yellow); }
.prose blockquote { border-left: 3px solid var(--yellow); padding-left: 18px; margin: 20px 0; color: var(--text-dim); }
.prose code { font-family: var(--font-mono); background: var(--bg-3); padding: 2px 6px; border-radius: 4px; font-size: .88em; color: var(--yellow); }
.prose pre  { background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px; overflow-x: auto; margin-bottom: 16px; }
.prose pre code { background: none; padding: 0; color: var(--text); }
.prose strong { color: var(--text); font-weight: 700; }

/* ═══════════════════════════════════════════════
   404
═══════════════════════════════════════════════ */
.error-page { text-align: center; padding: 80px 0; }
.error-code  { display: block; font-size: 110px; font-weight: 800; color: var(--bg-4); line-height: 1; margin-bottom: 14px; }
.error-title { font-size: 28px; font-weight: 700; margin-bottom: 10px; }
.error-msg   { color: var(--text-muted); margin-bottom: 28px; }

/* ═══════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════ */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; }

.footer-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-copy { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); }
.footer-admin-link { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); transition: color var(--tr); text-decoration: none; }
.footer-admin-link:hover { color: var(--text-muted); }

/* ═══════════════════════════════════════════════
   ALERTS
═══════════════════════════════════════════════ */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 18px; border: 1px solid; }
.alert-success { background: rgba(34,197,94,.07);  border-color: rgba(34,197,94,.25);  color: #4ade80; }
.alert-error   { background: rgba(239,68,68,.07);  border-color: rgba(239,68,68,.25);  color: #f87171; }

/* ═══════════════════════════════════════════════
   ADMIN — LAYOUT
═══════════════════════════════════════════════ */
.admin-body { background: var(--bg); }

.admin-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    background: var(--bg-2);
    border-right: 1px solid var(--border);
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 4px 8px;
    text-decoration: none;
}

.admin-logo .logo-mark { width: 30px; height: 30px; font-size: 11px; border-radius: 6px; border-width: 1.5px; }

.admin-logo-text { font-size: 13px; font-weight: 600; color: var(--text-muted); }

.admin-nav-section {
    font-size: 9px;
    font-family: var(--font-mono);
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 8px;
    margin-bottom: 4px;
}

.admin-nav  { display: flex; flex-direction: column; gap: 1px; }

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    transition: all var(--tr);
    text-decoration: none;
    cursor: pointer;
}

.admin-nav-link i { font-size: 16px; flex-shrink: 0; }
.admin-nav-link:hover  { background: var(--bg-3); color: var(--text); }
.admin-nav-link.active { background: rgba(245,197,24,.1); color: var(--yellow); }
.admin-nav-logout:hover { background: rgba(239,68,68,.08); color: #f87171; }

.admin-nav-divider { border: none; border-top: 1px solid var(--border); margin: 6px 0; }

/* Mobile topbar (admin) */
.admin-mobile-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    padding: 0 16px;
    height: 52px;
    position: sticky;
    top: 0;
    z-index: 200;
}

.admin-hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}

.admin-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-muted);
    border-radius: 2px;
    transition: all var(--tr);
}

.admin-hamburger.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.admin-hamburger.active span:nth-child(2) { opacity: 0; }
.admin-hamburger.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Admin main */
.admin-main { padding: 30px 36px; max-width: 960px; }

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    gap: 16px;
    flex-wrap: wrap;
}

.admin-heading { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }

/* Stats row */
.admin-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 22px;
}

.admin-stat {
    background: var(--bg-3);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    border: 1px solid var(--border);
}

.admin-stat-label {
    font-size: 9px;
    font-family: var(--font-mono);
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

.admin-stat-value { font-size: 22px; font-weight: 800; color: var(--text); }
.admin-stat-sub   { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Admin table */
.admin-table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }

.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table thead { background: var(--bg-3); border-bottom: 1px solid var(--border); }
.admin-table th { padding: 10px 14px; text-align: left; font-size: 10px; font-family: var(--font-mono); color: var(--text-dim); letter-spacing: 1px; text-transform: uppercase; white-space: nowrap; }
.admin-table tbody tr { border-bottom: 1px solid var(--border); transition: background var(--tr); }
.admin-table tbody tr:last-child { border-bottom: none; }
.admin-table tbody tr:hover { background: var(--bg-3); }
.admin-table td { padding: 12px 14px; vertical-align: middle; }
.td-title { font-weight: 600; color: var(--text); }
.td-slug  { font-family: var(--font-mono); font-size: 12px; }
.td-date  { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.td-actions { white-space: nowrap; }
.td-actions-wrap { display: flex; gap: 5px; }

.slug-link { color: var(--text-muted); transition: color var(--tr); }
.slug-link:hover { color: var(--yellow); }

.btn-action { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 5px; font-size: 11px; font-weight: 600; transition: all var(--tr); cursor: pointer; }
.btn-edit   { background: var(--bg-4); color: var(--text); border: 1px solid var(--border); }
.btn-edit:hover { background: var(--yellow); color: #000; border-color: var(--yellow); }
.btn-delete { background: transparent; color: var(--text-dim); border: 1px solid transparent; }
.btn-delete:hover { background: rgba(239,68,68,.1); color: #f87171; border-color: rgba(239,68,68,.3); }

.empty-state { padding: 48px; text-align: center; color: var(--text-muted); background: var(--bg-2); border-radius: var(--radius); border: 1px dashed var(--border); }
.empty-state a { color: var(--yellow); }

/* Admin form */
.edit-form { }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-group { margin-bottom: 16px; }

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.form-hint { font-weight: 400; color: var(--text-dim); font-family: var(--font-mono); font-size: 11px; }
.required  { color: var(--yellow); }

.form-input, .form-textarea, .form-select {
    width: 100%;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    font-size: 13px;
    color: var(--text);
    font-family: var(--font);
    outline: none;
    transition: border-color var(--tr);
}

.form-input:focus, .form-textarea:focus, .form-select:focus { border-color: rgba(245,197,24,0.5); }
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-dim); }
.form-textarea { min-height: 140px; resize: vertical; }
.code-editor { font-family: var(--font-mono); font-size: 12px; line-height: 1.6; color: #a78bfa; background: var(--bg-3); }

.slug-input-wrap { display: flex; align-items: center; background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; transition: border-color var(--tr); }
.slug-input-wrap:focus-within { border-color: rgba(245,197,24,0.5); }
.slug-prefix { padding: 9px 10px 9px 12px; font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); white-space: nowrap; }
.slug-field { border: none; border-radius: 0; background: transparent; padding-left: 0; }

.form-actions { display: flex; gap: 10px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); flex-wrap: wrap; align-items: center; }
.form-actions .btn-danger { margin-left: auto; }

.settings-section-label {
    font-size: 10px;
    font-family: var(--font-mono);
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 22px 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Icon picker */
.icon-picker { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin-top: 6px; }

.icon-option {
    aspect-ratio: 1;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-muted);
    transition: all var(--tr);
}

.icon-option:hover, .icon-option.selected {
    background: rgba(245,197,24,0.1);
    border-color: rgba(245,197,24,0.4);
    color: var(--yellow);
}

/* Tag picker */
.tag-picker { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }

.tag-option {
    font-size: 11px;
    font-family: var(--font-mono);
    padding: 4px 13px;
    border-radius: 100px;
    cursor: pointer;
    transition: all var(--tr);
    opacity: 0.4;
}

.tag-option.selected { opacity: 1; }
.tag-option.taxi   { background: rgba(245,197,24,0.1); color: var(--yellow); border: 1px solid rgba(245,197,24,0.2); }
.tag-option.dev    { background: rgba(99,153,34,0.1);  color: #8bc34a;       border: 1px solid rgba(99,153,34,0.2); }
.tag-option.chrome { background: rgba(59,130,246,0.1); color: #60a5fa;       border: 1px solid rgba(59,130,246,0.2); }
.tag-option.devops { background: rgba(168,85,247,0.1); color: #c084fc;       border: 1px solid rgba(168,85,247,0.2); }
.tag-option.other  { background: rgba(136,136,160,0.12); color: #a0a0b8;     border: 1px solid rgba(136,136,160,0.25); }
.tag-option.custom { background: rgba(136,136,160,0.12); color: #a0a0b8;     border: 1px solid rgba(136,136,160,0.25); }

/* Editor tabs */
.editor-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; flex-wrap: wrap; gap: 8px; }

.editor-toggle-btns { display: flex; gap: 4px; }

.editor-tab {
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-mono);
    color: var(--text-muted);
    border: 1px solid transparent;
    background: transparent;
    transition: all var(--tr);
}

.editor-tab.active {
    background: var(--bg-4);
    color: var(--text);
    border-color: var(--border);
}

/* Logo upload */
.logo-upload-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    flex-wrap: wrap;
}

.logo-preview-box {
    width: 56px;
    height: 56px;
    background: var(--yellow);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    color: #000;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.logo-preview-box img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    display: none;
}

.logo-upload-info { flex: 1; min-width: 160px; }
.logo-upload-info p { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.logo-upload-info small { font-size: 10px; color: var(--text-dim); font-family: var(--font-mono); }

.btn-upload {
    font-size: 12px;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: var(--bg-4);
    color: var(--text);
    border: 1px solid var(--border);
    font-family: var(--font);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--tr);
}

.btn-upload:hover { background: var(--bg-3); border-color: var(--text-dim); }

/* Password form */
.password-field-wrap { position: relative; }
.password-field-wrap .form-input { padding-right: 42px; }
.pw-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-dim); cursor: pointer; padding: 4px; transition: color var(--tr); }
.pw-toggle:hover { color: var(--text-muted); }
.pw-toggle.active { color: var(--yellow); }
.password-divider { border: none; border-top: 1px solid var(--border); margin: 8px 0 16px; }
.pw-strength-wrap { display: flex; align-items: center; gap: 10px; margin-top: 7px; }
.pw-strength-bar { flex: 1; height: 3px; background: var(--bg-4); border-radius: 2px; overflow: hidden; }
.pw-strength-fill { height: 100%; border-radius: 2px; transition: width 0.3s, background 0.3s; width: 0%; }
.pw-strength-label { font-size: 11px; font-family: var(--font-mono); min-width: 90px; }
.pw-match-hint { display: block; font-size: 11px; font-family: var(--font-mono); margin-top: 5px; }
.pw-match-ok  { color: var(--green); }
.pw-match-err { color: var(--red); }

/* Login */
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; }

.login-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 36px;
    width: 100%;
    max-width: 360px;
}

.login-logo { display: flex; justify-content: center; margin-bottom: 22px; }
.login-logo .logo-mark { width: 52px; height: 52px; font-size: 18px; border-radius: 12px; border-width: 3px; }
.login-title { font-size: 22px; font-weight: 800; text-align: center; margin-bottom: 4px; }
.login-sub   { font-size: 13px; color: var(--text-muted); text-align: center; margin-bottom: 24px; }
.login-back  { text-align: center; margin-top: 16px; font-size: 12px; color: var(--text-dim); }
.login-back a { color: var(--text-muted); text-decoration: none; transition: color var(--tr); }
.login-back a:hover { color: var(--yellow); }

/* ═══════════════════════════════════════════════
   ENDORA AD OVERRIDE
═══════════════════════════════════════════════ */
body > div[class],
body > center,
body > table[width="100%"]:first-of-type {
    font-family: var(--font) !important;
    font-size: 11px !important;
    background: var(--bg) !important;
    color: var(--text-dim) !important;
    border-top: 1px solid var(--border) !important;
    padding: 6px 24px !important;
    text-align: center !important;
}

body > div[class] a, body > center a {
    color: var(--text-dim) !important;
    text-decoration: none !important;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */

/* Tablet landscape / small desktop */
@media (max-width: 900px) {
    .admin-stats-row { grid-template-columns: repeat(2, 1fr); }
    .admin-stats-row .admin-stat:last-child { grid-column: 1 / -1; }
}

/* Tablet portrait */
@media (max-width: 768px) {
    .header-inner { padding: 0 16px; }

    .site-nav { display: none; }
    .nav-toggle { display: flex; }

    .taxi-widget-wrap { padding: 15px 16px; }
    .taxi-widget { padding: 12px 16px; gap: 10px; }
    .taxi-status-text { font-size: 14px; }
    .taxi-call-btn { padding: 8px 14px; font-size: 12px; }

    .main-content { padding: 0 16px 60px; }
    .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 13px; }

    /* Admin */
    .admin-layout { grid-template-columns: 1fr; }
    .admin-mobile-bar { display: flex; }
    .admin-sidebar { position: fixed; left: -240px; top: 0; width: 240px; height: 100vh; z-index: 300; transition: left 0.25s ease; box-shadow: none; }
    .admin-sidebar.open { left: 0; box-shadow: 4px 0 40px rgba(0,0,0,0.6); }
    .admin-main { padding: 20px 16px; }
    .form-row { grid-template-columns: 1fr; }
    .settings-grid { grid-template-columns: 1fr; }
    .icon-picker { grid-template-columns: repeat(6, 1fr); }
    .admin-stats-row { grid-template-columns: 1fr 1fr; }
}

/* Mobile landscape */
@media (max-width: 640px) {
    .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .footer-inner { flex-direction: column; text-align: center; gap: 8px; }
}

/* Mobile portrait */
@media (max-width: 480px) {
    .header-inner { height: 52px; }

    .taxi-widget { flex-wrap: wrap; }
    .taxi-call-btn { width: 100%; justify-content: center; }

    .cards-grid { grid-template-columns: 1fr; gap: 11px; }
    .cards-grid .card-span { grid-column: auto; }
    .card-span { flex-direction: column; }
    .card-span .card-icon { margin-bottom: 12px; }

    .admin-stats-row { grid-template-columns: 1fr; }
    .icon-picker { grid-template-columns: repeat(5, 1fr); }
    .tag-picker { gap: 6px; }
    .form-actions { flex-direction: column; }
    .form-actions .btn-danger { margin-left: 0; width: 100%; justify-content: center; }
    .form-actions .btn { width: 100%; justify-content: center; }
    .logo-upload-wrap { flex-direction: column; align-items: flex-start; }
}

/* Quill snow theme dark override */
.ql-toolbar.ql-snow {
    background: var(--bg-3) !important;
    border-color: var(--border) !important;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.ql-container.ql-snow {
    background: var(--bg-2) !important;
    border-color: var(--border) !important;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    min-height: 160px;
}
.ql-editor { color: var(--text) !important; font-family: var(--font) !important; font-size: 14px !important; line-height: 1.7 !important; }
.ql-editor.ql-blank::before { color: var(--text-dim) !important; font-style: normal !important; }
.ql-snow .ql-stroke { stroke: var(--text-muted) !important; }
.ql-snow .ql-fill { fill: var(--text-muted) !important; }
.ql-snow .ql-picker { color: var(--text-muted) !important; }
.ql-snow .ql-picker-options { background: var(--bg-3) !important; border-color: var(--border) !important; }
.ql-snow.ql-toolbar button:hover .ql-stroke,
.ql-snow.ql-toolbar button.ql-active .ql-stroke { stroke: var(--yellow) !important; }
.ql-snow.ql-toolbar button:hover .ql-fill,
.ql-snow.ql-toolbar button.ql-active .ql-fill { fill: var(--yellow) !important; }
