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

body {
    font-family: Arial, sans-serif;
    background: #f4f7fb;
    color: #0f172a;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

/* HEADER */

.logo.logo-svg {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo.logo-svg img {
    display: block;
    height: 60px;
    width: auto;
    max-width: 560px;
}

@media (max-width: 768px) {
    .logo.logo-svg img {
        height: 42px;
        max-width: 210px;
    }
}

.site-header {
    background: #071427;
    color: #fff;
    border-radius: 0 0 22px 22px;
    margin: 0 18px;
}

.header-inner {
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.footer-logo.footer-logo-svg {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    margin-bottom: 18px;
}

.footer-logo.footer-logo-svg img {
    display: block;
    width: 220px;
    max-width: 100%;
    height: auto;
}

.logo,
.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
}

.logo-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #60a5fa);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
}

.logo-box.login-logo-svg {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    margin-bottom: 28px;
}

.logo-box.login-logo-svg img {
    display: block;
    width: 280px;
    max-width: 100%;
    height: auto;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    font-size: 14px;
    color: #dbeafe;
}

.main-nav a {
    transition: 0.2s;
}

.main-nav a:hover {
    color: #60a5fa;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.login-link {
    font-size: 14px;
    color: #dbeafe;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 14px;
    transition: 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.32);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.42);
}

.btn-light {
    background: #fff;
    color: #0f172a;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.btn-light:hover {
    transform: translateY(-2px);
}

/* HERO */

.hero {
    padding: 70px 0 50px;
}

.hero-inner {
    min-height: 560px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
    background:
        radial-gradient(circle at 85% 20%, rgba(37, 99, 235, 0.12), transparent 35%),
        linear-gradient(135deg, #ffffff, #edf4ff);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 28px;
    padding: 60px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.08);
}

.badge {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1.05;
    letter-spacing: -2px;
    margin-bottom: 24px;
}

.hero-text {
    font-size: 18px;
    line-height: 1.7;
    color: #475569;
    max-width: 620px;
    margin-bottom: 28px;
}

.hero-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 24px;
    color: #1e293b;
    font-size: 15px;
    margin-bottom: 34px;
}

.hero-list div {
    background: rgba(255, 255, 255, 0.72);
    padding: 12px 14px;
    border-radius: 14px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* DASHBOARD MOCKUP */

.hero-visual {
    display: flex;
    justify-content: center;
}

.dashboard-card {
    width: 100%;
    max-width: 520px;
    background: #ffffff;
    border-radius: 28px;
    padding: 24px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.dashboard-top {
    display: flex;
    gap: 8px;
    margin-bottom: 22px;
}

.dashboard-top span {
    width: 12px;
    height: 12px;
    background: #cbd5e1;
    border-radius: 50%;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.dashboard-stats div {
    background: #f8fafc;
    border-radius: 18px;
    padding: 18px;
}

.dashboard-stats small {
    color: #64748b;
    display: block;
    margin-bottom: 8px;
}

.dashboard-stats strong {
    font-size: 28px;
}

.fake-chart {
    height: 160px;
    background: linear-gradient(180deg, #eff6ff, #ffffff);
    border-radius: 22px;
    padding: 20px;
    display: flex;
    align-items: end;
    gap: 13px;
    margin-bottom: 22px;
}

.fake-chart span {
    flex: 1;
    background: linear-gradient(180deg, #2563eb, #93c5fd);
    border-radius: 999px 999px 4px 4px;
}

.orders-preview {
    display: grid;
    gap: 10px;
}

.orders-preview div {
    display: grid;
    grid-template-columns: 70px 1fr auto;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    padding: 13px;
    border-radius: 16px;
    font-size: 14px;
}

.orders-preview span {
    color: #475569;
}

.orders-preview em {
    font-style: normal;
    background: #dbeafe;
    color: #1d4ed8;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.orders-preview em.green {
    background: #dcfce7;
    color: #15803d;
}

.orders-preview em.orange {
    background: #ffedd5;
    color: #c2410c;
}

.orders-hero {
            display: flex;
            justify-content: space-between;
            gap: 20px;
            align-items: stretch;
            margin-bottom: 22px;
            padding: 24px;
            border-radius: 24px;
            background: linear-gradient(135deg, #101827 0%, #182339 52%, #233554 100%);
            color: #fff;
            box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
            overflow: hidden;
            position: relative;
        }

        .orders-hero::after {
            content: "";
            position: absolute;
            width: 280px;
            height: 280px;
            right: -90px;
            top: -100px;
            border-radius: 50%;
            background: rgba(255,255,255,0.08);
        }

        .orders-hero h1 {
            margin: 0 0 8px;
            font-size: 35px;
            color: #fff;
        }

        .orders-hero p {
            margin: 0;
            max-width: 620px;
            color: rgba(255,255,255,0.76);
            line-height: 1.55;
        }

        .orders-hero-actions {
            position: relative;
            z-index: 2;
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
            justify-content: flex-end;
        }

        .orders-hero .btn-light {
            background: rgba(255,255,255,0.13);
            color: #fff;
            border: 1px solid rgba(255,255,255,0.22);
        }

        .orders-metrics {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 16px;
            margin-bottom: 22px;
        }

        .orders-metric-card {
            display: block;
            padding: 18px;
            border-radius: 20px;
            background: #fff;
            text-decoration: none;
            color: inherit;
            box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
            border: 1px solid rgba(226, 232, 240, 0.9);
            transition: 0.18s ease;
        }

        .orders-metric-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 14px 34px rgba(15, 23, 42, 0.11);
        }

        .orders-metric-card span {
            display: block;
            color: #64748b;
            font-size: 13px;
            margin-bottom: 8px;
        }

        .orders-metric-card strong {
            display: block;
            font-size: 28px;
            line-height: 1;
            color: #111827;
        }

        .orders-metric-card small {
            display: block;
            margin-top: 8px;
            color: #94a3b8;
        }

        .status-filter-strip {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            margin-bottom: 18px;
        }

        .status-filter-pill {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 10px 14px;
            border-radius: 999px;
            background: #fff;
            color: #334155;
            text-decoration: none;
            border: 1px solid #e2e8f0;
            box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
            font-size: 14px;
            transition: 0.18s ease;
        }

        .status-filter-pill:hover,
        .status-filter-pill.active {
            transform: translateY(-1px);
            border-color: #2563eb;
            color: #1d4ed8;
            box-shadow: 0 10px 22px rgba(37, 99, 235, 0.12);
        }

        .status-filter-pill b {
            padding: 3px 8px;
            border-radius: 999px;
            background: #f1f5f9;
            color: #475569;
            font-size: 12px;
        }

        .orders-filter-panel {
            margin-bottom: 22px;
        }

        .orders-filter-form {
            display: grid;
            grid-template-columns: 2fr 1fr 1fr 0.85fr 0.85fr auto;
            gap: 12px;
            align-items: end;
        }

        .filter-field label {
            display: block;
            margin-bottom: 7px;
            font-size: 13px;
            color: #64748b;
            font-weight: 600;
        }

        .filter-field input,
        .filter-field select {
            width: 100%;
            height: 44px;
            padding: 0 13px;
            border-radius: 13px;
            border: 1px solid #dbe3ef;
            background: #fff;
            color: #111827;
            outline: none;
            transition: 0.15s ease;
        }

        .filter-field input:focus,
        .filter-field select:focus {
            border-color: #2563eb;
            box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
        }

        .filter-buttons {
            display: flex;
            gap: 8px;
            align-items: center;
            justify-content: flex-end;
        }

        .orders-table-panel .panel-header {
            gap: 12px;
            flex-wrap: wrap;
        }

        .orders-hero,
        .orders-metrics,
        .status-counter-grid,
        .orders-filter-panel,
        .orders-table-panel {
            min-width: 0;
            max-width: 100%;
        }

        .orders-table-panel {
            overflow: hidden;
        }

        .orders-result-note {
            color: #64748b;
            font-size: 14px;
        }

        .order-client-cell small,
        .order-device-cell small {
            color: #64748b;
        }

        .order-problem-cell {
            max-width: 320px;
            color: #334155;
        }

        .empty-state {
            padding: 38px 20px;
            text-align: center;
            color: #64748b;
        }

        .empty-state strong {
            display: block;
            color: #111827;
            font-size: 18px;
            margin-bottom: 8px;
        }

        @media (max-width: 1180px) {
            .orders-metrics {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            .orders-filter-form {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            .filter-buttons {
                justify-content: flex-start;
            }
        }

        @media (max-width: 760px) {
            .orders-hero {
                flex-direction: column;
            }

            .orders-metrics,
            .orders-filter-form {
                grid-template-columns: 1fr;
            }
        }


/* Цветные счетчики статусов на странице заявок */
.status-counter-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 22px;
}

.status-counter-card {
    position: relative;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    min-height: 116px;
    padding: 16px;
    border-radius: 20px;
    background: #fff;
    color: #0f172a;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.status-counter-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: var(--counter-accent, #2563eb);
}

.status-counter-card:hover,
.status-counter-card.active {
    transform: translateY(-2px);
    border-color: var(--counter-accent, #2563eb);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.13);
}

.status-counter-card.active {
    background: linear-gradient(180deg, rgba(248, 250, 252, .95), #fff);
}

.status-counter-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--counter-accent, #2563eb) 13%, #ffffff);
    font-size: 20px;
}

.status-counter-content {
    display: block;
    min-width: 0;
}

.status-counter-label {
    display: block;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 5px;
}

.status-counter-card strong {
    display: block;
    font-size: 28px;
    line-height: 1;
    color: #0f172a;
    margin-bottom: 8px;
}

.status-counter-card small {
    display: block;
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.35;
}

.status-counter-all { --counter-accent: #334155; }
.status-counter-new { --counter-accent: #2563eb; }
.status-counter-accepted { --counter-accent: #7c3aed; }
.status-counter-diagnostics { --counter-accent: #0284c7; }
.status-counter-approval { --counter-accent: #f59e0b; }
.status-counter-repair { --counter-accent: #ea580c; }
.status-counter-ready { --counter-accent: #16a34a; }
.status-counter-issued { --counter-accent: #64748b; }
.status-counter-cancelled { --counter-accent: #dc2626; }

@media (max-width: 1400px) {
    .status-counter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .status-counter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .status-counter-grid {
        grid-template-columns: 1fr;
    }
}



/* FEATURES */

.features {
    padding: 20px 0 80px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.feature-card {
    background: #fff;
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.feature-card p {
    color: #64748b;
    line-height: 1.6;
}

/* FOOTER */

.site-footer {
    background: #071427;
    text-align: center;
    color: #fff;
    border-radius: 28px 28px 0 0;
    margin: 0 18px;
    padding: 55px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.3fr;
    gap: 50px;
}

.footer-grid p {
    color: #cbd5e1;
    line-height: 1.7;
    margin-top: 16px;
}

.footer-grid h4 {
    margin-bottom: 18px;
}

.footer-grid a {
    display: block;
    color: #cbd5e1;
    margin-bottom: 12px;
    transition: 0.2s;
}

.footer-grid a:hover {
    color: #60a5fa;
}

.footer-bottom {
    width: min(1180px, calc(100% - 40px));
    margin: 42px auto 0;
    padding-top: 16px;
   
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 70px;

    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    font-size: 12px;
    text-align: center;
}

.footer-designed {
    color: rgba(255,255,255,0.65);
    font-size: 12px;
    gap: 4px;
    letter-spacing: 1px;
}

.footer-designed span {
    color: #2563eb;
    font-weight: 700;
}


/* ADMIN */

.admin-body {
    background: #eef3f9;
}

.admin-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    width: 100%;
}

.admin-sidebar {
    background: #071427;
    color: #fff;
    padding: 28px 22px;
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
    margin-bottom: 36px;
}

.admin-menu {
    display: grid;
    gap: 8px;
}

.admin-menu a {
    color: #cbd5e1;
    padding: 14px 16px;
    border-radius: 14px;
    transition: 0.2s;
}

.admin-menu a:hover,
.admin-menu a.active {
    background: #2563eb;
    color: #fff;
}

.admin-main {
    padding: 28px;
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.admin-topbar {
    background: #fff;
    border-radius: 24px;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
    margin-bottom: 24px;
}

.admin-topbar h1 {
    font-size: 28px;
    margin-bottom: 4px;
}

.admin-topbar p {
    color: #64748b;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 14px;
}

.admin-user div:first-child {
    text-align: right;
}

.admin-user span {
    display: block;
    color: #64748b;
    font-size: 13px;
}

.admin-avatar,
.employee-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #60a5fa);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
}

.stat-card span {
    display: block;
    color: #64748b;
    margin-bottom: 12px;
}

.stat-card strong {
    display: block;
    font-size: 30px;
    margin-bottom: 10px;
}

.stat-card small {
    font-weight: 700;
}

.positive {
    color: #16a34a;
}

.warning {
    color: #f59e0b;
}

.admin-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.admin-panel {
    background: #fff;
    border-radius: 24px;
    margin-bottom: 10px;
    padding: 24px;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
}

.admin-panel.large {
    min-height: 320px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.panel-header h2 {
    font-size: 21px;
    
}

.panel-header a {
    color: #2563eb;
    font-weight: 700;
    font-size: 14px;
}

.admin-chart {
    height: 230px;
    background: linear-gradient(180deg, #eff6ff, #ffffff);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    align-items: end;
    gap: 14px;
}

.admin-chart span {
    flex: 1;
    background: linear-gradient(180deg, #2563eb, #93c5fd);
    border-radius: 999px 999px 5px 5px;
}

.status-list {
    display: grid;
    gap: 16px;
}

.status-list div {
    display: grid;
    grid-template-columns: 20px 1fr auto;
    align-items: center;
    color: #475569;
}

.dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.dot.blue { background: #2563eb; }
.dot.purple { background: #8b5cf6; }
.dot.orange { background: #f97316; }
.dot.yellow { background: #eab308; }
.dot.green { background: #22c55e; }
.dot.gray { background: #94a3b8; }

.table-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-table {
    width: 100%;
    min-width: 1050px;
    border-collapse: collapse;
}

.admin-table th {
    text-align: left;
    color: #64748b;
    font-weight: 700;
    padding: 14px;
    border-bottom: 1px solid #e2e8f0;
}

.admin-table td {
    padding: 16px 14px;
    border-bottom: 1px solid #f1f5f9;
}

.status {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.status.blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.status.orange {
    background: #ffedd5;
    color: #c2410c;
}

.status.green {
    background: #dcfce7;
    color: #15803d;
}

.status.purple {
    background: #ede9fe;
    color: #6d28d9;
}

.employee-list {
    display: grid;
    gap: 16px;
}

.employee-list > div {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    gap: 12px;
}

.employee-list strong {
    display: block;
    margin-bottom: 3px;
}

.employee-list span {
    color: #64748b;
    font-size: 13px;
}

.employee-list em {
    font-style: normal;
    color: #64748b;
    font-size: 13px;
}

.admin-main {
    padding: 22px;
}

.admin-topbar {
    padding: 18px 22px;
    margin-bottom: 20px;
}

.stat-card {
    padding: 20px 22px;
}

.admin-panel {
    padding: 22px;
}

.admin-panel.large {
    min-height: 280px;
}

.admin-chart {
    height: 190px;
}

.stats-grid {
    gap: 16px;
    margin-bottom: 20px;
}

.admin-grid {
    gap: 20px;
}

.admin-menu a {
    padding: 12px 16px;
}

.admin-sidebar {
    padding: 24px 22px;
}

.admin-logo {
    margin-bottom: 30px;
}

.status.gray {
    background: #f1f5f9;
    color: #475569;
}

.status.red {
    background: #fee2e2;
    color: #b91c1c;
}

.panel-header span {
    color: #64748b;
    font-weight: 700;
}

.table-link {
    color: #2563eb;
    font-weight: 800;
}

.order-view-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 24px;
}

.info-list {
    display: grid;
    gap: 16px;
}

.info-list div {
    background: #f8fafc;
    border-radius: 16px;
    padding: 16px;
}

.info-list span {
    display: block;
    color: #64748b;
    margin-bottom: 6px;
}

.info-list strong {
    font-size: 17px;
}

.problem-text {
    color: #475569;
    line-height: 1.7;
    font-size: 17px;
}

.comments-list {
    display: grid;
    gap: 14px;
}

.comment-item {
    background: #f8fafc;
    border-radius: 16px;
    padding: 16px;
}

.comment-item p {
    margin: 8px 0;
    color: #475569;
    line-height: 1.6;
}

.comment-item span,
.empty-text {
    color: #64748b;
}

.timeline {
    display: grid;
    gap: 18px;
    position: relative;
}

.timeline div {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 12px;
    align-items: center;
    color: #94a3b8;
}

.timeline span {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #cbd5e1;
}

.timeline .done {
    color: #0f172a;
    font-weight: 700;
}

.timeline .done span {
    background: #2563eb;
    box-shadow: 0 0 0 5px #dbeafe;
}

@media (max-width: 900px) {
    .order-view-grid {
        grid-template-columns: 1fr;
    }
}

.form-panel {
    max-width: 980px;
}

.admin-form {
    display: grid;
    gap: 24px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.form-group {
    display: grid;
    gap: 8px;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-group label {
    color: #334155;
    font-weight: 800;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 15px;
    color: #0f172a;
    outline: none;
    transition: 0.2s;
}

.form-group textarea {
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 4px #dbeafe;
}

.form-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.form-error {
    background: #fee2e2;
    color: #b91c1c;
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 22px;
    font-weight: 700;
}

@media (max-width: 700px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}


.client-switch {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.client-switch label {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 13px 16px;
    cursor: pointer;
    font-weight: 700;
}

.client-switch input {
    margin-right: 8px;
}

.new-client-box {
    display: none;
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    background: #f8fafc;
    border: 1px dashed #93c5fd;
    padding: 22px;
    border-radius: 20px;
}

.client-alert {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    position: relative;

    margin: 22px 0;
    padding: 18px 54px 18px 18px;

    border-radius: 16px;
    border: 1px solid transparent;

    font-size: 15px;
    line-height: 1.5;

    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    animation: clientAlertAppear 0.25s ease;
}

.client-alert-danger {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

.client-alert-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;

    width: 34px;
    height: 34px;

    border-radius: 50%;
    color: #ffffff;
    background: #dc2626;

    font-size: 20px;
    font-weight: 900;
}

.client-alert-content strong {
    display: block;
    margin-bottom: 4px;

    color: #7f1d1d;
    font-size: 17px;
}

.client-alert-content p {
    margin: 0;
    color: #991b1b;
}

.client-alert-close {
    position: absolute;
    top: 12px;
    right: 16px;

    padding: 4px 8px;
    border: 0;
    background: transparent;

    color: #991b1b;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;

    opacity: 0.65;
}

.client-alert-close:hover {
    opacity: 1;
}

@keyframes clientAlertAppear {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 700px) {
    .new-client-box {
        grid-template-columns: 1fr;
    }
}


.comment-form {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
    background: #f8fafc;
    padding: 18px;
    border-radius: 18px;
}


.small-stat {
    font-size: 18px !important;
    word-break: break-word;
}

.quick-actions {
    display: grid;
    gap: 14px;
}

.quick-actions .btn {
    width: 100%;
}

.full-width {
    grid-column: 1 / -1;
}


.app-layout {
    display: flex;
    min-height: 100vh;
    background: #f4f6f9;
}

.sidebar {
    width: 265px;
    background: linear-gradient(180deg, #111827, #1f2937);
    color: #fff;
    padding: 24px 18px;
    box-shadow: 6px 0 20px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-logo.sidebar-logo-svg {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    margin-bottom: 20px;
    text-decoration: none;
}

.sidebar-logo.sidebar-logo-svg img {
    display: block;
    width: 200px;
    max-width: 100%;
    height: auto;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    gap: 10px;
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    min-height: 48px;
    gap: 14px;
    padding: 13px 15px;
    color: #d1d5db;
    text-decoration: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.35;
    transition: 0.25s ease;
    position: relative;
    overflow: hidden;
}

.sidebar-link::after{

    content:"";

    position:absolute;

    left:0;
    top:10%;

    width:4px;
    height:80%;

    border-radius:10px;

    background:#3b82f6;

    opacity:0;

    transform:scaleY(.3);

    transition:.25s ease;

    box-shadow:
        0 0 12px rgba(59,130,246,.7);

}

.sidebar-link::before {
    content: "";
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(59,130,246,0.25), transparent);
    transition: 0.35s ease;
}

.sidebar-link:hover::before {
    left: 0;
}

.sidebar-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.sidebar-link:hover::after{

    opacity:.45;

    transform:scaleY(.8);

}

.sidebar-link.active {
   background:linear-gradient(
        90deg,
        rgba(59,130,246,.25),
        rgba(59,130,246,.08)
    );

    color:#fff;

    backdrop-filter:blur(5px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.sidebar-link.active::after{

    opacity:1;

    transform:scaleY(1);

}

.sidebar-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
    z-index: 1;
}

.sidebar-link span {
    z-index: 1;
}

.main-content {
    flex: 1;
    padding: 30px;
}


@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 16px;
    }

    .sidebar-logo {
        margin-bottom: 18px;
    }

    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 4px;
    }

    .sidebar-link {
        min-width: max-content;
        padding: 11px 14px;
    }

    .sidebar-link:hover {
        transform: translateY(-2px);
    }

    .main-content {
        padding: 18px;
    }
}

.login-page{

    margin:0;

    font-family:Inter,sans-serif;

    background:#eef4fb;

}

.login-container{

    min-height:100vh;

    display:grid;

    grid-template-columns:1fr 480px;

}

.login-left{

    background:linear-gradient(135deg,#0f172a,#1e293b);

    color:white;

    padding:80px;

    display:flex;

    flex-direction:column;

    justify-content:center;

}

.logo-box{

    display:flex;

    align-items:center;

    gap:18px;

    margin-bottom:40px;

}

.login-logo-icon {
    width:64px;
    height:64px;
    border-radius:18px;
    background:linear-gradient(135deg,#3b82f6,#06b6d4);
    display:flex;
    justify-content:center;
    align-items:center;
    font-size:32px;
    font-weight:700;
    color:#fff;
    box-shadow:0 12px 30px rgba(37,99,235,.35);
}

.login-left h2{

    font-size:42px;

    margin-bottom:20px;

}

.login-left p{

    color:#cbd5e1;

    line-height:1.7;

    max-width:500px;

}

.login-left ul{

    margin-top:30px;

    line-height:2.3;

    list-style:none;

    padding:0;

}

.login-card{

    background:white;

    display:flex;

    flex-direction:column;

    justify-content:center;

    padding:70px;

}

.login-card h2{

    font-size:36px;

    margin-bottom:8px;

}

.login-card p{

    color:#64748b;

    margin-bottom:35px;

}

.login-card input{

    width:100%;

    padding:16px;

    border-radius:14px;

    border:1px solid #dbe2ea;

    margin-bottom:18px;

    font-size:15px;

}

.login-card input:focus{

    outline:none;

    border-color:#3b82f6;

}

.login-card button{

    width:100%;

    border:none;

    padding:16px;

    border-radius:14px;

    background:#2563eb;

    color:white;

    font-size:16px;

    cursor:pointer;

    transition:.25s;

}

.login-card button:hover{

    background:#1d4ed8;

}

.login-error{

    background:#fee2e2;

    color:#b91c1c;

    padding:12px;

    border-radius:12px;

    margin-bottom:20px;

}

.toast-success {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;

    background: #dcfce7;
    color: #15803d;

    padding: 16px 22px;
    border-radius: 16px;

    font-weight: 800;
    box-shadow: 0 18px 45px rgba(22, 163, 74, 0.22);

    animation: toastSlide 0.35s ease, toastFade 0.35s ease 3s forwards;
}

@keyframes toastSlide {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastFade {
    to {
        opacity: 0;
        transform: translateY(-12px);
        pointer-events: none;
    }
}

.chart-labels {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 14px;
    margin-top: 10px;
    padding: 0 24px;
    color: #64748b;
    font-size: 12px;
    text-align: center;
}

.mini-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: -4px 0 24px;
}

.mini-stat-card {
    background: #fff;
    border-radius: 18px;
    padding: 18px 20px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(148, 163, 184, 0.12);

    display: flex;
    align-items: center;
    gap: 14px;

    transition: 0.2s;
}

.mini-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.09);
}

.mini-stat-card > span {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #eff6ff;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 22px;
}

.mini-stat-card strong {
    display: block;
    font-size: 24px;
    color: #0f172a;
    margin-bottom: 2px;
}

.mini-stat-card small {
    color: #64748b;
    font-weight: 700;
}

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

@media (max-width: 520px) {
    .mini-stats-grid {
        grid-template-columns: 1fr;
    }
}

.btn-danger {
    background: #ef4444;
    color: #fff;
    box-shadow: 0 14px 30px rgba(239, 68, 68, 0.28);
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

/* DEVICES */

.devices-top-actions {
            display: flex;
            align-items: center;
            gap: 14px;
            flex-wrap: wrap;
        }

        .device-search-inline {
            display: flex;
            align-items: center;
            gap: 10px;
            background: #ffffff;
            border: 1px solid #dbe3ef;
            border-radius: 14px;
            
            min-width: 420px;
            box-shadow: 0 8px 20px rgba(15, 23, 42, .05);
        }

        .device-search-inline-icon {
            font-size: 18px;
            flex: 0 0 auto;
        }

        .device-search-inline input {
            flex: 1;
            min-width: 180px;
            border: 0;
            outline: 0;
            background: transparent;
            padding: 10px 4px;
            color: #0f172a;
            font: inherit;
        }

        .device-search-inline input::placeholder {
            color: #94a3b8;
        }

        .device-search-inline .btn {
            flex: 0 0 auto;
        }

        @media (max-width: 900px) {
            .admin-topbar {
                align-items: flex-start;
            }

            .devices-top-actions,
            .device-search-inline {
                width: 100%;
            }

            .device-search-inline {
                min-width: 0;
            }
        }

        @media (max-width: 560px) {
            .device-search-inline {
                display: grid;
                grid-template-columns: auto 1fr;
            }

            .device-search-inline .btn {
                grid-column: 1 / -1;
                width: 100%;
            }
        }

/* PARTS */

.low-stock {
    background: #fff1f2;
}

.low-stock td {
    color: #be123c;
}

.low-stock small {
    font-weight: 700;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.info-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px;
}

.info-card span {
    display: block;
    color: #64748b;
    font-size: 13px;
    margin-bottom: 8px;
}

.info-card strong {
    color: #0f172a;
    font-size: 18px;
}

.part-comment-box {
    margin-top: 24px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
}

.part-comment-box h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.part-comment-box p {
    margin: 0;
    color: #334155;
    line-height: 1.6;
}

.topbar-actions {
    display: flex;
    gap: 10px;
}

.part-stock-note {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 20px;
    color: #334155;
}

.movement-income {
    color: #16a34a;
    font-weight: 700;
}

.movement-writeoff {
    color: #dc2626;
    font-weight: 700;
}

@media (max-width: 900px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}

.order-parts-total {
    margin-top: 18px;
    padding: 16px 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    text-align: right;
    font-size: 16px;
    color: #334155;
}

.order-parts-total strong {
    color: #0f172a;
    font-size: 20px;
}

.order-photo-section {
    margin-top: 24px;
}

.order-photo-section h3 {
    margin: 0 0 14px;
    color: #0f172a;
    font-size: 18px;
}

.order-photo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.order-photo-card{
    background:#fff;
    border-radius:18px;
    overflow:hidden;
    border:1px solid #e5e7eb;
    transition:.2s;
    cursor:pointer;
}

.order-photo-card:hover{
    transform:translateY(-4px);
    box-shadow:0 10px 30px rgba(0,0,0,.12);
}

.order-photo-card img{
    width:100%;
    height:220px;
    object-fit:cover;
    display:block;
}

.photo-caption{
    padding:14px;
    font-weight:600;
    text-align:center;
    background:#f8fafc;
}

@media (max-width: 1000px) {
    .order-photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .order-photo-grid {
        grid-template-columns: 1fr;
    }
}

/* ADMIN ADAPTIVE */

@media (max-width: 1050px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
    }

    .admin-menu {
        grid-template-columns: repeat(3, 1fr);
    }

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

    .admin-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .admin-main {
        padding: 16px;
    }

    .admin-topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }

    .admin-user div:first-child {
        text-align: left;
    }

    .admin-menu {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.order-total-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.order-total-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px;
}

.order-total-card span {
    display: block;
    color: #64748b;
    font-size: 14px;
    margin-bottom: 8px;
}

.order-total-card strong {
    color: #0f172a;
    font-size: 16px;
}

.order-total-card.total {
    background: #ecfdf5;
    border-color: #bbf7d0;
}

.order-total-card.total strong {
    color: #15803d;
}

@media (max-width: 900px) {
    .order-total-grid {
        grid-template-columns: 1fr;
    }
}

.order-finance-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.order-total-card.profit {
    background: #f0fdf4;
    border-color: #86efac;
}

.order-total-card.profit strong {
    color: #15803d;
}

@media (max-width: 1200px) {
    .order-finance-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .order-finance-grid {
        grid-template-columns: 1fr;
    }
}


/* ADAPTIVE */

@media (max-width: 980px) {
    .main-nav {
        display: none;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        padding: 36px;
    }

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

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

@media (max-width: 640px) {
    .site-header,
    .site-footer {
        margin: 0;
        border-radius: 0;
    }

    .container {
        width: min(100% - 24px, 1180px);
    }

    .header-actions {
        display: none;
    }

    .hero {
        padding: 28px 0;
    }

    .hero-inner {
        padding: 26px;
        border-radius: 22px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero-list {
        grid-template-columns: 1fr;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .orders-preview div {
        grid-template-columns: 1fr;
    }

    .feature-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 640px) {

    .site-footer {
        text-align: center;
    }

    .footer-grid {
        justify-items: center;
        text-align: center;
    }

    .footer-grid > div {
        width: 100%;
    }

    .footer-grid p {
        margin-left: auto;
        margin-right: auto;
    }

    .footer-grid a {
        text-align: center;
    }

    .footer-logo,
    .footer-logo.footer-logo-svg {
        justify-content: center;
        margin-left: auto;
        margin-right: auto;
    }

    .footer-bottom {
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .site-footer .footer-bottom {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        gap: 4px;
        text-align: center; 
    }

    .site-footer .footer-bottom > * {
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .site-footer .footer-bottom a,
    .site-footer .footer-bottom span,
    .site-footer .footer-bottom p {
        display: block;
        text-align: center;
    }
}


/* =========================================================
   MOBILE: ГЛАВНАЯ СТРАНИЦА И СТРАНИЦА ВХОДА
   Добавить в конец assets/css/main.css
   ========================================================= */

html {
    scroll-behavior: smooth;
}

.login-card-inner {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
}

.login-form {
    display: grid;
    gap: 18px;
}

.login-field {
    display: grid;
    gap: 8px;
}

.login-field span {
    color: #334155;
    font-size: 14px;
    font-weight: 700;
}

.login-field input {
    margin-bottom: 0;
}

.login-mobile-back {
    display: none;
    width: fit-content;
    margin-bottom: 24px;
    color: #2563eb;
    font-size: 14px;
    font-weight: 700;
}

.hero-content,
.hero-visual,
.dashboard-card {
    min-width: 0;
}

.feature-card h2 {
    font-size: 20px;
    margin-bottom: 12px;
}

@media (max-width: 1100px) {
    .login-container {
        grid-template-columns: minmax(0, 1fr) 420px;
    }

    .login-left {
        padding: 56px;
    }

    .login-card {
        padding: 48px;
    }

    .hero-inner {
        gap: 36px;
        padding: 44px;
    }
}

@media (max-width: 820px) {
    .login-container {
        display: block;
        min-height: 100svh;
        background:
            radial-gradient(circle at 50% 0, rgba(37, 99, 235, .18), transparent 38%),
            #eef4fb;
    }

    .login-left {
        min-height: auto;
        padding: 28px 24px 22px;
        text-align: center;
        align-items: center;
        border-radius: 0 0 28px 28px;
    }

    .logo-box.login-logo-svg {
        margin: 0;
    }

    .logo-box.login-logo-svg img {
        width: min(240px, 72vw);
    }

    .login-promo-content {
        display: none;
    }

    .login-card {
        min-height: auto;
        padding: 34px 24px 48px;
        background: transparent;
    }

    .login-card-inner {
        max-width: 520px;
        padding: 30px;
        border: 1px solid rgba(148, 163, 184, .24);
        border-radius: 24px;
        background: #fff;
        box-shadow: 0 22px 60px rgba(15, 23, 42, .12);
    }

    .login-mobile-back {
        display: inline-flex;
    }

    .login-card h2 {
        font-size: 32px;
    }

    .login-card input,
    .login-card button {
        min-height: 52px;
        font-size: 16px;
    }

    .hero {
        padding: 30px 0 36px;
    }

    .hero-inner {
        min-height: 0;
        grid-template-columns: 1fr;
        gap: 34px;
        padding: 32px;
    }

    .hero-content {
        text-align: center;
    }

    .hero h1 {
        max-width: 680px;
        margin-right: auto;
        margin-left: auto;
        font-size: clamp(36px, 8vw, 52px);
    }

    .hero-text {
        margin-right: auto;
        margin-left: auto;
        font-size: 17px;
    }

    .hero-list {
        max-width: 650px;
        margin-right: auto;
        margin-left: auto;
        text-align: left;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-visual {
        width: 100%;
    }

    .dashboard-card {
        max-width: 650px;
    }

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

@media (max-width: 560px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .site-header {
        margin: 0;
        border-radius: 0 0 18px 18px;
    }

    .header-inner {
        height: 66px;
        gap: 12px;
    }

    .logo.logo-svg img {
        width: min(205px, 65vw);
        height: auto;
    }

    .hero {
        padding: 18px 0 28px;
    }

    .hero-inner {
        padding: 24px 18px;
        border-radius: 22px;
    }

    .badge {
        margin-bottom: 18px;
        font-size: 12px;
    }

    .hero h1 {
        margin-bottom: 18px;
        font-size: clamp(32px, 10vw, 42px);
        letter-spacing: -1.2px;
    }

    .hero-text {
        margin-bottom: 22px;
        font-size: 16px;
        line-height: 1.6;
    }

    .hero-list {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 24px;
    }

    .hero-list div {
        padding: 11px 12px;
        text-align: left;
    }

    .hero-buttons {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
        min-height: 52px;
    }

    .dashboard-card {
        padding: 16px;
        border-radius: 22px;
    }

    .dashboard-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .dashboard-stats div {
        min-width: 0;
        padding: 12px 8px;
        border-radius: 14px;
        text-align: center;
    }

    .dashboard-stats small {
        min-height: 30px;
        font-size: 11px;
    }

    .dashboard-stats strong {
        font-size: 23px;
    }

    .fake-chart {
        height: 125px;
        gap: 8px;
        padding: 16px 12px;
    }

    .orders-preview div {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 7px 10px;
        padding: 12px;
    }

    .orders-preview span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .orders-preview em {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .features {
        padding: 8px 0 48px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .feature-card {
        padding: 22px;
        border-radius: 20px;
    }

    .login-left {
        padding: 22px 18px 18px;
    }

    .login-card {
        padding: 24px 12px 38px;
    }

    .login-card-inner {
        padding: 24px 18px;
        border-radius: 20px;
    }

    .login-card h2 {
        font-size: 29px;
    }

    .login-card p {
        margin-bottom: 26px;
    }

    .login-mobile-back {
        margin-bottom: 20px;
    }
}

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

    .dashboard-stats small {
        min-height: 0;
    }

    .fake-chart {
        height: 105px;
    }
}

/* =========================================================
   MOBILE SHELL: HEADER, SIDEBAR, FOOTER
   Добавить в конец assets/css/main.css
   ========================================================= */

.mobile-menu-toggle,
.sidebar-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, .1);
    cursor: pointer;
}

.mobile-menu-toggle span,
.sidebar-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;
    border-radius: 999px;
    background: #fff;
    transition: transform .2s ease, opacity .2s ease;
}

.mobile-menu-toggle.is-open span:nth-child(1),
.sidebar-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.is-open span:nth-child(2),
.sidebar-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.is-open span:nth-child(3),
.sidebar-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.header-mobile-panel {
    display: contents;
}

.sidebar-mobile-head {
    display: block;
}

.footer-column,
.footer-contacts {
    text-align: center;
    min-width: 0;
}

.footer-contacts span,
.footer-contacts a {
    color: #cbd5e1;
}

.footer-bottom a {
    color: inherit;
}

@media (max-width: 980px) {
    .site-header {
        position: sticky;
        top: 0;
        z-index: 1000;
    }

    .header-inner {
        position: relative;
        height: 70px;
    }

    .mobile-menu-toggle {
        display: block;
        flex: 0 0 auto;
    }

    .header-mobile-panel {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        left: 0;
        display: grid;
        gap: 18px;
        padding: 18px;
        border: 1px solid rgba(255, 255, 255, .1);
        border-radius: 18px;
        background: #071427;
        box-shadow: 0 20px 50px rgba(0, 0, 0, .28);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: .2s ease;
    }

    .header-mobile-panel.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .main-nav {
        display: grid;
        gap: 6px;
    }

    .main-nav a {
        padding: 12px 14px;
        border-radius: 12px;
        color: #e2e8f0;
    }

    .main-nav a:hover {
        background: rgba(255, 255, 255, .08);
    }

    .header-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .header-actions .login-link,
    .header-actions .btn {
        width: 100%;
        min-height: 48px;
    }

    .header-actions .login-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 14px;
        background: rgba(255, 255, 255, .08);
    }

    body.mobile-menu-open {
        overflow: hidden;
    }

    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        min-height: 0;
        position: sticky;
        top: 0;
        z-index: 900;
        padding: 12px 14px;
    }

    .sidebar-mobile-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .sidebar-logo.sidebar-logo-svg {
        justify-content: flex-start;
        margin: 0;
        padding: 4px;
    }

    .sidebar-logo.sidebar-logo-svg img {
        width: 175px;
    }

    .sidebar-toggle {
        display: block;
        flex: 0 0 auto;
        background: rgba(255, 255, 255, .08);
    }

    .sidebar-nav {
        display: none;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        max-height: calc(100svh - 86px);
        margin-top: 12px;
        overflow-y: auto;
        padding: 4px 0 8px;
    }

    .sidebar.is-open .sidebar-nav {
        display: grid;
    }

    .sidebar-link {
        min-width: 0;
        padding: 12px;
        font-size: 14px;
    }

    .sidebar-link:hover {
        transform: none;
    }

    .sidebar-logout {
        grid-column: 1 / -1;
    }

    .site-footer {
        margin: 0;
        padding: 38px 0 20px;
        border-radius: 24px 24px 0 0;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .footer-logo.footer-logo-svg img {
        width: 190px;
    }

    .footer-grid p {
        margin-top: 12px;
    }

    .footer-bottom {
        display: grid;
        gap: 12px;
        text-align: center;
    }
}

@media (max-width: 560px) {
    .header-inner {
        height: 64px;
    }

    .header-mobile-panel {
        top: calc(100% + 6px);
        padding: 14px;
        border-radius: 16px;
    }

    .sidebar-nav {
        grid-template-columns: 1fr;
    }

    .sidebar-logout {
        grid-column: auto;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .footer-brand {
        grid-column: auto;
    }

    .footer-column {
        padding-top: 18px;
        border-top: 1px solid rgba(255, 255, 255, .1);
    }

    .footer-logo.footer-logo-svg img {
        width: 180px;
    }

    .footer-bottom {
        margin-top: 28px;
        padding-top: 18px;
        font-size: 13px;
    }
}

/* ORDER CREATE: переключение существующего/нового клиента и устройства */
.client-existing,
.device-existing {
    display: grid;
}

.client-existing.hidden,
.device-existing.hidden {
    display: none !important;
}

.new-client-box,
.new-device-box {
    display: none !important;
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    background: #f8fafc;
    border: 1px dashed #93c5fd;
    padding: 22px;
    border-radius: 20px;
}

.new-client-box.active,
.new-device-box.active {
    display: grid !important;
}

@media (max-width: 700px) {
    .new-client-box,
    .new-device-box {
        grid-template-columns: 1fr;
    }
}


/* ORDER VIEW PHOTO BLOCKS */
.photos-panel,
.order-photos-panel {
    grid-column: 1 / -1;
}

.order-photo-grid,
.order-photo-grid.modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    align-items: start;
}

.order-photo-card,
.order-photo-card.modern {
    position: relative;
    display: block;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: .2s;
    cursor: pointer;
    color: #0f172a;
}

.order-photo-card:hover,
.order-photo-card.modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
}

.order-photo-card img,
.order-photo-card.modern img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.photo-caption {
    min-height: 58px;
    padding: 14px;
    font-weight: 800;
    text-align: center;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.photo-icon {
    font-size: 18px;
}

.photo-date {
    display: block;
    padding: 0 14px 14px;
    background: #f8fafc;
    color: #64748b;
    font-size: 13px;
    text-align: center;
}

@media (max-width: 600px) {
    .order-photo-grid,
    .order-photo-grid.modern {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   ANALYTICS PAGE
   ========================================================= */

.analytics-page {
    min-width: 0;
}

.analytics-hero {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px;
    margin-bottom: 26px;
    padding: 30px 32px;
    overflow: hidden;
    border-radius: 28px;
    background:
        radial-gradient(circle at 88% 10%, rgba(96, 165, 250, .22), transparent 28%),
        linear-gradient(135deg, #0f172a 0%, #17233a 52%, #233756 100%);
    color: #fff;
    box-shadow: 0 22px 55px rgba(15, 23, 42, .2);
}

.analytics-hero::after {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    right: -100px;
    top: -130px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .07);
}

.analytics-hero-copy,
.analytics-hero-actions {
    position: relative;
    z-index: 1;
}

.analytics-eyebrow,
.analytics-section-heading span,
.analytics-panel-header > div > span {
    display: block;
    margin-bottom: 7px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.analytics-hero .analytics-eyebrow {
    color: #93c5fd;
}

.analytics-hero h1 {
    margin: 0 0 9px;
    color: #fff;
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.05;
}

.analytics-hero p {
    max-width: 690px;
    margin: 0;
    color: rgba(255, 255, 255, .76);
    line-height: 1.6;
}

.analytics-hero-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.analytics-hero .btn-light {
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid rgba(255, 255, 255, .2);
    background: rgba(255, 255, 255, .12);
    color: #fff;
    box-shadow: none;
}

.analytics-period-switch {
    display: inline-flex;
    gap: 5px;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 15px;
    background: rgba(255, 255, 255, .08);
    backdrop-filter: blur(8px);
}

.analytics-period-switch a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 10px;
    color: rgba(255, 255, 255, .7);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    transition: .18s ease;
}

.analytics-period-switch a:hover,
.analytics-period-switch a.active {
    background: #fff;
    color: #1d4ed8;
}

.analytics-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin: 0 2px 16px;
}

.analytics-section-heading h2,
.analytics-panel-header h2 {
    margin: 0;
    color: #0f172a;
    font-size: 22px;
}

.analytics-section-heading p,
.analytics-panel-header > p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.analytics-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.analytics-kpi-card {
    position: relative;
    min-width: 0;
    padding: 20px;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .07);
}

.analytics-kpi-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: var(--analytics-accent, #2563eb);
}

.analytics-kpi-card::after {
    content: "";
    position: absolute;
    width: 110px;
    height: 110px;
    right: -42px;
    top: -44px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--analytics-accent, #2563eb) 9%, transparent);
}

.analytics-kpi-blue { --analytics-accent: #2563eb; }
.analytics-kpi-green { --analytics-accent: #16a34a; }
.analytics-kpi-orange { --analytics-accent: #ea580c; }
.analytics-kpi-purple { --analytics-accent: #7c3aed; }

.analytics-kpi-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 17px;
}

.analytics-kpi-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 13px;
    background: color-mix(in srgb, var(--analytics-accent, #2563eb) 12%, #fff);
    color: var(--analytics-accent, #2563eb);
    font-size: 19px;
    font-weight: 900;
}

.analytics-kpi-label {
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.analytics-kpi-card > strong {
    position: relative;
    z-index: 1;
    display: block;
    margin-bottom: 10px;
    color: #0f172a;
    font-size: clamp(27px, 3vw, 34px);
    line-height: 1;
    word-break: break-word;
}

.analytics-kpi-card > strong.analytics-money {
    font-size: clamp(23px, 2.4vw, 30px);
}

.analytics-change {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.analytics-change.up {
    background: #dcfce7;
    color: #15803d;
}

.analytics-change.down {
    background: #fee2e2;
    color: #b91c1c;
}

.analytics-change.neutral {
    background: #f1f5f9;
    color: #64748b;
}

.analytics-lifetime-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    margin-bottom: 22px;
    overflow: hidden;
    border: 1px solid #dbe3ef;
    border-radius: 20px;
    background: #dbe3ef;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
}

.analytics-lifetime-strip > div {
    min-width: 0;
    padding: 16px 18px;
    background: rgba(255, 255, 255, .92);
}

.analytics-lifetime-strip span {
    display: block;
    margin-bottom: 7px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.analytics-lifetime-strip strong {
    display: block;
    color: #0f172a;
    font-size: 19px;
    word-break: break-word;
}

.analytics-main-grid,
.analytics-secondary-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(310px, .85fr);
    gap: 20px;
    margin-bottom: 20px;
}

.analytics-secondary-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(310px, .85fr);
}

.analytics-main-grid > *,
.analytics-secondary-grid > * {
    min-width: 0;
}

.analytics-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.analytics-chart-legend {
    display: flex;
    align-items: center;
    gap: 13px;
    flex-wrap: wrap;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.analytics-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.analytics-chart-legend i {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 4px;
}

.analytics-chart-legend i.revenue {
    background: #2563eb;
}

.analytics-chart-legend i.orders {
    border-radius: 50%;
    background: #f59e0b;
}

.analytics-chart-scroll {
    max-width: 100%;
    overflow-x: auto;
    padding: 8px 2px 6px;
    scrollbar-width: thin;
}

.analytics-combo-chart {
    display: grid;
    grid-template-columns: repeat(var(--analytics-columns), minmax(86px, 1fr));
    gap: 12px;
    min-width: max(100%, calc(var(--analytics-columns) * 98px));
    height: 330px;
    padding: 16px 12px 0;
    border-radius: 20px;
    background:
        repeating-linear-gradient(
            to top,
            transparent 0,
            transparent 64px,
            rgba(148, 163, 184, .17) 65px
        ),
        linear-gradient(180deg, #f8fbff, #fff);
}

.analytics-chart-column {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto auto;
    gap: 7px;
    min-width: 0;
    text-align: center;
}

.analytics-chart-bars {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 0;
}

.analytics-revenue-bar {
    width: min(42px, 62%);
    min-height: 8px;
    border-radius: 12px 12px 5px 5px;
    background: linear-gradient(180deg, #2563eb, #60a5fa);
    box-shadow: 0 10px 22px rgba(37, 99, 235, .2);
    transition: .2s ease;
}

.analytics-chart-column:hover .analytics-revenue-bar {
    filter: brightness(1.04);
    transform: translateY(-2px);
}

.analytics-orders-marker {
    position: absolute;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 27px;
    margin-left: 13px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #f59e0b;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    box-shadow: 0 6px 15px rgba(245, 158, 11, .28);
}

.analytics-chart-column > strong {
    overflow: hidden;
    color: #334155;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.analytics-chart-column > small {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.analytics-loyalty-panel {
    display: flex;
    flex-direction: column;
}

.analytics-loyalty-main {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(135deg, #eff6ff, #f8fafc);
}

.analytics-ring {
    --ring-value: 0;
    display: grid;
    place-items: center;
    width: 126px;
    height: 126px;
    border-radius: 50%;
    background: conic-gradient(#2563eb calc(var(--ring-value) * 1%), #dbeafe 0);
}

.analytics-ring::before {
    content: "";
    grid-area: 1 / 1;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 0 0 1px #e2e8f0;
}

.analytics-ring > div {
    z-index: 1;
    grid-area: 1 / 1;
    text-align: center;
}

.analytics-ring strong,
.analytics-ring span {
    display: block;
}

.analytics-ring strong {
    color: #0f172a;
    font-size: 28px;
}

.analytics-ring span {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.analytics-loyalty-copy strong {
    display: block;
    margin-bottom: 6px;
    color: #0f172a;
    font-size: 20px;
}

.analytics-loyalty-copy p {
    margin: 0;
    color: #64748b;
    line-height: 1.5;
}

.analytics-loyalty-stats {
    display: grid;
    gap: 10px;
    margin-top: auto;
}

.analytics-loyalty-stats > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 15px;
    border-radius: 14px;
    background: #f8fafc;
}

.analytics-loyalty-stats span {
    color: #64748b;
    font-size: 13px;
}

.analytics-loyalty-stats strong {
    color: #0f172a;
    font-size: 15px;
    text-align: right;
}

.analytics-ranking-list {
    display: grid;
    gap: 16px;
}

.analytics-ranking-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.analytics-rank-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 900;
}

.analytics-rank-content {
    min-width: 0;
}

.analytics-rank-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}

.analytics-rank-title strong {
    overflow: hidden;
    color: #334155;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.analytics-rank-title span {
    flex: 0 0 auto;
    color: #94a3b8;
    font-size: 12px;
}

.analytics-progress {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.analytics-progress span {
    display: block;
    height: 100%;
    min-width: 4px;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
}

.analytics-insight-list {
    display: grid;
    gap: 12px;
}

.analytics-insight-list > div {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 13px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fafc;
}

.analytics-insight-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #fff;
    font-size: 20px;
    box-shadow: 0 7px 18px rgba(15, 23, 42, .07);
}

.analytics-insight-list p,
.analytics-insight-list small,
.analytics-insight-list strong,
.analytics-insight-list em {
    display: block;
}

.analytics-insight-list p {
    min-width: 0;
    margin: 0;
}

.analytics-insight-list small {
    margin-bottom: 3px;
    color: #64748b;
    font-size: 11px;
}

.analytics-insight-list strong {
    overflow: hidden;
    color: #0f172a;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.analytics-insight-list em {
    margin-top: 4px;
    color: #94a3b8;
    font-size: 11px;
    font-style: normal;
}

.analytics-employees-panel {
    min-width: 0;
}

.analytics-employee-table-wrap {
    max-width: 100%;
}

.analytics-employee-table {
    min-width: 850px;
}

.analytics-employee-name {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: #0f172a;
}

.analytics-employee-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #60a5fa);
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .2);
}

.analytics-employee-name strong,
.analytics-employee-name small {
    display: block;
}

.analytics-employee-name small {
    margin-top: 3px;
    color: #94a3b8;
    font-size: 11px;
}

.analytics-completion-badge {
    display: inline-flex;
    min-width: 52px;
    justify-content: center;
    padding: 6px 9px;
    border-radius: 999px;
    background: #dcfce7;
    color: #15803d;
    font-size: 12px;
    font-weight: 900;
}

.analytics-empty-state {
    padding: 38px 20px;
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    color: #64748b;
    text-align: center;
}

@media (max-width: 1280px) {
    .analytics-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .analytics-main-grid,
    .analytics-secondary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .analytics-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .analytics-hero-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .analytics-lifetime-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .analytics-page {
        padding: 16px;
    }

    .analytics-hero {
        padding: 24px 20px;
        border-radius: 22px;
    }

    .analytics-hero-actions,
    .analytics-period-switch {
        width: 100%;
    }

    .analytics-period-switch {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .analytics-hero .btn-light {
        width: 100%;
    }

    .analytics-section-heading,
    .analytics-panel-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .analytics-kpi-grid,
    .analytics-lifetime-strip {
        grid-template-columns: 1fr;
    }

    .analytics-kpi-card {
        padding: 18px;
    }

    .analytics-main-grid,
    .analytics-secondary-grid {
        gap: 16px;
        margin-bottom: 16px;
    }

    .analytics-chart-panel,
    .analytics-loyalty-panel,
    .analytics-devices-panel,
    .analytics-insights-panel,
    .analytics-employees-panel {
        padding: 18px;
        border-radius: 20px;
    }

    .analytics-combo-chart {
        height: 300px;
        min-width: calc(var(--analytics-columns) * 92px);
        padding-inline: 8px;
    }

    .analytics-loyalty-main {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .analytics-loyalty-stats > div {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .analytics-loyalty-stats strong {
        text-align: left;
    }

    .analytics-rank-title {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .analytics-rank-title strong {
        white-space: normal;
    }

    .analytics-employee-table-wrap {
        overflow: visible;
    }

    .analytics-employee-table {
        min-width: 0;
    }

    .analytics-employee-table thead {
        display: none;
    }

    .analytics-employee-table,
    .analytics-employee-table tbody,
    .analytics-employee-table tr,
    .analytics-employee-table td {
        display: block;
        width: 100%;
    }

    .analytics-employee-table tbody {
        display: grid;
        gap: 14px;
    }

    .analytics-employee-table tr {
        overflow: hidden;
        border: 1px solid #e2e8f0;
        border-radius: 18px;
        background: #fff;
        box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
    }

    .analytics-employee-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 18px;
        padding: 11px 14px;
        border-bottom: 1px solid #f1f5f9;
        text-align: right;
    }

    .analytics-employee-table td:last-child {
        border-bottom: 0;
    }

    .analytics-employee-table td::before {
        content: attr(data-label);
        flex: 0 0 auto;
        color: #64748b;
        font-size: 12px;
        font-weight: 800;
        text-align: left;
    }

    .analytics-employee-table td:first-child {
        display: block;
        padding: 15px;
        background: #f8fafc;
        text-align: left;
    }

    .analytics-employee-table td:first-child::before {
        display: none;
    }

    .analytics-employee-name {
        width: 100%;
    }
}

@media (max-width: 430px) {
    .analytics-page {
        padding: 13px;
    }

    .analytics-hero {
        padding: 21px 17px;
    }

    .analytics-period-switch {
        grid-template-columns: 1fr 1fr;
    }

    .analytics-kpi-card > strong.analytics-money {
        font-size: 23px;
    }

    .analytics-lifetime-strip > div {
        padding: 14px 15px;
    }
}

/* =========================================================
   DASHBOARD PAGE
   ========================================================= */

.dashboard-page {
    min-width: 0;
    overflow: hidden;
}

.dashboard-page > * {
    min-width: 0;
}

.dashboard-alert {
    margin-bottom: 18px;
}

.dashboard-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr);
    gap: 34px;
    align-items: center;
    margin-bottom: 22px;
    padding: 32px;
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(135deg, #101827 0%, #182339 54%, #233554 100%);
    color: #fff;
    box-shadow: 0 22px 55px rgba(15, 23, 42, .18);
}

.dashboard-hero::before,
.dashboard-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.dashboard-hero::before {
    width: 330px;
    height: 330px;
    right: -110px;
    top: -150px;
    background: rgba(255, 255, 255, .07);
}

.dashboard-hero::after {
    width: 190px;
    height: 190px;
    right: 250px;
    bottom: -145px;
    background: rgba(37, 99, 235, .18);
}

.dashboard-hero-copy,
.dashboard-hero-side {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.dashboard-eyebrow,
.dashboard-panel-header > div > span {
    display: block;
    color: #2563eb;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.dashboard-hero .dashboard-eyebrow {
    margin-bottom: 10px;
    color: #93c5fd;
}

.dashboard-hero h1 {
    margin: 0 0 12px;
    color: #fff;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.08;
    letter-spacing: -.04em;
}

.dashboard-hero p {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, .76);
    font-size: 16px;
    line-height: 1.65;
}

.dashboard-date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 9px 13px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 800;
}

.dashboard-hero-side {
    display: grid;
    gap: 14px;
}

.dashboard-user-card {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 18px;
    background: rgba(255, 255, 255, .09);
    backdrop-filter: blur(10px);
}

.dashboard-user-avatar,
.dashboard-employee-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb, #60a5fa);
    color: #fff;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(37, 99, 235, .25);
}

.dashboard-user-avatar {
    width: 46px;
    height: 46px;
    font-size: 18px;
}

.dashboard-user-card strong,
.dashboard-user-card span {
    display: block;
}

.dashboard-user-card strong {
    margin-bottom: 3px;
    color: #fff;
    font-size: 15px;
}

.dashboard-user-card span {
    color: #cbd5e1;
    font-size: 12px;
}

.dashboard-quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.dashboard-quick-action {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 54px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 16px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.dashboard-quick-action:hover {
    transform: translateY(-2px);
    border-color: rgba(147, 197, 253, .55);
    background: rgba(37, 99, 235, .22);
}

.dashboard-quick-action > span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 11px;
    background: rgba(255, 255, 255, .12);
    font-size: 17px;
}

.dashboard-quick-action strong {
    min-width: 0;
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.dashboard-kpi-card {
    --dashboard-accent: #2563eb;
    position: relative;
    display: block;
    min-width: 0;
    min-height: 154px;
    padding: 20px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    background: #fff;
    color: #0f172a;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .07);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.dashboard-kpi-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: var(--dashboard-accent);
}

.dashboard-kpi-card::after {
    content: "";
    position: absolute;
    width: 105px;
    height: 105px;
    right: -38px;
    bottom: -48px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--dashboard-accent) 10%, transparent);
}

.dashboard-kpi-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--dashboard-accent) 42%, #e2e8f0);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .11);
}

.dashboard-kpi-blue { --dashboard-accent: #2563eb; }
.dashboard-kpi-orange { --dashboard-accent: #ea580c; }
.dashboard-kpi-green { --dashboard-accent: #16a34a; }
.dashboard-kpi-purple { --dashboard-accent: #7c3aed; }

.dashboard-kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.dashboard-kpi-top span {
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.dashboard-kpi-top i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 13px;
    background: color-mix(in srgb, var(--dashboard-accent) 11%, #fff);
    color: var(--dashboard-accent);
    font-size: 18px;
    font-style: normal;
    font-weight: 900;
}

.dashboard-kpi-card > strong {
    position: relative;
    z-index: 1;
    display: block;
    margin-bottom: 10px;
    color: #0f172a;
    font-size: 32px;
    line-height: 1;
    letter-spacing: -.04em;
}

.dashboard-kpi-card > strong.dashboard-kpi-money {
    font-size: clamp(22px, 2.2vw, 29px);
    white-space: nowrap;
}

.dashboard-kpi-card > small {
    position: relative;
    z-index: 1;
    display: block;
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.45;
}

.dashboard-overview-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, .2);
    border-radius: 22px;
    background: rgba(255, 255, 255, .7);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .04);
}

.dashboard-overview-strip > a,
.dashboard-overview-strip > div {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 12px 14px;
    border-radius: 16px;
    transition: background .18s ease, transform .18s ease;
}

.dashboard-overview-strip > a:hover {
    transform: translateY(-1px);
    background: #f8fafc;
}

.dashboard-overview-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 13px;
    background: #eff6ff;
    font-size: 19px;
}

.dashboard-overview-strip strong,
.dashboard-overview-strip small {
    display: block;
}

.dashboard-overview-strip strong {
    margin-bottom: 2px;
    color: #0f172a;
    font-size: 20px;
}

.dashboard-overview-strip small {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.dashboard-panel {
    min-width: 0;
    padding: 22px;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, .06);
}

.dashboard-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.dashboard-panel-header.compact {
    align-items: flex-start;
}

.dashboard-panel-header h2 {
    margin: 5px 0 0;
    color: #0f172a;
    font-size: 21px;
}

.dashboard-panel-header p {
    margin: 7px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.dashboard-panel-header > a {
    flex: 0 0 auto;
    color: #2563eb;
    font-size: 13px;
    font-weight: 900;
}

.dashboard-notifications-panel {
    margin-bottom: 22px;
}

.dashboard-notification-total {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border-radius: 17px;
    background: #ecfdf5;
    color: #15803d;
    font-size: 20px;
    font-weight: 900;
}

.dashboard-notification-total.has-items {
    background: #fff7ed;
    color: #c2410c;
    box-shadow: 0 10px 24px rgba(234, 88, 12, .12);
}

.dashboard-notifications-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.dashboard-notification-card {
    --notification-accent: #2563eb;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #f8fafc;
    color: #0f172a;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.dashboard-notification-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--notification-accent) 42%, #e2e8f0);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

.notification-urgent { --notification-accent: #dc2626; }
.notification-master { --notification-accent: #7c3aed; }
.notification-stale { --notification-accent: #f59e0b; }
.notification-stock { --notification-accent: #0284c7; }

.dashboard-notification-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--notification-accent) 11%, #fff);
    font-size: 20px;
}

.dashboard-notification-card strong,
.dashboard-notification-card small {
    display: block;
}

.dashboard-notification-card strong {
    margin-bottom: 4px;
    color: #0f172a;
    font-size: 22px;
    line-height: 1;
}

.dashboard-notification-card small {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.35;
}

.dashboard-notifications-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.dashboard-notification-group {
    min-width: 0;
    padding: 17px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #fff;
}

.dashboard-notification-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.dashboard-notification-group-head h3 {
    margin: 0;
    color: #0f172a;
    font-size: 16px;
}

.dashboard-notification-group-head span {
    color: #94a3b8;
    font-size: 10px;
    font-weight: 800;
}

.dashboard-notification-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
    padding: 12px 0;
    border-top: 1px solid #f1f5f9;
}

.dashboard-notification-item:first-of-type {
    border-top: 0;
}

.dashboard-notification-item > div {
    min-width: 0;
}

.dashboard-notification-item strong,
.dashboard-notification-item span {
    display: block;
}

.dashboard-notification-item strong {
    margin-bottom: 4px;
    overflow: hidden;
    color: #0f172a;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-notification-item span {
    color: #64748b;
    font-size: 11px;
    line-height: 1.45;
}

.dashboard-notification-item > a {
    flex: 0 0 auto;
    font-size: 12px;
}

.dashboard-notifications-empty {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border: 1px solid #bbf7d0;
    border-radius: 18px;
    background: #ecfdf5;
    color: #166534;
}

.dashboard-notifications-empty > span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 14px;
    background: #fff;
    font-size: 20px;
    font-weight: 900;
}

.dashboard-notifications-empty strong,
.dashboard-notifications-empty p {
    display: block;
    margin: 0;
}

.dashboard-notifications-empty p {
    margin-top: 4px;
    color: #15803d;
    font-size: 12px;
}

.dashboard-operational-grid,
.dashboard-bottom-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, .85fr);
    gap: 20px;
    margin-bottom: 22px;
}

.dashboard-operational-grid > *,
.dashboard-bottom-grid > * {
    min-width: 0;
}

.dashboard-chart-scroll {
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
}

.dashboard-orders-chart {
    display: grid;
    grid-template-columns: repeat(var(--dashboard-columns), minmax(54px, 1fr));
    gap: 10px;
    min-width: max(100%, calc(var(--dashboard-columns) * 68px));
    height: 230px;
    padding: 8px 4px 0;
    border-radius: 18px;
    background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 72%, #fff 100%);
}

.dashboard-chart-column {
    display: grid;
    grid-template-rows: 22px minmax(0, 1fr) 24px;
    gap: 6px;
    align-items: end;
    min-width: 0;
}

.dashboard-chart-column > strong {
    color: #475569;
    font-size: 11px;
    text-align: center;
}

.dashboard-chart-track {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 999px 999px 8px 8px;
    background: rgba(219, 234, 254, .6);
}

.dashboard-chart-track span {
    width: 68%;
    min-height: 5px;
    border-radius: 999px 999px 7px 7px;
    background: linear-gradient(180deg, #2563eb, #60a5fa);
    box-shadow: 0 8px 18px rgba(37, 99, 235, .18);
    transition: filter .18s ease, transform .18s ease;
}

.dashboard-chart-column:hover .dashboard-chart-track span {
    filter: brightness(1.08);
    transform: scaleX(1.06);
}

.dashboard-chart-column > small {
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    text-align: center;
}

.dashboard-status-list {
    display: grid;
    gap: 13px;
}

.dashboard-status-item {
    --status-accent: #2563eb;
    display: block;
    padding: 1px 0;
}

.dashboard-status-item > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 7px;
}

.dashboard-status-item > div:first-child span {
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}

.dashboard-status-item > div:first-child strong {
    color: #0f172a;
    font-size: 13px;
}

.dashboard-status-progress {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #f1f5f9;
}

.dashboard-status-progress span {
    display: block;
    height: 100%;
    min-width: 3px;
    border-radius: inherit;
    background: var(--status-accent);
    transition: filter .18s ease;
}

.dashboard-status-item:hover .dashboard-status-progress span {
    filter: brightness(.9);
}

.dashboard-status-item.status-blue { --status-accent: #2563eb; }
.dashboard-status-item.status-purple { --status-accent: #7c3aed; }
.dashboard-status-item.status-cyan { --status-accent: #0284c7; }
.dashboard-status-item.status-yellow { --status-accent: #eab308; }
.dashboard-status-item.status-orange { --status-accent: #ea580c; }
.dashboard-status-item.status-green { --status-accent: #16a34a; }
.dashboard-status-item.status-slate { --status-accent: #64748b; }
.dashboard-status-item.status-red { --status-accent: #dc2626; }

.dashboard-table-wrap {
    max-width: 100%;
    overflow-x: auto;
}

.dashboard-latest-table {
    min-width: 680px;
}

.dashboard-latest-table th,
.dashboard-latest-table td {
    padding: 13px 12px;
}

.dashboard-latest-table td {
    font-size: 13px;
}

.dashboard-employees-list {
    display: grid;
    gap: 10px;
}

.dashboard-employee-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 11px;
    align-items: center;
    min-width: 0;
    padding: 11px;
    border: 1px solid transparent;
    border-radius: 16px;
    background: #f8fafc;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.dashboard-employee-item:hover {
    transform: translateY(-1px);
    border-color: #dbeafe;
    background: #fff;
}

.dashboard-employee-avatar {
    width: 42px;
    height: 42px;
    font-size: 14px;
}

.dashboard-employee-copy,
.dashboard-employee-copy strong,
.dashboard-employee-copy small {
    display: block;
    min-width: 0;
}

.dashboard-employee-copy strong {
    overflow: hidden;
    color: #0f172a;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-employee-copy small {
    margin-top: 3px;
    overflow: hidden;
    color: #64748b;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-employee-meta {
    display: grid;
    justify-items: end;
    gap: 2px;
}

.dashboard-employee-meta b {
    color: #0f172a;
    font-size: 15px;
}

.dashboard-employee-meta > small {
    color: #94a3b8;
    font-size: 9px;
    font-weight: 800;
}

.employee-state {
    display: inline-flex;
    margin-top: 4px;
    padding: 4px 7px;
    border-radius: 999px;
    background: #dcfce7;
    color: #15803d;
    font-size: 8px;
    font-style: normal;
    font-weight: 900;
}

.employee-state-busy {
    background: #ffedd5;
    color: #c2410c;
}

.employee-state-vacation {
    background: #ede9fe;
    color: #6d28d9;
}

.employee-state-inactive {
    background: #f1f5f9;
    color: #64748b;
}

.dashboard-empty-state {
    padding: 28px 16px;
    color: #64748b;
    text-align: center;
}

@media (max-width: 1280px) {
    .dashboard-hero {
        grid-template-columns: minmax(0, 1fr) minmax(330px, .8fr);
    }

    .dashboard-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-notifications-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1050px) {
    .dashboard-hero {
        grid-template-columns: 1fr;
    }

    .dashboard-hero-side {
        grid-template-columns: minmax(250px, .7fr) minmax(0, 1.3fr);
        align-items: stretch;
    }

    .dashboard-user-card {
        height: 100%;
    }

    .dashboard-overview-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-operational-grid,
    .dashboard-bottom-grid,
    .dashboard-notifications-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-page {
        padding: 16px;
    }

    .dashboard-hero {
        gap: 24px;
        padding: 24px 20px;
        border-radius: 22px;
    }

    .dashboard-hero-side {
        grid-template-columns: 1fr;
    }

    .dashboard-kpi-grid {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    .dashboard-kpi-card {
        min-height: 0;
        padding: 18px;
    }

    .dashboard-overview-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 8px;
    }

    .dashboard-panel {
        padding: 18px;
        border-radius: 20px;
    }

    .dashboard-panel-header {
        align-items: flex-start;
    }

    .dashboard-notifications-summary {
        grid-template-columns: 1fr 1fr;
    }

    .dashboard-notification-item {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }

    .dashboard-notification-item strong {
        white-space: normal;
    }

    .dashboard-notification-item > a {
        align-self: flex-start;
    }

    .dashboard-orders-chart {
        min-width: calc(var(--dashboard-columns) * 64px);
    }

    .dashboard-table-wrap {
        overflow: visible;
    }

    .dashboard-latest-table {
        min-width: 0;
    }

    .dashboard-latest-table thead {
        display: none;
    }

    .dashboard-latest-table,
    .dashboard-latest-table tbody,
    .dashboard-latest-table tr,
    .dashboard-latest-table td {
        display: block;
        width: 100%;
    }

    .dashboard-latest-table tbody {
        display: grid;
        gap: 13px;
    }

    .dashboard-latest-table tr {
        overflow: hidden;
        border: 1px solid #e2e8f0;
        border-radius: 17px;
        background: #fff;
        box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
    }

    .dashboard-latest-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 18px;
        padding: 10px 13px;
        border-bottom: 1px solid #f1f5f9;
        text-align: right;
    }

    .dashboard-latest-table td:last-child {
        border-bottom: 0;
    }

    .dashboard-latest-table td::before {
        content: attr(data-label);
        flex: 0 0 auto;
        color: #64748b;
        font-size: 11px;
        font-weight: 800;
        text-align: left;
    }

    .dashboard-latest-table td:first-child {
        padding: 13px;
        background: #f8fafc;
    }
}

@media (max-width: 560px) {
    .dashboard-page {
        padding: 13px;
    }

    .dashboard-hero {
        padding: 21px 17px;
    }

    .dashboard-hero h1 {
        font-size: 30px;
    }

    .dashboard-hero p {
        font-size: 14px;
    }

    .dashboard-date {
        width: 100%;
        justify-content: center;
        border-radius: 14px;
        text-align: center;
    }

    .dashboard-quick-grid,
    .dashboard-notifications-summary,
    .dashboard-overview-strip {
        grid-template-columns: 1fr;
    }

    .dashboard-quick-action strong {
        font-size: 13px;
    }

    .dashboard-kpi-card > strong.dashboard-kpi-money {
        font-size: 23px;
    }

    .dashboard-panel-header {
        flex-direction: column;
        gap: 12px;
    }

    .dashboard-notification-total {
        width: 100%;
        height: 42px;
        border-radius: 13px;
    }

    .dashboard-notification-group-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .dashboard-employee-item {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .dashboard-employee-meta {
        grid-column: 1 / -1;
        grid-template-columns: auto auto 1fr;
        align-items: center;
        justify-items: start;
        padding-left: 53px;
    }

    .dashboard-employee-meta .employee-state {
        justify-self: end;
        margin: 0;
    }
}

/* =========================================================
   COMMON RESOURCE PAGES: CLIENTS, DEVICES, EMPLOYEES, PARTS,
   SETTINGS AND SYSTEM INFO
   ========================================================= */

.resource-page {
    min-width: 0;
}

.resource-hero {
    position: relative;
    display: flex;
    
    justify-content: space-between;
    gap: 26px;
    min-width: 0;
    margin-bottom: 22px;
    padding: 28px 30px;
    overflow: hidden;
    border-radius: 28px;
    background:
        radial-gradient(circle at 88% 6%, rgba(96, 165, 250, .22), transparent 29%),
        linear-gradient(135deg, #0f172a 0%, #17233a 53%, #233756 100%);
    color: #fff;
    box-shadow: 0 20px 52px rgba(15, 23, 42, .18);
}

.resource-hero::after {
    content: "";
    position: absolute;
    width: 290px;
    height: 290px;
    right: -105px;
    top: -135px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .07);
}

.resource-hero-copy,
.resource-hero-actions {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.resource-eyebrow {
    display: block;
    margin-bottom: 7px;
    color: #93c5fd;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.resource-hero h1 {
    margin: 0 0 8px;
    color: #fff;
    font-size: clamp(30px, 4vw, 40px);
    line-height: 1.08;
}

.resource-hero p {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, .76);
    line-height: 1.58;
}

.resource-hero-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 11px;
    flex-wrap: wrap;
}

.resource-hero .btn-light {
    border: 1px solid rgba(255, 255, 255, .2);
    background: rgba(255, 255, 255, .12);
    color: #fff;
    box-shadow: none;
}

.resource-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.resource-kpi-card {
    --resource-accent: #2563eb;
    position: relative;
    min-width: 0;
    padding: 20px;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 11px 30px rgba(15, 23, 42, .065);
}

.resource-kpi-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: var(--resource-accent);
}

.resource-kpi-card::after {
    content: "";
    position: absolute;
    width: 105px;
    height: 105px;
    right: -40px;
    top: -42px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--resource-accent) 8%, transparent);
}

.resource-kpi-blue { --resource-accent: #2563eb; }
.resource-kpi-green { --resource-accent: #16a34a; }
.resource-kpi-orange { --resource-accent: #ea580c; }
.resource-kpi-purple { --resource-accent: #7c3aed; }
.resource-kpi-cyan { --resource-accent: #0284c7; }
.resource-kpi-red { --resource-accent: #dc2626; }
.resource-kpi-slate { --resource-accent: #475569; }

.resource-kpi-label {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.resource-kpi-card > strong {
    position: relative;
    z-index: 1;
    display: block;
    overflow-wrap: anywhere;
    color: #0f172a;
    font-size: clamp(25px, 2.5vw, 31px);
    line-height: 1.05;
}

.resource-kpi-card > small {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 9px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 700;
}

.resource-panel {
    min-width: 0;
}

.resource-panel-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.resource-panel-head h2 {
    margin: 0 0 4px;
    color: #0f172a;
    font-size: 21px;
}

.resource-panel-head p,
.resource-panel-head > span {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.resource-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #f8fafc;
}

.resource-search-form .form-group {
    gap: 6px;
}

.resource-search-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.resource-table {
    min-width: 860px;
}

.resource-table th {
    white-space: nowrap;
}

.resource-table td {
    vertical-align: middle;
}

.resource-primary-cell strong,
.resource-primary-cell small {
    display: block;
}

.resource-primary-cell small {
    margin-top: 5px;
    color: #64748b;
}

.resource-secondary-text {
    color: #64748b;
    font-size: 13px;
}

.resource-row-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.resource-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
    transition: .18s ease;
}

.resource-action-link:hover {
    transform: translateY(-1px);
    border-color: #93c5fd;
    background: #dbeafe;
}

.resource-action-link.secondary {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #475569;
}

.stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 11px;
    font-weight: 900;
}

.resource-empty-cell {
    padding: 0 !important;
}

.resource-empty-box {
    padding: 42px 20px;
    color: #64748b;
    text-align: center;
}

.resource-empty-box strong {
    display: block;
    margin-bottom: 7px;
    color: #0f172a;
    font-size: 17px;
}

/* Devices: search in hero */
.resource-device-actions {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) auto;
    gap: 10px;
    width: min(610px, 100%);
}

.resource-device-search {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 5px 5px 5px 13px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 15px;
    background: rgba(255, 255, 255, .11);
    backdrop-filter: blur(8px);
}

.resource-device-search input {
    min-width: 0;
    height: 39px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff;
    font: inherit;
}

.resource-device-search input::placeholder {
    color: rgba(255, 255, 255, .58);
}

.resource-device-search .btn {
    min-height: 39px;
    padding: 0 15px;
    border-radius: 11px;
    background: #fff;
    color: #1d4ed8;
}

/* Settings */
.settings-page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, .72fr);
    gap: 20px;
    align-items: start;
}

.settings-page-grid > * {
    min-width: 0;
}

.settings-section {
    padding: 21px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: #f8fafc;
}

.settings-section + .settings-section {
    margin-top: 18px;
}

.settings-section-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

.settings-section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 14px;
    background: #dbeafe;
    font-size: 20px;
}

.settings-section-head h2 {
    margin: 0 0 4px;
    color: #0f172a;
    font-size: 19px;
}

.settings-section-head p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.45;
}

.settings-help-card {
    position: sticky;
    top: 22px;
}

.settings-help-list {
    display: grid;
    gap: 12px;
}

.settings-help-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 11px;
    padding: 13px;
    border-radius: 16px;
    background: #f8fafc;
}

.settings-help-item > span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: #fff;
}

.settings-help-item strong,
.settings-help-item small {
    display: block;
}

.settings-help-item strong {
    margin-bottom: 3px;
    color: #0f172a;
    font-size: 13px;
}

.settings-help-item small {
    color: #64748b;
    line-height: 1.4;
}

/* System information */
.system-page-hero {
    align-items: stretch;
}

.system-version-card {
    position: relative;
    z-index: 1;
    min-width: 270px;
    padding: 19px;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 20px;
    background: rgba(255, 255, 255, .08);
    backdrop-filter: blur(9px);
}

.system-version-card span {
    display: block;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 800;
}

.system-version-card strong {
    display: block;
    margin: 6px 0 13px;
    color: #fff;
    font-size: 34px;
    line-height: 1;
}

.system-progress {
    height: 10px;
    margin: 12px 0;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(15, 23, 42, .45);
}

.system-progress span {
    display: block;
    height: 100%;
    width: var(--system-progress, 0%);
    border-radius: inherit;
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

.system-stats-grid-modern {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.system-stat-modern {
    min-width: 0;
    padding: 17px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .045);
}

.system-stat-modern span,
.system-stat-modern strong {
    display: block;
}

.system-stat-modern span {
    margin-bottom: 7px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.system-stat-modern strong {
    color: #0f172a;
    font-size: 25px;
}

.system-health-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.system-health-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #f8fafc;
}

.system-health-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 14px;
    background: #fff;
    font-size: 20px;
}

.system-health-card strong,
.system-health-card span {
    display: block;
}

.system-health-card strong {
    color: #0f172a;
    font-size: 23px;
}

.system-health-card span {
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.system-modules-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.system-module-card {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 14px;
    min-width: 0;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 19px;
    background: #fff;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.system-module-card:hover {
    transform: translateY(-2px);
    border-color: #bfdbfe;
    box-shadow: 0 13px 28px rgba(15, 23, 42, .08);
}

.system-module-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 15px;
    background: #f1f5f9;
    font-size: 22px;
}

.system-module-card h3 {
    margin: 0 0 6px;
    color: #0f172a;
    font-size: 16px;
}

.system-module-card p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.48;
}

.system-module-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 11px;
    font-weight: 900;
}

.system-module-status.wait {
    background: #fef3c7;
    color: #92400e;
}

.system-roadmap {
    display: grid;
    gap: 10px;
    counter-reset: roadmap;
}

.system-roadmap-item {
    counter-increment: roadmap;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 11px;
    align-items: center;
    padding: 13px;
    border-radius: 15px;
    background: #f8fafc;
    color: #334155;
    font-weight: 700;
    line-height: 1.45;
}

.system-roadmap-item::before {
    content: counter(roadmap);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 900;
}

@media (max-width: 1280px) {
    .resource-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .system-stats-grid-modern {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1050px) {
    .resource-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .resource-hero-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .resource-device-actions {
        width: 100%;
    }

    .settings-page-grid {
        grid-template-columns: 1fr;
    }

    .settings-help-card {
        position: static;
    }

    .system-health-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =========================================================
   FIX: горизонтальное растягивание карточек на телефоне
   ========================================================= */

@media (max-width: 768px) {

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .admin-layout,
    .admin-main,
    .admin-topbar,
    .admin-panel,
    .order-view-grid,
    .order-view-grid > *,
    .table-wrap {
        min-width: 0;
        max-width: 100%;
    }

    /* Верхняя панель карточки */
    .admin-topbar {
        width: 100%;
        overflow: hidden;
    }

    .admin-topbar > div {
        width: 100%;
        min-width: 0;
    }

    /* Кнопки заявки и запчасти */
    .admin-topbar .form-actions,
    .admin-topbar .topbar-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        min-width: 0;
        gap: 10px;
    }

    .admin-topbar .form-actions .btn,
    .admin-topbar .topbar-actions .btn {
        width: 100%;
        min-width: 0;
        padding-left: 10px;
        padding-right: 10px;
        white-space: normal;
        line-height: 1.25;
        text-align: center;
    }

    /* Последняя кнопка "Назад" занимает всю строку */
    .admin-topbar .form-actions .btn:last-child,
    .admin-topbar .topbar-actions .btn:last-child {
        grid-column: 1 / -1;
    }

    /* Карточка заявки всегда одна колонка */
    .order-view-grid {
        width: 100%;
        grid-template-columns: minmax(0, 1fr);
    }

    .order-view-grid > .admin-panel {
        width: 100%;
        min-width: 0;
        overflow: hidden;
    }

    /* Широкие таблицы прокручиваются внутри карточки */
    .order-view-grid .table-wrap {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .order-view-grid .admin-table {
        width: 100%;
        min-width: 720px;
    }

    /* Длинные email, артикулы, IMEI и серийные номера */
    .info-list strong,
    .info-list a,
    .info-list p,
    .admin-panel td {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}

@media (max-width: 768px) {
    .resource-page {
        padding: 16px;
    }

    .resource-hero {
        padding: 23px 20px;
        border-radius: 22px;
    }

    .resource-hero-actions .btn {
        flex: 1 1 190px;
    }

    .resource-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .resource-kpi-card {
        padding: 17px;
        border-radius: 18px;
    }

    .resource-panel {
        padding: 18px;
        border-radius: 20px;
    }

    .resource-panel-head {
        align-items: flex-start;
    }

    .resource-search-form {
        grid-template-columns: 1fr;
    }

    .resource-device-actions {
        grid-template-columns: 1fr;
    }

    .resource-device-search {
        width: 100%;
    }

    .responsive-card-table-wrap {
        overflow: visible;
    }

    .responsive-card-table {
        min-width: 0;
    }

    .responsive-card-table thead {
        display: none;
    }

    .responsive-card-table,
    .responsive-card-table tbody,
    .responsive-card-table tr,
    .responsive-card-table td {
        display: block;
        width: 100%;
    }

    .responsive-card-table tbody {
        display: grid;
        gap: 13px;
    }

    .responsive-card-table tr {
        overflow: hidden;
        border: 1px solid #e2e8f0;
        border-radius: 17px;
        background: #fff;
        box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
    }

    .responsive-card-table td {
        display: grid;
        grid-template-columns: minmax(105px, .75fr) minmax(0, 1.25fr);
        gap: 15px;
        align-items: center;
        padding: 10px 13px;
        border-bottom: 1px solid #f1f5f9;
        text-align: right;
        overflow-wrap: anywhere;
    }

    .responsive-card-table td:last-child {
        border-bottom: 0;
    }

    .responsive-card-table td::before {
        content: attr(data-label);
        color: #64748b;
        font-size: 11px;
        font-weight: 900;
        text-align: left;
    }

    .responsive-card-table td:first-child {
        padding: 13px;
        background: #f8fafc;
    }

    .responsive-card-table td:first-child .table-link {
        font-size: 15px;
    }

    .responsive-card-table .resource-row-actions {
        justify-content: flex-end;
    }

    .responsive-card-table .resource-empty-cell {
        display: block;
    }

    .responsive-card-table .resource-empty-cell::before {
        display: none;
    }

    .system-page-hero {
        flex-direction: column;
    }

    .system-version-card {
        width: 100%;
        min-width: 0;
    }

    .system-stats-grid-modern {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .system-modules-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   FIX: горизонтальное растягивание карточек на телефоне
   ========================================================= */

@media (max-width: 768px) {

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .admin-layout,
    .admin-main,
    .admin-topbar,
    .admin-panel,
    .order-view-grid,
    .order-view-grid > *,
    .table-wrap {
        min-width: 0;
        max-width: 100%;
    }

    /* Верхняя панель карточки */
    .admin-topbar {
        width: 100%;
        overflow: hidden;
    }

    .admin-topbar > div {
        width: 100%;
        min-width: 0;
    }

    /* Кнопки заявки и запчасти */
    .admin-topbar .form-actions,
    .admin-topbar .topbar-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        min-width: 0;
        gap: 10px;
    }

    .admin-topbar .form-actions .btn,
    .admin-topbar .topbar-actions .btn {
        width: 100%;
        min-width: 0;
        padding-left: 10px;
        padding-right: 10px;
        white-space: normal;
        line-height: 1.25;
        text-align: center;
    }

    /* Последняя кнопка "Назад" занимает всю строку */
    .admin-topbar .form-actions .btn:last-child,
    .admin-topbar .topbar-actions .btn:last-child {
        grid-column: 1 / -1;
    }

    /* Карточка заявки всегда одна колонка */
    .order-view-grid {
        width: 100%;
        grid-template-columns: minmax(0, 1fr);
    }

    .order-view-grid > .admin-panel {
        width: 100%;
        min-width: 0;
        overflow: hidden;
    }

    /* Широкие таблицы прокручиваются внутри карточки */
    .order-view-grid .table-wrap {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .order-view-grid .admin-table {
        width: 100%;
        min-width: 720px;
    }

    /* Длинные email, артикулы, IMEI и серийные номера */
    .info-list strong,
    .info-list a,
    .info-list p,
    .admin-panel td {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}

@media (max-width: 560px) {
    .resource-page {
        padding: 13px;
    }

    .resource-hero {
        padding: 21px 17px;
    }

    .resource-hero h1 {
        font-size: 29px;
    }

    .resource-hero p {
        font-size: 14px;
    }

    .resource-kpi-grid,
    .system-stats-grid-modern,
    .system-health-grid {
        grid-template-columns: 1fr;
    }

    .resource-panel-head {
        flex-direction: column;
        gap: 8px;
    }

    .resource-search-actions,
    .resource-search-actions .btn,
    .resource-hero-actions .btn {
        width: 100%;
    }

    .resource-device-search {
        grid-template-columns: auto minmax(0, 1fr);
        padding: 8px 10px;
    }

    .resource-device-search .btn {
        grid-column: 1 / -1;
        width: 100%;
    }

    .responsive-card-table td {
        grid-template-columns: 1fr;
        gap: 5px;
        text-align: left;
    }

    .responsive-card-table .resource-row-actions {
        justify-content: flex-start;
    }

    .settings-section {
        padding: 17px;
    }

    .settings-section .form-grid {
        grid-template-columns: 1fr;
    }

    .settings-section .form-actions,
    .settings-section .form-actions .btn {
        width: 100%;
    }

    .system-module-card {
        grid-template-columns: 42px minmax(0, 1fr);
        padding: 15px;
    }

    .system-module-icon {
        width: 42px;
        height: 42px;
    }
}

/* =========================================================
   PUBLIC SERVICEHUB PAGES
   ========================================================= */

.main-nav a.active {
    color: #ffffff;
    position: relative;
}

.main-nav a.active::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -9px;
    left: 0;
    height: 2px;
    border-radius: 999px;
    background: #3b82f6;
}

.public-page {
    min-width: 0;
    overflow: hidden;
}

.public-hero {
    padding: 54px 0 30px;
}

.public-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, .65fr);
    gap: 28px;
    align-items: stretch;
    padding: 48px;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 30px;
    background:
        radial-gradient(circle at 88% 12%, rgba(59, 130, 246, .2), transparent 30%),
        linear-gradient(135deg, #0f172a, #1e293b 55%, #263b60);
    color: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .16);
}

.public-eyebrow {
    display: inline-flex;
    margin-bottom: 14px;
    color: #60a5fa;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.public-hero h1 {
    max-width: 820px;
    margin: 0 0 20px;
    font-size: clamp(38px, 5vw, 62px);
    line-height: 1.03;
    letter-spacing: -1.8px;
}

.public-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, .76);
    font-size: 18px;
    line-height: 1.7;
}

.public-hero-actions,
.public-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.public-hero .btn-light {
    border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .1);
    color: #fff;
    box-shadow: none;
}

.public-hero-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 24px;
    background: rgba(255, 255, 255, .09);
    backdrop-filter: blur(8px);
}

.public-hero-card span {
    color: #bfdbfe;
    font-size: 13px;
    font-weight: 800;
}

.public-hero-card strong {
    display: block;
    margin: 10px 0 14px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.05;
}

.public-hero-card p {
    font-size: 14px;
    line-height: 1.55;
}

.public-section {
    padding: 48px 0;
}

.public-section-muted {
    border-top: 1px solid rgba(148, 163, 184, .16);
    border-bottom: 1px solid rgba(148, 163, 184, .16);
    background: linear-gradient(180deg, #edf4fb, #f8fbff);
}

.public-section-head {
    max-width: 780px;
    margin: 0 auto 30px;
    text-align: center;
}

.public-section-head h2,
.public-split h2,
.public-cta h2 {
    margin: 0 0 14px;
    color: #0f172a;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.1;
    letter-spacing: -1px;
}

.public-section-head p,
.public-lead,
.public-cta p {
    color: #64748b;
    font-size: 17px;
    line-height: 1.65;
}

.public-card-grid,
.public-audience-grid,
.public-blog-grid,
.public-contact-grid,
.public-price-grid,
.public-metric-grid {
    display: grid;
    gap: 20px;
}

.public-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.public-card-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.public-audience-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.public-card,
.public-audience-card,
.public-blog-card,
.public-contact-card,
.public-price-card,
.public-metric-card {
    min-width: 0;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, .06);
}

.public-card,
.public-audience-card {
    padding: 24px;
}

.public-card-icon {
    display: flex;
    width: 50px;
    height: 50px;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    border-radius: 16px;
    background: #eff6ff;
    font-size: 24px;
}

.public-card h3,
.public-audience-card h3,
.public-timeline h3 {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: 20px;
}

.public-card p,
.public-audience-card p,
.public-timeline p {
    margin: 0;
    color: #64748b;
    line-height: 1.6;
}

.public-link-card {
    display: block;
    color: inherit;
    transition: transform .2s ease, box-shadow .2s ease;
}

.public-link-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 45px rgba(15, 23, 42, .12);
}

.public-split {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    gap: 40px;
    align-items: start;
}

.public-card-stack {
    display: grid;
    gap: 16px;
}

.public-check-list,
.public-price-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.public-check-list li,
.public-price-list li {
    position: relative;
    padding-left: 25px;
    color: #475569;
    line-height: 1.5;
}

.public-check-list li::before,
.public-price-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #2563eb;
    font-weight: 900;
}

.public-check-list-large {
    gap: 14px;
    padding: 24px;
    border: 1px solid #dbe5f1;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, .05);
}


.public-steps {
    display: grid;
    gap: 14px;
}

.public-steps-horizontal {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.public-step {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 18px;
    border: 1px solid #dfe7f1;
    border-radius: 18px;
    background: #fff;
}

.public-step b {
    display: flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb, #60a5fa);
    color: #fff;
}

.public-step strong {
    display: block;
    margin-bottom: 4px;
    color: #0f172a;
}

.public-step span {
    color: #64748b;
    line-height: 1.5;
}

.public-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 34px;
    border: 1px solid #dbe5f1;
    border-radius: 26px;
    background:
        radial-gradient(circle at 92% 10%, rgba(37, 99, 235, .1), transparent 30%),
        #fff;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .07);
}

.public-cta h2 {
    font-size: clamp(27px, 3vw, 38px);
}

.public-cta .public-eyebrow {
    margin-bottom: 8px;
}

.public-home-cta {
    padding: 0 0 70px;
}


/* Блок бесплатного тестирования на странице тарифов */
.public-trial-section {
    padding: 8px 0 0;
}

.public-trial-banner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(260px, .55fr);
    gap: 30px;
    align-items: center;
    padding: 32px 36px;
    overflow: hidden;
    border: 1px solid #dbe5f1;
    border-radius: 26px;
    background:
        radial-gradient(circle at 92% 12%, rgba(37, 99, 235, .11), transparent 32%),
        linear-gradient(135deg, #ffffff, #f5f9ff);
    box-shadow: 0 18px 50px rgba(15, 23, 42, .07);
}

.public-trial-banner::after {
    content: "";
    position: absolute;
    z-index: 0;
    width: 220px;
    height: 220px;
    right: -95px;
    bottom: -130px;
    border-radius: 50%;
    background: rgba(37, 99, 235, .06);
    pointer-events: none;
}

.public-trial-content,
.public-trial-action {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.public-trial-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    padding: 7px 11px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 800;
}

.public-trial-kicker strong {
    font-weight: 900;
}

.public-trial-content h2 {
    max-width: 760px;
    margin: 0 0 12px;
    color: #0f172a;
    font-size: clamp(27px, 3vw, 38px);
    line-height: 1.12;
    letter-spacing: -.7px;
}

.public-trial-content > p {
    max-width: 780px;
    margin: 0;
    color: #64748b;
    font-size: 16px;
    line-height: 1.65;
}

.public-trial-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.public-trial-features span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: rgba(255, 255, 255, .82);
    color: #334155;
    font-size: 14px;
    font-weight: 700;
}

.public-trial-features span::before {
    content: "✓";
    display: inline-flex;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #dcfce7;
    color: #15803d;
    font-size: 12px;
    font-weight: 900;
}

.public-trial-action {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding-left: 30px;
    border-left: 1px solid #dbe5f1;
}

.public-trial-days {
    display: flex;
    align-items: baseline;
    gap: 10px;
    color: #0f172a;
}

.public-trial-days strong {
    font-size: 52px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -2px;
}

.public-trial-days span {
    color: #475569;
    font-size: 15px;
    font-weight: 800;
}

.public-trial-action .btn {
    width: 100%;
}

.public-trial-action small {
    display: block;
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

@media (max-width: 900px) {
    .public-trial-banner {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .public-trial-action {
        padding: 22px 0 0;
        border-top: 1px solid #dbe5f1;
        border-left: 0;
    }
}

@media (max-width: 640px) {
    .public-trial-section {
        padding-top: 2px;
    }

    .public-trial-banner {
        padding: 24px 20px;
        border-radius: 21px;
    }

    .public-trial-content h2 {
        font-size: 29px;
    }

    .public-trial-features {
        display: grid;
        grid-template-columns: 1fr;
    }

    .public-trial-features span {
        width: 100%;
    }

    .public-trial-days strong {
        font-size: 44px;
    }
}

.public-price-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
}

.public-price-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 28px;
    transition:
        transform .25s ease,
        border-color .25s ease,
        box-shadow .25s ease,
        background-color .25s ease;
}

.public-price-card.is-active {
    z-index: 2;
    border-color: #2563eb;
    transform: translateY(-10px);
    box-shadow: 0 24px 60px rgba(37, 99, 235, .16);
}

.public-price-card .btn {
    background: #fff;
    color: #0f172a;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .12);
}

.public-price-card.is-active .btn {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    box-shadow: 0 14px 30px rgba(37, 99, 235, .32);
}

.public-price-card:not(.is-active) .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(15, 23, 42, .16);
}

.public-price-card.is-active .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(37, 99, 235, .42);
}

.public-price-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 900;
}

.public-price-name {
    color: #2563eb;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.public-price-card h2 {
    margin: 10px 0 16px;
    font-size: 23px;
}

.public-price {
    margin-bottom: 14px;
    color: #0f172a;
    font-size: 34px;
    font-weight: 900;
}

.public-price small {
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
}

.public-price-card > p {
    margin: 0 0 20px;
    color: #64748b;
    line-height: 1.55;
}

.public-price-list {
    margin-bottom: 26px;
}

.public-price-card .btn {
    width: 100%;
    margin-top: auto;
}

.public-price-note {
    max-width: 850px;
    margin: 28px auto 0;
    padding: 14px 18px;
    border-radius: 16px;
    background: #fff7ed;
    color: #9a3412;
    text-align: center;
    line-height: 1.5;
}

.public-metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.public-metric-card {
    padding: 24px;
    text-align: center;
}

.public-metric-card strong {
    display: block;
    margin-bottom: 8px;
    color: #0f172a;
    font-size: 28px;
}

.public-metric-card span {
    color: #64748b;
    line-height: 1.4;
}

.public-faq {
    display: grid;
    max-width: 900px;
    gap: 12px;
    margin: 0 auto;
}

.public-faq details {
    overflow: hidden;
    border: 1px solid #dfe7f1;
    border-radius: 18px;
    background: #fff;
}

.public-faq summary {
    padding: 18px 20px;
    color: #0f172a;
    font-weight: 800;
    cursor: pointer;
}

.public-faq details p {
    margin: 0;
    padding: 0 20px 20px;
    color: #64748b;
    line-height: 1.6;
}

.public-timeline {
    display: grid;
    max-width: 900px;
    gap: 16px;
    margin: 0 auto;
}

.public-timeline article {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 18px;
    padding: 22px;
    border: 1px solid #dfe7f1;
    border-radius: 20px;
    background: #fff;
}

.public-timeline article > span {
    display: flex;
    width: 58px;
    height: 58px;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 18px;
    font-weight: 900;
}


.public-contact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.public-contact-card {
    display: block;
    padding: 26px;
    color: inherit;
    transition: transform .2s ease, box-shadow .2s ease;
}

a.public-contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 45px rgba(15, 23, 42, .12);
}

.public-contact-card > span {
    display: block;
    margin-bottom: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.public-contact-card > strong {
    display: block;
    margin-bottom: 10px;
    color: #0f172a;
    font-size: 22px;
    overflow-wrap: anywhere;
}

.public-contact-card > p {
    margin: 0;
    color: #64748b;
    line-height: 1.55;
}

.public-blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.public-blog-card {
    display: block;
    padding: 28px;
    color: inherit;
    transition: transform .2s ease, box-shadow .2s ease;
}

.public-blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 45px rgba(15, 23, 42, .12);
}

.public-blog-card > span {
    color: #2563eb;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.public-blog-card h2 {
    margin: 10px 0 12px;
    font-size: 24px;
}

.public-blog-card p {
    margin: 0;
    color: #64748b;
    line-height: 1.55;
}

.public-articles {
    display: grid;
    max-width: 920px;
    gap: 22px;
}

.public-article {
    scroll-margin-top: 100px;
    padding: 30px;
    border: 1px solid #dfe7f1;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, .05);
}

.public-article h2 {
    margin: 0 0 18px;
    font-size: 30px;
}

.public-article p {
    margin: 0 0 14px;
    color: #475569;
    font-size: 16px;
    line-height: 1.75;
}

.public-article p:last-child {
    margin-bottom: 0;
}


@media (max-width: 1100px) {
    .public-card-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .public-steps-horizontal {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .public-hero {
        padding-top: 28px;
    }

    .public-hero-grid,
    .public-split {
        grid-template-columns: 1fr;
    }

    .public-card-grid,
    .public-audience-grid,
    .public-price-grid,
    .public-contact-grid {
        grid-template-columns: 1fr 1fr;
    }

    .public-price-card.is-active {
        transform: none;
    }

    .public-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .main-nav a.active::after {
        display: none;
    }

    .main-nav a.active {
        background: rgba(255, 255, 255, .1);
    }
}

@media (max-width: 640px) {
    .public-hero-grid {
        padding: 26px 20px;
        border-radius: 24px;
    }

    .public-hero h1 {
        font-size: 36px;
        letter-spacing: -1px;
    }

    .public-hero p {
        font-size: 16px;
    }

    .public-hero-actions,
    .public-hero-actions .btn,
    .public-cta-actions,
    .public-cta-actions .btn {
        width: 100%;
    }

    .public-card-grid,
    .public-card-grid-4,
    .public-audience-grid,
    .public-price-grid,
    .public-contact-grid,
    .public-blog-grid,
    .public-metric-grid,
    .public-steps-horizontal {
        grid-template-columns: 1fr;
    }

    .public-section {
        padding: 34px 0;
    }

    .public-section-head {
        text-align: left;
    }

    .public-section-head h2,
    .public-split h2 {
        font-size: 31px;
    }

    .public-card,
    .public-audience-card,
    .public-blog-card,
    .public-contact-card,
    .public-price-card,
    .public-article {
        padding: 21px;
        border-radius: 19px;
    }

    .public-cta {
        align-items: stretch;
        flex-direction: column;
        padding: 24px 20px;
    }

    .public-cta > .btn {
        width: 100%;
    }

    .public-timeline article {
        grid-template-columns: 46px minmax(0, 1fr);
        padding: 18px;
    }

    .public-timeline article > span {
        width: 46px;
        height: 46px;
        border-radius: 14px;
    }

}

/* =========================================================
   ORDER VIEW: защита сетки от растягивания на ноутбуках
   ========================================================= */

.order-view-grid {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
}

.order-view-grid > * {
    min-width: 0;
    max-width: 100%;
}

.order-view-grid > .admin-panel {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.order-view-grid .table-wrap {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.order-view-grid .admin-table {
    width: 100%;
    max-width: none;
}

.order-view-grid .info-list strong,
.order-view-grid .info-list a,
.order-view-grid .info-list p,
.order-view-grid .admin-table th,
.order-view-grid .admin-table td {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.admin-topbar > * {
    min-width: 0;
}

.admin-topbar .form-actions {
    min-width: 0;
    max-width: 100%;
    justify-content: flex-end;
}

.admin-topbar .form-actions .btn {
    max-width: 100%;
    white-space: normal;
    text-align: center;
}

/*
   На ноутбуках рабочая область уже из-за бокового меню.
   Поэтому карточка заявки перестраивается в одну колонку.
*/
@media (max-width: 1500px) {
    .order-view-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .order-view-grid > .admin-panel,
    .order-view-grid > section {
        grid-column: 1 / -1;
    }

    .admin-topbar .form-actions {
        justify-content: flex-start;
    }
}

/* =========================================================
   DEVICES: более широкое поле поиска в верхнем блоке
   ========================================================= */

.resource-device-actions {
    width: min(860px, 100%);
    grid-template-columns: minmax(540px, 1fr) auto;
}

.resource-device-search input {
    min-width: 260px;
}

/* На ноутбуках переносим поиск под заголовок, чтобы ничего не сжималось */
@media (max-width: 1500px) {
    .resource-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .resource-hero-actions,
    .resource-device-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .resource-device-actions {
        grid-template-columns: minmax(0, 1fr) auto;
    }
}

@media (max-width: 768px) {
    .resource-device-actions {
        grid-template-columns: 1fr;
    }

    .resource-device-search input {
        min-width: 0;
    }
}
/* =========================================================
   DASHBOARD — ЛИДЫ И СЛЕДУЮЩИЕ КОНТАКТЫ
   ========================================================= */

.dashboard-lead-tasks-panel {
    margin-bottom: 24px;
    overflow: hidden;
    border: 1px solid rgba(36, 74, 121, 0.1);
    background:
        radial-gradient(
            circle at top right,
            rgba(59, 130, 246, 0.07),
            transparent 30%
        ),
        #ffffff;
}

.dashboard-lead-header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dashboard-lead-task-total {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 43px;
    height: 43px;
    padding: 0 12px;
    border-radius: 15px;
    background: #eef2f7;
    color: #69778b;
    font-size: 18px;
    font-weight: 900;
}

.dashboard-lead-task-total.has-items {
    background: #fff0f0;
    color: #d64545;
    box-shadow: 0 9px 22px rgba(220, 68, 68, 0.15);
}

.dashboard-lead-all-link {
    color: #2563eb;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.dashboard-lead-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.dashboard-lead-summary-card {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 13px;
    padding: 17px;
    border: 1px solid #e4eaf2;
    border-radius: 18px;
    background: #fbfcfe;
    color: inherit;
    text-decoration: none;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease;
}

.dashboard-lead-summary-card:hover {
    transform: translateY(-2px);
    border-color: var(--lead-summary-accent, #3b82f6);
    box-shadow: 0 13px 28px rgba(20, 45, 77, 0.09);
}

.dashboard-lead-summary-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--lead-summary-background, #edf5ff);
    font-size: 20px;
}

.dashboard-lead-summary-card div {
    min-width: 0;
}

.dashboard-lead-summary-card strong {
    display: block;
    margin-bottom: 4px;
    color: #172f4e;
    font-size: 25px;
    line-height: 1;
}

.dashboard-lead-summary-card small {
    display: block;
    overflow-wrap: anywhere;
    color: #718096;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}

.lead-summary-new {
    --lead-summary-accent: #3b82f6;
    --lead-summary-background: #eaf3ff;
}

.lead-summary-today {
    --lead-summary-accent: #e6a314;
    --lead-summary-background: #fff7df;
}

.lead-summary-overdue {
    --lead-summary-accent: #dc4b4b;
    --lead-summary-background: #fff0f0;
}

.lead-summary-decision {
    --lead-summary-accent: #7a5bd0;
    --lead-summary-background: #f1edff;
}

.lead-summary-connected {
    --lead-summary-accent: #2a9a61;
    --lead-summary-background: #eaf9f0;
}

.dashboard-lead-empty {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 23px;
    border: 1px solid #dcefe4;
    border-radius: 18px;
    background: #f4fcf7;
}

.dashboard-lead-empty > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 43px;
    width: 43px;
    height: 43px;
    border-radius: 50%;
    background: #dff6e8;
    color: #258653;
    font-size: 22px;
    font-weight: 900;
}

.dashboard-lead-empty strong {
    display: block;
    margin-bottom: 4px;
    color: #28523c;
}

.dashboard-lead-empty p {
    margin: 0;
    color: #668071;
    line-height: 1.5;
}

.dashboard-lead-task-list {
    display: grid;
    gap: 10px;
}

.dashboard-lead-task-item {
    position: relative;
    display: grid;
    grid-template-columns:
        46px
        minmax(0, 1fr)
        minmax(180px, auto)
        24px;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid #e5eaf1;
    border-radius: 17px;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    transition:
        transform 0.17s ease,
        border-color 0.17s ease,
        box-shadow 0.17s ease;
}

.dashboard-lead-task-item::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--lead-task-accent, #6b8db8);
}

.dashboard-lead-task-item:hover {
    transform: translateX(3px);
    border-color: var(--lead-task-accent, #6b8db8);
    box-shadow: 0 11px 27px rgba(19, 43, 73, 0.08);
}

.dashboard-lead-task-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--lead-task-background, #edf3fa);
    font-size: 19px;
}

.dashboard-lead-task-copy,
.dashboard-lead-task-meta {
    min-width: 0;
}

.dashboard-lead-task-copy strong {
    display: block;
    margin-bottom: 5px;
    overflow-wrap: anywhere;
    color: #203854;
    font-size: 15px;
}

.dashboard-lead-task-copy small {
    display: block;
    overflow-wrap: anywhere;
    color: #7a8799;
    line-height: 1.4;
}

.dashboard-lead-task-meta {
    text-align: right;
}

.dashboard-lead-task-meta em {
    display: inline-flex;
    margin-bottom: 5px;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--lead-task-background, #edf3fa);
    color: var(--lead-task-text, #506b8c);
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
}

.dashboard-lead-task-meta small {
    display: block;
    color: var(--lead-task-text, #6e7e92);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.dashboard-lead-task-arrow {
    color: #8a98aa;
    font-size: 20px;
    font-weight: 900;
}

.lead-task-overdue {
    --lead-task-accent: #dc4b4b;
    --lead-task-background: #fff0f0;
    --lead-task-text: #c13d3d;
}

.lead-task-today {
    --lead-task-accent: #e5a21a;
    --lead-task-background: #fff7df;
    --lead-task-text: #936b13;
}

.lead-task-new {
    --lead-task-accent: #347bd5;
    --lead-task-background: #eaf3ff;
    --lead-task-text: #2e6bbb;
}

.lead-task-demo {
    --lead-task-accent: #7356c7;
    --lead-task-background: #f1edff;
    --lead-task-text: #6449b0;
}

.lead-task-thinking {
    --lead-task-accent: #8b6a2a;
    --lead-task-background: #f8f1e3;
    --lead-task-text: #79602e;
}

.dashboard-lead-more {
    margin-top: 15px;
    color: #7b889a;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.dashboard-lead-more a {
    color: #2563eb;
    font-weight: 800;
}

@media (max-width: 1280px) {
    .dashboard-lead-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 880px) {
    .dashboard-lead-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-lead-task-item {
        grid-template-columns: 46px minmax(0, 1fr) 24px;
    }

    .dashboard-lead-task-meta {
        grid-column: 2 / -1;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        text-align: left;
    }

    .dashboard-lead-task-meta em {
        margin-bottom: 0;
    }

    .dashboard-lead-task-arrow {
        grid-column: 3;
        grid-row: 1;
    }
}

@media (max-width: 620px) {
    .dashboard-lead-tasks-panel {
        padding: 19px;
    }

    .dashboard-lead-tasks-panel .dashboard-panel-header {
        align-items: flex-start;
    }

    .dashboard-lead-header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .dashboard-lead-summary {
        grid-template-columns: 1fr;
    }

    .dashboard-lead-task-item {
        grid-template-columns: 42px minmax(0, 1fr);
        padding: 14px;
    }

    .dashboard-lead-task-arrow {
        display: none;
    }

    .dashboard-lead-task-meta {
        grid-column: 1 / -1;
        padding-left: 56px;
    }
}

/* =========================================================
   ANALYTICS — ВОРОНКА ПРОДАЖ SERVICEHUB
   ========================================================= */

.analytics-leads-heading {
    margin-top: 32px;
}

.lead-analytics-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.lead-analytics-kpi {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 14px;
    padding: 21px;
    border: 1px solid rgba(31, 62, 101, 0.09);
    border-radius: 21px;
    background:
        linear-gradient(
            145deg,
            #ffffff,
            var(--lead-kpi-background, #f6f9fd)
        );
    box-shadow: 0 12px 29px rgba(17, 38, 67, 0.055);
}

.lead-analytics-kpi-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 47px;
    width: 47px;
    height: 47px;
    border-radius: 16px;
    background: var(--lead-kpi-icon-background, #eaf3ff);
    font-size: 22px;
}

.lead-analytics-kpi div {
    min-width: 0;
}

.lead-analytics-kpi small {
    display: block;
    margin-bottom: 7px;
    color: #718096;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
}

.lead-analytics-kpi strong {
    display: block;
    margin-bottom: 5px;
    color: var(--lead-kpi-color, #183654);
    font-size: 29px;
    line-height: 1;
}

.lead-analytics-kpi em {
    display: block;
    overflow-wrap: anywhere;
    color: #8a96a6;
    font-size: 11px;
    font-style: normal;
    line-height: 1.4;
}

.lead-analytics-kpi-blue {
    --lead-kpi-color: #276bc2;
    --lead-kpi-background: #f1f7ff;
    --lead-kpi-icon-background: #e4f0ff;
}

.lead-analytics-kpi-purple {
    --lead-kpi-color: #6950b9;
    --lead-kpi-background: #f6f3ff;
    --lead-kpi-icon-background: #eee9ff;
}

.lead-analytics-kpi-green {
    --lead-kpi-color: #238454;
    --lead-kpi-background: #f0fbf5;
    --lead-kpi-icon-background: #e1f7e9;
}

.lead-analytics-kpi-gold {
    --lead-kpi-color: #a47516;
    --lead-kpi-background: #fffaf0;
    --lead-kpi-icon-background: #fff2cf;
}

.lead-analytics-kpi-red {
    --lead-kpi-color: #c34545;
    --lead-kpi-background: #fff5f5;
    --lead-kpi-icon-background: #ffe7e7;
}

.lead-funnel-panel {
    margin-bottom: 21px;
    border: 1px solid rgba(31, 62, 101, 0.09);
    overflow: hidden;
}

.lead-funnel-panel .analytics-panel-header > p {
    max-width: 310px;
    color: #7b889a;
    font-size: 13px;
    line-height: 1.5;
    text-align: right;
}

.lead-funnel-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 13px;
}

.lead-funnel-stage {
    position: relative;
    min-width: 0;
    padding: 20px 18px 17px;
    border: 1px solid #e3e9f1;
    border-radius: 18px;
    background: #fbfcfe;
    overflow: hidden;
}

.lead-funnel-stage::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -14px;
    z-index: 3;
    width: 26px;
    height: 26px;
    border-top: 1px solid #d7e0eb;
    border-right: 1px solid #d7e0eb;
    background: #fbfcfe;
    transform: translateY(-50%) rotate(45deg);
}

.lead-funnel-stage:last-child::after {
    display: none;
}

.lead-funnel-stage-number {
    position: absolute;
    top: 10px;
    right: 12px;
    color: #c2cad5;
    font-size: 12px;
    font-weight: 900;
}

.lead-funnel-stage-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 14px;
    border-radius: 14px;
    background: var(--funnel-stage-background, #edf3fa);
    font-size: 19px;
}

.lead-funnel-stage small {
    display: block;
    min-height: 34px;
    color: #6e7d90;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
}

.lead-funnel-stage strong {
    display: block;
    margin: 9px 0 6px;
    color: var(--funnel-stage-color, #254565);
    font-size: 31px;
    line-height: 1;
}

.lead-funnel-stage em {
    display: block;
    min-height: 31px;
    color: #8a96a7;
    font-size: 11px;
    font-style: normal;
    line-height: 1.4;
}

.lead-funnel-stage-progress {
    height: 6px;
    margin-top: 13px;
    border-radius: 999px;
    background: #e9eef4;
    overflow: hidden;
}

.lead-funnel-stage-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--funnel-stage-color, #417dbc);
}

.lead-funnel-stage-all {
    --funnel-stage-color: #315f91;
    --funnel-stage-background: #eaf2fa;
}

.lead-funnel-stage-contacted {
    --funnel-stage-color: #2e75c8;
    --funnel-stage-background: #e6f1ff;
}

.lead-funnel-stage-demo {
    --funnel-stage-color: #6b52bc;
    --funnel-stage-background: #eee9ff;
}

.lead-funnel-stage-thinking {
    --funnel-stage-color: #a17822;
    --funnel-stage-background: #fff2d5;
}

.lead-funnel-stage-connected {
    --funnel-stage-color: #238856;
    --funnel-stage-background: #e4f7eb;
}

.lead-status-strip {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 11px;
    margin-bottom: 22px;
}

.lead-status-strip-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    gap: 10px;
    padding: 13px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 15px;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 8px 21px rgba(17, 38, 67, 0.04);
    transition:
        transform 0.16s ease,
        border-color 0.16s ease;
}

.lead-status-strip-item:hover {
    transform: translateY(-2px);
    border-color: var(--lead-status-color, #4d7fb8);
}

.lead-status-strip-item span {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #718096;
    font-size: 12px;
    font-weight: 800;
}

.lead-status-strip-item strong {
    color: var(--lead-status-color, #32597e);
    font-size: 20px;
}

.lead-status-strip-new {
    --lead-status-color: #2d73c8;
}

.lead-status-strip-contacted {
    --lead-status-color: #3d7baa;
}

.lead-status-strip-demo {
    --lead-status-color: #6a51b8;
}

.lead-status-strip-thinking {
    --lead-status-color: #9c741d;
}

.lead-status-strip-connected {
    --lead-status-color: #258653;
}

.lead-status-strip-rejected {
    --lead-status-color: #c14848;
}

.lead-analytics-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.75fr);
    gap: 22px;
    margin-bottom: 28px;
}

.lead-dynamics-panel,
.lead-sources-panel {
    min-width: 0;
    border: 1px solid rgba(31, 62, 101, 0.09);
}

.lead-chart-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 13px;
    color: #718096;
    font-size: 12px;
    font-weight: 700;
}

.lead-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.lead-chart-legend i {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 4px;
}

.lead-chart-legend .lead-created {
    background: #3f7fd8;
}

.lead-chart-legend .lead-connected {
    background: #2a9a61;
}

.lead-chart-scroll {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 7px;
}

.lead-month-chart {
    display: grid;
    grid-template-columns:
        repeat(
            var(--lead-columns),
            minmax(72px, 1fr)
        );
    align-items: end;
    gap: 13px;
    min-width: max(100%, calc(var(--lead-columns) * 82px));
    height: 290px;
    padding: 19px 7px 0;
    border-radius: 18px;
    background:
        repeating-linear-gradient(
            to top,
            #f7f9fc 0,
            #f7f9fc 1px,
            transparent 1px,
            transparent 55px
        );
}

.lead-month-column {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto auto;
    align-items: end;
    height: 100%;
    min-width: 0;
    text-align: center;
}

.lead-month-bars {
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 7px;
    width: 100%;
    height: 100%;
    min-height: 170px;
}

.lead-month-bars > span {
    display: block;
    width: min(25px, 39%);
    min-height: 4px;
    border-radius: 9px 9px 3px 3px;
    transition: filter 0.18s ease;
}

.lead-month-bars > span:hover {
    filter: brightness(1.08);
}

.lead-month-created {
    background: linear-gradient(
        180deg,
        #2f70c9,
        #7db3f2
    );
}

.lead-month-connected {
    background: linear-gradient(
        180deg,
        #238453,
        #79cda0
    );
}

.lead-month-column strong {
    display: block;
    margin-top: 9px;
    color: #344a64;
    font-size: 12px;
}

.lead-month-column small {
    display: block;
    margin-top: 5px;
    color: #8591a2;
    font-size: 11px;
    white-space: nowrap;
}

.lead-sources-all-link {
    color: #2563eb;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.lead-source-list {
    display: grid;
    gap: 9px;
}

.lead-source-row {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    padding: 12px;
    border: 1px solid #e4e9f0;
    border-radius: 15px;
    background: #fbfcfe;
}

.lead-source-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 31px;
    height: 31px;
    border-radius: 11px;
    background: #eaf2fd;
    color: #326eb8;
    font-size: 12px;
    font-weight: 900;
}

.lead-source-copy {
    min-width: 0;
}

.lead-source-copy strong {
    display: block;
    margin-bottom: 4px;
    overflow-wrap: anywhere;
    color: #2e445f;
    font-size: 13px;
}

.lead-source-copy small {
    display: block;
    color: #8390a2;
    font-size: 11px;
    line-height: 1.4;
}

.lead-source-conversion {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    min-height: 30px;
    padding: 5px 8px;
    border-radius: 999px;
    background: #e7f7ed;
    color: #278553;
    font-size: 12px;
    font-weight: 900;
}

.lead-source-insight {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-top: 16px;
    padding: 15px;
    border: 1px solid #e3e9f0;
    border-radius: 16px;
    background: linear-gradient(
        135deg,
        #f8fbff,
        #f3f8ff
    );
}

.lead-source-insight > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 39px;
    width: 39px;
    height: 39px;
    border-radius: 13px;
    background: #e5effd;
    font-size: 19px;
}

.lead-source-insight p {
    min-width: 0;
    margin: 0;
}

.lead-source-insight small,
.lead-source-insight strong,
.lead-source-insight em {
    display: block;
}

.lead-source-insight small {
    margin-bottom: 4px;
    color: #8290a2;
    font-size: 11px;
}

.lead-source-insight strong {
    margin-bottom: 3px;
    overflow-wrap: anywhere;
    color: #2b4665;
    font-size: 13px;
}

.lead-source-insight em {
    color: #738197;
    font-size: 11px;
    font-style: normal;
    line-height: 1.4;
}

.lead-analytics-unavailable {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 26px;
    border: 1px solid #f0d8a4;
    background: #fffaf0;
}

.lead-analytics-unavailable > span {
    color: #b5801c;
    font-size: 28px;
}

.lead-analytics-unavailable strong {
    display: block;
    margin-bottom: 5px;
    color: #805d1e;
}

.lead-analytics-unavailable p {
    margin: 0;
    color: #8b754c;
    line-height: 1.55;
}

.lead-analytics-unavailable code {
    padding: 2px 5px;
    border-radius: 5px;
    background: #f3ead8;
}

@media (max-width: 1320px) {
    .lead-analytics-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .lead-funnel-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .lead-funnel-stage::after {
        display: none;
    }

    .lead-status-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1020px) {
    .lead-analytics-main-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .lead-analytics-kpi-grid,
    .lead-funnel-grid,
    .lead-status-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lead-funnel-panel .analytics-panel-header > p {
        max-width: none;
        text-align: left;
    }

    .lead-chart-legend {
        justify-content: flex-start;
    }
}

@media (max-width: 520px) {
    .lead-analytics-kpi-grid,
    .lead-funnel-grid,
    .lead-status-strip {
        grid-template-columns: 1fr;
    }

    .lead-analytics-kpi {
        padding: 18px;
    }

    .lead-source-row {
        grid-template-columns: 31px minmax(0, 1fr);
    }

    .lead-source-conversion {
        grid-column: 2;
        justify-self: start;
    }
}

/* =========================================================
   DASHBOARD — ПОДПИСКИ SERVICEHUB
   ========================================================= */

.dashboard-subscription-panel {
    margin-bottom: 24px;
    overflow: hidden;
    border: 1px solid rgba(27, 67, 109, 0.1);
    background:
        radial-gradient(
            circle at top right,
            rgba(42, 154, 97, 0.07),
            transparent 28%
        ),
        #ffffff;
}

.dashboard-subscription-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.dashboard-subscription-header > a {
    color: #2563eb;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.dashboard-subscription-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 43px;
    height: 43px;
    padding: 0 12px;
    border-radius: 15px;
    background: #edf2f7;
    color: #6f7d90;
    font-size: 18px;
    font-weight: 900;
}

.dashboard-subscription-count.has-items {
    background: #fff0f0;
    color: #d44444;
    box-shadow: 0 9px 22px rgba(220, 68, 68, 0.14);
}

.dashboard-subscription-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
    margin-bottom: 20px;
}

.dashboard-subscription-card {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 12px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 17px;
    background: #fbfcfe;
    color: inherit;
    text-decoration: none;
}

.dashboard-subscription-card > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 41px;
    width: 41px;
    height: 41px;
    border-radius: 14px;
    background: var(--subscription-background, #edf3fa);
    color: var(--subscription-color, #486b91);
    font-size: 20px;
    font-weight: 900;
}

.dashboard-subscription-card strong,
.dashboard-subscription-card small {
    display: block;
}

.dashboard-subscription-card strong {
    margin-bottom: 4px;
    color: var(--subscription-color, #2b4867);
    font-size: 23px;
    line-height: 1;
}

.dashboard-subscription-card small {
    color: #7d8999;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}

.subscription-overdue {
    --subscription-color: #c83f3f;
    --subscription-background: #fff0f0;
}

.subscription-soon {
    --subscription-color: #9a7118;
    --subscription-background: #fff5d9;
}

.subscription-attention {
    --subscription-color: #bb5531;
    --subscription-background: #fff0e9;
}

.subscription-received {
    --subscription-color: #258452;
    --subscription-background: #e8f8ee;
}

.dashboard-subscription-empty {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 21px;
    border: 1px solid #dceee3;
    border-radius: 17px;
    background: #f4fbf7;
}

.dashboard-subscription-empty > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #e0f5e8;
    color: #278653;
    font-size: 21px;
    font-weight: 900;
}

.dashboard-subscription-empty strong {
    display: block;
    margin-bottom: 4px;
    color: #28533d;
}

.dashboard-subscription-empty p {
    margin: 0;
    color: #6e8175;
    line-height: 1.5;
}

.dashboard-subscription-list {
    display: grid;
    gap: 9px;
}

.dashboard-subscription-item {
    position: relative;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto 22px;
    align-items: center;
    gap: 13px;
    min-width: 0;
    padding: 13px 15px;
    border: 1px solid #e3e9f0;
    border-radius: 16px;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    transition:
        transform 0.17s ease,
        border-color 0.17s ease,
        box-shadow 0.17s ease;
}

.dashboard-subscription-item::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--subscription-item-color, #4f7eae);
}

.dashboard-subscription-item:hover {
    transform: translateX(3px);
    border-color: var(--subscription-item-color, #4f7eae);
    box-shadow: 0 10px 25px rgba(19, 43, 73, 0.08);
}

.dashboard-subscription-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 41px;
    height: 41px;
    border-radius: 14px;
    background: var(--subscription-item-background, #edf3fa);
    font-size: 19px;
}

.dashboard-subscription-copy {
    min-width: 0;
}

.dashboard-subscription-copy strong {
    display: block;
    margin-bottom: 4px;
    overflow-wrap: anywhere;
    color: #273f5c;
}

.dashboard-subscription-copy small {
    display: block;
    overflow-wrap: anywhere;
    color: #7e8a9b;
    font-size: 12px;
    line-height: 1.4;
}

.dashboard-subscription-label {
    color: var(--subscription-item-color, #55728f);
    font-size: 12px;
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
}

.subscription-item-overdue {
    --subscription-item-color: #cc4141;
    --subscription-item-background: #fff0f0;
}

.subscription-item-soon {
    --subscription-item-color: #a4771b;
    --subscription-item-background: #fff5dc;
}

.subscription-item-attention {
    --subscription-item-color: #bd5933;
    --subscription-item-background: #fff0e9;
}

@media (max-width: 900px) {
    .dashboard-subscription-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-subscription-item {
        grid-template-columns: 44px minmax(0, 1fr) 22px;
    }

    .dashboard-subscription-label {
        grid-column: 2 / -1;
        text-align: left;
        white-space: normal;
    }

    .dashboard-subscription-item > span:last-child {
        grid-column: 3;
        grid-row: 1;
    }
}

@media (max-width: 620px) {
    .dashboard-subscription-panel {
        padding: 19px;
    }

    .dashboard-subscription-panel .dashboard-panel-header {
        align-items: flex-start;
    }

    .dashboard-subscription-header {
        width: 100%;
        justify-content: space-between;
    }

    .dashboard-subscription-summary {
        grid-template-columns: 1fr;
    }

    .dashboard-subscription-item {
        grid-template-columns: 41px minmax(0, 1fr);
    }

    .dashboard-subscription-label {
        grid-column: 1 / -1;
        padding-left: 54px;
    }

    .dashboard-subscription-item > span:last-child {
        display: none;
    }
}
/* =========================================================
   SERVICEHUB — ИСПРАВЛЕНИЕ ШИРИНЫ АДМИНКИ
   18.07.2026
   ========================================================= */

html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body.admin-body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body.admin-body .admin-layout {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

body.admin-body .admin-layout > *,
body.admin-body .admin-main,
body.admin-body .main-content,
body.admin-body .resource-page,
body.admin-body .admin-topbar,
body.admin-body .admin-panel,
body.admin-body .resource-hero,
body.admin-body .resource-panel {
    min-width: 0;
    max-width: 100%;
}

body.admin-body .admin-main > *,
body.admin-body .resource-page > * {
    min-width: 0;
    max-width: 100%;
}

body.admin-body .form-panel {
    width: 100%;
    max-width: min(980px, 100%);
}

body.admin-body form,
body.admin-body .form-group,
body.admin-body .filter-field,
body.admin-body .device-filter-field,
body.admin-body .movement-filter-field {
    min-width: 0;
    max-width: 100%;
}

body.admin-body input,
body.admin-body select,
body.admin-body textarea {
    min-width: 0;
    max-width: 100%;
}

body.admin-body select {
    text-overflow: ellipsis;
}

/* Формы создания и редактирования заявки */

body.admin-body .form-grid,
body.admin-body .order-form-section .form-grid {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body.admin-body .order-repair-grid {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

body.admin-body .diagnostics-upload-grid,
body.admin-body .part-action-choice {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body.admin-body .form-grid > *,
body.admin-body .order-form-section .form-grid > *,
body.admin-body .order-repair-grid > *,
body.admin-body .diagnostics-upload-grid > *,
body.admin-body .part-action-choice > *,
body.admin-body .part-action-option > * {
    min-width: 0;
    max-width: 100%;
}

/* Страница устройств */

body.admin-body .resource-device-actions {
    display: flex !important;
    width: 100% !important;
    max-width: none !important;
    grid-template-columns: none !important;
    flex-wrap: wrap !important;
    align-items: stretch;
    justify-content: flex-start !important;
    gap: 10px;
}

body.admin-body .resource-device-actions .resource-device-search {
    flex: 1 1 520px;
    width: auto;
    min-width: 280px !important;
    max-width: 100%;
}

body.admin-body .resource-device-search input {
    min-width: 0 !important;
}

body.admin-body .resource-device-actions > .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* Фильтры журнала складских движений */

body.admin-body .movement-filter-form {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

body.admin-body .movement-filter-form > * {
    min-width: 0;
    max-width: 100%;
}

body.admin-body .movement-filter-actions {
    grid-column: 1 / -1 !important;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
}

body.admin-body .movement-filter-actions .btn {
    min-width: 140px;
}

/* Прокрутка остаётся только внутри широких таблиц */

body.admin-body .table-wrap,
body.admin-body .responsive-card-table-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 1250px) {
    body.admin-body .movement-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    body.admin-body .resource-device-actions .resource-device-search {
        flex-basis: 100%;
    }

    body.admin-body .resource-device-actions > .btn {
        flex: 1 1 170px;
    }
}

@media (max-width: 900px) {
    body.admin-body .form-grid,
    body.admin-body .order-form-section .form-grid,
    body.admin-body .order-repair-grid,
    body.admin-body .diagnostics-upload-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 700px) {
    body.admin-body .part-action-choice,
    body.admin-body .movement-filter-form {
        grid-template-columns: 1fr !important;
    }

    body.admin-body .resource-device-actions .resource-device-search {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0 !important;
    }

    body.admin-body .resource-device-actions > .btn,
    body.admin-body .movement-filter-actions .btn {
        flex: 1 1 100%;
        width: 100%;
    }
}

/* =========================================================
   SERVICEHUB — ЕДИНАЯ ШИРИНА ФОРМ И РАЗДЕЛЕНИЕ ПАНЕЛЕЙ
   18.07.2026
   ========================================================= */

/*
 * Верхняя панель и основная форма должны занимать
 * одинаковую ширину внутри рабочей области.
 */
body.admin-body .admin-main > .admin-topbar,
body.admin-body .admin-main > .form-panel {
    width: 100%;
    max-width: 100%;
}

/*
 * Отменяем старое ограничение form-panel в 980 px.
 * Оно и делало нижнюю карточку уже верхней.
 */
body.admin-body .form-panel {
    max-width: none;
}

/*
 * Последовательные белые панели на ресурсных страницах
 * не должны соприкасаться и накладываться тенями.
 */
body.admin-body .resource-page > .resource-panel + .resource-panel {
    margin-top: 22px;
}

/*
 * Дополнительная фиксация конкретно для списка устройств.
 */
body.admin-body #devices-list {
    position: relative;
    z-index: 1;
    margin-top: 22px;
}

/*
 * Панель фильтров остаётся выше по структуре,
 * но не перекрывает следующую секцию.
 */
body.admin-body .device-filter-form {
    position: relative;
    z-index: 2;
    width: 100%;
    min-width: 0;
}

/*
 * Кнопки фильтров не должны выходить за нижнюю
 * границу белой панели.
 */
body.admin-body .device-filter-actions {
    position: static;
    align-self: end;
}


/* =========================================================
   NETWORK ANALYTICS — BRANCH ARCHITECTURE 3.7
   ========================================================= */

.analytics-scope-switch {
    display: inline-flex;
    gap: 5px;
    padding: 5px;
    border: 1px solid rgba(147, 197, 253, .3);
    border-radius: 15px;
    background: rgba(37, 99, 235, .16);
    backdrop-filter: blur(8px);
}

.analytics-scope-switch a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 10px;
    color: rgba(255, 255, 255, .76);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    transition: .18s ease;
}

.analytics-scope-switch a:hover,
.analytics-scope-switch a.active {
    background: #dbeafe;
    color: #1d4ed8;
}

.analytics-network-heading {
    margin-top: 28px;
}

.analytics-network-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.analytics-network-card {
    position: relative;
    min-width: 0;
    padding: 22px;
    overflow: hidden;
}

.analytics-network-card.is-current {
    border-color: #93c5fd;
    box-shadow: 0 16px 34px rgba(37, 99, 235, .12);
}

.analytics-network-card.is-current::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
}

.analytics-network-card-head,
.analytics-network-card-footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.analytics-network-card-head {
    margin-bottom: 18px;
}

.analytics-network-card-head h3 {
    margin: 4px 0 0;
    color: #0f172a;
    font-size: 20px;
}

.analytics-network-code {
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.analytics-network-badges {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

.analytics-network-badge,
.analytics-current-branch {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.analytics-network-badge.main {
    background: #dbeafe;
    color: #1d4ed8;
}

.analytics-network-badge.active {
    background: #dcfce7;
    color: #15803d;
}

.analytics-network-badge.inactive {
    background: #f1f5f9;
    color: #64748b;
}

.analytics-current-branch {
    background: #eff6ff;
    color: #2563eb;
}

.analytics-network-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.analytics-network-metrics > div {
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}

.analytics-network-metrics span {
    display: block;
    margin-bottom: 5px;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.analytics-network-metrics strong {
    color: #0f172a;
    font-size: 19px;
}

.analytics-network-bars {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.analytics-network-bars > div > span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
    color: #64748b;
    font-size: 12px;
}

.analytics-network-bars b {
    color: #334155;
}

.analytics-network-bars em {
    color: #0f172a;
    font-style: normal;
    font-weight: 800;
}

.analytics-network-bars i {
    display: block;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.analytics-network-bars i > b {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
}

.analytics-network-bars i.revenue > b {
    background: linear-gradient(90deg, #16a34a, #4ade80);
}

.analytics-network-card-footer {
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 12px;
}

.analytics-network-card-footer strong {
    color: #0f172a;
}

.analytics-network-card-footer form {
    margin: 0;
}

.analytics-network-card-footer .btn-sm {
    min-height: 34px;
    padding: 0 12px;
    font-size: 12px;
}

@media (max-width: 1100px) {
    .analytics-network-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .analytics-scope-switch {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .analytics-network-card {
        padding: 18px;
    }

    .analytics-network-card-head,
    .analytics-network-card-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .analytics-network-badges {
        justify-content: flex-start;
    }

    .analytics-network-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .analytics-network-card-footer form,
    .analytics-network-card-footer .btn-sm {
        width: 100%;
    }
}

@media (max-width: 430px) {
    .analytics-scope-switch {
        grid-template-columns: 1fr;
    }

    .analytics-network-metrics {
        grid-template-columns: 1fr 1fr;
    }
}

/* =========================================================
   SERVICEHUB — ЕДИНАЯ ШАПКА ВНУТРЕННИХ РАЗДЕЛОВ
   23.07.2026
   ========================================================= */

body.admin-body .admin-section-hero {
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0 0 22px;
    padding: 24px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #101827 0%, #182339 52%, #233554 100%);
    border: 0;
    border-radius: 24px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}

body.admin-body .admin-section-hero::after {
    content: "";
    position: absolute;
    top: -100px;
    right: -90px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

body.admin-body .admin-section-hero > * {
    position: relative;
    z-index: 2;
    min-width: 0;
}

body.admin-body .admin-section-hero h1 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 30px;
    line-height: 1.2;
}

body.admin-body .admin-section-hero p {
    max-width: 800px;
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    line-height: 1.55;
}

body.admin-body .admin-section-hero-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    align-self: center;
    gap: 10px;
    flex-wrap: wrap;
}

body.admin-body .admin-section-hero .btn-light {
    color: #fff;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: none;
}

body.admin-body .admin-section-hero .btn-light:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.20);
}

@media (max-width: 760px) {
    body.admin-body .admin-section-hero {
        flex-direction: column;
        padding: 22px;
    }

    body.admin-body .admin-section-hero-actions {
        align-self: stretch;
        justify-content: flex-start;
        margin-top: 4px;
    }
}

@media (max-width: 520px) {
    body.admin-body .admin-section-hero {
        padding: 20px;
        border-radius: 20px;
    }

    body.admin-body .admin-section-hero h1 {
        font-size: 26px;
    }

    body.admin-body .admin-section-hero-actions .btn {
        width: 100%;
    }
}



/* =========================================================
   LEADS: кнопки верхнего блока справа на десктопе
   ========================================================= */

.leads-page .resource-hero {
    flex-direction: row;
    align-items: center;
}

.leads-page .leads-hero-actions {
    position: relative;
    z-index: 2;
    display: flex;
    width: auto;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 11px;
    margin-left: auto;
    flex-wrap: wrap;
}

@media (max-width: 900px) {
    .leads-page .resource-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .leads-page .leads-hero-actions {
        width: 100%;
        margin-left: 0;
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .leads-page .leads-hero-actions .btn {
        width: 100%;
    }
}


/* =========================================================
   COMMON RESOURCE HERO: кнопки справа на десктопе
   ========================================================= */

.resource-hero.resource-hero-right {
    flex-direction: row;
    align-items: center;
}

.resource-hero.resource-hero-right .resource-hero-copy {
    flex: 1 1 auto;
}

.resource-hero.resource-hero-right .resource-hero-actions {
    width: auto;
    flex: 0 0 auto;
    align-self: center;
    justify-content: center;
    margin-left: auto;

    flex-direction: column;
    align-items: stretch;
}

.resource-hero.resource-hero-right .resource-hero-actions .btn {
    width: 210px;
}

@media (max-width: 900px) {
    .resource-hero.resource-hero-right {
        flex-direction: column;
        align-items: flex-start;
    }

    .resource-hero.resource-hero-right .resource-hero-actions {
        width: 100%;
        margin-left: 0;
        align-items: flex-start;
    }
}

@media (max-width: 560px) {
    .resource-hero.resource-hero-right .resource-hero-actions {
        align-items: stretch;
    }

    .resource-hero.resource-hero-right .resource-hero-actions .btn {
        width: 100%;
    }
}

/* =========================================================
   MOBILE RESOURCE ACTIONS — compact buttons, 2026-08-04
   ========================================================= */
@media (max-width: 768px) {
    .resource-hero .resource-hero-actions,
    .resource-hero.resource-hero-right .resource-hero-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
        max-width: 100%;
        gap: 10px;
        align-items: stretch;
        align-self: stretch;
        margin-left: 0;
    }

    .resource-hero .resource-hero-actions .btn,
    .resource-hero.resource-hero-right .resource-hero-actions .btn {
        width: 100%;
        max-width: 100%;
        min-height: 48px;
        height: auto;
        flex: 0 0 auto;
        padding: 12px 16px;
        line-height: 1.25;
        white-space: normal;
    }
}

/* ServiceHub — единая подписка 700 ₽ */
.public-pricing-hero-card strong {
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.12;
}

.public-pricing-single {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, .75fr);
    gap: 28px;
    align-items: stretch;
}

.public-price-card-main {
    min-height: 100%;
    padding: 36px;
}

.public-price-card-main.is-active {
    transform: none;
}

.public-price-card-main .public-price {
    font-size: clamp(44px, 6vw, 64px);
    letter-spacing: -2px;
}

.public-price-limits {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 8px 0 28px;
}

.public-price-limits div {
    padding: 17px 14px;
    border: 1px solid #bfdbfe;
    border-radius: 17px;
    background: rgba(239, 246, 255, .86);
}

.public-price-limits strong,
.public-price-limits span {
    display: block;
}

.public-price-limits strong {
    color: #1d4ed8;
    font-size: 30px;
    line-height: 1;
}

.public-price-limits span {
    margin-top: 7px;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

.public-price-feature-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 26px;
    margin-bottom: 28px;
}

.public-price-feature-columns .public-price-list {
    margin: 0;
}

.public-pricing-scale {
    display: grid;
    gap: 20px;
}

.public-pricing-scale-card,
.public-pricing-custom-card {
    padding: 28px;
}

.public-pricing-scale-card h2,
.public-pricing-custom-card h2 {
    margin: 10px 0 18px;
}

.public-addon-price {
    padding: 18px 0;
    border-top: 1px solid #e2e8f0;
}

.public-addon-price:first-of-type {
    border-top: 0;
}

.public-addon-price strong,
.public-addon-price span {
    display: block;
}

.public-addon-price strong {
    color: #0f172a;
    font-size: 30px;
}

.public-addon-price span {
    margin-top: 4px;
    color: #64748b;
    line-height: 1.45;
}

.public-pricing-scale-card > p,
.public-pricing-custom-card > p {
    color: #64748b;
    line-height: 1.6;
}

.public-pricing-custom-card .btn {
    width: 100%;
    margin-top: 8px;
}

@media (max-width: 960px) {
    .public-pricing-single {
        grid-template-columns: 1fr;
    }

    .public-pricing-scale {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .public-price-card-main,
    .public-pricing-scale-card,
    .public-pricing-custom-card {
        padding: 24px 20px;
    }

    .public-price-limits,
    .public-price-feature-columns,
    .public-pricing-scale {
        grid-template-columns: 1fr;
    }

    .public-price-card-main .public-price {
        letter-spacing: -1px;
    }
}

.public-home-price-card {
    padding: 32px;
    border: 1px solid #bfdbfe;
    background: linear-gradient(145deg, #ffffff, #eff6ff);
    box-shadow: 0 22px 55px rgba(37, 99, 235, .12);
}

.public-home-price-card > p {
    margin: 0;
    color: #64748b;
    line-height: 1.6;
}
