body {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #e6e8e6;
    margin: 0;
    padding: 0;
    color: #191919;
}

.container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.site-title {
    display: inline-block;
    font-size: 48px;
    font-weight: 800;
    color: #191919;
    text-decoration: none;
    margin-bottom: 0;
}

.site-title:hover {
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 4px;
}

.header-nav {
    display: flex;
    gap: 12px;
}

.nav-link {
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    background: #191919;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: background 0.2s ease;
}

.nav-link:hover {
    background: #333;
}

@media (max-width: 640px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .header-nav {
        width: 100%;
        gap: 8px;
    }

    .nav-link {
        flex: 1;
        text-align: center;
    }

    .site-title {
        font-size: 36px;
    }
}

h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 5px;
    color: #191919;
}

.subtitle {
    color: #555;
    margin-bottom: 25px;
    font-size: 16px;
}

h2 { 
    font-size: 28px; 
    font-weight: 700; 
    margin-bottom: 12px; 
}

.card {
    background: #ffffff;
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 4px 12px rgba(25, 25, 25, 0.08);
    border: 1px solid #ced0ce;
    margin-bottom: 25px;
}

.card h2 { 
    font-size: 26px; 
} 

.subtitle { 
    font-size: 18px; 
} 

.summary-card .value { 
    font-size: 32px; 
}

.input-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.input-row input[type="text"] {
    flex: 1 1 260px;
    padding: 14px 16px;
    border-radius: 10px;
    border: 2px solid #ced0ce;
    font-size: 15px;
    background: #ffffff;
    transition: border 0.2s ease;
}

.input-row input[type="text"]:focus {
    border-color: #f15025;
    outline: none;
}

.input-row button {
    padding: 14px 22px;
    border-radius: 10px;
    border: none;
    background: #f15025;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
    font-size: 15px;
    transition: background 0.2s ease, transform 0.1s ease;
}

.input-row button:hover {
    background: #d9481f;
}

.input-row button:active {
    transform: scale(0.97);
}

.input-row button:disabled {
    background: #ced0ce;
    cursor: default;
}

.status {
    margin-top: 12px;
    font-size: 14px;
    color: #555;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
}

.summary-card {
    padding: 16px;
    border-radius: 12px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
}

.summary-card .label {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 4px;
}

.summary-card .value {
    font-size: 26px;
    font-weight: 800;
}

.summary-total {
    background: #191919;
}

.summary-very-stale {
    background: #ef4444;
}

.summary-stale {
    background: #f15025;
}

.summary-ok {
    background: #3b82f6;
}

.summary-fresh {
    background: #22c55e;
}

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

th, td {
    padding: 10px 8px;
    border-bottom: 1px solid #ced0ce;
    text-align: left;
    vertical-align: top;
}

th {
    background: #f7f7f7;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #555;
}

tr:hover td {
    background: #f0f0f0;
}

@media (max-width: 768px) {
    table {
        border-collapse: separate;
        border-spacing: 0 12px;
        margin-top: 0;
    }

    thead {
        display: none;
    }

    tbody tr {
        display: flex;
        flex-direction: column;
        background: #f7f7f7;
        border-radius: 12px;
        padding: 14px;
        margin-bottom: 12px;
        border: 1px solid #ced0ce;
    }

    td {
        display: flex;
        flex-direction: column;
        padding: 8px 0;
        border: none;
        border-bottom: none !important;
    }

    td::before {
        content: attr(data-label);
        font-weight: 700;
        font-size: 12px;
        text-transform: uppercase;
        color: #555;
        letter-spacing: 0.04em;
        margin-bottom: 4px;
        display: block;
    }

    tr:hover td {
        background: transparent;
    }
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
}

.badge-red {
    background: #ef4444;
}

.badge-orange {
    background: #f15025;
}

.badge-blue {
    background: #3b82f6;
}

.badge-green {
    background: #22c55e;
}

.small {
    font-size: 13px;
    color: #6b7280;
}

a.page-link {
    color: #f15025;
    text-decoration: none;
    font-weight: 600;
    word-break: break-all;
}

a.page-link:hover {
    text-decoration: underline;
}

.error {
    color: #b91c1c;
}

.muted {
    color: #6b7280;
}

.export-controls {
    margin-bottom: 12px;
}

.export-btn {
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    font-weight: 700;
    cursor: pointer;
}

.export-btn.csv {
    background: #191919;
    margin-right: 8px;
}

.export-btn.json {
    background: #3b82f6;
}


