/* ===== AZS Pro — Modern UI System ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
    /* dark theme (default) */
    --bg-base: #07090f;
    --bg-elev: #0d111a;
    --text-primary: #f5f7fb;
    --text-secondary: rgba(245, 247, 251, 0.72);
    --text-muted: rgba(245, 247, 251, 0.45);
    --text-faint: rgba(245, 247, 251, 0.25);

    --accent: #3aa1ff;
    --accent-2: #7c5cff;
    --accent-3: #20d4c4;
    --accent-dim: rgba(58, 161, 255, 0.14);
    --accent-glow: rgba(58, 161, 255, 0.42);

    --glass: rgba(255, 255, 255, 0.045);
    --glass-strong: rgba(255, 255, 255, 0.07);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-strong: rgba(255, 255, 255, 0.14);

    --success: #2ecc71;
    --success-soft: rgba(46, 204, 113, 0.16);
    --danger: #ff5872;
    --danger-soft: rgba(255, 88, 114, 0.16);
    --warning: #ffb240;
    --warning-soft: rgba(255, 178, 64, 0.16);

    --gradient-blue: linear-gradient(135deg, #3aa1ff 0%, #1463c8 100%);
    --gradient-purple: linear-gradient(135deg, #7c5cff 0%, #4d2fd0 100%);
    --gradient-success: linear-gradient(135deg, #2ecc71 0%, #16a34a 100%);
    --gradient-danger: linear-gradient(135deg, #ff5872 0%, #c83042 100%);
    --gradient-orange: linear-gradient(135deg, #ffb240 0%, #f37e15 100%);

    --grid-line: rgba(255, 255, 255, 0.025);
    --table-bg: #ffffff;
    --table-head: #f6f8fb;
    --table-text: #0e1322;

    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 28px;

    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 12px 28px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 12px 36px var(--accent-dim);
}

/* ===== LIGHT THEME ===== */
[data-theme="light"] {
    --bg-base: #eef2f8;
    --bg-elev: #f6f8fc;
    --text-primary: #0c1322;
    --text-secondary: rgba(12, 19, 34, 0.74);
    --text-muted: rgba(12, 19, 34, 0.5);
    --text-faint: rgba(12, 19, 34, 0.28);

    --glass: rgba(255, 255, 255, 0.84);
    --glass-strong: rgba(255, 255, 255, 0.96);
    --glass-border: rgba(12, 19, 34, 0.06);
    --glass-border-strong: rgba(12, 19, 34, 0.1);

    --accent-dim: rgba(20, 99, 200, 0.1);
    --grid-line: rgba(12, 19, 34, 0.04);

    --shadow-sm: 0 6px 14px rgba(12, 19, 34, 0.06);
    --shadow-md: 0 14px 32px rgba(12, 19, 34, 0.08);
    --shadow-lg: 0 28px 60px rgba(12, 19, 34, 0.1);
}

[data-theme="light"] body { color: var(--text-primary); }

[data-theme="light"] body::before {
    background:
        radial-gradient(ellipse 80% 50% at 20% 30%, rgba(58, 161, 255, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 20%, rgba(124, 92, 255, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 50% 30% at 50% 90%, rgba(32, 212, 196, 0.05) 0%, transparent 60%);
}

[data-theme="light"] .lang-link { color: var(--text-muted); }
[data-theme="light"] .lang-link.active { color: #1463c8; border-bottom-color: #1463c8; }
[data-theme="light"] .back-link, [data-theme="light"] .btn-exit { color: var(--text-muted); }
[data-theme="light"] .table-container { background: var(--table-bg); }
[data-theme="light"] .form-control.bg-dark { background: rgba(12, 19, 34, 0.05) !important; color: var(--text-primary) !important; border-color: rgba(12, 19, 34, 0.1); }
[data-theme="light"] .text-white, [data-theme="light"] h2.text-white { color: var(--text-primary) !important; }
[data-theme="light"] .text-info { color: #1463c8 !important; }
[data-theme="light"] .text-muted { color: var(--text-muted) !important; }
[data-theme="light"] .text-white-50 { color: var(--text-muted) !important; }
[data-theme="light"] .calc-row b { color: var(--text-primary); }
[data-theme="light"] .calc-row span { color: var(--text-muted); }
[data-theme="light"] .station-card { background: rgba(12, 19, 34, 0.04); border-color: rgba(12, 19, 34, 0.08); }
[data-theme="light"] .station-card:hover { background: rgba(12, 19, 34, 0.07); }
[data-theme="light"] .station-card--pahta { color: #b36b00; }
[data-theme="light"] .station-card--trz { color: #6b2d8a; }
[data-theme="light"] .summary-row { color: var(--text-secondary); }
[data-theme="light"] .summary-row b { color: var(--text-primary); }
[data-theme="light"] .formula-chain { color: var(--text-secondary); border-top-color: rgba(12, 19, 34, 0.1); }
[data-theme="light"] .shift-line { background: rgba(12, 19, 34, 0.035); }
[data-theme="light"] .summary-box { background: rgba(58, 161, 255, 0.06); border-color: rgba(58, 161, 255, 0.15); }
[data-theme="light"] .data-box { background: rgba(58, 161, 255, 0.05); border-color: rgba(58, 161, 255, 0.12); }
[data-theme="light"] .data-row { border-color: rgba(12, 19, 34, 0.06); }

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Outfit', 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animated gradient mesh */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 30%, rgba(20, 99, 200, 0.28) 0%, transparent 55%),
        radial-gradient(ellipse 60% 40% at 80% 18%, rgba(58, 161, 255, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse 55% 35% at 60% 85%, rgba(124, 92, 255, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse 50% 30% at 10% 90%, rgba(32, 212, 196, 0.12) 0%, transparent 55%);
    animation: bgShift 14s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 64px 64px;
    pointer-events: none;
    z-index: 0;
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 80%);
}

@keyframes bgShift {
    0%   { opacity: 1;   transform: scale(1) translate(0, 0); }
    100% { opacity: 0.85; transform: scale(1.06) translate(-2%, -1.5%); }
}

/* ===== GLASS SURFACES ===== */
.glass-card, .glass-panel, .success-card {
    background: var(--glass);
    backdrop-filter: blur(26px) saturate(140%);
    -webkit-backdrop-filter: blur(26px) saturate(140%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow:
        var(--shadow-lg),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease, border-color 0.3s ease;
    position: relative;
    z-index: 1;
}

.glass-panel {
    border-radius: var(--radius-lg);
    padding: 22px;
    margin-bottom: 18px;
}

.glass-card:hover, .glass-panel:hover {
    border-color: rgba(58, 161, 255, 0.28);
    box-shadow:
        var(--shadow-lg),
        0 0 56px var(--accent-dim),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.94); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 22px var(--accent-dim); }
    50%      { box-shadow: 0 0 42px var(--accent-glow); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

@keyframes checkmark {
    0%   { transform: scale(0); opacity: 0; }
    50%  { transform: scale(1.25); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes shimmer {
    0%   { background-position: -240px 0; }
    100% { background-position: 240px 0; }
}

.animate-in    { animation: fadeInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.animate-scale { animation: scaleIn 0.5s ease-out forwards; }

/* ===== FORM ELEMENTS ===== */
.form-label {
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.72rem;
    margin-bottom: 8px;
    letter-spacing: 1.2px;
}

.form-control, .form-select {
    background: rgba(255, 255, 255, 0.96);
    color: #0e1322;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    font-weight: 600;
    font-size: 1rem;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
    box-shadow: 0 2px 0 rgba(255, 255, 255, 0.04) inset;
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-dim);
    outline: none;
    transform: translateY(-1px);
}

.form-control::placeholder { color: rgba(0, 0, 0, 0.32); }

/* ===== BUTTONS ===== */
.btn-submit, .btn-back, .btn-settings {
    background: var(--gradient-blue);
    color: white !important;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    padding: 16px 24px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
    box-shadow: 0 12px 30px rgba(58, 161, 255, 0.28);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.btn-submit::before, .btn-back::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.btn-submit:hover, .btn-back:hover, .btn-settings:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(58, 161, 255, 0.42);
}

.btn-submit:hover::before, .btn-back:hover::before { opacity: 1; }

.btn-submit:active, .btn-back:active { transform: translateY(0); }

.btn-submit.btn-sm { padding: 10px 16px; min-height: auto; letter-spacing: 1px; font-size: 0.85rem; }

/* ===== LINKS ===== */
.lang-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 700;
    transition: color 0.25s ease, border-color 0.25s ease;
    padding-bottom: 2px;
}

.lang-link.active {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
}

.lang-link:hover:not(.active) { color: var(--text-primary); }

.back-link, .btn-exit {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.25s ease;
}

.back-link:hover, .btn-exit:hover { color: var(--accent); }

/* ===== CALC BOX ===== */
.calc-box {
    background: linear-gradient(135deg, rgba(58, 161, 255, 0.12) 0%, rgba(124, 92, 255, 0.08) 100%);
    border: 1px solid rgba(58, 161, 255, 0.22);
    border-radius: var(--radius-lg);
    padding: 22px;
    margin-bottom: 22px;
    transition: box-shadow 0.4s ease;
}

.calc-box:focus-within { animation: glowPulse 2s ease-in-out infinite; }

#live-calc {
    color: var(--accent);
    font-weight: 900;
    text-align: center;
    font-size: 2rem;
    text-shadow: 0 0 24px var(--accent-glow);
    transition: color 0.3s ease;
    letter-spacing: -0.5px;
}

/* ===== STAT CARDS ===== */
.stat-card {
    background: linear-gradient(135deg, rgba(58, 161, 255, 0.12) 0%, rgba(124, 92, 255, 0.08) 100%);
    border-left: 4px solid var(--accent);
    padding: 22px;
    border-radius: var(--radius-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover { transform: translateX(4px); box-shadow: 0 10px 28px var(--accent-dim); }

.stat-card-success { border-left-color: var(--success); background: linear-gradient(135deg, var(--success-soft) 0%, rgba(46, 204, 113, 0.04) 100%); }
.stat-card-success:hover { box-shadow: 0 10px 28px rgba(46, 204, 113, 0.18); }
.stat-card-danger  { border-left-color: var(--danger);  background: linear-gradient(135deg, var(--danger-soft)  0%, rgba(255, 88, 114, 0.04) 100%); }
.stat-card-danger:hover  { box-shadow: 0 10px 28px rgba(255, 88, 114, 0.18); }

.stat-card h2 { word-break: break-all; overflow-wrap: break-word; font-weight: 800; letter-spacing: -0.5px; }

/* ===== TABLE (admin) ===== */
.table-container {
    background: var(--table-bg);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--glass-border);
}

.table { background: transparent !important; color: var(--table-text) !important; margin-bottom: 0; }
.table-striped tbody tr:nth-of-type(odd) { background: rgba(12, 19, 34, 0.025); }

.table thead th {
    background: var(--table-head);
    color: #2a3048 !important;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.6px;
    border-bottom: 2px solid rgba(12, 19, 34, 0.08);
    padding: 14px 12px;
}

.table tbody td {
    color: var(--table-text) !important;
    font-weight: 600;
    border-bottom: 1px solid rgba(12, 19, 34, 0.05);
    vertical-align: middle;
    padding: 14px 12px;
    transition: background 0.2s ease;
}

.table tbody tr:hover { background: rgba(58, 161, 255, 0.06) !important; }

.btn-view-photo {
    background: var(--gradient-blue);
    color: white !important;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 12px;
    text-decoration: none;
    display: inline-block;
    font-size: 0.72rem;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-view-photo:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(58, 161, 255, 0.32); color: white; }

/* ===== SUCCESS PAGE ===== */
.success-icon {
    font-size: 88px;
    color: var(--success);
    animation: checkmark 0.6s ease-out forwards;
    text-shadow: 0 0 36px rgba(46, 204, 113, 0.5);
    line-height: 1;
}

.data-box {
    background: linear-gradient(135deg, rgba(58, 161, 255, 0.1) 0%, rgba(124, 92, 255, 0.06) 100%);
    border: 1px solid rgba(58, 161, 255, 0.18);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 28px;
    text-align: left;
    transition: box-shadow 0.3s ease;
}

.data-box:hover { box-shadow: 0 0 36px var(--accent-dim); }

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    gap: 12px;
}

.data-row:last-child { border-bottom: none; }

.data-box .label { color: var(--accent); font-size: 0.78rem; text-transform: uppercase; font-weight: 700; letter-spacing: 0.6px; }
.data-box .value { font-weight: 800; font-size: 1.05rem; }
.diff-pos { color: var(--success); }
.diff-neg { color: var(--danger); }

/* ===== UTILS ===== */
.page-center {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    z-index: 1;
}

.btn-excel {
    background: var(--gradient-success);
    color: white !important;
    border: none;
    font-weight: 700;
    padding: 12px 22px;
    border-radius: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-excel:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(46, 204, 113, 0.4); color: white; }

.form-control.bg-dark {
    background: rgba(0, 0, 0, 0.32) !important;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #fff !important;
    border-radius: 12px;
}

.form-control.bg-dark::placeholder { color: rgba(255, 255, 255, 0.4); }
.form-control.bg-dark:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }

.chart-container { position: relative; height: 250px; }

/* ===== THEME TOGGLE ===== */
.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid var(--glass-border-strong);
    background: var(--glass-strong);
    color: var(--text-primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: background 0.25s, transform 0.2s, border-color 0.25s;
    flex-shrink: 0;
}
.theme-toggle:hover { background: var(--accent-dim); transform: scale(1.06); border-color: var(--accent); }
.theme-toggle:focus { outline: none; box-shadow: 0 0 0 3px var(--accent-dim); }

/* ===== TITLE GLOW ===== */
.report-title {
    letter-spacing: 3px;
    text-shadow: 0 0 38px rgba(58, 161, 255, 0.22);
    animation: titleGlow 4s ease-in-out infinite alternate;
    background: linear-gradient(135deg, #ffffff 0%, #cce5ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
[data-theme="light"] .report-title {
    background: linear-gradient(135deg, #0c1322 0%, #1463c8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
@keyframes titleGlow {
    from { text-shadow: 0 0 28px rgba(58, 161, 255, 0.18); }
    to   { text-shadow: 0 0 52px rgba(58, 161, 255, 0.34); }
}

/* ===== STATION CARDS (index) ===== */
.station-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.station-card {
    display: flex; align-items: center; gap: 12px;
    padding: 18px 16px;
    border-radius: 18px;
    border: 2px solid var(--glass-border-strong);
    background: var(--glass-strong);
    color: var(--text-primary);
    font-weight: 800; font-size: 1rem;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    position: relative;
    overflow: hidden;
}
.station-card::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    opacity: 0; transition: opacity 0.3s ease;
}
.station-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3); }
.station-card:hover::before { opacity: 1; }
.station-card.active { border-color: currentColor; box-shadow: 0 0 0 3px currentColor, 0 10px 26px rgba(0, 0, 0, 0.25); }
.station-card__icon { font-size: 1.7rem; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25)); }
.station-card__name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; position: relative; z-index: 1; }
.station-card--pahta { color: #ffb240; }
.station-card--pahta.active { background: linear-gradient(135deg, rgba(255, 178, 64, 0.22) 0%, rgba(255, 178, 64, 0.06) 100%); }
.station-card--trz { color: #b794ff; }
.station-card--trz.active { background: linear-gradient(135deg, rgba(183, 148, 255, 0.22) 0%, rgba(183, 148, 255, 0.06) 100%); }

/* ===== SHIFT REPORT specifics ===== */
.shift-grid-head { color: var(--accent); font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1px; }
.shift-line {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: border-color 0.25s ease, background 0.25s ease;
}
.shift-line:hover { border-color: rgba(58, 161, 255, 0.3); background: rgba(58, 161, 255, 0.05); }
.shift-line .form-control { padding: 10px 12px; }
.summary-box {
    background: linear-gradient(135deg, rgba(58, 161, 255, 0.12) 0%, rgba(124, 92, 255, 0.08) 100%);
    border: 1px solid rgba(58, 161, 255, 0.22);
    border-radius: var(--radius-lg);
    padding: 18px;
}
.summary-row { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 0.95rem; color: var(--text-secondary); }
.summary-row b { color: var(--text-primary); font-weight: 800; }
.status-plus  { color: #2ecc71; font-weight: 800; }
.status-minus { color: #ff5872; font-weight: 800; }
.formula-chain {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed rgba(255, 255, 255, 0.18);
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
    font-family: 'Outfit', monospace;
}
.prefill-note { margin-top: 10px; font-size: 0.82rem; color: var(--accent); }

.shift-switch {
    display: inline-flex;
    gap: 6px;
    padding: 6px;
    border-radius: 14px;
    background: var(--glass-strong);
    border: 1px solid var(--glass-border-strong);
}
.shift-switch input[type="radio"] { display: none; }
.shift-switch label {
    cursor: pointer;
    padding: 10px 16px;
    border-radius: 10px;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.85rem;
    transition: background 0.25s ease, color 0.25s ease;
}
.shift-switch input[type="radio"]:checked + label {
    background: var(--gradient-blue);
    color: white;
    box-shadow: 0 6px 16px rgba(58, 161, 255, 0.32);
}

.shift-report-header { flex-wrap: wrap; gap: 12px; }
.shift-report-links { flex-wrap: wrap; gap: 10px; align-items: center; }
.shift-report-links a { font-size: 0.85rem; white-space: nowrap; }
.shift-field-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.6px; color: var(--accent); margin-bottom: 4px; font-weight: 700; }

/* ===== Dark form-control adjustments ===== */
[data-theme="dark"] .form-control, body .form-control { color: #0e1322; }

/* ===== File input ===== */
input[type="file"] {
    background: rgba(255, 255, 255, 0.94) !important;
    color: #0e1322 !important;
}
input[type="file"]::file-selector-button {
    background: var(--gradient-blue);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 10px;
    margin-right: 12px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

/* ===== EFFECTS — кнопки c волной нажатия ===== */
.btn-submit, .btn-back, .btn-settings, .btn-shift-link, .btn-excel, .btn-view-photo, .nav-pill {
    -webkit-tap-highlight-color: transparent;
}
.btn-submit::after, .btn-back::after, .btn-settings::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    transform: translate(-50%, -50%) scale(0);
    pointer-events: none;
    width: 0; height: 0;
    top: 50%; left: 50%;
    transition: width 0.5s ease, height 0.5s ease, opacity 0.6s ease;
    opacity: 0;
}
.btn-submit:active::after, .btn-back:active::after, .btn-settings:active::after {
    width: 320px; height: 320px;
    opacity: 1;
    transition: width 0s, height 0s, opacity 0s;
}

/* ===== Float-shadow для glass-карточек на hover ===== */
.glass-card {
    transform: translateZ(0);
    will-change: transform, box-shadow;
}
.glass-card:hover {
    transform: translateY(-3px);
}

/* ===== Pulse для важного значения ===== */
@keyframes valuePulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.04); }
}
#live-calc { animation: valuePulse 2.6s ease-in-out infinite; transform-origin: center; }

/* ===== Анимация цифр (number-tick) ===== */
@keyframes tickIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.tick-in { animation: tickIn 0.32s ease-out; }

/* ===== Улучшенный focus ring (accessibility) ===== */
:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-dim), 0 0 0 5px rgba(58,161,255,0.18);
    border-radius: 10px;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .page-center { padding: 14px; align-items: flex-start; padding-top: max(14px, env(safe-area-inset-top)); }
    .glass-card, .success-card { padding: 20px 16px !important; border-radius: 20px; }
    .form-control, .form-select {
        min-height: 50px;
        padding: 14px 18px;
        font-size: 16px !important;
        border-radius: 14px;
    }
    .form-label { font-size: 0.78rem; margin-bottom: 8px; }
    .btn-submit, .btn-back, .btn-settings {
        min-height: 54px;
        padding: 16px 20px;
        font-size: 1rem;
        border-radius: 14px;
    }
    .calc-box { padding: 18px; margin-bottom: 18px; }
    #live-calc { font-size: 1.55rem; }
    .theme-toggle { width: 46px; height: 46px; }
    body { padding-bottom: max(env(safe-area-inset-bottom), 16px); }

    .table-container { padding: 14px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .table thead th, .table tbody td { padding: 12px 10px; font-size: 0.85rem; }
    .admin-header { flex-direction: column; align-items: flex-start; }
    .admin-header .d-flex { width: 100%; flex-wrap: wrap; }
    .btn-excel, .btn-exit, .btn-shift-link { min-height: 44px; padding: 10px 16px; font-size: 0.78rem; }
    .glass-panel { padding: 18px; }
    .stat-card { padding: 16px; }
    .stat-card h2 { font-size: 1.5rem; }
    .filter-row .form-control, .filter-row .form-select { min-height: 44px; }

    .shift-grid-head { display: none !important; }
    .shift-line { padding: 14px 12px; margin-bottom: 12px; }
    .shift-line .col-num { font-size: 1rem; margin-bottom: 8px; }
    .summary-box { padding: 14px; }
    .summary-row { font-size: 0.88rem; flex-wrap: wrap; gap: 4px; }
    .formula-chain { font-size: 0.8rem; word-break: break-word; }
    .shift-switch label { padding: 11px 16px; font-size: 0.88rem; }
    .shift-switch { width: 100%; justify-content: center; flex-wrap: wrap; }
    .shift-switch label { flex: 1 1 45%; text-align: center; }

    .nav-pill { font-size: 0.74rem; padding: 7px 12px; }
    .station-card { padding: 14px 12px; gap: 10px; font-size: 0.92rem; }
    .station-card__icon { font-size: 1.4rem; }

    .top-bar { gap: 8px !important; }
    .header-pill-group { flex: 0 0 auto; }
    .lang-group { flex: 0 0 auto; }
}

/* ===== TINY (≤ 380px) — небольшие телефоны ===== */
@media (max-width: 380px) {
    .nav-pill { font-size: 0.7rem; padding: 6px 10px; }
    .btn-shift-link { font-size: 0.72rem !important; padding: 8px 12px !important; }
    .btn-excel, .btn-exit { font-size: 0.7rem !important; }
    h2.report-title { font-size: 1.4rem; }
    .station-cards { grid-template-columns: 1fr; }
}

/* ===== PRINT-only — чистый PNG-style для шаблона печати ===== */
@media print {
    body::before, body::after { display: none !important; }
    .nav-pill, .theme-toggle, .header-pill-group { display: none !important; }
    .glass-card, .glass-panel { box-shadow: none !important; border: 1px solid #ccc !important; }
}

/* ===== Accessibility: уважение reduce-motion ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
