:root {
    --bg: #f3f5f9;
    --card: #ffffff;
    --card-soft: #fbfcff;
    --text: #142033;
    --muted: #64748b;
    --line: #e2e8f0;
    --primary: #17376d;
    --primary-2: #2453a3;
    --accent: #f2b84b;
    --ok: #0f7b45;
    --warn: #a16207;
    --bad: #b42318;
    --info: #1d4ed8;
    --shadow: 0 14px 38px rgba(15, 23, 42, .08);
    --shadow-soft: 0 6px 18px rgba(15, 23, 42, .06);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; background: radial-gradient(circle at top left, #eef4ff 0, #f3f5f9 42%, #f7f8fb 100%); color: var(--text); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; color: var(--primary-2); }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 18px; padding: 12px clamp(16px, 2.5vw, 34px); background: rgba(255,255,255,.9); border-bottom: 1px solid rgba(226,232,240,.9); box-shadow: 0 8px 24px rgba(15, 23, 42, .05); backdrop-filter: blur(14px); }
.brand { font-weight: 900; font-size: 17px; white-space: nowrap; letter-spacing: -.02em; }
.brand a { color: var(--text); display: inline-flex; align-items: center; gap: 9px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; color: #fff; background: linear-gradient(135deg, var(--primary), #0f172a); box-shadow: var(--shadow-soft); }
.topbar nav { display: flex; gap: 7px; flex-wrap: wrap; flex: 1; align-items: center; }
.topbar nav a { display: inline-flex; align-items: center; gap: 6px; padding: 9px 11px; border-radius: 14px; color: #263348; font-size: 14px; font-weight: 750; transition: .15s ease; }
.topbar nav a:hover, .topbar nav a.active { background: #edf3ff; color: var(--primary); }
.userbox { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.userbox span { padding: 4px 8px; border-radius: 999px; background: #edf3ff; color: var(--primary); font-weight: 800; }
.container { width: min(1480px, 100%); margin: 0 auto; padding: clamp(16px, 2.2vw, 32px); }
.footer { color: var(--muted); font-size: 12px; text-align: center; padding: 28px; }
.hero { display: flex; align-items: center; justify-content: space-between; gap: 22px; background: linear-gradient(135deg, #0f172a, #17376d 55%, #2d5db7); color: #fff; padding: clamp(26px, 4vw, 46px); border-radius: 30px; box-shadow: var(--shadow); margin-bottom: 22px; overflow: hidden; position: relative; }
.hero::after { content: '♞'; position: absolute; right: 36px; bottom: -42px; font-size: 180px; opacity: .08; transform: rotate(-10deg); }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.12); color: #fdecc3; font-weight: 900; font-size: 13px; margin-bottom: 12px; }
.hero h1, .page-head h1 { margin: 0 0 8px; font-size: clamp(30px, 3vw, 46px); letter-spacing: -.04em; line-height: 1.05; }
.hero p, .page-head p { margin: 0; color: rgba(255,255,255,.82); font-size: 17px; max-width: 780px; }
.hero-button { background: #fff; color: var(--primary); position: relative; z-index: 1; }
.hero-button:hover { background: #f8fafc; color: var(--primary-2); }
.page-head { margin: 4px 0 22px; }
.page-head p { color: var(--muted); }
.action-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card { background: rgba(255,255,255,.95); border: 1px solid rgba(226,232,240,.95); border-radius: 24px; padding: clamp(18px, 2vw, 24px); box-shadow: var(--shadow-soft); }
.soft-card { background: linear-gradient(180deg, #fff, #fbfdff); }
.card h2 { margin-top: 0; font-size: 20px; letter-spacing: -.02em; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-bottom: 20px; }
.two-col.wide-left { grid-template-columns: minmax(0, 1.55fr) minmax(320px, .85fr); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(360px, .75fr); gap: 20px; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 14px; }
.mini-card { display: flex; flex-direction: column; gap: 9px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(180deg, #fff, #fbfdff); color: var(--text); transition: .15s ease; }
.mini-card:hover { border-color: #b9c6e4; transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.mini-card span { color: var(--muted); font-size: 14px; }
.mini-card.highlighted { border-color: #fcd34d; background: #fffbeb; }
.item-card a strong { color: var(--text); }
.card-actions { margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--line); }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.metric { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: var(--shadow-soft); }
.metric strong { display: block; font-size: 36px; color: var(--primary); line-height: 1; }
.metric span { color: var(--muted); }
.table-wrap { width: 100%; overflow-x: auto; border-radius: 16px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { padding: 13px 11px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #f8fafc; }
tr:hover td { background: #fcfdff; }
td small { color: var(--muted); }
label { display: block; font-weight: 750; margin-bottom: 12px; color: #263348; }
input, select, textarea { width: 100%; margin-top: 7px; padding: 12px 13px; border-radius: 14px; border: 1px solid #cbd5e1; font: inherit; background: #fff; outline: none; transition: border-color .15s ease, box-shadow .15s ease; }
input:focus, select:focus, textarea:focus, .wysiwyg-editor:focus { border-color: #93b4f5; box-shadow: 0 0 0 4px rgba(37, 99, 235, .10); }
textarea { min-height: 112px; resize: vertical; }
button, .button { border: 0; border-radius: 14px; padding: 11px 16px; background: var(--primary); color: white; font-weight: 850; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px; box-shadow: 0 6px 18px rgba(23,55,109,.18); line-height: 1.2; }
button:hover, .button:hover { background: var(--primary-2); color: white; text-decoration: none; }
button.small, .button.small, .small-link { padding: 7px 10px; border-radius: 10px; font-size: 12px; margin: 2px; box-shadow: none; }
button.ok { background: var(--ok); }
button.danger { background: var(--bad); }
button.ghost, .button.ghost { background: #fff; color: var(--bad); border: 1px solid #fecaca; box-shadow: none; }
button.ghost:hover, .button.ghost:hover { background: #fef2f2; color: var(--bad); }
.button.secondary { background: #eef2ff; color: var(--primary); box-shadow: none; }
.button.secondary:hover { background: #dbeafe; color: var(--primary-2); }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.form-row { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(220px, 1fr) auto; gap: 12px; align-items: end; }
.form-row select, .form-row input { margin-top: 0; }
.grid-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: end; }
.grid-form .full { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 9px; }
.check input { width: auto; margin: 0; }
.inline { display: inline-flex; margin: 0; vertical-align: middle; }
.inline.compact input { width: 76px; padding: 7px; margin: 0 3px 0 0; }
.actions { min-width: 260px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 850; background: #f3f4f6; color: #4b5563; margin: 2px 2px 2px 0; white-space: nowrap; }
.badge.ok { background: #dcfce7; color: var(--ok); }
.badge.warn { background: #fef3c7; color: var(--warn); }
.badge.bad { background: #fee2e2; color: var(--bad); }
.badge.info { background: #dbeafe; color: var(--info); }
.badge.muted { background: #f3f4f6; color: #6b7280; }
.flash { padding: 13px 16px; margin-bottom: 16px; border-radius: 16px; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-soft); }
.flash.success { background: #ecfdf5; border-color: #bbf7d0; color: #166534; }
.flash.error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.flash.info { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.muted-text { color: var(--muted); }
.attention { border-color: #fde68a; background: linear-gradient(180deg, #fffbeb, #fff); margin-bottom: 20px; }
.wall-card { min-height: 520px; }
.post-feed { display: grid; gap: 16px; }
.compact-feed { margin-top: 14px; }
.post-card { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 0; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-soft); }
.post-card:not(.has-image) { grid-template-columns: 1fr; }
.post-card.large { min-height: 190px; }
.post-card img { width: 100%; height: 100%; min-height: 160px; object-fit: cover; display: block; background: #e5e7eb; }
.post-card-body { padding: 20px; min-width: 0; }
.post-card small { display: block; color: var(--muted); margin-bottom: 8px; font-weight: 650; }
.post-card h2, .post-card h3 { margin: 0 0 8px; letter-spacing: -.02em; line-height: 1.15; }
.post-card h2 a, .post-card h3 a { color: var(--text); }
.post-card p { color: #475569; line-height: 1.55; margin: 0 0 14px; }
.read-more { font-weight: 900; color: var(--primary); }
.post-full { max-width: 980px; margin: 0 auto; padding: 0; overflow: hidden; }
.post-full-head { padding: 28px 30px 10px; }
.post-full h1 { font-size: clamp(30px, 3vw, 48px); letter-spacing: -.04em; margin: 0 0 8px; }
.post-full-image { width: 100%; max-height: 420px; object-fit: cover; display: block; }
.post-body { font-size: 18px; line-height: 1.75; padding: 10px 30px 32px; }
.post-body h2 { font-size: 28px; margin: 28px 0 10px; }
.post-body h3 { font-size: 22px; margin: 22px 0 8px; }
.post-body blockquote { border-left: 5px solid #bfdbfe; padding: 10px 16px; margin: 20px 0; background: #f8fbff; color: #334155; border-radius: 12px; }
.post-body a { font-weight: 800; text-decoration: underline; }
.editor-card { margin-bottom: 20px; }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; background: #f8fafc; border: 1px solid #cbd5e1; border-bottom: 0; border-radius: 16px 16px 0 0; margin-top: 8px; }
.editor-toolbar button { padding: 7px 10px; border-radius: 10px; font-size: 13px; background: #fff; color: #1e293b; border: 1px solid #cbd5e1; box-shadow: none; }
.editor-toolbar button:hover { background: #eef2ff; color: var(--primary); }
.wysiwyg-editor { min-height: 230px; padding: 16px; border: 1px solid #cbd5e1; border-radius: 0 0 16px 16px; background: #fff; line-height: 1.6; font-weight: 500; outline: none; }
.wysiwyg-editor:empty::before { content: attr(data-placeholder); color: #94a3b8; }
.wysiwyg-hidden { display: none; }
.event-meta dl { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 10px 16px; }
.event-meta dt { font-weight: 900; color: var(--muted); }
.event-meta dd { margin: 0; }
.status-card { background: linear-gradient(180deg, #fff, #fbfdff); }
.split-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.live-dot { color: var(--ok); font-size: 13px; font-weight: 900; white-space: nowrap; }
.live-dot::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 7px; box-shadow: 0 0 0 5px rgba(15,123,69,.12); }
.auth-card { max-width: 920px; margin: 30px auto; }
.auth-hero { text-align: center; margin-bottom: 20px; }
.auth-piece { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 12px; border-radius: 22px; background: linear-gradient(135deg, var(--primary), #0f172a); color: white; font-size: 30px; box-shadow: var(--shadow); }
.auth-hero h1 { margin: 0 0 8px; font-size: clamp(30px, 3vw, 44px); letter-spacing: -.04em; }
.auth-hero p { margin: 0 auto; max-width: 720px; color: var(--muted); }
.otp-input { letter-spacing: .2em; font-weight: 900; font-size: 24px; text-align: center; }
.install-body { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.install-card { max-width: 900px; width: 100%; background: #fff; padding: 30px; border-radius: 28px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.install-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.install-head > span { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 18px; background: var(--primary); color: white; font-size: 30px; }
.install-head h1 { margin: 0 0 4px; letter-spacing: -.03em; }
@media (max-width: 1100px) {
    .dashboard-grid, .two-col, .two-col.wide-left { grid-template-columns: 1fr; }
    .events-card { order: 2; }
}
@media (max-width: 900px) {
    .topbar { align-items: flex-start; flex-direction: column; }
    .topbar nav, .userbox { width: 100%; }
    .userbox { flex-wrap: wrap; }
    .grid-form, .form-row { grid-template-columns: 1fr; }
    .container { padding: 16px; }
    .hero { align-items: flex-start; flex-direction: column; padding: 24px; }
    .event-meta dl { grid-template-columns: 1fr; }
    .post-card, .post-card.has-image { grid-template-columns: 1fr; }
    .post-card img { height: 210px; }
    .action-head { align-items: flex-start; flex-direction: column; }
}
.current-image { padding: 12px 0; }
.current-image img { display: block; max-width: 320px; max-height: 190px; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); margin: 8px 0 10px; }
.flash.warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.metric-grid.compact { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.button.small { padding: 7px 10px; font-size: 13px; border-radius: 12px; display: inline-flex; align-items: center; }

/* v1.7 levelezési beállítások */
.settings-form .form-note {
    padding: 14px 16px;
    border: 1px solid var(--border, #e7decf);
    background: #fff8e8;
    border-radius: 16px;
}
.settings-form .form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}
.settings-form .check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
}

/* v1.8 PWA és iOS főképernyős használat */
.pwa-install-card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    margin-top: 20px;
    border-color: #dbeafe;
    background: linear-gradient(135deg, #ffffff, #f8fbff);
}
.pwa-icon-wrap img {
    width: 82px;
    height: 82px;
    border-radius: 22px;
    box-shadow: 0 12px 26px rgba(15,23,42,.18);
    display: block;
}
.pwa-install-card h2 { margin: 0 0 8px; }
.pwa-install-card p { color: var(--muted); line-height: 1.6; margin: 0 0 12px; }
.ios-steps {
    margin: 12px 0;
    padding-left: 22px;
    color: #263348;
    line-height: 1.7;
}
.pwa-standalone .topbar {
    padding-top: calc(12px + env(safe-area-inset-top));
}
@media (max-width: 620px) {
    .pwa-install-card { grid-template-columns: 1fr; }
    .pwa-icon-wrap img { width: 72px; height: 72px; }
}
