:root {
    color-scheme: dark;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #101418;
    color: #f8fafc;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at top, #25313b 0, #101418 55%);
}

button,
input {
    font: inherit;
}

.eyebrow,
.section-kicker,
.drawer-kicker {
    margin: 0 0 8px;
    color: #b37b0a;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.welcome {
    width: min(680px, calc(100% - 40px));
    padding: 56px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    background: rgba(16, 20, 24, 0.82);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

.welcome .eyebrow,
.auth-card .eyebrow {
    color: #f5b942;
}

.welcome h1 {
    margin: 0;
    font-size: clamp(2.75rem, 9vw, 5.25rem);
    line-height: 0.95;
}

.welcome > p:last-child {
    max-width: 54ch;
    margin: 24px 0 0;
    color: #cbd5e1;
    font-size: 1.05rem;
    line-height: 1.7;
}

.auth-shell {
    width: min(460px, calc(100% - 40px));
}

.auth-card {
    padding: 42px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    background: #171d23;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

.auth-card h1 {
    margin: 0;
    font-size: 2.25rem;
    line-height: 1.1;
}

.muted {
    color: #94a3b8;
}

.auth-form {
    display: grid;
    gap: 10px;
    margin-top: 28px;
}

.auth-form label {
    margin-top: 8px;
    font-size: 0.88rem;
    font-weight: 700;
}

.auth-form input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #3a4652;
    border-radius: 10px;
    outline: none;
    background: #0f1419;
    color: #fff;
}

.auth-form input:focus {
    border-color: #f5b942;
    box-shadow: 0 0 0 3px rgba(245, 185, 66, 0.16);
}

.auth-form button {
    margin-top: 16px;
    padding: 13px 18px;
    border: 0;
    border-radius: 10px;
    background: #f5b942;
    color: #15191d;
    font-weight: 800;
    cursor: pointer;
}

.form-error {
    margin-top: 20px;
    padding: 12px 14px;
    border: 1px solid #ef4444;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
}

/* Yetkili paneli */
.panel-body {
    display: block;
    min-width: 320px;
    background: #f4f7fb;
    color: #152238;
    color-scheme: light;
}

.fortis-header {
    position: sticky;
    z-index: 20;
    top: 0;
    width: 100%;
    height: 78px;
    border-bottom: 1px solid #e4eaf1;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 30px rgba(21, 34, 56, 0.05);
    backdrop-filter: blur(16px);
}

.fortis-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1240px, calc(100% - 48px));
    height: 100%;
    margin: 0 auto;
}

.brand,
.header-actions,
.user-chip {
    display: flex;
    align-items: center;
}

.brand {
    gap: 12px;
    color: #14213d;
    text-decoration: none;
}

.brand-mark,
.user-avatar,
.drawer-icon,
.quick-icon,
.setup-list li > span {
    display: grid;
    place-items: center;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(145deg, #14213d, #263c68);
    color: #f7bf46;
    font-size: 1.35rem;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(20, 33, 61, 0.2);
}

.brand > span:last-child,
.user-copy,
.drawer-item > span:last-child,
.quick-copy,
.setup-list li div {
    display: grid;
}

.brand strong {
    font-size: 1rem;
    letter-spacing: 0.13em;
}

.brand small,
.user-copy small {
    margin-top: 2px;
    color: #738096;
    font-size: 0.74rem;
}

.header-actions {
    gap: 20px;
}

.user-chip {
    gap: 10px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #edf1f7;
    color: #20365e;
    font-weight: 900;
}

.user-copy strong {
    max-width: 180px;
    overflow: hidden;
    font-size: 0.88rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-toggle,
.drawer-close {
    display: grid;
    border: 0;
    cursor: pointer;
}

.menu-toggle {
    width: 46px;
    height: 46px;
    place-content: center;
    gap: 5px;
    border-radius: 13px;
    background: #14213d;
    box-shadow: 0 8px 18px rgba(20, 33, 61, 0.18);
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
}

.menu-overlay {
    position: fixed;
    z-index: 40;
    inset: 0;
    visibility: hidden;
    background: rgba(11, 20, 35, 0.52);
    opacity: 0;
    transition: opacity 180ms ease, visibility 180ms ease;
}

.menu-drawer {
    position: fixed;
    z-index: 50;
    top: 0;
    right: 0;
    display: flex;
    width: min(390px, 92vw);
    height: 100dvh;
    flex-direction: column;
    background: #fff;
    box-shadow: -24px 0 80px rgba(8, 18, 36, 0.22);
    transform: translateX(104%);
    transition: transform 220ms ease;
}

.menu-is-open {
    overflow: hidden;
}

.menu-is-open .menu-overlay {
    visibility: visible;
    opacity: 1;
}

.menu-is-open .menu-drawer {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 26px 22px;
    border-bottom: 1px solid #e9edf3;
}

.drawer-header strong {
    font-size: 1.35rem;
}

.drawer-close {
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 11px;
    background: #f0f3f7;
    color: #152238;
    font-size: 1.7rem;
    line-height: 1;
}

.drawer-nav {
    display: grid;
    gap: 6px;
    padding: 18px;
    overflow-y: auto;
}

.drawer-item {
    display: grid;
    grid-template-columns: 42px 1fr;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px;
    border: 0;
    border-radius: 13px;
    background: transparent;
    color: #25334a;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.drawer-item:hover,
.drawer-item:focus-visible,
.drawer-item.is-active {
    outline: none;
    background: #f2f5fa;
}

.drawer-icon {
    width: 42px;
    height: 42px;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    background: #fff;
    color: #20365e;
    font-size: 1.05rem;
    font-weight: 900;
}

.drawer-item > span:last-child,
.quick-copy,
.setup-list li div {
    gap: 4px;
}

.drawer-item strong {
    font-size: 0.92rem;
}

.drawer-item small {
    color: #7a8799;
    font-size: 0.76rem;
}

.drawer-footer {
    margin-top: auto;
    padding: 18px;
    border-top: 1px solid #e9edf3;
}

.logout-button {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid #e4e8ee;
    border-radius: 12px;
    background: #fff;
    color: #9f2732;
    font-weight: 800;
    cursor: pointer;
}

.fortis-main {
    width: min(1240px, calc(100% - 48px));
    margin: 0 auto;
    padding: 52px 0 72px;
}

.dashboard-hero,
.section-heading,
.summary-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-hero {
    align-items: flex-end;
    gap: 28px;
    margin-bottom: 44px;
}

.dashboard-hero h1 {
    margin: 0;
    color: #14213d;
    font-size: clamp(2.2rem, 5vw, 4.1rem);
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.dashboard-hero p:last-child,
.section-heading p,
.summary-card > p {
    margin: 12px 0 0;
    color: #6b788b;
    line-height: 1.55;
}

.system-status {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 9px;
    padding: 10px 14px;
    border: 1px solid #dce7df;
    border-radius: 999px;
    background: #f4fbf6;
    color: #2b6a3e;
    font-size: 0.82rem;
    font-weight: 800;
}

.system-status span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #39a45a;
    box-shadow: 0 0 0 4px rgba(57, 164, 90, 0.12);
}

.section-heading {
    gap: 20px;
}

.section-heading h2,
.setup-card h2,
.summary-card h2 {
    margin: 0;
    color: #17243b;
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    letter-spacing: -0.025em;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    margin-top: 22px;
}

.quick-card {
    display: grid;
    grid-column: span 2;
    grid-template-columns: 50px 1fr auto;
    align-items: center;
    gap: 15px;
    min-height: 126px;
    padding: 20px;
    border: 1px solid #e2e7ee;
    border-radius: 18px;
    background: #fff;
    color: #152238;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 10px 34px rgba(28, 43, 68, 0.06);
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.quick-card:nth-child(4),
.quick-card:nth-child(5) {
    grid-column: span 3;
}

.quick-card:hover,
.quick-card:focus-visible {
    outline: none;
    border-color: #c9d3e1;
    box-shadow: 0 18px 42px rgba(28, 43, 68, 0.12);
    transform: translateY(-3px);
}

.quick-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: #eef3fb;
    color: #264b83;
    font-size: 1.25rem;
    font-weight: 900;
}

.card-banner .quick-icon { background: #fff2dc; color: #a76100; }
.card-policy .quick-icon { background: #eaf1ff; color: #325caa; }
.card-price .quick-icon { background: #e9f8ef; color: #217145; }
.card-customer .quick-icon { background: #f2ecff; color: #6c45a5; }
.card-money .quick-icon { background: #e8f7f7; color: #217274; }

.quick-copy strong {
    font-size: 0.98rem;
}

.quick-copy small {
    color: #728095;
    font-size: 0.8rem;
    line-height: 1.45;
}

.quick-arrow {
    color: #96a2b4;
    font-size: 1.35rem;
}

.dashboard-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.8fr);
    gap: 18px;
    margin-top: 46px;
}

.setup-card,
.summary-card {
    padding: 28px;
    border: 1px solid #e1e7ee;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 34px rgba(28, 43, 68, 0.05);
}

.section-heading.compact {
    align-items: flex-end;
}

.progress-label {
    color: #6c7889;
    font-size: 0.78rem;
    font-weight: 800;
}

.progress-track {
    height: 7px;
    margin: 22px 0 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e9edf2;
}

.progress-track span {
    display: block;
    width: 0;
    height: 100%;
    background: #d99a1f;
}

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

.setup-list li {
    display: grid;
    grid-template-columns: 36px 1fr;
    align-items: center;
    gap: 13px;
    padding: 15px 0;
    border-bottom: 1px solid #edf0f4;
}

.setup-list li:last-child {
    border-bottom: 0;
}

.setup-list li > span {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f0f3f7;
    color: #536176;
    font-size: 0.82rem;
    font-weight: 900;
}

.setup-list strong {
    font-size: 0.9rem;
}

.setup-list small {
    color: #778397;
    line-height: 1.45;
}

.summary-card {
    background: linear-gradient(145deg, #14213d, #20365e);
    color: #fff;
}

.summary-card .section-kicker {
    color: #f7bf46;
}

.summary-card h2 {
    color: #fff;
}

.summary-card > p {
    color: #bec9db;
}

.summary-list {
    display: grid;
    margin: 26px 0 0;
}

.summary-list div {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}

.summary-list div:last-child {
    border-bottom: 0;
}

.summary-list dt {
    color: #c8d1e0;
    font-size: 0.82rem;
}

.summary-list dd {
    margin: 0;
    color: #fff;
    font-weight: 900;
}

.panel-toast {
    position: fixed;
    z-index: 70;
    right: 24px;
    bottom: 24px;
    max-width: min(390px, calc(100% - 48px));
    padding: 14px 18px;
    border-radius: 12px;
    background: #14213d;
    color: #fff;
    font-size: 0.86rem;
    font-weight: 700;
    box-shadow: 0 16px 42px rgba(20, 33, 61, 0.28);
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
}

.panel-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    .quick-card,
    .quick-card:nth-child(4),
    .quick-card:nth-child(5) {
        grid-column: span 3;
    }

    .quick-card:last-child {
        grid-column: 1 / -1;
    }

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

@media (max-width: 620px) {
    .welcome {
        padding: 36px 28px;
    }

    .auth-card {
        padding: 32px 24px;
    }

    .fortis-header {
        height: 70px;
    }

    .fortis-header-inner {
        width: calc(100% - 32px);
    }

    .brand small,
    .user-chip {
        display: none;
    }

    .header-actions {
        gap: 0;
    }

    .fortis-main {
        width: min(100% - 28px, 1240px);
        padding: 34px 0 56px;
    }

    .dashboard-hero,
    .section-heading.compact {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-hero {
        margin-bottom: 34px;
    }

    .dashboard-hero h1 {
        font-size: 2.35rem;
    }

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

    .quick-card,
    .quick-card:nth-child(4),
    .quick-card:nth-child(5),
    .quick-card:last-child {
        grid-column: 1;
    }

    .setup-card,
    .summary-card {
        padding: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .menu-overlay,
    .menu-drawer,
    .quick-card,
    .panel-toast {
        transition: none;
    }
}

/* Poliçe ve hizmet yönetimi */
.management-page {
    padding-top: 42px;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
}

.page-heading h1 {
    margin: 0;
    color: #14213d;
    font-size: clamp(2.1rem, 4vw, 3.5rem);
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.page-heading > div > p:last-child {
    max-width: 680px;
    margin: 12px 0 0;
    color: #68768a;
    line-height: 1.55;
}

.primary-action,
.secondary-action,
.danger-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 12px;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
}

.primary-action {
    border: 0;
    background: #14213d;
    color: #fff;
    box-shadow: 0 8px 20px rgba(20, 33, 61, 0.18);
}

.secondary-action {
    border: 1px solid #dce2ea;
    background: #fff;
    color: #253653;
}

.danger-action {
    border: 1px solid #efc9c9;
    background: #fff7f7;
    color: #a33838;
}

.danger-action:hover,
.danger-action:focus-visible {
    border-color: #dca6a6;
    background: #fff0f0;
    outline: none;
}

.policy-editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(350px, 0.65fr);
    align-items: start;
    gap: 24px;
}

.editor-card,
.service-list-card,
.records-section {
    padding: 30px;
    border: 1px solid #e0e6ed;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 38px rgba(27, 43, 69, 0.06);
}

.editor-card-heading {
    display: grid;
    grid-template-columns: 42px 1fr;
    align-items: center;
    gap: 13px;
    margin-bottom: 28px;
    padding-bottom: 22px;
    border-bottom: 1px solid #edf0f4;
}

.step-number {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    background: #eef3fb;
    color: #254c84;
    font-weight: 900;
}

.editor-card-heading h2,
.preview-heading h2,
.service-list-card h2,
.records-section h2 {
    margin: 0;
    color: #17243b;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}

.editor-card-heading p {
    margin: 6px 0 0;
    color: #788599;
    font-size: 0.84rem;
}

.field-group {
    display: grid;
    gap: 8px;
    margin-top: 22px;
}

.field-group > label,
.field-heading-row label {
    color: #24344f;
    font-size: 0.88rem;
    font-weight: 850;
}

.field-group > small,
.field-heading-row small {
    color: #7a8798;
    font-size: 0.76rem;
    line-height: 1.45;
}

.form-control {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #d8e0e9;
    border-radius: 11px;
    outline: none;
    background: #fff;
    color: #17243b;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.form-control:focus {
    border-color: #6682ab;
    box-shadow: 0 0 0 4px rgba(77, 109, 157, 0.12);
}

.field-error {
    color: #b42332 !important;
    font-weight: 750;
}

.form-alert {
    padding: 12px 14px;
    border: 1px solid #f0c6ca;
    border-radius: 10px;
    background: #fff3f4;
    color: #a02734;
}

.status-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 22px;
    padding: 16px 18px;
    border: 1px solid #e2e7ed;
    border-radius: 12px;
    background: #f8fafc;
}

.status-field > div {
    display: grid;
    gap: 4px;
}

.status-field strong {
    font-size: 0.88rem;
}

.status-field small {
    color: #788599;
    font-size: 0.76rem;
}

.switch-control {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
}

.switch-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.switch-track {
    display: flex;
    align-items: center;
    width: 44px;
    height: 24px;
    padding: 3px;
    border-radius: 999px;
    background: #aeb7c4;
    transition: background 150ms ease;
}

.switch-track span {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.22);
    transition: transform 150ms ease;
}

.switch-input:checked + .switch-track {
    background: #2f9654;
}

.switch-input:checked + .switch-track span {
    transform: translateX(20px);
}

.switch-input:focus-visible + .switch-track {
    outline: 3px solid rgba(62, 101, 158, 0.24);
}

.switch-label {
    min-width: 34px;
    color: #34445d;
    font-size: 0.78rem;
    font-weight: 800;
}

.price-vat-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: end;
    gap: 16px;
}

.currency-field {
    position: relative;
}

.currency-field > span {
    position: absolute;
    top: 50%;
    left: 14px;
    color: #68788e;
    font-weight: 850;
    transform: translateY(-50%);
}

.currency-field .form-control {
    padding-left: 34px;
}

.vat-summary {
    display: grid;
    gap: 5px;
    min-height: 91px;
    padding: 15px 18px;
    border-radius: 12px;
    background: #eef7f1;
    color: #557064;
}

.vat-summary > span {
    font-size: 0.76rem;
    font-weight: 800;
}

.vat-summary strong {
    color: #21653c;
    font-size: 1.35rem;
}

.vat-summary small {
    color: #658371;
    font-size: 0.72rem;
    line-height: 1.4;
}

.field-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.field-heading-row > div {
    display: grid;
    gap: 5px;
}

.field-heading-row a,
.service-heading-actions button {
    flex: 0 0 auto;
    color: #2e5d9e;
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
}

.service-heading-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.service-heading-actions button {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.service-search {
    position: relative;
    margin-top: 14px;
}

.service-search span {
    position: absolute;
    top: 50%;
    left: 14px;
    color: #718096;
    transform: translateY(-50%);
}

.service-search input {
    width: 100%;
    height: 44px;
    padding: 0 14px 0 40px;
    border: 1px solid #d8e0e9;
    border-radius: 11px;
    outline: none;
    background: #f8fafc;
    color: #1b2a42;
}

.service-search input:focus {
    border-color: #6682ab;
    box-shadow: 0 0 0 4px rgba(77, 109, 157, 0.1);
}

.checkbox-list > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.checkbox-list label {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    color: #33435c;
    font-size: 0.82rem;
    cursor: pointer;
}

.checkbox-list input {
    width: 17px;
    height: 17px;
    accent-color: #2e7c4a;
}

.service-search-empty {
    margin-top: 10px;
    padding: 14px;
    border-radius: 10px;
    background: #f7f9fc;
    color: #748196;
    font-size: 0.78rem;
    text-align: center;
}

.service-dialog {
    width: min(520px, calc(100% - 32px));
    padding: 0;
    border: 0;
    border-radius: 20px;
    background: #fff;
    color: #192942;
    box-shadow: 0 30px 80px rgba(13, 25, 45, 0.28);
}

.service-dialog::backdrop {
    background: rgba(13, 24, 42, 0.55);
    backdrop-filter: blur(3px);
}

.service-dialog form {
    display: grid;
    gap: 18px;
    padding: 28px;
}

.dialog-heading,
.dialog-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.dialog-heading h2 {
    margin: 3px 0 0;
}

.dialog-heading > button {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    background: #f0f3f7;
    color: #40516a;
    font-size: 1.45rem;
    cursor: pointer;
}

.dialog-copy {
    margin: -6px 0 0;
    color: #718096;
    font-size: 0.82rem;
}

.dialog-errors {
    padding: 11px 13px;
    border: 1px solid #efc5ca;
    border-radius: 10px;
    background: #fff3f4;
    color: #a02734;
    font-size: 0.78rem;
    font-weight: 750;
}

.dialog-actions {
    justify-content: flex-end;
    padding-top: 6px;
}

.empty-selection,
.records-empty {
    display: grid;
    gap: 7px;
    padding: 18px;
    border: 1px dashed #cfd8e3;
    border-radius: 12px;
    background: #f8fafc;
    color: #66758a;
    font-size: 0.82rem;
}

.empty-selection strong {
    color: #293a55;
}

.empty-selection a {
    width: fit-content;
    margin-top: 4px;
    color: #2e5d9e;
    font-weight: 800;
    text-decoration: none;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid #edf0f4;
}

.form-actions > span {
    color: #7d899a;
    font-size: 0.75rem;
}

.preview-column {
    position: sticky;
    top: 102px;
}

.preview-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.preview-heading > span {
    padding: 7px 10px;
    border-radius: 999px;
    background: #e8f6ed;
    color: #287346;
    font-size: 0.72rem;
    font-weight: 850;
}

.preview-heading > span.is-passive {
    background: #eff1f4;
    color: #697487;
}

.customer-policy-card {
    overflow: hidden;
    border: 1px solid #dbe2eb;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 22px 58px rgba(25, 42, 69, 0.14);
}

.customer-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px;
    background: #14213d;
    color: #fff;
}

.customer-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    letter-spacing: 0.12em;
}

.customer-brand span {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 9px;
    background: #f7bf46;
    color: #14213d;
    font-weight: 950;
}

.customer-card-header small {
    color: #c7d1e1;
    font-size: 0.68rem;
}

.customer-card-body {
    padding: 26px 24px 24px;
}

.customer-card-kicker {
    margin: 0 0 8px;
    color: #9a6a0a;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.13em;
}

.customer-card-body h3 {
    margin: 0;
    color: #16243b;
    font-size: clamp(1.55rem, 3vw, 2.1rem);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.customer-price {
    display: grid;
    gap: 3px;
    margin: 22px 0 24px;
}

.customer-price strong {
    color: #14213d;
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1;
}

.customer-price span {
    color: #758298;
    font-size: 0.75rem;
}

.included-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 -24px;
    padding: 10px 24px;
    background: #35a052;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 900;
}

.included-title small {
    color: #e9f8ed;
    font-size: 0.66rem;
    font-weight: 750;
}

.customer-service-list {
    display: grid;
    gap: 13px;
    min-height: 172px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.customer-service-list li {
    display: grid;
    grid-template-columns: 20px 24px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    color: #35445b;
    font-size: 0.84rem;
    line-height: 1.4;
}

.preview-drag-handle {
    padding: 4px 2px;
    border: 0;
    background: transparent;
    color: #9aa6b6;
    font-size: 0.95rem;
    line-height: 1;
    cursor: grab;
}

.preview-drag-handle:active {
    cursor: grabbing;
}

.preview-service-check,
.preview-placeholder > span {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border: 2px solid #9eabbc;
    border-radius: 50%;
    color: #4a596d;
    font-size: 0.7rem;
    font-weight: 950;
}

.preview-service-name {
    min-width: 0;
}

.customer-service-list li.is-dragging {
    border-radius: 9px;
    background: #f1f5f9;
    opacity: 0.55;
}

.customer-service-list .preview-placeholder {
    grid-template-columns: 24px 1fr;
    color: #8994a4;
}

.customer-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: #f1f4f8;
    color: #253653;
    font-size: 0.8rem;
    font-weight: 850;
}

.preview-note {
    margin: 14px 8px 0;
    color: #7d899a;
    font-size: 0.74rem;
    line-height: 1.5;
}

.records-section {
    margin-top: 26px;
}

.records-section .section-heading > span,
.service-list-card .section-heading > span {
    color: #758196;
    font-size: 0.78rem;
    font-weight: 800;
}

.record-list,
.service-records {
    display: grid;
    margin-top: 20px;
}

.record-row {
    display: grid;
    grid-template-columns: 12px minmax(200px, 1fr) 160px 100px;
    align-items: center;
    gap: 14px;
    padding: 16px 10px;
    border-top: 1px solid #edf0f4;
    color: #26364f;
    text-decoration: none;
}

.record-status {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #aab3bf;
}

.record-status.is-active {
    background: #31a256;
    box-shadow: 0 0 0 4px rgba(49, 162, 86, 0.12);
}

.record-main,
.record-row > span:nth-child(3) {
    display: grid;
    gap: 4px;
}

.record-row small {
    color: #7c899b;
    font-size: 0.74rem;
}

.record-edit {
    justify-self: end;
    color: #2e5d9e;
    font-size: 0.8rem;
    font-weight: 850;
}

.service-management-layout {
    display: grid;
    grid-template-columns: minmax(340px, 0.72fr) minmax(0, 1.28fr);
    align-items: start;
    gap: 24px;
}

.compact-editor {
    position: sticky;
    top: 102px;
}

.narrow-field .form-control {
    max-width: 150px;
}

.service-record {
    display: grid;
    grid-template-columns: 26px 40px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 13px;
    padding: 15px 6px;
    border-top: 1px solid #edf0f4;
    color: #293a54;
    text-decoration: none;
    transition: opacity 140ms ease, background 140ms ease, transform 140ms ease;
}

.service-record.is-dragging {
    border-radius: 12px;
    background: #f2f6fb;
    opacity: 0.55;
    transform: scale(0.99);
}

.service-drag-handle {
    padding: 8px 5px;
    border: 0;
    background: transparent;
    color: #8a96a7;
    font-size: 1.1rem;
    line-height: 1;
    cursor: grab;
}

.service-drag-handle:active {
    cursor: grabbing;
}

.service-check {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 10px;
    background: #edf7f0;
    color: #28804a;
    font-weight: 950;
}

.service-record > span:nth-child(3) {
    display: grid;
    gap: 4px;
}

.service-edit {
    color: #2e5d9e;
    font-size: 0.76rem;
    font-weight: 850;
    text-decoration: none;
}

.order-help {
    margin: 5px 0 0;
    color: #7b8798;
    font-size: 0.76rem;
}

.order-status {
    min-height: 20px;
    margin: 12px 0 0;
    color: #287346;
    font-size: 0.76rem;
    font-weight: 800;
    text-align: right;
}

.order-status.is-error {
    color: #a33838;
}

.service-record small {
    color: #7b8798;
    font-size: 0.75rem;
}

.service-state {
    padding: 6px 9px;
    border-radius: 999px;
    background: #eff1f4;
    color: #727d8d;
    font-size: 0.7rem;
    font-weight: 850;
}

.service-state.is-active {
    background: #e8f6ed;
    color: #287346;
}

.message-stack {
    position: fixed;
    z-index: 35;
    top: 94px;
    right: 24px;
}

.message-card {
    padding: 13px 17px;
    border: 1px solid #cfe4d5;
    border-radius: 12px;
    background: #effaf2;
    color: #22673d;
    font-size: 0.82rem;
    font-weight: 800;
    box-shadow: 0 12px 32px rgba(26, 58, 39, 0.12);
}

.message-card.warning {
    border-color: #f0d9a8;
    background: #fff8e9;
    color: #815612;
    box-shadow: 0 12px 32px rgba(92, 64, 18, 0.12);
}

@media (max-width: 980px) {
    .policy-editor-layout,
    .service-management-layout {
        grid-template-columns: 1fr;
    }

    .preview-column,
    .compact-editor {
        position: static;
    }

    .preview-column {
        width: min(100%, 520px);
        margin: 0 auto;
    }
}

@media (max-width: 680px) {
    .page-heading,
    .form-actions,
    .field-heading-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .editor-card,
    .service-list-card,
    .records-section {
        padding: 22px;
    }

    .price-vat-layout,
    .checkbox-list > div {
        grid-template-columns: 1fr;
    }

    .record-row {
        grid-template-columns: 12px 1fr auto;
    }

    .record-row > span:nth-child(3) {
        display: none;
    }

    .record-edit {
        font-size: 0;
    }

    .record-edit::after {
        content: "→";
        font-size: 1rem;
    }

    .status-field {
        align-items: flex-start;
        flex-direction: column;
    }

    .service-record {
        grid-template-columns: 26px 36px minmax(0, 1fr) auto;
    }

    .service-state {
        display: none;
    }
}
