* {
    box-sizing: border-box;
}

:root {
    --bg: #0f172a;
    --bg2: #111827;
    --panel: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --accent: #2563eb;
    --accent-dark: #1d4ed8;
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #d97706;
    --soft: #f8fafc;
    --shadow: 0 18px 60px rgba(15, 23, 42, .14);
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--soft);
    color: var(--text);
}

a {
    color: inherit;
}

.button,
button.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
}

.button.primary {
    background: var(--accent);
    color: #fff;
}

.button.primary:hover {
    background: var(--accent-dark);
}

.button.ghost {
    background: #fff;
    color: var(--text);
    border-color: var(--line);
}

.button.small {
    min-height: 34px;
    padding: 7px 12px;
    font-size: 13px;
}

.button.full {
    width: 100%;
}

.field {
    margin-bottom: 16px;
}

.field label {
    display: block;
    font-weight: 800;
    margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    font-size: 15px;
    background: #fff;
    color: var(--text);
}

.alert {
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 16px;
    border: 1px solid var(--line);
    background: #fff;
    font-weight: 700;
}

.alert.danger {
    border-color: rgba(220, 38, 38, .25);
    background: #fef2f2;
    color: #991b1b;
}

.alert.success {
    border-color: rgba(22, 163, 74, .25);
    background: #f0fdf4;
    color: #166534;
}

.alert.warning {
    border-color: rgba(217, 119, 6, .25);
    background: #fffbeb;
    color: #92400e;
}

/* Public */
.public-page {
    background: #f8fafc;
}

.public-hero {
    min-height: 72vh;
    background:
        radial-gradient(circle at top left, rgba(37,99,235,.28), transparent 34%),
        linear-gradient(135deg, #020617, #1e293b);
    color: #fff;
    padding: 22px;
}

.public-nav {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.public-nav a {
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 999px;
    padding: 8px 12px;
}

.hero-content {
    max-width: 900px;
    margin: 86px auto 0;
}

.eyebrow {
    display: inline-block;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .12em;
    color: #60a5fa;
    font-weight: 900;
    margin-bottom: 10px;
}

.hero-content h1 {
    font-size: clamp(38px, 7vw, 74px);
    line-height: .96;
    margin: 0 0 20px;
}

.hero-content p {
    max-width: 720px;
    color: #cbd5e1;
    font-size: 19px;
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 26px;
}

.public-main {
    max-width: 1120px;
    margin: -56px auto 60px;
    padding: 0 18px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.feature-grid article {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 22px;
    box-shadow: var(--shadow);
}

/* Login */
.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at top right, rgba(37,99,235,.25), transparent 35%),
        linear-gradient(135deg, #020617, #1e293b);
    padding: 18px;
}

.login-card {
    width: min(430px, 100%);
    background: #fff;
    border-radius: 22px;
    padding: 28px;
    box-shadow: 0 24px 80px rgba(0,0,0,.3);
}

.login-brand {
    text-align: center;
    margin-bottom: 24px;
}

.login-brand .paw {
    font-size: 40px;
}

.login-brand h1 {
    margin: 8px 0 4px;
}

.login-brand p {
    margin: 0;
    color: var(--muted);
}

/* Admin */
.admin-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 270px 1fr;
}

.admin-sidebar {
    background: #020617;
    color: #fff;
    padding: 18px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.admin-logo {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 8px 20px;
    border-bottom: 1px solid rgba(255,255,255,.12);
    margin-bottom: 16px;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.12);
    border-radius: 14px;
}

.admin-logo small {
    display: block;
    color: #94a3b8;
    font-size: 12px;
    margin-top: 2px;
}

.admin-nav {
    display: grid;
    gap: 6px;
}

.admin-nav a {
    display: block;
    color: #cbd5e1;
    text-decoration: none;
    padding: 11px 12px;
    border-radius: 12px;
    font-weight: 800;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: #1d4ed8;
    color: #fff;
}

.admin-main {
    min-width: 0;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    min-height: 76px;
    background: rgba(248,250,252,.94);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 24px;
}

.admin-topbar h1 {
    margin: 0;
    font-size: 24px;
}

.admin-topbar p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.sidebar-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    font-size: 20px;
    cursor: pointer;
}

.admin-content {
    padding: 24px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(15,23,42,.06);
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.stat-card strong {
    display: block;
    font-size: 34px;
    margin-top: 8px;
}

.panel-grid {
    display: grid;
    grid-template-columns: 1.4fr .8fr;
    gap: 18px;
}

.panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(15,23,42,.06);
}

.panel h2 {
    margin: 0 0 10px;
}

.panel p {
    color: var(--muted);
    line-height: 1.5;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.quick-links a {
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 9px 13px;
    font-weight: 800;
    background: var(--soft);
}

.clean-list {
    margin: 0;
    padding-left: 20px;
    line-height: 1.9;
    color: var(--muted);
    font-weight: 700;
}

.module-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
}

.status-pill {
    display: inline-flex;
    white-space: nowrap;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 8px 12px;
    font-weight: 900;
    font-size: 12px;
}

.empty-state {
    border: 1px dashed #94a3b8;
    border-radius: 16px;
    padding: 16px;
    background: #f8fafc;
    margin-top: 18px;
}

.empty-state code {
    display: inline-block;
    margin-top: 8px;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 10px;
    padding: 8px 10px;
}

@media (max-width: 1180px) {
    .dashboard-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .panel-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: fixed;
        left: -285px;
        top: 0;
        bottom: 0;
        z-index: 50;
        width: 270px;
        transition: left .2s ease;
    }

    .admin-sidebar.open {
        left: 0;
    }

    .sidebar-toggle {
        display: inline-grid;
        place-items: center;
        flex: 0 0 auto;
    }

    .admin-topbar {
        padding: 12px 14px;
    }

    .admin-content {
        padding: 14px;
    }

    .dashboard-grid,
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .module-head {
        display: block;
    }

    .status-pill {
        margin-top: 12px;
    }
}
