:root {
    --app-font-size: 15px;
    --app-text: #172033;
    --app-muted: #667085;
    --app-border: #d9e2ec;
    --app-surface: #ffffff;
    --app-bg: #f4f7fb;
    --app-header: #102a43;
    --app-header-bg: #f7fbff;
    --app-accent: #0f766e;
    --app-button-text: #ffffff;
    --app-sidebar-bg: #0b1f33;
    --app-sidebar-text: #eef6ff;
    --app-footer-bg: #ffffff;
    --app-footer-text: #667085;
    --app-danger: #b42318;
    --app-warning: #b54708;
    --shadow: 0 16px 40px rgba(16, 42, 67, 0.08);
    font-size: var(--app-font-size);
}

.is-permission-hidden,
[hidden].is-permission-hidden {
    display: none !important;
}

.finance-page {
    display: grid;
    gap: 18px;
}

.finance-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.finance-list-panel,
.finance-detail-panel {
    display: grid;
    gap: 16px;
}

.contracts-new-modal {
    position: relative;
    width: min(640px, calc(100% - 28px));
    padding: 22px;
}

.contracts-new-modal h2,
.contracts-new-modal p {
    margin-top: 0;
}

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

.contracts-new-grid a {
    display: grid;
    place-items: center;
    min-height: 74px;
    padding: 12px;
    color: #173f6f;
    background: #f7faff;
    border: 1px solid #d7e3f2;
    border-radius: 10px;
    font-weight: 900;
    text-align: center;
    text-decoration: none;
}

.contracts-new-grid a:hover {
    background: #edf5ff;
    border-color: #9db8d8;
}

.finance-table tbody tr {
    cursor: pointer;
}

.finance-table th,
.finance-table td {
    text-align: center;
}

.finance-sort-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.finance-sort-link small {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    color: #667085;
    background: #eef2f6;
    font-size: 0.66rem;
    line-height: 1;
}

.finance-sort-link.is-active {
    color: #10233d;
}

.finance-sort-link.is-active small {
    color: #ffffff;
    background: #9db7ea;
}

.finance-table tbody tr.is-selected {
    background: #f4efe8;
}

.finance-status-pill.is-paid {
    color: #15803d;
    background: #ecfdf3;
    border: 1px solid rgba(21, 128, 61, 0.16);
}

.finance-status-pill.is-unpaid {
    color: #2864e6;
    background: #eaf1ff;
}

.finance-status-pill.is-overdue {
    color: #b42318;
    background: #fef3f2;
    border: 1px solid rgba(180, 35, 24, 0.16);
}

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

.finance-receipt-form.is-locked input,
.finance-receipt-form.is-locked select,
.finance-receipt-form.is-locked textarea {
    color: #667085;
    background: #f8fafc;
    cursor: not-allowed;
}

.finance-locked-note {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 8px;
    color: #15803d;
    background: #ecfdf3;
    font-weight: 900;
}

.finance-receipt-backdrop {
    z-index: 40;
}

.finance-receipt-modal {
    position: relative;
    width: min(1080px, calc(100vw - 36px));
    padding: 18px;
}

.finance-modal-close {
    position: absolute;
    inset-block-start: 12px;
    inset-inline-end: 12px;
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #d9e2ec;
    color: #344054;
    background: #ffffff;
    text-decoration: none;
    font-size: 1.35rem;
    line-height: 1;
    z-index: 2;
}

.finance-receipt-modal > h2 {
    margin: 0 0 12px;
    padding-inline-end: 44px;
    color: #172033;
}

.finance-receipt-paper {
    position: relative;
    display: grid;
    gap: 18px;
    padding: 24px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(255, 255, 255, 0.98)),
        #ffffff;
}

.finance-receipt-paper::before {
    content: "";
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(177, 143, 102, 0.22);
    border-radius: 6px;
    pointer-events: none;
}

.finance-receipt-head {
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    padding: 0 0 16px;
    border: 0;
    border-bottom: 2px solid #e6eaf0;
    background: transparent;
    border-radius: 0;
}

.finance-receipt-title {
    display: grid;
    gap: 3px;
}

.finance-receipt-title span {
    color: #b18f66;
    font-weight: 900;
    font-size: 1.8rem;
}

.finance-receipt-title strong {
    color: #667085;
    font-size: 0.92rem;
}

.finance-number-input {
    margin-top: 6px;
    max-width: 220px;
}

.finance-receipt-number {
    display: grid;
    gap: 4px;
    color: #667085;
    font-weight: 800;
}

.finance-stamp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 116px;
    min-height: 42px;
    padding: 8px 14px;
    border: 2px solid #b8c2d0;
    border-radius: 6px;
    color: #667085;
    font-weight: 800;
    transform: rotate(-4deg);
}

.finance-stamp.is-paid {
    border-color: #15803d;
    color: #15803d;
    background: #f0fdf4;
}

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

.finance-receipt-section {
    position: relative;
    display: grid;
    gap: 12px;
}

.finance-receipt-section h3 {
    margin: 0;
    color: #172033;
    font-size: 1rem;
    font-weight: 900;
}

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

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

.finance-installment-row {
    grid-template-columns: 2fr 1fr 1fr;
}

.finance-receipt-grid label {
    display: grid;
    gap: 5px;
    color: #667085;
    font-size: 0.82rem;
    font-weight: 800;
}

.finance-receipt-grid input,
.finance-receipt-grid select,
.finance-receipt-grid textarea,
.finance-number-input {
    width: 100%;
    border: 0;
    border-bottom: 1px solid #cfd8e3;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.72);
    color: #172033;
    font-weight: 800;
    box-shadow: none;
}

.finance-receipt-grid input:focus,
.finance-receipt-grid select:focus,
.finance-receipt-grid textarea:focus,
.finance-number-input:focus {
    outline: 0;
    border-color: #b18f66;
    box-shadow: 0 2px 0 rgba(177, 143, 102, 0.18);
}

.finance-field-wide {
    grid-column: span 2;
}

.finance-receipt-section--payment {
    padding: 14px;
    border: 1px solid #e6eaf0;
    border-radius: 8px;
    background: #fbfcfe;
}

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

.finance-amount-box {
    align-content: center;
    padding: 12px;
    border: 1px solid rgba(177, 143, 102, 0.28);
    border-radius: 8px;
    background: #fffaf3;
}

.finance-amount-box input {
    border: 0;
    background: transparent;
    font-size: 1.35rem;
    color: #10233d;
}

.finance-amount-box small {
    color: #b18f66;
    font-weight: 900;
}

.finance-payment-receipt-card {
    display: grid;
    gap: 5px;
    min-height: 92px;
    padding: 10px;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    background: #ffffff;
    color: #667085;
    font-size: 0.82rem;
    font-weight: 800;
}

.finance-payment-receipt-card.has-file {
    border-color: rgba(21, 128, 61, 0.22);
    background: #fbfffc;
}

.finance-payment-receipt-card__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 8px;
    align-items: center;
}

.finance-payment-receipt-card__body strong,
.finance-payment-receipt-card__body small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.finance-payment-receipt-card__body strong {
    color: #172033;
    font-size: 0.85rem;
}

.finance-payment-receipt-card__body small {
    color: #667085;
    font-size: 0.72rem;
}

.finance-payment-receipt-card__actions {
    grid-row: span 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.finance-receipt-icon-button {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border: 1px solid #d9e2ec;
    border-radius: 6px;
    color: #344054;
    background: #f8fafc;
    cursor: pointer;
    text-decoration: none;
}

.finance-receipt-icon-button input {
    display: none;
}

.finance-receipt-icon-button svg {
    width: 14px;
    height: 14px;
}

.finance-receipt-icon-button.is-disabled {
    opacity: 0.42;
    pointer-events: none;
}

.finance-notes-field {
    grid-column: 1 / -1;
}

.finance-form-actions {
    justify-content: flex-start;
}

.finance-related {
    display: grid;
    gap: 10px;
    border-top: 1px solid #e6eaf0;
    padding-top: 14px;
}

.finance-related h3 {
    margin: 0;
    color: #172033;
    font-size: 1rem;
}

.finance-related-list {
    display: grid;
    gap: 8px;
}

.finance-related-list a {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #e6eaf0;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    background: #fff;
}

.permit-payment-summary .permit-payment-installment__head {
    align-items: center;
}

.permit-payment-summary__status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f2f4f7;
    color: #475467;
    font-weight: 800;
}

.permit-payment-summary.is-paid .permit-payment-summary__status {
    background: #ecfdf3;
    color: #15803d;
}

@media (max-width: 1100px) {
    .finance-layout,
    .finance-form-grid,
    .finance-receipt-grid,
    .finance-receipt-grid--payment {
        grid-template-columns: 1fr;
    }

    .finance-related-list a,
    .finance-field-wide {
        grid-template-columns: 1fr;
        grid-column: auto;
    }

    .finance-receipt-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .finance-receipt-paper {
        padding: 18px;
    }
}

@font-face {
    font-family: "Tajawal";
    src: url("../fonts/Tajawal-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0600-06FF,U+0750-077F,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF;
}

@font-face {
    font-family: "Tajawal";
    src: url("../fonts/Tajawal-Latin-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
    font-family: "Tajawal";
    src: url("../fonts/Tajawal-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0600-06FF,U+0750-077F,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF;
}

@font-face {
    font-family: "Tajawal";
    src: url("../fonts/Tajawal-Latin-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    direction: rtl;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    color: var(--app-text);
    background: var(--app-bg);
    font-family: "Tajawal", Tahoma, Arial, sans-serif;
    line-height: 1.65;
    overflow-x: hidden;
}

img,
svg,
video,
canvas,
table,
input,
select,
textarea,
button {
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

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

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

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 20px;
    background:
        linear-gradient(155deg, rgba(177, 143, 102, 0.18), transparent 34%),
        linear-gradient(25deg, rgba(218, 223, 229, 0.14), transparent 44%),
        var(--app-sidebar-bg);
    color: var(--app-sidebar-text);
    overflow-y: auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 10px 8px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.brand > span:last-child {
    display: grid;
    align-content: center;
    gap: 2px;
    min-height: 44px;
    min-width: 0;
}

.brand__mark {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 36px;
    flex: 0 0 44px;
    color: var(--app-sidebar-text);
    background: transparent;
    font-weight: 700;
    overflow: visible;
}

.brand__mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.brand strong,
.brand small,
.nav-link span,
.table-wrap td,
.table-wrap th,
.stat-card strong,
.work-item strong {
    overflow-wrap: anywhere;
}

.brand small {
    display: block;
    color: #b7c8d9;
    font-size: 0.82rem;
    line-height: 1.35;
}

.nav-list {
    display: grid;
    gap: 11px;
    padding-top: 18px;
}

.nav-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(224, 226, 229, 0.16);
    border-radius: 7px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.025)),
        rgba(255, 255, 255, 0.045);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 10px 24px rgba(0, 0, 0, 0.08);
    transition:
        border-color 180ms ease,
        background 180ms ease,
        box-shadow 180ms ease;
}

.nav-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background:
        radial-gradient(circle at 88% 50%, rgba(218, 190, 132, 0.26), transparent 42%),
        linear-gradient(90deg, rgba(210, 214, 219, 0.16), rgba(177, 143, 102, 0.18));
    transition: opacity 180ms ease;
}

.nav-card:hover::before {
    opacity: 1;
}

.nav-card.is-open {
    border-color: rgba(177, 143, 102, 0.55);
    background:
        linear-gradient(145deg, rgba(177, 143, 102, 0.20), rgba(206, 212, 219, 0.13)),
        rgba(255, 255, 255, 0.07);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.14);
}

.nav-link {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 0;
    width: 100%;
    min-height: 52px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    color: rgba(244, 247, 251, 0.84);
    background: transparent;
    font: inherit;
    text-align: start;
    cursor: pointer;
    transition:
        color 180ms ease,
        transform 180ms ease,
        background 180ms ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #ffffff;
}

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

.nav-link.is-active {
    background: linear-gradient(90deg, rgba(177, 143, 102, 0.28), rgba(218, 223, 229, 0.10));
}

.nav-card.is-open > .nav-link--toggle {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(177, 143, 102, 0.34), rgba(218, 223, 229, 0.12));
}

.nav-card.is-open .nav-link__icon {
    color: #fff8eb;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(240, 225, 197, 0.34);
}

.nav-link__icon svg {
    width: 22px;
    height: 22px;
}

.nav-link--child {
    display: flex;
    min-height: 38px;
    margin: 0;
    padding: 8px 16px;
    color: rgba(238, 246, 255, 0.76);
    font-size: 0.88rem;
    border-radius: 7px;
}

.nav-link--child::before {
    content: "";
    width: 6px;
    height: 6px;
    margin-inline-end: 2px;
    border-radius: 999px;
    background: rgba(177, 143, 102, 0.72);
}

.nav-link--child.is-active {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(177, 143, 102, 0.34), rgba(218, 223, 229, 0.12));
}

.nav-link__icon {
    display: inline-grid;
    place-items: center;
    grid-column: 1;
    width: 44px;
    height: 100%;
    min-height: 52px;
    flex: 0 0 44px;
    color: #f1d6a6;
    background: rgba(255, 255, 255, 0.035);
    border-inline-start: 1px solid rgba(224, 226, 229, 0.18);
    border-radius: 0;
    font-weight: 700;
}

.nav-link > span:not(.nav-link__icon):not(.nav-link__chevron) {
    grid-column: 2;
    justify-self: center;
    align-self: center;
    padding-inline: 12px;
    color: inherit;
    font-size: 0.95rem;
    font-weight: 800;
    text-align: center;
}

.nav-link__chevron {
    grid-column: 3;
    justify-self: center;
    align-self: center;
    margin-inline-start: 0;
    color: rgba(238, 246, 255, 0.58);
    transition: transform 180ms ease;
}

.nav-card.is-open .nav-link__chevron {
    transform: rotate(180deg);
}

.nav-sublist {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 5px;
    max-height: 0;
    padding: 0 10px;
    overflow: hidden;
    transition:
        max-height 220ms ease,
        padding 220ms ease;
}

.nav-card.is-open .nav-sublist {
    max-height: 640px;
    padding: 0 10px 10px;
}

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

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 96px;
    padding: 22px 28px;
    color: var(--app-header);
    background: var(--app-header-bg);
    border-bottom: 1px solid var(--app-border);
}

.topbar__title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.topbar__title > span:last-child {
    display: grid;
    align-content: center;
    gap: 2px;
    min-height: 48px;
    min-width: 0;
}

.topbar__logo {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 40px;
    flex: 0 0 48px;
    overflow: visible;
    color: var(--app-header);
    background: transparent;
    font-weight: 700;
}

.topbar__logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.topbar h1 {
    margin: 0;
    font-size: 1.65rem;
    line-height: 1.22;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--app-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.content-region {
    width: 100%;
    margin-inline: auto;
    padding: 24px;
}

.content-region--wide {
    width: 100%;
    max-width: none;
}

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

.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: 1 / -1; }

.panel,
.stat-card,
.modal {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.panel {
    padding: 18px;
}

.clients-panel {
    width: 100%;
}

.panel h2,
.panel h3 {
    margin: 0 0 12px;
    font-size: 1.05rem;
}

.stat-card {
    padding: 16px;
}

.stat-card span {
    display: block;
    color: var(--app-muted);
    font-size: 0.84rem;
}

.stat-card strong {
    display: block;
    margin-top: 8px;
    font-size: 1.7rem;
    line-height: 1.2;
}

.button,
.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    border: 0;
    border-radius: 8px;
    color: var(--app-button-text);
    background: var(--app-accent);
    cursor: pointer;
}

.button {
    padding: 8px 14px;
    font-weight: 700;
}

.icon-button {
    width: 40px;
    padding: 0;
    font-size: 1.2rem;
}

.icon-button__svg {
    width: 22px;
    height: 22px;
    display: block;
}

.button.secondary,
.icon-button.secondary {
    color: var(--app-text);
    background: #edf2f7;
}

.button.danger,
.icon-button.danger {
    background: var(--app-danger);
}

.app-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding: 16px 28px;
    color: var(--app-footer-text);
    background: var(--app-footer-bg);
    border-top: 1px solid var(--app-border);
    font-size: 0.9rem;
}

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

.search-field {
    width: min(360px, 100%);
}

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

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

.workflow-page {
    display: grid;
    gap: 16px;
}

.workflow-stages-panel {
    padding: 22px 8%;
    overflow: hidden;
}

.permit-linked-contract {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px;
    color: #344054;
    background: #eef6ff;
    border: 1px solid #cfe1f5;
    border-radius: 8px;
    font-weight: 900;
}

.permit-linked-contract a {
    color: #175cd3;
    text-decoration: none;
}

.workflow-stages {
    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--workflow-stages-count, 4), minmax(110px, 1fr));
    align-items: start;
    gap: 0;
    min-height: 76px;
    direction: rtl;
}

.workflow-stage {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 8px;
    min-width: 0;
    min-height: 76px;
    padding: 0 8px;
    color: #8d98a8;
    background: transparent;
    border: 0;
    border-radius: 0;
    text-align: center;
}

.workflow-stage::before,
.workflow-stage::after {
    content: "";
    position: absolute;
    top: 17px;
    height: 3px;
    background: #d8e0ea;
    transform: translateY(-50%);
    z-index: -1;
}

.workflow-stage::before {
    inset-inline-start: 0;
    inset-inline-end: calc(50% + 18px);
}

.workflow-stage::after {
    inset-inline-start: calc(50% + 18px);
    inset-inline-end: 0;
}

.workflow-stage:first-child::before {
    inset-inline-start: 50%;
}

.workflow-stage:last-child::after {
    inset-inline-end: 50%;
}

.workflow-stage span {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #ffffff;
    background: #97a2b2;
    border: 3px solid #97a2b2;
    border-radius: 50%;
    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 0 0 5px var(--app-surface);
}

.workflow-stage strong {
    min-width: 0;
    color: var(--app-text);
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.25;
}

.workflow-stage small {
    display: block;
    min-width: 0;
    color: #8d98a8;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.25;
}

.workflow-stage.is-current {
    color: #2fbf75;
}

.workflow-stage.is-current span {
    color: #2aa866;
    background: #ffffff;
    border-color: #48c184;
    box-shadow: 0 0 0 5px var(--app-surface);
}

.workflow-stage.is-current.is-skippable {
    color: #2aa866;
}

.workflow-stage.is-current.is-skippable span {
    color: #667085;
    background: #f2f4f7;
    border-color: #48c184;
}

.workflow-stage.is-done span {
    color: #ffffff;
    background: #45b978;
    border-color: #45b978;
    box-shadow: 0 0 0 5px var(--app-surface);
}

.workflow-stage.is-done.is-skipped span {
    color: #ffffff;
    background: #d92d20;
    border-color: #d92d20;
}

.workflow-stage.is-payment-alert span,
.workflow-stage.is-current.is-payment-alert span,
.workflow-stage.is-done.is-payment-alert span {
    color: #ffffff;
    background: #d92d20;
    border-color: #d92d20;
}

.workflow-stage.is-payment-complete span,
.workflow-stage.is-current.is-payment-complete span,
.workflow-stage.is-done.is-payment-complete span {
    color: #ffffff;
    background: #45b978;
    border-color: #45b978;
}

.permit-layout {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(220px, 1fr);
    gap: 16px;
    align-items: start;
}

.permit-main-panel,
.permit-side-panel {
    min-width: 0;
}

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

.permit-form[hidden] {
    display: none;
}

.permit-form-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 2px;
}

.permit-form-actions .permit-save-request {
    min-width: 170px;
}

.permit-stage-save-actions {
    display: flex;
    justify-content: flex-start;
    padding-top: 12px;
    border-top: 1px solid #edf1f7;
}

.permit-stage-save {
    min-width: 150px;
}

.permit-section {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.permit-section legend {
    margin-bottom: 12px;
    color: var(--app-text);
    font-size: 1.02rem;
    font-weight: 800;
}

.permit-review-panel {
    position: relative;
    display: grid;
    gap: 18px;
}

.permit-review-panel[hidden] {
    display: none;
}

.permit-review-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    padding: 4px 0 16px;
    border-bottom: 1px solid #e7ecf3;
    direction: rtl;
}

.permit-review-title {
    justify-self: right;
    text-align: right;
    direction: rtl;
}

.permit-review-title small {
    display: block;
    margin-top: 4px;
    color: #667085;
    font-size: 0.76rem;
    font-weight: 800;
}

.permit-review-number {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    justify-self: center;
    gap: 16px;
    min-width: 0;
    direction: rtl;
}

.permit-review-number strong {
    color: #2e2bbd;
    font-size: clamp(1.45rem, 2vw, 2rem);
    font-weight: 500;
    letter-spacing: 0;
    direction: ltr;
}

.permit-review-number span {
    color: #dc2626;
    font-size: 0.95rem;
    font-weight: 900;
}

.permit-review-head .status {
    justify-self: left;
    direction: rtl;
    text-align: right;
}

.permit-status-stamp {
    position: absolute;
    top: 12px;
    left: 18px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 112px;
    padding: 8px 18px;
    border: 2px solid currentColor;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.78);
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1;
    transform: rotate(-10deg);
    pointer-events: none;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.permit-status-stamp[hidden] {
    display: none;
}

.permit-status-stamp.is-completed {
    color: #15803d;
}

.permit-status-stamp.is-deleted {
    color: #b42318;
}

.permit-review-head h2,
.permit-review-attachments h3 {
    margin: 0;
    color: #19243a;
    font-size: 1.05rem;
    font-weight: 900;
}

.permit-review-grid {
    display: grid;
    gap: 18px;
}

.workflow-accordion {
    display: grid;
    gap: 8px;
}

.workflow-accordion-item {
    display: grid;
    gap: 0;
}

.workflow-accordion-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 42px;
    padding: 10px 14px;
    color: #172033;
    background: #ffffff;
    border: 1px solid #dfe7f2;
    border-radius: 8px;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 900;
    text-align: right;
    cursor: pointer;
}

.workflow-accordion-toggle svg {
    width: 18px;
    height: 18px;
    color: #98a2b3;
    transition: transform 160ms ease;
}

.workflow-accordion-item.is-locked .workflow-accordion-toggle {
    color: #98a2b3;
    background: #f8fafc;
    border-color: #e4eaf2;
    cursor: not-allowed;
    opacity: 0.72;
}

.workflow-accordion-item.is-readonly-stage:not(.is-skipped):not(.is-payment-alert):not(.is-payment-complete) .workflow-accordion-toggle {
    color: #6b7280;
    background: #f8fafc;
    border-color: #d7dde7;
}

.workflow-accordion-item.is-open .workflow-accordion-toggle svg {
    transform: rotate(180deg);
}

.workflow-accordion-item.is-open .workflow-accordion-toggle {
    color: #6f5131;
    background: #fff7ed;
    border-color: #e7c99f;
    box-shadow: inset 0 0 0 1px rgba(177, 143, 102, 0.14);
}

.workflow-accordion-item.is-current .workflow-accordion-toggle {
    border-color: #86efac;
    box-shadow: inset 0 0 0 1px rgba(72, 193, 132, 0.18);
}

.workflow-accordion-item.is-skipped .workflow-accordion-toggle,
.workflow-accordion-item.is-current.is-skipped .workflow-accordion-toggle,
.workflow-accordion-item.is-payment-alert .workflow-accordion-toggle,
.workflow-accordion-item.is-current.is-payment-alert .workflow-accordion-toggle {
    color: #b42318;
    background: #fff1f0;
    border-color: #fda29b;
    box-shadow: inset 0 0 0 1px rgba(217, 45, 32, 0.08);
}

.workflow-accordion-item.is-payment-complete .workflow-accordion-toggle,
.workflow-accordion-item.is-current.is-payment-complete .workflow-accordion-toggle {
    color: #166534;
    background: #ecfdf3;
    border-color: #86efac;
    box-shadow: inset 0 0 0 1px rgba(22, 101, 52, 0.08);
}

.workflow-accordion-panel {
    margin-top: 10px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid #dfe7f2;
    border-radius: 8px;
}

.permit-review-section-title {
    margin: 0;
    color: #19243a;
    font-size: 0.98rem;
    font-weight: 900;
    text-align: right;
}

.permit-review-section-group {
    display: grid;
    gap: 7px;
}

.permit-review-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px 22px;
}

.permit-review-card-grid--attachments {
    align-items: stretch;
}

.permit-review-field {
    display: grid;
    align-content: start;
    gap: 8px;
    min-width: 0;
    min-height: 66px;
    padding: 12px 14px;
    background: #f8fbff;
    border: 1px solid #dfe7f2;
    border-radius: 10px;
}

.permit-review-field--attachment {
    min-height: 96px;
}

.permit-review-field__main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    direction: rtl;
}

.permit-review-field__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    color: #37305f;
}

.permit-review-field__icon svg {
    width: 24px;
    height: 24px;
}

.permit-review-field__body {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.permit-review-field__label {
    color: #7b8798;
    font-size: 0.78rem;
    font-weight: 800;
}

.permit-review-field__value {
    color: #19243a;
    font-size: 0.94rem;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.permit-review-attachment {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid #e7ecf3;
}

.permit-review-attachment.is-empty {
    justify-content: center;
    gap: 8px;
    color: #98a2b3;
    font-size: 0.78rem;
    font-weight: 800;
}

.permit-review-attachment small {
    min-width: 0;
    color: #667085;
    font-size: 0.76rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.permit-review-attachments,
.permit-action-log {
    display: grid;
    gap: 12px;
    padding-top: 4px;
}

.permit-price-offer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    direction: rtl;
}

.permit-price-offer[hidden] {
    display: none;
}

.permit-price-offer > * {
    grid-column: 1;
}

.permit-offer-block {
    display: grid;
    gap: 10px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid #e0e7f0;
    border-radius: 8px;
}

.permit-offer-block h3,
.permit-offer-preview h3,
.permit-offer-preview h4 {
    margin: 0;
    color: #19243a;
    font-weight: 900;
}

.permit-offer-block h3,
.permit-offer-preview h3 {
    font-size: 0.98rem;
}

.permit-offer-preview h4 {
    font-size: 0.9rem;
}

.permit-offer-block p,
.permit-offer-preview p {
    margin: 0;
    color: #344054;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.8;
}

.permit-offer-block__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.permit-offer-add-payment {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #ffffff;
    background: #37305f;
    border: 0;
    border-radius: 8px;
    font-size: 1.25rem;
    font-weight: 900;
    cursor: pointer;
}

.permit-offer-send-client {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: auto;
    padding: 0 14px;
    height: 36px;
    color: #ffffff;
    background: #b18f66;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(177, 143, 102, 0.22);
    font-weight: 800;
}

.permit-offer-send-client svg {
    width: 19px;
    height: 19px;
}

.permit-client-response__body {
    display: grid;
    gap: 10px;
}

.permit-field--wide {
    grid-column: 1 / -1;
}

.permit-client-response-card,
.permit-client-chat {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 11px 12px;
    background: #f8fbff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.permit-client-response-card strong,
.permit-client-chat strong {
    color: #172033;
    font-size: 0.84rem;
    font-weight: 900;
}

.contract-signature-section {
    display: grid;
    gap: 10px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.contract-signature-section canvas {
    width: 100%;
    height: 190px;
    background: #ffffff;
    border: 2px dashed #b8c1cf;
    border-radius: 10px;
    touch-action: none;
    cursor: crosshair;
}

.quote-signature-clear {
    justify-self: start;
    padding: 7px 14px;
    color: #475569;
    background: #f1f5f9;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

.contract-signature-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.58);
}

.contract-signature-modal-backdrop[hidden] {
    display: none;
}

.contract-signature-modal {
    width: min(520px, 100%);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    padding: 18px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.contract-signature-modal > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.contract-signature-modal h2,
.contract-signature-modal p {
    margin: 0;
}

.contract-signature-modal p {
    margin-top: 5px;
    color: #667085;
    line-height: 1.7;
}

.contract-signature-modal__close {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    color: #475569;
    background: #f1f5f9;
    border: 0;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
}

.contract-signature-approve {
    width: 100%;
    margin-top: 12px;
}

.contract-signature-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.permit-company-signature-button {
    min-height: 40px;
    padding: 9px 16px;
    color: #fff;
    background: #173f6f;
    border: 0;
    border-radius: 8px;
    font-weight: 900;
    cursor: pointer;
}

.permit-company-signature-button:disabled,
.contract-signature-admin-actions button:disabled {
    opacity: 0.48;
    cursor: not-allowed;
}

.permit-contract-signature-preview {
    display: grid;
    gap: 4px;
    width: min(280px, 100%);
    margin: 4px 0 0;
    padding: 8px;
    background: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
}

.permit-contract-signature-preview img {
    display: block;
    width: 100%;
    height: 90px;
    object-fit: contain;
}

.permit-contract-signature-preview figcaption {
    color: #667085;
    font-size: 0.72rem;
    font-weight: 800;
    text-align: center;
}

.quote-client-choice:disabled {
    opacity: 0.42;
    cursor: not-allowed;
    filter: grayscale(0.7);
}

.quote-client-choice.is-cancel {
    border-color: #fecaca;
    background: #fff7f7;
}

.permit-client-response-card span,
.permit-client-response-card a,
.permit-client-chat p {
    margin: 0;
    color: #344054;
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.permit-client-response-card small,
.permit-client-chat small {
    color: #667085;
    font-size: 0.74rem;
    font-weight: 800;
}

.permit-client-response-card.is-approved {
    background: #ecfdf3;
    border-color: #abefc6;
}

.permit-client-response-card.is-payment {
    background: #fffbeb;
    border-color: #fedf89;
}

.permit-client-chat {
    background: #fff7ed;
    border-color: #fed7aa;
}

.permit-payment-stage {
    display: grid;
    gap: 10px;
    direction: rtl;
    text-align: right;
}

.permit-payment-stage[hidden] {
    display: none;
}

.permit-payment-methods {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    min-width: 300px;
    direction: rtl;
}

.permit-payment-methods button {
    min-height: 36px;
    padding: 7px 12px;
    color: #344054;
    background: #f8fbff;
    border: 1px solid #dfe7f2;
    border-radius: 8px;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.permit-payment-methods button.is-selected {
    color: #166534;
    background: #ecfdf3;
    border-color: #86efac;
    box-shadow: 0 10px 22px rgba(22, 101, 52, 0.12);
}

.permit-payment-receipt {
    display: grid;
    gap: 4px;
    padding: 0;
    color: #344054;
    background: transparent;
    border: 0;
    border-radius: 0;
    font-weight: 900;
}

.permit-payment-receipt small {
    color: #667085;
    font-size: 0.62rem;
    font-weight: 800;
    overflow-wrap: anywhere;
    line-height: 1.35;
}

.permit-payment-receipt .permit-input-wrap input[readonly] {
    padding-inline-end: 52px;
    cursor: default;
}

.permit-payment-receipt__card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 10px;
    color: var(--app-accent);
    background: rgba(177, 143, 102, 0.08);
    border: 1px dashed rgba(177, 143, 102, 0.34);
    border-radius: 8px;
    cursor: pointer;
}

.permit-payment-receipt__card svg {
    width: 17px;
    height: 17px;
}

.permit-payment-receipt__card strong {
    color: #344054;
    font-size: 0.78rem;
    font-weight: 900;
    white-space: nowrap;
}

.permit-payment-receipt__progress {
    position: relative;
    display: none;
    height: 4px;
    overflow: hidden;
    background: #fff7ed;
    border-radius: 999px;
}

.permit-payment-receipt__progress.is-visible {
    display: block;
}

.permit-payment-receipt__progress i {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 68%;
    background: linear-gradient(90deg, rgba(251, 146, 60, 0.6), rgba(249, 115, 22, 0.34));
    transition: width 420ms ease, background 220ms ease;
}

.permit-payment-receipt__progress.is-complete i {
    width: 100%;
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.42), rgba(22, 163, 74, 0.26));
}

.permit-payment-receipt .permit-file-actions {
    justify-content: flex-start;
}

.permit-payment-receipt [data-payment-receipt-actions] {
    display: block;
}

.permit-payment-receipt .permit-file-actions a,
.permit-payment-receipt .permit-file-actions button {
    width: 26px;
    height: 26px;
}

.permit-payment-receipt .permit-file-actions svg {
    width: 14px;
    height: 14px;
}

.permit-payment-installment {
    display: grid;
    gap: 10px;
    padding: 10px;
    background: #ffffff;
    border: 1px solid #dfe7f2;
    border-radius: 8px;
    direction: rtl;
}

.permit-payment-installment.is-paid {
    background: #ecfdf3;
    border-color: #86efac;
}

.permit-payment-installment.is-due {
    background: #fff1f0;
    border-color: #fda29b;
}

.permit-payment-installment__head {
    display: grid;
    grid-template-columns: auto minmax(180px, 1fr);
    grid-template-areas: "methods title";
    align-items: center;
    gap: 12px;
    direction: ltr;
}

.permit-payment-installment__title {
    grid-area: title;
    display: grid;
    gap: 3px;
    justify-items: start;
    direction: rtl;
    text-align: start;
}

.permit-payment-installment__head .permit-payment-methods {
    grid-area: methods;
    direction: rtl;
}

.permit-payment-installment__head strong {
    color: #172033;
    font-weight: 900;
}

.permit-payment-installment__head span {
    color: #667085;
    font-size: 0.78rem;
    font-weight: 800;
}

.permit-payment-installment__status {
    justify-self: end;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f2f4f7;
}

.permit-payment-installment.is-paid .permit-payment-installment__status {
    color: #166534;
    background: #dcfce7;
}

.permit-payment-installment.is-due .permit-payment-installment__status {
    color: #b42318;
    background: #fee4e2;
}

.permit-payment-installment__fields {
    display: grid;
    gap: 8px;
}

.permit-payment-inline-fields {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    align-items: end;
    direction: rtl;
}

.permit-payment-inline-fields.is-transfer {
    grid-template-columns: minmax(120px, 0.8fr) minmax(150px, 1fr) minmax(140px, 1fr) minmax(120px, 0.75fr) minmax(150px, 1fr);
}

.permit-payment-inline-fields.is-network,
.permit-payment-inline-fields.is-cash {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.permit-payment-inline-fields label {
    display: grid;
    gap: 5px;
    min-width: 0;
    text-align: right;
}

.permit-payment-inline-fields label > span {
    color: var(--app-muted);
    font-size: 0.75rem;
    font-weight: 800;
    white-space: nowrap;
}

.permit-payment-inline-fields input {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    color: var(--app-text);
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    font: inherit;
}

.permit-offer-documents,
.permit-offer-payments {
    display: grid;
    gap: 10px;
}

.permit-offer-payments {
    container-type: inline-size;
}

.permit-offer-document-row,
.permit-offer-payment-row {
    display: grid;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.permit-offer-document-row {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 10px 12px;
    background: #f8fbff;
    border: 1px solid #e7ecf3;
    border-radius: 8px;
}

.permit-offer-document-row span {
    color: #19243a;
    font-size: 0.88rem;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.permit-offer-document-row strong {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 900;
    white-space: nowrap;
}

.permit-offer-document-row strong.is-received {
    color: #067647;
    background: #ecfdf3;
}

.permit-offer-document-row strong.is-missing {
    color: #b42318;
    background: #fef3f2;
}

.permit-offer-document-status {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

.permit-offer-document-upload {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    color: #37305f;
    background: #f8fbff;
    border: 1px solid #d7dfeb;
    border-radius: 8px;
    cursor: pointer;
}

.permit-offer-document-upload svg {
    width: 18px;
    height: 18px;
}

.permit-offer-payment-row {
    grid-template-columns: minmax(118px, 1.35fr) minmax(50px, 0.5fr) minmax(64px, 0.72fr) minmax(64px, 0.72fr) minmax(118px, 1fr) 34px;
}

.permit-offer-payment-row label {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.permit-offer-payment-row label > span {
    color: var(--app-muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.permit-offer-payment-row input {
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
    min-height: 42px;
    padding: 9px 7px;
    color: var(--app-text);
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    font: inherit;
}

.permit-percent-input {
    position: relative;
    display: block;
    min-width: 0;
    color: inherit;
    font-size: 1rem;
    font-weight: 400;
}

.permit-percent-input input {
    padding-inline-end: 27px;
}

.permit-percent-input small {
    position: absolute;
    top: 50%;
    inset-inline-end: 9px;
    transform: translateY(-50%);
    color: var(--app-muted);
    font-size: 0.86rem;
    font-weight: 900;
    pointer-events: none;
}

.permit-payment-date-triplet {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    min-width: 0;
}

.permit-payment-date-triplet input {
    min-width: 0;
    padding-inline: 6px;
    text-align: center;
}

.permit-offer-payment-row button {
    align-self: end;
    width: 34px;
    height: 42px;
    color: #b42318;
    background: #fff5f5;
    border: 1px solid #ffd6d6;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 900;
    cursor: pointer;
}

.permit-offer-payment-row button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

@container (max-width: 760px) {
    .permit-offer-payment-row {
        grid-template-columns: minmax(110px, 1.2fr) minmax(48px, 0.45fr) minmax(58px, 0.6fr) minmax(58px, 0.6fr) 34px;
    }

    .permit-offer-payment-row label:nth-of-type(5) {
        grid-column: 1 / -2;
    }

    .permit-offer-payment-row label:nth-of-type(2) input,
    .permit-offer-payment-row label:nth-of-type(3) input,
    .permit-offer-payment-row label:nth-of-type(4) input,
    .permit-payment-date-triplet input {
        font-size: 0.78rem;
    }

    .permit-offer-payment-row button {
        grid-column: -2 / -1;
        grid-row: 1 / span 2;
        align-self: end;
    }
}

@container (max-width: 520px) {
    .permit-offer-payment-row {
        grid-template-columns: minmax(0, 1fr) minmax(52px, 72px) 34px;
    }

    .permit-offer-payment-row label:nth-of-type(1) {
        grid-column: 1 / 2;
    }

    .permit-offer-payment-row label:nth-of-type(2) {
        grid-column: 2 / 3;
    }

    .permit-offer-payment-row label:nth-of-type(3) {
        grid-column: 1 / 2;
    }

    .permit-offer-payment-row label:nth-of-type(4) {
        grid-column: 2 / 3;
    }

    .permit-offer-payment-row label:nth-of-type(5) {
        grid-column: 1 / -2;
    }

    .permit-offer-payment-row input {
        min-height: 38px;
        padding: 7px 6px;
    }

    .permit-offer-payment-row label:nth-of-type(2) input,
    .permit-offer-payment-row label:nth-of-type(3) input,
    .permit-offer-payment-row label:nth-of-type(4) input,
    .permit-payment-date-triplet input {
        font-size: 0.72rem;
    }

    .permit-payment-date-triplet {
        gap: 3px;
    }

    .permit-offer-payment-row button {
        grid-column: 3 / 4;
        grid-row: 1 / span 3;
        height: 38px;
    }
}

.permit-offer-payment-total {
    margin: 0;
    font-size: 0.84rem;
    font-weight: 900;
}

.permit-offer-payment-total.is-complete {
    color: #067647;
}

.permit-offer-payment-total.is-incomplete {
    color: #b42318;
}

.permit-offer-print-actions {
    display: grid;
    gap: 10px;
}

.price-offer-print-source {
    display: none;
}

.permit-offer-print-button {
    justify-self: start;
    min-height: 42px;
    padding: 10px 16px;
    color: #ffffff;
    background: #37305f;
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.permit-offer-print-button:disabled {
    color: #98a2b3;
    background: #eef2f7;
    border: 1px solid #d9e1ec;
    cursor: not-allowed;
}

.permit-offer-preview {
    display: grid;
    grid-column: 2;
    grid-row: 1 / span 5;
    align-self: start;
    justify-items: center;
    gap: 0;
    min-height: 420px;
    padding: 12px;
    background: #eef2f7;
    border: 1px solid #dfe5ee;
    border-radius: 8px;
    overflow: hidden;
    direction: ltr;
}

.price-offer-preview-thumb {
    position: relative;
    display: block;
    width: 100%;
    height: 396px;
    overflow: hidden;
    padding: 0;
    background: #ffffff;
    border: 1px solid #d7dfeb;
    border-radius: 8px;
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.14);
    cursor: pointer;
}

.price-offer-preview-thumb__page {
    position: absolute;
    top: 10px;
    left: 50%;
    display: block;
    transform: translateX(-50%) scale(0.22);
    transform-origin: top center;
    pointer-events: none;
}

.price-offer-preview-thumb__eye {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.24);
    opacity: 0;
    transition: opacity 160ms ease;
}

.price-offer-preview-thumb:hover .price-offer-preview-thumb__eye,
.price-offer-preview-thumb:focus-visible .price-offer-preview-thumb__eye {
    opacity: 1;
}

.price-offer-preview-thumb__eye svg {
    width: 44px;
    height: 44px;
    padding: 9px;
    background: rgba(177, 143, 102, 0.95);
    border-radius: 999px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);
}

.price-offer-a4 {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr auto;
    box-sizing: border-box;
    width: 210mm;
    height: 297mm;
    padding: 16mm 18mm 12mm;
    color: #18233c;
    background: #ffffff;
    border: 1px solid #d5dde8;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    direction: rtl;
    overflow: hidden;
}

.price-offer-a4__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42mm minmax(0, 1fr);
    align-items: start;
    gap: 10mm;
    min-height: 34mm;
    padding-bottom: 8mm;
    border-bottom: 1px solid #e5ebf2;
}

.price-offer-a4__company {
    color: #172033;
    font-size: 10.5pt;
    font-weight: 900;
    line-height: 1.8;
    white-space: normal;
}

.price-offer-a4__logo {
    display: grid;
    place-items: center;
    min-height: 28mm;
}

.price-offer-a4__logo img {
    max-width: 40mm;
    max-height: 28mm;
    object-fit: contain;
}

.price-offer-a4__logo strong {
    color: #b18f66;
    font-size: 18pt;
    font-weight: 900;
}

.price-offer-a4__meta {
    display: grid;
    gap: 2.5mm;
    justify-items: start;
    color: #344054;
    font-size: 9.5pt;
    font-weight: 800;
    line-height: 1.4;
}

.price-offer-a4__body {
    position: relative;
    z-index: 1;
    display: block;
    min-height: 0;
    padding: 10mm 0 8mm;
    font-size: 11pt;
    font-weight: 700;
    line-height: 1.9;
}

.price-offer-a4__watermark {
    position: absolute;
    z-index: -1;
    inset: 18mm 18mm auto auto;
    width: 125mm;
    max-height: 150mm;
    object-fit: contain;
    pointer-events: none;
}

.price-offer-a4__body h2 {
    margin: 0 0 8mm;
    color: #172033;
    font-size: 18pt;
    font-weight: 900;
    text-align: center;
}

.price-offer-a4__body h3 {
    margin: 8mm 0 3mm;
    color: #172033;
    font-size: 12pt;
    font-weight: 900;
}

.price-offer-a4__body p {
    margin: 0 0 3.5mm;
}

.price-offer-a4__body table {
    width: 100%;
    margin: 3mm 0 5mm;
    border-collapse: collapse;
    font-size: 10pt;
    line-height: 1.5;
}

.price-offer-a4__body th,
.price-offer-a4__body td {
    padding: 2.8mm 3mm;
    border: 1px solid #d8e0eb;
    text-align: right;
    vertical-align: middle;
}

.price-offer-a4__body th {
    color: #172033;
    background: #f1f5f9;
    font-weight: 900;
}

.price-offer-a4__signatures {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
    break-inside: avoid;
}

.price-offer-a4__signatures article {
    display: grid;
    justify-items: center;
    gap: 5px;
    min-height: 140px;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    text-align: center;
}

.price-offer-a4__signatures img {
    display: block;
    width: 100%;
    height: 78px;
    object-fit: contain;
}

.price-offer-a4__signatures span,
.price-offer-a4__signatures small {
    color: #64748b;
    font-size: 0.72rem;
}

.price-offer-a4__footer {
    display: grid;
    align-self: end;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8mm;
    align-items: start;
    padding-top: 6mm;
    background:
        radial-gradient(circle at 50% -12mm, rgba(224, 164, 82, 0.08), transparent 20mm),
        linear-gradient(135deg, #f7f7f7 0 24%, transparent 24% 100%);
    border-top: 1px solid #e5ebf2;
    direction: ltr;
}

.price-offer-a4__footer div {
    display: grid;
    justify-items: center;
    gap: 2.5mm;
    min-width: 0;
    text-align: center;
}

.price-offer-a4__footer-icon {
    display: inline-grid;
    place-items: center;
    width: 8mm;
    height: 8mm;
    color: #ffffff;
    background: #dda154;
    border-radius: 999px;
    font-size: 8pt;
    font-weight: 900;
}

.price-offer-a4__footer-icon.has-image {
    background: transparent;
}

.price-offer-a4__footer-icon img {
    width: 8mm;
    height: 8mm;
    object-fit: contain;
}

.price-offer-a4__footer p {
    margin: 0;
    color: #667085;
    font-size: 8pt;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.quote-mobile-cards {
    display: none;
}

.quote-client-company-signature {
    display: grid;
    justify-items: center;
    gap: 5px;
    width: min(320px, 100%);
    margin: 18px 0 0 auto;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    text-align: center;
    break-inside: avoid;
}

.quote-client-company-signature img {
    display: block;
    width: 100%;
    height: 86px;
    object-fit: contain;
}

.quote-client-company-signature span,
.quote-client-company-signature small {
    color: #64748b;
    font-size: 0.75rem;
}

.quote-client-page {
    min-height: 100vh;
    margin: 0;
    color: #172033;
    background: #f3f6fa;
    direction: rtl;
}

.quote-client-page [hidden],
.quote-client-page .quote-client-auth .quote-client-form {
    display: none !important;
}

.quote-client-shell {
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto;
    padding: 28px 0 42px;
}

.quote-client-card,
.quote-client-workspace {
    background: #ffffff;
    border: 1px solid #dfe7f2;
    border-radius: 8px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.quote-client-auth {
    display: grid;
    gap: 16px;
    max-width: 520px;
    margin: 8vh auto 0;
    padding: 24px;
}

.quote-client-auth > p:not(.quote-client-message) {
    display: none;
}

.quote-client-auth h1,
.quote-client-head h1,
.quote-client-actions h2 {
    margin: 0;
    color: #172033;
    font-weight: 900;
}

.quote-client-auth p,
.quote-client-message {
    margin: 0;
    color: #667085;
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.8;
}

.quote-client-message[data-tone="success"] {
    color: #067647;
}

.quote-client-message[data-tone="error"] {
    color: #b42318;
}

.quote-client-form {
    display: grid;
    gap: 13px;
}

.quote-client-form label,
.quote-client-revision label {
    display: grid;
    gap: 7px;
}

.quote-client-form span,
.quote-client-revision span {
    color: #344054;
    font-size: 0.82rem;
    font-weight: 900;
}

.quote-client-form input,
.quote-client-revision textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 44px;
    padding: 10px 12px;
    color: #172033;
    background: #ffffff;
    border: 1px solid #d0d8e5;
    border-radius: 8px;
    font: inherit;
}

.quote-client-form button,
.quote-client-revision button,
.quote-client-head button,
.quote-client-bank button {
    min-height: 42px;
    padding: 9px 14px;
    color: #ffffff;
    background: #37305f;
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.quote-client-workspace {
    display: grid;
    gap: 18px;
    padding: 18px;
}

.quote-client-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #e6edf5;
    padding-bottom: 14px;
}

.quote-client-head span {
    display: inline-block;
    margin-bottom: 4px;
    color: #b18f66;
    font-size: 0.86rem;
    font-weight: 900;
}

.quote-client-stages {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.quote-client-stage {
    display: grid;
    justify-items: center;
    gap: 7px;
    min-width: 0;
    padding: 11px 8px;
    background: #f8fafc;
    border: 1px solid #e1e8f0;
    border-radius: 8px;
    text-align: center;
}

.quote-client-stage span {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: #667085;
    background: #ffffff;
    border: 1px solid #d9e1ec;
    border-radius: 999px;
    font-weight: 900;
}

.quote-client-stage strong {
    color: #344054;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1.5;
}

.quote-client-stage.is-current {
    border-color: #b18f66;
    background: #fff8ef;
}

.quote-client-stage.is-current span,
.quote-client-stage.is-done span {
    color: #ffffff;
    background: #b18f66;
    border-color: #b18f66;
}

.quote-client-page .quote-client-stages {
    display: none;
}

.quote-client-preview {
    display: grid;
    justify-items: center;
    padding: 18px;
    background: #eef2f7;
    border: 1px solid #dde6f1;
    border-radius: 8px;
    overflow: auto;
}

.quote-client-preview .quote-client-contract {
    width: min(210mm, 100%);
    height: auto;
    min-height: 297mm;
}

.quote-client-preview .quote-client-contract .price-offer-a4__body {
    min-width: 0;
}

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

.quote-client-table-wrap table {
    width: 100%;
    table-layout: fixed;
}

.quote-client-table-wrap th,
.quote-client-table-wrap td {
    overflow-wrap: anywhere;
}

.quote-client-actions {
    display: grid;
    gap: 14px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #dfe7f2;
    border-radius: 8px;
}

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

.quote-client-decision-icons,
.quote-client-payment-icons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quote-client-decision-icons .quote-client-choice,
.quote-client-payment-icons .quote-client-choice {
    align-content: center;
    justify-items: center;
    gap: 4px;
    min-height: 76px;
    padding: 10px 8px;
    text-align: center;
}

.quote-client-decision-icons .quote-client-choice svg,
.quote-client-payment-icons .quote-client-choice svg {
    width: 29px;
    height: 29px;
}

.quote-client-decision-icons .quote-client-choice small,
.quote-client-payment-icons .quote-client-choice small {
    color: currentColor;
    font-size: 0.67rem;
    font-weight: 900;
    line-height: 1.2;
}

.quote-client-decision-icons .quote-client-choice.is-approve {
    color: #087443;
}

.quote-client-decision-icons .quote-client-choice.is-revision {
    color: #9a6700;
    background: #fffbeb;
    border-color: #fde68a;
}

.quote-client-decision-icons .quote-client-choice.is-cancel {
    color: #b42318;
}

.quote-client-payment-icons .quote-client-choice {
    color: #173f6f;
    background: #f5f9ff;
    border-color: #cdddf1;
}

.quote-client-choice {
    display: grid;
    gap: 7px;
    min-height: 92px;
    padding: 16px;
    color: #172033;
    background: #f8fbff;
    border: 1px solid #dfe7f2;
    border-radius: 8px;
    text-align: right;
    cursor: pointer;
}

.quote-client-choice strong {
    font-size: 1rem;
    font-weight: 900;
}

.quote-client-choice span {
    color: #667085;
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.7;
}

.quote-client-choice.is-approve {
    background: #ecfdf3;
    border-color: #abefc6;
}

.quote-client-revision,
.quote-client-payment-form,
.quote-client-bank,
.quote-client-result {
    display: grid;
    gap: 10px;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid #e1e8f0;
    border-radius: 8px;
}

.quote-client-payment-form label {
    display: grid;
    gap: 7px;
}

.quote-client-payment-form span {
    color: #344054;
    font-size: 0.82rem;
    font-weight: 900;
}

.quote-client-payment-form input {
    width: 100%;
    box-sizing: border-box;
    min-height: 42px;
    padding: 9px 12px;
    color: #172033;
    background: #ffffff;
    border: 1px solid #d0d8e5;
    border-radius: 8px;
    font: inherit;
}

.quote-client-payment-form button {
    min-height: 42px;
    padding: 9px 14px;
    color: #ffffff;
    background: #37305f;
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.quote-client-bank h3,
.quote-client-bank p,
.quote-client-result strong,
.quote-client-result p {
    margin: 0;
}

.quote-client-bank h3,
.quote-client-result strong {
    color: #172033;
    font-weight: 900;
}

.quote-client-bank p,
.quote-client-result p {
    color: #344054;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.8;
}

.permit-action-log {
    direction: rtl;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.48fr);
    align-items: start;
    gap: 14px 18px;
}

.workflow-page.is-dedicated-workflow-stage .permit-action-log {
    display: none !important;
}

.permit-attachment-list {
    display: grid;
    gap: 10px;
}

.permit-attachment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid #dfe7f2;
    border-radius: 10px;
}

.permit-attachment-item span:first-child {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.permit-attachment-item strong {
    color: #19243a;
    font-size: 0.9rem;
}

.permit-attachment-item small {
    color: #7b8798;
    font-size: 0.78rem;
    overflow-wrap: anywhere;
}

.permit-attachment-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.permit-attachment-actions a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 10px;
    color: var(--app-accent);
    background: rgba(177, 143, 102, 0.08);
    border: 1px solid rgba(177, 143, 102, 0.22);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 900;
    text-decoration: none;
}

.permit-previous-actions {
    display: grid;
    gap: 12px;
    margin-bottom: 4px;
    padding: 14px;
    background: #f8fbff;
    border: 1px solid #e1e8f2;
    border-radius: 14px;
}

.permit-previous-actions[hidden] {
    display: none;
}

.permit-previous-actions__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e1e8f2;
}

.permit-previous-actions__head h3 {
    margin: 0;
    color: #18233c;
    font-size: 0.98rem;
    font-weight: 900;
}

.permit-previous-actions__head span {
    display: inline-grid;
    place-items: center;
    min-width: 28px;
    height: 28px;
    color: var(--app-accent);
    background: rgba(177, 143, 102, 0.1);
    border: 1px solid rgba(177, 143, 102, 0.24);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 900;
}

.permit-previous-actions__list {
    display: grid;
    gap: 10px;
}

.permit-previous-action {
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #e1e8f2;
    border-radius: 12px;
}

.permit-previous-action header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.permit-previous-action__stage {
    color: var(--app-accent);
    background: #fffaf3;
    border: 1px solid rgba(177, 143, 102, 0.26);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 900;
}

.permit-previous-action__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.48fr);
    gap: 14px 18px;
}

.permit-previous-action__note,
.permit-previous-action__attachments {
    display: grid;
    align-content: start;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #e1e8f2;
    border-radius: 12px;
}

.permit-previous-action__note h4,
.permit-previous-action__attachments h4 {
    margin: 0;
    min-height: 30px;
    color: #667085;
    font-size: 0.84rem;
    font-weight: 900;
}

.permit-previous-action p {
    margin: 0;
    color: #18233c;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.8;
    white-space: pre-wrap;
}

.permit-previous-action__attachments-list {
    display: grid;
    gap: 8px;
}

.permit-previous-action__empty-attachments {
    color: #98a2b3;
    font-size: 0.8rem;
    font-weight: 800;
}

.permit-previous-action__time {
    color: #7b8798;
    font-size: 0.78rem;
    font-weight: 800;
    justify-self: end;
}

.permit-action-entry-card {
    display: grid;
    gap: 10px;
    grid-column: 1;
    min-width: 0;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #e1e8f2;
    border-radius: 12px;
}

.permit-action-entry-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    min-width: 0;
}

.permit-action-entry-card__header > span {
    color: #667085;
    font-size: 0.84rem;
    font-weight: 900;
}

.permit-action-author {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
    padding: 4px 8px;
    color: #283348;
    background: #f8fbff;
    border: 1px solid #e1e8f2;
    border-radius: 9px;
}

.permit-action-author[hidden] {
    display: none;
}

.permit-action-author__avatar {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    overflow: hidden;
    color: #ffffff;
    background: #37305f;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 900;
}

.permit-action-author__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.permit-action-author strong,
.permit-action-author small {
    display: block;
}

.permit-action-author strong {
    font-size: 0.84rem;
    font-weight: 900;
}

.permit-action-author small {
    margin-top: 2px;
    color: #7b8798;
    font-size: 0.74rem;
    font-weight: 800;
}

.permit-action-log textarea {
    width: 100%;
    min-height: 130px;
    padding: 12px 14px;
    color: var(--app-text);
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    direction: rtl;
    text-align: right;
    font: inherit;
    resize: vertical;
}

.permit-action-log textarea.is-readonly {
    color: #344054;
    background: #f8fafc;
    border-color: #d9e2ee;
    box-shadow: none;
    cursor: default;
}

.permit-action-log textarea:focus {
    outline: 0;
    border-color: var(--app-accent);
    box-shadow: 0 0 0 3px rgba(177, 143, 102, 0.13);
}

.permit-action-attachments {
    display: grid;
    gap: 10px;
    grid-column: 2;
    min-width: 0;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #e1e8f2;
    border-radius: 12px;
}

.permit-action-attachments__header {
    display: flex;
    align-items: center;
    min-height: 52px;
    color: #667085;
    font-size: 0.84rem;
    font-weight: 900;
}

.permit-action-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: stretch;
    flex-direction: column;
    gap: 8px;
    min-height: 152px;
    padding: 14px;
    color: var(--button-color, #b18f66);
    background: #fffaf3;
    border: 1px solid rgba(177, 143, 102, 0.35);
    border-radius: 10px;
    font-size: 0.86rem;
    font-weight: 900;
    text-align: center;
    cursor: pointer;
}

.permit-action-upload input {
    display: none;
}

.permit-action-upload.is-disabled {
    color: #98a2b3;
    background: #f4f6fa;
    border-color: #e1e8f2;
    cursor: not-allowed;
    opacity: 0.8;
}

.permit-action-upload svg {
    width: 30px;
    height: 30px;
}

.permit-action-attachments__list {
    display: grid;
    gap: 8px;
}

.permit-action-attachments__list > p {
    margin: 0;
    color: #98a2b3;
    font-size: 0.8rem;
    font-weight: 800;
}

.permit-action-attachment {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    background: #f8fbff;
    border: 1px solid #e1e8f2;
    border-radius: 10px;
}

.permit-action-attachment > span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.permit-action-attachment strong {
    color: #18233c;
    font-size: 0.82rem;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.permit-action-attachment small {
    color: #7b8798;
    font-size: 0.74rem;
    font-weight: 800;
}

.permit-action-log__time {
    grid-column: 1;
    justify-self: end;
    margin: 0;
    color: #7b8798;
    font-size: 0.8rem;
    font-weight: 800;
}

.permit-grid {
    display: grid;
    gap: 14px;
}

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

.permit-grid--service {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
}

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

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

.permit-grid label,
.permit-field {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.permit-field[hidden] {
    display: none;
}

.permit-grid label > span,
.permit-field > span:first-child {
    color: var(--app-muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.permit-grid input,
.permit-grid select {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    color: var(--app-text);
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    font: inherit;
}

.permit-grid input::placeholder {
    color: #98a2b3;
    opacity: 1;
}

.permit-input-wrap {
    position: relative;
    display: block;
    min-width: 0;
}

.permit-input-wrap input {
    padding-inline-end: 52px;
}

.permit-upload-action {
    position: absolute;
    inset-block: 5px;
    inset-inline-end: 5px;
    display: inline-grid;
    place-items: center;
    width: 34px;
    min-width: 34px;
    padding: 0;
    color: var(--app-accent);
    background: rgba(177, 143, 102, 0.1);
    border: 1px solid rgba(177, 143, 102, 0.22);
    border-radius: 7px;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.permit-upload-action:hover {
    color: #ffffff;
    background: var(--app-accent);
    border-color: var(--app-accent);
    transform: translateY(-1px);
}

.permit-upload-action input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.permit-upload-action svg {
    width: 18px;
    height: 18px;
}

.permit-upload-progress {
    position: relative;
    display: none;
    min-height: 24px;
    overflow: hidden;
    padding: 4px 10px;
    color: #8a4b00;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 800;
}

.permit-upload-progress.is-visible {
    display: flex;
    align-items: center;
}

.permit-upload-progress span {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 68%;
    background: linear-gradient(90deg, rgba(251, 146, 60, 0.5), rgba(249, 115, 22, 0.28));
    transition: width 420ms ease, background 220ms ease;
}

.permit-upload-progress.is-complete {
    color: #166534;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.permit-upload-progress.is-complete span {
    width: 100%;
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.32), rgba(22, 163, 74, 0.2));
}

.permit-upload-progress small {
    position: relative;
    z-index: 1;
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font: inherit;
}

.permit-grid input:focus,
.permit-grid select:focus {
    outline: 0;
    border-color: var(--app-accent);
    box-shadow: 0 0 0 3px rgba(177, 143, 102, 0.13);
}

.field-note {
    display: block;
    margin-top: -2px;
    font-size: 0.72rem;
    line-height: 1.45;
}

.field-note--danger {
    color: #b42318;
}

.permit-side-panel {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.permit-side-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 16px 14px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.permit-side-card h2 {
    margin: 0;
    padding-bottom: 10px;
    color: #18233c;
    border-bottom: 1px solid #e7ecf3;
    font-size: 1rem;
    font-weight: 900;
    text-align: center;
}

.permit-action-card {
    gap: 10px;
}

.permit-action-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e7ecf3;
}

.permit-action-card__head h2 {
    margin: 0;
    padding: 0;
    border: 0;
    text-align: right;
}

.permit-timeline-button {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    color: #37305f;
    background: #f2eff8;
    border: 1px solid #ded8eb;
    border-radius: 9px;
    cursor: pointer;
}

.permit-timeline-button svg {
    width: 19px;
    height: 19px;
}

.permit-timeline-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.38);
}

.permit-timeline-backdrop[hidden] {
    display: none;
}

.permit-company-signature-modal {
    width: min(540px, 100%);
    padding: 18px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.permit-company-signature-modal > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.permit-company-signature-modal h2 {
    margin: 0 0 4px;
    color: #172033;
    font-size: 1.05rem;
}

.permit-company-signature-modal header small {
    color: #667085;
}

.permit-company-signature-modal header > button {
    width: 34px;
    height: 34px;
    color: #475569;
    background: #f1f5f9;
    border: 0;
    border-radius: 50%;
    font-size: 1.35rem;
    cursor: pointer;
}

.permit-company-signer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    padding: 9px 11px;
    background: #f8fafc;
    border-radius: 8px;
}

.permit-company-signature-modal canvas {
    display: block;
    width: 100%;
    height: 190px;
    background: #fff;
    border: 2px dashed #b8c1cf;
    border-radius: 10px;
    touch-action: none;
    cursor: crosshair;
}

.permit-company-signature-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
}

.permit-company-signature-modal__actions button {
    min-height: 38px;
    padding: 8px 14px;
    border: 0;
    border-radius: 8px;
    font-weight: 900;
    cursor: pointer;
}

.permit-company-signature-modal__actions .is-primary {
    color: #fff;
    background: #173f6f;
}

.permit-company-signature-modal__actions button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.permit-timeline-modal {
    width: min(620px, 100%);
    max-height: min(560px, calc(100vh - 36px));
    overflow: hidden;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.permit-timeline-modal > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 17px;
    border-bottom: 1px solid #e8edf4;
}

.permit-timeline-modal h2 {
    margin: 0 0 2px;
    font-size: 1rem;
}

.permit-timeline-modal header small {
    color: #7b8798;
}

.permit-timeline-modal header button {
    width: 32px;
    height: 32px;
    color: #64748b;
    background: #f1f5f9;
    border: 0;
    border-radius: 8px;
    font-size: 1.35rem;
    cursor: pointer;
}

.permit-timeline-list {
    display: grid;
    max-height: 480px;
    overflow-y: auto;
    padding: 8px 17px 14px;
}

.permit-timeline-row {
    display: grid;
    grid-template-columns: minmax(105px, 1.2fr) minmax(105px, 1fr) minmax(145px, 1.3fr) auto;
    gap: 10px;
    align-items: center;
    padding: 11px 2px;
    border-bottom: 1px solid #edf1f6;
    font-size: 0.78rem;
}

.permit-timeline-row:last-child {
    border-bottom: 0;
}

.permit-timeline-row strong {
    color: #172033;
}

.permit-timeline-row span {
    color: #526174;
}

.permit-timeline-row time {
    color: #64748b;
    direction: ltr;
    text-align: right;
}

.permit-timeline-duration {
    white-space: nowrap;
    color: #8a6841 !important;
    font-weight: 800;
}

.permit-timeline-empty {
    padding: 28px 12px;
    color: #7b8798;
    text-align: center;
}

@media (max-width: 620px) {
    .contracts-new-grid {
        grid-template-columns: 1fr;
    }

    .permit-timeline-row {
        grid-template-columns: 1fr auto;
    }

    .permit-timeline-row time {
        grid-column: 1;
        text-align: right;
    }

    .permit-timeline-duration {
        grid-column: 2;
        grid-row: 1 / span 2;
    }
}

.permit-priority-control {
    display: grid;
    gap: 7px;
}

.permit-priority-control span {
    color: #6b778c;
    font-size: 0.78rem;
    font-weight: 900;
}

.permit-priority-control select {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    color: #19243a;
    background: #f8fbff;
    border: 1px solid #dce4ef;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 900;
}

.permit-priority-control select:focus {
    outline: 1px solid var(--button-color, #b18f66);
    border-color: var(--button-color, #b18f66);
}

.permit-save-request,
.permit-next-stage,
.permit-follower-add button {
    min-height: 42px;
    padding: 10px 14px;
    color: #166534;
    background: #dcfce7;
    border: 1px solid #a7f3d0;
    border-radius: 10px;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.permit-save-request {
    color: #5f4529;
    background: #fff7ed;
    border-color: rgba(177, 143, 102, 0.38);
}

.permit-save-request[data-state="dirty"] {
    color: #ffffff;
    background: var(--button-color, #b18f66);
    border-color: var(--button-color, #b18f66);
}

.permit-save-request[data-state="saved"] {
    color: #166534;
    background: #dcfce7;
    border-color: #a7f3d0;
}

.permit-save-request[data-state="saving"] {
    color: #667085;
    background: #f4f6fa;
    border-color: #e1e8f2;
    cursor: wait;
}

.permit-next-stage.is-skip-action {
    color: #ffffff;
    background: #d92d20;
    border-color: #d92d20;
}

.permit-next-stage.is-next-action {
    color: #166534;
    background: #dcfce7;
    border-color: #a7f3d0;
}

.permit-save-request:disabled {
    color: #98a2b3;
    background: #f4f6fa;
    border-color: #e1e8f2;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.72;
}

.permit-save-request:hover,
.permit-next-stage:hover,
.permit-follower-add button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(22, 101, 52, 0.12);
}

.permit-save-request:disabled:hover {
    box-shadow: none;
    transform: none;
}

.permit-summary-list {
    display: grid;
    gap: 0;
    margin: 0;
}

.permit-summary-list div {
    display: grid;
    grid-template-columns: minmax(76px, 0.8fr) minmax(0, 1fr);
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid #edf1f6;
}

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

.permit-summary-list dt,
.permit-summary-list dd {
    margin: 0;
    min-width: 0;
}

.permit-summary-list dt {
    color: #6b778c;
    font-size: 0.78rem;
}

.permit-summary-list dd {
    color: #19243a;
    font-size: 0.84rem;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.permit-person-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 10px;
    background: #f8fbff;
    border: 1px solid #dfe7f2;
    border-radius: 12px;
}

.permit-person-avatar {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, var(--app-accent), #7b5a33);
    border-radius: 12px;
    font-weight: 900;
}

.permit-person-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.permit-person-card strong,
.permit-person-card small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.permit-person-card strong {
    color: #19243a;
    font-size: 0.86rem;
}

.permit-person-card small {
    margin-top: 3px;
    color: #7b8798;
    font-size: 0.74rem;
}

.permit-followers {
    display: grid;
    gap: 8px;
}

.permit-follower-card {
    grid-template-columns: 42px minmax(0, 1fr) 28px;
}

.permit-follower-card button {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: #b42318;
    background: #fff1f3;
    border: 1px solid #ffd5dc;
    border-radius: 8px;
    cursor: pointer;
}

.permit-follower-card button:disabled {
    color: #98a2b3;
    background: #f2f4f7;
    border-color: #e4e7ec;
    cursor: not-allowed;
}

.permit-followers-card.is-locked {
    opacity: 0.58;
    filter: grayscale(0.25);
    background: #f8fafc;
}

.permit-followers-card.is-locked .permit-followers,
.permit-followers-card.is-locked .permit-follower-add {
    pointer-events: none;
}

.permit-locked-note {
    margin: -2px 0 0;
    color: #7b8798;
    font-size: 0.78rem;
    line-height: 1.65;
    text-align: center;
}

.permit-followup-department {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    background: #f8fbff;
    border: 1px solid #dfe7f2;
    border-radius: 12px;
}

.permit-followup-department span {
    color: #7b8798;
    font-size: 0.74rem;
    font-weight: 800;
}

.permit-followup-department strong {
    color: #19243a;
    font-size: 0.9rem;
    font-weight: 900;
}

.permit-follower-add button:disabled,
.permit-follower-add select:disabled {
    cursor: not-allowed;
}

.permit-follower-add {
    display: grid;
    gap: 8px;
}

.permit-follower-add select {
    min-height: 40px;
    padding: 8px 10px;
    color: var(--app-text);
    background: #ffffff;
    border: 1px solid #dfe7f2;
    border-radius: 10px;
    font: inherit;
}

.permit-empty-note,
.permit-attachments-summary {
    margin: 0;
    color: #7b8798;
    font-size: 0.82rem;
    line-height: 1.7;
    text-align: center;
}

.permit-attachments-list {
    display: grid;
    gap: 9px;
}

.permit-attachment-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f8fbff;
    border: 1px solid #e1e8f2;
    border-radius: 10px;
}

.permit-attachment-row__body {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.permit-attachment-row__body strong {
    color: #18233c;
    font-size: 0.82rem;
    font-weight: 900;
}

.permit-attachment-row__body span {
    color: #344054;
    font-size: 0.8rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.permit-attachment-row__body small {
    color: #7b8798;
    font-size: 0.74rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.permit-file-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.permit-file-actions a,
.permit-file-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    color: var(--button-color, #b18f66);
    background: #ffffff;
    border: 1px solid #dce4ef;
    border-radius: 9px;
}

.permit-file-actions button:disabled {
    color: #a9b3c2;
    background: #f4f6fa;
    cursor: not-allowed;
}

.permit-file-actions svg {
    width: 18px;
    height: 18px;
}

.inline-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px;
    gap: 8px;
    align-items: center;
}

label {
    display: grid;
    gap: 6px;
    color: var(--app-muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.switch-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 10px 12px;
    color: var(--app-text);
    background: #f8fafc;
    border: 1px solid var(--app-border);
    border-radius: 8px;
}

.switch-field input {
    width: 20px;
    height: 20px;
    min-height: 20px;
    accent-color: var(--app-accent);
}

.switch-field--toggle {
    justify-content: flex-start;
}

.switch-field--toggle input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
    pointer-events: none;
}

.switch-control {
    position: relative;
    display: inline-block;
    width: 58px;
    height: 32px;
    flex: 0 0 58px;
    background: #d9e2ec;
    border-radius: 999px;
    transition: background 180ms ease;
}

.switch-control::before {
    content: "";
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 7px rgba(16, 42, 67, 0.22);
    transition: transform 180ms ease;
}

.switch-field--toggle input:checked + .switch-control {
    background: #2fa36b;
}

.switch-field--toggle input:checked + .switch-control::before {
    transform: translateX(-26px);
}

.field-label {
    display: block;
    margin-bottom: 6px;
    color: var(--app-muted);
    font-size: 0.86rem;
    font-weight: 700;
}

[data-employee-form] .form-grid > label[data-field-icon] {
    position: relative;
    display: grid;
    gap: 6px;
    min-height: 0;
    overflow: visible;
    color: var(--app-text);
    background: transparent;
    border: 0;
    border-radius: 0;
}

[data-employee-form] .form-grid > label[data-field-icon] > span:first-child {
    display: block;
    color: var(--app-muted);
    background: transparent;
    border: 0;
    font-size: 0.86rem;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[data-employee-form] .form-grid > label[data-field-icon]::before {
    content: none;
}

[data-employee-form] .form-grid > label[data-field-icon] .field-icon {
    z-index: 1;
    position: absolute;
    inset-inline-start: 1px;
    bottom: 1px;
    display: inline-grid;
    place-items: center;
    width: 56px;
    height: 46px;
    color: #6f5437;
    background: #f7f9fc;
    border: 0;
    border-inline-end: 1px solid var(--app-border);
    border-radius: 0 7px 7px 0;
    font-family: "Tajawal", "Segoe UI Symbol", Tahoma, Arial, sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1;
}

[data-employee-form] .form-grid > label[data-field-icon] .field-icon svg {
    width: 25px;
    height: 25px;
    display: block;
}

[data-employee-form] .form-grid > label[data-field-icon] .field-icon--text {
    font-size: 1.1rem;
}

[data-employee-form] .form-grid > label[data-field-icon]::after {
    content: "";
    z-index: 1;
    position: absolute;
    inset-inline-start: 56px;
    bottom: 1px;
    width: 1px;
    height: 46px;
    background: var(--app-border);
}

[data-employee-form] .form-grid > label[data-field-icon] > input:not([type="hidden"]),
[data-employee-form] .form-grid > label[data-field-icon] > select,
[data-employee-form] .form-grid > label[data-field-icon] > .inline-control,
[data-employee-form] .form-grid > label[data-field-icon] > .nationality-picker,
[data-employee-form] .form-grid > label[data-field-icon] > .date-triplet {
    min-width: 0;
}

[data-employee-form] .form-grid > label[data-field-icon] input,
[data-employee-form] .form-grid > label[data-field-icon] select {
    outline: none;
}

[data-employee-form] .form-grid > label[data-field-icon] > input:not([type="hidden"]),
[data-employee-form] .form-grid > label[data-field-icon] > select {
    min-height: 48px;
    padding-inline-start: 68px;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: none;
    font-weight: 800;
}

[data-employee-form] .form-grid > label[data-field-icon] > .inline-control {
    grid-template-columns: minmax(0, 1fr) 38px;
    gap: 8px;
}

[data-employee-form] .form-grid > label[data-field-icon] > .inline-control select {
    min-height: 48px;
    padding-inline-start: 68px;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: #ffffff;
    font-weight: 800;
}

[data-employee-form] .form-grid > label[data-field-icon] > .inline-control .icon-button {
    align-self: stretch;
    min-height: 48px;
    border-radius: 8px;
}

.nationality-picker {
    position: relative;
    display: block;
}

.nationality-picker input {
    width: 100%;
    min-height: 48px;
    padding-inline-start: 68px;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: #ffffff;
    font-weight: 800;
}

.nationality-picker__list {
    position: absolute;
    inset-inline: 0;
    top: calc(100% + 6px);
    z-index: 8;
    display: none;
    max-height: 210px;
    overflow: auto;
    padding: 6px;
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: 0 14px 30px rgba(16, 24, 40, 0.12);
}

.nationality-picker.is-open .nationality-picker__list {
    display: grid;
    gap: 4px;
}

.nationality-picker__option {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 26px;
    align-items: center;
    gap: 4px;
}

.nationality-picker__option button {
    min-height: 32px;
    padding: 5px 8px;
    color: var(--app-text);
    background: #ffffff;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
    font-weight: 800;
    text-align: right;
}

.nationality-picker__option button:hover {
    background: #f7f9fc;
}

.nationality-picker__delete {
    color: #b42318 !important;
    font-size: 1rem;
    line-height: 1;
}

.nationality-picker__empty {
    padding: 8px;
    color: var(--app-muted);
    font-size: 0.78rem;
    font-weight: 800;
}

[data-employee-form] .form-grid > label[data-field-icon] > .date-triplet {
    align-items: center;
    justify-content: stretch;
    gap: 0;
    min-height: 48px;
    padding-inline-start: 58px;
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    overflow: hidden;
}

[data-employee-form] .form-grid > label[data-field-icon] > .date-triplet > span {
    flex: 1 1 0;
    width: auto;
}

[data-employee-form] .form-grid > label[data-field-icon] > .date-triplet input {
    width: 100%;
    min-height: 46px;
    border: 0;
    border-inline-start: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 0;
    background: #ffffff;
    text-align: center;
    font-weight: 800;
}

[data-employee-form] .form-grid > label[data-field-icon]:focus-within {
    box-shadow: none;
}

[data-employee-form] .form-grid > label[data-field-icon]:focus-within .field-icon {
    border-inline-end-color: var(--app-accent);
}

[data-employee-form] .form-grid > label[data-field-icon]:focus-within::after {
    background: var(--app-accent);
}

[data-employee-form] .form-grid > label[data-field-icon]:focus-within > input:not([type="hidden"]),
[data-employee-form] .form-grid > label[data-field-icon]:focus-within > select,
[data-employee-form] .form-grid > label[data-field-icon]:focus-within > .inline-control select,
[data-employee-form] .form-grid > label[data-field-icon]:focus-within > .nationality-picker input,
[data-employee-form] .form-grid > label[data-field-icon]:focus-within > .date-triplet {
    border-color: var(--app-accent);
    box-shadow: none;
}

input,
select,
textarea {
    min-height: 40px;
    padding: 8px 10px;
    color: var(--app-text);
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
}

input[dir="ltr"] {
    direction: ltr;
    text-align: left;
    font-variant-numeric: lining-nums;
}

.date-triplet {
    display: flex;
    align-items: end;
    gap: 6px;
}

.date-triplet > span {
    display: grid;
    gap: 4px;
    width: max-content;
}

.date-triplet input {
    min-height: 38px;
    padding-inline: 5px;
    text-align: center;
}

.date-triplet [data-date-part="day"],
.date-triplet [data-date-part="month"] {
    width: 68px;
}

.date-triplet [data-date-part="year"] {
    width: 96px;
}

.readonly-field {
    display: grid;
    align-items: center;
    min-height: 40px;
    padding: 8px 10px;
    color: var(--app-muted);
    background: #f8fafc;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    font-weight: 700;
}

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

.employee-profile-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    margin: 4px 0 18px;
    padding: 14px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 8px;
}

.employee-profile-head__identity {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.employee-profile-head__identity span,
.last-login-summary span {
    color: var(--app-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.employee-profile-head__identity strong {
    color: var(--app-text);
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.4;
}

.employee-profile-head__identity small {
    color: var(--app-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.last-login-summary {
    display: grid;
    grid-column: 1 / -1;
    gap: 4px;
    min-width: 0;
    padding-top: 12px;
    color: var(--app-muted);
    border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.last-login-summary strong {
    color: var(--app-text);
    font-size: 0.92rem;
    font-weight: 800;
}

.employee-photo-uploader {
    position: relative;
    display: grid;
    place-items: center;
    width: 112px;
    aspect-ratio: 1;
    overflow: hidden;
    color: var(--app-muted);
    background:
        linear-gradient(145deg, #ffffff, #f3f6fa),
        #ffffff;
    border: 1px dashed rgba(177, 143, 102, 0.55);
    border-radius: 8px;
    cursor: pointer;
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        transform 180ms ease;
}

.employee-photo-field {
    display: grid;
    gap: 8px;
    justify-items: start;
}

.employee-photo-field > span:first-child {
    color: var(--app-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.employee-form-readonly label > span:not(.date-triplet):not(.inline-control),
.employee-form-readonly .field-label {
    color: #667085;
}

.employee-form-readonly input:not([type="hidden"]):not([type="file"]),
.employee-form-readonly select,
.employee-form-readonly .readonly-field {
    opacity: 1;
    color: var(--app-text);
    background: #f8fafc;
    border-color: transparent;
    box-shadow: none;
}

.employee-form-readonly input[type="file"] {
    opacity: 0;
}

.employee-form-readonly .form-grid > label[data-field-icon] > input:not([type="hidden"]):not([type="file"]),
.employee-form-readonly .form-grid > label[data-field-icon] > select,
.employee-form-readonly .form-grid > label[data-field-icon] > .inline-control select,
.employee-form-readonly .form-grid > label[data-field-icon] > .nationality-picker input,
.employee-form-readonly .form-grid > label[data-field-icon] > .date-triplet {
    color: var(--app-text);
    background: #ffffff;
    border-color: var(--app-border);
}

.employee-form-readonly .nationality-picker__list {
    display: none;
}

.employee-form-readonly .inline-control .icon-button,
.employee-form-readonly .employee-photo-uploader__delete,
.employee-form-readonly .employee-attachment__delete {
    display: none;
}

.modal--wide .employee-form-readonly .employee-photo-uploader,
.employee-form-readonly .employee-photo-uploader {
    width: 104px;
    border-style: solid;
    border-color: rgba(148, 163, 184, 0.18);
    background: #f8fafc;
    cursor: default;
    transform: none;
}

.employee-form-readonly .employee-photo-uploader:hover,
.employee-form-readonly .employee-photo-uploader:focus-within {
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: none;
    transform: none;
}

.employee-form-readonly .employee-photo-uploader__placeholder {
    gap: 4px;
}

.employee-form-readonly .employee-photo-uploader__placeholder span:last-child {
    display: none;
}

.employee-form-readonly .employee-photo-uploader:not(.has-image) .employee-photo-uploader__placeholder::after {
    content: "لا توجد صورة";
    color: var(--app-muted);
    font-size: 0.72rem;
    font-weight: 800;
}

.employee-form-readonly .employee-photo-uploader__icon {
    width: 34px;
    height: 34px;
    font-size: 1.05rem;
    background: transparent;
    box-shadow: none;
}

.employee-photo-uploader:hover,
.employee-photo-uploader:focus-within {
    border-color: var(--app-accent);
    box-shadow: 0 14px 32px rgba(177, 143, 102, 0.16);
    transform: translateY(-1px);
}

.employee-photo-uploader__input {
    position: absolute;
    inset: 0;
    z-index: 3;
    opacity: 0;
    cursor: pointer;
}

.employee-photo-uploader__placeholder {
    display: grid;
    place-items: center;
    gap: 8px;
    padding: 12px;
    text-align: center;
}

.employee-photo-uploader__icon {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: var(--app-accent);
    background: rgba(177, 143, 102, 0.12);
    border-radius: 8px;
    font-size: 1.65rem;
    line-height: 1;
}

.employee-photo-uploader__preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: none;
    object-fit: contain;
    padding: 4px;
    background: #ffffff;
}

.employee-photo-uploader__delete {
    position: absolute;
    top: 8px;
    inset-inline-start: 8px;
    z-index: 4;
    display: none;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    background: rgba(180, 35, 24, 0.92);
    cursor: pointer;
    font: inherit;
    font-size: 1.15rem;
}

.employee-photo-uploader.has-image {
    border-style: solid;
}

.employee-photo-uploader.has-image .employee-photo-uploader__placeholder {
    display: none;
}

.employee-photo-uploader.has-image .employee-photo-uploader__preview,
.employee-photo-uploader.has-image .employee-photo-uploader__delete {
    display: block;
}

.employee-photo-uploader.has-image .employee-photo-uploader__delete {
    display: grid;
}

.employee-attachments {
    display: grid;
    gap: 10px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid var(--app-border);
    border-radius: 8px;
}

.employee-form-readonly .employee-attachments-section:not(.has-attachments) {
    display: none;
}

.employee-form-readonly .employee-attachments__drop {
    display: none;
}

.employee-attachments__drop {
    position: relative;
    display: grid;
    place-items: center;
    gap: 8px;
    min-height: 108px;
    padding: 14px;
    color: var(--app-muted);
    background:
        linear-gradient(135deg, rgba(177, 143, 102, 0.10), rgba(210, 214, 219, 0.14)),
        #ffffff;
    border: 1px dashed rgba(177, 143, 102, 0.55);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
}

.employee-attachments__drop input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.employee-attachments__icon {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: var(--app-accent);
    background: rgba(177, 143, 102, 0.12);
    border-radius: 8px;
    font-size: 1.6rem;
}

.employee-attachments__list {
    display: grid;
    gap: 8px;
}

.employee-attachment {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 10px;
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
}

.employee-attachment__name {
    min-width: 0;
    overflow: hidden;
    color: var(--app-text);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.employee-attachment__action {
    display: inline-grid;
    place-items: center;
    min-width: 34px;
    min-height: 30px;
    padding: 4px 8px;
    color: var(--app-accent);
    background: rgba(177, 143, 102, 0.10);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    text-decoration: none;
}

.employee-attachment__delete {
    color: #ffffff;
    background: var(--app-danger);
}

.image-uploader {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 180px;
    padding: 12px;
    overflow: hidden;
    color: var(--app-muted);
    background:
        linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(16, 42, 67, 0.04)),
        #ffffff;
    border: 1px dashed #a7b8c9;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.image-uploader:hover,
.image-uploader:focus-within {
    border-color: var(--app-accent);
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.12);
}

.image-uploader__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.image-uploader__placeholder {
    display: grid;
    place-items: center;
    gap: 8px;
    text-align: center;
    pointer-events: none;
}

.image-uploader__icon {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    color: var(--app-button-text);
    background: var(--app-accent);
    border-radius: 8px;
    font-size: 1.45rem;
    font-weight: 700;
}

.image-uploader__preview {
    display: none;
    width: 100%;
    height: 156px;
    max-width: 100%;
    max-height: 156px;
    object-fit: contain;
    object-position: center;
    border-radius: 8px;
    background: #ffffff;
    pointer-events: none;
}

.image-uploader__delete {
    position: absolute;
    inset-block-start: 10px;
    inset-inline-start: 10px;
    display: none;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    color: #ffffff;
    background: var(--app-danger);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    z-index: 2;
}

.image-uploader.has-image {
    border-style: solid;
    background: #f8fafc;
}

.image-uploader.has-image .image-uploader__placeholder {
    display: none;
}

.image-uploader.has-image .image-uploader__preview {
    display: block;
}

.image-uploader.has-image .image-uploader__delete {
    display: grid;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--app-border);
    border-radius: 8px;
}

table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    background: #ffffff;
}

.clients-table-wrap {
    width: 100%;
}

.clients-table {
    width: 100%;
    min-width: 100%;
    table-layout: fixed;
}

.requests-table-wrap {
    border-radius: 0;
}

.requests-page-shell {
    position: relative;
    margin-top: 20px;
    overflow: visible;
    isolation: isolate;
}

.requests-page-card {
    position: relative;
    z-index: 2;
    padding-top: 18px;
    overflow: visible;
}

.requests-search {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: min(100%, 520px);
}

.requests-search .search-field {
    flex: 1;
}

.request-filter-tabs {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px;
    margin: 0 0 -10px;
    padding-inline-start: 10px;
    direction: rtl;
}

.request-filter-tab {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: row-reverse;
    gap: 12px;
    min-width: 124px;
    min-height: 46px;
    padding: 11px 18px 13px;
    color: #667085;
    background: #edf2f8;
    border: 1px solid #d8e1ed;
    border-bottom-color: #cbd5e1;
    border-radius: 9px 9px 0 0;
    font-size: 0.86rem;
    font-weight: 900;
    text-decoration: none;
    box-shadow: inset 0 -10px 14px rgba(15, 23, 42, 0.03);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.request-filter-tab strong {
    display: inline-grid;
    place-items: center;
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    color: #6f5534;
    background: #fff8ed;
    border-radius: 999px;
    font-size: 0.78rem;
}

.request-filter-tab:hover,
.request-filter-tab.is-active {
    color: #10233d;
    background: #ffffff;
    border-color: #d9e1ec;
    border-bottom-color: #ffffff;
    box-shadow: 0 -8px 18px rgba(16, 24, 40, 0.06);
    transform: translateY(0);
}

.request-filter-tab.is-active {
    z-index: 3;
}

.requests-list-head {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 16px;
    margin-bottom: 30px;
    padding-top: 18px;
    background: #ffffff;
    direction: rtl;
}

.requests-list-head h2 {
    margin: 0;
    color: #14213d;
    font-size: 1.06rem;
    font-weight: 900;
}

.requests-export-actions {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
    justify-self: end;
    direction: ltr;
}

.request-export-button {
    display: inline-grid;
    place-items: center;
    width: 36px;
    min-height: 36px;
    color: #344054;
    background: #edf2f7;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.request-export-button:hover {
    background: #ffffff;
    border-color: rgba(177, 143, 102, 0.45);
    transform: translateY(-1px);
}

.request-export-button svg {
    width: 19px;
    height: 19px;
}

.requests-filter-bar {
    display: grid;
    grid-template-columns: 430px repeat(4, minmax(135px, 0.7fr)) auto;
    align-items: end;
    gap: 10px;
    margin-bottom: 14px;
    direction: rtl;
}

.requests-search-field input,
.requests-filter-select select {
    width: 100%;
}

.requests-search-group {
    display: flex;
    align-items: end;
    width: 430px;
    min-width: 0;
}

.requests-search-group .requests-search-field {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
}

.requests-search-group .requests-search-field input {
    border-start-end-radius: 0;
    border-end-end-radius: 0;
}

.requests-search-group .requests-search-submit {
    flex: 0 0 72px;
    border-start-start-radius: 0;
    border-end-start-radius: 0;
    position: relative;
    z-index: 1;
}

.requests-search-group .requests-search-field input:focus,
.requests-filter-select select:focus {
    outline: 0;
    border-color: var(--button-color, #b18f66);
    box-shadow: 0 0 0 2px rgba(177, 143, 102, 0.14);
}

.requests-search-group:focus-within .requests-search-submit {
    border-color: var(--button-color, #b18f66);
}

.requests-filter-select {
    display: grid;
    gap: 5px;
    min-width: 0;
    color: #667085;
    font-size: 0.74rem;
    font-weight: 900;
}

.requests-filter-select select {
    min-height: 39px;
    padding: 8px 10px;
    color: #14213d;
    background: #ffffff;
    border: 1px solid #d9e1ec;
    border-radius: 8px;
    font: inherit;
}

.requests-search-submit,
.requests-filter-submit {
    min-height: 39px;
    padding-inline: 18px;
}

.requests-filter-actions {
    display: inline-flex;
    align-items: end;
    gap: 8px;
    white-space: nowrap;
}

.requests-filter-clear {
    min-height: 39px;
    padding-inline: 18px;
}

.requests-table {
    min-width: 1240px;
    table-layout: fixed;
}

.stats-dashboard {
    display: grid;
    gap: 18px;
}

.stats-section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    padding: 4px 2px 6px;
}

.stats-section-head h2 {
    margin: 0;
    color: #14213d;
    font-size: 1.25rem;
    font-weight: 900;
}

.stats-section-head p {
    margin: 6px 0 0;
    color: #667085;
    font-size: 0.86rem;
    font-weight: 800;
}

.stats-section-head > span {
    color: #7b8798;
    font-size: 0.8rem;
    font-weight: 900;
    white-space: nowrap;
}

.stats-hero-grid {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(260px, 1fr) minmax(360px, 1.4fr);
    gap: 16px;
}

.stats-total-card,
.stats-donut-card,
.stats-line-card,
.stats-panel,
.stats-status-card {
    background: #ffffff;
    border: 1px solid #dfe7f2;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.stats-total-card {
    display: grid;
    align-content: center;
    min-height: 178px;
    padding: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, #2f3b52, #b18f66);
    border-color: transparent;
    border-radius: 8px;
}

.stats-total-card span,
.stats-total-card small {
    color: rgba(255, 255, 255, 0.82);
    font-weight: 900;
}

.stats-total-card strong {
    margin: 8px 0 2px;
    font-size: clamp(2.7rem, 5vw, 4.2rem);
    font-weight: 900;
    line-height: 1;
}

.stats-donut-card {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 178px;
    padding: 22px;
    border-radius: 8px;
}

.stats-donut,
.stats-mini-ring {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    background:
        radial-gradient(circle at center, #fff 0 56%, transparent 57%),
        conic-gradient(#0f9f8f calc(var(--value) * 1%), #e8eef6 0);
    border-radius: 50%;
}

.stats-donut {
    width: 128px;
    height: 128px;
}

.stats-donut span {
    color: #14213d;
    font-size: 1.5rem;
    font-weight: 900;
}

.stats-donut-card h3,
.stats-line-card h3,
.stats-panel h3 {
    margin: 0;
    color: #14213d;
    font-size: 1rem;
    font-weight: 900;
}

.stats-donut-card p,
.stats-client-card p {
    margin: 8px 0 0;
    color: #667085;
    font-size: 0.84rem;
    font-weight: 800;
}

.stats-line-card {
    display: grid;
    gap: 8px;
    min-height: 178px;
    padding: 18px 20px 14px;
    color: #2e6fbb;
    border-radius: 8px;
}

.stats-line-card header,
.stats-panel header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.stats-line-card header strong,
.stats-panel header span {
    color: #7b5a35;
    background: #fff7ea;
    border: 1px solid rgba(177, 143, 102, 0.22);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.76rem;
    font-weight: 900;
}

.stats-line-card svg {
    width: 100%;
    min-height: 92px;
    color: #2e6fbb;
    background: linear-gradient(180deg, rgba(46, 111, 187, 0.08), rgba(46, 111, 187, 0));
    border-radius: 8px;
}

.stats-line-labels {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    color: #8a94a6;
    font-size: 0.7rem;
    font-weight: 900;
    text-align: center;
}

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

.stats-status-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    border-radius: 8px;
}

.stats-status-card span {
    color: #667085;
    font-size: 0.78rem;
    font-weight: 900;
}

.stats-status-card strong {
    color: #14213d;
    font-size: 1.7rem;
    font-weight: 900;
    line-height: 1;
}

.stats-fill,
.stats-bar,
.stats-people-bars article div {
    height: 9px;
    overflow: hidden;
    background: #eef3f8;
    border-radius: 999px;
}

.stats-fill i,
.stats-bar i,
.stats-people-bars article div i {
    display: block;
    height: 100%;
    background: #b18f66;
    border-radius: inherit;
}

.stats-status-card.is-processing .stats-fill i {
    background: #2e6fbb;
}

.stats-status-card.is-completed .stats-fill i {
    background: #0f9f8f;
}

.stats-status-card.is-archive .stats-fill i {
    background: #8b5cf6;
}

.stats-status-card.is-deleted .stats-fill i {
    background: #ef4444;
}

.stats-layout-grid {
    display: grid;
    grid-template-columns: minmax(360px, 1.35fr) minmax(320px, 1fr);
    gap: 16px;
}

.stats-panel {
    display: grid;
    align-content: start;
    gap: 14px;
    min-width: 0;
    padding: 18px;
    border-radius: 8px;
}

.stats-department-panel {
    grid-row: span 2;
}

.stats-department-list,
.stats-people-bars {
    display: grid;
    gap: 12px;
}

.stats-department-list article,
.stats-people-bars article {
    display: grid;
    gap: 7px;
}

.stats-department-list article > div:first-child,
.stats-people-bars article {
    min-width: 0;
}

.stats-department-list strong,
.stats-people-bars span {
    display: block;
    color: #14213d;
    font-size: 0.86rem;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stats-department-list span,
.stats-people-bars strong {
    color: #667085;
    font-size: 0.76rem;
    font-weight: 900;
}

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

.stats-employee-summary article {
    min-height: 88px;
    padding: 14px;
    background: #f8fbff;
    border: 1px solid #e3ebf5;
    border-radius: 8px;
}

.stats-employee-summary span,
.stats-client-card span {
    color: #667085;
    font-size: 0.78rem;
    font-weight: 900;
}

.stats-employee-summary strong,
.stats-client-card strong {
    display: block;
    margin-top: 6px;
    color: #14213d;
    font-size: 1.8rem;
    font-weight: 900;
}

.stats-employee-summary small {
    color: #0f766e;
    font-size: 0.74rem;
    font-weight: 900;
}

.stats-role-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.stats-role-cloud span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 10px;
    color: #344054;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 900;
}

.stats-role-cloud b {
    color: #7b5a35;
}

.stats-people-bars article {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.stats-people-bars article div {
    grid-column: 1 / -1;
}

.stats-client-card {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff, #f7fbff);
}

.stats-mini-ring {
    position: absolute;
    left: 18px;
    bottom: 18px;
    width: 88px;
    height: 88px;
}

.stats-mini-ring b {
    color: #14213d;
    font-size: 1.25rem;
    font-weight: 900;
}

.stats-mini-ring small {
    color: #667085;
    font-size: 0.7rem;
    font-weight: 900;
}

.stats-empty {
    margin: 0;
    color: #8a94a6;
    font-size: 0.84rem;
    font-weight: 900;
}

.requests-table thead th {
    background: #dfe9ff;
    color: #0f2144;
    font-size: 0.84rem;
    font-weight: 900;
    white-space: nowrap;
}

.requests-table th,
.requests-table td {
    padding: 13px 14px;
    border-bottom: 1px solid #e2e8f0;
    color: #14213d;
    font-size: 0.84rem;
    text-align: right;
    vertical-align: middle;
}

.requests-table th:nth-child(1),
.requests-table td:nth-child(1) {
    width: 145px;
}

.requests-table th:nth-child(2),
.requests-table td:nth-child(2) {
    width: 170px;
}

.requests-table th:nth-child(3),
.requests-table td:nth-child(3),
.requests-table th:nth-child(4),
.requests-table td:nth-child(4),
.requests-table th:nth-child(5),
.requests-table td:nth-child(5) {
    width: 150px;
}

.requests-table .request-col-priority,
.requests-table .request-col-status,
.requests-table .request-col-origin,
.requests-table .request-col-time,
.requests-table .request-col-actions,
.requests-table .request-compact-cell,
.requests-table .request-time-cell,
.requests-table .request-actions {
    width: 92px;
    padding-inline: 8px;
    text-align: center;
}

.requests-table .request-col-status,
.requests-table .request-compact-cell:nth-child(7) {
    width: 118px;
}

.requests-table .request-col-time,
.requests-table .request-time-cell {
    width: 86px;
    white-space: nowrap;
}

.requests-table tbody tr:nth-child(even) {
    background: #f3f7ff;
}

.requests-table tbody tr:hover {
    background: rgba(177, 143, 102, 0.08);
}

.requests-table tbody tr.request-row {
    cursor: pointer;
}

.requests-table tbody tr.request-row:focus {
    outline: 2px solid rgba(177, 143, 102, 0.45);
    outline-offset: -2px;
}

.requests-table .request-number {
    color: #09214a;
    font-weight: 900;
    text-align: center;
    white-space: nowrap;
}

.requests-table thead th:first-child {
    text-align: center;
}

.requests-table .request-number a {
    color: inherit;
    text-decoration: none;
}

.request-actions {
    text-align: center !important;
    white-space: nowrap;
}

.request-actions form {
    margin: 0;
}

.request-trash-button {
    display: inline-grid;
    place-items: center;
    width: 38px;
    min-height: 38px;
    color: #dc2626;
    background: #fff7f7;
    border: 1px solid #fee2e2;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.request-trash-button:hover {
    border-color: #fecaca;
    box-shadow: 0 8px 18px rgba(220, 38, 38, 0.12);
    transform: translateY(-1px);
}

.request-trash-button:disabled,
.request-trash-button:disabled:hover {
    color: #b8c1cc;
    background: #f8fafc;
    border-color: #e2e8f0;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.request-trash-button svg {
    width: 18px;
    height: 18px;
}

.requests-empty {
    padding: 32px 16px;
    color: #667085;
    font-weight: 900;
    text-align: center !important;
}

.request-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 13px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 900;
    white-space: nowrap;
}

.requests-table .request-pill {
    max-width: 100%;
    min-height: 26px;
    padding: 4px 9px;
    font-size: 0.76rem;
    white-space: normal;
    line-height: 1.25;
}

.request-pill--priority {
    color: #13866b;
    background: #e4f8f2;
}

.request-pill--status {
    color: #2864e6;
    background: #eaf1ff;
}

.request-pill--origin.is-admin {
    color: #7b5a35;
    background: #fff7ea;
    border: 1px solid rgba(177, 143, 102, 0.22);
}

.request-pill--origin.is-client {
    color: #0f766e;
    background: #e6f7f4;
    border: 1px solid rgba(15, 118, 110, 0.16);
}

.clients-table th:nth-child(1),
.clients-table td:nth-child(1) {
    width: 26%;
}

.clients-table th:nth-child(2),
.clients-table td:nth-child(2),
.clients-table th:nth-child(3),
.clients-table td:nth-child(3) {
    width: 16%;
}

.clients-table th:nth-child(4),
.clients-table td:nth-child(4) {
    width: 22%;
}

.clients-table th:nth-child(5),
.clients-table td:nth-child(5) {
    width: 8%;
}

.clients-table th:nth-child(6),
.clients-table td:nth-child(6) {
    width: 12%;
}

.client-actions {
    display: table-cell;
    direction: ltr;
    white-space: nowrap;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid var(--app-border);
    text-align: right;
    vertical-align: middle;
}

th {
    color: var(--app-muted);
    background: #f8fafc;
    font-size: 0.82rem;
}

tr:last-child td {
    border-bottom: 0;
}

.departments-table th,
.departments-table td {
    padding-block: 8px;
    text-align: center;
    vertical-align: middle;
}

.departments-table .department-name-cell {
    display: grid;
    justify-items: center;
    gap: 1px;
    line-height: 1.2;
}

.departments-table .department-name-cell strong {
    color: var(--app-text);
    font-size: 1rem;
    font-weight: 800;
}

.departments-table .department-name-cell small {
    color: var(--app-muted);
    font-size: 0.68rem;
    font-weight: 600;
    direction: ltr;
}

.departments-table .mini-chips {
    justify-content: center;
}

.departments-table td:last-child {
    white-space: nowrap;
}

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

.employee-tabs {
    display: inline-flex;
    gap: 6px;
    margin-bottom: 12px;
    padding: 5px;
    background: #f2f4f7;
    border: 1px solid var(--app-border);
    border-radius: 8px;
}

.employee-tab {
    min-width: 86px;
    min-height: 36px;
    padding: 7px 14px;
    color: var(--app-muted);
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
}

.employee-tab.is-active {
    color: var(--app-button-text);
    background: var(--app-accent);
    box-shadow: 0 8px 20px rgba(16, 42, 67, 0.1);
}

.employee-list-table {
    width: max-content;
    min-width: 100%;
}

.employee-list-table th,
.employee-list-table td {
    white-space: nowrap;
}

.employee-row {
    cursor: pointer;
    transition:
        background-color 150ms ease,
        box-shadow 150ms ease;
}

.employee-row:hover,
.employee-row:focus-visible {
    background: rgba(177, 143, 102, 0.06);
}

.employee-row:focus-visible {
    outline: 2px solid rgba(177, 143, 102, 0.36);
    outline-offset: -2px;
}

.employee-actions {
    display: table-cell;
    direction: ltr;
    white-space: nowrap;
}

.employee-action-button {
    width: 38px;
    min-height: 38px;
    color: var(--app-text);
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
    transition:
        border-color 150ms ease,
        background-color 150ms ease,
        transform 150ms ease,
        box-shadow 150ms ease;
}

.employee-action-button + .employee-action-button {
    margin-inline-start: 8px;
}

.employee-action-button:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    box-shadow: 0 6px 14px rgba(16, 24, 40, 0.08);
    transform: translateY(-1px);
}

.employee-action-button:disabled,
.employee-action-button:disabled:hover {
    color: #b8c1cc;
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.75;
    transform: none;
}

.employee-action-button--delete {
    color: #ef4444;
}

.employee-action-button--edit {
    color: #2563eb;
}

.employee-action-button--toggle {
    color: #16a34a;
}

.employee-action-button--otp {
    color: #f97316;
}

.icon-button.soft-danger {
    color: #b42318;
    background: #fff1f0;
}

.icon-button.soft-danger:hover {
    background: #ffe4e2;
}

.is-column-hidden {
    display: none !important;
}

.modal.column-settings-modal {
    width: min(980px, calc(100vw - 32px));
}

.column-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.column-toggle {
    display: grid;
    justify-items: center;
    align-content: center;
    align-items: center;
    gap: 7px;
    min-height: 78px;
    padding: 10px 8px;
    color: var(--app-text);
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.86rem;
    text-align: center;
    transition:
        border-color 160ms ease,
        background-color 160ms ease,
        color 160ms ease,
        transform 160ms ease;
}

.column-toggle:hover {
    border-color: rgba(177, 143, 102, 0.42);
    background: rgba(177, 143, 102, 0.08);
    transform: translateY(-1px);
}

.column-toggle.is-hidden {
    color: #98a2b3;
    background: #f8fafc;
}

.column-toggle__icon {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    color: var(--app-accent);
}

.column-toggle.is-hidden .column-toggle__icon {
    color: #98a2b3;
}

.column-toggle__icon svg {
    width: 22px;
    height: 22px;
}

.status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 3px 9px;
    border-radius: 999px;
    color: #05603a;
    background: #dcfae6;
    font-size: 0.82rem;
    font-weight: 700;
}

.status.pending {
    color: var(--app-warning);
    background: #fffaeb;
}

.employee-table-photo {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 50%;
    color: var(--app-accent);
    background: rgba(177, 143, 102, 0.12);
    border: 1px solid rgba(177, 143, 102, 0.22);
    font-size: 0.86rem;
    font-weight: 700;
}

.employee-table-photo--empty {
    text-align: center;
}

.attachment-state {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
}

.attachment-state svg {
    width: 21px;
    height: 21px;
}

.attachment-state.has-files {
    color: var(--app-accent);
    background: rgba(177, 143, 102, 0.13);
}

.attachment-state.is-empty {
    color: #98a2b3;
    background: #f2f4f7;
}

.permissions-table-wrap {
    border-radius: 8px;
}

.permissions-table {
    min-width: 980px;
}

.permissions-table th,
.permissions-table td {
    text-align: center;
}

.permissions-table th:first-child,
.permissions-table td:first-child {
    text-align: right;
    min-width: 260px;
}

.permission-page-name {
    color: #344054;
    font-weight: 700;
}

.permission-check {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    cursor: pointer;
}

.permission-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--app-accent);
    cursor: pointer;
}

.chips-box,
.mini-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chips-box {
    min-height: 44px;
    padding: 8px;
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
}

.chips-box__empty {
    align-self: center;
    color: var(--app-muted);
    font-size: 0.86rem;
}

.member-chip,
.mini-chips span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 4px 9px;
    color: #0b4f4a;
    background: #d8f3dc;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 700;
}

.member-chip button {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    padding: 0;
    color: #ffffff;
    background: var(--app-danger);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    line-height: 1;
}

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

.work-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: #ffffff;
}

.work-item__step {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--app-accent);
    font-weight: 700;
}

.settings-preview {
    display: grid;
    gap: 12px;
    min-height: 220px;
    padding: 16px;
    color: var(--app-header);
    background: var(--app-header-bg);
    border: 1px dashed var(--app-border);
    border-radius: 8px;
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    color: #ffffff;
    background: var(--app-header);
    border-radius: 8px;
}

.preview-logo {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    color: var(--app-header);
    background: #ffffff;
    font-weight: 700;
}

.print-settings-panel {
    overflow: hidden;
}

.print-settings-form,
.print-settings-section {
    display: grid;
    gap: 18px;
}

.print-settings-section {
    padding: 18px;
    background: #ffffff;
    border: 1px solid #e3e9f2;
    border-radius: 8px;
}

.print-settings-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #edf1f7;
}

.print-settings-section__head h2 {
    margin: 0;
    color: #19243a;
    font-size: 1.02rem;
    font-weight: 900;
}

.print-header-settings {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.72fr) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}

.print-header-settings label,
.print-body-settings label,
.print-footer-column-card label {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.print-header-settings label > span:first-child,
.print-body-settings label > span:first-child,
.print-footer-column-card label > span:first-child {
    color: var(--app-muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.print-header-settings textarea,
.print-header-settings input,
.print-body-settings input,
.print-footer-column-card textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    color: var(--app-text);
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    font: inherit;
}

.print-header-settings textarea,
.print-footer-column-card textarea {
    resize: vertical;
    line-height: 1.7;
}

.print-logo-uploader .image-uploader--print {
    min-height: 186px;
}

.image-uploader--print,
.image-uploader--wide,
.image-uploader--footer-icon {
    min-height: 132px;
}

.image-uploader--wide {
    min-height: 170px;
}

.image-uploader--footer-icon {
    min-height: 92px;
}

.image-uploader__icon--camera svg {
    width: 28px;
    height: 28px;
}

.print-meta-fields {
    display: grid;
    gap: 10px;
}

.print-body-settings {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 0.28fr);
    gap: 16px;
    align-items: end;
}

.print-footer-settings {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.print-footer-column-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    background: #f8fbff;
    border: 1px solid #e1e8f2;
    border-radius: 8px;
}

.print-footer-preview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: center;
    margin-top: 2px;
    padding: 12px 20px;
    background:
        radial-gradient(circle at 50% -10%, rgba(224, 164, 82, 0.08), transparent 20%),
        linear-gradient(135deg, #f4f4f4 0 22%, #ffffff 22% 100%);
    border: 1px solid #eceff4;
    border-radius: 8px;
    direction: ltr;
}

.print-footer-preview div {
    display: grid;
    justify-items: center;
    gap: 6px;
    min-width: 0;
    text-align: center;
}

.print-footer-preview span {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    color: #ffffff;
    background: #dda154;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 900;
}

.print-footer-preview span.has-image {
    background: transparent;
}

.print-footer-preview span img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.print-footer-preview p {
    margin: 0;
    color: #667085;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.print-settings-actions {
    display: flex;
    justify-content: flex-end;
}

.employee-device {
    min-height: 100vh;
    background: #eef4f8;
}

.employee-device.mobile .employee-frame {
    width: min(430px, 100%);
    min-height: 100vh;
    margin-inline: auto;
    background: #ffffff;
}

.employee-device.desktop .employee-frame {
    width: min(1160px, 100%);
    margin: 0 auto;
    padding: 24px;
}

.employee-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px;
    color: #ffffff;
    background: #0b1f33;
}

.employee-profile-notice {
    margin: 18px 18px 0;
    padding: 14px 16px;
    color: #14532d;
    background: #ecfdf3;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    font-weight: 800;
}

.employee-content {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.request-card {
    padding: 14px;
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
}

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

.client-mobile-shell {
    --client-gold: #b18f66;
    --client-gold-soft: #d8bd91;
    --client-brown: #7b5a35;
    --client-brown-dark: #4a321d;
    --client-silver: #8792a2;
    --client-ink: #172033;
    min-height: 100vh;
    color: #152033;
    background:
        radial-gradient(circle at 50% 0%, rgba(177, 143, 102, 0.13), transparent 34%),
        #f9fbff;
    font-family: "Tajawal", Tahoma, Arial, sans-serif;
    overflow-x: hidden;
}

.client-mobile-app {
    width: min(430px, 100%);
    min-height: 100vh;
    margin-inline: auto;
    padding: max(18px, env(safe-area-inset-top)) 18px 108px;
}

.client-rotate-message {
    display: none;
}

.client-rotate-icon {
    width: 92px;
    height: auto;
    color: var(--client-brown);
    fill: currentColor;
}

.client-mobile-header {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px 44px;
    align-items: center;
    gap: 12px;
    min-height: 66px;
}

.client-mobile-header .client-icon-button:first-child {
    grid-column: 3;
    grid-row: 1;
}

.client-mobile-header .client-logout-link {
    grid-column: 4;
    grid-row: 1;
}

.client-mobile-header .client-mobile-logo {
    grid-column: 2;
    grid-row: 1;
}

.client-mobile-header .client-icon-button:last-child {
    grid-column: 1;
    grid-row: 1;
}

.client-mobile-logo {
    color: var(--client-brown);
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: 0;
    text-align: center;
}

.client-icon-button {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: #172033;
    background: transparent;
    border: 0;
    cursor: pointer;
    text-decoration: none;
}

.client-icon-button svg {
    width: 30px;
    height: 30px;
}

.client-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 122px;
    align-items: center;
    gap: 8px;
    padding: 16px 2px 20px;
}

.client-hero__text {
    text-align: center;
}

.client-hero h1 {
    margin: 0 0 8px;
    font-size: 1.55rem;
}

.client-hero p {
    margin: 0;
    color: #344054;
    font-size: 1.08rem;
    line-height: 1.8;
}

.client-bot {
    display: grid;
    place-items: center;
}

.client-bot__head {
    position: relative;
    display: grid;
    place-items: center;
    width: 108px;
    aspect-ratio: 1;
    background:
        radial-gradient(circle at 35% 18%, #ffffff, #e9f2f7 62%, #c9dbe8);
    border: 1px solid rgba(11, 31, 51, 0.08);
    border-radius: 50%;
    box-shadow: 0 18px 35px rgba(16, 42, 67, 0.13);
}

.client-bot__head::before,
.client-bot__head::after {
    content: "";
    position: absolute;
    top: 43%;
    width: 14px;
    height: 34px;
    background: var(--client-gold);
    border-radius: 999px;
}

.client-bot__head::before {
    right: 4px;
}

.client-bot__head::after {
    left: 4px;
}

.client-bot__face {
    display: grid;
    grid-template-columns: 1fr 1fr;
    place-items: center;
    gap: 18px;
    width: 72px;
    height: 46px;
    background: #102033;
    border-radius: 22px;
}

.client-bot__face span {
    width: 13px;
    height: 13px;
    background: var(--client-gold-soft);
    border-radius: 50%;
}

.client-bot__face.wink span:last-child {
    width: 15px;
    height: 4px;
    border-radius: 999px;
}

.client-search-card {
    padding: 22px 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--client-brown-dark), var(--client-brown) 48%, var(--client-gold));
    border-radius: 18px;
    box-shadow: 0 18px 34px rgba(123, 90, 53, 0.23);
}

.client-search-card h2 {
    margin: 0 0 18px;
    font-size: 1.15rem;
    text-align: center;
}

.client-search {
    position: relative;
    display: block;
}

.client-search input {
    width: 100%;
    min-height: 58px;
    padding: 10px 18px 10px 58px;
    color: #172033;
    background: #ffffff;
    border: 0;
    border-radius: 10px;
    font-weight: 700;
    text-align: center;
}

.client-search svg {
    position: absolute;
    top: 50%;
    left: 16px;
    width: 30px;
    height: 30px;
    color: #667085;
    transform: translateY(-50%);
}

.client-services {
    margin-top: 26px;
}

.client-services h2 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 14px;
    font-size: 1.18rem;
}

.client-services h2 span {
    width: 18px;
    height: 5px;
    background: var(--client-gold);
    border-radius: 999px;
}

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

.client-service-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    min-height: 66px;
    padding: 9px 8px;
    color: var(--service-color);
    direction: rtl;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 12px 24px rgba(16, 42, 67, 0.07);
}

.client-service-card span {
    grid-column: 2;
    grid-row: 1;
    color: var(--service-color);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: right;
    white-space: normal;
    word-break: keep-all;
}

.client-service-card svg {
    grid-column: 1;
    grid-row: 1;
    width: 42px;
    height: 42px;
    padding: 9px;
    color: #ffffff;
    background: var(--service-color);
    border-radius: 12px;
}

.client-service-card.teal { --service-color: #9a7647; }
.client-service-card.violet { --service-color: #6f7785; }
.client-service-card.orange { --service-color: #b18f66; }
.client-service-card.amber { --service-color: #c49a52; }
.client-service-card.blue { --service-color: #7f8b99; }
.client-service-card.pink { --service-color: #a56f61; }
.client-service-card.red { --service-color: #9b4e43; }

.client-assistant-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 145px;
    align-items: center;
    gap: 4px;
    min-height: 210px;
    margin-top: 28px;
    padding: 22px 20px;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, var(--client-brown), var(--client-gold));
    border-radius: 18px;
}

.client-assistant-card h2 {
    margin: 0 0 10px;
    font-size: 1.45rem;
}

.client-assistant-card p {
    margin: 0 0 18px;
    line-height: 1.8;
}

.client-assistant-card button {
    min-width: 150px;
    min-height: 48px;
    color: #10205a;
    background: #ffffff;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
}

.client-bot--large .client-bot__head {
    width: 132px;
    box-shadow: none;
}

.client-bottom-nav {
    position: fixed;
    right: 50%;
    bottom: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: end;
    width: min(430px, 100%);
    min-height: 86px;
    padding: 10px 16px max(10px, env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -18px 40px rgba(16, 42, 67, 0.11);
    transform: translateX(50%);
}

.client-bottom-nav a {
    display: grid;
    place-items: center;
    gap: 4px;
    color: #8a94a6;
    font-size: 0.76rem;
    font-weight: 800;
}

.client-bottom-nav svg {
    width: 27px;
    height: 27px;
}

.client-bottom-nav a.is-active {
    color: var(--client-brown);
}

.client-bottom-nav .client-nav-bot {
    width: 70px;
    height: 70px;
    place-self: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--client-brown), var(--client-gold));
    border-radius: 50%;
    box-shadow: 0 12px 26px rgba(177, 143, 102, 0.30);
    transform: translateY(-18px);
}

.client-bottom-nav .client-nav-bot svg {
    width: 40px;
    height: 40px;
}

@media (orientation: landscape) and (max-height: 560px) {
    .client-mobile-app,
    .client-bottom-nav {
        display: none;
    }

    .client-rotate-message {
        display: grid;
        place-items: center;
        align-content: center;
        gap: 10px;
        min-height: 100vh;
        padding: 24px;
        color: #172033;
        text-align: center;
    }

    .client-rotate-message strong {
        font-size: 1.4rem;
    }
}

@media (max-width: 390px) {
    .client-mobile-app {
        padding-inline: 12px;
    }

    .client-services__grid {
        gap: 8px;
    }
}

@media (max-width: 1180px) {
    .permit-payment-installment__head {
        grid-template-columns: 1fr;
        grid-template-areas:
            "title"
            "methods";
        direction: rtl;
    }

    .permit-payment-installment__title {
        justify-items: start;
        text-align: start;
    }

    .permit-payment-installment__head .permit-payment-methods {
        width: 100%;
    }

    .permit-payment-methods {
        min-width: 0;
        width: 100%;
    }

    .permit-payment-inline-fields,
    .permit-payment-inline-fields.is-transfer,
    .permit-payment-inline-fields.is-network,
    .permit-payment-inline-fields.is-cash {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .permit-offer-payment-row {
        grid-template-columns: minmax(140px, 1.2fr) minmax(58px, 0.5fr) minmax(72px, 0.65fr) minmax(72px, 0.65fr) 34px;
    }

    .permit-offer-payment-row label:nth-of-type(5) {
        grid-column: 1 / -2;
    }

    .permit-offer-payment-row label:nth-of-type(2) input,
    .permit-offer-payment-row label:nth-of-type(3) input,
    .permit-offer-payment-row label:nth-of-type(4) input {
        font-size: 0.82rem;
    }

    .permit-offer-payment-row button {
        grid-column: -2 / -1;
        grid-row: 1 / span 2;
        align-self: end;
    }

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

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

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

    .requests-search-group,
    .requests-filter-actions {
        grid-column: 1 / -1;
    }
}

@container (max-width: 760px) {
    .permit-offer-payment-row {
        grid-template-columns: minmax(110px, 1.2fr) minmax(48px, 0.45fr) minmax(58px, 0.6fr) minmax(58px, 0.6fr) 34px;
    }

    .permit-offer-payment-row label:nth-of-type(5) {
        grid-column: 1 / -2;
    }

    .permit-offer-payment-row label:nth-of-type(2) input,
    .permit-offer-payment-row label:nth-of-type(3) input,
    .permit-offer-payment-row label:nth-of-type(4) input,
    .permit-payment-date-triplet input {
        font-size: 0.78rem;
    }

    .permit-offer-payment-row button {
        grid-column: -2 / -1;
        grid-row: 1 / span 2;
        align-self: end;
    }
}

@container (max-width: 520px) {
    .permit-offer-payment-row {
        grid-template-columns: minmax(0, 1fr) minmax(52px, 72px) 34px;
    }

    .permit-offer-payment-row label:nth-of-type(1) {
        grid-column: 1 / 2;
    }

    .permit-offer-payment-row label:nth-of-type(2) {
        grid-column: 2 / 3;
    }

    .permit-offer-payment-row label:nth-of-type(3) {
        grid-column: 1 / 2;
    }

    .permit-offer-payment-row label:nth-of-type(4) {
        grid-column: 2 / 3;
    }

    .permit-offer-payment-row label:nth-of-type(5) {
        grid-column: 1 / -2;
    }

    .permit-offer-payment-row input {
        min-height: 38px;
        padding: 7px 6px;
    }

    .permit-offer-payment-row label:nth-of-type(2) input,
    .permit-offer-payment-row label:nth-of-type(3) input,
    .permit-offer-payment-row label:nth-of-type(4) input,
    .permit-payment-date-triplet input {
        font-size: 0.72rem;
    }

    .permit-payment-date-triplet {
        gap: 3px;
    }

    .permit-offer-payment-row button {
        grid-column: 3 / 4;
        grid-row: 1 / span 3;
        height: 38px;
    }
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    display: none;
    place-items: center;
    padding: 16px;
    background: rgba(11, 31, 51, 0.46);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 20;
}

.modal-backdrop.is-open {
    display: grid;
}

.modal {
    width: min(680px, 100%);
    max-height: 92vh;
    overflow: auto;
    padding: 18px;
    cursor: auto;
    box-shadow: 0 26px 70px rgba(11, 31, 51, 0.22);
}

.modal--wide {
    width: min(1040px, calc(100vw - 48px));
}

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

.modal--wide .employee-photo-uploader {
    width: 92px;
}

.modal__footer {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 16px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.toast {
    position: fixed;
    inset-inline-start: 24px;
    bottom: 24px;
    z-index: 30;
    max-width: min(360px, calc(100vw - 32px));
    padding: 12px 14px;
    color: #ffffff;
    background: #0f766e;
    border-radius: 8px;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
}

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

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

    .sidebar {
        position: static;
        height: auto;
        padding: 12px;
    }

    .nav-list {
        grid-auto-flow: column;
        grid-auto-columns: max-content;
        overflow-x: auto;
        padding-bottom: 4px;
    }

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

    .topbar__title {
        align-items: center;
    }

    .content-region {
        padding: 16px;
    }

    .employee-profile-head {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .employee-profile-head .last-login-summary {
        grid-column: 1 / -1;
        min-width: 0;
    }

    .span-3,
    .span-4,
    .span-6,
    .span-8 {
        grid-column: 1 / -1;
    }

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

    .permit-layout,
    .permit-grid--four,
    .permit-grid--service,
    .permit-grid--three,
    .permit-grid--two,
    .permit-review-grid {
        grid-template-columns: 1fr;
    }

    .permit-review-head {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .permit-review-title,
    .permit-review-head .status {
        justify-self: center;
        text-align: center;
    }

    .permit-review-card-grid {
        grid-template-columns: 1fr;
    }

    .permit-offer-payment-row {
        grid-template-columns: 1fr;
    }

    .permit-offer-payment-row button {
        grid-column: auto;
        grid-row: auto;
        justify-self: start;
    }

    .permit-price-offer {
        grid-template-columns: 1fr;
    }

    .permit-payment-methods {
        grid-template-columns: 1fr;
    }

    .permit-payment-inline-fields,
    .permit-payment-inline-fields.is-transfer,
    .permit-payment-inline-fields.is-network,
    .permit-payment-inline-fields.is-cash {
        grid-template-columns: 1fr;
    }

    .permit-price-offer > * {
        grid-column: 1;
    }

    .print-header-settings,
    .print-body-settings,
    .print-footer-settings,
    .print-footer-preview {
        grid-template-columns: 1fr;
    }

    .permit-action-log {
        grid-template-columns: 1fr;
    }

    .permit-previous-action__body {
        grid-template-columns: 1fr;
    }

    .permit-action-entry-card,
    .permit-action-attachments,
    .permit-action-log__time {
        grid-column: 1;
        grid-row: auto;
    }

    .permit-action-attachments {
        padding-top: 0;
    }

    .permit-action-log__time {
        justify-self: center;
        text-align: center;
    }

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

@media (max-width: 920px) {
    .column-settings-grid {
        grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
    }
}

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

    .employee-profile-head {
        align-items: start;
        gap: 12px;
        padding: 12px;
    }

    .modal--wide .employee-photo-uploader,
    .modal--wide .employee-form-readonly .employee-photo-uploader {
        width: 86px;
    }

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

.workflow-policy-note {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid rgba(177, 143, 102, 0.22);
    border-radius: 8px;
    background: rgba(177, 143, 102, 0.08);
    color: var(--app-text);
}

.routing-table-wrap {
    width: 100%;
}

.routing-table {
    min-width: 1080px;
}

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

.form-stage-picker,
.form-stage-editor-summary,
.form-stage-timeline-editor {
    background: #ffffff;
    border: 1px solid #e4eaf3;
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(16, 24, 40, 0.04);
}

.form-stage-picker {
    padding: 12px 18px;
}

.form-stage-picker label,
.form-stage-editor-summary label,
.stage-editor-step label {
    display: grid;
    gap: 8px;
}

.form-stage-picker span,
.form-stage-editor-summary span,
.stage-editor-step label span,
.stage-editor-label {
    color: #8a94a6;
    font-size: 0.82rem;
    font-weight: 900;
}

.form-stage-picker select,
.form-stage-editor-summary input,
.form-stage-editor-summary select,
.stage-editor-step input,
.stage-editor-step select,
.stage-editor-step .form-stage-static {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    color: #18233c;
    background: #ffffff;
    border: 1px solid #dfe6f0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 900;
}

.form-stage-editor-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.5fr);
    gap: 16px;
    padding: 18px 20px;
}

.form-stage-editor-summary input[readonly],
.stage-editor-step input[readonly],
.stage-editor-step .form-stage-static {
    color: #667085;
    background: #f8fafc;
}

.form-stage-timeline-editor {
    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--stages-count, 3), minmax(150px, 1fr));
    gap: 18px;
    padding: 22px 24px 28px;
    overflow-x: auto;
}

.form-stage-timeline-editor::before {
    position: absolute;
    top: 68px;
    right: 76px;
    left: 76px;
    height: 4px;
    content: "";
    background: #d9e0ea;
    border-radius: 999px;
}

.stage-editor-step {
    position: relative;
    display: grid;
    gap: 13px;
    justify-items: center;
    min-width: 150px;
    text-align: center;
    z-index: 1;
}

.stage-editor-dot {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #697386;
    background: #ffffff;
    border: 4px solid #a6afbd;
    border-radius: 50%;
    box-shadow: 0 0 0 5px #ffffff;
    font-weight: 900;
}

.stage-editor-step:first-child .stage-editor-dot,
.stage-editor-step.is-locked:nth-child(2) .stage-editor-dot {
    color: #19a35b;
    border-color: #45b36b;
}

.stage-editor-step label {
    width: 100%;
}

.stage-editor-step .form-stage-static {
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-stages-card {
    display: grid;
    gap: 14px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
}

.form-stages-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e7ecf3;
}

.form-stages-card header h3 {
    margin: 4px 0 0;
    color: #18233c;
    font-size: 1rem;
    font-weight: 900;
}

.form-stages-card header span {
    color: #7b8798;
    font-size: 0.78rem;
    font-weight: 800;
}

.form-stages-card header label {
    display: grid;
    gap: 7px;
    min-width: 170px;
}

.form-stages-card select,
.form-stage-row input {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    color: #19243a;
    background: #f8fbff;
    border: 1px solid #dce4ef;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 800;
}

.form-stage-row input[readonly] {
    color: #697386;
    background: #f3f6fa;
}

.form-stages-grid {
    display: grid;
    gap: 10px;
}

.form-stage-row {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
    gap: 12px;
    padding: 12px;
    background: #fbfcfe;
    border: 1px solid #e7ecf3;
    border-radius: 8px;
}

.form-stage-row.is-locked {
    background: #f5f7fb;
}

.form-stage-row label {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.form-stage-row label span {
    color: #7b8798;
    font-size: 0.76rem;
    font-weight: 900;
}

.form-stage-order {
    display: grid;
    gap: 6px;
    align-content: center;
    justify-items: center;
    min-height: 42px;
}

.form-stage-order > span:first-child {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: #ffffff;
    background: var(--button-color, #b18f66);
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 900;
}

.stage-lock-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 2px 8px;
    color: #667085;
    background: #edf1f6;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 900;
}

.form-stage-static {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 0 12px;
    color: #344054;
    background: #f3f6fa;
    border: 1px solid #dce4ef;
    border-radius: 8px;
    font-size: 0.86rem;
    font-weight: 900;
}

.routing-table th,
.routing-table td {
    vertical-align: middle;
}

.routing-form-name {
    font-weight: 700;
    color: #19243a;
}

.routing-table select {
    width: 100%;
    min-height: 42px;
    border: 1px solid #dce3ee;
    border-radius: 8px;
    background: #ffffff;
    color: var(--app-text);
    font-family: inherit;
    font-size: 0.95rem;
    padding: 0 12px;
}

.routing-role-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    gap: 8px;
}

.routing-role-options label {
    display: flex;
    gap: 8px;
    align-items: center;
    min-height: 36px;
    padding: 6px 10px;
    border: 1px solid #e1e7f0;
    border-radius: 8px;
    background: #ffffff;
    color: #31405a;
    font-size: 0.9rem;
}

.routing-role-options input {
    accent-color: var(--app-accent);
}

.form-routing-status {
    min-height: 24px;
    margin: 14px 0 0;
    font-weight: 700;
}

.form-routing-status[data-tone="success"] {
    color: #16865a;
}

.form-routing-status[data-tone="danger"] {
    color: #b42318;
}

@media (max-width: 980px) {
    .workflow-policy-note {
        align-items: flex-start;
        flex-direction: column;
    }

    .form-stages-card header,
    .form-stage-row {
        grid-template-columns: 1fr;
    }

    .form-stages-card header {
        align-items: stretch;
        flex-direction: column;
    }

    .routing-role-options {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }
}

@media (max-width: 900px) {
    .quote-client-page {
        min-height: 100dvh;
        overflow-y: auto;
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
        background: #ffffff;
    }

    .quote-client-shell {
        width: 100%;
        padding: 0 0 calc(82px + env(safe-area-inset-bottom));
    }

    .quote-client-workspace {
        gap: 0;
        padding: 0;
        background: #ffffff;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .quote-client-auth {
        width: min(100% - 32px, 420px);
        margin: 18vh auto 0;
        border-radius: 16px;
    }

    .quote-client-head {
        display: none;
    }

    .quote-client-choice-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .quote-client-decision-icons,
    .quote-client-payment-icons {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
    }

    .quote-client-preview {
        padding: 0;
        background: #f6f8fb;
        border: 0;
        border-radius: 0;
        overflow: visible;
    }

    .quote-client-preview .price-offer-a4 {
        width: 100%;
        min-height: 0;
        height: auto;
        padding: 0;
        color: #172033;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        transform: none;
        margin: 0;
        overflow: visible;
    }

    .quote-client-preview .price-offer-a4__header {
        display: none;
    }

    .quote-client-preview .price-offer-a4__meta,
    .quote-client-preview .price-offer-a4__body {
        font-size: 0.95rem;
    }

    .quote-client-preview .price-offer-a4__body {
        display: grid;
        gap: 12px;
        padding: 16px 14px 0;
        background: #f6f8fb;
        line-height: 1.75;
    }

    .quote-client-preview .price-offer-a4__body h2 {
        margin: 0;
        padding: 14px 16px;
        color: #172033;
        background: #ffffff;
        border: 1px solid #e4ebf3;
        border-radius: 14px;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
        font-size: 1.18rem;
        text-align: right;
    }

    .quote-client-preview .price-offer-a4__body h3 {
        margin: 0;
        padding: 12px 14px 0;
        color: #172033;
        background: #ffffff;
        border: 1px solid #e4ebf3;
        border-bottom: 0;
        border-radius: 14px 14px 0 0;
        font-size: 1rem;
    }

    .quote-client-preview .price-offer-a4__body p {
        margin: -12px 0 0;
        padding: 0 14px 12px;
        background: #ffffff;
        border-inline: 1px solid #e4ebf3;
        color: #344054;
        font-size: 0.92rem;
        font-weight: 800;
    }

    .quote-client-preview .price-offer-a4__body h2 + p {
        margin-top: 0;
        padding-top: 12px;
        border-top: 1px solid #e4ebf3;
        border-radius: 14px 14px 0 0;
    }

    .quote-client-preview .price-offer-a4__body p:has(+ h3),
    .quote-client-preview .price-offer-a4__body p:last-of-type {
        border-bottom: 1px solid #e4ebf3;
        border-radius: 0 0 14px 14px;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    }

    .quote-client-preview .quote-client-table-wrap {
        display: none;
    }

    .quote-client-preview .quote-mobile-cards {
        display: grid;
        gap: 8px;
        margin-top: 0;
        padding-bottom: 0;
    }

    .quote-client-company-signature {
        box-sizing: border-box;
        width: 100%;
        margin: 0;
        padding: 12px 14px;
        background: #ffffff;
        border-color: #e4ebf3;
        border-radius: 14px;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    }

    .quote-mobile-document-card,
    .quote-mobile-payment-card {
        box-sizing: border-box;
        width: 100%;
        background: #ffffff;
        border: 1px solid #e4ebf3;
        border-radius: 14px;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    }

    .quote-mobile-document-card {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px;
        min-height: 54px;
        padding: 12px 14px;
    }

    .quote-mobile-document-card strong,
    .quote-mobile-payment-card strong {
        color: #172033;
        font-size: 0.92rem;
        font-weight: 900;
        line-height: 1.5;
    }

    .quote-mobile-document-card span {
        display: inline-grid;
        place-items: center;
        width: 28px;
        height: 28px;
        border-radius: 999px;
        color: #ffffff;
        font-size: 1.15rem;
        font-weight: 900;
        line-height: 1;
    }

    .quote-mobile-document-card.is-received span {
        background: #16a34a;
    }

    .quote-mobile-document-card.is-missing span {
        background: #dc2626;
    }

    .quote-mobile-payment-card {
        display: grid;
        gap: 10px;
        padding: 14px;
    }

    .quote-mobile-payment-card header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .quote-mobile-payment-card header span {
        flex: 0 0 auto;
        padding: 4px 10px;
        color: #8a5f2e;
        background: #fff4e5;
        border: 1px solid #f2d2a7;
        border-radius: 999px;
        font-size: 0.82rem;
        font-weight: 900;
    }

    .quote-mobile-payment-card dl {
        display: grid;
        gap: 8px;
        margin: 0;
    }

    .quote-mobile-payment-card dl div {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding-top: 8px;
        border-top: 1px solid #edf1f6;
    }

    .quote-mobile-payment-card dt,
    .quote-mobile-payment-card dd {
        margin: 0;
        font-size: 0.84rem;
        font-weight: 800;
    }

    .quote-mobile-payment-card dt {
        color: #667085;
    }

    .quote-mobile-payment-card dd {
        color: #172033;
        text-align: left;
        direction: ltr;
    }

    .quote-client-preview .price-offer-a4__footer {
        display: none;
    }

    .quote-client-actions {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 20;
        gap: 8px;
        width: 100%;
        box-sizing: border-box;
        padding: 10px 12px max(12px, env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, 0.98);
        border-width: 1px 0 0;
        border-radius: 18px 18px 0 0;
        box-shadow: 0 -14px 34px rgba(15, 23, 42, 0.14);
        max-height: min(76dvh, 620px);
        overflow-y: auto;
    }

    .quote-client-choice {
        align-content: center;
        min-height: 52px;
        padding: 10px 8px;
        text-align: center;
    }

    .quote-client-choice strong {
        font-size: 0.96rem;
    }

    .quote-client-choice span {
        display: none;
    }

    .quote-client-decision-icons .quote-client-choice,
    .quote-client-payment-icons .quote-client-choice {
        min-height: 60px;
        padding: 7px 5px;
    }

    .quote-client-decision-icons .quote-client-choice svg,
    .quote-client-payment-icons .quote-client-choice svg {
        width: 26px;
        height: 26px;
    }

    .quote-client-decision-icons .quote-client-choice small,
    .quote-client-payment-icons .quote-client-choice small {
        display: block;
        font-size: 0.62rem;
    }

    .quote-client-revision,
    .quote-client-result {
        padding: 12px;
    }
}

@media (max-width: 430px) {
    .quote-client-preview .price-offer-a4 {
        padding-inline: 0;
    }

    .quote-client-actions {
        padding-inline: 10px;
    }

    .quote-client-choice strong {
        font-size: 0.9rem;
    }
}

@media print {
    @page {
        size: A4;
        margin: 14mm;
    }

    body.is-printing-quote-client {
        margin: 0;
        background: #ffffff;
    }

    body.is-printing-quote-client .quote-client-head,
    body.is-printing-quote-client .quote-client-stages,
    body.is-printing-quote-client .quote-client-actions {
        display: none !important;
    }

    body.is-printing-quote-client .quote-client-shell,
    body.is-printing-quote-client .quote-client-workspace,
    body.is-printing-quote-client .quote-client-preview {
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        border: 0 !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    body.is-printing-quote-client .price-offer-a4 {
        width: 210mm;
        height: 297mm;
        margin: 0 auto;
        border: 0;
        box-shadow: none;
        page-break-after: always;
    }

    body.is-printing-price-offer {
        background: #ffffff;
    }

    body.is-printing-price-offer .sidebar,
    body.is-printing-price-offer .topbar,
    body.is-printing-price-offer .app-footer,
    body.is-printing-price-offer .workflow-stages-panel,
    body.is-printing-price-offer .permit-review-head,
    body.is-printing-price-offer .permit-review-grid,
    body.is-printing-price-offer .permit-price-offer > :not(.permit-offer-preview),
    body.is-printing-price-offer .permit-offer-preview-actions,
    body.is-printing-price-offer .permit-side-panel,
    body.is-printing-price-offer .permit-form-actions {
        display: none !important;
    }

    body.is-printing-price-offer .admin-shell,
    body.is-printing-price-offer .main-panel,
    body.is-printing-price-offer .content-region,
    body.is-printing-price-offer .workflow-page,
    body.is-printing-price-offer .permit-layout,
    body.is-printing-price-offer .permit-main-panel,
    body.is-printing-price-offer .permit-review-panel,
    body.is-printing-price-offer .permit-price-offer,
    body.is-printing-price-offer .permit-offer-preview {
        display: block !important;
        width: auto !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    body.is-printing-price-offer .price-offer-a4 {
        width: 182mm;
        height: auto;
        min-height: 269mm;
        margin: 0;
        padding-bottom: 38mm;
        border: 0;
        box-shadow: none;
        page-break-after: always;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    body.is-printing-price-offer .price-offer-a4__footer {
        position: fixed;
        right: 18mm;
        left: 18mm;
        bottom: 12mm;
    }

    body {
        background: #ffffff;
        color: #000000;
    }

    .sidebar,
    .topbar,
    .app-footer,
    .toolbar,
    .button,
    .icon-button,
    .modal-backdrop {
        display: none !important;
    }

    .admin-shell,
    .main-panel,
    .content-region {
        display: block;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .panel,
    .stat-card,
    .request-card,
    .table-wrap {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none;
    }

    table {
        min-width: 0;
    }

    tr,
    img,
    .work-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
