:root {
    --bg: #f3f6fb;
    --panel: #ffffff;
    --panel-soft: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --border: #dbe3ef;
    --accent: #2563eb;
    --accent-strong: #1d4ed8;
    --success: #16a34a;
    --danger: #dc2626;
    --shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Inter, Arial, Helvetica, sans-serif;
    background: radial-gradient(circle at top, #f8fbff 0%, var(--bg) 45%);
    color: var(--text);
}

.container {
    max-width: 1460px;
    margin: 0 auto;
    padding: 24px;
}

h1, h2, h3 { margin-top: 0; }

h1 { font-size: 34px; margin-bottom: 8px; }
h2 { font-size: 22px; margin-bottom: 14px; }

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow);
}

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

.form-grid .full { grid-column: 1 / -1; }

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

input[type="text"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 11px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    transition: border-color .18s ease, box-shadow .18s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

textarea { min-height: 110px; resize: vertical; }

button {
    padding: 11px 16px;
    border: 1px solid var(--accent);
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    transition: all .15s ease;
}

button:hover { background: var(--accent-strong); border-color: var(--accent-strong); }

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    border-bottom: 1px solid #edf2f9;
    padding: 11px 10px;
    text-align: left;
    vertical-align: top;
    font-size: 14px;
}

th {
    background: #f8fbff;
    color: #334155;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .03em;
}

tr:hover td { background: #fbfdff; }

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    font-size: 12px;
    font-weight: 700;
}

a { color: var(--accent); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }

.demo-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 16px;
}

.slot {
    min-height: 120px;
    background: #fff;
    border: 1px dashed #c7d2e4;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
}

.demo-ad {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 12px;
    min-height: 100px;
    padding: 16px;
}

.demo-banner {
    width: 300px;
    min-height: 250px;
    background: linear-gradient(135deg, #3b82f6, #1e3a8a);
    color: #fff;
}

.demo-native {
    width: 100%;
    min-height: 140px;
    background: linear-gradient(135deg, #10b981, #065f46);
    color: #fff;
    flex-direction: column;
}

.notice {
    padding: 12px 14px;
    border-radius: 10px;
    background: #ecfdf3;
    color: #166534;
    border: 1px solid #bbf7d0;
    margin-bottom: 16px;
    font-weight: 600;
}

.check-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 7px 10px;
}

@media (max-width: 1100px) {
    .grid, .demo-layout, .form-grid { grid-template-columns: 1fr; }
}


.badge-ok {
    background: #ecfdf3;
    border: 1px solid #86efac;
    color: #166534;
}

.badge-bad {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}


.notice-toast {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 9999;
    min-width: 280px;
    max-width: 460px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 14px 30px rgba(15,23,42,.18);
    transition: opacity .2s ease, transform .2s ease;
}

.toast-close {
    border: 0;
    background: transparent;
    color: #166534;
    font-size: 20px;
    line-height: 1;
    padding: 0 4px;
    cursor: pointer;
}

.toast-close:hover { color: #14532d; }

/* Vertical layout for selected admin tabs */
.stack-vertical {
  grid-template-columns: 1fr !important;
}
