/* npizza-qa-v2 — mobile-first */
:root {
    --red: #e63946;
    --red-light: #fff0f0;
    --green: #2d6a4f;
    --green-light: #f0faf4;
    --blue: #457b9d;
    --blue-light: #eef4fb;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e0e0e0;
    --gray-400: #aaa;
    --gray-600: #666;
    --gray-800: #333;
    --sidebar-w: 220px;
    --radius: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.5;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.tab-nav {
    display: flex;
    gap: 0;
    background: white;
    border-bottom: 2px solid var(--gray-100);
    position: sticky;
    top: 0;
    z-index: 50;
}

.tab-link {
    flex: 1;
    text-align: center;
    padding: 10px 8px;
    text-decoration: none;
    color: var(--gray-400);
    font-size: 13px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s;
}

.tab-link:hover {
    color: var(--gray-600);
    background: var(--gray-50);
}

.tab-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.sidebar-UNUSED {
    display: none;
    position: fixed;
    left: 0; top: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: white;
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-logo {
    padding: 20px;
    font-size: 18px;
    font-weight: 700;
    color: var(--red);
    border-bottom: 1px solid var(--gray-200);
}

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--gray-600);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-nav a:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.sidebar-nav a.active {
    color: var(--red);
    background: var(--red-light);
    border-right: 3px solid var(--red);
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-200);
}

.sidebar-footer .user-info {
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 8px;
}

.sidebar-footer form { display: inline; }

/* ===== MAIN CONTENT ===== */
.main {
    padding: 16px;
    min-height: 100vh;
    max-width: 900px;
    margin: 0 auto;
}

/* ===== MOBILE HAMBURGER ===== */


/* ===== CARDS ===== */
.card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--gray-800);
}

/* ===== STAT GRID ===== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-800);
}

.stat-label {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 4px;
}

/* ===== PAGE HEADER ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.page-title {
    font-size: 22px;
    font-weight: 700;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: white;
    background: var(--red);
}

.btn:hover { opacity: 0.9; }

.btn-outline {
    background: white;
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
}

.btn-outline:hover { background: var(--gray-100); }

.btn-sm { padding: 5px 10px; font-size: 13px; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 16px; }

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.form-control:focus {
    border-color: var(--red);
}

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.badge-excellent { background: #d4edda; color: #155724; }
.badge-good { background: #d1ecf1; color: #0c5460; }
.badge-ok { background: #fff3cd; color: #856404; }
.badge-weak { background: #f8d7da; color: #721c24; }
.badge-critical { background: #e63946; color: white; }

/* ===== TABLES ===== */
table {
    width: 100%;
    border-collapse: collapse;
}

th {
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-400);
    text-align: left;
    background: var(--gray-50);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 10px 12px;
    font-size: 14px;
    border-top: 1px solid var(--gray-100);
}

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ===== ALERT ===== */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}

.alert-success { background: var(--green-light); color: var(--green); }
.alert-error { background: var(--red-light); color: var(--red); }
.alert-info { background: var(--blue-light); color: var(--blue); }

/* ===== LOGIN PAGE ===== */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-50);
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 380px;
}

.login-logo {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--red);
    margin-bottom: 8px;
}

.login-subtitle {
    text-align: center;
    font-size: 14px;
    color: var(--gray-400);
    margin-bottom: 28px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .main {
        padding: 12px;
    }

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

    .page-title {
        font-size: 18px;
    }

    .login-card {
        margin: 16px;
        padding: 28px 24px;
    }

    .col-hide-mobile {
        display: none;
    }
}
