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

:root {
    --primary:   #2563eb;
    --primary-h: #1d4ed8;
    --accent:    #00e5ff;
    --bg:        #f8fafc;
    --surface:   #ffffff;
    --border:    #e2e8f0;
    --text:      #1e293b;
    --muted:     #64748b;
    --radius:    10px;
    --shadow:    0 1px 3px rgba(0,0,0,.08), 0 8px 24px rgba(15,23,42,.05);
}

html, body { height: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.hdr {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 50;
}
.hdr-inner {
    height: 60px;
    display: flex; align-items: center; gap: 1.5rem;
}
.hdr-logo {
    display: inline-flex; align-items: center; gap: .55rem;
    font-size: 1.18rem; font-weight: 700; color: var(--primary);
    letter-spacing: -.4px;
}
.hdr-logo b { color: var(--text); font-weight: 700; }
.hdr-nav { margin-left: auto; display: flex; gap: 1rem; }
.hdr-nav a { color: var(--text); font-weight: 500; font-size: .92rem; }
.hdr-nav a:hover { color: var(--primary); text-decoration: none; }

/* Hero */
.hero {
    padding: 4rem 0 3rem;
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    border-bottom: 1px solid var(--border);
}
.hero-grid {
    display: grid; gap: 3rem;
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
}
@media (max-width: 820px) {
    .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
    .hero { padding: 2.5rem 0 2rem; }
}
.hero-badge {
    display: inline-block;
    background: rgba(37, 99, 235, .1);
    color: var(--primary);
    font-size: .78rem; font-weight: 600;
    padding: .3rem .7rem; border-radius: 999px;
    margin-bottom: 1rem;
}
.hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.2; letter-spacing: -.8px;
    margin-bottom: 1rem;
}
.hero h1 span { color: var(--primary); }
.hero p.lead {
    font-size: 1.08rem; color: var(--muted);
    margin-bottom: 1.6rem; max-width: 50ch;
}
.hero-cta { display: flex; gap: .75rem; flex-wrap: wrap; }

.btn {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .7rem 1.3rem;
    font-size: .95rem; font-weight: 600;
    border: 1.5px solid transparent; border-radius: var(--radius);
    cursor: pointer; transition: .15s;
    text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-h); text-decoration: none; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.btn svg { width: 18px; height: 18px; }

/* Hero preview */
.hero-preview {
    background: #0a0a18;
    border-radius: 14px;
    padding: 1.2rem;
    box-shadow: 0 25px 60px -20px rgba(15,23,42,.4);
    position: relative;
    color: #c0eeff;
}
.hero-preview-bar {
    display: flex; gap: .35rem; margin-bottom: .9rem;
}
.hero-preview-bar i {
    width: 11px; height: 11px; border-radius: 50%;
    background: #475569; display: inline-block;
}
.hero-preview-bar i:first-child { background: #ef4444; }
.hero-preview-bar i:nth-child(2) { background: #f59e0b; }
.hero-preview-bar i:nth-child(3) { background: #22c55e; }
.hero-preview-menu {
    background: #080816;
    border: 1px solid var(--accent);
    border-radius: 4px; padding: .55rem .5rem;
    font-family: 'SF Mono', Menlo, monospace;
    font-size: .8rem;
    box-shadow: 0 0 24px rgba(0,229,255,.18);
}
.hero-preview-menu div {
    padding: .35rem .55rem;
    border-radius: 3px;
    color: #c0eeff;
}
.hero-preview-menu div.active {
    background: rgba(0,229,255,.12);
    color: var(--accent);
}
.hero-preview-menu hr {
    border: none; border-top: 1px solid #1e293b;
    margin: .35rem 0;
}

/* Sections */
.section { padding: 3.5rem 0; }
.section h2 {
    font-size: 1.75rem; letter-spacing: -.4px;
    margin-bottom: 2rem; text-align: center;
}
.section h2 small {
    display: block; font-size: .82rem; font-weight: 500;
    color: var(--muted); margin-bottom: .3rem; letter-spacing: 0;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
}
.feature {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem;
    transition: .18s;
}
.feature:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #c7d2fe; }
.feature-ico {
    width: 38px; height: 38px;
    background: rgba(37,99,235,.1); color: var(--primary);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: .85rem;
}
.feature-ico svg { width: 20px; height: 20px; }
.feature h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.feature p { color: var(--muted); font-size: .93rem; line-height: 1.55; }

/* Steps */
.section--gray { background: #f1f5f9; }
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    counter-reset: step;
}
.step {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem 1.3rem 1.2rem;
    border: 1px solid var(--border);
    position: relative;
}
.step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute; top: -14px; left: 1.3rem;
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .9rem;
}
.step h3 { font-size: 1rem; margin: .35rem 0 .4rem; }
.step p { color: var(--muted); font-size: .92rem; }

/* CTA bottom */
.cta-band {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: #fff;
    padding: 3rem 0;
    text-align: center;
}
.cta-band h2 { color: #fff; font-size: 1.6rem; margin-bottom: .6rem; }
.cta-band p { opacity: .9; margin-bottom: 1.5rem; }
.cta-band .btn {
    background: #fff; color: var(--primary); border-color: #fff;
}
.cta-band .btn:hover { background: #f1f5f9; }

/* Footer */
.ftr {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    color: var(--muted); font-size: .88rem;
}
.ftr-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.ftr a { color: var(--muted); }
.ftr a:hover { color: var(--primary); }

/* Admin */
.admin-shell {
    max-width: 800px; margin: 2rem auto; padding: 0 1.25rem;
}
.admin-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow);
}
.admin-card h2 {
    font-size: 1.15rem; margin-bottom: 1rem;
    display: flex; align-items: center; gap: .5rem;
}
.form-row { margin-bottom: 1rem; }
.form-row label {
    display: block; margin-bottom: .35rem;
    font-size: .88rem; font-weight: 600; color: var(--text);
}
.form-row input[type="text"],
.form-row input[type="url"],
.form-row input[type="password"],
.form-row select,
.form-row textarea {
    width: 100%;
    padding: .55rem .75rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font: inherit; font-size: .92rem;
    color: var(--text); background: #fff;
    transition: border-color .15s;
}
.form-row textarea { resize: vertical; min-height: 90px; font-family: inherit; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.form-actions { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1rem; }

.msg-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: .8rem;
    background: #fafbfc;
}
.msg-item.pinned { border-left: 3px solid var(--primary); background: #f0f6ff; }
.msg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .4rem; }
.msg-title { font-weight: 600; }
.msg-meta { font-size: .78rem; color: var(--muted); }
.msg-text { color: var(--text); font-size: .92rem; white-space: pre-wrap; }
.msg-actions { margin-top: .6rem; display: flex; gap: .5rem; }
.btn-sm { padding: .35rem .75rem; font-size: .83rem; }
.btn-danger { background: #dc2626; color: #fff; border-color: #dc2626; }
.btn-danger:hover { background: #b91c1c; }

.alert {
    padding: .8rem 1rem; border-radius: 8px;
    margin-bottom: 1rem; font-size: .9rem;
}
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

.badge {
    display: inline-block;
    padding: .15rem .55rem;
    font-size: .72rem; font-weight: 600;
    border-radius: 999px;
    background: #e0e7ff; color: #3730a3;
}
.badge--news    { background: #dbeafe; color: #1e40af; }
.badge--update  { background: #d1fae5; color: #065f46; }
.badge--tip     { background: #fef3c7; color: #92400e; }
.badge--howto   { background: #ede9fe; color: #5b21b6; }
.badge--notice  { background: #fce7f3; color: #9d174d; }

/* Login */
.login-shell {
    max-width: 380px; margin: 5rem auto; padding: 0 1.25rem;
}
.login-shell .admin-card h2 { justify-content: center; }
