* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
    background: #f5f5f7;
    color: #1d1d1f;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: #ffffff;
    border-right: 1px solid #e5e5ea;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    padding: 8px 12px 20px;
    border-bottom: 1px solid #f0f0f5;
    margin-bottom: 12px;
    color: #111;
    text-decoration: none;
}

.brand-dot {
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

.nav-section {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #8e8e93;
    margin: 14px 12px 6px;
    font-weight: 600;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-list li a {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    color: #48484a;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
    margin-bottom: 2px;
}

.nav-list li a:hover {
    background: #f2f2f7;
    color: #111;
}

.nav-list li a.active {
    background: #111827;
    color: #ffffff;
}

.content {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    width: min(920px, 100%);
}

.card {
    background: #ffffff;
    border: 1px solid #e5e5ea;
    border-radius: 16px;
    padding: 36px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    margin-bottom: 24px;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

h1 {
    margin: 0 0 8px;
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

p.subtitle {
    margin: 0;
    color: #636366;
    font-size: 16px;
    line-height: 1.5;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #065f46;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #a7f3d0;
}

.status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.stat-box {
    background: #fafafa;
    border: 1px solid #ececf0;
    border-radius: 12px;
    padding: 20px;
}

.stat-label {
    font-size: 13px;
    color: #6e6e73;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    color: #111;
}

.stat-meta {
    font-size: 12px;
    color: #10b981;
    margin-top: 6px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 14px;
}

th, td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid #efeff4;
}

th {
    color: #6e6e73;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    background: #f2f2f7;
    color: #3a3a3c;
}

.badge.ok {
    background: #ecfdf5;
    color: #047857;
}

.footer {
    margin-top: 24px;
    display: flex;
    justify-content: space-between;
    color: #8e8e93;
    font-size: 13px;
    padding: 0 8px;
}

.pager {
    display: flex;
    justify-content: space-between;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #efeff4;
}

.btn {
    display: inline-block;
    padding: 9px 16px;
    border-radius: 10px;
    border: 1px solid #d1d1d6;
    background: #fff;
    color: #1d1d1f;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.btn:hover {
    background: #f5f5f7;
    border-color: #aeaeb2;
}

@media (max-width: 820px) {
    .layout {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid #e5e5ea;
    }
    .content {
        padding: 20px;
    }
}
