* { box-sizing: border-box; }
body {
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    max-width: 760px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    line-height: 1.65;
    color: #1a1a1a;
    background: #fafafa;
}
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 2px solid #e5e5e5;
    margin-bottom: 2rem;
}
header a { color: #333; text-decoration: none; margin-left: 1rem; }
header a:hover { color: #0066cc; }
header strong { font-size: 1.2rem; }
main { min-height: 60vh; }
h1 { color: #111; margin-top: 0; }
h2 { margin-bottom: 0.25rem; }
h2 a { color: #0066cc; text-decoration: none; }
h2 a:hover { text-decoration: underline; }
.meta { color: #888; font-size: 0.9rem; margin: 0 0 0.75rem; }
.post-item { padding: 1.25rem 0; border-bottom: 1px solid #eee; }
.post-item:last-child { border-bottom: none; }
.body { font-size: 1.05rem; }
footer {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e5e5;
    color: #888;
    font-size: 0.9rem;
    text-align: center;
}

/* Стили для СИ */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}
.stat-card {
    padding: 1rem;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    text-align: center;
}
.stat-card .num {
    font-size: 2rem;
    font-weight: 700;
    color: #0066cc;
}
.stat-card .label {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}
.stat-overdue .num { color: #c00; }
.stat-soon .num { color: #e67e00; }
.stat-ok .num { color: #080; }
.stat-none .num { color: #888; }

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #0066cc;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    margin-right: 0.5rem;
}
.btn:hover { background: #0055aa; }
.btn-secondary { background: #666; }
.btn-secondary:hover { background: #444; }

.filters {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}
.filters input, .filters select, .filters button {
    padding: 0.4rem 0.6rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
}
.filters button {
    background: #0066cc;
    color: #fff;
    cursor: pointer;
    border-color: #0066cc;
}

.instruments-table, .detail-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: #fff;
    font-size: 0.95rem;
}
.instruments-table th, .detail-table th {
    text-align: left;
    padding: 0.5rem;
    background: #f4f4f4;
    border-bottom: 2px solid #e5e5e5;
    font-weight: 600;
}
.instruments-table td, .detail-table td {
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
}
.detail-table th { width: 220px; }

.status-overdue { color: #c00; font-weight: 600; }
.status-soon { color: #e67e00; font-weight: 600; }
.status-ok { color: #080; }
.status-no_verification { color: #999; }

/* Расширенный дашборд */
.stat-link {
    text-decoration: none;
    color: inherit;
    transition: transform .1s, box-shadow .1s;
}
.stat-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.actions { margin: 1.5rem 0 2rem; }

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.dash-block {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 1rem 1.25rem;
}
.dash-block h2 {
    font-size: 1.1rem;
    margin: 0 0 0.75rem;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}
.dash-urgent { border-left: 4px solid #c00; }
.dash-urgent h2 { color: #c00; }

.mini-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.mini-table th, .mini-table td {
    text-align: left;
    padding: 0.35rem 0.4rem;
    border-bottom: 1px solid #f0f0f0;
}
.mini-table th {
    color: #666;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
}
.mini-table tr:last-child td { border-bottom: none; }

.empty { color: #888; font-style: italic; margin: 0.5rem 0; }

@media (max-width: 600px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, 1fr); }
}
