:root {
    --ink: #102027;
    --muted: #667085;
    --line: #e5e7eb;
    --panel: #ffffff;
    --brand: #0f766e;
    --brand-dark: #134e4a;
    --accent: #f59e0b;
    --bg: #f5f7fb;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.admin-nav {
    background: linear-gradient(90deg, #0b1f24, #123b40 54%, #0f766e);
    box-shadow: 0 8px 30px rgba(15, 23, 42, .12);
}

.admin-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 32px auto 56px;
}

.admin-shell h1 {
    margin: 0;
    font-size: clamp(1.75rem, 2.4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: 0;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--brand);
    font-weight: 700;
    text-transform: uppercase;
    font-size: .78rem;
}

.panel,
.metric,
.login-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 16px 45px rgba(15, 23, 42, .08);
}

.panel {
    padding: 22px;
}

.panel h2 {
    font-size: 1.15rem;
    margin: 0 0 16px;
    font-weight: 800;
}

.metric {
    padding: 18px;
    min-height: 112px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.metric span {
    color: var(--muted);
    font-weight: 700;
}

.metric strong {
    font-size: 2.2rem;
    line-height: 1;
}

.btn-primary {
    --bs-btn-bg: var(--brand);
    --bs-btn-border-color: var(--brand);
    --bs-btn-hover-bg: var(--brand-dark);
    --bs-btn-hover-border-color: var(--brand-dark);
}

.login-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: #eef3f8;
}

.login-card {
    width: min(460px, 100%);
    padding: 34px 48px 36px;
    text-align: center;
    border: 0;
    border-radius: 10px;
    box-shadow: 0 28px 70px rgba(15, 23, 42, .14);
}

.login-card h1 {
    margin: 14px 0 6px;
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
}

.login-copy,
.login-help {
    margin: 0 auto;
    color: #334155;
    line-height: 1.2;
}

.login-help {
    margin-top: 26px;
    max-width: 330px;
    font-size: .86rem;
    color: #475569;
}

.login-brand {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: #ecfdf5;
    color: var(--brand-dark);
    font-weight: 800;
    margin-bottom: 18px;
}

.login-google-mark {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 8px;
    border-radius: 50%;
    background: #1a73e8;
    color: #fff;
    font-size: 2.05rem;
    font-weight: 900;
}

.google-login-btn {
    display: grid;
    grid-template-columns: 28px 1fr 38px;
    align-items: center;
    width: min(320px, 100%);
    min-height: 40px;
    margin: 24px auto 0;
    border: 2px solid #1a73e8;
    border-radius: 4px;
    overflow: hidden;
    background: #1a73e8;
    color: #fff;
    text-align: left;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.google-login-btn:hover {
    color: #fff;
    background: #1765cc;
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(26, 115, 232, .24);
}

.google-user-dot {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    margin-left: 8px;
    border-radius: 50%;
    background: #8b5cf6;
    color: #e9d5ff;
    font-size: .75rem;
    font-weight: 800;
}

.google-login-btn strong,
.google-login-btn small {
    display: block;
    line-height: 1.05;
}

.google-login-btn strong {
    font-size: .78rem;
    font-weight: 900;
}

.google-login-btn small {
    margin-top: 2px;
    font-size: .72rem;
    opacity: .9;
}

.google-logo {
    display: grid;
    place-items: center;
    align-self: stretch;
    background: #fff;
    color: #4285f4;
    font-size: 1.28rem;
    font-weight: 900;
}

.login-card form {
    text-align: left;
}

.layout-builder {
    display: grid;
    gap: 16px;
}

.layout-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.layout-canvas {
    position: relative;
    width: min(100%, 960px);
    aspect-ratio: 16 / 9;
    background: #0b1220;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #1f2937;
}

.layout-box {
    position: absolute;
    display: grid;
    place-items: center;
    padding: 12px;
    color: #fff;
    background: rgba(15, 118, 110, .55);
    border: 2px solid rgba(255,255,255,.7);
    font-weight: 800;
    cursor: move;
    resize: both;
    overflow: hidden;
    min-width: 80px;
    min-height: 52px;
}

.layout-box-label {
    position: relative;
    z-index: 2;
    text-align: center;
    text-shadow: 0 1px 6px rgba(0,0,0,.85);
    background: rgba(0,0,0,.38);
    padding: 3px 10px;
    border-radius: 4px;
    pointer-events: none;
}

.layout-box-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: .6;
    pointer-events: none;
    z-index: 1;
}

@media (max-width: 720px) {
    .admin-shell { width: min(100% - 20px, 1180px); margin-top: 20px; }
    .panel { padding: 16px; }
    .login-card { padding: 24px; }
}
