/* ============================================================
   Универсал Кредит — Corporate Design System
   Строгий банковский стиль в синих тонах
   ============================================================ */

:root {
    /* Корпоративная синяя палитра */
    --brand-50:  #f0f6fb;
    --brand-100: #dbe9f4;
    --brand-200: #b9d2e8;
    --brand-300: #8eb5d7;
    --brand-400: #5b8fbf;
    --brand-500: #2b6cb0;     /* основной */
    --brand-600: #1f5494;
    --brand-700: #173f74;
    --brand-800: #112d55;
    --brand-900: #0b1f3d;

    --accent-500: #c89436;    /* золотистый акцент (сдержанный) */
    --accent-600: #a87923;

    --success-500: #1f8a52;
    --warning-500: #b8770a;
    --danger-500:  #b91c1c;
    --info-500:    #1f5494;

    /* Нейтральная палитра */
    --bg:          #f4f6f9;
    --bg-card:     #ffffff;
    --bg-subtle:   #eef2f7;
    --bg-strong:   #e4e9f1;

    --text:        #0f1c2e;
    --text-soft:   #3a4b63;
    --text-muted:  #6b7a90;

    --border:      #d8dee8;
    --border-soft: #e6ebf2;
    --ring:        rgba(43, 108, 176, 0.18);

    --shadow-sm: 0 1px 2px rgba(15, 28, 46, 0.05);
    --shadow:    0 4px 12px rgba(15, 28, 46, 0.07);
    --shadow-md: 0 8px 24px rgba(15, 28, 46, 0.09);

    --radius-sm: 6px;
    --radius:    10px;
    --radius-lg: 14px;

    --transition: 180ms ease;
}

[data-theme="dark"] {
    --bg:          #0c1626;
    --bg-card:     #11203a;
    --bg-subtle:   #15273f;
    --bg-strong:   #1c3151;

    --text:        #e6ebf2;
    --text-soft:   #c5cfdf;
    --text-muted:  #8696b0;

    --border:      #1f3457;
    --border-soft: #1a2c4a;
    --ring:        rgba(142, 181, 215, 0.2);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow:    0 6px 16px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 12px 28px rgba(0, 0, 0, 0.4);
}

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

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.55;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--brand-600); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--brand-700); text-decoration: underline; }

h1, h2, h3, h4, h5 { font-weight: 700; margin: 0 0 0.75rem; line-height: 1.25; color: var(--text); letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1rem; color: var(--text-soft); }
small { color: var(--text-muted); font-size: 0.85rem; }

.container { width: 100%; max-width: 1240px; padding: 0 1.25rem; margin: 0 auto; }
.container-narrow { max-width: 920px; }

/* ============= Typography utility ============= */
.text-muted { color: var(--text-muted) !important; }
.text-soft  { color: var(--text-soft) !important; }
.text-success { color: var(--success-500); }
.text-warning { color: var(--warning-500); }
.text-danger  { color: var(--danger-500); }
.text-brand   { color: var(--brand-600); }
.uppercase { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; }

/* ============= Layout helpers ============= */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }
.wrap { flex-wrap: wrap; }
.grow { flex-grow: 1; }
.text-center { text-align: center; }
.hidden { display: none !important; }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

@media (max-width: 960px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ============= Buttons ============= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .65rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: .92rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; }

.btn-primary {
    background: var(--brand-600);
    color: #fff;
    border-color: var(--brand-600);
}
.btn-primary:hover { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg-subtle); color: var(--text); }

.btn-soft {
    background: var(--brand-50);
    color: var(--brand-700);
    border-color: var(--brand-100);
}
[data-theme="dark"] .btn-soft { background: rgba(43, 108, 176, 0.18); color: var(--brand-200); border-color: transparent; }
.btn-soft:hover { background: var(--brand-100); color: var(--brand-700); }

.btn-success { background: var(--success-500); color: #fff; border-color: var(--success-500); }
.btn-success:hover { background: #176c41; border-color: #176c41; color: #fff; }
.btn-warning { background: var(--warning-500); color: #fff; border-color: var(--warning-500); }
.btn-warning:hover { background: #966007; color: #fff; }
.btn-danger  { background: var(--danger-500); color: #fff; border-color: var(--danger-500); }
.btn-danger:hover  { background: #991818; color: #fff; }

.btn-sm { padding: .45rem .9rem; font-size: .82rem; }
.btn-lg { padding: .85rem 1.6rem; font-size: 1rem; }
.btn-icon { padding: .45rem; width: 2.25rem; height: 2.25rem; border-radius: var(--radius-sm); }
.btn-full { width: 100%; }

/* ============= Cards ============= */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow var(--transition), border-color var(--transition);
}
.card:hover { box-shadow: var(--shadow); }
.card-body { padding: 1.5rem; }
.card-head {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-soft);
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    background: var(--bg-subtle);
}
.card-title { margin: 0; font-size: 1rem; color: var(--text); font-weight: 700; }

/* Удалили glassmorphism — теперь это просто обычная карточка */
.glass {
    background: var(--bg-card);
    border: 1px solid var(--border);
}

/* ============= Stat cards ============= */
.stat {
    position: relative;
    padding: 1.4rem 1.5rem;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--brand-500);
}
.stat.accent { border-left-color: var(--success-500); }
.stat.warn   { border-left-color: var(--warning-500); }
.stat.danger { border-left-color: var(--danger-500); }

.stat-label { font-size: .78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.stat-value { font-size: 1.7rem; font-weight: 800; margin: .4rem 0 .25rem; color: var(--text); letter-spacing: -0.01em; }
.stat-delta { font-size: .82rem; color: var(--text-muted); font-weight: 500; }
.stat-icon {
    position: absolute; top: 1.25rem; right: 1.25rem;
    width: 40px; height: 40px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    background: var(--brand-50);
    color: var(--brand-600);
    font-size: 1.2rem;
}
[data-theme="dark"] .stat-icon { background: rgba(43, 108, 176, 0.2); color: var(--brand-200); }

/* ============= Tables ============= */
.table {
    width: 100%;
    border-collapse: collapse;
}
.table thead th {
    text-align: left;
    background: var(--bg-subtle);
    color: var(--text-soft);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: .8rem 1rem;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
}
.table tbody td {
    padding: .8rem 1rem;
    border-bottom: 1px solid var(--border-soft);
    font-size: .9rem;
    color: var(--text-soft);
}
.table tbody tr:hover { background: var(--bg-subtle); }
.table tbody tr:last-child td { border-bottom: 0; }

.table-card { background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; }

/* ============= Forms ============= */
.form-row { display: grid; gap: 1rem; margin-bottom: 1rem; }
.form-row.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 640px) { .form-row.cols-2 { grid-template-columns: 1fr; } }
.form-label {
    display: block;
    margin-bottom: .35rem;
    font-weight: 600;
    color: var(--text-soft);
    font-size: .85rem;
}
.form-control,
input.form-control,
select.form-control,
textarea.form-control {
    display: block;
    width: 100%;
    padding: .65rem .85rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    font-size: .92rem;
    font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
    outline: none;
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px var(--ring);
}
.form-help { font-size: .8rem; color: var(--text-muted); margin-top: .25rem; }
.form-error { color: var(--danger-500); font-size: .82rem; margin-top: .35rem; }

/* ============= Badges & Pills ============= */
.badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .2rem .6rem;
    font-size: .72rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    background: var(--bg-strong);
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: .03em;
}
.badge-amber  { background: #fef3e0; color: #8a5a07; }
.badge-sky    { background: #e1eefb; color: #1f5494; }
.badge-emerald{ background: #e1f3e8; color: #176c41; }
.badge-rose   { background: #fce4e4; color: #991818; }
.badge-slate  { background: var(--bg-strong); color: var(--text-soft); }
.badge-indigo { background: #e1eefb; color: #173f74; }
[data-theme="dark"] .badge-amber  { background: rgba(184, 119, 10, 0.2); color: #f0c478; }
[data-theme="dark"] .badge-sky    { background: rgba(43, 108, 176, 0.25); color: #8eb5d7; }
[data-theme="dark"] .badge-emerald{ background: rgba(31, 138, 82, 0.25); color: #8edcaa; }
[data-theme="dark"] .badge-rose   { background: rgba(185, 28, 28, 0.25); color: #f0a8a8; }
[data-theme="dark"] .badge-indigo { background: rgba(31, 84, 148, 0.3); color: #b9d2e8; }

/* ============= Topbar ============= */
.topbar {
    position: sticky; top: 0; z-index: 100;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.topbar-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 68px;
    gap: 1.5rem;
}
.brand {
    display: flex; align-items: center; gap: .65rem;
    font-weight: 700; font-size: 1.05rem; color: var(--text);
    text-decoration: none;
}
.brand:hover { text-decoration: none; color: var(--text); }
.brand-logo {
    width: 38px; height: 38px;
    border-radius: var(--radius-sm);
    background: var(--brand-600);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: .85rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a {
    color: var(--text-soft);
    font-weight: 500;
    font-size: .92rem;
    text-decoration: none;
    position: relative;
    padding: .25rem 0;
}
.nav-links a:hover { color: var(--brand-600); text-decoration: none; }
.nav-links a.active { color: var(--brand-700); }
.nav-links a.active::after {
    content: "";
    position: absolute; bottom: -22px; left: 0; right: 0;
    height: 2px;
    background: var(--brand-600);
}

.topbar-actions { display: flex; align-items: center; gap: .5rem; }
.icon-btn {
    width: 38px; height: 38px;
    border-radius: var(--radius-sm);
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent;
    color: var(--text-soft);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    font-size: .95rem;
}
.icon-btn:hover { background: var(--bg-subtle); color: var(--brand-600); text-decoration: none; }

/* ============= Cabinet layout ============= */
.cabinet {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}
@media (max-width: 1024px) {
    .cabinet { grid-template-columns: 1fr; }
    .cabinet-sidebar { position: fixed; left: -100%; top: 0; bottom: 0; width: 280px; z-index: 1000; transition: left var(--transition); }
    .cabinet-sidebar.open { left: 0; box-shadow: 0 0 60px rgba(0,0,0,.3); }
}

.cabinet-sidebar {
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 1.25rem 1rem;
    display: flex; flex-direction: column; gap: 1.25rem;
}
.sidebar-user {
    display: flex; align-items: center; gap: .75rem;
    padding: .85rem 1rem;
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--brand-500);
}
.avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: #fff;
    background: var(--brand-600);
    flex-shrink: 0;
    font-size: .9rem;
}
.avatar.lg { width: 68px; height: 68px; font-size: 1.3rem; }
.avatar.sm { width: 32px; height: 32px; font-size: .78rem; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.sidebar-section { display: flex; flex-direction: column; gap: .15rem; }
.sidebar-section-title { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); padding: .25rem .8rem; margin-bottom: .15rem; font-weight: 700; }
.sidebar-link {
    display: flex; align-items: center; gap: .65rem;
    padding: .55rem .8rem;
    border-radius: var(--radius-sm);
    color: var(--text-soft);
    font-weight: 500;
    font-size: .88rem;
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
    border-left: 3px solid transparent;
}
.sidebar-link:hover { background: var(--bg-subtle); color: var(--text); text-decoration: none; }
.sidebar-link.active {
    background: var(--brand-50);
    color: var(--brand-700);
    border-left-color: var(--brand-600);
    font-weight: 600;
}
[data-theme="dark"] .sidebar-link.active { background: rgba(43, 108, 176, 0.18); color: var(--brand-200); }
.sidebar-link .icon { font-size: 1rem; width: 1.15rem; text-align: center; flex-shrink: 0; }

.cabinet-main { padding: 1.5rem 2rem; background: var(--bg); }
@media (max-width: 640px) { .cabinet-main { padding: 1rem; } }

.page-head {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.page-title { margin: 0; font-size: 1.45rem; }
.page-sub { color: var(--text-muted); margin: .25rem 0 0; font-size: .9rem; }

/* ============= Hero (главная) ============= */
.hero {
    position: relative;
    padding: 3.5rem 0 3rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 960px) { .hero-inner { grid-template-columns: 1fr; gap: 2rem; } }
.hero .pretitle {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .3rem .8rem; border-radius: var(--radius-sm);
    background: var(--brand-50); color: var(--brand-700);
    font-size: .78rem; font-weight: 600;
    margin-bottom: 1rem;
    border: 1px solid var(--brand-100);
}
[data-theme="dark"] .hero .pretitle { background: rgba(43, 108, 176, 0.15); color: var(--brand-200); border-color: transparent; }
.hero h1 { font-weight: 800; }
.hero h1 .accent { color: var(--brand-600); }
.hero .lead { font-size: 1.05rem; color: var(--text-soft); margin: 1rem 0 1.75rem; }
.hero-cta { display: flex; gap: .65rem; flex-wrap: wrap; }

.hero-card {
    padding: 1.5rem;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: 3px solid var(--brand-600);
    box-shadow: var(--shadow);
}
.hero-card .calc-row { display: flex; justify-content: space-between; margin-bottom: .65rem; font-weight: 500; color: var(--text-soft); }
.hero-card .calc-row strong { color: var(--text); font-weight: 700; }

/* Альтернативный фон для секций */
.section-alt { background: var(--bg-subtle); }

.section { padding: 3.5rem 0; }
.section-narrow { padding: 2.5rem 0; }

.section-head { margin-bottom: 2rem; }
.section-head .pretitle {
    display: inline-block;
    padding: .25rem .7rem;
    border-radius: var(--radius-sm);
    background: var(--brand-50);
    color: var(--brand-700);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: .75rem;
    border: 1px solid var(--brand-100);
}
[data-theme="dark"] .section-head .pretitle { background: rgba(43, 108, 176, 0.15); color: var(--brand-200); border-color: transparent; }

/* ============= Footer ============= */
.footer {
    margin-top: 0;
    padding: 3rem 0 1.5rem;
    background: var(--brand-900);
    color: #b9c6d8;
    border-top: 4px solid var(--brand-600);
}
.footer h4 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.footer a { color: #b9c6d8; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer .brand-logo { background: var(--brand-500); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 1.25rem;
    margin-top: 2rem;
    text-align: center;
    color: #7a8aa3;
    font-size: .85rem;
}

/* ============= Auth pages ============= */
.auth-screen {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    background: var(--bg);
}
@media (max-width: 980px) { .auth-screen { grid-template-columns: 1fr; } }

.auth-cover {
    position: relative;
    background: var(--brand-800);
    color: #d4e0ee;
    padding: 3rem;
    overflow: hidden;
    display: flex; flex-direction: column; justify-content: space-between;
    isolation: isolate;
}
.auth-cover::before {
    content: "";
    position: absolute; inset: 0;
    background-image: url('https://images.unsplash.com/photo-1450101499163-c8848c66ca85?auto=format&fit=crop&w=1200&q=80');
    background-size: cover;
    background-position: center;
    opacity: .18;
    z-index: -1;
}
.auth-cover::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(11,31,61,.92), rgba(23,63,116,.85));
    z-index: -1;
}
.auth-cover h1 { color: #fff; }
.auth-cover h1 .accent { color: var(--brand-200); }
.auth-cover .brand { color: #fff; }
.auth-cover .brand-logo { background: var(--brand-500); }

.auth-form-wrap {
    padding: 3rem;
    display: flex; align-items: center; justify-content: center;
}
.auth-form-card {
    width: 100%; max-width: 460px;
    background: var(--bg-card);
    padding: 2.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
@media (max-width: 980px) { .auth-cover, .auth-form-wrap { padding: 2rem; } }

.quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .55rem; margin-bottom: 1rem; }
@media (max-width: 480px) { .quick-grid { grid-template-columns: 1fr; } }
.quick-card {
    display: flex; align-items: center; gap: .65rem;
    padding: .65rem .75rem; border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--transition);
    text-align: left;
    color: var(--text);
    font: inherit;
    text-decoration: none;
}
.quick-card:hover { border-color: var(--brand-500); background: var(--brand-50); color: var(--text); text-decoration: none; }
[data-theme="dark"] .quick-card:hover { background: rgba(43, 108, 176, 0.15); }
.quick-card .avatar { width: 34px; height: 34px; font-size: .75rem; background: var(--brand-600); }
.quick-card .qc-title { font-weight: 600; font-size: .85rem; line-height: 1.2; }
.quick-card .qc-desc  { font-size: .7rem; color: var(--text-muted); margin-top: 2px; }

.divider {
    display: flex; align-items: center; gap: 1rem; color: var(--text-muted);
    font-size: .75rem; text-transform: uppercase; letter-spacing: .1em;
    margin: 1.25rem 0;
}
.divider::before, .divider::after {
    content: ""; flex: 1; height: 1px; background: var(--border);
}

/* ============= Product cards ============= */
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; }
.product-card {
    position: relative;
    padding: 1.5rem;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: 3px solid var(--brand-500);
    overflow: hidden;
    transition: box-shadow var(--transition), border-color var(--transition);
    display: flex; flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow-md); border-color: var(--brand-300); }
.product-card .icon-pill {
    width: 48px; height: 48px;
    border-radius: var(--radius-sm);
    background: var(--brand-50);
    color: var(--brand-600);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}
[data-theme="dark"] .product-card .icon-pill { background: rgba(43, 108, 176, 0.18); color: var(--brand-200); }
.product-card h3 { margin-bottom: .5rem; }
.product-card .price-row {
    display: flex; gap: 1.25rem; margin: 1rem 0;
    padding: .75rem; border-radius: var(--radius-sm);
    background: var(--bg-subtle);
}
.product-card .price-row > div { flex: 1; }
.product-card .price-row .label { font-size: .7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.product-card .price-row .value { font-weight: 700; font-size: .95rem; color: var(--text); margin-top: 2px; }

/* ============= Schedule list ============= */
.schedule-row {
    display: grid;
    grid-template-columns: 60px 1fr 1fr 1fr 130px;
    gap: 1rem;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--border-soft);
    font-size: .88rem;
    color: var(--text-soft);
}
.schedule-row.head { background: var(--bg-subtle); font-weight: 700; color: var(--text-soft); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
@media (max-width: 760px) { .schedule-row { grid-template-columns: 1fr 1fr; } }

/* ============= Receipt ============= */
.receipt {
    max-width: 560px; margin: 1.5rem auto; padding: 2rem;
    background: var(--bg-card); border-radius: var(--radius);
    border: 1px solid var(--border);
    border-top: 4px solid var(--brand-600);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
}
.receipt h2 { font-family: 'Inter', sans-serif; }
.receipt-row { display: flex; justify-content: space-between; padding: .35rem 0; border-bottom: 1px dotted var(--border); }

@media print {
    body * { visibility: hidden; }
    .receipt, .receipt * { visibility: visible; }
    .receipt { box-shadow: none; position: absolute; left: 0; top: 0; width: 100%; max-width: none; border: 0; }
    .no-print { display: none !important; }
}

/* ============= Alerts ============= */
.alert {
    padding: .8rem 1rem;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; gap: .6rem;
    margin-bottom: 1rem;
    font-size: .9rem;
    border: 1px solid transparent;
    border-left-width: 4px;
}
.alert-success { background: #e8f5ee; color: #146338; border-color: var(--success-500); }
.alert-warning { background: #fdf3e0; color: #8a5a07; border-color: var(--warning-500); }
.alert-danger  { background: #fbe7e7; color: #991818; border-color: var(--danger-500); }
.alert-info    { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-500); }
[data-theme="dark"] .alert-success { background: rgba(31, 138, 82, 0.18); color: #8edcaa; }
[data-theme="dark"] .alert-warning { background: rgba(184, 119, 10, 0.18); color: #f0c478; }
[data-theme="dark"] .alert-danger  { background: rgba(185, 28, 28, 0.18); color: #f0a8a8; }
[data-theme="dark"] .alert-info    { background: rgba(43, 108, 176, 0.18); color: var(--brand-200); }

/* ============= Toast ============= */
.toast-stack {
    position: fixed; right: 1.25rem; top: 84px; z-index: 1200;
    display: flex; flex-direction: column; gap: .5rem; max-width: 340px;
}
.toast {
    padding: .8rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--brand-500);
    box-shadow: var(--shadow);
    color: var(--text);
    animation: slideIn .35s ease;
    font-size: .9rem;
}
@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ============= Misc utilities ============= */
.divider-y { height: 1px; background: var(--border-soft); margin: 1rem 0; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.rounded { border-radius: var(--radius); }
.rounded-sm { border-radius: var(--radius-sm); }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: .5rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }
.mb-4 { margin-bottom: 2rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }
.mt-4 { margin-top: 2rem !important; }

.progress {
    height: 6px; background: var(--bg-strong);
    border-radius: 999px; overflow: hidden;
}
.progress-bar {
    height: 100%;
    background: var(--brand-500);
    border-radius: 999px;
    transition: width .6s ease;
}

.empty-state {
    text-align: center; padding: 2.5rem 1rem;
    color: var(--text-muted);
}
.empty-state .icon-circle {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: var(--bg-subtle);
    color: var(--brand-500);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    margin-bottom: .85rem;
}

.chip {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .2rem .55rem;
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    color: var(--text-soft);
    font-size: .78rem;
    font-weight: 500;
    border: 1px solid var(--border-soft);
}

.kbd {
    padding: .15rem .4rem;
    border-radius: 4px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    font-family: 'JetBrains Mono', monospace;
    font-size: .78rem;
    color: var(--text-soft);
}

/* Search inputs */
.search {
    display: flex; align-items: center; gap: .5rem;
    padding: .45rem .85rem;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: border-color var(--transition);
}
.search:focus-within { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--ring); }
.search input { border: 0; background: transparent; flex: 1; outline: none; color: var(--text); font-size: .9rem; }

/* Tabs */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 1.25rem; flex-wrap: wrap; }
.tab {
    padding: .65rem 1.25rem;
    color: var(--text-soft); font-weight: 600; font-size: .88rem;
    background: transparent; cursor: pointer; border: 0;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
}
.tab:hover { color: var(--brand-600); }
.tab.active { color: var(--brand-700); border-bottom-color: var(--brand-600); }

/* Toggle switch */
.switch { position: relative; display: inline-block; width: 42px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
    position: absolute; cursor: pointer; inset: 0;
    background: var(--bg-strong); border: 1px solid var(--border);
    border-radius: 999px; transition: var(--transition);
}
.switch .slider::before {
    content: ""; position: absolute;
    width: 16px; height: 16px;
    left: 2px; top: 2px; background: #fff; border-radius: 50%;
    transition: var(--transition);
}
.switch input:checked + .slider { background: var(--brand-600); border-color: var(--brand-600); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* Range slider styling (calculator) */
input[type="range"] {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 6px;
    background: var(--bg-strong);
    border-radius: 999px; outline: none;
    margin: .75rem 0;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 18px; height: 18px;
    background: var(--brand-600);
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}
input[type="range"]::-moz-range-thumb {
    width: 18px; height: 18px;
    background: var(--brand-600);
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
}

/* Step number (publishing on home) */
.step-num {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--brand-50);
    color: var(--brand-700);
    font-weight: 800;
    font-size: 1.1rem;
    border: 1px solid var(--brand-100);
    margin-bottom: 1rem;
}
[data-theme="dark"] .step-num { background: rgba(43, 108, 176, 0.15); color: var(--brand-200); border-color: transparent; }

/* Подсветка для feature-карточки */
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: box-shadow var(--transition);
}
.feature-card:hover { box-shadow: var(--shadow); }
.feature-card .feature-icon {
    width: 44px; height: 44px;
    border-radius: var(--radius-sm);
    background: var(--brand-50);
    color: var(--brand-600);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}
[data-theme="dark"] .feature-card .feature-icon { background: rgba(43, 108, 176, 0.18); color: var(--brand-200); }

/* CTA-блок */
.cta-strip {
    background: var(--brand-700);
    color: #fff;
    padding: 2.5rem 0;
}
.cta-strip h2 { color: #fff; }
.cta-strip p { color: rgba(255,255,255,.85); }

/* hide on small */
.hide-sm { display: inline; }
@media (max-width: 640px) { .hide-sm { display: none; } }

/* ============================================================
   КРУПНАЯ ТИПОГРАФИКА + БАННЕРЫ + ИЗОБРАЖЕНИЯ
   ============================================================ */

.display {
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    line-height: 1.05;
    letter-spacing: -0.025em;
    font-weight: 800;
    margin: 0 0 1.25rem;
}
.display .accent { color: var(--brand-600); }
.display .stroke {
    -webkit-text-stroke: 2px var(--brand-600);
    color: transparent;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .85rem;
    background: var(--brand-50);
    color: var(--brand-700);
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    border-radius: 999px;
    border: 1px solid var(--brand-100);
    margin-bottom: 1.25rem;
}
.eyebrow::before {
    content: "";
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--brand-600);
}
[data-theme="dark"] .eyebrow { background: rgba(43,108,176,.18); color: var(--brand-200); border-color: transparent; }

.lead-text {
    font-size: 1.2rem;
    line-height: 1.55;
    color: var(--text-soft);
    margin-bottom: 1.75rem;
}

/* ============= Hero (новый, крупный) ============= */
.hero-xl {
    position: relative;
    padding: 4rem 0 4rem;
    background: var(--bg-card);
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}
.hero-xl::before {
    content: "";
    position: absolute;
    top: -200px; right: -200px;
    width: 600px; height: 600px;
    background: var(--brand-50);
    border-radius: 50%;
    z-index: 0;
}
.hero-xl::after {
    content: "";
    position: absolute;
    bottom: -150px; left: -150px;
    width: 400px; height: 400px;
    background: var(--brand-50);
    border-radius: 50%;
    z-index: 0;
}
[data-theme="dark"] .hero-xl::before,
[data-theme="dark"] .hero-xl::after { background: rgba(43, 108, 176, 0.08); }
.hero-xl > .container { position: relative; z-index: 1; }

.hero-xl-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 4rem;
    align-items: center;
}
@media (max-width: 960px) {
    .hero-xl-grid { grid-template-columns: 1fr; gap: 2rem; }
}

.hero-visual {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }

.hero-badge {
    position: absolute;
    background: #fff;
    border-radius: var(--radius);
    padding: .85rem 1rem;
    box-shadow: var(--shadow-md);
    display: flex; align-items: center; gap: .65rem;
    z-index: 2;
    color: var(--text);
}
.hero-badge.top {
    top: 1rem; left: -1rem;
}
.hero-badge.bottom {
    bottom: 1.5rem; right: -1rem;
    flex-direction: column; align-items: stretch;
    min-width: 200px;
}
.hero-badge .ico {
    width: 38px; height: 38px;
    border-radius: var(--radius-sm);
    background: var(--brand-50);
    color: var(--brand-600);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.hero-badge .label { font-size: .7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.hero-badge .value { font-size: 1.05rem; font-weight: 800; color: var(--text); }
@media (max-width: 640px) {
    .hero-badge.top { left: .5rem; top: .5rem; }
    .hero-badge.bottom { right: .5rem; bottom: .5rem; }
}

/* ============= Logo strip ============= */
.logo-strip {
    padding: 2.5rem 0;
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border);
    border-top: 1px solid var(--border);
}
.logo-strip-title {
    text-align: center;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 1.5rem;
}
.logo-strip-row {
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
    opacity: .6;
}
.logo-strip-row svg, .logo-strip-row .logo-item {
    height: 32px;
    color: var(--text-soft);
    transition: opacity var(--transition);
}
.logo-item {
    font-weight: 800; font-size: 1.1rem;
    letter-spacing: .02em;
    display: flex; align-items: center; gap: .4rem;
    color: var(--text-soft);
}

/* ============= Category banners ============= */
.category-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 1.25rem;
}
@media (max-width: 900px) { .category-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .category-grid { grid-template-columns: 1fr; } }

.category-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 320px;
    display: flex;
    align-items: flex-end;
    padding: 1.75rem;
    color: #fff;
    text-decoration: none;
    transition: transform var(--transition);
    isolation: isolate;
}
.category-card:hover { transform: translateY(-4px); color: #fff; text-decoration: none; }
.category-card .bg {
    position: absolute; inset: 0; z-index: -2;
    background-size: cover; background-position: center;
    transition: transform .4s ease;
}
.category-card:hover .bg { transform: scale(1.05); }
.category-card::after {
    content: "";
    position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, rgba(11,31,61,.1) 0%, rgba(11,31,61,.85) 100%);
}
.category-card.large { grid-row: span 1; min-height: 380px; }
.category-card .cat-eyebrow {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: rgba(255,255,255,.85);
    margin-bottom: .5rem;
    font-weight: 700;
}
.category-card h3 {
    font-size: 1.8rem;
    color: #fff;
    margin: 0 0 .35rem;
    letter-spacing: -0.01em;
}
.category-card.large h3 { font-size: 2.2rem; }
.category-card p { color: rgba(255,255,255,.85); margin: 0; font-size: .95rem; }
.category-card .arrow {
    position: absolute;
    top: 1.25rem; right: 1.25rem;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    backdrop-filter: blur(4px);
    transition: background var(--transition);
}
.category-card:hover .arrow { background: #fff; color: var(--brand-700); }

/* ============= Stat banner (full-width) ============= */
.stat-banner {
    position: relative;
    padding: 4rem 0;
    color: #fff;
    overflow: hidden;
    isolation: isolate;
}
.stat-banner .bg {
    position: absolute; inset: 0; z-index: -2;
    background-size: cover; background-position: center;
}
.stat-banner::after {
    content: "";
    position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(120deg, rgba(11,31,61,.94) 0%, rgba(23,63,116,.92) 60%, rgba(31,84,148,.88) 100%);
}
.stat-banner h2 { color: #fff; }
.stat-banner-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}
@media (max-width: 760px) { .stat-banner-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-banner-item .num {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: #fff;
    line-height: 1;
    letter-spacing: -0.02em;
}
.stat-banner-item .num .accent { color: var(--brand-200); }
.stat-banner-item .lbl {
    color: rgba(255,255,255,.75);
    font-size: .9rem;
    margin-top: .5rem;
}

/* ============= Testimonials ============= */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
@media (max-width: 900px) { .testimonial-grid { grid-template-columns: 1fr; } }

.testimonial {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    display: flex; flex-direction: column; gap: 1rem;
    transition: box-shadow var(--transition), transform var(--transition);
}
.testimonial:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.testimonial .quote-mark {
    font-size: 3rem;
    color: var(--brand-200);
    line-height: 0.5;
    font-family: Georgia, serif;
    height: 1.5rem;
}
.testimonial .text {
    font-size: 1rem;
    color: var(--text-soft);
    line-height: 1.6;
    flex-grow: 1;
}
.testimonial .author {
    display: flex; align-items: center; gap: .85rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-soft);
}
.testimonial .author img {
    width: 44px; height: 44px;
    border-radius: 50%;
    object-fit: cover;
}
.testimonial .author .name { font-weight: 700; color: var(--text); font-size: .92rem; }
.testimonial .author .role { font-size: .8rem; color: var(--text-muted); }
.stars { display: inline-flex; gap: 2px; color: #f0a82a; font-size: .85rem; letter-spacing: 1px; }

/* ============= Product cards with image header ============= */
.product-banner {
    height: 130px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}
.product-banner::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(11,31,61,.4) 0%, rgba(11,31,61,.75) 100%);
}
.product-banner .badge {
    position: absolute;
    top: 1rem; left: 1rem;
    z-index: 1;
    background: #fff;
    color: var(--brand-700);
}

/* ============= Full-width CTA with bg image ============= */
.cta-banner {
    position: relative;
    padding: 4rem 0;
    color: #fff;
    overflow: hidden;
    isolation: isolate;
}
.cta-banner .bg {
    position: absolute; inset: 0; z-index: -2;
    background-size: cover; background-position: center;
}
.cta-banner::after {
    content: "";
    position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(95deg, rgba(11,31,61,.96) 0%, rgba(23,63,116,.85) 60%, rgba(31,84,148,.35) 100%);
}
.cta-banner-inner {
    max-width: 640px;
}
.cta-banner h2 {
    color: #fff;
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    margin-bottom: 1rem;
}
.cta-banner p { color: rgba(255,255,255,.88); font-size: 1.05rem; margin-bottom: 1.5rem; }

/* ============= Split section (image + text) ============= */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 2rem; } }
.split.reverse > :first-child { order: 2; }
@media (max-width: 900px) { .split.reverse > :first-child { order: 0; } }
.split-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    box-shadow: var(--shadow);
}
.split-image img { width: 100%; height: 100%; object-fit: cover; }

/* ============= Big step cards ============= */
.steps-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    position: relative;
}
@media (max-width: 900px) { .steps-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .steps-row { grid-template-columns: 1fr; } }
.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.5rem;
    position: relative;
    transition: box-shadow var(--transition), transform var(--transition);
}
.step-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.step-card .big-num {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--brand-100);
    line-height: 1;
    margin-bottom: .5rem;
    letter-spacing: -0.02em;
}
[data-theme="dark"] .step-card .big-num { color: rgba(43,108,176,.3); }
.step-card h3 { font-size: 1.1rem; margin: 0 0 .35rem; }
.step-card p { color: var(--text-muted); font-size: .9rem; margin: 0; }

/* ============= Stat pill row ============= */
.stat-pills {
    display: flex; flex-wrap: wrap; gap: 1rem; align-items: center;
}
.stat-pill {
    display: flex; flex-direction: column;
    padding: .75rem 1.25rem;
    background: rgba(255,255,255,.08);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,.12);
    color: #fff;
    min-width: 110px;
}
.stat-pill .num { font-size: 1.3rem; font-weight: 800; }
.stat-pill .lbl { font-size: .75rem; color: rgba(255,255,255,.7); }

/* button on dark surfaces */
.btn-on-dark {
    background: #fff; color: var(--brand-700); border-color: #fff;
}
.btn-on-dark:hover { background: var(--brand-50); color: var(--brand-800); }
.btn-outline-light {
    background: transparent; color: #fff; border-color: rgba(255,255,255,.4);
}
.btn-outline-light:hover { background: rgba(255,255,255,.1); color: #fff; }
