:root {
    --bg: #0f172a;
    --panel: #111827;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e5e7eb;
    --primary: #16a34a;
    --primary-dark: #15803d;
    --soft: #f8fafc;
    --danger: #b91c1c;
    --warning: #92400e;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}
* { box-sizing: border-box; }
body {
    margin: 0;
    background: linear-gradient(180deg, #e2e8f0 0%, #f8fafc 100%);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}
.container {
    width: min(1180px, calc(100% - 24px));
    margin: 20px auto;
}
.topnav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 16px;
    background: var(--panel);
    border-radius: 16px;
    margin-bottom: 18px;
}
.topnav a {
    color: white;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255,255,255,0.08);
}
.topnav a:hover { background: rgba(255,255,255,0.16); }
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow);
    padding: 22px;
}
.card + .card { margin-top: 18px; }
.hero {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 18px;
    align-items: stretch;
}
.hero-side {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    border-radius: 22px;
    padding: 20px;
    min-height: 100%;
}
.hero-side img, .preview-image {
    width: 100%;
    border-radius: 18px;
    background: white;
    border: 1px solid rgba(255,255,255,0.08);
    display: block;
}
.badge {
    display: inline-flex;
    padding: 8px 12px;
    background: #dcfce7;
    color: #166534;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
}
h1, h2, h3 { margin: 0 0 12px; }
p { margin: 0 0 12px; color: #334155; line-height: 1.5; }
.hero-side p, .hero-side .copybox, .hero-side .muted { color: #e2e8f0; }
.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #334155;
}
input, select, textarea, button {
    width: 100%;
    border-radius: 14px;
    border: 1px solid #cbd5e1;
    padding: 13px 14px;
    font-size: 15px;
    background: white;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus {
    outline: 2px solid rgba(22, 163, 74, 0.18);
    border-color: var(--primary);
}
button, .btn {
    background: var(--primary);
    color: white;
    font-weight: 700;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 13px 16px;
    border-radius: 14px;
}
button:hover, .btn:hover { background: var(--primary-dark); }
.btn-secondary { background: #0f172a; }
.btn-secondary:hover { background: #020617; }
.btn-light {
    background: white;
    color: #0f172a;
    border: 1px solid #cbd5e1;
}
.btn-light:hover { background: #f8fafc; }
.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}
.stat {
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 16px;
    box-shadow: var(--shadow);
}
.stat small {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
}
.stat strong { font-size: 30px; }
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 18px;
    overflow: hidden;
}
th, td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
    font-size: 14px;
}
th { background: #f8fafc; color: #334155; }
.muted { color: var(--muted); }
.flash {
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 16px;
    font-weight: 700;
}
.flash.success { background: #dcfce7; color: #166534; }
.flash.error { background: #fee2e2; color: #991b1b; }
.flash.warning { background: #fef3c7; color: #92400e; }
.kicker {
    font-size: 13px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 8px;
}
.footer-note {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    margin-top: 14px;
}
.status {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.status.active { background: #dcfce7; color: #166534; }
.status.inactive { background: #fee2e2; color: #991b1b; }
.inline-form { display: inline; }
.small { font-size: 13px; }
.copybox {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    padding: 10px 12px;
    word-break: break-all;
    font-family: Consolas, monospace;
    font-size: 13px;
}
.campaign-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.campaign-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.campaign-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}
.campaign-card .content { padding: 18px; }
.note-box {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    padding: 14px;
}
@media (max-width: 980px) {
    .campaign-grid, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
    .hero, .grid, .grid-3, .grid-4, .campaign-grid {
        grid-template-columns: 1fr;
    }
    .container {
        width: min(100% - 16px, 1180px);
    }
}
