:root {
    --bg: #0f172a;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --danger: #dc2626;
    --border: #e2e8f0;
    --soft: #eff6ff;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top left, #1e3a8a, #0f172a 45%, #020617 100%);
    color: var(--text);
    min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; }
.page {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0;
}
.narrow { width: min(860px, calc(100% - 32px)); }
.hero, .topbar {
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}
.hero h1 {
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1;
    margin: 8px 0 12px;
    letter-spacing: -0.06em;
}
.subtitle {
    margin: 0;
    max-width: 620px;
    color: #cbd5e1;
    font-size: 18px;
}
.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
    font-weight: 700;
    font-size: 13px;
    margin: 0;
}
.hero .badge { color: #bfdbfe; background: rgba(255,255,255,0.12); }
.admin-link, .brand {
    color: white;
    border: 1px solid rgba(255,255,255,0.25);
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 700;
}
.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}
.card {
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 24px 80px rgba(2, 6, 23, 0.22);
    margin-bottom: 20px;
}
.card h1, .card h2 { margin-top: 0; letter-spacing: -0.03em; }
.form { display: grid; gap: 12px; }
label { font-weight: 700; font-size: 14px; }
input, textarea, select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 13px 14px;
    font: inherit;
    outline: none;
    background: white;
}
textarea { resize: vertical; }
small, .muted { color: var(--muted); }
button, .button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border: 0;
    border-radius: 14px;
    padding: 13px 18px;
    background: var(--primary);
    color: white;
    font-weight: 800;
    cursor: pointer;
    font: inherit;
}
button:hover, .button:hover { background: var(--primary-dark); color: white; }
.secondary { background: #e0f2fe; color: #075985; }
.secondary:hover { background: #bae6fd; color: #075985; }
.alert {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    padding: 12px 14px;
    border-radius: 14px;
    margin-bottom: 16px;
}
.success-card { border-color: #bfdbfe; }
.copy-row { display: flex; gap: 10px; }
.copy-row input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.share-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}
.text-preview {
    white-space: normal;
    background: #f8fafc;
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: 18px;
    line-height: 1.75;
}
.image-preview {
    width: 100%;
    max-height: 75vh;
    object-fit: contain;
    background: #f8fafc;
    border-radius: 18px;
    border: 1px solid var(--border);
}
.pdf-preview {
    width: 100%;
    min-height: 72vh;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #f8fafc;
}
.actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.center { text-align: center; }
.login-card { max-width: 460px; margin: 40px auto; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 10px; border-bottom: 1px solid var(--border); }
th { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.danger { color: var(--danger); font-weight: 800; }
@media (max-width: 760px) {
    .grid { grid-template-columns: 1fr; }
    .hero, .topbar, .share-head { align-items: stretch; flex-direction: column; }
    .copy-row { flex-direction: column; }
    .page { width: min(100% - 20px, 1120px); padding: 18px 0; }
    .card { padding: 18px; border-radius: 18px; }
}

.top-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .mini-grid { grid-template-columns: 1fr; } .top-actions { flex-direction: column; } }
