/* GeoTabel Panel — Custom Styles */

/* Inter — self-hosted (без Google Fonts CDN) */
@font-face{font-family:'Inter';font-style:normal;font-weight:400 800;font-display:swap;src:url('/panel/static/fonts/inter-cyrillic.woff2') format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Inter';font-style:normal;font-weight:400 800;font-display:swap;src:url('/panel/static/fonts/inter-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Inter';font-style:normal;font-weight:400 800;font-display:swap;src:url('/panel/static/fonts/inter-latin.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

/* Dashboard period selector */
.period-active { background: linear-gradient(135deg, #eff6ff, #dbeafe); border-color: #93c5fd; color: #2563eb; }

/* Smooth transitions — targeted only */
a, button, .stat-card, .quick-card, .shift-card, .plan-card, .nav-link-active, .badge, .page-btn, .toggle-switch {
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease, opacity 150ms ease, transform 150ms ease;
}
input, textarea, select {
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
}

:root {
    --gt-mobile-tabbar-height: 78px;
    --gt-mobile-scroll-buffer: 44px;
    --gt-mobile-pwa-banner-extra: 112px;
}

/* ===== NAV ===== */
.panel-nav {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    top: 0;
    z-index: 100;
    padding-top: env(safe-area-inset-top, 0px);
}

.nav-link-active {
    color: #2563EB !important;
    font-weight: 600 !important;
    background: rgba(37, 99, 235, 0.06) !important;
    position: relative;
}
.nav-link-active::after {
    content: '';
    position: absolute;
    bottom: -13px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #2563EB, #3B82F6);
    border-radius: 1px;
}

/* Имя пользователя в навбаре — одна строка с многоточием, чтобы длинное
   имя/фамилия не переносились на 2 строки и не смещали подчёркивание/соседей */
.nav-user-name {
    display: block;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.desktop-nav { gap: 0.25rem; }

/* ===== MORE DROPDOWN ===== */
#more-dropdown,
#manager-more-dropdown { position: relative !important; }
#more-dropdown > .more-menu,
#manager-more-dropdown > .more-menu {
    display: none !important;
    position: absolute !important;
    top: calc(100% + 6px);
    right: 0;
    z-index: 50;
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    min-width: 200px;
    padding: 6px;
}
#more-dropdown.open > .more-menu,
#manager-more-dropdown.open > .more-menu { display: block !important; }
#more-dropdown.open .more-arrow,
#manager-more-dropdown.open .more-arrow { transform: rotate(180deg); }
.more-arrow { transition: transform 150ms ease; }
.more-menu__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    border-radius: 8px;
    text-decoration: none;
}
.more-menu__item:hover { background: #EFF6FF; color: #2563EB; }
.more-menu__item--active { color: #2563EB; font-weight: 600; background: rgba(37,99,235,0.06); }

/* ===== STAT CARDS ===== */
.stat-card {
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    opacity: 0.06;
    transform: translate(20px, -20px);
}
.stat-card-blue { border-left-color: #2563EB; }
.stat-card-blue::before { background: #2563EB; }
.stat-card-green { border-left-color: #16A34A; }
.stat-card-green::before { background: #16A34A; }
.stat-card-teal { border-left-color: #7C3AED; }
.stat-card-teal::before { background: #7C3AED; }
.stat-card-orange { border-left-color: #F97316; }
.stat-card-orange::before { background: #F97316; }

/* ===== TOGGLE SWITCH ===== */
.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    appearance: none;
    -webkit-appearance: none;
    background: #D1D5DB;
    border-radius: 13px;
    cursor: pointer;
    outline: none;
    flex-shrink: 0;
}
.toggle-switch:checked {
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
}
.toggle-switch::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    transition: transform 150ms ease;
}
.toggle-switch:checked::before {
    transform: translateX(22px);
}

/* ===== TABLE ===== */
.table-row:hover { background: #F8FAFC; }

/* ===== QUICK CARDS ===== */
.quick-card {
    position: relative;
    overflow: hidden;
}
.quick-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 60%, rgba(37, 99, 235, 0.03));
    opacity: 0;
    transition: opacity 200ms;
}
.quick-card:hover::before { opacity: 1; }
.quick-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.1), 0 2px 8px rgba(0,0,0,0.06);
}

/* ===== MOBILE BOTTOM TAB BAR ===== */
.mobile-tab-bar {
    display: none !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10010;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(226,232,240,0.8);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)) 8px;
    justify-content: space-around;
}
.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 500;
    color: #94A3B8;
    text-decoration: none;
    border-radius: 8px;
    min-width: 56px;
}
.tab-item svg { color: #94A3B8; }
.tab-active { color: #2563EB !important; font-weight: 600; background: rgba(37,99,235,.08); position: relative; }
.tab-active svg { color: #2563EB !important; }
.tab-active::after { content:''; position:absolute; top:2px; left:50%; transform:translateX(-50%); width:4px; height:4px; border-radius:50%; background:#2563EB; }

/* ===== PLAN CARD ===== */
.plan-card {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 32px 24px;
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.plan-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}
.plan-card--featured {
    border-color: #2563EB;
    box-shadow: 0 8px 32px rgba(37,99,235,0.15);
    background: linear-gradient(180deg, #EFF6FF 0%, #FFFFFF 20%);
    transform: scale(1.04);
    z-index: 1;
}
.plan-card--featured:hover {
    transform: scale(1.04) translateY(-6px);
}
.plan-card--selected {
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.18), 0 8px 32px rgba(37,99,235,0.15);
    background: linear-gradient(180deg, #EFF6FF 0%, #FFFFFF 20%);
    z-index: 1;
}
.plan-card--selected:hover {
    transform: translateY(-6px);
}

.plan-badge {
    display: inline-block;
    padding: 4px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 12px;
    align-self: flex-start;
}
.plan-badge--accent { background: #EFF6FF; color: #2563EB; }
.plan-badge--current { background: #ECFDF5; color: #059669; }
html.dark .plan-badge--accent { background: rgba(59,130,246,0.18); color: #93C5FD; }
html.dark .plan-badge--current { background: rgba(16,185,129,0.18); color: #6EE7B7; }

.plan-name { font-size: 22px; font-weight: 700; margin-bottom: 12px; color: #1f2937; }
.plan-price { margin-bottom: 16px; }
.plan-amount { font-size: 42px; font-weight: 800; letter-spacing: -0.03em; color: #1f2937; }
.plan-period { display: block; font-size: 14px; color: #9ca3af; margin-top: 4px; }
.plan-value { font-size: 14px; color: #6b7280; line-height: 1.5; margin-bottom: 16px; }

/* ── Многомесячные периоды и скидки ── */
.plan-price-old {
    font-size: 22px;
    font-weight: 600;
    color: #9ca3af;
    text-decoration: line-through;
    text-decoration-color: #d1d5db;
    margin-left: 8px;
    vertical-align: middle;
}
.plan-price-old:empty { display: none; }
html.dark .plan-price-old { color: #64748B; text-decoration-color: #475569; }

.plan-save {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: center;
    padding: 8px 16px;
    margin: 8px auto 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #16A34A 0%, #15803D 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(22,163,74,0.35);
}
.plan-save[hidden] { display: none; }
html.dark .plan-save {
    background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(22,163,74,0.4);
}

.plan-periods {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 6px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
html.dark .plan-periods { background: #1E293B; border-color: #334155; box-shadow: none; }

.plan-period-opt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 88px;
    padding: 12px 18px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: #334155;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.plan-period-opt:hover { background: #EFF6FF; color: #2563EB; }
.plan-period-opt.is-active {
    background: #2563EB;
    color: #fff;
    box-shadow: 0 6px 18px rgba(37,99,235,0.4);
}
.plan-period-opt.is-active:hover { background: #1d4ed8; color: #fff; }
html.dark .plan-period-opt { color: #CBD5E1; }
html.dark .plan-period-opt:hover { background: rgba(59,130,246,0.16); color: #93C5FD; }
html.dark .plan-period-opt.is-active { color: #fff; }

.plan-period-opt__save {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    background: #16A34A;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: -0.01em;
}
.plan-period-opt.is-active .plan-period-opt__save {
    background: #F97316;
    color: #fff;
}
html.dark .plan-period-opt__save { background: #16A34A; color: #fff; }
html.dark .plan-period-opt.is-active .plan-period-opt__save { background: #F97316; color: #fff; }

.plan-total {
    display: block;
    margin: 8px auto 0;
    font-size: 14px;
    font-weight: 700;
    color: #475569;
}
.plan-total[hidden] { display: none; }
html.dark .plan-total { color: #94A3B8; }

/* Глобальный переключатель периода над сеткой тарифов */
.plan-period-switch {
    text-align: center;
    margin-bottom: 28px;
}
.plan-period-switch__title {
    font-size: 19px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 16px;
}
html.dark .plan-period-switch__title { color: #F1F5F9; }

.plan-features {
    text-align: left;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    list-style: none;
    padding: 0;
}
.plan-features li {
    padding-left: 24px;
    position: relative;
    font-size: 14px;
    line-height: 1.4;
    color: #374151;
}
.plan-features li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: #22C55E;
    font-weight: 700;
}
.plan-features li.plan-feature--disabled { color: #9ca3af; }
.plan-features li.plan-feature--disabled::before { content: '\2717'; color: #d1d5db; }
.plan-features li.plan-feature--highlight {
    color: #1d4ed8;
    font-weight: 600;
    background: #eff6ff;
    border-radius: 6px;
    padding: 4px 8px 4px 28px;
    margin-left: -4px;
}
.plan-features li.plan-feature--highlight::before { color: #2563EB; }
.plan-features li.plan-feature--limited { color: #6b7280; }
.plan-features li.plan-feature--limited::before { content: '\2713'; color: #f59e0b; }

.plan-info-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 6px;
    border-radius: 50%;
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    color: #2563EB;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    vertical-align: middle;
    cursor: help;
}

.ui-floating-tooltip {
    position: fixed;
    z-index: 2147483000;
    max-width: min(280px, calc(100vw - 24px));
    padding: 10px 12px;
    border-radius: 8px;
    background: #0F172A;
    color: #fff;
    box-shadow: 0 10px 30px rgba(15,23,42,0.22);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
    text-align: left;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 120ms ease, transform 120ms ease;
}
.ui-floating-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.plan-footer { margin-top: auto; }
.plan-trial {
    display: block;
    font-size: 12px;
    color: #2563EB;
    font-weight: 500;
    margin-bottom: 8px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 6px 12px;
    text-align: center;
}
.plan-btn {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.2s;
}
.plan-btn--primary { background: #2563EB; color: #fff; }
.plan-btn--primary:hover { background: #1d4ed8; }
.plan-btn--dark { background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%); color: #fff; }
.plan-btn--dark:hover { background: linear-gradient(135deg, #1D4ED8 0%, #1e40af 100%); }
.plan-btn--outline { background: #f3f4f6; color: #374151; }
.plan-btn--outline:hover { background: #e5e7eb; }
html.dark .plan-btn--outline { background: #334155; color: #E2E8F0; }
html.dark .plan-btn--outline:hover { background: #475569; }
.plan-btn--current { background: #2563EB; color: #fff; cursor: default; }

/* ===== FOCUS ===== */
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

/* ===== PAGE HEADING ===== */
.page-heading {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0F172A;
    letter-spacing: -0.02em;
}

/* ===== BADGE ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 9999px;
}

/* ===== MODAL ===== */
.modal-backdrop {
    backdrop-filter: blur(6px);
    z-index: 10050;   /* выше .panel-nav (100) и .mobile-tab-bar (10010) */
}

/* ===== PAGINATION ===== */
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 10px;
    border: 1px solid #E2E8F0;
    color: #475569;
    background: white;
}
.page-btn:hover { background: #F1F5F9; border-color: #93C5FD; color: #2563EB; }
.page-btn-active { background: linear-gradient(135deg, #2563EB, #1D4ED8); color: white; border-color: transparent; box-shadow: 0 2px 8px rgba(37,99,235,0.3); }

/* ===== AUTH PAGE ===== */
body:has(.auth-bg) {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    min-height: 100dvh;
}
.auth-bg {
    width: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 30%, #E0F2FE 60%, #F0F9FF 100%);
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(env(safe-area-inset-top, 0px) + 24px) 16px calc(env(safe-area-inset-bottom, 0px) + 24px);
    box-sizing: border-box;
    caret-color: transparent;
    overflow: hidden;
}
.auth-bg::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -15%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(37,99,235,0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}
.auth-bg * { box-sizing: border-box; }
.auth-card {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(226,232,240,0.6);
    box-shadow: 0 16px 48px rgba(37,99,235,0.08), 0 4px 12px rgba(0,0,0,0.04);
}
.auth-card, .auth-card * { cursor: default; }
.auth-card a, .auth-card .auth-lang { cursor: pointer; }
.auth-card .auth-submit { cursor: pointer; }
.auth-bg, .auth-card, .auth-title, .auth-subtitle, .auth-link-wrap, .auth-link {
    -webkit-user-select: none;
    user-select: none;
}
.auth-layout {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}
.auth-layout--wide {
    max-width: 760px;
}
.auth-lang-wrap {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 16px;
}
.auth-lang {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 30px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 700;
    color: #60A5FA;
    border: 1px solid rgba(147, 197, 253, 0.55);
    background: rgba(255, 255, 255, 0.75);
    border-radius: 10px;
    text-decoration: none;
}
.auth-lang:hover {
    color: #2563EB;
    border-color: #93C5FD;
    background: rgba(255, 255, 255, 0.92);
}
.auth-theme-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid rgba(147, 197, 253, 0.55);
    background: rgba(255, 255, 255, 0.75);
    border-radius: 10px;
    color: #60A5FA;
    cursor: pointer;
}
.auth-theme-btn:hover {
    color: #2563EB;
    border-color: #93C5FD;
    background: rgba(255, 255, 255, 0.92);
}
.auth-theme-btn svg {
    width: 14px;
    height: 14px;
}
html.dark .auth-lang,
html.dark .auth-theme-btn {
    color: #93C5FD;
    border-color: rgba(148, 163, 184, 0.5);
    background: rgba(15, 23, 42, 0.72);
}
html.dark .auth-lang:hover,
html.dark .auth-theme-btn:hover {
    color: #BFDBFE;
    border-color: rgba(147, 197, 253, 0.65);
    background: rgba(15, 23, 42, 0.9);
}
.auth-card-pad {
    border-radius: 16px;
    padding: 32px;
}
.auth-logo-row {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}
.auth-logo-wrap {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, #3B82F6, #1D4ED8);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px -5px rgba(59,130,246,0.2);
}
.auth-logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}
.auth-title {
    margin: 0 0 4px 0;
    text-align: center;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 700;
    color: #1E293B;
}
.auth-subtitle {
    margin: 0 0 24px 0;
    text-align: center;
    font-size: 14px;
    color: #64748B;
}
.auth-form {
    margin-bottom: 24px;
}
.auth-form--compact {
    margin-bottom: 0;
}
.auth-field {
    margin-bottom: 12px;
}
.auth-field:last-of-type {
    margin-bottom: 16px;
}
.auth-input {
    width: 100%;
    height: 42px;
    padding: 0 16px;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    background: rgba(248,250,252,0.5);
    font-family: inherit;
    font-size: 14px;
    color: #1E293B;
    caret-color: #1E293B;
    outline: none;
    cursor: text;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    -webkit-user-select: text;
    user-select: text;
}
.auth-input::placeholder {
    color: #94A3B8;
}
.auth-input:focus {
    border-color: #3B82F6;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}
.auth-input--uppercase {
    text-transform: uppercase;
}
.auth-submit {
    display: inline-flex;
    width: 100%;
    height: 42px;
    border: 0;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    color: #FFFFFF;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(37,99,235,0.2);
    transition: box-shadow 0.15s;
}
.auth-submit:hover {
    background: linear-gradient(135deg, #1D4ED8, #1E40AF);
    box-shadow: 0 4px 12px rgba(37,99,235,0.25);
}
.auth-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #475569;
    font-size: 12px;
    line-height: 1.45;
}
.auth-consents {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0 16px;
}
.auth-consent input {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    margin-top: 1px;
    accent-color: #2563eb;
}
.auth-consent a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}
.auth-consent a:hover {
    text-decoration: underline;
}
.auth-submit--green {
    background: linear-gradient(135deg, #22C55E, #16A34A);
    box-shadow: 0 2px 8px rgba(34,197,94,0.2);
}
.auth-submit--green:hover {
    background: linear-gradient(135deg, #16A34A, #15803D);
    box-shadow: 0 4px 12px rgba(34,197,94,0.25);
}
.auth-submit--disabled,
.auth-submit--disabled:hover {
    background: #CBD5E1;
    box-shadow: none;
    cursor: not-allowed;
}
.auth-resend-note {
    margin-top: 12px;
    text-align: center;
    color: #64748B;
    font-size: 13px;
    line-height: 1.5;
}
.auth-link-wrap {
    text-align: center;
    margin-top: 16px;
}
.auth-link-wrap .auth-link {
    display: block;
    margin-bottom: 8px;
}
.auth-link-wrap .auth-link:last-child {
    margin-bottom: 0;
}
.auth-link {
    color: #2563EB;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}
.auth-link--secondary {
    color: #94A3B8;
    font-weight: 400;
}
.auth-link--secondary:hover {
    color: #475569;
}
.auth-link:hover {
    color: #1D4ED8;
}
.auth-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.auth-choice-card {
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 20px;
    background: rgba(255,255,255,0.82);
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.auth-choice-card:hover {
    border-color: #93C5FD;
    box-shadow: 0 10px 24px rgba(37,99,235,0.08);
    transform: translateY(-1px);
}
.auth-choice-card--green:hover {
    border-color: #86EFAC;
    box-shadow: 0 10px 24px rgba(34,197,94,0.08);
}
.auth-choice-head {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}
.auth-choice-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.auth-choice-icon svg {
    width: 20px;
    height: 20px;
}
.auth-choice-icon--blue {
    background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
    color: #2563EB;
}
.auth-choice-icon--green {
    background: linear-gradient(135deg, #F0FDF4, #DCFCE7);
    color: #16A34A;
}
.auth-choice-copy {
    min-width: 0;
}
.auth-choice-title {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 700;
    color: #1E293B;
}
.auth-choice-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #64748B;
}
.auth-hint {
    margin: 16px 0 0;
    text-align: center;
    font-size: 12px;
    color: #94A3B8;
}
.auth-error {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    margin-bottom: 16px;
    border-radius: 12px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #DC2626;
    font-size: 14px;
}
.auth-error svg { flex-shrink: 0; width: 16px; height: 16px; }
.auth-submit--dev {
    background: linear-gradient(135deg, #F97316, #EA580C);
    box-shadow: 0 2px 8px rgba(249,115,22,0.24);
}
.auth-submit--dev:hover {
    background: linear-gradient(135deg, #EA580C, #C2410C);
    box-shadow: 0 4px 12px rgba(249,115,22,0.3);
}
.auth-subtitle--dev {
    color: #F97316;
    font-weight: 600;
}
html.dark .auth-bg {
    background: radial-gradient(1200px 700px at 12% -10%, rgba(37, 99, 235, 0.2), transparent 55%),
                radial-gradient(900px 520px at 110% 120%, rgba(14, 116, 144, 0.18), transparent 60%),
                linear-gradient(160deg, #020617 0%, #0F172A 45%, #111827 100%);
}
html.dark .auth-bg::before {
    background: radial-gradient(circle, rgba(96, 165, 250, 0.14) 0%, transparent 70%);
}
html.dark .auth-card {
    background: rgba(15, 23, 42, 0.82);
    border-color: rgba(71, 85, 105, 0.7);
    box-shadow: 0 22px 56px rgba(2, 6, 23, 0.5), 0 6px 16px rgba(15, 23, 42, 0.45);
}
html.dark .auth-title {
    color: #F1F5F9;
}
html.dark .auth-subtitle {
    color: #94A3B8;
}
html.dark .auth-input {
    border-color: #475569;
    background: rgba(30, 41, 59, 0.88);
    color: #E2E8F0;
    caret-color: #E2E8F0;
}
html.dark .auth-input::placeholder {
    color: #64748B;
}
html.dark .auth-input:focus {
    border-color: #60A5FA;
    background: #1E293B;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.28);
}
html.dark .auth-link {
    color: #93C5FD;
}
html.dark .auth-link:hover {
    color: #BFDBFE;
}
html.dark .auth-link--secondary {
    color: #94A3B8;
}
html.dark .auth-link--secondary:hover {
    color: #CBD5E1;
}
html.dark .auth-choice-card {
    background: rgba(15, 23, 42, 0.74);
    border-color: rgba(71, 85, 105, 0.75);
}
html.dark .auth-choice-card:hover {
    border-color: rgba(96, 165, 250, 0.7);
    box-shadow: 0 10px 26px rgba(2, 6, 23, 0.45);
}
html.dark .auth-choice-card--green:hover {
    border-color: rgba(74, 222, 128, 0.65);
    box-shadow: 0 10px 26px rgba(2, 6, 23, 0.45);
}
html.dark .auth-choice-title {
    color: #E2E8F0;
}
html.dark .auth-choice-text {
    color: #94A3B8;
}
html.dark .auth-hint {
    color: #94A3B8;
}
html.dark .auth-error {
    background: rgba(127, 29, 29, 0.35);
    border-color: rgba(248, 113, 113, 0.55);
    color: #FCA5A5;
}
html.dark .auth-submit--disabled,
html.dark .auth-submit--disabled:hover {
    background: #334155;
    color: #94A3B8;
}
html.dark .auth-consent {
    color: #cbd5e1;
}

/* ===== MOBILE NAV OVERRIDES ===== */
.mobile-tab-bar { display: none !important; }
#more-dropdown > .more-menu,
#manager-more-dropdown > .more-menu { display: none !important; position: absolute !important; }
#more-dropdown.open > .more-menu,
#manager-more-dropdown.open > .more-menu { display: block !important; }
@media (max-width: 1024px) {
    .desktop-nav { display: none !important; }
    .mobile-tab-bar { display: flex !important; flex-direction: row !important; }
    .mobile-tab-bar .tab-item { flex: 1 1 0; min-width: 0; padding-left: 4px; padding-right: 4px; }
}
@media (min-width: 1025px) {
    .mobile-tab-bar { display: none !important; }
    .mobile-more-sheet, .mobile-more-overlay { display: none !important; }
}
.mobile-more-overlay {
    position: fixed; inset: 0; background: rgba(15,23,42,0.45);
    opacity: 0; pointer-events: none; transition: opacity .2s ease;
    z-index: 10020;
}
.mobile-more-overlay.open { opacity: 1; pointer-events: auto; }
.mobile-more-sheet {
    position: fixed; left: 0; right: 0; bottom: 0;
    background: #fff; border-top-left-radius: 20px; border-top-right-radius: 20px;
    box-shadow: 0 -8px 32px rgba(15,23,42,0.18);
    transform: translateY(100%); transition: transform .25s ease;
    z-index: 10030; padding: 8px 12px calc(env(safe-area-inset-bottom, 0px) + 16px);
    max-height: 85vh; overflow-y: auto;
}
.mobile-more-sheet.open { transform: translateY(0); }
.mobile-more-sheet__handle {
    width: 40px; height: 4px; border-radius: 2px; background: #CBD5E1;
    margin: 8px auto 12px;
}
.mobile-more-sheet__item {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 12px; border-radius: 12px;
    color: #334155; font-size: 15px; font-weight: 500;
    text-decoration: none;
}
.mobile-more-sheet__item:active { background: #F1F5F9; }
.mobile-more-sheet__item--active { background: #EFF6FF; color: #2563EB; }
.mobile-more-sheet__item svg { width: 22px; height: 22px; flex-shrink: 0; }
.mobile-more-sheet__divider { height: 1px; background: #E2E8F0; margin: 6px 12px; }
.mobile-more-sheet__item--danger { color: #DC2626; }

/* ===== SHIFT CARD ===== */
.shift-card {
    position: relative;
    overflow: hidden;
}
.shift-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 3px;
    background: #E2E8F0;
}
.shift-card-open::before {
    background: linear-gradient(180deg, #22C55E, #16A34A);
}
.shift-card-closed::before {
    background: #CBD5E1;
}
.shift-card:hover {
    border-color: #BFDBFE;
    box-shadow: 0 4px 24px rgba(37,99,235,0.08), 0 1px 4px rgba(0,0,0,0.04);
}

/* ===== INFO CARD (settings, detail) ===== */
.info-card {
    border: 1px solid rgba(226,232,240,0.8);
    background: #fff;
}
.info-card-header {
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    border-bottom: 1px solid rgba(226,232,240,0.6);
    padding: 16px 20px;
    border-radius: 12px 12px 0 0;
}

/* ===== INVITE BANNER ===== */
.invite-banner {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 50%, #E0F2FE 100%);
    border: 1px solid rgba(59,130,246,0.15);
    position: relative;
    overflow: hidden;
}
.invite-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(37,99,235,0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    background: linear-gradient(180deg, #F8FAFC 0%, #FFFFFF 100%);
}

.owner-open-shifts-name {
    display: inline-block;
    min-width: 0;
}

.emp-history-filter__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(160px, 1.4fr) auto;
    gap: 12px;
    align-items: end;
}
.emp-history-filter__field,
.emp-history-filter__control {
    min-width: 0;
}
.emp-history-filter__submit {
    min-height: 42px;
    white-space: nowrap;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    html, body {
        min-height: 100dvh;
    }
    .owner-open-shifts-scroll {
        overflow-x: visible;
    }
    .owner-open-shifts-table {
        table-layout: fixed;
    }
    .owner-open-shifts-th,
    .owner-open-shifts-cell {
        padding-left: 10px;
        padding-right: 10px;
        vertical-align: top;
    }
    .owner-open-shifts-th--employee,
    .owner-open-shifts-cell--employee {
        width: 36%;
    }
    .owner-open-shifts-th--start,
    .owner-open-shifts-cell--start {
        width: 24%;
    }
    .owner-open-shifts-th--actions,
    .owner-open-shifts-cell--actions {
        width: 40%;
        text-align: left;
    }
    .owner-open-shifts-cell--start {
        white-space: normal;
        font-size: 13px;
        line-height: 1.35;
    }
    .owner-open-shifts-actions {
        justify-content: flex-start !important;
        align-items: flex-start !important;
        flex-direction: column;
        gap: 6px;
    }
    .owner-open-shifts-actions a,
    .owner-open-shifts-actions button {
        white-space: normal;
        text-align: left;
        line-height: 1.25;
    }
    .owner-open-shifts-name {
        overflow-wrap: anywhere;
        word-break: break-word;
        line-height: 1.3;
    }
    .auth-bg {
        padding: calc(env(safe-area-inset-top, 0px) + 20px) 12px calc(env(safe-area-inset-bottom, 0px) + 20px);
    }
    .auth-card-pad {
        padding: 24px 20px;
    }
    .auth-lang-wrap {
        margin-bottom: 12px;
    }
    .auth-logo-row {
        margin-bottom: 16px;
    }
    nav .desktop-nav { display: none; }
    .mobile-tab-bar { display: flex; }
    body[data-panel="1"][data-has-mobile-nav="1"] {
        overflow-x: hidden;
    }
    body[data-panel="1"][data-has-mobile-nav="1"] .mb-tab-safe,
    body[data-panel="1"][data-has-mobile-nav="1"] .object-form-safe {
        padding-bottom: calc(var(--gt-mobile-tabbar-height) + var(--gt-mobile-scroll-buffer) + env(safe-area-inset-bottom, 0px)) !important;
        scroll-padding-bottom: calc(var(--gt-mobile-tabbar-height) + var(--gt-mobile-scroll-buffer) + env(safe-area-inset-bottom, 0px));
    }
    body[data-panel="1"][data-has-mobile-nav="1"].has-pwa-banner .mb-tab-safe,
    body[data-panel="1"][data-has-mobile-nav="1"].has-pwa-banner .object-form-safe {
        padding-bottom: calc(var(--gt-mobile-tabbar-height) + var(--gt-mobile-scroll-buffer) + var(--gt-mobile-pwa-banner-extra) + env(safe-area-inset-bottom, 0px)) !important;
        scroll-padding-bottom: calc(var(--gt-mobile-tabbar-height) + var(--gt-mobile-scroll-buffer) + var(--gt-mobile-pwa-banner-extra) + env(safe-area-inset-bottom, 0px));
    }
    body[data-panel="1"][data-has-mobile-nav="1"] :where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea) {
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
    body[data-panel="1"][data-has-mobile-nav="1"] :where(.flex, .inline-flex) > :where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea) {
        min-width: 0;
    }
    .object-form-actions {
        position: static;
        bottom: auto;
        z-index: auto;
        padding: 0;
        border-radius: 0;
        background: transparent;
        border: 0;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    body.has-pwa-banner .object-form-actions {
        bottom: auto;
    }
    .auth-layout--wide { max-width: 420px; }
    .auth-choice-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .emp-history-filter {
        padding: 16px;
    }
    .emp-history-filter__grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .emp-history-filter__control,
    .emp-history-filter__submit {
        width: 100%;
        min-height: 42px;
    }
}
@media (min-width: 1025px) {
    .mobile-tab-bar { display: none !important; }
}

/* ===== TABLE SCROLL ===== */
.overflow-x-auto {
    -webkit-overflow-scrolling: touch;
}

/* ===== MAP ===== */
[id^="map-"] {
    border-radius: 0.75rem;
    overflow: hidden;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-in {
    animation: fadeIn 300ms ease forwards;
}
.animate-slide-up {
    animation: slideUp 400ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ===== PWA INSTALL BANNER ===== */
.pwa-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 300ms ease;
}
.pwa-banner-visible {
    transform: translateY(0);
}
.pwa-banner-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto 16px;
    padding: 14px 16px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 -4px 32px rgba(0,0,0,0.1);
    border: 1px solid #EEF1F6;
    margin-left: 12px;
    margin-right: 12px;
}
.pwa-banner-icon {
    flex-shrink: 0;
}
.pwa-banner-icon img {
    border-radius: 10px;
}
.pwa-banner-text {
    flex: 1;
    min-width: 0;
}
.pwa-banner-title {
    font-size: 14px;
    font-weight: 600;
    color: #1B2430;
}
.pwa-banner-desc {
    font-size: 12px;
    color: #829AB1;
    margin-top: 2px;
}
.pwa-banner-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}
.pwa-banner-btn:hover {
    background: linear-gradient(135deg, #1D4ED8, #1E40AF);
}
.pwa-banner-close {
    flex-shrink: 0;
    padding: 6px 10px;
    background: none;
    border: none;
    color: #9FB3C8;
    font-size: 12px;
    cursor: pointer;
}
.pwa-banner-close:hover {
    color: #5E6A78;
}

/* ===== COOKIE BANNER ===== */
.panel-cookie-banner {
    position: fixed;
    left: 50%;
    bottom: max(24px, env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 10020;
    width: calc(100% - 32px);
    max-width: 560px;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease;
}
.panel-cookie-banner--visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.panel-cookie-banner__inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #ffffff;
    border: 1px solid #E2E8F0;
    border-radius: 24px;
    padding: 24px 28px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
}
.panel-cookie-banner__text {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}
.panel-cookie-banner__title {
    font-size: 16px;
    line-height: 1.3;
    font-weight: 700;
    color: #0F172A;
}
.panel-cookie-banner__desc {
    font-size: 13px;
    line-height: 1.5;
    color: #64748B;
}
.panel-cookie-banner__link {
    color: #2563EB;
    text-decoration: underline;
    display: inline-block;
    padding: 6px 0;
    min-height: 44px;
    line-height: 32px;
}
.panel-cookie-banner__link:hover {
    color: #1D4ED8;
}
.panel-cookie-banner__actions {
    display: flex;
    gap: 10px;
}
.panel-cookie-banner__btn {
    flex: 1;
    border: 0;
    border-radius: 12px;
    padding: 12px 18px;
    font-size: 14px;
    line-height: 1;
    min-height: 44px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.panel-cookie-banner__btn--primary {
    color: #ffffff;
    background: #2563EB;
    box-shadow: 0 2px 8px rgba(37,99,235,0.24);
}
.panel-cookie-banner__btn--primary:hover {
    background: #1D4ED8;
    transform: scale(1.03);
}
.panel-cookie-banner__btn--ghost {
    color: #475569;
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
}
.panel-cookie-banner__btn--ghost:hover {
    color: #0F172A;
    background: #E2E8F0;
    transform: scale(1.03);
}
.panel-cookie-banner__btn:active {
    transform: scale(0.97);
}

/* ===== PWA INSTALL MODAL (after first shift) ===== */
.pwa-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 250ms ease;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
.pwa-modal-visible {
    opacity: 1;
    pointer-events: auto;
}
.pwa-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
}
.pwa-modal-card {
    position: relative;
    background: white;
    border-radius: 24px;
    max-width: 440px;
    width: 100%;
    padding: 28px 24px 20px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.25);
    text-align: center;
    transform: translateY(16px) scale(0.98);
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
    max-height: calc(100dvh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
}
.pwa-modal-visible .pwa-modal-card {
    transform: translateY(0) scale(1);
}
.pwa-modal-x {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: #F1F5F9;
    color: #64748B;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pwa-modal-x:hover { background: #E2E8F0; }
.pwa-modal-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}
.pwa-modal-icon img {
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.25);
}
.pwa-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 4px;
}
.pwa-modal-sub {
    font-size: 13px;
    color: #64748B;
    margin-bottom: 18px;
}
.pwa-modal-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
    text-align: left;
}
.pwa-modal-benefit {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #F1F5F9;
}
.pwa-modal-benefit:last-child { border-bottom: none; }
.pwa-modal-benefit-icon {
    font-size: 22px;
    flex-shrink: 0;
    width: 32px;
    text-align: center;
}
.pwa-modal-benefit-title {
    font-size: 14px;
    font-weight: 600;
    color: #1B2430;
}
.pwa-modal-benefit-desc {
    font-size: 12px;
    color: #64748B;
    margin-top: 1px;
    line-height: 1.4;
}
.pwa-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}
.pwa-modal-btn {
    display: block;
    width: 100%;
    padding: 13px 16px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 150ms ease;
}
.pwa-modal-btn-primary {
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}
.pwa-modal-btn-primary:hover {
    background: linear-gradient(135deg, #1D4ED8, #1E40AF);
}
.pwa-modal-btn-secondary {
    background: #F1F5F9;
    color: #1E40AF;
}
.pwa-modal-btn-secondary:hover {
    background: #E2E8F0;
}
.pwa-modal-later {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 8px;
    background: none;
    border: none;
    color: #94A3B8;
    font-size: 13px;
    cursor: pointer;
}
.pwa-modal-later:hover { color: #64748B; }

@media (max-width: 1024px) {
    body[data-panel="1"][data-has-mobile-nav="1"] .panel-cookie-banner {
        bottom: calc(var(--gt-mobile-tabbar-height) + env(safe-area-inset-bottom, 0px) + 12px);
    }
    .panel-cookie-banner__inner {
        padding: 16px 18px;
        gap: 12px;
    }
    .panel-cookie-banner__title {
        font-size: 15px;
    }
    .panel-cookie-banner__desc {
        font-size: 12px;
    }
    .panel-cookie-banner__btn {
        min-height: 44px;
        padding: 10px 12px;
        white-space: normal;
    }
    .pwa-banner {
        bottom: calc(64px + env(safe-area-inset-bottom, 0px));
        max-height: calc(100dvh - 72px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    .pwa-banner-inner {
        display: grid;
        grid-template-columns: 40px minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px;
        margin: 0 10px 10px;
        padding: 12px;
        border-radius: 14px;
    }
    .pwa-banner-btn {
        grid-column: 1 / -1;
        width: 100%;
        min-height: 44px;
    }
    .pwa-banner-close {
        min-width: 44px;
        min-height: 44px;
        padding: 8px;
    }
    .pwa-modal {
        align-items: flex-start;
        justify-content: center;
        padding: calc(env(safe-area-inset-top, 0px) + 10px) 10px calc(env(safe-area-inset-bottom, 0px) + 10px);
    }
    .pwa-modal-card {
        max-height: calc(100dvh - 20px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
        padding: 22px 16px 14px;
        border-radius: 18px;
    }
    .pwa-modal-icon { margin-bottom: 8px; }
    .pwa-modal-icon img { width: 48px; height: 48px; border-radius: 12px; }
    .pwa-modal-title { font-size: 18px; padding: 0 28px; }
    .pwa-modal-sub { margin-bottom: 10px; }
    .pwa-modal-benefits { margin-bottom: 10px; }
    .pwa-modal-benefit { gap: 10px; padding: 8px 0; }
    .pwa-modal-btn { min-height: 44px; padding: 11px 14px; }
    .pwa-modal-later { min-height: 44px; }
}

/* ===== CHECKBOX DROPDOWN (shifts export) ===== */
.cb-dropdown { position: relative; }
.cb-dropdown__btn {
    display: flex; align-items: center; justify-content: space-between; gap: 4px;
    border: 1px solid #E2E8F0; border-radius: 0.75rem; padding: 0.5rem 0.75rem;
    font-size: 0.875rem; background: rgba(248,250,252,0.5); cursor: pointer;
    min-width: 160px; white-space: nowrap; user-select: none;
}
.cb-dropdown__btn:focus, .cb-dropdown__btn:hover { background: #fff; border-color: #93C5FD; }
.cb-dropdown__panel {
    display: none; position: absolute; top: calc(100% + 4px); left: 0; z-index: 40;
    background: #fff; border: 1px solid #E2E8F0; border-radius: 0.75rem;
    box-shadow: 0 4px 16px rgba(0,0,0,.1); min-width: 220px; max-height: 260px;
    overflow-y: auto; padding: 0.25rem 0;
}
.cb-dropdown.open .cb-dropdown__panel { display: block; }
.cb-dropdown__item {
    display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.75rem;
    font-size: 0.8125rem; cursor: pointer; color: #334155;
}
.cb-dropdown__item:hover { background: #F0F7FF; }
.cb-dropdown__item input { accent-color: #2563EB; width: 15px; height: 15px; cursor: pointer; }
.cb-dropdown__arrow { width: 16px; height: 16px; flex-shrink: 0; color: #94A3B8; transition: transform .2s; }
.cb-dropdown.open .cb-dropdown__arrow { transform: rotate(180deg); }

/* ===== CUSTOM CHECKBOX (export modal columns) ===== */
.col-check {
    appearance: none; -webkit-appearance: none;
    width: 16px; height: 16px; min-width: 16px;
    border: 1.5px solid #CBD5E1; border-radius: 4px;
    background: #fff; cursor: pointer;
    position: relative; transition: background .15s, border-color .15s;
}
.col-check:checked {
    background: #2563EB; border-color: #2563EB;
}
.col-check:checked::after {
    content: '';
    position: absolute; left: 4px; top: 1.5px;
    width: 5px; height: 9px;
    border: 2px solid #fff; border-top: none; border-left: none;
    transform: rotate(45deg);
}
.col-check:disabled { background: #F1F5F9; border-color: #E2E8F0; cursor: not-allowed; }
.col-check:disabled:checked { background: #93C5FD; border-color: #93C5FD; }
.col-check:not(:disabled):hover { border-color: #3B82F6; }
html.dark .col-check { background: #1E293B; border-color: #475569; }
html.dark .col-check:checked { background: #2563EB; border-color: #2563EB; }
html.dark .col-check:disabled { background: #0F172A; border-color: #334155; }

/* ===== DARK MODE ===== */
html.dark .panel-nav {
    background: rgba(15, 23, 42, 0.95);
    border-bottom-color: rgba(51, 65, 85, 0.8);
}
html.dark .nav-link-active {
    color: #60A5FA !important;
    background: rgba(59, 130, 246, 0.12) !important;
}
html.dark .nav-link-active::after {
    background: linear-gradient(90deg, #3B82F6, #60A5FA);
}
html.dark .more-menu__item { color: #CBD5E1; }
html.dark .more-menu__item:hover { background: #1E293B; color: #60A5FA; }
html.dark .more-menu__item--active { color: #60A5FA; background: rgba(59,130,246,0.12); }
html.dark #more-dropdown > .more-menu,
html.dark #manager-more-dropdown > .more-menu {
    background: #1E293B;
    border-color: #334155;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

/* Cards & surfaces */
html.dark .stat-card,
html.dark .shift-card,
html.dark .quick-card,
html.dark .info-card,
html.dark .plan-card { background: #1E293B; border-color: #334155; color: #E2E8F0; }
html.dark .info-card-header { background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%); border-bottom-color: #334155; }
html.dark .shift-card:hover { border-color: #3B82F6; box-shadow: 0 4px 24px rgba(59,130,246,0.15); }
html.dark .quick-card:hover { box-shadow: 0 8px 32px rgba(59,130,246,0.15), 0 2px 8px rgba(0,0,0,0.2); }
html.dark .plan-card--featured { border-color: #3B82F6; background: linear-gradient(180deg, #1E293B 0%, #0F172A 20%); }
html.dark .plan-card--selected { border-color: #3B82F6; background: linear-gradient(180deg, #1E293B 0%, #0F172A 20%); box-shadow: 0 0 0 3px rgba(59,130,246,0.22), 0 8px 32px rgba(59,130,246,0.15); }
html.dark .plan-name { color: #F1F5F9; }
html.dark .plan-amount { color: #F1F5F9; }
html.dark .plan-features li { color: #CBD5E1; }
html.dark .plan-features li.plan-feature--disabled { color: #64748B; }
html.dark .plan-features li.plan-feature--highlight { color: #93C5FD; background: rgba(59,130,246,0.12); }
html.dark .plan-features li.plan-feature--limited { color: #94A3B8; }
html.dark .plan-info-tip { background: rgba(59,130,246,0.16); border-color: #2563EB; color: #93C5FD; }

/* Forms */
html.dark input, html.dark textarea, html.dark select {
    background: rgba(30, 41, 59, 0.8);
    border-color: #475569;
    color: #E2E8F0;
}
html.dark input[type="checkbox"]:not(.toggle-switch) {
    border: 1px solid #64748B;
    border-radius: 3px;
}
html.dark input::placeholder, html.dark textarea::placeholder { color: #64748B; }
html.dark input:focus, html.dark textarea:focus, html.dark select:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
    background: #1E293B;
}
html.dark input.toggle-switch {
    background: #334155;
    border: 1px solid #64748B;
}
html.dark input.toggle-switch::before {
    background: #F8FAFC;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
html.dark input.toggle-switch:checked {
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    border-color: #3B82F6;
}
html.dark input.toggle-switch:focus-visible {
    box-shadow: 0 0 0 3px rgba(59,130,246,0.3);
}

/* Tables */
html.dark .table-row:hover { background: #1E293B; }
html.dark table th { color: #94A3B8; }
html.dark table td { color: #CBD5E1; border-color: #334155; }

/* Schedule status colors */
.schedule-legend-dot {
    display: inline-block;
    flex-shrink: 0;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 0.25rem;
    border: 1px solid currentColor;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.5);
}
.schedule-legend-dot--green { background: #BBF7D0; color: #22C55E; }
.schedule-legend-dot--yellow { background: #FEF08A; color: #EAB308; }
.schedule-legend-dot--red { background: #FECACA; color: #EF4444; }
.schedule-legend-dot--gray { background: #E2E8F0; color: #94A3B8; }

html.dark .schedule-status-cell {
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
html.dark .schedule-status-cell::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
}
html.dark .schedule-status-cell--green {
    background-color: rgba(22, 163, 74, 0.24) !important;
}
html.dark .schedule-status-cell--green::before { background: #4ADE80; }
html.dark .schedule-status-cell--yellow {
    background-color: rgba(234, 179, 8, 0.26) !important;
}
html.dark .schedule-status-cell--yellow::before { background: #FACC15; }
html.dark .schedule-status-cell--red {
    background-color: rgba(239, 68, 68, 0.26) !important;
}
html.dark .schedule-status-cell--red::before { background: #F87171; }
html.dark .schedule-status-cell--blue {
    background-color: rgba(59, 130, 246, 0.26) !important;
}
html.dark .schedule-status-cell--blue::before { background: #60A5FA; }
html.dark .schedule-status-cell--gray {
    background-color: rgba(148, 163, 184, 0.18) !important;
}
html.dark .schedule-status-cell--gray::before { background: #CBD5E1; }
html.dark .schedule-status-cell--green .text-gray-700,
html.dark .schedule-status-cell--yellow .text-gray-700,
html.dark .schedule-status-cell--red .text-gray-700,
html.dark .schedule-status-cell--blue .text-gray-700,
html.dark .schedule-status-cell--gray .text-gray-700 {
    color: #EAF2FF !important;
}
html.dark .schedule-status-cell--green .text-green-700 { color: #86EFAC !important; }
html.dark .schedule-status-cell--yellow .text-yellow-700 { color: #FDE047 !important; }
html.dark .schedule-status-cell--red .text-red-700 { color: #FCA5A5 !important; }
html.dark .schedule-status-cell--blue .text-blue-700 { color: #93C5FD !important; }
html.dark .schedule-status-cell--gray .text-gray-500 { color: #CBD5E1 !important; }

html.dark .schedule-status-chip {
    border-left: 3px solid currentColor;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}
html.dark .schedule-status-chip--green {
    background-color: rgba(22, 163, 74, 0.28) !important;
    color: #86EFAC !important;
}
html.dark .schedule-status-chip--yellow {
    background-color: rgba(234, 179, 8, 0.3) !important;
    color: #FDE047 !important;
}
html.dark .schedule-status-chip--red {
    background-color: rgba(239, 68, 68, 0.3) !important;
    color: #FCA5A5 !important;
}
html.dark .schedule-status-chip--blue {
    background-color: rgba(59, 130, 246, 0.28) !important;
    color: #93C5FD !important;
}
html.dark .schedule-status-chip--gray {
    background-color: rgba(148, 163, 184, 0.18) !important;
    color: #CBD5E1 !important;
}
html.dark .schedule-legend-dot {
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.9), 0 0 0 3px currentColor;
}
html.dark .schedule-legend-dot--green { background: #4ADE80; color: #22C55E; }
html.dark .schedule-legend-dot--yellow { background: #FACC15; color: #EAB308; }
html.dark .schedule-legend-dot--red { background: #F87171; color: #EF4444; }
html.dark .schedule-legend-dot--gray { background: #CBD5E1; color: #94A3B8; }

/* Badge */
html.dark .badge { opacity: 0.9; }

/* Pagination */
html.dark .page-btn { background: #1E293B; border-color: #334155; color: #CBD5E1; }
html.dark .page-btn:hover { background: #334155; border-color: #3B82F6; color: #60A5FA; }

/* Mobile tab bar */
html.dark .mobile-tab-bar {
    background: rgba(15, 23, 42, 0.96);
    border-top-color: rgba(51, 65, 85, 0.8);
}
html.dark .object-form-actions {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(51, 65, 85, 0.9);
}
html.dark .tab-item { color: #64748B; }
html.dark .tab-item svg { color: #64748B; }
html.dark .tab-active { color: #60A5FA !important; background: rgba(59,130,246,0.12); }
html.dark .tab-active svg { color: #60A5FA !important; }
html.dark .tab-active::after { background: #60A5FA; }

/* Mobile more sheet */
html.dark .mobile-more-sheet { background: #1E293B; }
html.dark .mobile-more-sheet__handle { background: #475569; }
html.dark .mobile-more-sheet__item { color: #CBD5E1; }
html.dark .mobile-more-sheet__item:active { background: #334155; }
html.dark .mobile-more-sheet__item--active { background: rgba(59,130,246,0.12); color: #60A5FA; }
html.dark .mobile-more-sheet__divider { background: #334155; }
html.dark .mobile-more-sheet__item--danger { color: #F87171; }

/* Invite banner */
html.dark .invite-banner { background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%); border-color: rgba(59,130,246,0.2); }

/* Empty state */
html.dark .empty-state { background: linear-gradient(180deg, #1E293B 0%, #0F172A 100%); }

/* Page heading */
html.dark .page-heading { color: #F1F5F9; }

/* Period selector */
html.dark .period-active { background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(59,130,246,0.1)); border-color: #3B82F6; color: #60A5FA; }

/* Checkbox dropdown */
html.dark .cb-dropdown__btn { background: #1E293B; border-color: #475569; color: #CBD5E1; }
html.dark .cb-dropdown__panel { background: #1E293B; border-color: #475569; box-shadow: 0 4px 16px rgba(0,0,0,.3); }
html.dark .cb-dropdown__item { color: #CBD5E1; }
html.dark .cb-dropdown__item:hover { background: rgba(59,130,246,0.1); }

/* Modal */
html.dark .modal-backdrop { background: rgba(0,0,0,0.6); }

/* Toast */
html.dark .toast--success { background: #065f46; }
html.dark .toast--error { background: #1E293B; border: 1px solid #475569; }

/* PWA banner */
html.dark .pwa-banner-inner { background: #1E293B; border-color: #334155; }
html.dark .pwa-banner-title { color: #F1F5F9; }
html.dark .pwa-banner-desc { color: #94A3B8; }

/* Cookie banner */
html.dark .panel-cookie-banner__inner { background: #1E293B; border-color: #334155; }
html.dark .panel-cookie-banner__title { color: #F8FAFC; }
html.dark .panel-cookie-banner__desc { color: #CBD5E1; }
html.dark .panel-cookie-banner__link { color: #60A5FA; }
html.dark .panel-cookie-banner__link:hover { color: #93C5FD; }
html.dark .panel-cookie-banner__btn--ghost { color: #CBD5E1; background: #334155; border-color: #475569; }
html.dark .panel-cookie-banner__btn--ghost:hover { color: #F8FAFC; background: #475569; }

/* PWA modal */
html.dark .pwa-modal-card { background: #1E293B; }
html.dark .pwa-modal-title { color: #F1F5F9; }
html.dark .pwa-modal-sub { color: #94A3B8; }
html.dark .pwa-modal-benefit { border-bottom-color: #334155; }
html.dark .pwa-modal-benefit-title { color: #E2E8F0; }
html.dark .pwa-modal-benefit-desc { color: #94A3B8; }
html.dark .pwa-modal-x { background: #334155; color: #94A3B8; }
html.dark .pwa-modal-x:hover { background: #475569; }
html.dark .pwa-modal-btn-secondary { background: #334155; color: #93C5FD; }
html.dark .pwa-modal-btn-secondary:hover { background: #475569; }
html.dark .pwa-modal-later { color: #64748B; }
html.dark .pwa-modal-later:hover { color: #94A3B8; }

/* Generic overrides for Tailwind utility colors in dark mode */
html.dark .bg-white { background-color: #1E293B !important; }
html.dark .bg-gray-50 { background-color: #0F172A !important; }
html.dark .bg-gray-100 { background-color: #1E293B !important; }
html.dark .border-gray-100, html.dark .border-gray-200 { border-color: #334155 !important; }
html.dark .border-gray-300 { border-color: #475569 !important; }
html.dark .text-gray-900 { color: #F1F5F9 !important; }
html.dark .text-gray-800 { color: #E2E8F0 !important; }
html.dark .text-gray-700 { color: #CBD5E1 !important; }
html.dark .text-gray-600 { color: #94A3B8 !important; }
html.dark .text-gray-500 { color: #94A3B8 !important; }
html.dark .text-gray-400 { color: #64748B !important; }
html.dark .divide-gray-100 > * + *, html.dark .divide-gray-200 > * + * { border-color: #334155 !important; }
html.dark .ring-gray-200, html.dark .ring-gray-100 { --tw-ring-color: #334155 !important; }
html.dark .shadow-sm, html.dark .shadow { box-shadow: 0 1px 3px rgba(0,0,0,0.3) !important; }

/* Tailwind pastel utility overrides (panel-wide) */
html.dark .bg-white\/70 { background-color: rgba(30, 41, 59, 0.7) !important; }
html.dark .bg-white\/80 { background-color: rgba(30, 41, 59, 0.8) !important; }
html.dark .bg-white\/90 { background-color: rgba(30, 41, 59, 0.9) !important; }

html.dark .bg-blue-50 { background-color: rgba(30, 64, 175, 0.26) !important; }
html.dark .bg-blue-100 { background-color: rgba(30, 64, 175, 0.38) !important; }
html.dark .bg-cyan-50 { background-color: rgba(8, 47, 73, 0.38) !important; }
html.dark .bg-cyan-100 { background-color: rgba(14, 116, 144, 0.35) !important; }
html.dark .bg-indigo-50 { background-color: rgba(49, 46, 129, 0.34) !important; }
html.dark .bg-indigo-100 { background-color: rgba(67, 56, 202, 0.34) !important; }
html.dark .bg-purple-50 { background-color: rgba(88, 28, 135, 0.34) !important; }
html.dark .bg-purple-100 { background-color: rgba(107, 33, 168, 0.34) !important; }
html.dark .bg-amber-50 { background-color: rgba(120, 53, 15, 0.34) !important; }
html.dark .bg-amber-100 { background-color: rgba(146, 64, 14, 0.34) !important; }
html.dark .bg-yellow-50 { background-color: rgba(113, 63, 18, 0.34) !important; }
html.dark .bg-yellow-100 { background-color: rgba(133, 77, 14, 0.34) !important; }
html.dark .bg-orange-50 { background-color: rgba(124, 45, 18, 0.34) !important; }
html.dark .bg-orange-100 { background-color: rgba(154, 52, 18, 0.34) !important; }
html.dark .bg-green-50 { background-color: rgba(20, 83, 45, 0.34) !important; }
html.dark .bg-green-100 { background-color: rgba(21, 128, 61, 0.3) !important; }
html.dark .bg-red-50 { background-color: rgba(127, 29, 29, 0.34) !important; }
html.dark .bg-red-100 { background-color: rgba(153, 27, 27, 0.34) !important; }

html.dark .bg-gray-50\/50 { background-color: rgba(15, 23, 42, 0.72) !important; }
html.dark .bg-blue-50\/30 { background-color: rgba(30, 64, 175, 0.18) !important; }
html.dark .bg-blue-50\/40 { background-color: rgba(30, 64, 175, 0.22) !important; }
html.dark .bg-blue-50\/50 { background-color: rgba(30, 64, 175, 0.26) !important; }
html.dark .bg-green-50\/50 { background-color: rgba(20, 83, 45, 0.22) !important; }
html.dark .bg-amber-50\/50 { background-color: rgba(120, 53, 15, 0.22) !important; }
html.dark .bg-purple-50\/50 { background-color: rgba(88, 28, 135, 0.22) !important; }

html.dark .border-blue-100, html.dark .border-blue-200 { border-color: rgba(96, 165, 250, 0.38) !important; }
html.dark .border-cyan-100, html.dark .border-cyan-200 { border-color: rgba(103, 232, 249, 0.34) !important; }
html.dark .border-indigo-100, html.dark .border-indigo-200 { border-color: rgba(129, 140, 248, 0.34) !important; }
html.dark .border-purple-100, html.dark .border-purple-200 { border-color: rgba(167, 139, 250, 0.34) !important; }
html.dark .border-amber-100, html.dark .border-amber-200 { border-color: rgba(251, 191, 36, 0.4) !important; }
html.dark .border-yellow-100, html.dark .border-yellow-200 { border-color: rgba(250, 204, 21, 0.4) !important; }
html.dark .border-orange-100, html.dark .border-orange-200 { border-color: rgba(251, 146, 60, 0.36) !important; }
html.dark .border-green-100, html.dark .border-green-200 { border-color: rgba(74, 222, 128, 0.34) !important; }
html.dark .border-red-100, html.dark .border-red-200 { border-color: rgba(248, 113, 113, 0.34) !important; }

html.dark .text-blue-800, html.dark .text-blue-700, html.dark .text-blue-600 { color: #93C5FD !important; }
html.dark .text-cyan-800, html.dark .text-cyan-700, html.dark .text-cyan-600 { color: #67E8F9 !important; }
html.dark .text-indigo-800, html.dark .text-indigo-700, html.dark .text-indigo-600 { color: #A5B4FC !important; }
html.dark .text-purple-800, html.dark .text-purple-700, html.dark .text-purple-600 { color: #C4B5FD !important; }
html.dark .text-amber-900, html.dark .text-amber-800, html.dark .text-amber-700, html.dark .text-amber-600 { color: #FCD34D !important; }
html.dark .text-yellow-900, html.dark .text-yellow-800, html.dark .text-yellow-700, html.dark .text-yellow-600 { color: #FDE047 !important; }
html.dark .text-orange-800, html.dark .text-orange-700, html.dark .text-orange-600 { color: #FDBA74 !important; }
html.dark .text-green-800, html.dark .text-green-700, html.dark .text-green-600 { color: #86EFAC !important; }
html.dark .text-red-900, html.dark .text-red-800, html.dark .text-red-700, html.dark .text-red-600 { color: #FCA5A5 !important; }

html.dark .hover\:bg-blue-50:hover { background-color: rgba(30, 64, 175, 0.28) !important; }
html.dark .hover\:bg-blue-50\/50:hover { background-color: rgba(30, 64, 175, 0.24) !important; }
html.dark .hover\:bg-purple-50:hover { background-color: rgba(88, 28, 135, 0.26) !important; }
html.dark .hover\:bg-purple-100:hover { background-color: rgba(107, 33, 168, 0.3) !important; }
html.dark .hover\:bg-cyan-50:hover { background-color: rgba(8, 47, 73, 0.34) !important; }
html.dark .hover\:bg-amber-50:hover { background-color: rgba(120, 53, 15, 0.3) !important; }
html.dark .hover\:bg-yellow-50:hover { background-color: rgba(113, 63, 18, 0.3) !important; }
html.dark .hover\:bg-red-50:hover { background-color: rgba(127, 29, 29, 0.3) !important; }
html.dark .hover\:bg-red-100:hover { background-color: rgba(153, 27, 27, 0.34) !important; }
html.dark .hover\:bg-gray-50:hover { background-color: #1E293B !important; }

html.dark .schedule-status-cell--green:hover { background-color: rgba(22, 163, 74, 0.28) !important; }
html.dark .schedule-status-cell--yellow:hover { background-color: rgba(234, 179, 8, 0.3) !important; }
html.dark .schedule-status-cell--red:hover { background-color: rgba(239, 68, 68, 0.3) !important; }
html.dark .schedule-status-cell--blue:hover { background-color: rgba(59, 130, 246, 0.3) !important; }
html.dark .schedule-status-cell--gray:hover { background-color: rgba(148, 163, 184, 0.22) !important; }

html.dark .from-gray-50 {
    --tw-gradient-from: #1F2937 var(--tw-gradient-from-position) !important;
    --tw-gradient-to: rgb(31 41 55 / 0) var(--tw-gradient-to-position) !important;
}
html.dark .to-gray-50 { --tw-gradient-to: #1F2937 var(--tw-gradient-to-position) !important; }
html.dark .to-gray-50\/50 { --tw-gradient-to: rgba(31, 41, 55, 0.5) var(--tw-gradient-to-position) !important; }

html.dark .from-blue-50 {
    --tw-gradient-from: rgba(30, 64, 175, 0.36) var(--tw-gradient-from-position) !important;
    --tw-gradient-to: rgb(30 64 175 / 0) var(--tw-gradient-to-position) !important;
}
html.dark .to-blue-50 { --tw-gradient-to: rgba(30, 64, 175, 0.32) var(--tw-gradient-to-position) !important; }
html.dark .from-cyan-50 {
    --tw-gradient-from: rgba(8, 47, 73, 0.5) var(--tw-gradient-from-position) !important;
    --tw-gradient-to: rgb(8 47 73 / 0) var(--tw-gradient-to-position) !important;
}
html.dark .to-cyan-50 { --tw-gradient-to: rgba(8, 47, 73, 0.4) var(--tw-gradient-to-position) !important; }
html.dark .from-indigo-50 {
    --tw-gradient-from: rgba(49, 46, 129, 0.42) var(--tw-gradient-from-position) !important;
    --tw-gradient-to: rgb(49 46 129 / 0) var(--tw-gradient-to-position) !important;
}
html.dark .to-indigo-50 { --tw-gradient-to: rgba(49, 46, 129, 0.36) var(--tw-gradient-to-position) !important; }
html.dark .from-purple-50 {
    --tw-gradient-from: rgba(88, 28, 135, 0.42) var(--tw-gradient-from-position) !important;
    --tw-gradient-to: rgb(88 28 135 / 0) var(--tw-gradient-to-position) !important;
}
html.dark .to-purple-50 { --tw-gradient-to: rgba(88, 28, 135, 0.36) var(--tw-gradient-to-position) !important; }
html.dark .to-purple-50\/50 { --tw-gradient-to: rgba(88, 28, 135, 0.22) var(--tw-gradient-to-position) !important; }
html.dark .from-green-50 {
    --tw-gradient-from: rgba(20, 83, 45, 0.42) var(--tw-gradient-from-position) !important;
    --tw-gradient-to: rgb(20 83 45 / 0) var(--tw-gradient-to-position) !important;
}
html.dark .via-green-50\/50 { --tw-gradient-stops: var(--tw-gradient-from), rgba(20, 83, 45, 0.26) var(--tw-gradient-via-position), var(--tw-gradient-to) !important; }
html.dark .to-emerald-50 { --tw-gradient-to: rgba(6, 78, 59, 0.32) var(--tw-gradient-to-position) !important; }
html.dark .from-amber-50 {
    --tw-gradient-from: rgba(120, 53, 15, 0.42) var(--tw-gradient-from-position) !important;
    --tw-gradient-to: rgb(120 53 15 / 0) var(--tw-gradient-to-position) !important;
}
html.dark .to-orange-50 { --tw-gradient-to: rgba(124, 45, 18, 0.34) var(--tw-gradient-to-position) !important; }

.schedule-status-cell--green { background-color: #DCFCE7 !important; }
.schedule-status-cell--yellow { background-color: #FEF9C3 !important; }
.schedule-status-cell--red { background-color: #FEE2E2 !important; }
.schedule-status-cell--blue { background-color: #DBEAFE !important; }
.schedule-status-cell--gray { background-color: #F1F5F9 !important; }

.schedule-status-cell--green { box-shadow: inset 3px 0 0 #22C55E; }
.schedule-status-cell--yellow { box-shadow: inset 3px 0 0 #EAB308; }
.schedule-status-cell--red { box-shadow: inset 3px 0 0 #EF4444; }
.schedule-status-cell--blue { box-shadow: inset 3px 0 0 #3B82F6; }
.schedule-status-cell--gray { box-shadow: inset 3px 0 0 #94A3B8; }

html.dark .schedule-status-cell--green,
html.dark .schedule-status-cell--green:hover {
    background-color: rgba(22, 163, 74, 0.36) !important;
    box-shadow: inset 3px 0 0 #4ADE80, inset 0 0 0 1px rgba(74,222,128,0.18);
}
html.dark .schedule-status-cell--yellow,
html.dark .schedule-status-cell--yellow:hover {
    background-color: rgba(234, 179, 8, 0.38) !important;
    box-shadow: inset 3px 0 0 #FACC15, inset 0 0 0 1px rgba(250,204,21,0.2);
}
html.dark .schedule-status-cell--red,
html.dark .schedule-status-cell--red:hover {
    background-color: rgba(239, 68, 68, 0.38) !important;
    box-shadow: inset 3px 0 0 #F87171, inset 0 0 0 1px rgba(248,113,113,0.2);
}
html.dark .schedule-status-cell--blue,
html.dark .schedule-status-cell--blue:hover {
    background-color: rgba(59, 130, 246, 0.36) !important;
    box-shadow: inset 3px 0 0 #60A5FA, inset 0 0 0 1px rgba(96,165,250,0.2);
}
html.dark .schedule-status-cell--gray,
html.dark .schedule-status-cell--gray:hover {
    background-color: rgba(148, 163, 184, 0.24) !important;
    box-shadow: inset 3px 0 0 #CBD5E1, inset 0 0 0 1px rgba(203,213,225,0.16);
}

html.dark .schedule-status-chip--green { background-color: rgba(22, 163, 74, 0.4) !important; color: #BBF7D0 !important; }
html.dark .schedule-status-chip--yellow { background-color: rgba(234, 179, 8, 0.42) !important; color: #FEF08A !important; }
html.dark .schedule-status-chip--red { background-color: rgba(239, 68, 68, 0.42) !important; color: #FECACA !important; }
html.dark .schedule-status-chip--blue { background-color: rgba(59, 130, 246, 0.4) !important; color: #BFDBFE !important; }
html.dark .schedule-status-chip--gray { background-color: rgba(148, 163, 184, 0.26) !important; color: #E2E8F0 !important; }

.schedule-status-cell--active,
.schedule-status-cell--active:hover {
    background-color: var(--schedule-bg) !important;
    box-shadow: inset 3px 0 0 var(--schedule-accent), inset 0 0 0 1px rgba(15,23,42,0.06) !important;
}
.schedule-status-chip--active {
    background-color: var(--schedule-bg) !important;
    border-left: 3px solid var(--schedule-accent) !important;
    color: var(--schedule-fg) !important;
}
html.dark .schedule-status-cell--active,
html.dark .schedule-status-cell--active:hover {
    background-color: var(--schedule-bg-dark) !important;
    box-shadow: inset 3px 0 0 var(--schedule-accent), inset 0 0 0 1px rgba(255,255,255,0.08) !important;
}
html.dark .schedule-status-chip--active {
    background-color: var(--schedule-bg-dark) !important;
    color: var(--schedule-fg-dark) !important;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   TAILWIND FALLBACK — защитный слой на случай, если CDN Tailwind не загрузился
   (CSP/блокировщики/сбой сети). Дублирует значения самых ходовых утилит,
   чтобы иконки/логотипы/картинки никогда не расплывались на весь экран.
   Значения идентичны Tailwind, поэтому конфликтов при рабочем CDN нет.
   ========================================================================== */

/* Базовые ограничители для медиа. Без них <img> и <svg> без inline-размеров
   рендерятся в натуральную величину (логотип 800px, SVG на всю ширину flex). */
img { max-width: 100%; height: auto; }
svg { max-width: 100%; }
svg:not([class*="w-"]):not([class*="h-"]):not([width]) {
    width: 1.25rem;
    height: 1.25rem;
}

/* Страховка для лого в шапке панели */
.panel-nav img { max-height: 56px; width: auto; }

/* width/height utilities (Tailwind scale: 1 = 0.25rem) */
.w-0{width:0}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-2{width:.5rem}
.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-5{width:1.25rem}
.w-6{width:1.5rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-9{width:2.25rem}
.w-10{width:2.5rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}
.w-20{width:5rem}.w-32{width:8rem}.w-48{width:12rem}.w-64{width:16rem}
.w-auto{width:auto}.w-full{width:100%}.w-screen{width:100vw}.w-px{width:1px}

.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-2{height:.5rem}
.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}
.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}
.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}
.h-20{height:5rem}.h-32{height:8rem}.h-48{height:12rem}.h-64{height:16rem}
.h-auto{height:auto}.h-full{height:100%}.h-screen{height:100vh}.h-px{height:1px}

/* min/max размеры */
.min-w-0{min-width:0}
.min-h-screen{min-height:100vh}
.max-w-xs{max-width:20rem}.max-w-sm{max-width:24rem}.max-w-md{max-width:28rem}
.max-w-lg{max-width:32rem}.max-w-xl{max-width:36rem}.max-w-2xl{max-width:42rem}
.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-6xl{max-width:72rem}
.max-w-full{max-width:100%}
.max-h-48{max-height:12rem}.max-h-64{max-height:16rem}

/* object-fit — чтобы фото смен не растягивались */
.object-cover{object-fit:cover}.object-contain{object-fit:contain}

/* flex-shrink — чтобы иконки в flex-строках не сжимались до 0 */
.flex-shrink-0{flex-shrink:0}.shrink-0{flex-shrink:0}

/* ===== LOADING SPINNER on buttons ===== */
@keyframes btn-spin{to{transform:rotate(360deg)}}
.btn-loading{pointer-events:none;opacity:.65}
.btn-loading .btn-spinner{display:inline-block}
.btn-spinner{display:none;width:1em;height:1em;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:btn-spin .5s linear infinite;vertical-align:middle;margin-right:.4em}

/* ===== TOAST ===== */
.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);padding:12px 24px;border-radius:12px;font-size:14px;font-weight:500;z-index:9999;box-shadow:0 4px 12px rgba(0,0,0,.15);transition:opacity .3s}
.toast--success{background:#065f46;color:#fff}
.toast--error{background:#1f2937;color:#fff}

/* ===== PAGE PROGRESS BAR ===== */
@keyframes progress-grow{0%{width:0}50%{width:70%}100%{width:95%}}
#page-progress{position:fixed;top:0;left:0;height:3px;background:linear-gradient(90deg,#2563EB,#3B82F6);z-index:9999;animation:progress-grow 1.5s ease-out forwards;pointer-events:none;border-radius:0 2px 2px 0}

/* ===== MOBILE TOUCH TARGETS ===== */
@media(max-width:640px){
    button[type=submit], .page-btn, [data-copy], [data-confirm-delete] { min-height:44px; min-width:44px; }
    .table-row td { padding-top:12px; padding-bottom:12px; }
}

/* ===== INVOICE REQUEST (оплата по счёту для юрлиц) ===== */
.plan-invoice-link{display:block;width:100%;margin-top:10px;padding:0;background:none;border:none;font-size:.8rem;color:#94A3B8;text-align:center;cursor:pointer;text-decoration:none;transition:color .15s}
.plan-invoice-link:hover{color:#2563EB;text-decoration:underline}
html.dark .plan-invoice-link{color:#64748B}
html.dark .plan-invoice-link:hover{color:#93C5FD}
.invoice-modal{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:16px}
.invoice-modal.hidden{display:none}
.invoice-modal__backdrop{position:absolute;inset:0;background:rgba(15,23,42,.55)}
.invoice-modal__dialog{position:relative;background:#fff;border-radius:16px;box-shadow:0 24px 64px rgba(0,0,0,.24);width:100%;max-width:420px;padding:26px 24px 24px;max-height:90vh;overflow-y:auto}
html.dark .invoice-modal__dialog{background:#1E293B;box-shadow:0 24px 64px rgba(0,0,0,.5)}
.invoice-modal__close{position:absolute;top:12px;right:14px;background:none;border:none;font-size:26px;line-height:1;color:#94A3B8;cursor:pointer}
.invoice-modal__close:hover{color:#475569}
html.dark .invoice-modal__close:hover{color:#CBD5E1}
.invoice-modal__title{margin:0 0 6px;font-size:1.15rem;font-weight:800;color:#1E3A5F}
html.dark .invoice-modal__title{color:#F1F5F9}
.invoice-modal__summary{margin:0 0 16px;font-size:.9rem;color:#475569}
html.dark .invoice-modal__summary{color:#94A3B8}
.invoice-modal__summary strong{color:#1E3A5F;white-space:nowrap}
html.dark .invoice-modal__summary strong{color:#E2E8F0}
.invoice-form{display:flex;flex-direction:column;gap:12px}
.invoice-field{display:flex;flex-direction:column;gap:4px;font-size:.82rem;color:#475569;font-weight:600}
html.dark .invoice-field{color:#CBD5E1}
.invoice-field input{padding:10px 12px;border:1.5px solid #CBD5E1;border-radius:10px;font-size:.95rem;color:#1E293B;font-weight:400}
.invoice-field input:focus{outline:none;border-color:#2563EB;box-shadow:0 0 0 3px rgba(37,99,235,.12)}
html.dark .invoice-field input{background:#0F172A;border-color:#334155;color:#F1F5F9}
.invoice-form__error{color:#DC2626;font-size:.82rem;font-weight:600}
html.dark .invoice-form__error{color:#F87171}
.invoice-form .plan-btn{margin-top:4px;border:0}
.invoice-modal__success{padding:18px 4px;text-align:center;font-size:.95rem;color:#15803D;font-weight:600}
html.dark .invoice-modal__success{color:#4ADE80}

/* Правовые ссылки в подвале панели. Стили живут здесь, а не в Tailwind-классах:
   на /panel/auth/* tw-built.css не подключается, а style.css грузится везде. */
.gt-legal-footer{padding:24px 16px 32px;text-align:center;font-size:12px;line-height:1.7;color:#94A3B8}
.gt-legal-footer a{color:#64748B;text-decoration:none;border-bottom:1px solid transparent}
.gt-legal-footer a:hover{color:#2563EB;border-bottom-color:#BFDBFE}
.gt-legal-footer__sep{margin:0 6px;opacity:.5}
html.dark .gt-legal-footer{color:#64748B}
html.dark .gt-legal-footer a{color:#94A3B8}
html.dark .gt-legal-footer a:hover{color:#93C5FD;border-bottom-color:#1E40AF}

/* Тактильный отклик на нажатие — важно на тач-экранах, где нет hover */
button:active,
[role="button"]:active { transform: translateY(1px); }

/* Комфортная зона нажатия (стандарт 44px) у иконочных кнопок шапки */
[data-notification-toggle],
[data-notification-close],
#theme-toggle { min-width: 44px; min-height: 44px; }
