:root {
    --ink: #071927;
    --muted: #607082;
    --line: #dce7ef;
    --panel: #ffffff;
    --soft: #f4f8fb;
    --navy: #062032;
    --teal: #10bfa3;
    --teal-dark: #068a77;
    --gold: #ffc247;
    --blue: #2b72ff;
    --danger: #ff6b4a;
    --shadow: 0 22px 70px rgba(5, 28, 45, .12);
    --radius: 8px;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: #fbfdff;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: center;
    padding: 16px clamp(18px, 4vw, 64px);
    background: rgba(255, 255, 255, .86);
    border-bottom: 1px solid rgba(220, 231, 239, .9);
    backdrop-filter: blur(18px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 182px;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--navy), #0b4b60 55%, var(--teal));
    color: #fff7d6;
    font-weight: 800;
    letter-spacing: 0;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: var(--muted);
    font-size: .78rem;
    margin-top: 2px;
}

.main-nav {
    justify-self: center;
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav a {
    padding: 10px 12px;
    border-radius: 7px;
    color: #415265;
    font-size: .94rem;
    font-weight: 600;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--ink);
    background: #eef6f7;
}

.header-actions,
.action-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ghost-link {
    color: #345064;
    font-weight: 700;
}

.btn,
button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: var(--radius);
    background: var(--teal);
    color: white;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(16, 191, 163, .22);
    transition: transform .2s ease, background .2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    background: var(--teal-dark);
}

.btn-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 7px 12px;
    border: 1px solid #c9dce8;
    border-radius: 8px;
    background: #fff;
    color: var(--brand);
    font-size: .82rem;
    font-weight: 900;
    text-decoration: none;
    box-shadow: none;
}

.btn-mini:hover {
    background: #edf6ff;
    transform: none;
}

.btn-secondary {
    background: var(--navy);
    box-shadow: 0 12px 24px rgba(6, 32, 50, .2);
}

.btn-danger {
    background: var(--danger);
    box-shadow: 0 12px 24px rgba(255, 107, 74, .2);
}

.btn-danger:hover {
    background: #d94c31;
}

.btn-light {
    background: #fff;
    color: var(--navy);
    box-shadow: none;
}

.btn-small {
    min-height: 40px;
    padding: 0 16px;
    font-size: .92rem;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--ink);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .92fr);
    gap: clamp(24px, 4vw, 56px);
    align-items: center;
    padding: clamp(36px, 6vw, 78px) clamp(18px, 5vw, 76px) 42px;
    background:
        radial-gradient(circle at 80% 10%, rgba(255, 194, 71, .24), transparent 28%),
        linear-gradient(140deg, #f8fcff 0%, #eef8f6 48%, #fffaf0 100%);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(16, 191, 163, .12);
    color: #057060;
    font-size: .88rem;
    font-weight: 800;
}

h1,
.page-title {
    margin: 0;
    font-size: clamp(2rem, 3.7vw, 3.45rem);
    line-height: 1.08;
    letter-spacing: 0;
}

h2 {
    margin: 0;
    font-size: clamp(1.55rem, 2.35vw, 2.25rem);
    line-height: 1.12;
    letter-spacing: 0;
}

h3 {
    margin: 0;
    font-size: 1.2rem;
}

p {
    color: var(--muted);
    line-height: 1.65;
}

.lead {
    max-width: 660px;
    font-size: clamp(1rem, 1.15vw, 1.12rem);
}

.hero-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 24px;
    box-shadow: var(--shadow);
    background: #fff;
}

.hero-panel img {
    width: 100%;
    height: clamp(300px, 34vw, 460px);
    object-fit: cover;
}

.hero-card {
    position: absolute;
    left: 22px;
    bottom: 22px;
    width: min(86%, 430px);
    padding: 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .93);
    box-shadow: 0 14px 40px rgba(7, 25, 39, .18);
    backdrop-filter: blur(14px);
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
}

.stat,
.metric {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .74);
}

.stat strong,
.metric strong {
    display: block;
    color: var(--ink);
    font-size: 1.35rem;
}

.section {
    padding: clamp(42px, 5.5vw, 72px) clamp(18px, 5vw, 76px);
}

.section.alt {
    background: var(--soft);
}

.section-head {
    display: flex;
    justify-content: space-between;
    gap: 28px;
    align-items: end;
    margin-bottom: 32px;
}

.section-head p {
    max-width: 540px;
}

.grid {
    display: grid;
    gap: 18px;
}

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

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

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

.card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 12px 34px rgba(7, 25, 39, .06);
}

.visual-split {
    display: grid;
    grid-template-columns: .95fr 1.05fr;
    gap: 28px;
    align-items: center;
}

.media-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow);
}

.media-card img {
    width: 100%;
    height: 100%;
    min-height: 360px;
    object-fit: cover;
}

.feature-stack {
    display: grid;
    gap: 14px;
}

.feature-row {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 14px;
    align-items: start;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: white;
}

.icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    margin-bottom: 16px;
    border-radius: 12px;
    background: #eaf8f5;
    color: #057060;
    font-weight: 900;
}

.product-band {
    display: grid;
    grid-template-columns: .86fr 1fr;
    gap: 30px;
    align-items: center;
    padding: clamp(42px, 6vw, 70px);
    background: var(--navy);
    color: white;
}

.product-band p,
.product-band .muted-list li {
    color: #bdd2df;
}

.crm-window {
    border-radius: 18px;
    overflow: hidden;
    background: #f8fbfe;
    color: var(--ink);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .25);
}

.window-top {
    display: flex;
    gap: 7px;
    padding: 14px;
    background: #e7eef4;
}

.window-top span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #b1c0cc;
}

.order-board {
    display: grid;
    grid-template-columns: 150px 1fr;
    min-height: 380px;
}

.sidebar-demo {
    padding: 18px;
    background: #0a2a3f;
}

.sidebar-demo span {
    display: block;
    height: 10px;
    margin-bottom: 20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .24);
}

.sidebar-demo span:first-child {
    width: 76px;
    background: var(--teal);
}

.board-body {
    padding: 20px;
}

.board-row {
    display: grid;
    grid-template-columns: 1.1fr .7fr .7fr;
    gap: 10px;
    padding: 14px 0;
    border-bottom: 1px solid #e4edf3;
    font-size: .94rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eaf8f5;
    color: #057060;
    font-size: .78rem;
    font-weight: 800;
}

.pill.gold {
    background: #fff1cc;
    color: #8c5a00;
}

.pill.blue {
    background: #eaf0ff;
    color: #295cc7;
}

.muted-list {
    display: grid;
    gap: 12px;
    padding: 0;
    margin: 22px 0 0;
    list-style: none;
}

.muted-list li {
    color: var(--muted);
    line-height: 1.5;
}

.muted-list li::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 10px;
    border-radius: 50%;
    background: var(--teal);
}

.page-hero {
    padding: clamp(38px, 5.5vw, 72px) clamp(18px, 5vw, 76px);
    background: linear-gradient(135deg, #f7fbff, #eef8f6);
}

.page-hero-visual {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(280px, .72fr);
    gap: clamp(22px, 4vw, 48px);
    align-items: center;
}

.page-hero-media {
    overflow: hidden;
    border: 1px solid rgba(207, 221, 231, .85);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(7, 25, 39, .09);
}

.page-hero-media img {
    display: block;
    width: 100%;
    height: clamp(220px, 27vw, 340px);
    object-fit: cover;
}

.hero-mini-grid,
.contact-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.hero-mini-grid span,
.contact-methods a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, .78);
    color: var(--ink);
    font-weight: 750;
}

.hero-mini-grid strong {
    color: var(--teal);
}

.contact-methods span {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 9px;
    background: #eaf8f5;
    color: #057060;
    font-size: .78rem;
    font-weight: 900;
}

.pricing-card {
    position: relative;
    display: flex;
    flex-direction: column;
}

.pricing-card.featured {
    border-color: rgba(16, 191, 163, .55);
    box-shadow: 0 24px 70px rgba(16, 191, 163, .13);
}

.pricing-card.individual {
    border-color: rgba(47, 111, 189, .22);
    background: linear-gradient(180deg, #fff, #f6fbff);
}

.price {
    margin: 16px 0 8px;
    font-size: clamp(1.75rem, 2.6vw, 2.15rem);
    font-weight: 900;
}

.price span {
    font-size: 1rem;
    color: var(--muted);
    font-weight: 700;
}

.pricing-card .btn {
    margin-top: auto;
}

.form-wrap {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 30px;
    align-items: start;
}

.icon-card .icon {
    margin-bottom: 14px;
}

.contact-card {
    display: grid;
    gap: 12px;
}

.contact-card img {
    width: 116px;
    height: 116px;
    object-fit: contain;
    border-radius: 22px;
    background: #052133;
    box-shadow: 0 16px 38px rgba(7, 25, 39, .14);
}

form {
    display: grid;
    gap: 14px;
}

label {
    display: grid;
    gap: 7px;
    color: #344b5d;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #cfdde7;
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    font: inherit;
}

textarea {
    min-height: 116px;
    resize: vertical;
}

.phone-field {
    display: grid;
    grid-template-columns: 132px 1fr;
    gap: 8px;
}

.phone-field-with-flag {
    grid-template-columns: 34px 132px 1fr;
}

.country-flag {
    position: relative;
    overflow: hidden;
    display: grid;
    min-height: 48px;
    place-items: center;
    border: 1px solid #cfdde7;
    border-radius: var(--radius);
    background: #f8fbfe;
    color: transparent;
    font-size: 0;
    line-height: 1;
}

.country-flag::before {
    content: "";
    display: block;
    width: 22px;
    height: 15px;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(7, 25, 39, .16);
}

.country-flag.flag-kg::before {
    background:
        radial-gradient(circle at 50% 50%, #ffd34d 0 22%, transparent 23%),
        linear-gradient(#e92d35, #e92d35);
}

.country-flag.flag-ru::before {
    background: linear-gradient(#fff 0 33%, #2453a6 33% 66%, #d52b1e 66%);
}

.country-flag.flag-kz::before {
    background:
        radial-gradient(circle at 42% 50%, #ffd34d 0 18%, transparent 19%),
        linear-gradient(#00abc2, #00abc2);
}

.country-flag.flag-uz::before {
    background: linear-gradient(#1eb6e7 0 30%, #d92525 30% 35%, #fff 35% 65%, #d92525 65% 70%, #24a148 70%);
}

.country-flag.flag-tj::before {
    background: linear-gradient(#c8102e 0 30%, #fff 30% 70%, #006b3f 70%);
}

.country-flag.flag-tr::before {
    background:
        radial-gradient(circle at 43% 50%, #fff 0 18%, transparent 19%),
        radial-gradient(circle at 49% 50%, #e30a17 0 15%, transparent 16%),
        linear-gradient(#e30a17, #e30a17);
}

.country-flag.flag-us::before {
    background:
        linear-gradient(90deg, #244a8f 0 42%, transparent 42%),
        repeating-linear-gradient(#b22234 0 8%, #fff 8% 16%);
}

.phone-field select,
.phone-field input {
    min-width: 0;
}

.auth-shell {
    display: grid;
    min-height: calc(100vh - 77px);
    place-items: center;
    padding: 44px 18px;
    background: linear-gradient(135deg, #062032, #0e6259);
}

.auth-card {
    width: min(100%, 460px);
    padding: 30px;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow);
}

.auth-card h1 {
    font-size: clamp(2rem, 4vw, 3.35rem);
    line-height: 1.08;
}

.auth-card-wide {
    width: min(100%, 760px);
}

.auth-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
}

.verify-card {
    width: min(100%, 520px);
}

.verify-code-input {
    text-align: center;
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: .18em;
}

.resend-form {
    margin-top: 10px;
}

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

.notice {
    padding: 14px 16px;
    border-left: 4px solid var(--teal);
    border-radius: var(--radius);
    background: #eefaf7;
    color: #134b43;
}

.notice.danger {
    border-color: var(--danger);
    background: #fff2ee;
    color: #8d2b18;
}

.app-shell {
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr);
    min-height: calc(100vh - 77px);
    background: #f3f7fa;
    overflow: hidden;
}

.app-sidebar {
    position: sticky;
    top: 77px;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 77px);
    padding: 18px 14px;
    background:
        radial-gradient(circle at 24px 26px, rgba(18, 196, 169, .24), transparent 72px),
        linear-gradient(180deg, #061d2c 0%, #051724 58%, #04131e 100%);
    color: white;
    overflow-x: hidden;
    overflow-y: auto;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, .08);
}

.mobile-crm-bar,
.mobile-sidebar-backdrop,
.sidebar-close {
    display: none;
}

.brand.mini {
    min-width: 0;
    margin-bottom: 12px;
}

.app-sidebar a,
.sidebar-group > button {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 11px;
    background: transparent;
    color: #cfe1ec;
    font: inherit;
    font-size: .9rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.app-sidebar a b,
.sidebar-group > button b {
    min-width: 0;
    flex: 1;
    font: inherit;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-sidebar a.active,
.app-sidebar a:hover,
.sidebar-group > button.active,
.sidebar-group > button:hover {
    border-color: rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .1);
    color: white;
}

.app-main {
    padding: 18px clamp(20px, 2.5vw, 28px) 28px;
    min-width: 0;
    overflow-x: auto;
}

.app-top {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.app-top h1 {
    font-size: clamp(2rem, 4vw, 3.4rem);
}

.trial-box {
    min-width: 180px;
    padding: 18px;
    border-radius: var(--radius);
    background: var(--navy);
    color: white;
}

.trial-box strong,
.trial-box span {
    display: block;
}

.trial-box strong {
    font-size: 1.8rem;
}

.trial-box span {
    color: #bad0dd;
}

.workspace-card {
    margin-top: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: white;
    box-shadow: 0 12px 34px rgba(7, 25, 39, .05);
}

.inline-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    gap: 12px;
    align-items: end;
    margin-bottom: 18px;
    padding: 16px;
    border-radius: var(--radius);
    background: #f5f9fb;
}

.inline-form .wide {
    grid-column: span 2;
}

.compact-form {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
}

.inline-form .btn {
    min-height: 48px;
}

.section-head.compact {
    align-items: start;
    margin-bottom: 16px;
}

.section-head.compact h2,
.workspace-card > h2 {
    font-size: clamp(1.45rem, 2.2vw, 2.05rem);
}

.crm-table {
    display: grid;
    gap: 0;
    overflow-x: auto;
}

.order-table {
    overflow: visible;
}

.crm-table-head,
.crm-table-row {
    display: grid;
    grid-template-columns: 1.2fr .9fr .8fr .7fr;
    gap: 8px;
    align-items: center;
    min-width: 720px;
    padding: 9px 10px;
    border-radius: 0;
}

.order-table .crm-table-head,
.order-table .crm-table-row {
    grid-template-columns: 48px 112px minmax(145px, 1fr) minmax(100px, .7fr) 142px minmax(168px, .9fr) 86px 132px;
    min-width: 980px;
}

.preorder-table .crm-table-head,
.preorder-table .crm-table-row {
    grid-template-columns: 48px 98px minmax(155px, 1fr) minmax(110px, .75fr) 142px 92px minmax(150px, .9fr) 92px;
    min-width: 940px;
}

.preorder-inline-details {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.preorder-inline-details small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-table .crm-table-head,
.client-table .crm-table-row {
    grid-template-columns: 54px 132px minmax(150px, 1fr) 150px 120px minmax(180px, 1fr) 108px;
}

.inventory-table .crm-table-head,
.inventory-table .crm-table-row {
    grid-template-columns: 54px 132px minmax(170px, 1fr) 130px 130px 110px 100px 80px 108px;
    min-width: 1060px;
}

.suppliers-table .crm-table-head,
.suppliers-table .crm-table-row {
    grid-template-columns: 48px 96px minmax(150px, 1fr) 130px 128px 130px minmax(170px, 1fr) 72px;
    min-width: 960px;
}

.supply-orders-table .crm-table-head,
.supply-orders-table .crm-table-row {
    grid-template-columns: 48px 92px minmax(140px, 1fr) minmax(140px, 1fr) 70px 100px 100px 128px 72px;
    min-width: 1040px;
}

.stocktake-table .crm-table-head,
.stocktake-table .crm-table-row {
    grid-template-columns: 48px 92px minmax(150px, 1fr) 70px 70px 80px 130px minmax(170px, 1fr) 72px;
    min-width: 1040px;
}

.inventory-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.inventory-summary .metric {
    padding: 10px 12px;
    background: #f8fbfd;
}

.inventory-summary .metric span {
    display: block;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.inventory-summary .metric strong {
    margin-top: 2px;
    font-size: 1.15rem;
}

.inventory-taxonomy {
    display: grid;
    grid-template-columns: minmax(160px, .3fr) 1fr;
    gap: 12px;
    align-items: start;
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.inventory-taxonomy strong,
.inventory-taxonomy span {
    display: block;
}

.inventory-taxonomy > div:first-child span {
    margin-top: 2px;
    color: var(--muted);
    font-size: .82rem;
}

.taxonomy-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.taxonomy-chips span,
.taxonomy-chips a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 5px 9px;
    border-radius: 8px;
    background: #eef6fb;
    color: #15344a;
    font-size: .84rem;
    font-weight: 800;
}

.taxonomy-chips a.active {
    background: #2862a8;
    color: #fff;
}

.taxonomy-chips small {
    display: grid;
    min-width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-size: .72rem;
}

.taxonomy-chips a.active small {
    color: #2862a8;
}

.taxonomy-chips em {
    color: var(--muted);
    font-style: normal;
    font-size: .86rem;
}

.checkbox-line {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbfd;
    color: #17344a;
    font-weight: 800;
}

.checkbox-line input {
    width: 18px;
    min-height: auto;
}

.team-table .crm-table-head,
.team-table .crm-table-row {
    grid-template-columns: 54px 132px minmax(150px, 1fr) 130px 150px 110px 108px;
}

.logs-table .crm-table-head,
.logs-table .crm-table-row {
    grid-template-columns: 44px 132px minmax(140px, .9fr) 120px 150px minmax(220px, 1fr);
    min-width: 880px;
}

.dashboard-order-table .crm-table-head,
.dashboard-order-table .crm-table-row {
    grid-template-columns: 54px 92px minmax(150px, 1fr) 120px 112px 96px;
}

.admin-table .crm-table-head,
.admin-table .crm-table-row {
    grid-template-columns: 1.2fr .9fr 1fr .65fr .8fr;
}

.admin-subscription-table .crm-table-head,
.admin-subscription-table .crm-table-row {
    grid-template-columns: 1fr .8fr .8fr .9fr 1.8fr;
}

.admin-crm-table .crm-table-head,
.admin-crm-table .crm-table-row {
    grid-template-columns: 42px minmax(170px, 1.05fr) 132px minmax(150px, .9fr) 112px minmax(190px, 1fr) 112px 132px;
    min-width: 1120px;
    font-size: .86rem;
}

.admin-billing-table .crm-table-head,
.admin-billing-table .crm-table-row {
    grid-template-columns: 44px 110px minmax(160px, 1fr) 110px 110px 110px minmax(160px, 1fr) 40px;
}

.admin-login-table .crm-table-head,
.admin-login-table .crm-table-row {
    grid-template-columns: 120px 92px minmax(150px, 1fr) 110px minmax(180px, 1.3fr) minmax(160px, 1fr);
    min-width: 980px;
}

.backup-table .crm-table-head,
.backup-table .crm-table-row {
    grid-template-columns: minmax(220px, 1fr) 150px 90px 80px;
}

#admin-leads .admin-table .crm-table-head,
#admin-leads .admin-table .crm-table-row {
    grid-template-columns: 44px minmax(140px, 1fr) 140px minmax(140px, 1fr) 110px 132px;
}

.subscription-form {
    display: grid;
    grid-template-columns: .85fr .95fr 1fr auto;
    gap: 8px;
    align-items: end;
}

.subscription-form label {
    font-size: .8rem;
}

.subscription-form input,
.subscription-form select {
    min-height: 40px;
    padding: 8px 10px;
}

.crm-table-head {
    border-bottom: 1px solid #cfdce6;
    background: #f8fbfd;
    color: #111827;
    font-weight: 800;
}

.crm-table-row {
    border: 0;
    border-bottom: 1px solid #e2ebf1;
    background: #fff;
}

.crm-table-row.is-zebra-even {
    background: #fff;
}

.crm-table-row.is-zebra-odd {
    background: #f5f8fb;
}

.crm-table-row:hover {
    background: #eef5fa;
}

.crm-table-row > span,
.crm-table-row > strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.crm-table-head > span,
.crm-table-row > span,
.crm-table-row > strong,
.crm-table-row > form,
.crm-table-row > .row-actions {
    justify-self: stretch;
    text-align: left;
}

.crm-table-head > span:first-child,
.crm-table-row > span:first-child,
.crm-table-row > strong:first-child,
.col-number,
.col-date,
.col-status,
.col-stock,
.col-actions,
.crm-table-row > .row-actions {
    text-align: center;
}

.col-money,
.col-qty {
    text-align: right;
}

.crm-table-row > .row-actions,
.col-actions {
    justify-content: center;
}

.crm-table-row > .table-action {
    display: grid;
}

.crm-table-head > span:last-child {
    text-align: center;
}

.admin-crm-table .crm-table-row > span,
.admin-crm-table .crm-table-row > strong {
    overflow-wrap: normal;
}

.client-lines {
    display: grid;
    gap: 2px;
    line-height: 1.22;
}

.client-lines span,
.client-lines small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-lines small {
    margin-top: 0;
    font-size: .78rem;
}

.admin-access-pill {
    display: grid;
    justify-items: start;
    gap: 2px;
    max-width: 100%;
    width: fit-content;
    min-width: 112px;
    padding: 7px 10px;
    line-height: 1.18;
    white-space: normal;
}

.admin-access-pill small {
    display: block;
    max-width: 100%;
    margin-top: 0;
    white-space: normal;
    font-size: .7rem;
}

.table-action {
    position: relative;
    display: block;
}

.admin-owner-body {
    --admin-wine: #6f1d35;
    --admin-wine-dark: #34101d;
    --admin-wine-soft: #fff3f6;
    background: #f7f1f3;
}

.admin-owner-shell .app-sidebar {
    background: linear-gradient(180deg, #2a0d18 0%, #4b1628 54%, #260b15 100%);
}

.admin-owner-shell .crm-logo {
    border-color: rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .08);
}

.admin-owner-shell .crm-logo-slogan::before {
    content: "Панель владельца";
    display: block;
    margin-bottom: 4px;
    color: #ffd6df;
    font-size: .78rem;
}

.admin-owner-shell .sidebar-nav a.active,
.admin-owner-shell .sidebar-nav a:hover,
.admin-owner-shell .sidebar-group > button.active,
.admin-owner-shell .sidebar-group > button:hover {
    background: rgba(255, 255, 255, .13);
    color: #fff;
}

.admin-owner-shell .sidebar-nav a span,
.admin-owner-shell .sidebar-group > button span {
    background: rgba(255, 255, 255, .1);
    color: #ffd6df;
}

.admin-owner-shell .sidebar-nav a.active span,
.admin-owner-shell .sidebar-nav a:hover span {
    background: #fff3f6;
    color: var(--admin-wine);
}

.admin-owner-shell .sidebar-nav a.active::before {
    background: #ff7a9d;
}

.admin-owner-body .crm-page-head {
    margin-bottom: 10px;
}

.admin-owner-body .settings-tabs.admin-tabs {
    display: none;
}

.admin-owner-body .metric {
    background: #fff;
    border-color: #ead2d9;
}

.admin-owner-body .metric.big strong {
    color: var(--admin-wine);
}

.admin-owner-body .workspace-card {
    border-color: #ead2d9;
    box-shadow: 0 16px 34px rgba(111, 29, 53, .08);
}

.admin-owner-body .crm-table-head {
    background: #fff3f6;
    border-bottom-color: #e5c4ce;
}

.admin-owner-body .crm-table-row.is-zebra-odd {
    background: #fbf5f7;
}

.admin-owner-body .crm-table-row:hover {
    background: #f8e8ed;
}

.admin-owner-body .btn,
.admin-owner-body button.btn {
    background: var(--admin-wine);
    box-shadow: 0 10px 22px rgba(111, 29, 53, .18);
}

.admin-owner-body .btn:hover,
.admin-owner-body button.btn:hover {
    background: #551629;
}

.admin-owner-body .tab-panel {
    margin-top: 10px;
}

.security-check-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.security-check-grid > div,
.plan-limit-box,
.export-admin-card {
    display: grid;
    gap: 7px;
    padding: 14px;
    border: 1px solid #ead2d9;
    border-radius: 10px;
    background: #fff;
}

.security-check-grid strong,
.plan-limit-box h3 {
    margin: 0;
    color: #142336;
    font-size: .96rem;
}

.security-check-grid span,
.export-admin-card p {
    color: var(--muted);
    font-size: .84rem;
    line-height: 1.45;
}

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

.plan-limit-box {
    grid-template-columns: 1fr;
}

.checkline {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 8px !important;
}

.checkline input {
    width: auto;
    min-height: 0;
}

.export-admin-card {
    width: min(100%, 520px);
}

.profile-settings-page {
    width: min(100%, 560px);
    margin: 4px auto 60px;
}

.profile-breadcrumb {
    margin-bottom: 18px;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
}

.profile-breadcrumb span {
    margin: 0 8px;
    color: #9caebc;
}

.profile-settings-card {
    display: grid;
    gap: 12px;
    margin-bottom: 22px;
}

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

.profile-settings-card h1,
.profile-settings-card h2 {
    margin: 0;
    font-size: 1.3rem;
}

.profile-settings-card h2 {
    font-size: 1rem;
}

.profile-settings-card p {
    margin: 0;
    color: var(--muted);
    font-size: .86rem;
    line-height: 1.45;
}

.profile-form {
    display: grid;
    gap: 9px;
}

.profile-form label {
    display: grid;
    gap: 5px;
    color: #102033;
    font-size: .78rem;
    font-weight: 800;
}

.crm-body .profile-form input,
.crm-body .profile-form select {
    min-height: 36px;
    padding: 7px 10px;
    border-radius: 7px;
    font-size: .86rem;
}

.password-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #fff;
}

.crm-body .password-field input,
.password-field input {
    width: 100%;
    min-height: 36px;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.password-field button {
    height: 28px;
    margin-right: 5px;
    padding: 0 9px;
    border: 1px solid #cfe0ec;
    border-radius: 6px;
    background: #f6fafc;
    color: #31516b;
    font-size: .72rem;
    font-weight: 900;
    cursor: pointer;
}

.password-field button:hover {
    background: #eaf4fb;
}

.password-match-hint {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 800;
}

.password-match-hint.match-ok {
    color: #16835f;
}

.password-match-hint.match-bad {
    color: #cf3c3c;
}

.profile-phone-field {
    grid-template-columns: 92px minmax(0, 1fr);
}

.profile-phone-field.phone-field-with-flag {
    grid-template-columns: 30px 92px minmax(0, 1fr);
}

.crm-body .profile-phone-field .country-flag {
    min-height: 36px;
    border-radius: 7px;
    font-size: 0;
}

.brand-logo-current {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fbfe;
}

.brand-logo-current span {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 800;
}

.brand-logo-current img {
    width: 74px;
    height: 74px;
    object-fit: contain;
    border-radius: 14px;
    background: #062032;
}

.whatsapp-panel-card {
    display: grid;
    gap: 14px;
}

.whatsapp-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fbfe;
}

.inline-tabs {
    margin: 0;
}

.switch-line {
    display: inline-flex;
    grid-auto-flow: column;
    grid-template-columns: auto auto;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 10px;
    border-radius: 9px;
    background: #fff;
    font-size: .82rem;
}

.switch-line input {
    width: auto;
    min-height: 0;
}

.whatsapp-last-message {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.whatsapp-last-message > div {
    display: grid;
    gap: 5px;
    padding: 12px;
    border-radius: 10px;
    background: #f8fbfe;
}

.whatsapp-last-message p {
    margin: 6px 0 0;
    padding: 10px;
    border-radius: 8px;
    background: #fff;
}

.whatsapp-connect-grid {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 14px;
    margin-top: 14px;
}

.whatsapp-qr-card {
    display: grid;
    gap: 10px;
    align-content: start;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}

.whatsapp-qr-card h3 {
    margin: 0;
}

.whatsapp-qr-card img {
    width: min(100%, 220px);
    aspect-ratio: 1;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
}

.whatsapp-qr-card p {
    margin: 0;
    color: var(--muted);
    font-size: .9rem;
}

.whatsapp-qr-empty {
    display: grid;
    min-height: 160px;
    place-items: center;
    padding: 16px;
    border: 1px dashed #b7ccdc;
    border-radius: 10px;
    color: #496579;
    text-align: center;
    font-weight: 800;
}

.whatsapp-test-form,
.whatsapp-template-form {
    margin-top: 14px;
}

.whatsapp-template-form textarea {
    min-height: 88px;
}

.whatsapp-log-table .crm-table-head,
.whatsapp-log-table .crm-table-row {
    grid-template-columns: 122px 96px 128px 118px minmax(220px, 1fr) minmax(160px, .8fr);
    min-width: 920px;
}

.profile-form .btn {
    min-height: 36px;
    border-radius: 7px;
}

.session-security-form {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.btn-outline {
    border: 1px solid #2862a8;
    background: #fff;
    color: #2862a8;
    box-shadow: none;
}

.btn-outline:hover {
    background: #eef6fb;
    color: #1f5596;
}

.admin-owner-body .btn-outline {
    border-color: var(--admin-wine);
    color: var(--admin-wine);
}

.admin-owner-body .btn-outline:hover {
    background: #fff3f6;
}

.warning-outline {
    border-color: #e08b35;
    color: #b45309;
}

.warning-outline:hover {
    background: #fff7ed;
    color: #92400e;
}

.admin-owner-body .warning-outline {
    border-color: #c05621;
    color: #9a3412;
}

.admin-owner-body .warning-outline:hover {
    background: #fff7ed;
}

.profile-help-panel {
    max-width: 520px;
}

.profile-help-content {
    display: grid;
    gap: 12px;
}

.profile-help-content div {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fbfd;
}

.profile-help-content h3 {
    margin: 0 0 5px;
    font-size: .92rem;
}

.profile-help-content p {
    margin: 0;
    color: var(--muted);
    font-size: .84rem;
    line-height: 1.45;
}

.admin-owner-body .profile-help-content div {
    background: #fff8fa;
}

.sidebar-alert-panel {
    max-width: 840px;
}

.modal-eyebrow {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.sidebar-alert-table {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.sidebar-alert-head,
.sidebar-alert-row {
    display: grid;
    grid-template-columns: 64px 90px minmax(110px, .9fr) minmax(180px, 1.5fr) 100px 88px;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    font-size: .78rem;
}

.sidebar-alert-head {
    background: #f4f8fb;
    color: #516173;
    font-weight: 900;
    text-transform: uppercase;
}

.sidebar-alert-row:nth-child(odd) {
    background: #f8fbfd;
}

.sidebar-alert-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-alert-head,
.sidebar-alert-row {
    grid-template-columns: 54px 90px minmax(105px, .85fr) minmax(170px, 1.4fr) 96px 108px;
}

.sidebar-alert-open {
    min-width: 86px;
    justify-content: center;
    padding-inline: 12px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    margin: 10px 0;
    padding: 7px 10px;
    border: 1px solid #cfe0ec;
    border-radius: 999px;
    background: #f6fafc;
    color: #31516b;
    font-size: .82rem;
    font-weight: 900;
}

.filter-chip a {
    color: #2f6fbd;
}

.table-action select {
    min-height: 30px;
    width: auto;
    max-width: 156px;
    padding: 4px 28px 4px 10px;
    border: 0;
    border-radius: 7px;
    color: #fff;
    font-size: .82rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .14);
}

.pill,
.table-action select {
    --status-bg: #eef2f6;
    --status-fg: #334155;
    background: var(--status-bg);
    color: var(--status-fg);
}

.status-native-select {
    display: none !important;
}

.status-picker {
    position: relative;
    width: 132px;
    max-width: 132px;
}

.status-trigger,
.status-choice {
    --status-bg: #eef2f6;
    --status-fg: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    min-height: 30px;
    border: 0;
    border-radius: 6px;
    background: var(--status-bg);
    color: var(--status-fg);
    font: inherit;
    font-size: .82rem;
    font-weight: 900;
    cursor: pointer;
}

.status-trigger {
    position: relative;
    width: 132px;
    padding: 6px 26px 6px 10px;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .14);
}

.status-trigger::after {
    content: "";
    position: absolute;
    right: 10px;
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
}

.status-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 45;
    display: none;
    width: 156px;
    max-height: 270px;
    overflow: auto;
    padding: 8px;
    border: 1px solid #d8e4ee;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 18px 36px rgba(7, 25, 39, .16);
}

.status-picker.open .status-menu {
    display: grid;
    gap: 8px;
}

.status-choice {
    width: fit-content;
    max-width: 100%;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 6px;
    text-align: left;
    white-space: nowrap;
}

.status-choice:hover {
    filter: brightness(.96);
}

.pill {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 900;
    line-height: 1.05;
}

.payment-summary .pill {
    padding-inline: 8px;
    font-size: .72rem;
}

.table-action select option {
    background: #fff;
    color: #102033;
    font-weight: 800;
}

.table-action select option.status-request {
    background: #e8f1ff;
    color: #1d4f91;
}

.table-action select option.status-calc {
    background: #eef0ff;
    color: #3f3cb3;
}

.table-action select option.status-visit {
    background: #e6f8ff;
    color: #075e86;
}

.table-action select option.status-check {
    background: #e8fbf6;
    color: #087060;
}

.table-action select option.status-done {
    background: #edf7ee;
    color: #23753a;
}

.table-action select option.status-work {
    background: #f1fae8;
    color: #4b7f13;
}

.table-action select option.status-wait,
.table-action select option.status-agree,
.table-action select option.status-partial {
    background: #fff3d8;
    color: #9a5a00;
}

.table-action select option.status-danger {
    background: #ffe8e8;
    color: #b42323;
}

.table-action select.status-new,
.pill.status-new,
.status-trigger.status-new,
.status-choice.status-new {
    --status-bg: #22aeca;
    --status-fg: #fff;
}

.table-action select.status-request,
.pill.status-request,
.status-trigger.status-request,
.status-choice.status-request {
    --status-bg: #2f6fbd;
    --status-fg: #fff;
}

.table-action select.status-work,
.pill.status-work,
.status-trigger.status-work,
.status-choice.status-work {
    --status-bg: #77c936;
    --status-fg: #fff;
}

.table-action select.status-wait,
.pill.status-wait,
.pill.gold,
.status-trigger.status-wait,
.status-choice.status-wait {
    --status-bg: #f4a62a;
    --status-fg: #fff;
}

.table-action select.status-done,
.pill.status-done,
.pill.status-paid,
.status-trigger.status-done,
.status-choice.status-done,
.status-trigger.status-paid,
.status-choice.status-paid {
    --status-bg: #198754;
    --status-fg: #fff;
}

.table-action select.status-agree,
.pill.status-agree,
.status-trigger.status-agree,
.status-choice.status-agree {
    --status-bg: #d69224;
    --status-fg: #fff;
}

.table-action select.status-check,
.pill.status-check,
.status-trigger.status-check,
.status-choice.status-check {
    --status-bg: #0ea5a4;
    --status-fg: #fff;
}

.table-action select.status-calc,
.pill.status-calc,
.status-trigger.status-calc,
.status-choice.status-calc {
    --status-bg: #6852d8;
    --status-fg: #fff;
}

.table-action select.status-visit,
.pill.status-visit,
.status-trigger.status-visit,
.status-choice.status-visit {
    --status-bg: #0891b2;
    --status-fg: #fff;
}

.table-action select.status-unpaid,
.pill.status-unpaid,
.status-trigger.status-unpaid,
.status-choice.status-unpaid {
    --status-bg: #ffe8a8;
    --status-fg: #8a5a00;
}

.table-action select.status-partial,
.pill.status-partial,
.status-trigger.status-partial,
.status-choice.status-partial {
    --status-bg: #f4a62a;
    --status-fg: #fff;
}

.table-action select.status-danger,
.pill.status-danger,
.status-trigger.status-danger,
.status-choice.status-danger {
    --status-bg: #ef4444;
    --status-fg: #fff;
}

.table-action select.status-neutral,
.pill.status-neutral,
.status-trigger.status-neutral,
.status-choice.status-neutral {
    --status-bg: #e8eef3;
    --status-fg: #334155;
}

.text-danger {
    padding: 0;
    border: 0;
    background: none;
    color: #b53820;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.payment-summary {
    display: grid;
    justify-items: start;
    gap: 3px;
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.payment-summary small {
    margin-top: 0;
    color: var(--muted);
    font-size: .72rem;
    line-height: 1.18;
    white-space: normal;
}

.payment-summary:hover .pill {
    filter: brightness(.96);
}

.payment-history > div {
    grid-template-columns: minmax(160px, 1fr) 120px 120px;
}

.crm-table-row small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-weight: 600;
    line-height: 1.35;
}

.client-card {
    margin-top: 16px;
    padding: 18px;
    border-radius: var(--radius);
    background: #f4f8fb;
}

.tag-cloud {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.tag-cloud span {
    padding: 9px 12px;
    border-radius: 999px;
    background: #eaf8f5;
    color: #057060;
    font-weight: 800;
}

.list-stack {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.list-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid #e2ebf1;
    border-radius: var(--radius);
    background: #fff;
}

.list-item span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: .92rem;
}

.crm-body {
    background: #f3f7fa;
    font-size: 14px;
}

.app-shell.detached {
    display: block;
    min-height: 100vh;
    overflow: visible;
}

.app-shell.detached .app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 236px;
    top: 0;
    height: 100vh;
}

.app-shell.detached .app-main {
    margin-left: 236px;
    width: calc(100% - 236px);
    overflow-x: visible;
}

.crm-body .app-main {
    padding-top: 8px;
    padding-bottom: 92px;
}

.crm-product {
    min-width: 0;
    padding-bottom: 14px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.crm-product span,
.sidebar-user span,
.sidebar-user small {
    display: block;
    color: #bdd2df;
}

.sidebar-user {
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .06);
}

.sidebar-user strong {
    display: block;
    color: #fff;
}

.app-sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-nav {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.sidebar-badges {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.sidebar-badge {
    display: inline-grid;
    place-items: center;
    min-width: 19px;
    height: 19px;
    padding: 0 6px;
    border-radius: 999px;
    color: #fff;
    font-size: .68rem;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .16);
    cursor: pointer;
}

.sidebar-badge.new {
    background: #24b47e;
}

.sidebar-badge.payment {
    background: #f08a8a;
}

.sidebar-badge:hover,
.sidebar-badge:focus-visible {
    outline: 2px solid rgba(255, 255, 255, .55);
    outline-offset: 2px;
    transform: translateY(-1px);
}

.sidebar-group {
    display: grid;
    gap: 2px;
}

.sidebar-subnav {
    display: none;
    gap: 1px;
    margin: -1px 0 4px 34px;
}

.sidebar-group.open .sidebar-subnav {
    display: grid;
}

.app-sidebar .sidebar-subnav a {
    min-height: 27px;
    padding: 4px 8px;
    border-radius: 8px;
    color: #b8cedb;
    font-size: .76rem;
    font-weight: 700;
}

.app-sidebar .sidebar-subnav a::before {
    content: "•";
    color: #8fb0c1;
}

.app-sidebar .sidebar-subnav a.active,
.app-sidebar .sidebar-subnav a:hover {
    background: rgba(255, 255, 255, .09);
    color: #fff;
}

.app-sidebar .sidebar-subnav a.active::before {
    position: static;
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    color: var(--teal);
}

.sidebar-bottom {
    margin-top: auto;
    padding-top: 14px;
}

.app-sidebar a.logout-button {
    justify-content: center;
    background: #d9412f;
    color: #fff;
    box-shadow: 0 12px 26px rgba(217, 65, 47, .22);
}

.app-sidebar a.logout-button:hover {
    background: #be3324;
}

.app-sidebar a.site-return-button {
    justify-content: center;
    background: #eaf8f5;
    color: #057060;
    box-shadow: 0 12px 26px rgba(16, 191, 163, .16);
}

.app-sidebar a.site-return-button:hover {
    background: var(--teal);
    color: #fff;
}

.crm-logo {
    display: flex;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    margin-bottom: 8px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 18px;
    background: rgba(255, 255, 255, .065);
    box-shadow: 0 18px 38px rgba(0, 0, 0, .16);
}

.crm-logo:hover {
    background: rgba(255, 255, 255, .09);
}

.crm-logo-image {
    width: 96px;
    height: 96px;
    border-radius: 22px;
    object-fit: cover;
    box-shadow: 0 16px 30px rgba(0, 0, 0, .22);
}

.crm-logo-name {
    display: block;
    margin: 0 0 4px;
    color: #fff;
    font-size: .86rem;
    font-weight: 900;
    text-align: center;
    overflow-wrap: anywhere;
}

.crm-logo-slogan {
    margin: 0;
    color: #a9c3d2;
    font-size: .74rem;
    font-weight: 800;
    text-align: center;
    line-height: 1.25;
}

.sidebar-user span,
.sidebar-user small {
    font-size: .82rem;
}

.sidebar-user strong {
    font-size: .92rem;
}

.sidebar-nav a span,
.sidebar-group > button span,
.site-return-button span {
    display: grid;
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, .075);
    color: #bdece5;
    font-size: .82rem;
    line-height: 1;
}

.sidebar-nav a.active span,
.sidebar-nav a:hover span,
.sidebar-group > button.active span,
.sidebar-group > button:hover span,
.site-return-button:hover span {
    background: #eaf8f5;
    color: #057060;
}

.sidebar-nav a .sidebar-badges,
.sidebar-nav a:hover .sidebar-badges,
.sidebar-nav a.active .sidebar-badges {
    display: inline-flex;
    flex: 0 0 auto;
    width: auto;
    height: auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
}

.sidebar-nav a .sidebar-badge,
.sidebar-nav a:hover .sidebar-badge,
.sidebar-nav a.active .sidebar-badge {
    display: inline-grid;
    flex: 0 0 auto;
    width: auto;
    min-width: 19px;
    height: 19px;
    border-radius: 999px;
    color: #fff;
}

.sidebar-nav a .sidebar-badge.new,
.sidebar-nav a:hover .sidebar-badge.new,
.sidebar-nav a.active .sidebar-badge.new {
    background: #24b47e;
}

.sidebar-nav a .sidebar-badge.payment,
.sidebar-nav a:hover .sidebar-badge.payment,
.sidebar-nav a.active .sidebar-badge.payment {
    background: #f08a8a;
}

.sidebar-nav a.active::before,
.sidebar-group > button.active::before {
    content: "";
    position: absolute;
    left: -14px;
    width: 4px;
    height: 24px;
    border-radius: 0 999px 999px 0;
    background: var(--teal);
}

.crm-page-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
    margin-bottom: 6px;
}

.crm-page-head > div {
    min-width: 0;
}

.crm-page-head .btn {
    align-self: start;
    min-height: 48px;
    margin-top: 0;
    padding-inline: 24px;
}

.crm-topbar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 0 0 4px;
}

.notification-bell {
    position: relative;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: #173348;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(7, 25, 39, .05);
}

.notification-bell svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.notification-bell strong {
    position: absolute;
    top: -7px;
    right: -6px;
    display: grid;
    min-width: 20px;
    height: 20px;
    place-items: center;
    padding: 0 5px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #e63b3b;
    color: #fff;
    font-size: .68rem;
    line-height: 1;
}

.profile-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: #173348;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(7, 25, 39, .05);
}

.profile-avatar {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 8px;
    background: #eaf8f5;
    color: #057060;
}

.profile-trigger svg,
.profile-menu svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.profile-caret {
    width: 16px;
    height: 16px;
    color: var(--muted);
}

.profile-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 40;
    display: none;
    width: min(320px, calc(100vw - 32px));
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(7, 25, 39, .18);
}

.profile-menu.open {
    display: grid;
    gap: 10px;
}

.profile-menu-head {
    padding-bottom: 10px;
    border-bottom: 1px solid #edf3f7;
}

.profile-menu-head strong,
.profile-menu-head span,
.profile-menu-row span,
.profile-menu-row strong {
    display: block;
}

.profile-menu-head span,
.profile-menu-row span {
    color: var(--muted);
    font-size: .84rem;
}

.profile-menu-row {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 10px;
    align-items: center;
}

.profile-menu-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid #edf3f7;
}

.profile-menu-actions a {
    display: inline-flex;
    justify-content: center;
    min-height: 38px;
    align-items: center;
    border-radius: 8px;
    background: #edf8f5;
    color: #057060;
    font-weight: 900;
}

.profile-menu-actions a.danger {
    background: #fff0ed;
    color: #b53820;
}

.crm-page-head h1 {
    font-size: clamp(1.25rem, 1.65vw, 1.62rem);
    line-height: 1.12;
}

.crm-page-head p {
    margin-top: 5px;
    margin-bottom: 0;
    font-size: .84rem;
}

.crm-body .workspace-card {
    margin-top: 8px;
    padding: 11px;
}

.crm-body .section-head.compact {
    margin-bottom: 12px;
}

.crm-body .section-head.compact h2,
.crm-body .workspace-card > h2 {
    font-size: clamp(1.2rem, 1.65vw, 1.55rem);
}

.crm-body .metric {
    padding: 12px 14px;
}

.crm-body .metric.big strong,
.crm-body .metric strong {
    font-size: clamp(1.1rem, 1.45vw, 1.45rem);
}

.crm-body input,
.crm-body select,
.crm-body textarea {
    min-height: 40px;
    padding: 9px 11px;
    font-size: .92rem;
}

.crm-body .btn,
.crm-body button.btn {
    min-height: 40px;
    padding: 0 16px;
    background: #2862a8;
    font-size: .9rem;
    box-shadow: 0 10px 22px rgba(40, 98, 168, .18);
}

.crm-body .btn:hover,
.crm-body button.btn:hover {
    background: #1f5596;
}

.crm-body .btn-small {
    min-height: 34px;
    padding: 0 12px;
    font-size: .84rem;
}

.crm-body .crm-table-head,
.crm-body .crm-table-row {
    min-height: 36px;
    padding: 6px 8px;
    font-size: .88rem;
}

.crm-body .crm-table-head {
    font-size: .84rem;
}

.crm-body .crm-table-row {
    min-height: 42px;
}

.crm-body .crm-table-row small {
    font-size: .78rem;
}

.floating-action {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 35;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 0 18px 0 14px;
    border: 0;
    border-radius: 999px;
    background: #2862a8;
    color: #fff;
    font: inherit;
    font-size: .9rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(29, 81, 141, .28);
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.floating-create {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 35;
}

.floating-create .floating-action {
    position: static;
}

.floating-action small {
    font-size: .82rem;
    line-height: 1;
}

.floating-create-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    display: none;
    min-width: 192px;
    padding: 8px;
    border: 1px solid #2862a8;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 34px rgba(15, 42, 64, .18);
}

.floating-create.open .floating-create-menu {
    display: grid;
    gap: 2px;
}

.floating-create-menu button {
    width: 100%;
    min-height: 34px;
    padding: 0 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #18344a;
    font: inherit;
    font-size: .84rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.floating-create-menu button:hover {
    background: #eef6fb;
    color: #2862a8;
}

.floating-action span {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1;
}

.floating-action:hover {
    background: #1f5596;
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(29, 81, 141, .34);
}

.metric.big {
    background: #fff;
}

.metric-button {
    width: 100%;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.metric-button:hover {
    border-color: rgba(16, 191, 163, .55);
    transform: translateY(-1px);
    box-shadow: 0 14px 36px rgba(16, 191, 163, .13);
}

.metric.big strong {
    font-size: clamp(1.35rem, 1.8vw, 1.85rem);
}

.payments-balance-card {
    display: grid;
    grid-template-columns: minmax(180px, .75fr) minmax(0, 1.35fr);
    gap: 18px;
    align-items: center;
    margin: 0 0 14px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, #fff, #f3fbf8);
    box-shadow: 0 12px 34px rgba(7, 25, 39, .05);
}

.payments-balance-card > div {
    display: grid;
    gap: 4px;
}

.payments-balance-card span,
.payments-balance-card dt {
    color: var(--muted);
    font-size: .86rem;
    font-weight: 800;
}

.payments-balance-card strong {
    color: var(--ink);
    font-size: clamp(1.45rem, 2.2vw, 2.15rem);
    line-height: 1;
}

.payments-balance-card dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.payments-balance-card dl div {
    padding: 10px 12px;
    border: 1px solid #dce9ef;
    border-radius: 10px;
    background: rgba(255, 255, 255, .72);
}

.payments-balance-card dd {
    margin: 3px 0 0;
    color: var(--ink);
    font-weight: 900;
}

.payment-table .crm-table-head,
.payment-table .crm-table-row {
    grid-template-columns: 54px 132px minmax(140px, 1fr) 105px 110px 105px minmax(160px, 1fr) 108px;
}

.empty-state {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 22px 14px 20px;
    text-align: center;
}

.empty-state h2 {
    margin: 0;
    font-size: clamp(1.05rem, 1.45vw, 1.35rem);
}

.empty-state p {
    max-width: 520px;
    margin: 0;
    color: var(--muted);
    font-size: .86rem;
}

.empty-illustration {
    width: min(220px, 62vw);
}

.empty-illustration svg {
    display: block;
    width: 100%;
    height: auto;
}

.warehouse-empty .empty-bg {
    fill: #f0f6fb;
}

.warehouse-empty .empty-card-shape {
    fill: #fff;
    stroke: #8fb4ca;
}

.warehouse-empty .empty-accent {
    fill: #2862a8;
}

.empty-bg {
    fill: #eef7f5;
}

.empty-card-shape {
    fill: #fff;
    stroke: #9fcfc8;
    stroke-width: 3;
}

.empty-line {
    fill: none;
    stroke: #173348;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 4;
}

.empty-accent {
    fill: #13c4a5;
}

.empty-check {
    fill: none;
    stroke: #fff;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 4;
}

.basics-shell {
    display: grid;
    gap: 12px;
    max-width: 980px;
    margin-inline: auto;
}

.basics-hero,
.basics-feature,
.basics-note {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(240px, .85fr);
    gap: 18px;
    align-items: center;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: linear-gradient(135deg, #fff, color-mix(in srgb, var(--industry-accent, #2862a8) 10%, #f7fbff));
    overflow: hidden;
}

.basics-hero h1,
.basics-feature h2,
.basics-steps h2,
.basics-note h2 {
    margin: 0;
    font-size: clamp(1.25rem, 2vw, 1.8rem);
    line-height: 1.12;
}

.basics-hero p,
.basics-feature p,
.basics-grid p,
.basics-note p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: .88rem;
    line-height: 1.55;
}

.mini-label {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 8px;
    padding: 4px 9px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--industry-accent, #13c4a5) 12%, #fff);
    color: color-mix(in srgb, var(--industry-accent, #057060) 82%, #012);
    font-size: .76rem;
    font-weight: 900;
}

.basics-actions,
.basics-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.basics-visual {
    display: grid;
    justify-items: end;
}

.basics-visual img {
    width: 160px;
    border-radius: 28px;
    box-shadow: 0 18px 42px rgba(7, 25, 39, .2);
}

.basics-tabs {
    margin-top: 0;
}

.basics-tabs a {
    min-height: 32px;
    padding: 7px 12px;
    border-radius: 8px;
    background: #e8eef5;
    color: #344b5d;
    font-size: .84rem;
    font-weight: 900;
}

.basics-tabs a.active,
.basics-tabs a:hover {
    background: var(--industry-accent, #2862a8);
    color: #fff;
}

.basics-feature {
    background: #fff;
}

.basics-screen {
    min-width: 0;
    padding: 12px;
    border: 1px solid #c9d9e5;
    border-radius: 12px;
    background: #f8fbfd;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8);
}

.screen-top,
.screen-tabs,
.screen-row {
    display: grid;
    align-items: center;
}

.screen-top {
    grid-template-columns: repeat(3, 8px);
    gap: 5px;
    margin-bottom: 10px;
}

.screen-top span,
.screen-tabs i {
    display: block;
    border-radius: 999px;
    background: #c9d8e6;
}

.screen-top span {
    width: 8px;
    height: 8px;
}

.screen-tabs {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 8px;
}

.screen-tabs i {
    height: 8px;
}

.screen-row {
    grid-template-columns: 34px minmax(0, 1fr) 86px 56px;
    gap: 8px;
    padding: 8px 0;
    border-top: 1px solid #e2ebf1;
    font-size: .78rem;
}

.screen-row span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.screen-row em {
    padding: 4px 7px;
    border-radius: 999px;
    background: #22aeca;
    color: #fff;
    font-style: normal;
    font-weight: 900;
    text-align: center;
}

.screen-row em.orange {
    background: #d69224;
}

.screen-row em.green {
    background: #77c936;
}

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

.basics-grid article,
.basics-steps {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.basics-grid h3 {
    margin: 12px 0 0;
    font-size: 1rem;
}

.basics-grid a {
    display: inline-flex;
    margin-top: 14px;
    padding: 8px 12px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--industry-accent, #2862a8) 10%, #fff);
    color: var(--industry-accent, #2862a8);
    font-weight: 900;
    font-size: .84rem;
}

.basics-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 9px;
    background: color-mix(in srgb, var(--industry-accent, #2862a8) 14%, #fff);
    color: var(--industry-accent, #2862a8);
    font-weight: 900;
}

.basics-steps > div {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.basics-steps article {
    display: grid;
    gap: 8px;
    padding: 12px;
    border-radius: 10px;
    background: #f5f9fc;
}

.basics-steps strong {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 8px;
    background: var(--industry-accent, #2862a8);
    color: #fff;
}

.basics-steps span {
    color: #344b5d;
    font-size: .84rem;
    font-weight: 800;
}

.industry-benefits,
.industry-strip {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.industry-benefits h2,
.industry-strip h2 {
    margin: 0;
    font-size: 1.15rem;
}

.industry-benefits p,
.industry-strip p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: .86rem;
    line-height: 1.45;
}

.industry-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--industry-accent, #2862a8) 12%, #fff);
    color: var(--industry-accent, #2862a8);
    font-weight: 900;
    font-size: .78rem;
    white-space: nowrap;
}

.benefit-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.benefit-list article {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding: 10px;
    border-radius: 10px;
    background: #f6f9fc;
}

.benefit-list span {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 8px;
    background: var(--industry-accent, #2862a8);
    color: #fff;
    font-weight: 900;
    font-size: .78rem;
}

.industry-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    margin-top: 12px;
    border-left: 4px solid var(--industry-accent, #2862a8);
}

.industry-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 460px;
}

.industry-actions span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--industry-accent, #2862a8) 10%, #fff);
    color: #183348;
    font-size: .8rem;
    font-weight: 900;
    white-space: nowrap;
}

.row-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    min-width: max-content;
}

.icon-btn {
    display: inline-grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid #cfdde7;
    border-radius: 8px;
    background: #fff;
    color: #173348;
    font: inherit;
    font-size: .82rem;
    font-weight: 900;
    cursor: pointer;
}

.icon-btn:hover {
    background: #edf8f5;
    border-color: rgba(16, 191, 163, .45);
}

.icon-btn.danger {
    color: #b53820;
}

.icon-btn.money {
    color: #057060;
}

.modal-lock {
    overflow: hidden;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.modal.open {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 27, 42, .52);
    backdrop-filter: blur(2px);
}

.modal-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 720px);
    max-height: calc(100vh - 44px);
    overflow: auto;
    padding: 16px 18px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .24);
}

.modal-panel.wide-panel {
    width: min(100%, 920px);
}

.modal-panel.notifications-panel {
    width: min(100%, 760px);
}

.order-modal-panel {
    width: min(100%, 650px);
    padding: 14px 16px 16px;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -2px 0 10px;
    padding-bottom: 9px;
    border-bottom: 1px solid #eef3f7;
}

.modal-head h2 {
    font-size: 1.12rem;
    letter-spacing: 0;
}

.modal-head button {
    width: 32px;
    height: 32px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    color: #102033;
    font-size: 1.15rem;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.modal-head button:hover,
.modal-head button:focus-visible {
    border-color: #ef4444;
    background: #fff0f0;
    color: #c62828;
    transform: translateY(-1px);
}

.modal-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
    align-items: start;
}

.compact-order-form {
    gap: 8px 12px;
}

.compact-order-form label {
    gap: 5px;
    color: #31485b;
    font-size: .8rem;
    font-weight: 800;
}

.crm-body .compact-order-form input,
.crm-body .compact-order-form select {
    height: 34px;
    min-height: 34px;
    padding: 6px 9px;
    border-radius: 8px;
    font-size: .86rem;
}

.compact-order-form .new-client-panel {
    margin-top: 2px;
}

.compact-order-form .btn {
    width: fit-content;
    min-height: 36px;
    justify-self: end;
    margin-top: 4px;
    padding: 0 18px;
    border-radius: 9px;
    font-size: .84rem;
}

.modal-form .wide,
.modal-form .btn {
    grid-column: 1 / -1;
}

.crm-body .modal-form input,
.crm-body .modal-form select {
    height: 40px;
    min-height: 40px;
    padding: 8px 11px;
}

.crm-body .modal-form textarea {
    min-height: 86px;
}

.crm-body .modal-form label {
    min-width: 0;
}

.client-picker-field {
    position: relative;
    align-self: start;
    gap: 5px;
    padding: 0;
}

.client-search-box {
    position: relative;
    display: grid;
}

.client-suggest-list {
    position: absolute;
    inset: calc(100% + 4px) 0 auto 0;
    z-index: 9;
    display: none;
    max-height: 176px;
    overflow: auto;
    padding: 5px;
    border: 1px solid #cfe0eb;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 30px rgba(15, 42, 64, .14);
}

.client-picker-field.is-search-open .client-suggest-list {
    display: grid;
    gap: 3px;
}

.client-suggest-list button {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    min-height: 34px;
    padding: 5px 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #102033;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.client-suggest-list button:hover {
    background: #eef6fb;
}

.client-suggest-list strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .84rem;
}

.client-suggest-list small {
    color: var(--muted);
    font-size: .76rem;
    white-space: nowrap;
}

.client-picker-hint {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 900;
}

.recent-client-list {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    min-height: 28px;
}

.recent-client-list button,
.inline-add-button {
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid #d5e3ee;
    border-radius: 8px;
    background: #f4f8fb;
    color: #173348;
    font: inherit;
    font-size: .78rem;
    font-weight: 900;
    cursor: pointer;
}

.recent-client-list button:hover,
.inline-add-button:hover {
    background: #eaf3fb;
}

.recent-client-list small {
    color: var(--muted);
    font-size: .78rem;
}

.inline-add-button {
    width: fit-content;
    min-height: 26px;
    padding: 4px 8px;
    background: #eaf8f5;
    color: #057060;
}

.new-client-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
    padding: 10px;
    border: 1px solid #d9e8ef;
    border-radius: 10px;
    background: #f8fbfd;
}

.new-client-panel[hidden] {
    display: none;
}

.new-client-panel > strong {
    grid-column: 1 / -1;
    font-size: .86rem;
}

.client-rich-form {
    align-items: start;
}

.client-type-row {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #173348;
    font-size: .86rem;
    font-weight: 900;
}

.client-type-row label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: auto;
    font-size: .82rem;
    font-weight: 800;
}

.client-type-row input {
    width: auto;
}

.client-profile-panel {
    width: min(100%, 760px);
}

.client-profile-head {
    align-items: flex-start;
}

.client-profile-head h2 {
    margin-bottom: 4px;
}

.client-profile-head span {
    color: var(--muted);
    font-size: .86rem;
    font-weight: 800;
}

.client-profile-title {
    margin: 20px 0 10px;
    font-size: .98rem;
}

.client-info-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.client-info-card div {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px solid #edf2f6;
}

.client-info-card div:last-child {
    border-bottom: 0;
}

.client-info-card span,
.client-history-table small {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}

.client-info-card strong {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: .84rem;
}

.client-history-table {
    display: grid;
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.client-history-table > div {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) 120px 110px;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #edf2f6;
}

.client-history-table > div:first-child {
    background: #f4f8fb;
    font-size: .78rem;
}

.client-history-table > div:last-child {
    border-bottom: 0;
}

.client-history-table span,
.client-history-table strong {
    min-width: 0;
}

.client-history-table small {
    display: block;
    margin-top: 3px;
}

.client-history-table p {
    margin: 0;
    padding: 12px;
    color: var(--muted);
}

.notification-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: -4px 0 14px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f3f7fb;
    color: var(--muted);
    font-weight: 800;
}

.notification-list,
.notification-admin-list {
    display: grid;
    gap: 10px;
}

.notification-list article,
.notification-admin-list article {
    display: grid;
    gap: 12px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.notification-list article.is-unread {
    border-color: #b8d7ff;
    background: #f5f9ff;
}

.notification-list article.is-read {
    opacity: .78;
}

.notification-list h3,
.notification-admin-list h3 {
    margin: 3px 0 0;
    font-size: 1rem;
}

.notification-list p,
.notification-admin-list p {
    margin: 6px 0 0;
    color: #344b5d;
    font-size: .9rem;
    line-height: 1.45;
}

.notification-list article > span,
.notification-list article span,
.notification-admin-list article span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}

.notification-list article {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
}

.admin-notification-form {
    margin-bottom: 14px;
}

.admin-notification-form textarea {
    min-height: 104px;
    resize: vertical;
}

.notification-recipient-picker {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f7fafc;
}

.notification-recipient-picker[hidden] {
    display: none;
}

.notification-recipient-picker > strong {
    font-size: .9rem;
}

.notification-recipient-picker > div {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.notification-recipient-picker label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-height: 48px;
    padding: 8px;
    border: 1px solid #d8e4ee;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.notification-recipient-picker input {
    width: auto;
    margin-top: 3px;
}

.notification-recipient-picker span,
.notification-recipient-picker small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-recipient-picker span {
    min-width: 0;
    font-weight: 900;
}

.notification-recipient-picker small {
    margin-top: 2px;
    color: var(--muted);
    font-size: .75rem;
}

.notification-admin-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
}

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

.notification-read-grid > div {
    padding: 10px;
    border-radius: 10px;
    background: #f5f9fc;
}

.notification-read-grid > div.read {
    background: #eefaf4;
}

.notification-read-grid > div.unread {
    background: #fff5f2;
}

.notification-read-grid strong,
.notification-read-grid span,
.notification-read-grid small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-read-grid strong {
    font-size: .88rem;
}

.notification-read-grid small {
    margin-top: 4px;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 800;
}

.confirm-panel {
    width: min(100%, 420px);
}

.confirm-text {
    margin: 0 0 18px;
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 700;
}

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

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.mini-table {
    display: grid;
    gap: 8px;
}

.mini-table > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid #e2ebf1;
    border-radius: var(--radius);
    background: #f8fbfd;
}

.mini-table.debt-table > div {
    grid-template-columns: minmax(0, 1fr) auto auto auto;
}

.mini-table span,
.mini-table strong,
.mini-table small {
    display: block;
}

.mini-table small {
    margin-top: 3px;
    color: var(--muted);
    font-weight: 700;
}

.detail-grid div {
    padding: 14px;
    border: 1px solid #e2ebf1;
    border-radius: var(--radius);
    background: #f8fbfd;
}

.detail-grid span,
.detail-grid strong {
    display: block;
}

.detail-grid span {
    color: var(--muted);
    font-size: .86rem;
}

.finance-bars {
    display: grid;
    gap: 18px;
    margin-top: 18px;
}

.finance-bars div {
    display: grid;
    gap: 8px;
}

.finance-bars i {
    display: block;
    height: 10px;
    border-radius: 999px;
    background: var(--teal);
}

.finance-bars i.gold {
    background: var(--gold);
}

.mini-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 24px;
}

.mini-metrics div,
.report-list div {
    padding: 14px;
    border: 1px solid #e2ebf1;
    border-radius: var(--radius);
    background: #f8fbfd;
}

.mini-metrics strong,
.mini-metrics span,
.report-list span,
.report-list strong {
    display: block;
}

.report-list {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.report-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.report-switch,
.report-tabs,
.settings-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.report-switch a,
.report-tabs a,
.tab-button {
    min-height: 40px;
    padding: 0 14px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #3a5165;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.report-switch a,
.report-tabs a {
    display: inline-flex;
    align-items: center;
}

.report-switch a.active,
.report-tabs a.active,
.tab-button.active {
    background: var(--navy);
    color: #fff;
}

.report-tabs {
    width: fit-content;
    margin: 0;
}

.report-tabs-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0;
}

.report-export-btn {
    flex: 0 0 auto;
}

.report-control-card {
    display: grid;
    gap: 12px;
    padding: 12px 16px;
}

.filter-bar {
    display: grid;
    grid-template-columns: 170px 170px minmax(240px, 1fr) 120px;
    gap: 10px;
    align-items: end;
}

.workspace-card:has(> .filter-bar) {
    padding: 12px 16px;
    margin-top: 10px;
}

.report-control-card:has(> .filter-bar) {
    margin-top: 10px;
}

.filter-bar input,
.filter-bar select,
.filter-bar .btn {
    min-height: 42px;
}

.filter-bar .wide {
    min-width: 0;
}

.export-locked {
    position: relative;
    opacity: .52;
    filter: grayscale(.35);
    cursor: not-allowed;
    pointer-events: auto;
}

.export-locked:hover {
    transform: none;
}

.export-locked:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    z-index: 20;
    width: max-content;
    max-width: 260px;
    padding: 9px 11px;
    border-radius: 8px;
    background: #061b2a;
    color: #fff;
    font-size: .78rem;
    line-height: 1.35;
    box-shadow: 0 16px 36px rgba(6, 27, 42, .22);
}

.report-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.confirm-box {
    display: grid;
    gap: 14px;
}

.confirm-box p {
    margin: 0;
    color: #173348;
    font-weight: 800;
    line-height: 1.45;
}

.confirm-box small {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f3f8fb;
    color: var(--muted);
    font-weight: 700;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.report-toolbar h2 {
    font-size: 1.35rem;
}

.report-toolbar p {
    margin: 6px 0 0;
}

.export-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.report-list.rich div {
    align-items: center;
    counter-increment: report-row;
}

.report-list.rich {
    counter-reset: report-row;
}

.report-list.rich div::before {
    content: counter(report-row);
    display: grid;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 8px;
    background: #edf4f8;
    color: #496073;
    font-size: .78rem;
    font-weight: 900;
}

.report-list.rich small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
}

.settings-tabs {
    width: fit-content;
    margin: 0 0 18px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.settings-form {
    margin-top: 16px;
}

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

.check-card {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 12px;
    align-items: start;
    padding: 16px;
    border: 1px solid #e2ebf1;
    border-radius: var(--radius);
    background: #f8fbfd;
}

.check-card input {
    width: 18px;
    min-height: 18px;
    margin-top: 3px;
}

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

.check-card small {
    margin-top: 4px;
    color: var(--muted);
    line-height: 1.45;
}

.pipeline {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.pipeline div {
    padding: 14px;
    border-radius: var(--radius);
    background: #edf8f5;
}

.settings-lists {
    align-items: start;
}

.settings-list {
    padding: 16px;
    border: 1px solid #e2ebf1;
    border-radius: var(--radius);
    background: #f8fbfd;
}

.settings-list.locked {
    opacity: .72;
}

.setting-add-form {
    display: grid;
    grid-template-columns: 1fr 40px;
    gap: 8px;
    margin-top: 14px;
}

.setting-add-form input {
    min-width: 0;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
    border: 1px solid #e2ebf1;
    border-radius: var(--radius);
    background: #fff;
}

.setting-row > span {
    min-width: 0;
    overflow-wrap: anywhere;
    font-weight: 700;
}

.pipeline strong,
.pipeline span {
    display: block;
}

.plan-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: var(--radius);
    background: #f8fbfd;
}

.plan-payment-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
    gap: 14px;
    align-items: stretch;
}

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

.tariff-mini-grid article {
    display: grid;
    gap: 5px;
    padding: 12px;
    border: 1px solid #d8e5ed;
    border-radius: 8px;
    background: #fff;
}

.tariff-mini-grid span {
    color: var(--brand);
    font-weight: 900;
}

.tariff-mini-grid small {
    color: var(--muted);
    font-weight: 700;
}

.payment-create-card label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-weight: 800;
}

.payment-create-card select {
    width: 100%;
    border: 1px solid #c9dce8;
    border-radius: 8px;
    padding: 11px 12px;
    background: #fff;
    color: var(--ink);
    font-weight: 800;
}

.payment-request-head {
    margin-top: 18px;
}

.payment-request-table .crm-table-head,
.payment-request-table .crm-table-row {
    grid-template-columns: 150px minmax(180px, 1fr) 120px 120px 100px;
}

.admin-payment-request-table .crm-table-head,
.admin-payment-request-table .crm-table-row {
    grid-template-columns: 150px minmax(180px, 1fr) 150px 120px 110px 100px;
}

.payment-page-card {
    max-width: 980px;
}

.payment-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.finik-payment-box {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(260px, .7fr);
    grid-template-areas: "frame info";
    gap: 16px;
    align-items: start;
}

.finik-payment-preview {
    grid-area: frame;
    min-height: 420px;
    display: grid;
    place-items: center;
    padding: 24px;
    overflow: hidden;
    border: 1px solid #d8e5ed;
    border-radius: 8px;
    background: #fff;
}

.finik-payment-empty {
    max-width: 360px;
    display: grid;
    gap: 8px;
    color: #64748b;
    text-align: center;
}

.finik-payment-empty strong {
    color: #102538;
    font-size: 20px;
}

.finik-payment-empty[hidden],
.finik-qr-output[hidden] {
    display: none;
}

.finik-qr-output {
    width: 100%;
    display: grid;
    place-items: center;
}

.finik-qr-output img {
    display: block;
    width: min(100%, 380px);
    height: auto;
    image-rendering: pixelated;
}

.finik-payment-info {
    grid-area: info;
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid #d8e5ed;
    border-radius: 8px;
    background: #f8fbfd;
}

.payment-method-button[aria-pressed="true"] {
    box-shadow: 0 0 0 3px rgba(35, 101, 178, .16);
}

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

.finik-setup-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.finik-setup-steps article {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid #d8e5ed;
    border-radius: 8px;
    background: #f8fbfd;
}

.finik-setup-steps article > span {
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    background: #dff4ef;
    color: var(--green);
    font-weight: 900;
    font-size: .78rem;
}

.finik-setup-steps p {
    margin: 0;
    color: var(--muted);
    font-size: .86rem;
}

.finik-public-key {
    display: grid;
    gap: 7px;
    margin: 0 0 14px;
    color: var(--muted);
    font-weight: 800;
}

.finik-public-key textarea {
    width: 100%;
    min-height: 132px;
    border: 1px solid #c9dce8;
    border-radius: 8px;
    padding: 11px 12px;
    background: #fff;
    color: var(--ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .82rem;
}

.finik-auto-info div {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 12px;
    border: 1px solid #d8e5ed;
    border-radius: 8px;
    background: #f8fbfd;
}

.finik-auto-info span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}

.finik-auto-info strong {
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: .86rem;
}

.advanced-settings {
    border: 1px solid #d8e5ed;
    border-radius: 8px;
    background: #fff;
}

.advanced-settings summary {
    padding: 12px 14px;
    color: var(--brand);
    font-weight: 900;
    cursor: pointer;
}

.advanced-settings > .modal-form {
    padding: 0 14px 14px;
    border-top: 1px solid #e7f0f5;
}

.check-row {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    gap: 10px;
}

.check-row input {
    width: 18px;
    min-height: 18px;
}

.site-footer {
    display: grid;
    grid-template-columns: 1.4fr .7fr .7fr;
    gap: 34px;
    padding: 44px clamp(18px, 5vw, 76px);
    background: #061b2a;
    color: white;
}

.site-footer p,
.site-footer a,
.site-footer small {
    color: #b8cbd8;
}

.site-footer a {
    display: block;
    margin-top: 10px;
}

.site-footer h3 {
    margin-bottom: 10px;
}

@media (max-width: 980px) {
    .site-header {
        grid-template-columns: 1fr auto;
    }

    .nav-toggle {
        display: block;
    }

    .main-nav,
    .header-actions {
        display: none;
    }

    .main-nav.open {
        display: grid;
        grid-column: 1 / -1;
        justify-self: stretch;
        padding-top: 12px;
    }

    .main-nav.open ~ .header-actions {
        display: flex;
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .hero,
    .product-band,
    .form-wrap,
    .visual-split,
    .app-shell,
    .site-footer {
        grid-template-columns: 1fr;
        overflow: visible;
    }

    .grid-3,
    .grid-2,
    .grid-4,
    .inline-form,
    .compact-form {
        grid-template-columns: 1fr 1fr;
    }

    .app-sidebar {
        position: static;
        height: auto;
    }

    .subscription-form {
        grid-template-columns: 1fr 1fr;
    }

    .app-shell.detached .app-sidebar {
        height: auto;
    }

    .app-shell.detached .app-main {
        margin-left: 0;
        width: auto;
    }

    .crm-page-head {
        display: block;
    }

    .pipeline,
    .mini-metrics,
    .modal-form,
    .new-client-panel,
    .detail-grid {
        grid-template-columns: 1fr 1fr;
    }

    .section-head {
        display: block;
    }
}

@media (max-width: 760px) {
    .crm-body {
        background: #f3f7fa;
    }

    .app-shell.detached {
        display: block;
        width: 100%;
        max-width: 100%;
        min-height: 100vh;
        overflow-x: hidden;
        padding-top: 66px;
    }

    .app-shell.detached .app-main {
        margin-left: 0;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        overflow-x: hidden;
    }

    .mobile-crm-bar {
        position: fixed;
        inset: 0 0 auto 0;
        z-index: 60;
        display: grid;
        grid-template-columns: 42px 1fr 42px;
        gap: 10px;
        align-items: center;
        min-height: 66px;
        padding: 10px 14px;
        background: rgba(255, 255, 255, .94);
        border-bottom: 1px solid var(--line);
        backdrop-filter: blur(14px);
    }

    .mobile-crm-bar strong,
    .mobile-crm-bar span {
        display: block;
    }

    .mobile-crm-bar span {
        color: var(--muted);
        font-size: .82rem;
    }

    .mobile-menu-btn,
    .mobile-home,
    .sidebar-close {
        display: grid;
        width: 42px;
        height: 42px;
        place-items: center;
        border: 1px solid var(--line);
        border-radius: 10px;
        background: #fff;
        color: var(--ink);
        font: inherit;
        font-weight: 900;
    }

    .mobile-home {
        overflow: hidden;
        background: #062032;
        border: 0;
    }

    .mobile-home img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .mobile-sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 70;
        background: rgba(6, 27, 42, .52);
    }

    .crm-menu-open .mobile-sidebar-backdrop {
        display: block;
    }

    .app-shell.detached .app-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 80;
        width: min(86vw, 320px);
        height: 100vh;
        transform: translateX(-104%);
        transition: transform .22s ease;
        border-right: 1px solid rgba(255, 255, 255, .12);
    }

    .crm-menu-open .app-shell.detached .app-sidebar {
        transform: translateX(0);
    }

    .sidebar-close {
        position: absolute;
        top: 10px;
        right: 10px;
        background: rgba(255, 255, 255, .08);
        color: #fff;
        border-color: rgba(255, 255, 255, .18);
    }

    .crm-product {
        padding-right: 48px;
    }

    .app-main {
        padding: 16px;
        overflow-x: visible;
    }

    .crm-page-head {
        display: grid;
        gap: 14px;
        margin-bottom: 16px;
    }

    .crm-topbar {
        display: grid;
        grid-template-columns: auto auto;
        justify-content: end;
        width: auto;
        gap: 10px;
    }

    .crm-topbar > div {
        min-width: 0;
    }

    .crm-page-head h1 {
        font-size: 1.45rem;
    }

    .crm-page-head .btn {
        width: 100%;
    }

    .floating-action {
        right: 14px;
        bottom: 14px;
        min-height: 42px;
        padding-right: 15px;
        font-size: .86rem;
    }

    .floating-create {
        right: 14px;
        bottom: 14px;
    }

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

    .inventory-taxonomy {
        grid-template-columns: 1fr;
    }

    .report-switch,
    .report-tabs,
    .report-tabs-row,
    .settings-tabs,
    .report-toolbar {
        width: 100%;
    }

    .report-tabs-row,
    .report-toolbar {
        display: grid;
    }

    .export-grid,
    .report-switch,
    .report-tabs {
        justify-content: stretch;
    }

    .export-grid .btn,
    .report-switch a,
    .report-tabs a,
    .tab-button {
        flex: 1 1 auto;
    }

    .filter-bar {
        grid-template-columns: 1fr;
    }

    .payments-balance-card,
    .payments-balance-card dl {
        grid-template-columns: 1fr;
    }

    .plan-payment-grid,
    .tariff-mini-grid,
    .payment-summary-grid,
    .finik-payment-box,
    .finik-auto-info,
    .finik-setup-steps {
        grid-template-columns: 1fr;
    }

    .plan-payment-grid,
    .plan-payment-grid > *,
    .payment-create-card,
    .payment-request-table {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .payment-create-card .btn {
        width: 100%;
        min-width: 0;
        height: auto;
        min-height: 44px;
        padding: 10px 12px;
        white-space: normal;
    }

    .finik-payment-preview {
        min-height: 360px;
        padding: 16px;
    }

    .finik-payment-box {
        grid-template-areas: "info" "frame";
    }

    .basics-hero,
    .basics-feature,
    .basics-note,
    .basics-grid,
    .basics-steps > div,
    .benefit-list,
    .industry-strip,
    .security-check-grid,
    .admin-limits-form,
    .notification-list article,
    .notification-admin-head,
    .notification-read-grid,
    .client-info-card div,
    .client-history-table > div,
    .notification-recipient-picker > div {
        grid-template-columns: 1fr;
    }

    .industry-actions {
        justify-content: flex-start;
    }

    .basics-visual {
        justify-items: start;
    }

    .basics-visual img {
        width: 120px;
    }

    .workspace-card {
        margin-top: 14px;
        padding: 14px;
        border-radius: 10px;
    }

    .grid,
    .grid-2,
    .grid-3,
    .grid-4 {
        gap: 12px;
    }

    .metric.big strong,
    .metric strong {
        font-size: 1.35rem;
    }

    .crm-table {
        display: grid;
        gap: 10px;
        overflow: visible;
    }

    .crm-table-head {
        display: none;
    }

    .crm-table-row,
    .order-table .crm-table-row,
    .payment-table .crm-table-row,
    .client-table .crm-table-row,
    .inventory-table .crm-table-row,
    .team-table .crm-table-row,
    .dashboard-order-table .crm-table-row,
    .admin-table .crm-table-row,
    .admin-crm-table .crm-table-row,
    .admin-billing-table .crm-table-row,
    .admin-login-table .crm-table-row,
    .whatsapp-log-table .crm-table-row,
    .backup-table .crm-table-row,
    .admin-subscription-table .crm-table-row {
        display: grid;
        grid-template-columns: 1fr;
        min-width: 0;
        gap: 9px;
        padding: 14px;
        border-radius: 10px;
        background: #fff;
    }

    .payment-request-table .crm-table-row,
    .admin-payment-request-table .crm-table-row {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        grid-template-columns: minmax(0, 1fr);
    }

    .payment-request-table .crm-table-row > *,
    .admin-payment-request-table .crm-table-row > * {
        min-width: 0;
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .payment-request-table .crm-table-row .pill,
    .admin-payment-request-table .crm-table-row .pill {
        justify-self: start;
    }

    .payment-request-table .crm-table-row .btn-mini,
    .admin-payment-request-table .crm-table-row .btn-mini {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .crm-table-row > span,
    .crm-table-row > form,
    .crm-table-row > .row-actions {
        min-width: 0;
    }

    .whatsapp-connect-grid {
        grid-template-columns: 1fr;
    }

    .table-action select {
        width: 100%;
    }

    .status-picker,
    .status-trigger {
        width: 100%;
        max-width: 100%;
    }

    .row-actions {
        justify-content: flex-start;
    }

    .subscription-form {
        grid-template-columns: 1fr;
    }

    .icon-btn {
        width: 40px;
        height: 40px;
    }

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

    .modal {
        align-items: end;
        padding: 0;
    }

    .modal-panel {
        width: 100%;
        max-height: 92vh;
        border-radius: 18px 18px 0 0;
        padding: 18px;
    }

    .modal-form,
    .detail-grid,
    .phone-field,
    .notification-grid {
        grid-template-columns: 1fr;
    }

    .compact-order-form .btn {
        width: 100%;
        justify-self: stretch;
    }

    .mini-table > div,
    .mini-table.debt-table > div {
        grid-template-columns: 1fr;
    }

    input,
    select,
    textarea {
        font-size: 16px;
    }
}

@media (max-width: 640px) {
    .hero {
        padding-top: 34px;
    }

    .stats,
    .grid-3,
    .grid-2,
    .grid-4,
    .form-grid,
    .inline-form,
    .compact-form,
    .phone-field {
        grid-template-columns: 1fr;
    }

    .app-top {
        display: block;
    }

    .trial-box {
        margin-top: 18px;
    }

    .pipeline,
    .mini-metrics,
    .modal-form,
    .new-client-panel,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .hero-panel img {
        height: 320px;
    }

    .hero-card {
        position: static;
        width: auto;
        margin: 0;
        border-radius: 0;
    }

    .order-board {
        grid-template-columns: 1fr;
    }

    .sidebar-demo {
        display: none;
    }
}
