:root {
    --hoc-green: #00d084;
    --hoc-ink: #090909;
    --hoc-paper: #ffffff;
    --hoc-soft: #f4f6f5;
    --hoc-line: #d9dfdc;
    --hoc-muted: #69736f;
    --hoc-yellow: #ffc107;
    --hoc-red: #ff3b30;
    --hoc-shadow: 0 16px 40px rgba(9, 9, 9, 0.06);
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body.hoc-app {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, #f7faf8 0%, var(--hoc-soft) 100%);
    color: var(--hoc-ink);
    font-family: Poppins, Arial, sans-serif;
}

.hoc-shell {
    width: min(100%, 1200px);
    min-height: 100vh;
    margin: 0 auto;
    background: var(--hoc-paper);
    box-shadow: var(--hoc-shadow);
    position: relative;
}

.hoc-admin-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px;
}

.hoc-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 18px 12px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--hoc-line);
}

.hoc-title {
    margin: 0;
    font-size: clamp(1rem, 2vw, 1.4rem);
    line-height: 1.2;
}

.hoc-subtitle {
    margin-top: 3px;
    color: var(--hoc-muted);
    font-size: 0.78rem;
}

.hoc-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--hoc-green);
    color: #001d11;
    font-weight: 800;
    white-space: nowrap;
}

.hoc-content {
    padding: 16px 16px 110px;
}

.hoc-screen {
    display: none;
}

.hoc-screen.active {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.hoc-card {
    padding: 16px;
    border: 1px solid var(--hoc-line);
    border-radius: 12px;
    background: var(--hoc-paper);
    overflow: hidden;
}

.hoc-card.dark {
    background: var(--hoc-ink);
    color: var(--hoc-paper);
    border-color: var(--hoc-ink);
}

.hoc-card.soft {
    background: var(--hoc-soft);
}

.hoc-card h2,
.hoc-card h3 {
    margin: 0 0 12px;
    font-size: 0.95rem;
    letter-spacing: 0;
}

.hoc-hero-number {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.hoc-hero-number strong {
    display: block;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1;
}

.hoc-hero-number span {
    color: var(--hoc-muted);
    font-size: 0.8rem;
}

.dark .hoc-hero-number span {
    color: rgba(255, 255, 255, 0.72);
}

.hoc-progress {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.12);
}

.dark .hoc-progress {
    background: rgba(255, 255, 255, 0.18);
}

.hoc-progress span {
    display: block;
    height: 100%;
    width: var(--value);
    border-radius: inherit;
    background: var(--hoc-green);
}

.hoc-kicker {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
    align-items: center;
    margin-top: 12px;
}

.hoc-kicker-name {
    font-size: 0.84rem;
}

.hoc-kicker-meta {
    color: var(--hoc-muted);
    font-size: 0.75rem;
}

.dark .hoc-kicker-meta {
    color: rgba(255, 255, 255, 0.68);
}

.hoc-status {
    font-size: 0.78rem;
    font-weight: 700;
}

.hoc-status.good { color: var(--hoc-green); }
.hoc-status.warn { color: var(--hoc-yellow); }
.hoc-status.bad { color: var(--hoc-red); }

.hoc-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.hoc-stat {
    padding: 10px;
    border-radius: 8px;
    background: var(--hoc-soft);
}

.hoc-stat strong {
    display: block;
    font-size: 1.1rem;
}

.hoc-stat span {
    color: var(--hoc-muted);
    font-size: 0.72rem;
}

.hoc-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.hoc-btn {
    min-height: 42px;
    border: 1px solid var(--hoc-ink);
    border-radius: 8px;
    background: var(--hoc-ink);
    color: var(--hoc-paper);
    font-weight: 750;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.hoc-btn:hover {
    transform: translateY(-1px);
}

.hoc-btn.secondary {
    background: var(--hoc-paper);
    color: var(--hoc-ink);
}

.hoc-btn.green {
    border-color: var(--hoc-green);
    background: var(--hoc-green);
    color: #001d11;
}

.hoc-bars {
    display: flex;
    align-items: end;
    gap: 8px;
    height: 96px;
    margin-top: 12px;
}

.hoc-bar {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: end;
    gap: 6px;
    color: var(--hoc-muted);
    font-size: 0.68rem;
    text-align: center;
}

.hoc-bar span {
    display: block;
    height: var(--height);
    border-radius: 6px 6px 2px 2px;
    background: var(--hoc-green);
}

.hoc-list {
    display: grid;
    gap: 10px;
}

.hoc-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--hoc-line);
}

.hoc-row:last-child {
    border-bottom: 0;
}

.hoc-row-title {
    font-weight: 750;
    font-size: 0.88rem;
}

.hoc-row-meta {
    color: var(--hoc-muted);
    font-size: 0.74rem;
}

.hoc-check {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 34px;
}

.hoc-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--hoc-green);
}

.hoc-bottomnav {
    position: fixed;
    left: 50%;
    bottom: 0;
    width: min(100%, 1200px);
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    background: var(--hoc-paper);
    border-top: 1px solid var(--hoc-line);
    box-shadow: 0 -10px 22px rgba(9, 9, 9, 0.04);
}

.hoc-navbtn {
    display: grid;
    place-items: center;
    gap: 3px;
    min-height: 62px;
    border: 0;
    background: transparent;
    color: var(--hoc-muted);
    font-size: 0.68rem;
    cursor: pointer;
}

.hoc-navbtn i {
    font-size: 1rem;
}

.hoc-navbtn.active {
    color: var(--hoc-ink);
    font-weight: 800;
}

.hoc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}

.hoc-table th,
.hoc-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--hoc-line);
    text-align: left;
}

.hoc-table th {
    color: var(--hoc-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
}

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

.admin-summary-card {
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.admin-summary-card:hover,
.admin-summary-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: var(--hoc-shadow);
    border-color: var(--hoc-accent, #16a34a);
    outline: none;
}

.admin-summary-card .hoc-row-meta {
    margin: 12px 0 0;
}

.admin-entity-panel {
    margin: 14px 0;
}

.admin-entity-header {
    align-items: flex-start;
    margin-bottom: 14px;
}

.admin-entity-header h2 {
    margin: 0;
}

.admin-entity-table-wrap {
    overflow-x: auto;
}

.admin-entity-table-wrap .hoc-table {
    min-width: 920px;
}

.hoc-detail-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: auto;
    background: rgba(15, 23, 42, .72);
}

.admin-detail-card {
    width: min(760px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
}

.hoc-admin-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.hoc-admin-detail-grid > div {
    display: grid;
    gap: 3px;
    padding: 10px;
    border: 1px solid var(--hoc-line);
    border-radius: 8px;
}

.hoc-admin-main {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 14px;
}

.hoc-filterbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.hoc-input {
    min-height: 40px;
    width: 100%;
    padding: 0 12px;
    border: 1px solid var(--hoc-line);
    border-radius: 8px;
    background: var(--hoc-paper);
}

@media (min-width: 860px) {
    .hoc-shell {
        box-shadow: var(--hoc-shadow);
    }

    .hoc-content {
        padding: 24px 24px 110px;
    }

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

    .hoc-screen.active > .hoc-card.dark,
    .hoc-screen.active > .hoc-card:first-child {
        grid-column: 1 / -1;
    }

    .hoc-card {
        min-height: 100%;
    }
}

@media (max-width: 760px) {
    .hoc-admin-shell {
        padding: 14px;
    }

    .hoc-admin-grid,
    .hoc-admin-main {
        grid-template-columns: 1fr;
    }

    .hoc-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .hoc-admin-detail-grid {
        grid-template-columns: 1fr;
    }

    .hoc-actions {
        grid-template-columns: 1fr;
    }

    .hoc-bottomnav {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .hoc-content {
        padding-left: 12px;
        padding-right: 12px;
    }

    .hoc-topbar {
        padding-left: 12px;
        padding-right: 12px;
    }

    .hoc-navbtn span {
        font-size: 0.62rem;
    }
}
