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

:root {
    --sidebar-w: 260px;
    --sidebar-bg: #111827;
    --sidebar-hover: #1f2937;
    --sidebar-active: #1d4ed8;
    --sidebar-text: #9ca3af;
    --sidebar-text-active: #f9fafb;
    --group-label: #4b5563;
    --content-bg: #f8fafc;
    --header-bg: #ffffff;
    --border: #e5e7eb;
    --accent: #1d4ed8;
}

html, body {
    height: 100vh;
    overflow: hidden;
}

body {
    display: flex;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--content-bg);
    color: #111827;
}

/* ── Sidebar ── */
.sidebar {
    width: var(--sidebar-w);
    min-height: 100vh;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    align-self: flex-start;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 16px;
    font-size: 14px;
    font-weight: 700;
    color: #f9fafb;
    border-bottom: 1px solid #1f2937;
    letter-spacing: 0.02em;
}

nav {
    padding: 12px 0;
}

.nav-group {
    margin-bottom: 4px;
}

.nav-group-label {
    display: block;
    padding: 10px 16px 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--group-label);
}

.nav-group ul {
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 9px 16px 9px 24px;
    font-size: 14px;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    border-radius: 0;
    position: relative;
}

.nav-link::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--group-label);
    margin-right: 10px;
    flex-shrink: 0;
    transition: background 0.15s;
}

.nav-link:hover {
    background: var(--sidebar-hover);
    color: #e5e7eb;
}

.nav-link:hover::before {
    background: #6b7280;
}

.nav-link.active {
    color: var(--sidebar-text-active);
    background: var(--sidebar-active);
}

.nav-link.active::before {
    background: #93c5fd;
}

/* ── Main content ── */
.content {
    flex: 1;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.page-header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
    padding: 18px 32px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-header h1 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.page-badge {
    background: #eff6ff;
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid #bfdbfe;
}

.banner-area {
    flex: 1;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-y: auto;
}

/* ── Banner slot placeholder ── */
.banner-slot {
    background: #fff;
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.banner-slot-label {
    font-size: 15px;
    font-weight: 800;
    color: #111827;
    line-height: 1.6;
}

.banner-unit {
    display: block;
    font-size: 11px;
    font-family: monospace;
    font-weight: 400;
    color: #6b7280;
    line-height: 1.4;
}

.banner-slot-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 90px;
}

.banner-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.banner-row .banner-slot {
    flex: 1 1 auto;
}

.banner-slot.skin .banner-slot-inner {
    min-height: 32px;
    font-size: 12px;
    color: #9ca3af;
    font-style: italic;
}

/* ── Banner grid (mobile pages) ── */
.banner-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.banner-grid .banner-slot {
    width: 352px; /* 320px banner + 2×16px padding */
    flex-shrink: 0;
}

.banner-grid .banner-slot-inner {
    width: 320px;
    height: 250px;
    align-self: center;
}

.banner-grid--300x600 .banner-slot {
    width: 332px; /* 300px banner + 2×16px padding */
}

.banner-grid--300x600 .banner-slot-inner {
    width: 300px;
    height: 600px;
}
