:root {
    --pig-bg: #0f172a;
    --pig-bg-soft: #111827;
    --pig-panel: #111827;
    --pig-panel-2: #1f2937;
    --pig-line: rgba(255,255,255,0.10);
    --pig-text: #e5e7eb;
    --pig-muted: #94a3b8;
    --pig-primary: #2563eb;
    --pig-primary-soft: rgba(37, 99, 235, 0.16);
    --pig-success: #22c55e;
    --pig-warning: #f59e0b;
    --pig-danger: #ef4444;
    --pig-shadow: 0 10px 30px rgba(0,0,0,0.22);
    --pig-radius: 18px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    background:
        radial-gradient(circle at top, rgba(37, 99, 235, 0.10), transparent 35%),
        var(--pig-bg);
    color: var(--pig-text);
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

a {
    color: #93c5fd;
    text-decoration: none;
}

a:hover {
    color: #bfdbfe;
}

img {
    max-width: 100%;
    height: auto;
}

.pig-wrap {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.main-wrap {
    padding: 20px 0 40px;
}

.pig-header {
    padding: 20px 0 0;
}

.pig-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.pig-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--pig-text);
    font-weight: 800;
    letter-spacing: 0.02em;
}

.pig-brand-mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(180deg, #3b82f6, #1d4ed8);
    color: white;
    font-weight: 900;
}

.pig-header-links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pig-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: linear-gradient(180deg, #2563eb, #1d4ed8);
    color: white;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(0,0,0,0.16);
}

.pig-button.secondary {
    background: rgba(255,255,255,0.05);
    color: var(--pig-text);
}

.pig-button:hover {
    transform: translateY(-1px);
    transition: 0.15s ease;
}

.pig-hero {
    background: linear-gradient(180deg, var(--pig-panel) 0%, var(--pig-panel-2) 100%);
    border: 1px solid var(--pig-line);
    border-radius: 24px;
    padding: 28px;
    box-shadow: var(--pig-shadow);
}

.pig-kicker {
    color: #93c5fd;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pig-title {
    margin: 10px 0 8px;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.1;
}

.pig-copy {
    margin: 0;
    color: var(--pig-muted);
    font-size: 16px;
    max-width: 800px;
}

.container {
    width: 100%;
}

.card,
.box,
.panel,
.section-card {
    background: linear-gradient(180deg, var(--pig-panel) 0%, var(--pig-panel-2) 100%);
    border: 1px solid var(--pig-line);
    border-radius: var(--pig-radius);
    padding: 20px;
    box-shadow: var(--pig-shadow);
}

.card + .card,
.box + .box,
.panel + .panel,
.section-card + .section-card {
    margin-top: 18px;
}

.grid {
    display: grid;
    gap: 18px;
}

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

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hud {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 20px 0;
}

.hud-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--pig-line);
    border-radius: 16px;
    padding: 16px;
}

.hud-card strong {
    display: block;
    font-size: 24px;
    margin-bottom: 6px;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--pig-primary-soft);
    border: 1px solid rgba(59, 130, 246, 0.30);
    color: #bfdbfe;
    font-size: 12px;
    font-weight: 700;
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.actions a,
.actions button,
button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: linear-gradient(180deg, #2563eb, #1d4ed8);
    color: white;
    font-weight: 700;
    cursor: pointer;
}

input,
select,
textarea {
    width: 100%;
    max-width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: var(--pig-text);
}

table {
    width: 100%;
    border-collapse: collapse;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
}

th,
td {
    border-bottom: 1px solid rgba(255,255,255,0.10);
    padding: 12px;
    text-align: left;
    vertical-align: top;
}

th {
    color: #cbd5e1;
    background: rgba(255,255,255,0.03);
}

.topnav,
nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.topnav a,
nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    color: var(--pig-text);
}

.icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    vertical-align: middle;
}

.page-illustration {
    display: block;
    max-width: 100%;
    margin: 0 auto 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.branch-select {
    display: flex;
    align-items: center;
}

.danger { color: #fca5a5; }
.warning { color: #fcd34d; }
.stable { color: #86efac; }
.small { color: var(--pig-muted); }

hr {
    border: 0;
    border-top: 1px solid rgba(255,255,255,0.10);
    margin: 20px 0;
}

@media (max-width: 960px) {
    .grid-2,
    .grid-3,
    .hud {
        grid-template-columns: 1fr;
    }

    .pig-hero {
        padding: 22px;
    }
}

@media (max-width: 640px) {
    .pig-wrap {
        width: min(100% - 24px, 1200px);
    }

    .main-wrap {
        padding: 16px 0 32px;
    }

    .pig-topbar {
        align-items: flex-start;
    }

    .pig-header-links {
        width: 100%;
    }

    .pig-button,
    .pig-button.secondary,
    .topnav a,
    nav a,
    .actions a,
    .actions button,
    button,
    input[type="submit"] {
        width: 100%;
    }

    .card,
    .box,
    .panel,
    .section-card,
    .pig-hero {
        padding: 16px;
        border-radius: 16px;
    }

    th,
    td {
        padding: 10px;
    }
}
