:root {
    color-scheme: dark;
    --bg: #090c12;
    --panel: rgba(18, 24, 35, 0.9);
    --panel-strong: #121a27;
    --line: rgba(255, 255, 255, 0.09);
    --text: #edf3ff;
    --muted: #8d9bb1;
    --accent: #4f8cff;
    --accent-soft: rgba(79, 140, 255, 0.15);
    --success: #37d67a;
    --warning: #ffbd59;
    --danger: #ff647c;
    --radius: 18px;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 10% 0%, rgba(79, 140, 255, 0.16), transparent 32rem),
        radial-gradient(circle at 95% 5%, rgba(55, 214, 122, 0.09), transparent 28rem),
        linear-gradient(180deg, #0c111b 0%, #080b11 100%);
}

button,
input,
select {
    font: inherit;
}

.shell {
    width: min(1480px, calc(100% - 40px));
    margin: 0 auto;
    padding: 34px 0 56px;
}

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

.eyebrow {
    margin: 0 0 9px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.subtitle {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: 160ms ease;
}

.button:hover:not(:disabled) {
    border-color: rgba(79, 140, 255, 0.6);
    background: rgba(79, 140, 255, 0.12);
    transform: translateY(-1px);
}

.button:disabled {
    opacity: 0.5;
    cursor: wait;
}

.button.primary {
    border-color: transparent;
    background: linear-gradient(135deg, #4f8cff, #3067dc);
    box-shadow: 0 10px 30px rgba(79, 140, 255, 0.25);
}

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

.overview {
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
    margin-bottom: 18px;
}

.public-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 18px;
}

.admin-lower {
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
    margin-bottom: 18px;
}

.admin-layout {
    display: grid;
    grid-template-columns: 238px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.admin-sidebar {
    position: sticky;
    top: 20px;
    display: flex;
    min-height: calc(100vh - 40px);
    flex-direction: column;
    padding: 20px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.sidebar-brand {
    padding: 4px 6px 18px;
    border-bottom: 1px solid var(--line);
}

.sidebar-brand h1 {
    margin: 0 0 10px;
    font-size: 25px;
}

.sidebar-status {
    display: block;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.sidebar-nav {
    display: grid;
    gap: 6px;
    margin: 20px 0;
}

.sidebar-link {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 11px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: 150ms ease;
}

.sidebar-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.035);
}

.sidebar-link.active {
    color: #cfe0ff;
    border-color: rgba(79, 140, 255, 0.28);
    background: var(--accent-soft);
}

.sidebar-external {
    padding: 12px 14px;
    border: 1px dashed rgba(79, 140, 255, 0.25);
    border-radius: 11px;
    color: #a9c6ff;
    font-size: 13px;
    text-decoration: none;
}

.sidebar-external:hover {
    background: rgba(79, 140, 255, 0.08);
}

.sidebar-footer {
    display: grid;
    gap: 9px;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.sidebar-footer .button {
    width: 100%;
}

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

.admin-topbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin: 4px 0 22px;
}

.admin-topbar h1 {
    margin: 0;
    font-size: clamp(27px, 3vw, 38px);
}

.admin-topbar .subtitle {
    margin-top: 8px;
}

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

.access-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 22px;
}

.access-metrics .metric strong {
    font-size: 21px;
}

.subsection-title {
    margin: 0 0 12px;
    font-size: 14px;
}

.compact-table th,
.compact-table td {
    padding: 11px 14px;
}

.control-panel {
    padding: 24px;
}

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

.password-panel {
    max-width: 640px;
}

.endpoint-button {
    width: 100%;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.endpoint-button:hover {
    border-color: rgba(79, 140, 255, 0.45);
    background: rgba(79, 140, 255, 0.08);
}

.date-toolbar {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.date-input {
    width: 170px;
    flex: 0 0 170px;
}

.analytics-heading {
    align-items: flex-start;
}

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

.analytics-metrics .metric strong {
    font-size: 20px;
}

.range-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
    flex-wrap: wrap;
}

.range-tabs button {
    padding: 7px 11px;
    border: 0;
    border-radius: 8px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    font-size: 12px;
}

.range-tabs button:hover {
    color: var(--text);
}

.range-tabs button.active {
    color: #d7e5ff;
    background: var(--accent-soft);
}

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

.chart-card {
    min-width: 0;
    padding: 15px 15px 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.018);
}

.chart-card h3 {
    margin: 0 0 8px;
    font-size: 13px;
}

.trend-chart {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.analytics-lower {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 22px;
}

.control-form {
    display: grid;
    gap: 12px;
}

.control-divider {
    height: 1px;
    margin: 22px 0;
    background: var(--line);
}

.rule-list {
    display: grid;
    gap: 8px;
    max-height: 210px;
    margin-top: 16px;
    overflow: auto;
}

.rule-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
    font-family: "Cascadia Code", Consolas, monospace;
    font-size: 12px;
}

.rule-remove {
    padding: 4px 8px;
    border: 0;
    border-radius: 7px;
    color: var(--danger);
    background: rgba(255, 100, 124, 0.1);
    cursor: pointer;
}

.row-actions {
    display: inline-flex;
    gap: 6px;
}

.password-hint {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
}

.logs-panel {
    margin-bottom: 18px;
}

.logs-heading {
    padding: 20px 22px 16px;
    margin-bottom: 0;
}

.logs-heading h2 {
    margin-bottom: 4px;
}

.logs-heading .muted {
    font-size: 12px;
}

.status-code {
    font-family: "Cascadia Code", Consolas, monospace;
    font-size: 12px;
    font-weight: 700;
}

.status-code.bad {
    color: var(--danger);
}

.log-path {
    max-width: 460px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: "Cascadia Code", Consolas, monospace;
    font-size: 12px;
}

.public-metrics .metric strong {
    font-size: 24px;
}

.public-metrics .stat-time {
    font-size: 16px;
    letter-spacing: 0;
}

.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.status-panel {
    padding: 24px;
}

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

.panel-heading h2 {
    margin: 0;
    font-size: 17px;
    letter-spacing: -0.02em;
}

.muted {
    color: var(--muted);
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--muted);
    box-shadow: 0 0 0 4px rgba(141, 155, 177, 0.12);
}

.pill.success {
    color: var(--success);
    border-color: rgba(55, 214, 122, 0.28);
    background: rgba(55, 214, 122, 0.09);
}

.pill.success .dot {
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(55, 214, 122, 0.14);
}

.pill.running {
    color: var(--warning);
    border-color: rgba(255, 189, 89, 0.28);
    background: rgba(255, 189, 89, 0.09);
}

.pill.running .dot {
    background: var(--warning);
    box-shadow: 0 0 0 4px rgba(255, 189, 89, 0.14);
    animation: pulse 1.3s infinite;
}

.pill.failed {
    color: var(--danger);
    border-color: rgba(255, 100, 124, 0.28);
    background: rgba(255, 100, 124, 0.09);
}

.pill.failed .dot {
    background: var(--danger);
    box-shadow: 0 0 0 4px rgba(255, 100, 124, 0.14);
}

@keyframes pulse {
    50% {
        opacity: 0.45;
    }
}

.status-times {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.time-card {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.025);
}

.time-card span,
.metric span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
}

.time-card strong {
    font-size: 14px;
    font-weight: 650;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.metric {
    padding: 14px;
    border-radius: 13px;
    background: var(--panel-strong);
}

.metric strong {
    font-size: 22px;
    letter-spacing: -0.04em;
}

.metric.danger strong {
    color: var(--danger);
}

.metric.success strong {
    color: var(--success);
}

.message {
    margin: 16px 0 0;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.025);
    line-height: 1.55;
    word-break: break-word;
}

.metric-note {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.side-panel {
    padding: 24px;
}

.endpoint-list {
    display: grid;
    gap: 12px;
}

.endpoint {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.025);
}

.endpoint code {
    display: block;
    margin-bottom: 6px;
    color: #b9d0ff;
    font-family: "Cascadia Code", Consolas, monospace;
    font-size: 12px;
    word-break: break-all;
}

.endpoint span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.files-panel {
    overflow: hidden;
}

.files-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--line);
}

.files-title {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.files-title h2 {
    margin: 0;
    font-size: 19px;
}

.files-title span {
    color: var(--muted);
    font-size: 13px;
}

.filters {
    display: flex;
    gap: 10px;
    width: min(620px, 100%);
}

.input,
.select {
    width: 100%;
    min-height: 42px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 11px;
    outline: none;
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.input:focus,
.select:focus {
    border-color: rgba(79, 140, 255, 0.65);
    box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.12);
}

.select {
    width: 170px;
    flex: 0 0 170px;
}

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

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    white-space: nowrap;
}

th {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

tbody tr {
    transition: background 140ms ease;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.028);
}

td.path {
    max-width: 620px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: "Cascadia Code", Consolas, monospace;
    font-size: 13px;
}

.type-badge {
    display: inline-flex;
    min-width: 56px;
    justify-content: center;
    padding: 5px 9px;
    border-radius: 8px;
    color: #b9d0ff;
    background: var(--accent-soft);
    font-size: 12px;
    font-weight: 700;
}

.download {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}

.download:hover {
    text-decoration: underline;
}

.empty {
    padding: 72px 20px;
    text-align: center;
    color: var(--muted);
}

.footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 2px 0;
    color: var(--muted);
    font-size: 12px;
}

.footer a {
    color: var(--accent);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    max-width: min(420px, calc(100vw - 44px));
    padding: 13px 16px;
    border: 1px solid rgba(79, 140, 255, 0.35);
    border-radius: 12px;
    color: var(--text);
    background: #15213a;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: 180ms ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.login-shell {
    display: grid;
    min-height: 78vh;
    place-items: center;
}

.login-card {
    display: grid;
    width: min(440px, 100%);
    gap: 16px;
    padding: 30px;
}

.login-card h1 {
    margin: 0;
    font-size: 32px;
}

.login-card .subtitle {
    margin-top: 0;
    font-size: 14px;
}

.login-card .button {
    width: 100%;
}

.field {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.login-error {
    min-height: 20px;
    margin: 0;
    color: var(--danger);
    font-size: 13px;
}

.subtle-link {
    color: var(--muted);
    font-size: 13px;
    text-align: center;
    text-decoration: none;
}

.subtle-link:hover {
    color: var(--text);
}

.public-shell {
    width: min(1440px, calc(100% - 40px));
    margin: 0 auto;
    padding: 24px 0 42px;
}

.public-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.public-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(79, 140, 255, 0.3);
    border-radius: 13px;
    background: linear-gradient(135deg, rgba(79, 140, 255, 0.24), rgba(55, 214, 122, 0.08));
}

.brand-mark svg {
    width: 22px;
    height: 22px;
    fill: #8db5ff;
}

.public-brand strong,
.public-brand small {
    display: block;
}

.public-brand strong {
    font-size: 15px;
    letter-spacing: -0.02em;
}

.public-brand small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.public-nav-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav-text-link {
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
}

.nav-text-link:hover {
    color: var(--text);
}

.public-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.55fr);
    gap: 30px;
    padding: 38px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 26px;
    background:
        radial-gradient(circle at 8% 0%, rgba(79, 140, 255, 0.3), transparent 26rem),
        radial-gradient(circle at 90% 100%, rgba(55, 214, 122, 0.08), transparent 22rem),
        linear-gradient(135deg, #111c31 0%, #0e1627 52%, #0b111b 100%);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.public-hero-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
}

.public-hero h1 {
    margin: 0;
    font-size: clamp(38px, 5.4vw, 64px);
    line-height: 1;
    letter-spacing: -0.055em;
}

.public-intro {
    max-width: 700px;
    margin: 17px 0 24px;
    color: #a2b1c8;
    font-size: 14px;
    line-height: 1.75;
}

.hero-search {
    position: relative;
    display: block;
    max-width: 650px;
}

.hero-search input {
    width: 100%;
    height: 52px;
    padding: 0 18px 0 48px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    outline: none;
    color: var(--text);
    background: rgba(5, 10, 18, 0.62);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
    transition: 150ms ease;
}

.hero-search input::placeholder {
    color: #7989a1;
}

.hero-search input:focus {
    border-color: rgba(79, 140, 255, 0.7);
    box-shadow: 0 0 0 4px rgba(79, 140, 255, 0.12);
}

.search-icon {
    position: absolute;
    top: 50%;
    left: 17px;
    width: 19px;
    height: 19px;
    transform: translateY(-50%);
    pointer-events: none;
}

.search-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: #7f95b8;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.public-stats {
    display: grid;
    align-content: center;
    gap: 10px;
}

.public-stat {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 4px 14px;
    padding: 15px 17px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    background: rgba(4, 9, 17, 0.34);
    backdrop-filter: blur(12px);
}

.public-stat span {
    color: #8fa2be;
    font-size: 12px;
}

.public-stat strong {
    grid-row: span 2;
    font-size: 26px;
    letter-spacing: -0.04em;
}

.public-stat small {
    color: #66778f;
    font-size: 10px;
}

.public-stat-date {
    font-size: 15px !important;
    letter-spacing: 0 !important;
}

.public-layout {
    display: grid;
    grid-template-columns: 252px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    margin-top: 20px;
}

.public-sidebar {
    position: sticky;
    top: 20px;
}

.category-panel {
    padding: 18px;
}

.category-heading {
    margin-bottom: 15px;
}

.category-heading h2 {
    margin: 0 0 4px;
    font-size: 16px;
}

.category-heading span {
    color: var(--muted);
    font-size: 11px;
}

.category-list {
    display: grid;
    gap: 6px;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 10px 11px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #a4b0c4;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    text-align: left;
    transition: 150ms ease;
}

.category-item:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.035);
}

.category-item.active {
    color: #dce9ff;
    border-color: rgba(79, 140, 255, 0.3);
    background: rgba(79, 140, 255, 0.11);
}

.category-main {
    display: flex;
    align-items: center;
    gap: 9px;
}

.category-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #b2bfd2;
}

.category-dot.system {
    background: #63d7b1;
}

.category-dot.ets2 {
    background: #5b93ff;
}

.category-dot.ats {
    background: #c487ff;
}

.category-count {
    min-width: 27px;
    padding: 3px 7px;
    border-radius: 999px;
    color: #8ca2c0;
    background: rgba(255, 255, 255, 0.055);
    font-size: 11px;
    text-align: center;
}

.download-tip {
    margin-top: 20px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.022);
}

.download-tip strong {
    color: #cbd8eb;
    font-size: 12px;
}

.download-tip p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
}

.public-files {
    overflow: hidden;
}

.public-files-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--line);
}

.public-files-head h2 {
    margin: 2px 0 5px;
    font-size: 21px;
    letter-spacing: -0.03em;
}

.public-files-head .muted {
    font-size: 12px;
}

.list-state {
    flex-shrink: 0;
    padding: 6px 10px;
    border: 1px solid rgba(79, 140, 255, 0.24);
    border-radius: 999px;
    color: #a9c7ff;
    background: rgba(79, 140, 255, 0.08);
    font-size: 11px;
}

.public-file-list {
    display: grid;
}

.public-file-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 128px 92px;
    align-items: center;
    gap: 18px;
    padding: 14px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
    transition: background 140ms ease;
}

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

.public-file-row:hover {
    background: rgba(255, 255, 255, 0.027);
}

.public-file-main {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.file-type-pill {
    display: inline-flex;
    min-width: 45px;
    justify-content: center;
    padding: 5px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 800;
}

.file-type-pill.system {
    color: #75e4bd;
    background: rgba(55, 214, 122, 0.12);
}

.file-type-pill.ets2 {
    color: #9ebdff;
    background: rgba(79, 140, 255, 0.14);
}

.file-type-pill.ats {
    color: #d4acff;
    background: rgba(196, 135, 255, 0.12);
}

.file-type-pill.unknown {
    color: #b1bed0;
    background: rgba(255, 255, 255, 0.06);
}

.public-file-copy {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.public-file-copy strong {
    overflow: hidden;
    color: #e0e9f8;
    font-size: 13px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.public-file-copy span {
    overflow: hidden;
    color: #71839d;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.public-file-meta {
    display: grid;
    gap: 4px;
    color: #8ea0b8;
    font-size: 11px;
    text-align: right;
}

.public-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    border: 1px solid rgba(79, 140, 255, 0.28);
    border-radius: 10px;
    color: #bdd5ff;
    background: rgba(79, 140, 255, 0.08);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.public-download:hover {
    color: white;
    background: #3d75e7;
}

.public-empty {
    display: grid;
    min-height: 260px;
    place-content: center;
    gap: 9px;
    padding: 24px;
    color: var(--muted);
    text-align: center;
}

.public-empty strong {
    color: #d6e1f1;
    font-size: 15px;
}

.empty-icon {
    color: #7790b4;
    font-size: 34px;
}

.empty-spinner {
    width: 24px;
    height: 24px;
    margin: 0 auto 4px;
    border: 2px solid rgba(79, 140, 255, 0.18);
    border-top-color: #4f8cff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.public-footer {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 3px 0;
    color: var(--muted);
    font-size: 11px;
}

.public-footer a {
    color: #8eb7ff;
    text-decoration: none;
}

@media (max-width: 1080px) {
    .overview {
        grid-template-columns: 1fr;
    }

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

    .admin-layout {
        grid-template-columns: 200px minmax(0, 1fr);
    }

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

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

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

    .public-hero {
        grid-template-columns: 1fr;
    }

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

    .public-layout {
        grid-template-columns: 220px minmax(0, 1fr);
    }
}

@media (max-width: 760px) {
    .shell {
        width: min(100% - 24px, 1480px);
        padding-top: 22px;
    }

    .hero,
    .files-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-actions {
        justify-content: flex-start;
    }

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

    .admin-sidebar {
        position: static;
        min-height: auto;
    }

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

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

    .admin-topbar {
        align-items: stretch;
        flex-direction: column;
    }

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

    .status-times {
        grid-template-columns: 1fr;
    }

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

    .public-metrics {
        grid-template-columns: 1fr;
    }

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

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

    .chart-grid,
    .analytics-lower {
        grid-template-columns: 1fr;
    }

    .public-shell {
        width: min(100% - 24px, 1440px);
        padding-top: 16px;
    }

    .public-nav {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .public-hero {
        padding: 24px;
    }

    .public-intro {
        font-size: 13px;
    }

    .public-stats {
        grid-template-columns: 1fr;
    }

    .public-layout {
        grid-template-columns: 1fr;
    }

    .public-sidebar {
        position: static;
    }

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

    .public-files-head {
        align-items: flex-start;
    }

    .public-file-row {
        grid-template-columns: minmax(0, 1fr) 82px;
        gap: 9px 12px;
        padding: 14px 16px;
    }

    .public-file-meta {
        grid-column: 1;
        grid-row: 2;
        display: flex;
        gap: 10px;
        text-align: left;
    }

    .public-download {
        grid-column: 2;
        grid-row: 1 / span 2;
    }

    .public-footer {
        flex-direction: column;
    }

    .filters {
        flex-direction: column;
    }

    .select {
        width: 100%;
        flex-basis: auto;
    }

    .footer {
        flex-direction: column;
    }
}
