:root{
    --navy:#12356b;
    --navy-dark:#0b244a;
    --blue:#2563eb;
    --blue-soft:#eaf1ff;
    --green:#16845b;
    --green-soft:#e8f7f0;
    --amber:#b66b08;
    --amber-soft:#fff6df;
    --red:#c43d4b;
    --red-soft:#fff0f1;
    --ink:#172033;
    --muted:#68748a;
    --line:#dfe5ee;
    --surface:#ffffff;
    --surface-soft:#f6f8fc;
    --page:#edf1f7;
    --shadow:0 14px 40px rgba(29, 48, 82, 0.08);
    --shadow-soft:0 5px 18px rgba(29, 48, 82, 0.07);
    --radius:16px;
}

.land-donation-party-editor{
    margin:10px 0 20px;
    padding:16px;
    border:1px solid #d9e3ef;
    border-radius:14px;
    background:linear-gradient(180deg,#f8fbff 0%,#f4f8fd 100%);
}

.land-donation-party-heading,
.land-donation-person-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
}

.land-donation-party-heading{
    padding:2px 2px 13px;
    border-bottom:1px solid #e1e8f2;
}

.land-donation-party-heading h3{
    margin:3px 0 0;
    color:#1d3760;
    font-size:17px;
    letter-spacing:0;
}

.land-donation-person-list{
    display:grid;
    gap:14px;
    margin-top:14px;
}

.land-donation-person-card{
    position:relative;
    border:1px solid #d7e1ed;
    border-radius:12px;
    padding:16px;
    background:#fff;
    box-shadow:0 5px 16px rgba(31,56,92,.05);
}

.land-donation-person-actions{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}

.land-donation-person-actions .btn{
    min-height:36px;
    border-radius:9px;
    font-size:12px;
}

.land-donation-person-actions .btn-danger{
    color:#a63745;
    border-color:#f0cfd4;
    background:#fff7f8;
}

.land-donation-person-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:15px 18px;
    margin-top:16px;
}

.land-donation-person-field{
    display:flex;
    flex-direction:column;
    gap:7px;
    min-width:0;
}

.land-donation-person-field.wide{
    grid-column:span 2;
}

.land-donation-person-field > span{
    color:#40516b;
    font-size:12px;
    font-weight:800;
    letter-spacing:.01em;
}

.land-donation-person-field input,
.land-donation-person-field select{
    width:100%;
    min-height:44px;
    min-width:0;
    padding:0 12px;
    border:1px solid #cfd9e7;
    border-radius:9px;
    color:#1d2a40;
    background:#fbfcfe;
    outline:none;
    font:inherit;
    font-size:14px;
    transition:border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.land-donation-person-field input:focus,
.land-donation-person-field select:focus{
    border-color:#6d96e8;
    background:#fff;
    box-shadow:0 0 0 4px rgba(37,99,235,.1);
}

.land-donation-person-field input::placeholder{
    color:#8995a8;
}

.land-donation-person-field input.legal-date-input{
    letter-spacing:.02em;
}

.land-donation-empty{
    margin:14px 0 0;
    padding:14px;
    border:1px dashed #cbd8e8;
    border-radius:10px;
    color:#65738d;
    background:#fff;
}

@media (max-width:720px){
    .land-donation-party-heading,
    .land-donation-person-head{
        align-items:flex-start;
        flex-direction:column;
    }

    .land-donation-person-actions{
        width:100%;
    }

    .land-donation-person-actions .btn{
        flex:1 1 140px;
    }

    .land-donation-person-grid{
        grid-template-columns:1fr;
    }

    .land-donation-person-field.wide{
        grid-column:auto;
    }
}

*{
    box-sizing:border-box;
}

[hidden]{
    display:none !important;
}

html{
    scroll-behavior:smooth;
}

body{
    margin:0;
    background:var(--page);
    color:var(--ink);
    font-family:Inter, "Segoe UI", Arial, sans-serif;
    font-size:15px;
}

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

.app-header{
    position:sticky;
    z-index:100;
    top:0;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    min-height:60px;
    padding:8px clamp(18px, 2.6vw, 44px);
    color:white;
    background:linear-gradient(115deg, var(--navy-dark), var(--navy) 56%, #224d91);
    box-shadow:0 4px 18px rgba(11, 36, 74, 0.18);
}

.brand{
    display:flex;
    align-items:center;
    gap:10px;
    flex:0 0 auto;
}

.brand-button{
    margin:0;
    padding:0;
    border:0;
    color:inherit;
    background:transparent;
    text-align:left;
    cursor:pointer;
}

.brand-button:hover .brand-mark{
    border-color:rgba(255,255,255,0.44);
    background:url("/assets/office-assistant-mark-transparent.png") center / 29px 29px no-repeat, url("/assets/office-assistant-background-v2.png") center / cover no-repeat;
}

.brand-mark{
    display:grid;
    width:38px;
    height:38px;
    place-items:center;
    border:1px solid rgba(255,255,255,0.72);
    border-radius:12px;
    background:url("/assets/office-assistant-mark-transparent.png") center / 29px 29px no-repeat, url("/assets/office-assistant-background-v2.png") center / cover no-repeat;
    box-shadow:0 2px 8px rgba(4, 19, 55, 0.2);
}

.brand-mark svg{
    display:none;
}

.brand-title{
    font-size:17px;
    font-weight:750;
    letter-spacing:.01em;
}

.brand-subtitle{
    margin-top:3px;
    color:rgba(255,255,255,0.72);
    font-size:12px;
}

.header-badges{
    display:flex;
    gap:8px;
}

.header-actions{
    display:flex;
    align-items:center;
    gap:9px;
    flex:0 0 auto;
    margin-left:auto;
}

.mobile-menu-button{
    display:none;
    position:relative;
    width:38px;
    height:38px;
    place-items:center;
    border:1px solid rgba(255,255,255,.22);
    border-radius:12px;
    color:white;
    background:rgba(255,255,255,.1);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.16);
    transition:background .18s ease, border-color .18s ease, transform .18s ease;
}

.mobile-menu-button:hover{
    border-color:rgba(255,255,255,.36);
    background:rgba(255,255,255,.16);
    transform:translateY(-1px);
}

.mobile-menu-button::before{
    content:none;
}

.mobile-menu-button span{
    position:absolute;
    left:50%;
    display:block;
    width:17px;
    height:2px;
    border-radius:999px;
    background:currentColor;
    transform:translateX(-50%);
}

.mobile-menu-button span:nth-child(1){
    top:12px;
}

.mobile-menu-button span:nth-child(2){
    top:18px;
}

.mobile-menu-button span:nth-child(3){
    top:24px;
}

.mobile-menu-backdrop{
    position:fixed;
    inset:0;
    z-index:180;
    background:rgba(15, 23, 42, .42);
    backdrop-filter:blur(2px);
}

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

.mobile-drawer-head{
    display:none;
}

.header-badge{
    padding:7px 11px;
    border:1px solid rgba(255,255,255,0.22);
    border-radius:999px;
    color:rgba(255,255,255,0.86);
    background:rgba(255,255,255,0.08);
    font-size:12px;
    font-weight:650;
}

.header-badge-accent{
    border-color:rgba(116, 233, 185, 0.28);
    color:#d6fae9;
    background:rgba(30, 168, 114, 0.22);
}

.account-button{
    display:inline-flex;
    align-items:center;
    gap:7px;
    min-height:34px;
    padding:0 11px;
    border:1px solid rgba(255,255,255,.26);
    border-radius:9px;
    color:white;
    background:rgba(255,255,255,.12);
    box-shadow:none;
    font-size:12px;
}

.account-button:hover{
    background:rgba(255,255,255,.18);
}

.account-menu{
    position:relative;
}

.account-initial{
    display:grid;
    width:23px;
    height:23px;
    place-items:center;
    border-radius:7px;
    color:var(--navy-dark);
    background:white;
    font-size:11px;
    font-weight:800;
}

.account-points-pill{
    padding:3px 7px;
    border-radius:999px;
    color:#ffffff;
    background:rgba(255,255,255,.18);
    font-size:11px;
    font-weight:800;
    white-space:nowrap;
}

.account-dropdown{
    position:absolute;
    z-index:130;
    top:42px;
    right:0;
    width:280px;
    padding:10px;
    border:1px solid var(--line);
    border-radius:12px;
    color:var(--ink);
    background:white;
    box-shadow:var(--shadow);
}

.account-profile{
    padding:5px 8px 10px;
    border-bottom:1px solid var(--line);
}

.account-profile strong{
    display:block;
    margin-bottom:3px;
    color:var(--navy-dark);
    font-size:13px;
}

.account-email{
    padding:0;
    overflow:hidden;
    color:var(--muted);
    font-size:12px;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.account-plan-summary{
    padding:12px 8px 8px;
}

.account-plan-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    color:#4e5b70;
    font-size:11px;
}

.plan-pill{
    padding:4px 7px;
    border-radius:999px;
    color:#174eaf;
    background:var(--blue-soft);
    font-weight:800;
}

.usage-track{
    height:6px;
    margin:9px 0 7px;
    overflow:hidden;
    border-radius:999px;
    background:#e7ebf1;
}

.usage-track span{
    display:block;
    width:0;
    height:100%;
    border-radius:inherit;
    background:linear-gradient(90deg, #1d4ed8, #26a978);
    transition:width .25s ease;
}

.account-remaining{
    color:var(--muted);
    font-size:11px;
}

.account-expiry-summary{
    margin-top:3px;
    color:#52627a;
    font-size:11px;
    line-height:1.4;
}

.account-dropdown button{
    width:100%;
    margin-top:7px;
    border:0;
    color:#173b77;
    background:#edf4ff;
    box-shadow:inset 0 0 0 1px rgba(55, 86, 160, .04);
    transition:background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.account-dropdown button:hover{
    color:#102f66;
    background:#e5efff;
    box-shadow:inset 0 0 0 1px rgba(55, 86, 160, .09), 0 8px 18px rgba(31, 48, 96, .08);
    transform:translateY(-1px);
}

.account-dropdown .account-upgrade-button,
.account-dropdown .account-profile-button,
.account-dropdown .account-defaults-button,
.account-dropdown .account-admin-button{
    color:#173b77;
    background:#edf4ff;
}

.account-dropdown .account-admin-button[hidden]{
    display:none;
}

.module-navigation{
    position:fixed;
    z-index:110;
    top:14px;
    right:clamp(280px, 18vw, 370px);
    left:clamp(380px, 21vw, 430px);
    display:flex;
    align-items:center;
    justify-content:flex-start;
    flex-wrap:nowrap;
    gap:6px;
    width:auto;
    margin:0;
    padding:0;
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
    backdrop-filter:none;
    overflow:visible;
}

.module-tab{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    min-height:32px;
    flex:0 0 auto;
    min-width:auto;
    margin:0;
    padding:0 10px;
    border:1px solid rgba(255,255,255,0.12);
    border-radius:999px;
    color:rgba(255,255,255,0.82);
    background:rgba(255,255,255,0.06);
    box-shadow:none;
    text-align:center;
    white-space:nowrap;
    font-size:12.5px;
    font-weight:850;
    cursor:pointer;
    transition:border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.module-tab:hover,
.module-tab.active,
.module-menu-group.active > .module-menu-trigger,
.module-menu-group:hover > .module-menu-trigger,
.module-menu-group:focus-within > .module-menu-trigger{
    border-color:rgba(255,255,255,0.26);
    color:#ffffff;
    background:rgba(255,255,255,0.16);
}

.module-tab.active{
    box-shadow:0 8px 18px rgba(5, 16, 35, 0.13), inset 0 1px 0 rgba(255,255,255,0.18);
}

.module-menu-group{
    position:relative;
}

.module-menu-trigger span{
    position:relative;
    display:block;
    width:12px;
    height:12px;
    flex:0 0 12px;
    color:rgba(255,255,255,0.7);
    font-size:0;
    line-height:0;
    transform:none;
}

.module-menu-trigger span::before{
    content:"";
    position:absolute;
    top:2px;
    left:2px;
    width:6px;
    height:6px;
    border:solid currentColor;
    border-width:0 2px 2px 0;
    transform:rotate(45deg);
}

.module-menu-trigger{
    box-sizing:border-box;
    height:32px;
    min-height:32px;
}

.module-menu-dropdown{
    position:absolute;
    top:calc(100% + 10px);
    left:0;
    z-index:140;
    display:none;
    width:330px;
    gap:6px;
    padding:10px;
    border:1px solid rgba(207, 216, 230, .95);
    border-radius:18px;
    background:#fff;
    box-shadow:0 20px 48px rgba(29, 48, 82, .14);
}

.module-menu-dropdown-small{
    width:280px;
}

.module-menu-group:hover .module-menu-dropdown,
.module-menu-group:focus-within .module-menu-dropdown,
.module-menu-group.open .module-menu-dropdown{
    display:grid;
}

.module-menu-item{
    display:flex;
    align-items:center;
    gap:10px;
    width:100%;
    padding:10px;
    border:0;
    border-radius:13px;
    color:#46536a;
    background:#fff;
    text-align:left;
    cursor:pointer;
    transition:background .18s ease, color .18s ease;
}

.module-menu-item:hover,
.module-menu-item.active{
    color:var(--navy-dark);
    background:#f4f7ff;
}

.module-menu-item b,
.module-menu-item small{
    display:block;
}

.module-menu-item b{
    font-size:13px;
    line-height:1.3;
}

.module-menu-item small{
    color:var(--muted);
    font-size:11px;
    font-weight:500;
    line-height:1.35;
}

.module-development-badge{
    display:inline-flex;
    align-items:center;
    width:fit-content;
    padding:4px 8px;
    border:1px solid #dfe5ec;
    border-radius:999px;
    color:#59677b;
    background:#f4f6f9;
    font-size:10px;
    font-weight:700;
    line-height:1.2;
    text-transform:none;
}

.module-development-badge[hidden],
[data-development-cta][hidden]{
    display:none !important;
}

.module-menu-item .module-development-badge{
    margin-top:5px;
}

.module-tab-mark{
    display:grid;
    width:31px;
    height:31px;
    flex:0 0 31px;
    place-items:center;
    border-radius:12px;
    color:white;
    background:linear-gradient(145deg, var(--navy), #223f82);
    font-size:11px;
    font-weight:850;
    box-shadow:0 8px 16px rgba(18, 53, 107, 0.16);
}

.module-menu-dropdown .module-tab-mark.is-icon svg{
    display:block;
    width:17px;
    height:17px;
}

/* Product menu icon tiles use the function colors from the visual reference. */
.module-menu-dropdown:not(.module-menu-dropdown-small) #directiveModuleTab .module-tab-mark.is-icon,
.module-menu-dropdown:not(.module-menu-dropdown-small) #incomingModuleTab .module-tab-mark.is-icon{
    background:linear-gradient(145deg, #6f95ff, #4d70e8);
}

.module-menu-dropdown:not(.module-menu-dropdown-small) #reviewModuleTab .module-tab-mark.is-icon{
    background:linear-gradient(145deg, #78d18d, #4cad68);
}

.module-menu-dropdown:not(.module-menu-dropdown-small) #meetingAssistantModuleTab .module-tab-mark.is-icon{
    background:linear-gradient(145deg, #b45be9, #7d3fdf);
}

.module-menu-dropdown:not(.module-menu-dropdown-small) #legalDossierModuleTab .module-tab-mark.is-icon{
    background:linear-gradient(145deg, #f0c951, #d8a52d);
}

.module-menu-dropdown:not(.module-menu-dropdown-small) #criminalDossierModuleTab .module-tab-mark.is-icon{
    background:linear-gradient(145deg, #ed6f91, #d94e75);
}

.module-menu-dropdown:not(.module-menu-dropdown-small) #aggregateModuleTab .module-tab-mark.is-icon,
.module-menu-dropdown:not(.module-menu-dropdown-small) #dataAggregateModuleTab .module-tab-mark.is-icon{
    background:linear-gradient(145deg, #71d0cf, #44b5bc);
}

.module-menu-dropdown:not(.module-menu-dropdown-small) #scanWordModuleTab .module-tab-mark.is-icon{
    background:linear-gradient(145deg, #a174ef, #7952dc);
}


.module-view[hidden]{
    display:none;
}

.sr-only {
    position:absolute !important;
    width:1px !important;
    height:1px !important;
    padding:0 !important;
    margin:-1px !important;
    overflow:hidden !important;
    clip:rect(0,0,0,0) !important;
    white-space:nowrap !important;
    border:0 !important;
}

.app-shell{
    width:min(1900px, calc(100% - 36px));
    margin:18px auto 16px;
}

.control-card,
.analysis-context,
.left-panel,
.ai-panel{
    border:1px solid rgba(204, 214, 228, 0.9);
    border-radius:var(--radius);
    background:var(--surface);
    box-shadow:var(--shadow-soft);
}

.control-card{
    padding:24px 26px 22px;
}

.home-hero{
    display:grid;
    grid-template-columns:minmax(0, 1fr) minmax(0, 1fr);
    align-items:center;
    gap:14px;
    margin-bottom:18px;
    padding:14px 24px;
    border:1px solid rgba(176, 195, 231, .75);
    border-radius:24px;
    background:#f2f5fb;
    box-shadow:var(--shadow-soft);
}

.home-hero-art{
    display:grid;
    min-width:0;
    place-items:center;
}

.home-hero-art img{
    display:block;
    width:100%;
    max-width:760px;
    max-height:280px;
    object-fit:contain;
}

.home-hero-copy{
    min-width:0;
}

.home-hero h1{
    max-width:900px;
    margin:0;
    color:var(--navy-dark);
    font-size:34px;
    line-height:1.12;
    letter-spacing:-.035em;
}

.home-hero p{
    max-width:880px;
    margin:12px 0 0;
    color:var(--muted);
    font-size:15px;
    line-height:1.65;
}

.home-actions{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-top:20px;
}

.home-domain-card{
    align-self:stretch;
    padding:18px;
    border:1px solid #d8e2f2;
    border-radius:20px;
    background:rgba(255,255,255,.76);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.85);
}

.home-domain-card span{
    display:block;
    color:var(--muted);
    font-size:11px;
    font-weight:800;
    letter-spacing:.1em;
    text-transform:uppercase;
}

.home-domain-card strong{
    display:block;
    margin-top:8px;
    color:var(--navy);
    font-size:24px;
}

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

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

.home-feature-card{
    min-height:208px;
    padding:20px;
    border:1px solid rgba(207, 216, 230, .95);
    border-radius:22px;
    color:var(--ink);
    background:#fff;
    box-shadow:var(--shadow-soft);
}

.portal-mini-card{
    min-height:208px;
    padding:20px;
    border:1px solid rgba(207, 216, 230, .95);
    border-radius:22px;
    color:var(--ink);
    background:#fff;
    box-shadow:var(--shadow-soft);
}

.home-feature-card{
    display:flex;
    align-items:flex-start;
    flex-direction:column;
    cursor:pointer;
    text-align:left;
    transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.home-feature-card:hover{
    transform:translateY(-2px);
    border-color:#9fb5f4;
    box-shadow:0 18px 42px rgba(29, 48, 82, .1);
}

.home-feature-card.is-development{
    border-color:#dfe5ec;
    background:linear-gradient(155deg,#fff 0%,#fafbfd 100%);
}

.home-feature-card.is-development:hover{
    transform:none;
    border-color:#dfe5ec;
    box-shadow:var(--shadow-soft);
}

.home-feature-card .module-development-badge{
    margin-top:auto;
}

.module-menu-item.is-development:hover,
.module-menu-item.is-development.active{
    color:#46536a;
    background:#fff;
}

.home-feature-card.highlighted{
    border-color:#c4c7ff;
    background:linear-gradient(145deg, #ffffff, #f3f4ff);
}

.home-feature-icon{
    display:grid;
    width:48px;
    height:48px;
    place-items:center;
    margin-bottom:18px;
    border-radius:16px;
    color:#fff;
    font-size:14px;
    font-weight:900;
    box-shadow:0 12px 24px rgba(29, 48, 82, .12);
}

.home-feature-heading{
    display:flex;
    align-items:center;
    gap:12px;
    width:100%;
    min-width:0;
}

.home-feature-heading .home-feature-icon{
    flex:0 0 48px;
    margin:0;
}

.home-feature-heading > b{
    min-width:0;
}

.home-feature-icon.functional{
    background:#6C7BFF;
    color:#FFFFFF;
}

#homeModule .home-feature-icon.icon-blue{
    background:linear-gradient(145deg, #6f95ff, #4d70e8);
}

#homeModule .home-feature-icon.icon-green{
    background:linear-gradient(145deg, #78d18d, #4cad68);
}

#homeModule .home-feature-icon.icon-purple{
    background:linear-gradient(145deg, #b45be9, #7d3fdf);
}

#homeModule .home-feature-icon.icon-amber{
    background:linear-gradient(145deg, #f0c951, #d8a52d);
}

#homeModule .home-feature-icon.icon-red{
    background:linear-gradient(145deg, #ed6f91, #d94e75);
}

#homeModule .home-feature-icon.icon-teal{
    background:linear-gradient(145deg, #71d0cf, #44b5bc);
}

#homeModule .home-feature-icon.icon-magenta{
    background:linear-gradient(145deg, #d46be7, #b847cf);
}

#homeModule .home-feature-icon.icon-slate{
    background:linear-gradient(145deg, #687287, #4c5568);
}

.home-feature-icon svg{
    width:22px;
    height:22px;
}

.home-feature-card b,
.portal-mini-card b{
    display:block;
    color:var(--navy-dark);
    font-size:17px;
    line-height:1.25;
}

.home-feature-card b{
    font-size:18px;
}

.home-feature-card p,
.portal-mini-card p,
.portal-placeholder p,
.guide-steps p{
    color:var(--muted);
    line-height:1.55;
}

.home-feature-card p{
    margin:10px 0 18px;
    font-size:14px;
}

.home-feature-card small{
    margin-top:auto;
    white-space:nowrap;
    color:var(--blue);
    font-size:12px;
    font-weight:800;
    text-transform:uppercase;
}

.portal-page{
    min-height:420px;
}

.portal-mini-card{
    min-height:150px;
}

.portal-placeholder{
    margin-top:14px;
    padding:18px;
    border:1px dashed #cbd6e8;
    border-radius:18px;
    background:#f8fbff;
}

.billing-overview{
    display:grid;
    grid-template-columns:minmax(260px, 1.05fr) minmax(360px, 1.55fr) minmax(180px, auto);
    gap:14px;
    align-items:stretch;
    margin-top:20px;
    padding:18px;
    border:1px solid #d7e1ef;
    border-radius:22px;
    background:linear-gradient(135deg, #ffffff 0%, #f6f9fe 100%);
    box-shadow:0 18px 42px rgba(29, 48, 82, .08);
}

.billing-overview-main{
    display:flex;
    min-width:0;
    flex-direction:column;
    justify-content:center;
    gap:9px;
}

.billing-overview-label{
    color:var(--blue);
    font-size:11px;
    font-weight:850;
    letter-spacing:.08em;
    text-transform:uppercase;
}

.billing-overview h2{
    margin:0;
    color:var(--navy-dark);
    font-size:26px;
    line-height:1.12;
}

.billing-overview p{
    max-width:600px;
    margin:0;
    color:var(--muted);
    font-size:13px;
    line-height:1.55;
}

.billing-validity-summary{
    align-self:flex-start;
    width:min(100%, 340px);
}

.billing-usage-track{
    width:100%;
    height:9px;
    overflow:hidden;
    border-radius:999px;
    background:#e4ebf5;
}

.billing-usage-track span{
    display:block;
    width:0;
    height:100%;
    border-radius:inherit;
    background:linear-gradient(90deg, #2563eb, #16a085);
    transition:width .25s ease;
}

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

.billing-overview-stats div{
    min-width:0;
    padding:14px;
    border:1px solid #e1e8f3;
    border-radius:16px;
    background:#fff;
}

.billing-overview-stats span,
.point-explainer-example span{
    display:block;
    color:#6d7b91;
    font-size:11px;
    font-weight:800;
    letter-spacing:.04em;
    text-transform:uppercase;
}

.billing-overview-stats strong{
    display:block;
    margin-top:6px;
    color:#102653;
    font-size:23px;
    line-height:1.08;
}

.billing-overview-actions{
    display:flex;
    min-width:170px;
    flex-direction:column;
    justify-content:center;
    gap:9px;
}

.billing-overview-actions .btn{
    width:100%;
    min-height:44px;
    white-space:normal;
}

.billing-history-panel{
    margin:18px 0;
    padding:18px;
    border:1px solid #dce5f2;
    border-radius:8px;
    background:#fff;
}

.section-heading-compact{
    align-items:center;
    margin-bottom:12px;
}

.section-heading-compact h2{
    margin:4px 0 0;
    font-size:22px;
}

.plan-request-notice.plan-request-notice-error{
    color:#9d2d3a;
    background:var(--red-soft);
}

.plan-picker{
    margin-top:22px;
}

.plan-picker-heading{
    display:flex;
    gap:14px;
    align-items:center;
    justify-content:space-between;
    margin-bottom:14px;
}

.plan-picker-heading h2,
.point-explainer h2{
    margin:4px 0 0;
    color:var(--navy-dark);
    font-size:22px;
    line-height:1.2;
}

.plan-picker-heading p{
    margin:5px 0 0;
    color:var(--muted);
    font-size:13px;
    line-height:1.45;
}

.plan-segmented{
    display:flex;
    flex-wrap:wrap;
    gap:4px;
    padding:4px;
    border:1px solid #d8e2f0;
    border-radius:14px;
    background:#eef3fa;
}

.plan-segmented button{
    min-height:36px;
    padding:0 14px;
    border:0;
    border-radius:10px;
    color:#56657d;
    background:transparent;
    cursor:pointer;
    font-weight:800;
}

.plan-segmented button.active{
    color:#102653;
    background:#fff;
    box-shadow:0 4px 14px rgba(29, 48, 82, .1);
}

.service-plan-grid{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:16px;
    align-items:stretch;
}

.service-plan-card{
    position:relative;
    display:flex;
    min-height:430px;
    flex-direction:column;
    gap:12px;
    padding:20px;
    border:1px solid #dfe6f1;
    border-radius:20px;
    background:#fff;
    box-shadow:0 12px 30px rgba(29, 48, 82, .07);
}

.service-plan-featured{
    border-color:#7fa6ef;
    box-shadow:0 18px 42px rgba(37, 99, 235, .15);
}

.service-plan-current{
    border-color:#16a085;
    box-shadow:0 18px 42px rgba(22, 160, 133, .16);
}

.service-plan-current::after{
    content:"Đang sử dụng";
    position:absolute;
    top:14px;
    right:14px;
    padding:5px 9px;
    border-radius:999px;
    color:#0f7650;
    background:#dff8ed;
    font-size:10px;
    font-weight:850;
    text-transform:uppercase;
}

.service-plan-card h3{
    margin:0;
    color:var(--navy-dark);
    font-size:22px;
    line-height:1.15;
}

.service-plan-card p{
    min-height:64px;
    margin:0;
    color:var(--muted);
    font-size:13px;
    line-height:1.55;
}

.service-plan-features{
    display:grid;
    gap:8px;
    margin:0;
    padding:0;
    color:#3f4d63;
    font-size:13px;
    line-height:1.45;
    list-style:none;
}

.service-plan-features li{
    position:relative;
    padding-left:18px;
}

.service-plan-features li::before{
    content:"";
    position:absolute;
    top:.58em;
    left:0;
    width:7px;
    height:7px;
    border-radius:999px;
    background:#16a085;
}

.service-plan-card .btn{
    width:100%;
    min-height:44px;
    margin-top:auto;
    border-radius:12px;
    white-space:normal;
}

.unit-plan-panel{
    display:grid;
    grid-template-columns:minmax(0, 1fr) minmax(280px, 380px);
    gap:16px;
    align-items:stretch;
}

.unit-plan-copy{
    padding:20px;
    border:1px dashed #bdcbdf;
    border-radius:20px;
    background:#f8fbff;
}

.unit-plan-copy h3{
    margin:8px 0 8px;
    color:var(--navy-dark);
    font-size:24px;
}

.unit-plan-copy p{
    max-width:760px;
    margin:0 0 16px;
    color:var(--muted);
    line-height:1.6;
}

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

.unit-plan-offer{
    min-height:0;
}

.unit-plan-offer .btn + .btn{
    margin-top:0;
}

.point-explainer{
    display:grid;
    grid-template-columns:minmax(220px, .7fr) minmax(0, 1fr) minmax(240px, .7fr);
    gap:16px;
    align-items:center;
    margin-top:22px;
    padding:18px;
    border:1px solid #d7e1ef;
    border-radius:20px;
    background:#fff;
}

.point-explainer p{
    margin:0;
    color:var(--muted);
    font-size:13px;
    line-height:1.65;
}

.point-explainer-example{
    padding:14px;
    border:1px solid #dfe8f3;
    border-radius:16px;
    background:linear-gradient(180deg, #f7fbff, #eef6f3);
}

.point-explainer-example strong{
    display:block;
    margin-top:7px;
    color:#102653;
    font-size:16px;
}

.point-explainer-example small{
    display:block;
    margin-top:5px;
    color:#596b84;
    font-size:12px;
    line-height:1.4;
}

.section-actions{
    display:flex;
    flex-wrap:wrap;
    gap:9px;
    justify-content:flex-end;
}

.document-template-manager{
    min-height:560px;
}

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

.document-template-layout.is-system-readonly{
    grid-template-columns:minmax(0, 1fr);
}

.document-template-upload-panel,
.document-template-library-panel{
    padding:18px;
    border:1px solid #dfe6f1;
    border-radius:14px;
    background:#fff;
    box-shadow:0 12px 34px rgba(27, 45, 78, .07);
}

.document-template-upload-panel{
    display:grid;
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap:12px;
    align-items:end;
}

.document-template-upload-panel > .field-group{
    min-width:0;
}

.document-template-role-field{
    align-self:stretch;
}

.document-template-role-field .field-hint{
    min-height:34px;
    line-height:1.35;
}

.document-template-panel-heading,
.document-template-upload-panel .standard-template-actions,
.document-template-upload-panel .document-template-status{
    grid-column:1 / -1;
}

.document-template-upload-panel .document-template-file-field,
.document-template-upload-panel .document-template-name-field{
    grid-column:span 2;
}

.document-template-upload-panel .document-template-description-field{
    grid-column:1 / -1;
}

.document-template-panel-heading h2{
    margin:4px 0 0;
    color:var(--navy-dark);
    font-size:18px;
}

.document-template-tabs{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-top:14px;
}

.document-template-tab{
    min-height:38px;
    padding:0 14px;
    border:1px solid #d4deee;
    border-radius:10px;
    color:#43516a;
    background:#fff;
    font-size:12px;
    font-weight:850;
}

.document-template-tab.active{
    border-color:#4f63e8;
    color:#fff;
    background:#4f63e8;
    box-shadow:0 8px 18px rgba(79, 99, 232, .22);
}

.document-template-scope-note{
    margin:9px 0 0;
    color:#66758d;
    font-size:12px;
    line-height:1.5;
}

.document-template-filters{
    display:grid;
    grid-template-columns:minmax(180px, 1.3fr) repeat(4, minmax(110px, .8fr)) auto;
    gap:9px;
    margin:14px 0;
}

.document-template-filters input,
.document-template-filters select{
    width:100%;
    min-height:38px;
    padding:0 10px;
    border:1px solid #ced8e7;
    border-radius:10px;
    background:#fff;
    color:var(--ink);
    font-size:12px;
}

.document-template-list{
    display:grid;
    gap:10px;
}

.document-template-list .empty-state{
    min-height:280px;
}

.document-template-item{
    display:grid;
    grid-template-columns:minmax(0, 1fr) auto;
    gap:12px;
    padding:14px;
    border:1px solid #dfe6f1;
    border-radius:12px;
    background:#fbfcfe;
}

.document-template-item.is-selected{
    border-color:#4f63e8;
    box-shadow:0 0 0 3px rgba(79, 99, 232, .12);
}

.document-template-item h3{
    margin:0;
    color:var(--navy-dark);
    font-size:15px;
    line-height:1.35;
}

.document-template-item p{
    margin:6px 0 0;
    color:#607089;
    font-size:12px;
    line-height:1.5;
}

.document-template-meta{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    margin-top:8px;
}

.document-template-meta span{
    padding:4px 7px;
    border:1px solid #dfe6f1;
    border-radius:999px;
    color:#526177;
    background:#fff;
    font-size:10px;
    font-weight:750;
}

.document-template-actions{
    display:flex;
    flex-wrap:wrap;
    gap:7px;
    justify-content:flex-end;
    align-content:flex-start;
}

.document-template-pagination{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    margin-top:4px;
    padding:12px 2px 2px;
}

.document-template-page-summary{
    color:#68758c;
    font-size:13px;
}

.document-template-page-summary b{
    color:var(--navy-dark);
}

.document-template-page-controls{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:7px;
    justify-content:flex-end;
}

.document-template-page-button{
    min-width:38px;
    height:38px;
    padding:0 12px;
    border:1px solid #dfe6f1;
    border-radius:9px;
    color:#41506a;
    background:#fff;
    box-shadow:0 2px 8px rgba(30, 45, 75, .05);
    font-size:13px;
    font-weight:800;
}

.document-template-page-button.active{
    border-color:#4f63e8;
    color:#fff;
    background:#4f63e8;
    box-shadow:0 8px 18px rgba(79, 99, 232, .24);
}

.document-template-page-button:disabled{
    cursor:not-allowed;
    color:#b4bdcc;
    background:#f8fafc;
    box-shadow:none;
}

.document-template-page-ellipsis{
    display:inline-flex;
    min-width:28px;
    height:38px;
    align-items:center;
    justify-content:center;
    color:#8b97aa;
    font-size:13px;
    font-weight:800;
}

.document-template-status,
.document-template-preview-panel{
    padding:11px 12px;
    border:1px solid #dfe6f1;
    border-radius:12px;
    color:#526177;
    background:#f8fbff;
    font-size:12px;
    line-height:1.5;
}

.document-template-status.success{
    border-color:#bfe2ca;
    color:#195d3d;
    background:#f4fbf6;
}

.document-template-status.error{
    border-color:#f0b9b9;
    color:#8b1d1d;
    background:#fff5f5;
}

.document-template-preview-panel{
    margin-top:12px;
    max-height:360px;
    overflow:auto;
    white-space:pre-wrap;
}

.document-template-preview-panel h3{
    margin:0 0 8px;
    color:var(--navy-dark);
    font-size:15px;
}

.document-template-preview-panel p{
    margin:0 0 10px;
    color:#607089;
}

.document-template-preview-panel pre{
    margin:0;
    white-space:pre-wrap;
    word-break:break-word;
    font-family:"Times New Roman", serif;
    font-size:14px;
    line-height:1.55;
}

.document-template-picker-modal{
    position:relative;
    width:min(1040px, calc(100% - 24px));
    max-height:calc(100vh - 32px);
    overflow:auto;
    padding:28px;
    border:1px solid var(--line);
    border-radius:18px;
    background:#fff;
    box-shadow:0 24px 70px rgba(17, 35, 67, .24);
}

.document-template-picker-body{
    display:grid;
    grid-template-columns:minmax(0, 1fr);
    gap:14px;
    align-items:start;
}

.document-template-picker-list{
    max-height:58vh;
    overflow:auto;
    padding-right:4px;
}

.document-template-preview-modal{
    position:relative;
    display:flex;
    flex-direction:column;
    width:min(1120px, calc(100% - 24px));
    box-sizing:border-box;
    height:min(94dvh, 900px);
    min-height:0;
    max-height:calc(100dvh - 24px);
    overflow:hidden;
    padding:22px;
    border:1px solid var(--line);
    border-radius:18px;
    background:#fff;
    box-shadow:0 28px 80px rgba(17, 35, 67, .3);
}

.document-template-preview-heading{
    display:flex;
    flex:0 0 auto;
    align-items:flex-start;
    justify-content:space-between;
    gap:18px;
    padding:0 44px 16px 0;
    border-bottom:1px solid #e5ebf5;
}

.document-template-preview-heading h2{
    margin:4px 0 6px;
    color:var(--navy-dark);
    font-size:21px;
    line-height:1.3;
}

.document-template-preview-heading p{
    margin:0;
    color:#607089;
    font-size:12px;
    line-height:1.45;
}

.document-template-preview-actions{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    justify-content:flex-end;
}

.document-template-word-preview{
    flex:1;
    min-height:0;
    margin-top:14px;
    padding:26px 18px 34px;
    border:1px solid #d9e2ef;
    border-radius:12px;
    overscroll-behavior:contain;
    scrollbar-width:thin;
    scrollbar-color:#aeb9c9 transparent;
}

.document-template-pdf-preview,
.document-template-preview-fallback-surface{
    flex:1;
    min-height:0;
    min-width:0;
    margin-top:14px;
    overflow:auto;
    border:1px solid #d9e2ef;
    border-radius:12px;
    background:#eef2f7;
    overscroll-behavior:contain;
    scrollbar-width:thin;
    scrollbar-color:#aeb9c9 transparent;
}

.document-template-pdf-preview{
    overflow:hidden;
}

.document-template-pdf-preview.is-rendering::before{
    display:none;
}

.document-template-pdf-viewer{
    position:relative;
    display:flex;
    width:100%;
    height:100%;
    min-height:0;
    background:#eef2f7;
}

.document-template-pdf-frame{
    display:block;
    width:100%;
    height:100%;
    min-height:0;
    border:0;
    background:#fff;
}

.document-template-pdf-loading{
    position:absolute;
    z-index:1;
    top:16px;
    left:50%;
    transform:translateX(-50%);
    width:max-content;
    max-width:calc(100% - 32px);
    padding:10px 14px;
    border:1px solid #d9e2ef;
    border-radius:10px;
    background:rgba(255,255,255,.94);
    box-shadow:0 6px 18px rgba(30,45,75,.10);
}

.document-template-pdf-loading strong,
.document-template-pdf-loading span{
    display:block;
}

.document-template-word-preview.is-rendering::before{
    display:none;
}

.document-template-word-preview .docx-wrapper{
    min-width:100%;
    background:transparent;
}

.document-template-word-preview .docx-wrapper > section.docx{
    margin-right:auto;
    margin-left:auto;
    border:1px solid rgba(190,199,213,.65);
    box-shadow:0 7px 22px rgba(30,45,75,.14);
}

.document-template-text-page{
    width:min(794px, 100%);
    min-height:1120px;
    margin:0 auto 24px;
    padding:72px 76px;
    border-radius:4px;
    background:#fff;
    box-shadow:0 8px 26px rgba(21, 34, 57, .18);
    color:#111827;
    font-family:"Times New Roman", Times, serif;
}

.document-template-text-page pre{
    margin:0;
    white-space:pre-wrap;
    word-break:break-word;
    font:14pt/1.55 "Times New Roman", Times, serif;
}

.document-template-preview-fallback-note{
    width:min(794px, 100%);
    margin:0 auto 12px;
    padding:10px 12px;
    border:1px solid #dce6f5;
    border-radius:10px;
    color:#526177;
    background:#fff;
    font-size:12px;
    line-height:1.45;
}

.affiliate-overview{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
    gap:12px;
}

.affiliate-overview div{
    padding:18px;
    border:1px solid var(--line);
    border-radius:18px;
    background:#f8fbff;
}

.affiliate-overview span{
    display:block;
    color:var(--muted);
    font-size:12px;
    font-weight:700;
}

.affiliate-overview strong{
    display:block;
    margin-top:8px;
    color:var(--navy-dark);
    font-size:22px;
}

.affiliate-payout-card{
    margin-top:16px;
    padding:18px;
    border:1px solid #dce7f3;
    border-radius:18px;
    background:linear-gradient(135deg,#f8fbff 0%,#fff 75%);
}

.affiliate-payout-card-heading{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}

.affiliate-payout-card-heading h2{
    margin:5px 0 0;
    color:var(--navy-dark);
    font-size:20px;
}

.affiliate-payout-metrics{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(135px,1fr));
    gap:10px;
    margin-top:16px;
}

.affiliate-payout-metrics div{
    padding:12px;
    border:1px solid var(--line);
    border-radius:12px;
    background:#fff;
}

.affiliate-payout-metrics span{
    display:block;
    color:var(--muted);
    font-size:11px;
    font-weight:700;
}

.affiliate-payout-metrics strong{
    display:block;
    margin-top:5px;
    color:var(--navy-dark);
    font-size:16px;
}

.affiliate-payout-policy,
.affiliate-payout-bank-warning{
    margin:13px 0 0;
    color:#526177;
    font-size:12px;
    line-height:1.5;
}

.affiliate-payout-bank-warning{
    padding:10px 12px;
    border:1px solid #efd69d;
    border-radius:10px;
    color:#805b16;
    background:#fffaf0;
    font-weight:700;
}

.affiliate-payout-history-card{
    margin-top:16px;
}

.affiliate-payout-history-card .admin-table-card,
.affiliate-payout-history-card .admin-table-scroll{
    overflow-x:auto;
}

.affiliate-payout-history-card table{
    min-width:880px;
}

.affiliate-panel{
    margin-top:18px;
    padding:18px;
    border:1px solid var(--line);
    border-radius:20px;
    background:#fff;
}

.affiliate-panel h3{
    margin:0 0 6px;
}

.affiliate-link-row{
    display:grid;
    grid-template-columns:minmax(0, 1fr) auto auto;
    align-items:center;
    gap:10px;
    margin-top:14px;
}

.affiliate-link-row input{
    width:100%;
    height:46px;
    padding:0 14px;
    border:1px solid var(--line);
    border-radius:14px;
    color:var(--navy-dark);
    background:#f8fbff;
    font:inherit;
    font-weight:700;
}

.affiliate-tier-panel{
    margin-top:18px;
    padding:26px 28px 28px;
    border:1px solid var(--line);
    border-radius:24px;
    background:linear-gradient(135deg, #fbfcff 0%, #fff 72%);
    box-shadow:0 14px 34px rgba(54, 75, 128, .08);
}

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

.affiliate-tier-title-row{
    display:flex;
    align-items:center;
    gap:12px;
}

.affiliate-tier-heading-icon{
    display:grid;
    width:58px;
    height:58px;
    flex:0 0 58px;
    place-items:center;
    border-radius:17px;
    background:#eef0ff;
}

.affiliate-tier-heading-icon .affiliate-tier-icon{
    width:54px;
    height:54px;
}

.affiliate-tier-heading h2{
    margin:0 0 6px;
    color:var(--navy-dark);
    font-size:27px;
    line-height:1.15;
}

.affiliate-tier-heading > strong{
    color:#4f63e8;
    font-size:32px;
    line-height:1;
    white-space:nowrap;
}

.affiliate-tier-progress-wrap{
    margin-top:30px;
}

.affiliate-tier-progress-label{
    display:flex;
    justify-content:space-between;
    gap:12px;
    margin-bottom:10px;
    color:var(--muted);
    font-size:14px;
    font-weight:700;
}

.affiliate-tier-progress{
    height:14px;
    overflow:hidden;
    border-radius:999px;
    background:#e7edf8;
}

.affiliate-tier-progress span{
    display:block;
    width:0;
    height:100%;
    border-radius:inherit;
    background:linear-gradient(90deg, #4f63e8, #6f8cff);
    transition:width .25s ease;
}

.affiliate-tier-list-heading{
    margin-top:30px;
    color:var(--navy-dark);
    font-size:16px;
    font-weight:800;
}

.affiliate-tier-list{
    display:grid;
    grid-template-columns:repeat(5, minmax(0, 1fr));
    gap:12px;
    margin-top:14px;
}

.affiliate-tier-item{
    display:flex;
    align-items:center;
    gap:12px;
    min-height:104px;
    padding:14px 16px;
    border:1px solid var(--line);
    border-radius:18px;
    background:#fff;
}

.affiliate-tier-item.current{
    border:2px solid #7281f0;
    background:#eef2ff;
    box-shadow:0 8px 18px rgba(79, 99, 232, .14);
}

.affiliate-tier-icon-wrap{
    display:grid;
    width:58px;
    height:58px;
    flex:0 0 58px;
    place-items:center;
}

.affiliate-tier-icon{
    display:block;
    width:58px;
    height:58px;
    overflow:visible;
    color:#5966d8;
}

.affiliate-tier-icon .icon-outline,
.affiliate-tier-icon .icon-facet{
    fill:none;
    stroke:currentColor;
    stroke-linecap:round;
    stroke-linejoin:round;
    stroke-width:2.5;
}

.affiliate-tier-icon .icon-ribbon{
    fill:currentColor;
    opacity:.78;
    stroke:currentColor;
    stroke-linejoin:round;
    stroke-width:1.5;
}

.affiliate-tier-icon .icon-body{
    fill:currentColor;
    opacity:.12;
    stroke:none;
}

.affiliate-tier-icon-standard .icon-body{
    opacity:.94;
}

.affiliate-tier-icon .icon-fill{
    fill:currentColor;
    stroke:none;
}

.affiliate-tier-icon .icon-star{
    fill:#fff;
    stroke:none;
}

.affiliate-tier-icon .icon-facet-fill{
    fill:currentColor;
    opacity:.62;
    stroke:none;
}

.affiliate-tier-icon .icon-facet-fill-light{
    fill:currentColor;
    opacity:.34;
    stroke:none;
}

.affiliate-tier-icon .icon-face{
    fill:currentColor;
    opacity:.72;
    stroke:currentColor;
    stroke-width:1.8;
}

.affiliate-tier-icon-standard{ color:#5966d8; }
.affiliate-tier-icon-silver{ color:#8a97ad; }
.affiliate-tier-icon-gold{ color:#d6a52e; }
.affiliate-tier-icon-platinum{ color:#9187d4; }
.affiliate-tier-icon-diamond{ color:#6253d8; }

.affiliate-tier-icon-diamond .icon-fill{ opacity:.74; }

.affiliate-tier-heading-icon[data-tier-code="silver"]{ background:#f2f5f9; }
.affiliate-tier-heading-icon[data-tier-code="gold"]{ background:#fff8df; }
.affiliate-tier-heading-icon[data-tier-code="platinum"]{ background:#f4f1ff; }
.affiliate-tier-heading-icon[data-tier-code="diamond"]{ background:#eeedff; }

.affiliate-tier-item[data-tier-code="standard"] .affiliate-tier-icon-wrap{
    border-radius:14px;
    background:#f0efff;
}

.affiliate-tier-item[data-tier-code="platinum"] .affiliate-tier-icon-wrap{
    border-radius:14px;
    background:#f4f1ff;
}

.affiliate-tier-item[data-tier-code="diamond"] .affiliate-tier-icon-wrap{
    border-radius:14px;
    background:#eeedff;
}

.affiliate-tier-item[data-tier-code="silver"] .affiliate-tier-icon-wrap{
    border-radius:14px;
    background:#f2f5f9;
}

.affiliate-tier-item[data-tier-code="gold"] .affiliate-tier-icon-wrap{
    border-radius:14px;
    background:#fff8df;
}

.affiliate-tier-item[data-tier-code="standard"] .affiliate-tier-icon{
    filter:drop-shadow(0 3px 4px rgba(96, 91, 224, .18));
}

.affiliate-tier-item[data-tier-code="platinum"] .affiliate-tier-icon{
    filter:drop-shadow(0 3px 4px rgba(125, 111, 198, .16));
}

.affiliate-tier-item[data-tier-code="diamond"] .affiliate-tier-icon{
    filter:drop-shadow(0 3px 4px rgba(74, 61, 198, .24));
}

.affiliate-tier-item[data-tier-code="silver"] .affiliate-tier-icon{
    filter:drop-shadow(0 3px 4px rgba(100, 113, 140, .16));
}

.affiliate-tier-item[data-tier-code="gold"] .affiliate-tier-icon{
    filter:drop-shadow(0 3px 4px rgba(198, 149, 35, .2));
}

.affiliate-tier-item-copy{
    min-width:0;
}

.affiliate-tier-item-copy strong,
.affiliate-tier-item-copy > span{
    display:block;
}

.affiliate-tier-item-copy strong{
    color:var(--navy-dark);
    font-size:16px;
    line-height:1.25;
}

.affiliate-tier-item-copy > span{
    margin-top:4px;
    color:var(--muted);
    font-size:14px;
}

.affiliate-table-wrap{
    margin-top:18px;
}

.affiliate-pagination{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding:12px 2px 2px;
}

.affiliate-page-summary{
    color:#68758c;
    font-size:13px;
    white-space:nowrap;
}

.affiliate-page-summary b{
    color:var(--navy-dark);
}

.affiliate-page-controls{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:7px;
    justify-content:flex-end;
}

.affiliate-page-button{
    min-width:38px;
    height:38px;
    padding:0 12px;
    border:1px solid #dfe6f1;
    border-radius:9px;
    color:#41506a;
    background:#fff;
    box-shadow:0 2px 8px rgba(30, 45, 75, .05);
    font-size:13px;
    font-weight:800;
}

.affiliate-page-button.active{
    border-color:#4f63e8;
    color:#fff;
    background:#4f63e8;
    box-shadow:0 8px 18px rgba(79, 99, 232, .24);
}

.affiliate-page-button:disabled{
    cursor:not-allowed;
    color:#b4bdcc;
    background:#f8fafc;
    box-shadow:none;
}

.affiliate-page-ellipsis{
    display:inline-flex;
    min-width:28px;
    height:38px;
    align-items:center;
    justify-content:center;
    color:#8b97aa;
    font-size:13px;
    font-weight:800;
}

.admin-affiliate-rate{
    width:70px;
    padding:8px 10px;
    border:1px solid var(--line);
    border-radius:10px;
    color:var(--navy-dark);
    font:inherit;
    font-weight:800;
    text-align:center;
}

.admin-checkbox{
    display:inline-flex;
    align-items:center;
    gap:6px;
    color:var(--muted);
    font-size:13px;
    font-weight:800;
}

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

.guide-steps article{
    padding:18px;
    border:1px solid var(--line);
    border-radius:18px;
    background:#fff;
}

.section-heading{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    margin-bottom:20px;
}

.usage-badge{
    display:flex;
    align-items:flex-end;
    flex-direction:column;
    gap:3px;
    padding:9px 12px;
    border:1px solid #d6dfec;
    border-radius:11px;
    color:#657187;
    background:#f7f9fc;
    cursor:pointer;
    font-size:11px;
}

.usage-badge strong{
    color:var(--navy);
    font-size:13px;
}

.eyebrow,
.panel-kicker{
    display:block;
    margin-bottom:5px;
    color:var(--blue);
    font-size:11px;
    font-weight:800;
    letter-spacing:.12em;
    text-transform:uppercase;
}

.section-heading h1,
.panel-header h2{
    margin:0;
    color:var(--navy-dark);
}

.section-heading h1{
    font-size:24px;
    letter-spacing:-.02em;
}

.section-heading p{
    margin:7px 0 0;
    color:var(--muted);
    font-size:14px;
}

.form-grid{
    display:grid;
    grid-template-columns:minmax(260px, .8fr) minmax(340px, 1.2fr);
    gap:16px;
}

.field-group{
    display:flex;
    flex-direction:column;
    gap:7px;
}

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

.field-group label{
    color:#26334a;
    font-size:13px;
    font-weight:750;
}

.required-mark{
    color:#d62f45;
    font-weight:900;
}

.field-group select,
.field-group textarea,
.field-group input[type="text"],
.field-group input[type="email"],
.field-group input[type="password"],
.field-group input[type="number"],
.field-group input[type="file"]{
    width:100%;
    border:1px solid #cfd7e4;
    border-radius:10px;
    color:var(--ink);
    background:#fbfcfe;
    outline:none;
    transition:border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.field-group select,
.field-group input[type="text"],
.field-group input[type="email"],
.field-group input[type="password"],
.field-group input[type="number"],
.field-group input[type="file"]{
    min-height:46px;
}

.field-group select,
.field-group input[type="text"],
.field-group input[type="email"],
.field-group input[type="password"],
.field-group input[type="number"]{
    padding:0 13px;
}

.field-group input[readonly]{
    color:#7b879a;
    background:#eef2f7;
}

.field-group textarea{
    min-height:82px;
    padding:12px 13px;
    resize:vertical;
    line-height:1.5;
}

.field-group select:focus,
.field-group textarea:focus,
.field-group input[type="text"]:focus,
.field-group input[type="email"]:focus,
.field-group input[type="password"]:focus,
.field-group input[type="number"]:focus,
.field-group input[type="file"]:focus{
    border-color:#7ba5ef;
    background:white;
    box-shadow:0 0 0 4px rgba(37, 99, 235, 0.1);
}

.native-select-hidden{
    position:absolute !important;
    width:1px !important;
    height:1px !important;
    min-height:1px !important;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
    opacity:0 !important;
    pointer-events:none !important;
}

.compact-select{
    position:relative;
    width:100%;
}

.compact-select-button{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    width:100%;
    min-height:46px;
    padding:0 13px;
    border:1px solid #cfd7e4;
    border-radius:10px;
    color:var(--ink);
    background:#fbfcfe;
    text-align:left;
    cursor:pointer;
    transition:border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.compact-select-button:focus,
.compact-select.is-open .compact-select-button{
    border-color:#7ba5ef;
    background:white;
    box-shadow:0 0 0 4px rgba(37, 99, 235, 0.1);
}

.compact-select-label{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.compact-select-arrow{
    flex:0 0 auto;
    width:8px;
    height:8px;
    border-right:2px solid #667085;
    border-bottom:2px solid #667085;
    transform:rotate(45deg);
    transition:transform .18s ease;
}

.compact-select.is-open .compact-select-arrow{
    transform:rotate(225deg);
}

.compact-select-menu{
    position:absolute;
    z-index:180;
    right:0;
    left:0;
    top:calc(100% + 6px);
    max-height:240px;
    overflow-y:auto;
    padding:6px;
    border:1px solid #cfd7e4;
    border-radius:12px;
    background:white;
    box-shadow:0 16px 42px rgba(29, 48, 82, 0.18);
}

.compact-select-option{
    display:block;
    width:100%;
    min-height:34px;
    padding:8px 10px;
    border:0;
    border-radius:8px;
    color:#243047;
    background:transparent;
    text-align:left;
    font-size:14px;
    line-height:1.25;
    cursor:pointer;
}

.compact-select-option:hover,
.compact-select-option:focus{
    background:#eef4ff;
    outline:none;
}

.compact-select-option.is-selected{
    color:white;
    background:#4b63cf;
}

.field-group .field-invalid{
    border:2px solid #d62f45 !important;
    background:#fff8f8;
    box-shadow:0 0 0 4px rgba(214, 47, 69, 0.16) !important;
}

.field-group-invalid label{
    color:#b42335;
}

.field-group input[type="file"]{
    padding:5px;
    color:#4d5b71;
}

.field-group input[type="file"]::file-selector-button{
    height:34px;
    margin-right:10px;
    padding:0 14px;
    border:0;
    border-radius:7px;
    color:var(--navy);
    background:var(--blue-soft);
    cursor:pointer;
    font-weight:700;
}

.field-hint{
    color:#8994a7;
    font-size:11px;
}

.billing-expiry-note{
    color:#52627a !important;
    font-size:12px !important;
}

.field-label-muted{
    color:#8994a7;
    font-size:11px;
    font-weight:600;
}

.review-source-files-field{
    gap:6px;
}

.review-legal-reference-label{
    display:flex;
    align-items:center;
    gap:9px;
    cursor:pointer;
}

.review-legal-reference-label input[type="checkbox"]{
    width:16px;
    height:16px;
    margin:0;
    accent-color:#4b63cf;
}

.review-source-files-summary{
    display:grid;
    gap:4px;
    margin-top:2px;
    padding:8px 10px;
    border:1px solid #dfe7f3;
    border-radius:10px;
    color:#52627a;
    background:#f8fbff;
    font-size:12px;
}

.review-source-files-summary strong{
    color:var(--navy-dark);
    font-size:12px;
}

.review-source-files-summary ul{
    display:grid;
    gap:2px;
    margin:0;
    padding-left:18px;
}

.review-source-files-summary li{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.directive-attachment-card{
    padding:14px;
    border:1px solid #d8e1f2;
    border-radius:14px;
    background:#f8fbff;
}

.directive-attachment-dropzone{
    margin-top:7px;
    padding:14px;
    border:1px dashed #aebce0;
    border-radius:12px;
    display:grid;
    gap:7px;
    background:#fff;
    color:#4d5b71;
    cursor:pointer;
    transition:border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.directive-attachment-dropzone:hover,
.directive-attachment-dropzone.is-dragover{
    border-color:#4b63cf;
    background:#f2f6ff;
    box-shadow:0 0 0 4px rgba(75, 99, 207, .12);
}

.directive-attachment-dropzone input[type="file"]{
    max-width:100%;
}

.directive-attachment-dropzone strong{
    color:var(--navy-dark);
    font-size:14px;
}

.directive-attachment-dropzone span{
    color:#758196;
    font-size:12px;
}

.directive-attachment-list,
.directive-attachment-used{
    margin-top:10px;
    padding:10px 12px;
    border:1px solid #e1e7f2;
    border-radius:12px;
    background:#fff;
}

.directive-attachment-list strong,
.directive-attachment-used strong{
    display:block;
    margin-bottom:7px;
    color:var(--navy-dark);
    font-size:12px;
}

.directive-attachment-list ul,
.directive-attachment-used ul{
    display:grid;
    gap:6px;
    margin:0;
    padding:0;
    list-style:none;
}

.directive-attachment-list li,
.directive-attachment-used li{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    color:#4d5b71;
    font-size:12px;
}

.directive-attachment-list li span,
.directive-attachment-used li span{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.directive-attachment-list li em,
.directive-attachment-used li em,
.directive-attachment-empty{
    color:#8994a7;
    font-size:11px;
    font-style:normal;
}

.directive-template-card{
    padding:14px;
    border:1px solid #d8e1f2;
    border-radius:14px;
    background:#fbfcff;
}

.directive-template-options,
.directive-template-usage{
    display:grid;
    gap:9px;
}

.directive-template-options{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    margin-top:8px;
}

.directive-template-option{
    display:flex;
    gap:10px;
    align-items:flex-start;
    min-width:0;
    padding:11px 12px;
    border:1px solid #dfe6f1;
    border-radius:12px;
    background:#fff;
    cursor:pointer;
}

.directive-template-option input{
    margin-top:2px;
}

.directive-template-option b{
    display:block;
    color:var(--navy-dark);
    font-size:13px;
    line-height:1.3;
}

.directive-template-option small{
    display:block;
    margin-top:4px;
    color:#748199;
    font-size:11px;
    line-height:1.45;
}

.directive-template-selection-panel{
    display:grid;
    gap:10px;
    margin-top:10px;
    padding:12px;
    border:1px solid #e2e9f5;
    border-radius:12px;
    background:#f6f9ff;
}

.directive-template-selection-panel[hidden]{
    display:none;
}

.directive-template-summary{
    padding:10px 12px;
    border:1px solid #dae3f3;
    border-radius:10px;
    color:#526177;
    background:#fff;
    font-size:12px;
    line-height:1.45;
}

.directive-template-summary strong{
    display:block;
    color:var(--navy-dark);
    font-size:13px;
}

.directive-template-summary span,
.directive-template-summary small{
    display:block;
    margin-top:3px;
}

.directive-template-actions{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}

.directive-template-usage{
    margin:0;
    padding:10px;
    border:1px dashed #cfd8ea;
    border-radius:12px;
}

.directive-template-usage legend{
    padding:0 6px;
    color:#64748b;
    font-size:11px;
    font-weight:800;
}

.directive-template-used{
    display:grid;
    gap:9px;
    margin:10px 0;
    padding:12px;
    border:1px solid #d5e7d9;
    border-radius:12px;
    background:#f4fbf6;
}

.directive-template-used strong{
    color:#195d3d;
    font-size:13px;
}

.directive-template-used span,
.directive-template-used li{
    color:#42526a;
    font-size:12px;
    line-height:1.5;
}

.directive-template-used ul{
    display:grid;
    gap:6px;
    margin:0;
    padding-left:18px;
}

.directive-structured-card{
    padding:0;
    border:1px solid #d8e1f2;
    border-radius:14px;
    background:linear-gradient(135deg, #f8fbff 0%, #ffffff 100%);
    overflow:hidden;
}

.directive-structured-heading{
    margin:0;
}

.directive-structured-heading h3{
    margin:2px 0 0;
    color:var(--navy-dark);
    font-size:17px;
}

.directive-structured-toggle{
    width:100%;
    min-height:0;
    padding:14px 16px;
    border:0;
    border-radius:0;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    background:transparent;
    box-shadow:none;
    color:inherit;
    text-align:left;
}

.directive-structured-toggle:hover{
    background:#f2f6ff;
    transform:none;
    box-shadow:none;
}

.directive-structured-toggle > span:first-child{
    display:block;
}

.directive-structured-chevron{
    width:34px;
    height:34px;
    border-radius:999px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:#edf3ff;
    color:#3e55c7;
    font-size:18px;
    font-weight:900;
    transition:transform .18s ease, background .18s ease;
}

.directive-structured-card.is-open .directive-structured-chevron{
    transform:rotate(180deg);
    background:#e3ebff;
}

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

.directive-structured-grid[hidden]{
    display:none;
}

.directive-structured-field{
    display:flex;
    flex-direction:column;
    gap:6px;
}

.directive-structured-field label{
    color:#344054;
    font-size:12px;
    font-weight:800;
}

.directive-structured-field textarea,
.directive-structured-field input{
    width:100%;
    border:1px solid #cfd7e4;
    border-radius:10px;
    background:#fff;
    color:var(--ink);
    outline:none;
}

.directive-structured-field textarea{
    min-height:76px;
    padding:10px 12px;
    resize:vertical;
    line-height:1.45;
}

.directive-structured-field input{
    min-height:42px;
    padding:0 12px;
}

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

.control-actions{
    display:flex;
    gap:10px;
    margin-top:19px;
    padding-top:18px;
    border-top:1px solid #e9edf3;
}

.directive-control-actions{
    flex-direction:column;
    align-items:flex-start;
}

.directive-control-actions > .directive-template-card{
    width:100%;
}

.directive-draft-mode{
    display:grid;
    width:100%;
    gap:10px;
    margin:0;
    padding:14px;
    border:1px solid #d8e1f2;
    border-radius:12px;
    background:#f8fbff;
}

.directive-draft-mode legend{
    padding:0 6px;
    color:#2d3a55;
    font-size:13px;
    font-weight:800;
}

.directive-draft-mode-option{
    display:flex;
    align-items:flex-start;
    gap:10px;
    padding:11px 12px;
    border:1px solid #dfe7f4;
    border-radius:10px;
    background:#fff;
    color:#24314c;
    cursor:pointer;
    transition:border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.directive-draft-mode-option:has(input:checked){
    border-color:#9eb4e8;
    background:#f2f6ff;
    box-shadow:0 0 0 3px rgba(75, 99, 207, .1);
}

.directive-draft-mode-option input{
    width:17px;
    height:17px;
    margin-top:2px;
    accent-color:var(--blue);
}

.directive-draft-mode-option b{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:7px;
    color:var(--navy-dark);
    font-size:13px;
}

.directive-draft-mode-option em{
    padding:3px 7px;
    border-radius:999px;
    color:#0d714c;
    background:var(--green-soft);
    font-size:10px;
    font-style:normal;
    font-weight:800;
    text-transform:uppercase;
}

.directive-draft-mode-option small{
    display:block;
    margin-top:4px;
    color:#66758d;
    font-size:11px;
    line-height:1.45;
}

.document-template-preview-unavailable{
    display:flex;
    min-height:180px;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:8px;
    margin:auto;
    padding:28px;
    border:1px dashed #bccbe0;
    border-radius:12px;
    color:#315b9d;
    background:#f7faff;
    text-align:center;
}

.document-template-preview-unavailable span{
    color:var(--muted);
    font-size:12px;
}

/* Directive-only cards for metadata, reference source, and draft mode. */
#directiveModule .directive-info-card,
#directiveModule .directive-reference-card,
#directiveModule .directive-draft-mode-grid{
    min-width:0;
    padding:18px;
    border:1px solid #e3e8f2;
    border-radius:14px;
    background:#fff;
    box-shadow:0 3px 12px rgba(31, 50, 87, .045);
}

#directiveModule .directive-card-heading{
    display:flex;
    align-items:center;
    gap:12px;
    min-width:0;
    margin-bottom:16px;
}

#directiveModule .directive-card-heading-icon{
    display:grid;
    width:44px;
    height:44px;
    flex:0 0 44px;
    place-items:center;
    border-radius:12px;
    color:#4268df;
    background:#eef3ff;
}

#directiveModule .directive-card-heading-icon svg,
#directiveModule .directive-info-control-icon svg,
#directiveModule .directive-reference-icon svg,
#directiveModule .directive-draft-mode-icon svg{
    width:22px;
    height:22px;
    fill:none;
    stroke:currentColor;
    stroke-linecap:round;
    stroke-linejoin:round;
    stroke-width:1.7;
}

#directiveModule .directive-card-heading-copy{
    display:block;
    min-width:0;
}

#directiveModule .directive-card-heading-copy h2{
    margin:0;
    color:var(--navy-dark);
    font-size:17px;
    font-weight:800;
    line-height:1.25;
}

#directiveModule .directive-card-heading-copy small{
    display:block;
    margin-top:3px;
    color:#78869c;
    font-size:12px;
    line-height:1.4;
}

#directiveModule .directive-info-grid{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:14px 18px;
}

#directiveModule .directive-info-field{
    min-width:0;
}

#directiveModule .directive-info-control{
    display:flex;
    min-width:0;
    min-height:50px;
    overflow:hidden;
    border:1px solid #dce3ee;
    border-radius:10px;
    background:#fbfcfe;
    transition:border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

#directiveModule .directive-info-control:focus-within{
    border-color:#7ba5ef;
    background:#fff;
    box-shadow:0 0 0 4px rgba(37, 99, 235, .1);
}

#directiveModule .directive-info-control:has(.field-invalid){
    border-color:#d62f45;
    background:#fff8f8;
    box-shadow:0 0 0 4px rgba(214, 47, 69, .12);
}

#directiveModule .directive-info-control-icon{
    display:grid;
    width:54px;
    flex:0 0 54px;
    place-items:center;
    border-right:1px solid #e3e8f1;
    color:#78869c;
    background:#f7f9fc;
}

#directiveModule .directive-info-control > input,
#directiveModule .directive-info-control > textarea{
    width:100%;
    min-width:0;
    min-height:48px;
    flex:1 1 auto;
    padding:0 13px;
    border:0 !important;
    border-radius:0;
    outline:0;
    color:var(--ink);
    background:transparent;
    box-shadow:none !important;
}

#directiveModule .directive-info-control > textarea{
    min-height:80px;
    padding:11px 13px;
    resize:vertical;
    line-height:1.45;
}

#directiveModule .directive-info-control > .field-invalid{
    border:0 !important;
    background:transparent !important;
    box-shadow:none !important;
}

#directiveModule .directive-reference-options{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:12px;
    margin-top:0;
}

#directiveModule .directive-reference-option{
    align-items:center;
    min-height:86px;
    min-width:0;
    gap:13px;
    padding:14px 16px;
    border-color:#e1e7f0;
    border-radius:12px;
    transition:border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

#directiveModule .directive-reference-option:hover{
    border-color:#b7c7ef;
}

#directiveModule .directive-reference-option:has(input:checked),
#directiveModule .directive-draft-mode-card:has(input:checked){
    border-color:#7898f4;
    background:#f4f7ff;
    box-shadow:0 0 0 1px rgba(75, 99, 207, .08);
}

#directiveModule .directive-reference-option:focus-within,
#directiveModule .directive-draft-mode-card:focus-within{
    outline:3px solid rgba(75, 99, 207, .17);
    outline-offset:2px;
}

#directiveModule .directive-reference-option input{
    width:18px;
    height:18px;
    flex:0 0 18px;
    margin:0;
    accent-color:var(--blue);
}

#directiveModule .directive-reference-icon,
#directiveModule .directive-draft-mode-icon{
    display:grid;
    width:42px;
    height:42px;
    flex:0 0 42px;
    place-items:center;
    border-radius:12px;
    color:#4268df;
    background:#eef3ff;
}

#directiveModule .directive-reference-option > span:last-child,
#directiveModule .directive-draft-mode-card > span:last-child{
    min-width:0;
}

#directiveModule .directive-reference-option b{
    font-size:13px;
}

#directiveModule .directive-reference-option small{
    font-size:12px;
}

#directiveModule .directive-draft-mode-grid{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:12px;
}

#directiveModule .directive-draft-mode-grid legend{
    display:flex;
    align-items:center;
    gap:12px;
    max-width:100%;
    margin:0 0 14px;
    padding:0;
}

#directiveModule .directive-draft-mode-heading-copy{
    display:block;
    min-width:0;
}

#directiveModule .directive-draft-mode-heading-copy strong{
    display:block;
    color:var(--navy-dark);
    font-size:17px;
    font-weight:800;
    line-height:1.25;
}

#directiveModule .directive-draft-mode-heading-copy small{
    display:block;
    margin-top:3px;
    color:#78869c;
    font-size:12px;
    font-weight:400;
    line-height:1.4;
}

#directiveModule .directive-draft-mode-card{
    align-items:flex-start;
    min-width:0;
    min-height:124px;
    gap:10px;
    padding:14px 13px;
    border-color:#e1e7f0;
    border-radius:12px;
    transition:border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

#directiveModule .directive-draft-mode-card input{
    width:18px;
    height:18px;
    flex:0 0 18px;
    margin:2px 0 0;
    accent-color:var(--blue);
}

#directiveModule .directive-draft-mode-icon{
    width:40px;
    height:40px;
    flex-basis:40px;
}

#directiveModule .directive-draft-mode-card b{
    font-size:13px;
}

#directiveModule .directive-draft-mode-card small{
    font-size:11px;
}

@media (max-width:1100px){
    #directiveModule .directive-info-grid,
    #directiveModule .directive-draft-mode-grid{
        grid-template-columns:repeat(2, minmax(0, 1fr));
    }
}

@media (max-width:760px){
    #directiveModule .directive-info-grid,
    #directiveModule .directive-reference-options,
    #directiveModule .directive-draft-mode-grid{
        grid-template-columns:1fr;
    }

    #directiveModule .directive-info-card,
    #directiveModule .directive-reference-card,
    #directiveModule .directive-draft-mode-grid{
        padding:15px;
    }

    #directiveModule .directive-draft-mode-card{
        min-height:0;
    }
}

#directiveModule .directive-intake-layout{
    display:grid;
    grid-column:1 / -1;
    grid-template-columns:minmax(0, 2.1fr) minmax(300px, .95fr);
    align-items:stretch;
    gap:14px;
    min-width:0;
}

#directiveModule .directive-instruction-card,
#directiveModule .directive-quick-settings-card,
#directiveModule .directive-attachments-card{
    min-width:0;
    padding:14px;
    border:1px solid #e1e8f3;
    border-radius:16px;
    background:#fff;
    box-shadow:0 4px 16px rgba(32, 55, 96, .045);
}

#directiveModule .directive-intake-card-heading{
    display:flex;
    align-items:center;
    gap:10px;
    min-width:0;
    margin-bottom:10px;
}

#directiveModule .directive-intake-heading-icon{
    display:grid;
    width:38px;
    height:38px;
    flex:0 0 38px;
    place-items:center;
    border-radius:11px;
    color:#4268df;
    background:#eef3ff;
}

#directiveModule .directive-intake-heading-icon svg,
#directiveModule .directive-upload-panel-icon svg{
    width:23px;
    height:23px;
    fill:none;
    stroke:currentColor;
    stroke-linecap:round;
    stroke-linejoin:round;
    stroke-width:1.8;
}

#directiveModule .directive-intake-card-heading h2{
    min-width:0;
    margin:0;
    color:var(--navy-dark);
    font-size:16px;
    font-weight:800;
    line-height:1.3;
}

#directiveModule .directive-instruction-card .directive-intake-card-heading label{
    color:var(--navy-dark);
    font-size:16px;
    font-weight:800;
    line-height:1.35;
    cursor:text;
}

#directiveModule .directive-instruction-card textarea{
    display:block;
    width:100%;
    min-height:132px;
    max-height:240px;
    padding:11px 14px;
    border:1px solid #d5deec;
    border-radius:12px;
    color:var(--ink);
    background:#fbfcfe;
    outline:none;
    resize:vertical;
    line-height:1.45;
    transition:border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

#directiveModule .directive-instruction-card textarea:focus{
    border-color:#7ba5ef;
    background:#fff;
    box-shadow:0 0 0 4px rgba(37, 99, 235, .1);
}

#directiveModule .directive-quick-settings-card{
    display:grid;
    align-content:start;
    gap:9px;
}

#directiveModule .directive-quick-settings-card > .directive-intake-card-heading{
    margin-bottom:0;
}

#directiveModule .directive-quick-settings-field,
#directiveModule .directive-subtype-field{
    gap:6px;
}

#directiveModule #directiveReportWorkflowHint{
    display:none !important;
}

#directiveModule .directive-quick-settings-field > label{
    color:#26334a;
    font-size:13px;
    font-weight:750;
}

#directiveModule .directive-quick-settings-select{
    display:grid;
    grid-template-columns:38px minmax(0, 1fr);
    align-items:center;
    min-height:44px;
    overflow:visible;
    border:1px solid #d7e0ef;
    border-radius:10px;
    background:#fbfcfe;
}

#directiveModule .directive-quick-settings-select-icon{
    display:grid;
    width:38px;
    height:42px;
    place-items:center;
    border-right:1px solid #e3e8f1;
    color:#73819a;
    background:#f7f9fc;
    border-radius:9px 0 0 9px;
}

#directiveModule .directive-quick-settings-select-icon svg{
    width:19px;
    height:19px;
    fill:none;
    stroke:currentColor;
    stroke-linecap:round;
    stroke-linejoin:round;
    stroke-width:1.7;
}

#directiveModule .directive-quick-settings-select > select{
    grid-column:2;
    width:100%;
    min-width:0;
    min-height:42px;
    border:0;
    background:transparent;
}

#directiveModule .directive-quick-settings-select > .compact-select{
    grid-column:2;
    min-width:0;
    width:100%;
}

#directiveModule .directive-quick-settings-select .compact-select-button{
    min-height:42px;
    border:0;
    background:transparent;
    box-shadow:none;
}

#directiveModule .directive-quick-settings-select .compact-select-button:focus,
#directiveModule .directive-quick-settings-select .compact-select.is-open .compact-select-button{
    box-shadow:inset 0 0 0 2px rgba(75, 99, 207, .45);
}

#directiveModule .directive-subtype-field{
    min-width:0;
}

#directiveModule .directive-subtype-field > .compact-select{
    width:100%;
}

#directiveModule .directive-subtype-field .compact-select-button{
    min-height:42px;
    padding:0 12px;
    border-radius:9px;
}

#directiveModule .directive-subtype-field > .field-hint{
    display:none;
}

#directiveModule .directive-attachments-card{
    grid-column:1 / -1;
}

#directiveModule .directive-attachments-card > .directive-intake-card-heading{
    margin-bottom:10px;
}

#directiveModule .directive-intake-heading-icon-folder{
    color:#354fc2;
}

#directiveModule .directive-attachments-grid{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:12px;
    min-width:0;
}

#directiveModule .directive-upload-panel,
#directiveModule .directive-file-list-panel{
    min-width:0;
    padding:10px;
    border:1px solid #e2e9f3;
    border-radius:14px;
    background:#fff;
}

#directiveModule .directive-upload-panel-heading{
    display:flex;
    align-items:center;
    gap:8px;
    min-width:0;
    margin-bottom:8px;
}

#directiveModule .directive-upload-panel-icon{
    display:grid;
    width:34px;
    height:34px;
    flex:0 0 34px;
    place-items:center;
    border-radius:12px;
    color:#4268df;
    background:#eef3ff;
}

#directiveModule .directive-upload-panel-heading h3{
    min-width:0;
    margin:0;
    color:var(--navy-dark);
    font-size:14px;
    font-weight:750;
}

#directiveModule .directive-attachment-count{
    flex:0 0 auto;
    margin-left:auto;
    padding:5px 8px;
    border-radius:999px;
    color:#334b9d;
    background:#f0f4ff;
    font-size:12px;
    font-weight:700;
    white-space:nowrap;
}

#directiveModule .directive-upload-dropzone{
    position:relative;
    display:grid;
    min-height:84px;
    margin:0;
    padding:8px;
    overflow:hidden;
    border:1px dashed #b7c7e7;
    border-radius:12px;
    background:#f9fbff;
    cursor:pointer;
    transition:border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

#directiveModule .directive-upload-dropzone:hover,
#directiveModule .directive-upload-dropzone.is-dragover,
#directiveModule .directive-upload-dropzone:focus-within{
    border-color:#4b63cf;
    background:#f2f6ff;
    box-shadow:0 0 0 4px rgba(75, 99, 207, .12);
}

#directiveModule .directive-upload-dropzone input[type="file"]{
    position:absolute;
    z-index:2;
    inset:0;
    width:100%;
    height:100%;
    max-width:none;
    min-height:0;
    margin:0;
    padding:0;
    border:0;
    outline:0;
    opacity:0;
    cursor:pointer;
}

#directiveModule .directive-upload-visual{
    display:grid;
    justify-items:center;
    align-content:center;
    gap:5px;
    min-width:0;
    padding:4px;
    color:#33415d;
    pointer-events:none;
    text-align:center;
}

#directiveModule .directive-upload-icon{
    width:26px;
    height:26px;
    fill:none;
    stroke:#4b63cf;
    stroke-linecap:round;
    stroke-linejoin:round;
    stroke-width:2;
}

#directiveModule .directive-upload-visual strong{
    color:var(--navy-dark);
    font-size:13px;
    font-weight:700;
}

#directiveModule .directive-upload-visual > span{
    color:#78869c;
    font-size:11px;
    line-height:1.45;
}

#directiveModule .directive-file-list-panel .directive-attachment-list{
    display:grid;
    align-content:stretch;
    min-height:84px;
    margin:0;
    padding:8px;
    border:1px solid #edf0f5;
    border-radius:12px;
    background:#fbfcfe;
}

#directiveModule .directive-attachment-empty-state{
    display:grid;
    justify-items:center;
    align-content:center;
    gap:6px;
    min-width:0;
    color:#8a96aa;
    text-align:center;
}

#directiveModule .directive-attachment-empty-state svg{
    width:28px;
    height:28px;
    fill:none;
    stroke:#9aa8c0;
    stroke-linecap:round;
    stroke-linejoin:round;
    stroke-width:1.7;
}

#directiveModule .directive-attachment-empty-state .directive-attachment-empty{
    color:#77859b;
    font-size:12px;
}

#directiveModule .directive-file-list-panel .directive-attachment-list ul{
    align-content:start;
    gap:7px;
}

#directiveModule .directive-file-list-panel .directive-attachment-list li{
    min-width:0;
    padding:7px 9px;
    border:1px solid #e8edf5;
    border-radius:9px;
    background:#fff;
}

@media (max-width:760px){
    #directiveModule .directive-intake-layout,
    #directiveModule .directive-attachments-grid{
        grid-template-columns:1fr;
    }

    #directiveModule .directive-instruction-card,
    #directiveModule .directive-quick-settings-card,
    #directiveModule .directive-attachments-card{
        padding:12px;
    }

    #directiveModule .directive-upload-dropzone,
    #directiveModule .directive-file-list-panel .directive-attachment-list{
        min-height:84px;
    }
}

.btn,
button{
    min-height:42px;
    padding:0 17px;
    border:1px solid transparent;
    border-radius:9px;
    cursor:pointer;
    font-weight:700;
    transition:transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.btn:hover,
button:hover{
    transform:translateY(-1px);
}

.btn:disabled,
button:disabled{
    cursor:wait;
    opacity:.65;
    transform:none;
}

.btn-primary{
    color:white;
    background:linear-gradient(135deg, #1d4ed8, #24458f);
    box-shadow:0 7px 16px rgba(37, 78, 166, 0.2);
}

.btn-secondary,
.btn-success{
    border-color:#cbd6e5;
    color:var(--navy);
    background:white;
}

.btn-success{
    border-color:#b9dfcc;
    color:#0d714c;
    background:var(--green-soft);
}

.btn-warning{
    border-color:#d9e0e9;
    color:#536075;
    background:#f3f5f8;
}

.btn-template{
    border-color:#b9d8ca;
    color:#0d714c;
    background:linear-gradient(135deg, #f1fbf6, #e2f5ec);
}

#documentInfo:empty{
    display:none;
}

.analysis-context{
    margin:18px 0;
    padding:18px;
}

#documentInfo .analysis-context.is-collapsed{
    margin:8px 0;
    padding:8px 18px;
}

.analysis-context-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}

.analysis-context h3{
    margin:0 0 12px;
    color:var(--navy-dark);
    font-size:16px;
}

#documentInfo .analysis-context.is-collapsed h3{
    margin:0;
}

.analysis-context-toggle{
    display:inline-grid;
    width:30px;
    min-width:30px;
    height:30px;
    min-height:30px;
    flex:0 0 30px;
    place-items:center;
    margin:0 0 12px;
    padding:0;
    border:1px solid #d9e1ed;
    border-radius:8px;
    color:var(--navy);
    background:#fff;
    cursor:pointer;
    transition:background .16s ease, border-color .16s ease, color .16s ease;
}

#documentInfo .analysis-context.is-collapsed .analysis-context-toggle{
    margin:0;
}

.analysis-context-toggle:hover,
.analysis-context-toggle:focus-visible{
    border-color:#9baeea;
    color:var(--blue);
    background:#f4f6ff;
}

.analysis-context-toggle:focus-visible{
    outline:2px solid #9baeea;
    outline-offset:2px;
}

.analysis-context-toggle-icon{
    font-size:12px;
    line-height:1;
}

.analysis-context-details[hidden]{
    display:none;
}

.rule-coverage{
    margin-bottom:12px;
    padding:10px 12px;
    border:1px solid #f2dda5;
    border-radius:9px;
    color:#74500d;
    background:var(--amber-soft);
    font-size:13px;
}

.rule-findings-list{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:8px;
    max-height:230px;
    overflow:auto;
    padding-right:4px;
}

.rule-finding{
    margin:0;
    padding:11px 12px;
    border:1px solid #e4e9f0;
    border-left:4px solid #6c7a91;
    border-radius:9px;
    color:#4d596d;
    background:#fbfcfe;
    font-size:12px;
    line-height:1.4;
}

.rule-finding b{
    color:#29364d;
}

.rule-cao{
    border-left-color:var(--red);
    background:var(--red-soft);
}

.rule-trung{
    border-left-color:#e98a22;
    background:#fffaf1;
}

.rule-thấp{
    border-left-color:var(--blue);
    background:#f5f8ff;
}

.auto-fix-note{
    margin-top:5px;
    color:var(--green);
    font-weight:750;
}

.context-ok{
    padding:10px 12px;
    border-radius:9px;
    color:#0d714c;
    background:var(--green-soft);
}

.workspace{
    display:grid;
    grid-template-columns:minmax(0, 1fr) 12px minmax(360px, var(--review-assistant-width, 40%));
    gap:0;
    align-items:stretch;
}

.workspace.assistant-collapsed{
    grid-template-columns:minmax(0, 1fr);
}

.workspace.assistant-collapsed .right-panel,
.workspace.assistant-collapsed .workspace-resize-handle{
    display:none;
}

.left-panel,
.ai-panel{
    min-width:0;
    overflow:hidden;
}

.left-panel,
.right-panel,
.ai-panel{
    display:flex;
    flex-direction:column;
}

.left-panel,
.ai-panel{
    height:calc(100vh - 110px);
    height:calc(100dvh - 110px);
    min-height:600px;
}

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

.workspace-resize-handle{
    position:relative;
    display:block;
    width:12px;
    min-width:12px;
    align-self:stretch;
    padding:0;
    border:0;
    background:transparent;
    cursor:col-resize;
}

.workspace-resize-handle::before{
    content:"";
    position:absolute;
    top:0;
    bottom:0;
    left:50%;
    width:2px;
    border-radius:999px;
    background:#cfd8e6;
    transform:translateX(-50%);
    transition:background .16s ease, box-shadow .16s ease;
}

.workspace-resize-handle::after{
    content:"";
    position:absolute;
    top:50%;
    left:50%;
    width:4px;
    height:34px;
    border-radius:999px;
    background:repeating-linear-gradient(
        to bottom,
        #8a97ad 0,
        #8a97ad 4px,
        transparent 4px,
        transparent 9px
    );
    opacity:.58;
    transform:translate(-50%, -50%);
}

.workspace-resize-handle:hover::before,
.workspace-resize-handle:focus-visible::before,
body.is-review-resizing .workspace-resize-handle::before{
    background:var(--blue);
    box-shadow:0 0 0 4px rgba(79, 99, 232, .12);
}

.workspace-resize-handle:focus-visible{
    outline:2px solid rgba(79, 99, 232, .55);
    outline-offset:2px;
}

body.is-review-resizing,
body.is-review-resizing *{
    cursor:col-resize !important;
    user-select:none;
}

.panel-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    min-height:68px;
    padding:14px 18px;
    border-bottom:1px solid var(--line);
    background:linear-gradient(180deg, #fff, #fbfcff);
}

.panel-header > div:first-child{
    min-width:0;
}

.panel-header h2{
    font-size:17px;
    letter-spacing:-.01em;
}

.panel-header-actions{
    display:flex;
    flex:0 0 auto;
    align-items:center;
    gap:8px;
}

#reviewWorkspace > .left-panel > .panel-header,
#reviewWorkspace .ai-panel-header{
    min-height:56px;
    padding:9px 18px;
}

#reviewWorkspace .panel-kicker{
    margin-bottom:2px;
    font-size:10px;
}

#reviewWorkspace .panel-header h2{
    font-size:16px;
}

#reviewWorkspace .panel-header-actions .panel-icon-button{
    width:30px;
    height:30px;
    min-height:30px;
}

.panel-icon-button{
    display:inline-flex;
    width:32px;
    height:32px;
    flex:0 0 auto;
    align-items:center;
    justify-content:center;
    gap:5px;
    padding:0;
    border:1px solid #dfe6f2;
    border-radius:8px;
    color:#40506b;
    background:#fff;
    box-shadow:0 4px 12px rgba(29, 48, 82, .06);
    font:800 13px/1 Inter, "Segoe UI", Arial, sans-serif;
    cursor:pointer;
}

.panel-icon-button:hover,
.panel-icon-button:focus-visible{
    color:var(--blue);
    border-color:#cbd6ff;
    background:#f7f9ff;
}

.panel-icon-button:focus-visible{
    outline:2px solid rgba(79, 99, 232, .45);
    outline-offset:2px;
}

.panel-icon-button span[aria-hidden="true"]{
    font-size:18px;
    line-height:1;
}

.review-assistant-open-button,
.review-assistant-reset-button{
    width:auto;
    min-width:32px;
    padding:0 9px;
}

.panel-button-label{
    font-size:11px;
    font-weight:800;
}

.review-assistant-reset-button{
    color:#52627a;
    font-size:11px;
}

.panel-status,
.ai-status{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:6px 9px;
    border-radius:999px;
    color:#637087;
    background:#eef2f7;
    font-size:11px;
    font-weight:700;
}

.ai-status{
    color:#0f7650;
    background:var(--green-soft);
}

.ai-status span{
    width:7px;
    height:7px;
    border-radius:50%;
    background:#20a875;
    box-shadow:0 0 0 3px rgba(32, 168, 117, .13);
}

.word-preview{
    position:relative;
    flex:1;
    min-height:0;
    max-height:none;
    padding:24px 16px;
    overflow:auto;
    background:#dfe4eb;
}

.word-preview .docx-wrapper{
    padding:0;
    background:#dfe4eb;
}

.word-preview .docx-wrapper > section.docx{
    box-sizing:border-box;
    margin:0 auto 24px;
    box-shadow:0 8px 26px rgba(21, 34, 57, 0.18);
}

.word-preview .docx-wrapper,
.word-preview section.docx,
.word-preview section.docx *{
    font-family:"Times New Roman", Times, serif !important;
}

.word-preview-staging{
    position:fixed;
    z-index:-1;
    top:0;
    left:-100000px;
    visibility:hidden;
    pointer-events:none;
}

.word-preview.is-rendering::before{
    content:"Đang cập nhật bản xem trước...";
    position:sticky;
    z-index:20;
    top:12px;
    display:block;
    width:max-content;
    max-width:calc(100% - 32px);
    margin:0 auto -38px;
    padding:8px 13px;
    border-radius:999px;
    color:white;
    background:rgba(18, 53, 107, .92);
    box-shadow:0 4px 14px rgba(11, 36, 74, .22);
    font:650 12px "Segoe UI", Arial, sans-serif;
}

.word-preview section.docx p.ai-suggestion{
    background:rgba(37, 99, 235, 0.06) !important;
    outline:2px solid rgba(37, 99, 235, .72);
    outline-offset:2px;
}

.word-preview section.docx p.accepted-insert{
    background:rgba(22, 132, 91, 0.07) !important;
    outline:2px solid rgba(22, 132, 91, .65);
    outline-offset:2px;
}

.review-manual-toolbar{
    position:sticky;
    top:0;
    z-index:35;
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:6px;
    min-height:44px;
    padding:6px 10px;
    border:1px solid #d6def0;
    border-radius:10px 10px 0 0;
    background:rgba(255,255,255,.97);
    box-shadow:0 4px 12px rgba(22,36,69,.12);
}

.review-manual-toolbar button,
.review-manual-find-panel button{
    min-height:30px;
    padding:5px 9px;
    border:1px solid #d9e1f0;
    border-radius:7px;
    color:#24355d;
    background:#f8faff;
    font:700 12px/1.2 Inter, "Segoe UI", Arial, sans-serif;
    cursor:pointer;
}

.review-manual-toolbar button:disabled,
.review-manual-find-panel button:disabled{
    cursor:not-allowed;
    opacity:.5;
}

.review-manual-toolbar button:hover:not(:disabled),
.review-manual-toolbar button:focus-visible,
.review-manual-find-panel button:hover:not(:disabled),
.review-manual-find-panel button:focus-visible{
    border-color:#8291ea;
    color:#3f51c7;
    background:#eef1ff;
}

.review-preview-toolbar-format-group{
    gap:4px;
}

.review-preview-toolbar-format-group button{
    min-width:30px;
    padding:5px 7px;
}

.review-preview-toolbar-format-group button[aria-pressed="true"]{
    color:#fff;
    border-color:#4f63e8;
    background:#4f63e8;
}

.review-preview-toolbar-format-group button.is-mixed{
    color:#3f51c7;
    border-color:#8291ea;
    background:linear-gradient(180deg,#eef1ff 0 42%,#d7ddff 42% 58%,#eef1ff 58%);
}

.review-preview-toolbar-format-group button:disabled{
    cursor:not-allowed;
    opacity:.45;
}

.review-preview-toolbar-subdivider{
    width:1px;
    height:22px;
    margin:0 2px;
    background:#d6def0;
}

.review-preview-toolbar-icon.format-bold{font-weight:900}
.review-preview-toolbar-icon.format-italic{font-style:italic}
.review-preview-toolbar-icon.format-underline{text-decoration:underline}

.review-manual-toolbar-state{
    display:flex;
    align-items:center;
    min-height:30px;
    padding:5px 8px;
    border-radius:7px;
    color:#52627e;
    background:#f0f3f8;
    font:700 12px/1.2 Inter, "Segoe UI", Arial, sans-serif;
}

.review-manual-toolbar.is-busy .review-manual-toolbar-state{
    color:#8b5e1b;
    background:#fff6df;
}

.review-manual-toolbar.is-manual .review-manual-toolbar-state{
    color:#2f6f4e;
    background:#edf8f1;
}

.review-manual-save-status{
    min-height:30px;
    padding:5px 8px;
    color:#52627e;
    font:600 12px/1.2 Inter, "Segoe UI", Arial, sans-serif;
}

.review-manual-toolbar.is-saving .review-manual-save-status{
    color:#8b5e1b;
}

.review-manual-toolbar.is-save-error .review-manual-save-status{
    color:#a33a3a;
}

.review-manual-find-panel{
    display:flex;
    align-items:center;
    gap:4px;
}

.review-manual-find-panel input{
    width:180px;
    min-height:30px;
    padding:5px 8px;
    border:1px solid #d9e1f0;
    border-radius:7px;
    font:500 12px/1.2 Inter, "Segoe UI", Arial, sans-serif;
}

.review-manual-find-panel span{
    min-width:42px;
    color:#52627e;
    font:650 12px/1.2 Inter, "Segoe UI", Arial, sans-serif;
    text-align:center;
}

.word-preview section.docx p.review-manual-editing{
    outline:2px solid rgba(47,111,78,.9);
    outline-offset:2px;
    background:rgba(47,111,78,.06) !important;
}

.word-preview section.docx p.review-manual-match{
    outline:2px solid rgba(234,140,32,.9);
    outline-offset:2px;
}

.review-manual-compare-panel{
    max-height:240px;
    overflow:auto;
    padding:10px 14px;
    border:1px solid #d6def0;
    border-top:0;
    background:#fff;
    font:500 12px/1.45 Inter, "Segoe UI", Arial, sans-serif;
}

.review-manual-compare-panel pre{
    margin:4px 0 10px;
    white-space:pre-wrap;
}

.review-editor-toolbar{
    position:fixed;
    z-index:80;
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    max-width:min(560px, calc(100vw - 24px));
    padding:8px;
    border:1px solid #d6def0;
    border-radius:10px;
    background:#fff;
    box-shadow:0 12px 28px rgba(22, 36, 69, .2);
}

.review-editor-toolbar button{
    min-height:32px;
    padding:6px 10px;
    border:1px solid #d9e1f0;
    border-radius:7px;
    color:#24355d;
    background:#f8faff;
    font:700 12px/1.2 Inter, "Segoe UI", Arial, sans-serif;
    cursor:pointer;
}

.review-editor-toolbar-state{
    display:flex;
    align-items:center;
    min-height:32px;
    padding:6px 9px;
    border-radius:7px;
    color:#2f6f4e;
    background:#edf8f1;
    font:700 12px/1.2 Inter, "Segoe UI", Arial, sans-serif;
}

.review-editor-selection-count{
    display:flex;
    align-items:center;
    min-height:32px;
    padding:6px 9px;
    border-radius:7px;
    color:#3f51c7;
    background:#eef1ff;
    font:700 12px/1.2 Inter, "Segoe UI", Arial, sans-serif;
}

.review-editor-toolbar.is-manual .review-editor-toolbar-state{
    color:#8b5e1b;
    background:#fff6df;
}

.review-editor-toolbar.is-unsupported .review-editor-toolbar-state{
    color:#687386;
    background:#f0f2f6;
}

.review-editor-toolbar button:hover,
.review-editor-toolbar button:focus-visible{
    border-color:#8291ea;
    color:#3f51c7;
    background:#eef1ff;
}

.review-editor-toolbar button:focus-visible{
    outline:2px solid rgba(79, 99, 232, .35);
    outline-offset:2px;
}

.review-editor-toolbar [data-review-editor-command-set]{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
}

.review-editor-toolbar [data-review-editor-command-set][hidden],
.review-editor-structure-menu[hidden]{
    display:none;
}

.review-editor-structure-picker{
    position:relative;
}

.review-editor-structure-menu{
    position:absolute;
    top:calc(100% + 6px);
    left:0;
    z-index:2;
    display:flex;
    min-width:150px;
    flex-direction:column;
    gap:4px;
    padding:8px;
    border:1px solid #d6def0;
    border-radius:8px;
    background:#fff;
    box-shadow:0 10px 24px rgba(22, 36, 69, .18);
}

.review-editor-structure-menu strong{
    padding:2px 4px 5px;
    color:#354264;
    font-size:12px;
}

.review-editor-structure-menu button{
    width:100%;
    text-align:left;
}

.word-preview section.docx p[data-review-block-id]{
    cursor:text;
}

.word-preview section.docx p.review-editor-selected{
    outline:2px solid rgba(79, 99, 232, .9);
    outline-offset:2px;
    background:rgba(79, 99, 232, .06) !important;
}

.review-editor-panel{
    display:flex;
    flex-direction:column;
    gap:14px;
    padding:18px;
}

.review-editor-panel-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
}

.review-editor-panel h3{
    margin:0;
    color:#24345e;
    font-size:18px;
}

.review-editor-panel p{
    margin:4px 0 0;
    color:#69748a;
    font-size:13px;
    line-height:1.5;
}

.review-editor-meta{
    display:flex;
    flex-wrap:wrap;
    gap:6px 12px;
    color:#65718a;
    font-size:12px;
}

.review-editor-editability{
    display:flex;
    flex-direction:column;
    gap:3px;
    padding:9px 11px;
    border-left:4px solid #4c9b6d;
    color:#315b45;
    background:#eef9f2;
    font-size:12px;
    line-height:1.45;
}

.review-editor-editability.is-manual{
    border-left-color:#d68b2e;
    color:#76521d;
    background:#fff9ee;
}

.review-editor-source,
.review-editor-option{
    padding:12px 14px;
    border:1px solid #e1e6f1;
    border-radius:8px;
    background:#f7f8fc;
}

.review-editor-source strong,
.review-editor-option strong{
    display:block;
    margin-bottom:6px;
    color:#707c95;
    font-size:11px;
    letter-spacing:.06em;
    text-transform:uppercase;
}

.review-editor-source blockquote,
.review-editor-option blockquote{
    margin:0;
    color:#29344d;
    font-size:14px;
    line-height:1.55;
    white-space:pre-wrap;
}

.review-editor-request{
    display:flex;
    flex-direction:column;
    gap:6px;
}

.review-editor-request label{
    color:#4c5871;
    font-size:12px;
    font-weight:750;
}

.review-editor-request textarea{
    width:100%;
    min-height:74px;
    resize:vertical;
    padding:9px 10px;
    border:1px solid #d8dfed;
    border-radius:7px;
    color:#26324c;
    background:#fff;
    font:13px/1.5 Inter, "Segoe UI", Arial, sans-serif;
}

.review-editor-request textarea:focus{
  border-color:#7282e2;
  outline:2px solid rgba(79, 99, 232, .13);
}

.review-editor-marker-note{
  margin:12px 0;
  padding:10px 12px;
  border-left:3px solid #4652c9;
  background:#f4f5ff;
  color:#3c4670;
  font-size:.92rem;
}

.review-editor-marker-mode{
  display:block;
  margin-top:4px;
}

#reviewEditorMarkerMode{
  width:100%;
  margin-bottom:4px;
  padding:9px 10px;
  border:1px solid #d8dcec;
  border-radius:6px;
  background:#fff;
  color:#27345f;
}

.review-editor-options{
    display:flex;
    flex-direction:column;
    gap:10px;
}

.review-editor-option{
    background:#fff;
}

.review-editor-option.is-risk{
    border-color:#e8c98f;
    background:#fffaf1;
}

.review-editor-option-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    margin-bottom:7px;
}

.review-editor-option-head strong{
    margin:0;
}

.review-editor-option-head span{
    color:#6170c9;
    font-size:12px;
    font-weight:750;
}

.review-editor-risk{
    margin-top:8px;
    color:#8c5f1c;
    font-size:12px;
    line-height:1.45;
}

.review-editor-actions{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}

.review-editor-actions .btn{
    min-height:34px;
}

.review-editor-status{
    padding:10px 12px;
    border-left:4px solid #4c63d7;
    color:#354264;
    background:#f1f4ff;
    font-size:13px;
    line-height:1.5;
}

.review-editor-status.is-warning{
    border-left-color:#d68b2e;
    color:#76521d;
    background:#fff9ee;
}

.text-preview-page{
    max-width:860px;
    min-height:760px;
    margin:0 auto;
    padding:42px 52px;
    background:#fff;
    border-radius:4px;
    box-shadow:0 10px 30px rgba(15, 23, 42, .12);
    font-family:"Times New Roman", serif;
    color:#111827;
}

.text-preview-note{
    margin-bottom:24px;
    padding:14px 16px;
    border-left:4px solid var(--primary);
    background:#eef4ff;
    font-family:Arial, sans-serif;
    color:#1f2a44;
}

.text-preview-note strong{
    display:block;
    margin-bottom:4px;
}

.text-preview-note span{
    display:block;
    color:#52627a;
}

.text-preview-note p{
    margin:8px 0 0;
}

.text-preview-page pre{
    white-space:pre-wrap;
    margin:0;
    font:14pt/1.5 "Times New Roman", serif;
}

.pdf-download-note{
    margin-top:14px;
    padding:12px 14px;
    border-radius:10px;
    background:#fff7ed;
    color:#9a3412;
    font-weight:700;
}

.ai-panel{
    position:sticky;
    top:94px;
    width:100%;
    max-height:none;
}

.result-content{
    flex:1;
    min-height:0;
    max-height:none;
    padding:18px;
    overflow-y:auto;
}

#reviewAssistantPanel .ai-panel.is-post-apply{
    overflow:hidden;
}

#reviewAssistantPanel .ai-panel.is-post-apply .result-content{
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto;
}

#reviewAssistantPanel .ai-panel.is-post-apply.is-chat-expanded .result-content{
    flex:0 1 auto;
}

#reviewAssistantPanel .ai-panel.is-post-apply .review-followup-chat.is-collapsed{
    flex:0 0 44px;
    margin:0;
}

.review-verification-status {
    margin: 14px 0 18px;
    padding: 12px 14px;
    border: 1px solid rgba(58, 104, 86, .22);
    border-radius: 12px;
    background: rgba(244, 250, 246, .8);
    color: #1d4931;
    font-size: .9rem;
}

.review-verification-status.is-warning {
    border-color: rgba(164, 112, 32, .3);
    background: rgba(255, 249, 235, .92);
    color: #6b4a12;
}

.review-verification-status-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.review-verification-status p {
    margin: 8px 0 0;
}

.review-verification-status details {
    margin-top: 8px;
}

.review-verification-status ul {
    margin: 7px 0 0;
    padding-left: 20px;
}

.review-verification-status li {
    margin: 4px 0;
}

.review-verification-status li span {
    margin-left: 5px;
    opacity: .8;
}

.review-verification-status a {
    margin-left: 7px;
    color: inherit;
    text-decoration: underline;
}

.review-research-results{
    margin:14px 0 18px;
    padding:14px;
    border:1px solid rgba(63,118,188,.22);
    border-radius:14px;
    background:linear-gradient(180deg,#f7faff,#fff);
    color:#29415f;
}
.review-research-v2-summary{
    display:flex;
    flex-wrap:wrap;
    gap:5px 12px;
    margin:12px 0;
    padding:9px 11px;
    border:1px solid rgba(63,118,188,.22);
    border-radius:10px;
    color:#53657d;
    background:#f8fbff;
    font-size:11px;
    line-height:1.45;
}
.review-research-v2-summary span:first-child{
    color:#2f5e9d;
    font-weight:750;
}
.review-research-heading,
.review-research-summary{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    flex-wrap:wrap;
}
.review-research-heading h4{ margin:0; color:#203553; }
.review-research-heading p{ margin:4px 0 0; color:#6e7e96; font-size:11px; }
.review-research-heading > span{ padding:4px 9px; border-radius:999px; background:#e7f0fc; color:#2f5e9d; font-size:11px; font-weight:750; }
.review-research-summary{ justify-content:flex-start; margin:12px 0; }
.review-research-summary span{ padding:7px 9px; border:1px solid #dce7f5; border-radius:9px; background:#fff; color:#667993; font-size:11px; }
.review-research-summary strong{ color:#244f87; }
.review-research-summary-warning{ margin:0 0 10px; padding:9px 10px; border:1px solid #ead79f; border-radius:9px; color:#76521d; background:#fffaf0; font-size:11px; line-height:1.45; }
.review-research-list{ display:grid; gap:7px; }
.review-research-issue{ border:1px solid #dbe6f3; border-radius:10px; background:#fff; }
.review-research-issue summary{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 11px; cursor:pointer; list-style:none; font-size:12px; font-weight:700; }
.review-research-issue summary::-webkit-details-marker{ display:none; }
.review-research-issue summary::before{ content:"▸"; color:#6d89ae; }
.review-research-issue[open] summary::before{ content:"▾"; }
.review-research-issue summary em{ flex:0 0 auto; color:#477b66; font-size:10px; font-style:normal; font-weight:700; }
.review-research-issue-body{ padding:0 11px 10px 28px; color:#53657d; font-size:11px; line-height:1.5; }
.review-research-issue-body p{ margin:7px 0 0; }
.review-research-issue-body ul{ margin:5px 0 0; padding-left:18px; }
.review-research-issue-body a{ color:#2f5e9d; text-decoration:underline; }
.review-research-issue-reason{ color:#8a641c; }
.review-research-unresolved{ margin:10px 0; padding:9px 10px; border:1px solid #ead79f; border-radius:9px; background:#fffaf0; color:#76521d; }
.review-research-unresolved p{ margin:4px 0 0; }
.review-research-evidence{ margin:10px 0; padding:9px 10px; border:1px solid #cce8d8; border-radius:9px; background:#f5fcf7; color:#536f60; }
.review-research-evidence.is-partial{ border-color:#ead79f; background:#fffaf0; color:#76521d; }
.review-research-evidence > p:first-child{ margin-top:0; }
.review-research-not-usable{ margin:10px 0; padding:9px 10px; border:1px solid #ead79f; border-radius:9px; background:#fffaf0; color:#76521d; }
.review-research-not-usable p:first-child{ margin-top:0; }
.review-research-claim-status{ color:#53657d; }
.review-research-reference-warning{ color:#76521d; }
.review-research-review-only{ color:#795c29; }
.review-research-edit-comparison{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; margin:10px 0; }
.review-research-edit-comparison > div{ min-width:0; padding:9px 10px; border:1px solid #dbe6f3; border-radius:9px; background:#fbfcff; }
.review-research-edit-comparison > div + div{ border-color:#c8d9f0; background:#f4f8ff; }
.review-research-edit-comparison strong{ display:block; margin-bottom:5px; color:#2e5f9e; }
.review-research-edit-comparison p{ margin:4px 0 0; white-space:pre-wrap; }
.review-research-edit-comparison small{ display:block; margin-top:5px; color:#8a7a54; }
.review-research-proposed-edit{
    margin:12px 0;
    padding:11px 13px;
    border:1px solid #c8d9f0;
    border-radius:10px;
    color:#263b5b;
    background:#f4f8ff;
}
.review-research-proposed-edit strong{ display:block; margin-bottom:7px; color:#2e5f9e; }
.review-research-proposed-edit p{ margin:6px 0 0; white-space:pre-wrap; }
.review-research-apply-badge{ display:inline-block; margin-left:8px; padding:3px 6px; border-radius:999px; color:#246347; background:#e7f5ed; font-size:10px; font-weight:700; }
.review-research-history-badge{ display:inline-block; margin-left:5px; padding:2px 5px; border-radius:999px; color:#76521d; background:#fff0c9; font-size:10px; font-weight:700; }
.review-research-no-change{ border-color:#cce8d8; background:#f5fcf7; }
.review-research-manual{ border-color:#ead79f; background:#fffaf0; }
.review-research-incomplete{ border-color:#e8b8b8; background:#fff5f5; color:#8b3030; }
.review-research-incomplete strong{ color:#8b3030; }
.review-research-recommendation{ color:#6d5a2c; }
.review-research-recommendation small{ color:#8a7a54; }
.advisor-research-origin{ margin:4px 0 8px; font-size:11px; font-weight:700; }
.advisor-research-origin.is-research{ color:#2f6f57; }
.advisor-research-origin.is-review-only{ color:#8a641c; }

#reviewAssistantPanel .ai-panel.is-post-apply.is-chat-expanded .review-followup-chat:not(.is-collapsed){
    display:flex;
    flex:1 1 auto;
    min-height:0;
    flex-direction:column;
    margin:16px 18px 18px;
}

#reviewAssistantPanel .ai-panel.is-post-apply.is-chat-expanded .review-followup-chat-body{
    display:flex;
    min-height:0;
    flex:1 1 auto;
    flex-direction:column;
}

#reviewAssistantPanel .ai-panel.is-post-apply.is-chat-expanded .review-followup-chat-messages{
    min-height:0;
    max-height:none;
    flex:1 1 auto;
    overflow-y:auto;
}

.review-followup-chat {
    --review-followup-header-action-size: 32px;
    --review-followup-header-action-radius: 8px;
    --review-followup-header-action-gap: 12px;
    margin: 20px 0 0;
    padding: 16px;
    border: 1px solid #dfe5f2;
    border-radius: 16px;
    background: #fbfcff;
    min-width: 0;
    overflow: hidden;
}

.review-followup-chat-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.review-followup-chat-heading-copy {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
}

.review-followup-chat-title-row {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.review-followup-chat-title-row h3 {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.review-followup-chat-title-row .review-followup-chat-heading-actions {
    gap: 8px;
    padding-inline-end: 0;
}

.review-followup-chat-heading-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: var(--review-followup-header-action-gap);
    padding-inline-end: 2px;
}

.review-followup-chat-heading-statuses {
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-followup-chat-heading h3 {
    margin: 0;
    color: #1b2d52;
    font-size: clamp(1.2rem, 1.8vw, 1.42rem);
    font-weight: 800;
    line-height: 1.12;
}

.review-followup-chat-heading p {
    margin: 5px 0 0;
    color: #68748c;
    font-size: .88rem;
    line-height: 1.3;
}

.review-followup-chat-header-status {
    display: inline-flex;
    box-sizing: border-box;
    align-items: center;
    color: #68748c;
    font-size: .8rem;
    line-height: 1.2;
    white-space: nowrap;
}

.review-followup-chat-header-status::before {
    content: "●";
    display: inline-block;
    flex: 0 0 auto;
    margin-right: 5px;
    color: #2f9b70;
    font-size: .65rem;
    line-height: 1;
}

.review-followup-chat-new-reply {
    display: inline-flex;
    box-sizing: border-box;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    color: #245d48;
    background: #e7f5ed;
    font-size: .72rem;
    font-weight: 700;
    white-space: nowrap;
}

.review-followup-chat-toggle {
    display: inline-grid;
    width: var(--review-followup-header-action-size);
    height: var(--review-followup-header-action-size);
    min-height: var(--review-followup-header-action-size);
    flex: 0 0 var(--review-followup-header-action-size);
    place-items: center;
    box-sizing: border-box;
    padding: 0;
    border: 1px solid #d8e0f0;
    border-radius: var(--review-followup-header-action-radius);
    color: #31436d;
    background: #fff;
    box-shadow: 0 4px 12px rgba(29, 48, 82, .06);
    cursor: pointer;
    font: 700 18px/1 Inter, "Segoe UI", Arial, sans-serif;
    transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease, transform .16s ease;
}

.review-followup-chat-toggle-icon {
    position: relative;
    display: block;
    width: 12px;
    height: 12px;
    font-size: 0;
    line-height: 0;
    transform: none;
}

.review-followup-chat-toggle-icon::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 6px;
    height: 6px;
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.review-followup-chat-toggle[aria-expanded="true"] .review-followup-chat-toggle-icon::before {
    transform: rotate(225deg);
}

.review-followup-chat-toggle:hover,
.review-followup-chat-toggle:focus-visible {
    border-color: #7b85dc;
    color: #3d51c6;
    background: #f3f4ff;
    box-shadow: 0 5px 14px rgba(61, 81, 198, .14);
    transform: translateY(-1px);
}

.review-followup-chat-toggle:active {
    background: #e9ecff;
    box-shadow: inset 0 2px 5px rgba(49, 67, 109, .12);
    transform: translateY(0);
}

.review-followup-chat-toggle:focus-visible {
    outline: 2px solid rgba(79, 99, 232, .45);
    outline-offset: 2px;
}

.review-followup-chat-body {
    min-width: 0;
}

.review-followup-chat.is-collapsed {
    box-sizing: border-box;
    height: 44px;
    min-height: 44px;
    margin: 0;
    padding: 5px 11px;
    border: 0;
    border-top: 1px solid #d3dce9;
    border-radius: 0;
    background: #fff;
}

.review-followup-chat.is-collapsed .review-followup-chat-heading p,
.review-followup-chat.is-collapsed .review-followup-chat-heading .panel-kicker {
    display: none;
}

.review-followup-chat.is-collapsed .review-followup-chat-heading{
    align-items:center;
}

.review-followup-chat.is-collapsed .review-followup-chat-heading-copy{
    display:flex;
    min-height:0;
    justify-content:center;
}

.review-followup-chat.is-collapsed .review-followup-chat-toggle {
    width: 28px;
    height: 28px;
    min-height: 28px;
    flex-basis: 28px;
    border-radius: 8px;
}

.review-followup-chat.is-collapsed .review-followup-chat-heading h3 {
    margin: 0;
    font-size: 13px;
    line-height: 1.2;
}

.review-followup-chat-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 14px 0 10px;
}

.review-followup-chat-quick-actions button {
    min-height: 35px;
    border: 1px solid #d8e0f0;
    border-radius: 999px;
    padding: 6px 11px;
    color: #31436d;
    background: #fff;
    cursor: pointer;
    font: 700 12px/1.2 Inter, "Segoe UI", Arial, sans-serif;
}

.review-followup-chat-quick-actions button:hover,
.review-followup-chat-quick-actions button:focus-visible {
    border-color: #7b85dc;
    background: #f3f4ff;
}

.review-followup-chat-messages {
    display: grid;
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
    padding: 4px 2px;
}

.review-followup-chat-messages:empty {
    display: none;
}

.review-followup-chat-message {
    max-width: 88%;
    padding: 10px 12px;
    border-radius: 12px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.5;
}

.review-followup-chat-message[data-role="user"] {
    justify-self: end;
    color: #fff;
    background: #6875d8;
}

.review-followup-chat-message[data-role="assistant"] {
    justify-self: start;
    color: #26324b;
    background: #eef1f8;
}

.review-followup-chat-message-label {
    display: block;
    margin-bottom: 3px;
    font-size: .72rem;
    font-weight: 700;
    opacity: .78;
}

.review-followup-chat-status {
    min-height: 20px;
    margin-top: 6px;
    color: #68748c;
    font-size: .8rem;
}

.review-followup-chat-status.is-error {
    color: #a73535;
}

.review-followup-chat-clarification {
    max-width: 92%;
    margin: -2px 0 2px;
    padding: 12px;
    border: 1px solid #dbe3f0;
    border-radius: 12px;
    background: #fff;
}

.review-followup-chat-proposal {
    max-width: 92%;
    margin: 8px 0 2px;
    padding: 12px;
    border: 1px solid #d8e0f0;
    border-radius: 12px;
    background: #fff;
}

.review-followup-chat-proposal h4 {
    margin: 0 0 8px;
    color: #26324b;
    font-size: .92rem;
}

.review-followup-chat-proposal strong {
    display: block;
    margin-top: 7px;
    color: #3d4964;
    font-size: .78rem;
}

.review-followup-chat-proposal p {
    margin: 3px 0 8px;
    color: #68748c;
    font-size: .82rem;
    line-height: 1.45;
    white-space: pre-wrap;
}

.review-followup-chat-proposal-final-blocks {
    display: grid;
    gap: 5px;
    padding: 8px 10px;
    border-left: 3px solid #5868ce;
    background: #f7f8fe;
}

.review-followup-chat-proposal-final-blocks p {
    margin: 0;
    color: #26324b;
}

.review-followup-chat-proposal-final-blocks[data-diff-state="unavailable"] {
    border-left-color: #a9b4c8;
}

.review-followup-chat-proposal-diff-notice {
    display: block;
    margin-bottom: 5px;
    color: #68748c;
    font-size: .76rem;
    font-style: italic;
}

.review-followup-chat-proposal-diff-added,
.review-followup-chat-proposal-diff-new {
    color: #b42318;
    background: #fff1f0;
}

.review-followup-chat-proposal-diff-removed,
.review-followup-chat-proposal-diff-deleted-paragraph {
    color: #b42318;
    text-decoration-color: #b42318;
}

.review-followup-chat-proposal-diff-new {
    padding: 1px 3px;
    border-radius: 3px;
}

.review-followup-chat-proposal-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.review-followup-chat-proposal-apply {
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid #5868ce;
    border-radius: 999px;
    color: #fff;
    background: #5868ce;
    font: 700 12px/1.2 Inter, "Segoe UI", Arial, sans-serif;
}

.review-followup-chat-proposal-apply:disabled {
    cursor: wait;
    opacity: .65;
}

.review-followup-chat-proposal-status {
    color: #3e6c55;
    font-size: .8rem;
    font-weight: 700;
}

.review-followup-chat-proposal-error {
    flex-basis: 100%;
    color: #a73535;
    font-size: .78rem;
}

.review-followup-chat-proposal[data-status="BLOCKED"] .review-followup-chat-proposal-status,
.review-followup-chat-proposal[data-status="STALE"] .review-followup-chat-proposal-status,
.review-followup-chat-proposal[data-status="FAILED"] .review-followup-chat-proposal-status {
    color: #a73535;
}

.review-followup-chat-clarification h4 {
    margin: 0 0 5px;
    color: #26324b;
    font-size: .92rem;
}

.review-followup-chat-clarification p {
    margin: 0 0 10px;
    color: #68748c;
    font-size: .82rem;
    line-height: 1.45;
}

.review-followup-chat-clarification-fields {
    display: grid;
    gap: 8px;
}

.review-followup-chat-clarification-field {
    display: grid;
    gap: 4px;
    color: #3d4964;
    font-size: .78rem;
    font-weight: 700;
}

.review-followup-chat-clarification-input-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
}

.review-followup-chat-clarification-input-row input {
    min-width: 0;
    flex: 1;
    min-height: 34px;
    border: 1px solid #dbe3f0;
    border-radius: 8px;
    padding: 6px 8px;
    color: #26324b;
    background: #fff;
    font: inherit;
}

.review-followup-chat-clarification-field-decision {
    min-height: 30px;
    border: 1px solid #dbe3f0;
    border-radius: 8px;
    padding: 5px 8px;
    color: #3d4964;
    background: #fff;
    font: inherit;
    font-size: .76rem;
    font-weight: 600;
}

.review-followup-chat-clarification-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.review-followup-chat-clarification-actions button {
    min-height: 32px;
    border: 1px solid #d8e0f0;
    border-radius: 999px;
    padding: 5px 10px;
    color: #31436d;
    background: #fff;
    cursor: pointer;
    font: 700 12px/1.2 Inter, "Segoe UI", Arial, sans-serif;
}

.review-followup-chat-clarification-actions .review-followup-chat-clarification-continue {
    color: #fff;
    border-color: #5868ce;
    background: #5868ce;
}

.review-followup-chat-clarification-actions button:disabled,
.review-followup-chat-clarification-input-row input:disabled,
.review-followup-chat-clarification-field-decision:disabled {
    cursor: wait;
    opacity: .65;
}

.review-followup-chat-clarification-resolved {
    color: #3e6c55;
    font-size: .8rem;
    font-weight: 700;
}

.review-precheck-backdrop {
    z-index: 620;
}

.review-precheck-modal {
    position: relative;
    width: min(680px, calc(100% - 24px));
    max-height: min(760px, calc(100vh - 24px));
    overflow: auto;
    padding: 26px;
    border: 1px solid #dbe3f0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 22px 70px rgba(15, 33, 66, .22);
}

.review-precheck-close {
    position: absolute;
    top: 12px;
    right: 14px;
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid #dbe3f0;
    border-radius: 50%;
    color: #68748c;
    background: #fff;
    cursor: pointer;
    font: 500 1.35rem/1 Inter, "Segoe UI", Arial, sans-serif;
}

.review-precheck-close:hover,
.review-precheck-close:focus-visible {
    color: #26324b;
    border-color: #aebbd0;
    background: #f8faff;
}

.review-precheck-close:disabled {
    cursor: wait;
    opacity: .65;
}

.review-precheck-cancel-confirm {
    margin-top: 18px;
    padding: 13px 14px;
    border: 1px solid #f0cfd4;
    border-radius: 12px;
    background: #fff8f8;
}

.review-precheck-cancel-confirm p {
    margin: 0;
    color: #7e2d3a;
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.45;
}

.review-precheck-cancel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 11px;
}

.review-precheck-cancel-actions button {
    min-width: 120px;
}

.review-precheck-cancel-actions .btn-danger {
    border-color: #c95763;
    color: #fff;
    background: #b63f4c;
}

.review-precheck-cancel-actions .btn-danger:hover,
.review-precheck-cancel-actions .btn-danger:focus-visible {
    border-color: #9f2f3c;
    background: #9f2f3c;
}

.review-precheck-heading h2 {
    margin: 5px 0 8px;
    color: #26324b;
    font-size: 1.3rem;
    line-height: 1.35;
}

.review-precheck-heading {
    padding-right: 38px;
}

.review-precheck-heading p {
    margin: 0;
    color: #68748c;
    font-size: .95rem;
    line-height: 1.5;
}

.review-precheck-count {
    margin: 14px 0 0;
    color: #5868ce;
    font-size: .86rem;
    font-weight: 700;
}

.review-precheck-fields {
    display: grid;
    gap: 18px;
    margin-top: 18px;
}

.review-precheck-field {
    display: grid;
    gap: 9px;
    min-width: 0;
    padding: 14px 15px 15px;
    border: 1px solid #e2e8f2;
    border-radius: 13px;
    background: #fbfcfe;
    color: #3d4964;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
}

.review-precheck-field-heading {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    min-width: 0;
}

.review-precheck-field-index {
    display: inline-grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 50%;
    color: #5868ce;
    background: #eef1ff;
    font-size: .82rem;
    font-weight: 700;
    line-height: 1;
}

.review-precheck-field-label {
    min-width: 0;
    overflow-wrap: anywhere;
}

.review-precheck-input-row {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.review-precheck-input-row input {
    min-width: 0;
    flex: 1;
    width: 100%;
    min-height: 42px;
    padding: 8px 11px;
    border: 1px solid #dbe3f0;
    border-radius: 9px;
    color: #26324b;
    background: #fff;
    font: inherit;
    font-size: .95rem;
    font-weight: 400;
}

.review-precheck-unit {
    flex: 0 0 auto;
    color: #68748c;
    font-size: .9rem;
    font-weight: 600;
}

.review-precheck-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 17px;
}

.review-precheck-actions button {
    flex: 1 1 auto;
}

.review-precheck-actions button:disabled,
.review-precheck-input-row input:disabled {
    cursor: wait;
    opacity: .65;
}

.review-precheck-error {
    margin-top: 10px;
    color: #a73535;
    font-size: .8rem;
    line-height: 1.4;
}

.review-followup-chat-clarification-facts {
    margin-top: 5px;
    color: #68748c;
    font-size: .78rem;
    line-height: 1.4;
}

.review-followup-chat-form {
    display: flex;
    align-items: end;
    gap: 8px;
    margin-top: 12px;
    padding: 8px;
    border: 1px solid #dbe3f0;
    border-radius: 14px;
    background: #fff;
}

.review-followup-chat-form textarea {
    flex: 1;
    min-width: 0;
    min-height: 42px;
    max-height: 120px;
    overflow-y: auto;
    resize: none;
    border: 0;
    outline: 0;
    padding: 10px 12px;
    color: #26324b;
    background: transparent;
    font: inherit;
}

.review-followup-chat-form textarea:focus {
    outline: 0;
}

.review-followup-chat-send {
    width: 42px;
    height: 42px;
    min-height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(135deg, #4f63e8, #35459f);
    cursor: pointer;
    font: 700 20px/1 Arial, sans-serif;
}

.review-followup-chat-send:hover:not(:disabled),
.review-followup-chat-send:focus-visible {
    background: linear-gradient(135deg, #5d70f0, #3d4eaa);
    box-shadow: 0 3px 9px rgba(53, 69, 159, .22);
}

.review-followup-chat-send:disabled {
    cursor: not-allowed;
    opacity: .55;
}

@media (max-width: 700px) {
    .review-followup-chat {
        --review-followup-header-action-gap: 10px;
        padding: 12px;
        border-radius: 12px;
    }

    .review-followup-chat-heading {
        gap: 10px;
    }

    .review-followup-chat-heading h3 {
        font-size: 1.16rem;
    }

    .review-followup-chat-heading p {
        font-size: .82rem;
    }

    .review-followup-chat-heading-statuses {
        gap: 6px;
    }

    .review-followup-chat.is-collapsed {
        height: 44px;
        min-height: 44px;
        margin: 0;
        padding: 5px 11px;
    }

    .review-followup-chat-quick-actions button {
        min-height: 34px;
        padding-right: 9px;
        padding-left: 9px;
    }

    .review-followup-chat-clarification {
        max-width: 100%;
        padding: 10px;
    }

    .review-followup-chat-clarification-actions button {
        flex: 1 1 auto;
    }

    .review-precheck-modal {
        width: calc(100% - 14px);
        padding: 18px 12px 14px;
    }

    .review-precheck-field {
        padding: 12px;
    }

    .review-precheck-field-heading {
        grid-template-columns: 24px minmax(0, 1fr);
        gap: 8px;
    }

    .review-precheck-field-index {
        width: 24px;
        height: 24px;
    }

    .review-precheck-actions button {
        min-width: 46%;
    }
}

@media (max-width: 420px) {
    .review-followup-chat {
        --review-followup-header-action-gap: 8px;
    }

    .review-followup-chat-heading {
        gap: 8px;
    }

    .review-followup-chat-heading-actions {
        gap: var(--review-followup-header-action-gap);
    }

    .review-followup-chat-heading-statuses {
        gap: 5px;
    }

    .review-followup-chat-header-status {
        font-size: .72rem;
    }

    .review-followup-chat-new-reply {
        padding: 3px 6px;
        font-size: .68rem;
    }
}

/* Searchable tutorial video library and contextual module help. */
.tutorial-library {
    display: grid;
    gap: 17px;
    padding: 26px;
    border: 1px solid #dce5f1;
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}
.tutorial-library-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; }
.tutorial-library-heading h1 { margin: 3px 0 0; color: var(--navy-dark); font-size: clamp(25px, 3vw, 34px); letter-spacing: -.035em; }
.tutorial-library-heading p { margin: 7px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.tutorial-search { display: flex; align-items: center; gap: 8px; flex: 0 1 330px; min-width: 220px; height: 43px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; color: #718096; background: #fff; }
.tutorial-search span { font-size: 22px; line-height: 1; }
.tutorial-search input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font: inherit; font-size: 13px; }
.tutorial-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.tutorial-filter-chip { min-height: 34px; padding: 0 13px; border: 1px solid #dce4ef; border-radius: 999px; color: #52647a; background: #fff; cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; transition: .16s ease; }
.tutorial-filter-chip:hover { border-color: #a9c5eb; color: #225bb7; background: #f7faff; }
.tutorial-filter-chip.is-active { border-color: #3478d4; color: #fff; background: #3478d4; }
.tutorial-video-status { min-height: 20px; margin: 0; color: #728096; font-size: 12px; }
.tutorial-video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.tutorial-video-card { min-width: 0; overflow: hidden; border: 1px solid #e1e7ef; border-radius: 15px; background: #fff; box-shadow: 0 6px 18px rgba(29, 48, 82, .045); transition: transform .16s ease, box-shadow .16s ease; }
.tutorial-video-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(29, 48, 82, .1); }
.tutorial-video-poster { position: relative; display: grid; aspect-ratio: 16 / 9; place-items: center; overflow: hidden; background: linear-gradient(135deg, #eaf2ff, #e9f7f0); }
.tutorial-video-poster img { width: 100%; height: 100%; object-fit: cover; }
.tutorial-poster-fallback { display: grid; width: 54px; height: 54px; place-items: center; border: 1px solid rgba(255,255,255,.85); border-radius: 50%; color: #fff; background: linear-gradient(140deg, #3679d8, #2354a0); box-shadow: 0 7px 18px rgba(30,69,130,.24); font-size: 22px; font-weight: 800; }
.tutorial-featured-badge { position: absolute; top: 10px; left: 10px; padding: 5px 8px; border-radius: 999px; color: #805417; background: rgba(255, 248, 224, .95); font-size: 10px; font-weight: 800; }
.tutorial-video-play { position: absolute; display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid rgba(255,255,255,.9); border-radius: 50%; color: #fff; background: rgba(23, 44, 76, .78); box-shadow: 0 5px 18px rgba(15,35,70,.25); cursor: pointer; font-size: 17px; transition: transform .16s ease, background .16s ease; }
.tutorial-video-play:hover { transform: scale(1.08); background: #235bb1; }
.tutorial-video-copy { padding: 13px 14px 15px; }
.tutorial-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #3872bb; font-size: 10px; font-weight: 800; }
.tutorial-card-meta small { color: #8795a8; font-size: 10px; font-weight: 700; }
.tutorial-video-copy h3 { display: -webkit-box; min-height: 42px; margin: 8px 0 5px; overflow: hidden; color: #1d2d45; font-size: 14px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.tutorial-video-copy p { display: -webkit-box; min-height: 38px; margin: 0; overflow: hidden; color: #718096; font-size: 11px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.module-help-button { display: inline-flex; align-items: center; min-height: 29px; margin-top: 9px; padding: 0 10px; border: 1px solid #d6e2f0; border-radius: 8px; color: #49698e; background: rgba(255,255,255,.78); cursor: pointer; font: inherit; font-size: 11px; font-weight: 750; transition: .15s ease; }
.module-help-button:hover { border-color: #9cbbe2; color: #225eb4; background: #f3f8ff; }
.tutorial-modal-backdrop, .tutorial-help-backdrop { position: fixed; inset: 0; display: grid; place-items: center; padding: 22px; background: rgba(12, 25, 45, .62); }
.tutorial-modal-backdrop { z-index: 1502; }
.tutorial-help-backdrop { z-index: 1501; place-items: stretch end; padding: 0; }
.tutorial-modal-backdrop[hidden], .tutorial-help-backdrop[hidden] { display: none; }
.tutorial-overlay-open { overflow: hidden; }
.tutorial-video-modal { display: flex; width: min(1000px, 100%); max-height: calc(100vh - 44px); flex-direction: column; gap: 16px; overflow: auto; padding: 21px; border: 1px solid rgba(255,255,255,.55); border-radius: 20px; background: #fff; box-shadow: 0 24px 80px rgba(7, 20, 42, .3); }
.tutorial-video-modal-header, .tutorial-help-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.tutorial-video-modal-header { flex: 0 0 auto; }
.tutorial-video-modal-header h2, .tutorial-help-header h2 { margin: 4px 0 0; color: var(--navy-dark); font-size: 21px; letter-spacing: -.02em; }
.tutorial-video-modal-header p, .tutorial-help-header p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.tutorial-module-label { color: #4374b0; font-size: 10px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.tutorial-close-button { box-sizing: border-box; flex: 0 0 38px; display: grid; width: 38px; min-width: 38px; height: 38px; min-height: 38px; padding: 0; place-items: center; border: 1px solid #e0e6ef; border-radius: 11px; color: #52647a; background: #fff; cursor: pointer; font-family: Arial, sans-serif; font-size: 25px; line-height: 1; text-align: center; }
.tutorial-close-button:hover { color: #173a68; background: #f2f6fb; }
.tutorial-player-surface { flex: 0 0 auto; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 13px; background: #101a28; }
.tutorial-player-surface.is-vertical { width: min(420px, 100%); aspect-ratio: 9 / 16; max-height: 68vh; margin: 0 auto; }
.tutorial-player-surface iframe { display: block; width: 100%; height: 100%; border: 0; }
.tutorial-player-fallback { flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; color: #6b788a; font-size: 12px; }
.tutorial-platform-link { display: inline-flex; align-items: center; min-height: 32px; padding: 0 11px; border: 1px solid #d9e4f2; border-radius: 9px; color: #225eb4; background: #f7faff; font-size: 11px; font-weight: 800; text-decoration: none; }
.tutorial-platform-link:hover { background: #edf4ff; }
.tutorial-help-drawer { display: flex; width: min(460px, 100%); height: 100%; flex-direction: column; gap: 18px; overflow: auto; padding: 25px; background: #fff; box-shadow: -16px 0 48px rgba(7, 20, 42, .2); }
.tutorial-help-grid { display: grid; align-content: start; gap: 13px; }
.tutorial-video-card-compact { display: grid; grid-template-columns: 146px minmax(0, 1fr); }
.tutorial-video-card-compact .tutorial-video-poster { aspect-ratio: 16 / 10; }
.tutorial-video-card-compact .tutorial-video-play { width: 38px; height: 38px; font-size: 14px; }
.tutorial-video-card-compact .tutorial-video-copy { padding: 10px 11px; }
.tutorial-video-card-compact .tutorial-video-copy h3 { min-height: 0; margin-top: 6px; font-size: 12px; }
.tutorial-video-card-compact .tutorial-video-copy p { min-height: 0; font-size: 10px; }
.tutorial-admin-status { min-height: 18px; margin: -8px 0 12px; color: var(--admin-muted); font-size: .76rem; }
.tutorial-admin-status.is-error { color: var(--admin-red); }
.admin-tutorial-thumbnail { display: grid; width: 78px; aspect-ratio: 16 / 9; place-items: center; overflow: hidden; border-radius: 7px; background: linear-gradient(135deg, #eaf2ff, #e9f7f0); }
.admin-tutorial-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.admin-tutorial-image-fallback { color: #3478d4; font-size: 17px; font-weight: 800; }
.admin-tutorial-table td { vertical-align: middle; }
.admin-tutorial-table td strong { display: block; max-width: 250px; color: var(--admin-ink); font-size: .78rem; }
.admin-tutorial-table td small { display: block; max-width: 250px; margin-top: 4px; overflow: hidden; color: var(--admin-muted); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.admin-tutorial-source, .admin-tutorial-status { display: inline-flex; padding: 5px 8px; border-radius: 999px; font-size: .65rem; font-weight: 800; white-space: nowrap; }
.admin-tutorial-source { color: #536b8a; background: #f0f4f9; }
.admin-tutorial-status.is-published { color: #247151; background: #e9f7f0; }
.admin-tutorial-status.is-hidden { color: #8a651f; background: #fff4dd; }
.admin-tutorial-actions { display: flex; flex-wrap: wrap; gap: 5px; min-width: 168px; }
.admin-tutorial-actions button { padding: 5px 7px; border: 1px solid #e1e7ef; border-radius: 7px; color: #46627f; background: #fff; cursor: pointer; font: inherit; font-size: .65rem; font-weight: 750; }
.admin-tutorial-actions button:hover { border-color: #b7cae2; color: #225eb4; background: #f7faff; }
.admin-tutorial-actions button[data-tutorial-admin-action="delete"] { color: #a3454c; }
.admin-tutorial-empty { padding: 30px 18px !important; color: #75849a; text-align: center; }
.tutorial-admin-editor-backdrop { position: fixed; z-index: 5; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(8, 22, 43, .54); }
.tutorial-admin-editor-backdrop[hidden] { display: none; }
.tutorial-admin-editor { width: min(680px, 100%); max-height: calc(100vh - 36px); overflow: auto; padding: 23px; border: 1px solid #e2e8f0; border-radius: 17px; background: #fff; box-shadow: 0 22px 70px rgba(8, 22, 43, .25); }
.tutorial-admin-editor-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.tutorial-admin-editor-heading h2 { margin: 5px 0 4px; color: var(--admin-navy); font-size: 1.22rem; }
.tutorial-admin-editor-heading p { margin: 0; color: var(--admin-muted); font-size: .76rem; }
.tutorial-admin-form > label > small { color: var(--admin-muted); font-size: .67rem; font-weight: 500; }
.tutorial-admin-checkbox { display: flex !important; align-items: center; align-self: center; gap: 8px !important; }
.tutorial-admin-checkbox input { width: 16px; height: 16px; accent-color: var(--admin-blue); }
.tutorial-admin-checkbox span { color: var(--admin-ink); font-size: .77rem; font-weight: 700; }
.tutorial-admin-form-error { margin: 0; color: #a83d45; font-size: .75rem; }

@media (max-width: 900px) {
    .tutorial-video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .tutorial-library { padding: 19px; border-radius: 17px; }
    .tutorial-library-heading { align-items: stretch; flex-direction: column; gap: 14px; }
    .tutorial-search { flex: none; width: auto; min-width: 0; }
    .tutorial-video-grid { grid-template-columns: 1fr; }
    .tutorial-video-card { display: grid; grid-template-columns: minmax(125px, 38%) minmax(0, 1fr); }
    .tutorial-video-copy { padding: 10px 11px; }
    .tutorial-video-copy h3 { min-height: 0; font-size: 12px; }
    .tutorial-video-copy p { min-height: 0; font-size: 10px; }
    .tutorial-card-meta { font-size: 9px; }
    .tutorial-video-modal { padding: 15px; }
    .tutorial-help-drawer { padding: 19px; }
    .tutorial-video-card-compact { grid-template-columns: 125px minmax(0, 1fr); }
}
@media (max-width: 430px) {
    .tutorial-video-card { grid-template-columns: 112px minmax(0, 1fr); }
    .tutorial-video-card-compact { grid-template-columns: 106px minmax(0, 1fr); }
    .tutorial-video-card-compact .tutorial-video-copy { padding: 8px; }
    .tutorial-video-play { width: 39px; height: 39px; }
    .tutorial-video-modal-header h2, .tutorial-help-header h2 { font-size: 18px; }
    .tutorial-admin-editor { padding: 17px; }
}

.result-content > h2,
.result-content > h3{
    margin:0 0 14px;
    color:var(--navy-dark);
}

.result-content > h3{
    font-size:16px;
}

.box{
    margin:0 0 16px;
    padding:14px;
    border:1px solid var(--line);
    border-radius:12px;
    background:#fbfcfe;
}

.box h4{
    margin:14px 0 7px;
    color:#354157;
    font-size:12px;
    letter-spacing:.04em;
    text-transform:uppercase;
}

.original,
.suggested,
.delete-proposal,
.reason{
    padding:11px 12px;
    border-radius:8px;
    line-height:1.5;
}

.original{
    border-left:4px solid #dfa21e;
    background:#fff8e6;
}

.suggested{
    border-left:4px solid var(--green);
    background:var(--green-soft);
}

.delete-proposal{
    border-left:4px solid var(--red);
    background:var(--red-soft);
    text-decoration:line-through;
}

.reason{
    border:1px solid #e3e8ef;
    color:#536075;
    background:white;
}

.suggested mark{
    padding:1px 2px;
    border-radius:3px;
    background:#ffec74;
}

.suggestion-meta{
    margin-top:12px;
    padding:9px 10px;
    border-radius:7px;
    color:#546177;
    background:#eef2f7;
    font-size:12px;
}

.action-badge{
    display:inline-flex;
    margin-bottom:2px;
    padding:5px 9px;
    border-radius:999px;
    color:#174eaf;
    background:var(--blue-soft);
    font-size:11px;
    font-weight:800;
}

.advisor-review{
    display:grid;
    gap:14px;
}

.advisor-transformation-preview-list{
    display:grid;
    gap:10px;
    padding:14px;
    border:1px solid #d9e2f2;
    border-radius:14px;
    background:#f8fbff;
}

.advisor-transformation-preview-list > h4,
.advisor-transformation-preview-list > p{
    margin:0;
}

.advisor-transformation-preview-list > p,
.advisor-transformation-preview-reason,
.advisor-transformation-preview-footnote{
    color:#52657e;
    font-size:12px;
}

.advisor-transformation-preview{
    display:grid;
    gap:9px;
    padding:13px;
    border:1px solid #cbd8eb;
    border-radius:12px;
    background:#fff;
}

.advisor-transformation-preview-heading{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:10px;
}

.advisor-transformation-preview-heading div{
    display:grid;
    gap:3px;
}

.advisor-transformation-preview-heading strong{
    color:#174eaf;
    font-size:11px;
    letter-spacing:.04em;
}

.advisor-transformation-preview-heading span{
    color:#1e2f46;
    font-weight:700;
}

.advisor-transformation-preview-heading em{
    flex:0 0 auto;
    padding:4px 8px;
    border-radius:999px;
    color:#174eaf;
    background:#eaf2ff;
    font-size:11px;
    font-style:normal;
    font-weight:700;
}

.advisor-transformation-preview table{
    width:100%;
    border-collapse:collapse;
    font-size:12px;
}

.advisor-transformation-preview th,
.advisor-transformation-preview td{
    padding:8px;
    border:1px solid #e2e9f3;
    text-align:left;
    vertical-align:top;
}

.advisor-transformation-preview th{
    color:#52657e;
    background:#f5f8fc;
    font-size:11px;
}

.advisor-transformation-preview td:nth-child(2){
    color:#b42318;
    background:#fff8f7;
}

.transformation-role{
    display:inline-block;
    margin-bottom:3px;
    color:#6b7d96;
    font-size:10px;
    font-weight:700;
    text-transform:uppercase;
}

@media (max-width:720px){
    .advisor-transformation-preview-heading{flex-direction:column;}
    .advisor-transformation-preview table,
    .advisor-transformation-preview thead,
    .advisor-transformation-preview tbody,
    .advisor-transformation-preview tr,
    .advisor-transformation-preview th,
    .advisor-transformation-preview td{display:block;}
    .advisor-transformation-preview thead{display:none;}
    .advisor-transformation-preview td{border-bottom:0;}
    .advisor-transformation-preview td:last-child{border-bottom:1px solid #e2e9f3;}
}

.advisor-initial-review[hidden],
.advisor-pending-work-body[hidden]{
    display:none !important;
}

.advisor-post-apply-summary{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:11px 13px;
    border:1px solid #cfeadd;
    border-radius:13px;
    color:#0d714c;
    background:linear-gradient(135deg, #f4fff9, #eefaf5);
}

.advisor-post-apply-summary-main{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:5px 12px;
    min-width:0;
}

.advisor-post-apply-summary-main strong{
    color:#0d714c;
    font-size:13px;
}

.advisor-post-apply-summary-main span{
    color:#4f6b60;
    font-size:12px;
}

.advisor-deep-analysis{
    margin: 18px 0;
    padding: 18px;
    border: 1px solid rgba(37, 99, 235, .18);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(239, 246, 255, .9), rgba(248, 250, 252, .96));
}
.advisor-deep-analysis-header{
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.advisor-deep-analysis-header h4{
    margin: 3px 0 4px;
    letter-spacing: .04em;
}
.advisor-deep-analysis-header p,
.advisor-deep-analysis-summary,
.advisor-deep-analysis-metrics,
.advisor-deep-analysis-status,
.advisor-deep-analysis-empty{
    margin: 0;
    color: #475569;
}
.advisor-deep-analysis-status,
.advisor-deep-analysis-empty{
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .8);
}
.advisor-deep-analysis-status.is-error{
    color: #991b1b;
    background: #fef2f2;
}
.advisor-deep-analysis-summary{
    margin-top: 14px;
}
.advisor-deep-analysis-metrics{
    margin-top: 8px;
    color: #64748b;
    font-size: .84rem;
}
.advisor-deep-analysis-list{
    display: grid;
    gap: 12px;
    margin-top: 14px;
}
.advisor-deep-analysis-card{
    padding: 15px;
    border: 1px solid rgba(148, 163, 184, .35);
    border-radius: 12px;
    background: #fff;
}
.advisor-deep-analysis-card.is-applied{
    border-color: rgba(22, 163, 74, .35);
    background: #f0fdf4;
}
.advisor-deep-analysis-card-heading,
.advisor-deep-analysis-card-footer{
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.advisor-deep-analysis-card-heading strong{
    display: block;
    margin-top: 4px;
}
.advisor-deep-analysis-category,
.advisor-deep-analysis-severity,
.advisor-deep-analysis-card-footer > span{
    color: #64748b;
    font-size: .84rem;
}
.advisor-deep-analysis-severity{
    white-space: nowrap;
    font-weight: 600;
}
.advisor-deep-analysis-details{
    display: grid;
    gap: 8px;
    margin: 14px 0;
}
.advisor-deep-analysis-details div{
    display: grid;
    grid-template-columns: 145px 1fr;
    gap: 10px;
}
.advisor-deep-analysis-details dt{
    color: #64748b;
    font-weight: 600;
}
.advisor-deep-analysis-details dd{
    margin: 0;
    color: #1e293b;
    white-space: pre-wrap;
}
.advisor-deep-analysis-applied{
    color: #15803d;
    font-weight: 700;
}
.advisor-deep-analysis-manual{
    color: #92400e;
    font-size: .9rem;
}
@media (max-width: 700px){
    .advisor-deep-analysis-header,
    .advisor-deep-analysis-card-heading,
    .advisor-deep-analysis-card-footer{
        flex-direction: column;
    }
    .advisor-deep-analysis-details div{
        grid-template-columns: 1fr;
        gap: 2px;
    }
}

.advisor-post-apply-outcome-summary{
    display:flex;
    flex:1 1 100%;
    flex-wrap:wrap;
    gap:4px 12px;
    color:#4f6b60;
    font-size:12px;
}

.advisor-post-apply-outcome-summary span{
    color:#4f6b60;
}

.advisor-post-apply-outcome-summary strong{
    color:#0d714c;
}

.advisor-post-apply-summary-warning{
    color:#a04b16 !important;
}

.advisor-post-apply-summary-success{
    color:#0d714c !important;
}

.advisor-post-apply-summary-actions{
    display:flex;
    flex:0 0 auto;
    align-items:center;
    gap:7px;
}

.advisor-post-apply-summary .btn-sm{
    min-height:32px;
    padding:6px 10px;
    border-radius:9px;
    font-size:11px;
}

.advisor-pending-work-panel{
    overflow:hidden;
    border:1px solid #f0d8a8;
    border-radius:14px;
    background:#fffdf7;
}

.advisor-pending-work-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:12px 14px;
}

.advisor-pending-work-header > div{
    display:flex;
    align-items:baseline;
    flex-wrap:wrap;
    gap:6px 10px;
    min-width:0;
}

.advisor-pending-work-header h4{
    margin:0;
    color:#6d4912;
    font-size:14px;
}

.advisor-pending-work-header span{
    color:#8a5a10;
    font-size:12px;
    font-weight:800;
}

.advisor-pending-work-toggle{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex:0 0 auto;
    min-width:30px;
    min-height:30px;
    padding:0 9px;
    border:1px solid #e7c87e;
    border-radius:8px;
    color:#6d4912;
    background:#fff8e6;
    font-size:11px;
    font-weight:800;
    line-height:1;
    cursor:pointer;
}

.advisor-pending-work-toggle:hover,
.advisor-pending-work-toggle:focus-visible{
    color:#4f350d;
    background:#fff2cf;
}

.advisor-pending-work-body{
    padding:0 14px 14px;
}

.advisor-pending-work-body > .advisor-manual-fixes:first-child{
    margin-top:0;
}

.advisor-pending-work-panel.is-collapsed .advisor-pending-work-header{
    min-height:52px;
}

.advisor-pending-work-panel.is-collapsed .advisor-pending-work-toggle{
    width:30px;
    height:30px;
    padding:0;
}

.advisor-score-card{
    position:relative;
    overflow:hidden;
    padding:18px;
    border:1px solid #dbe6f5;
    border-radius:18px;
    background:linear-gradient(135deg, #f8fbff, #eef5ff);
}

.advisor-score-card span,
.advisor-meta-grid span{
    display:block;
    color:#66748c;
    font-size:10px;
    font-weight:850;
    letter-spacing:.08em;
    text-transform:uppercase;
}

.advisor-score-card h3{
    margin:5px 0;
    color:var(--navy-dark);
    font-size:38px;
    letter-spacing:-.04em;
}

.advisor-score-card p{
    margin:0;
    color:#4e5d73;
    line-height:1.55;
}

.advisor-score-card > i{
    position:absolute;
    left:0;
    bottom:0;
    height:4px;
    background:linear-gradient(90deg, #2563eb, #20a875);
}

.advisor-source-documents{
    display:grid;
    gap:7px;
    padding:12px 14px;
    border:1px solid #dfe7f3;
    border-radius:14px;
    background:#f8fbff;
    color:#53627a;
    font-size:12px;
}

.advisor-source-documents-heading{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    color:var(--navy-dark);
}

.advisor-source-documents-heading span{
    color:#74839a;
    font-size:11px;
}

.advisor-source-documents ul{
    display:grid;
    gap:3px;
    margin:0;
    padding-left:18px;
}

.advisor-source-documents-warning{
    color:#8a5a08;
    background:#fff9e9;
    border-color:#f0d58d;
}

.advisor-readiness{
    position:absolute;
    top:16px;
    right:16px;
    padding:6px 10px;
    border-radius:999px;
    color:#0d714c;
    background:var(--green-soft);
    font-size:12px;
}

.advisor-meta-grid{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:9px;
}

.advisor-meta-grid > div{
    padding:11px 12px;
    border:1px solid #e3e9f2;
    border-radius:13px;
    background:#fff;
}

.advisor-meta-grid b{
    display:block;
    margin-top:4px;
    color:var(--navy);
    font-size:13px;
}

.advisor-section{
    padding:14px;
    border:1px solid #e2e8f1;
    border-radius:15px;
    background:#fff;
}

.advisor-section h4{
    margin:0 0 11px;
    color:#24314a;
    font-size:13px;
    letter-spacing:.04em;
    text-transform:uppercase;
}

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

.advisor-section ul{
    margin:0;
    padding-left:18px;
    color:#42506a;
    line-height:1.55;
}

.advisor-section li + li{
    margin-top:6px;
}

.advisor-section-good{
    border-color:#cfeadd;
    background:#fbfffd;
}

.advisor-section-warning{
    border-color:#f0d8a8;
    background:#fffdf7;
}

.advisor-rubric-list{
    display:grid;
    gap:9px;
}

.advisor-rubric-row{
    position:relative;
    display:grid;
    grid-template-columns:minmax(0, 1fr) auto;
    gap:10px;
    overflow:hidden;
    padding:11px 12px 13px;
    border:1px solid #e5ebf4;
    border-radius:12px;
    background:#fbfcff;
}

.advisor-rubric-row strong{
    display:block;
    color:#26334a;
}

.advisor-rubric-row small{
    display:block;
    margin-top:3px;
    color:#65748c;
    line-height:1.4;
}

.advisor-rubric-row b{
    color:#18386f;
}

.advisor-rubric-row > i{
    position:absolute;
    left:0;
    bottom:0;
    height:3px;
    background:#2563eb;
}

.star-on{
    color:#e0a018;
}

.star-off{
    color:#cbd5e1;
}

.advisor-upgrade-list{
    display:grid;
    gap:10px;
}

.advisor-upgrade-card{
    padding:12px;
    border:1px solid #e4e9f1;
    border-left:4px solid #5d7bea;
    border-radius:12px;
    background:#fbfcff;
}

.advisor-upgrade-heading{
    display:flex;
    gap:8px;
    align-items:center;
    justify-content:space-between;
}

.advisor-upgrade-heading strong{
    color:#26334a;
}

.advisor-upgrade-heading span{
    padding:4px 8px;
    border-radius:999px;
    color:#174eaf;
    background:var(--blue-soft);
    font-size:10px;
    font-weight:800;
}

.advisor-target{
    margin-top:6px;
    color:#748199;
    font-size:11px;
}

.advisor-apply-badge{
    display:inline-flex;
    width:max-content;
    max-width:100%;
    margin-top:7px;
    padding:4px 8px;
    border-radius:999px;
    color:#0d714c;
    background:var(--green-soft);
    font-size:10px;
    font-weight:800;
}

.advisor-upgrade-card p{
    margin:8px 0 0;
    color:#46556d;
    line-height:1.5;
}

.advisor-suggested-text{
    margin-top:9px;
    padding:10px 11px;
    border-radius:10px;
    color:#27364e;
    background:#f4f7fb;
    line-height:1.5;
    white-space:pre-wrap;
}

.advisor-layout-note{
    margin-top:10px;
    padding:9px 11px;
    border:1px solid #f3d08a;
    border-radius:10px;
    color:#805711;
    background:#fff8e6;
    font-size:12px;
    font-weight:650;
    line-height:1.45;
}

.advisor-actions{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:8px;
}

.advisor-apply-result{
    padding:10px 12px;
    border:1px solid #cfeadd;
    border-radius:10px;
    color:#0d714c;
    background:var(--green-soft);
    font-size:12px;
    font-weight:750;
}

.advisor-apply-result.has-warning{
    border-color:#f0d8a8;
    color:#8a5a10;
    background:var(--amber-soft);
}

.advisor-manual-fixes{
    margin-top:14px;
    padding:16px;
    border:1px solid #f0d8a8;
    border-radius:14px;
    background:#fffdf7;
}

.advisor-manual-fixes-heading{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
}

.advisor-manual-fixes-heading h4{
    margin:0;
    color:#6d4912;
    font-size:15px;
}

.advisor-manual-fixes-heading p{
    margin:5px 0 0;
    color:#75654b;
    font-size:12px;
    line-height:1.5;
}

.advisor-manual-fixes-heading span{
    flex:0 0 auto;
    padding:5px 8px;
    border-radius:999px;
    background:#fff2cf;
    color:#8a5a10;
    font-size:11px;
    font-weight:800;
}

.advisor-manual-fix-list{
    display:grid;
    gap:10px;
    margin:14px 0 0;
    padding-left:22px;
    max-height:560px;
    overflow-y:auto;
    overscroll-behavior:contain;
    padding-right:6px;
}

.advisor-manual-fix-list li{
    padding:11px 12px;
    border:1px solid #f1e1bf;
    border-radius:10px;
    background:#fff;
}

.advisor-manual-fix-list strong{
    display:block;
    color:#26385e;
    font-size:13px;
}

.advisor-manual-fix-status{
    display:inline-block;
    margin-top:4px;
    padding:3px 7px;
    border-radius:999px;
    color:#8a5a10;
    background:#fff2cf;
    font-size:10px;
    font-weight:800;
}

.pagination-summary{
    color:#68758c;
    font-size:13px;
    white-space:nowrap;
}
.pagination-controls{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    flex-wrap:wrap;
    gap:7px;
}
.pagination-controls button{
    min-width:38px;
    min-height:38px;
    padding:0 10px;
    border:1px solid #dfe6f1;
    border-radius:9px;
    color:#41506a;
    background:#fff;
    cursor:pointer;
    font:inherit;
    font-size:13px;
    font-weight:800;
}
.pagination-controls button.is-active{
    border-color:#4f63e8;
    color:#fff;
    background:#4f63e8;
}
.pagination-controls button:disabled{cursor:not-allowed;color:#b4bdcc;background:#f8fafc;}
.pagination-ellipsis{display:inline-flex;min-width:28px;min-height:38px;align-items:center;justify-content:center;color:#8b97aa;font-weight:800;}
.pagination-mobile-page{display:none;color:#68758c;font-size:13px;font-weight:800;white-space:nowrap;}
.affiliate-pagination:has(.pagination-summary){align-items:center;}

@media (max-width:600px){
    .affiliate-pagination:has(.pagination-summary){align-items:stretch;flex-direction:column;}
    .pagination-controls{justify-content:flex-start;}
    .pagination-action-label{display:inline;}
    .pagination-controls .pagination-page-button,
    .pagination-controls .pagination-ellipsis{display:none;}
    .pagination-mobile-page{display:inline;align-self:center;}
}

.advisor-limitation-line{
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    gap:8px;
}

.advisor-limitation-line small{
    flex:0 0 auto;
    color:#8a5a10;
    font-size:10px;
    font-weight:800;
}

.advisor-limitation-recommendation{
    margin-top:4px;
    color:#75654b;
    font-size:11px;
}

.advisor-manual-fix-list p{
    margin:6px 0 0;
    color:#5e6370;
    font-size:12px;
    line-height:1.5;
}

.advisor-manual-fix-list details{
    margin-top:9px;
}

.advisor-manual-fix-list summary{
    cursor:pointer;
    color:#4654ca;
    font-size:12px;
    font-weight:750;
}

.advisor-manual-fix-content{
    margin-top:7px;
    padding:8px 10px;
    border-radius:8px;
    background:#f5f7fb;
}

.advisor-manual-fix-content span{
    display:block;
    color:#768197;
    font-size:10px;
    font-weight:800;
    letter-spacing:.03em;
    text-transform:uppercase;
}

.advisor-manual-fix-content p{
    margin:3px 0 0;
    color:#313a4b;
    white-space:pre-wrap;
}

.advisor-manual-fix-more{
    margin:10px 0 0;
    color:#7a6d56;
    font-size:12px;
}

.advisor-note,
.review-empty-line{
    padding:10px 12px;
    border-radius:10px;
    color:#65748c;
    background:#f3f6fa;
    font-size:12px;
    line-height:1.5;
}

.empty-state{
    display:grid;
    min-height:650px;
    place-content:center;
    justify-items:center;
    padding:30px;
    color:#758196;
    text-align:center;
}

.empty-state-compact{
    min-height:570px;
}

.empty-state-mark{
    display:grid;
    width:52px;
    height:52px;
    margin-bottom:13px;
    place-items:center;
    border-radius:15px;
    color:#41638f;
    background:#eef3f9;
    font-size:18px;
    font-weight:800;
}

.empty-state-mark-ai{
    color:#0f7650;
    background:var(--green-soft);
    font-size:13px;
}

.empty-state h3{
    margin:0 0 6px;
    color:#48556b;
    font-size:16px;
}

.empty-state p{
    max-width:330px;
    margin:0;
    font-size:13px;
    line-height:1.5;
}

.modal-backdrop{
    position:fixed;
    z-index:500;
    inset:0;
    display:grid;
    place-items:center;
    padding:18px;
    background:rgba(8, 24, 49, .58);
    backdrop-filter:blur(5px);
}

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

.insufficient-points-modal-backdrop{
    z-index:520;
}

.insufficient-points-modal{
    position:relative;
    width:min(850px, calc(100vw - 32px));
    max-height:calc(100vh - 32px);
    padding:28px;
    overflow:auto;
    border:1px solid rgba(255,255,255,.8);
    border-radius:22px;
    background:linear-gradient(180deg, #fbfdff 0%, #f4f7fc 100%);
    box-shadow:0 26px 80px rgba(6, 22, 48, .3);
}

.insufficient-points-heading{
    display:flex;
    align-items:flex-start;
    gap:14px;
    padding-right:34px;
}

.insufficient-points-icon{
    display:grid;
    width:42px;
    height:42px;
    flex:0 0 auto;
    place-items:center;
    border-radius:14px;
    color:#fff;
    background:linear-gradient(135deg, #2b72e8, #18458f);
    box-shadow:0 10px 22px rgba(35, 94, 190, .22);
    font-size:13px;
}

.insufficient-points-heading h2{
    margin:3px 0 0;
    color:var(--navy-dark);
    font-size:25px;
    line-height:1.2;
}

.insufficient-points-heading p{
    max-width:620px;
    margin:7px 0 0;
    color:var(--muted);
    font-size:13px;
    line-height:1.55;
}

.insufficient-points-balance{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin:20px 0 5px;
    padding:13px 15px;
    border:1px solid #cbdcf5;
    border-radius:13px;
    color:#52709b;
    background:#edf5ff;
    font-size:12px;
}

.insufficient-points-balance strong{
    color:#17468e;
    font-size:16px;
}

.insufficient-points-context{
    margin:0 0 16px;
    color:#6b7b92;
    font-size:11px;
}

.insufficient-points-plans{
    display:grid;
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap:10px;
}

.insufficient-points-plan-card{
    position:relative;
    display:flex;
    min-width:0;
    flex-direction:column;
    gap:9px;
    padding:15px;
    border:1px solid #dce5f1;
    border-radius:16px;
    background:#fff;
    box-shadow:0 8px 20px rgba(29, 48, 82, .06);
}

.insufficient-points-plan-card-recommended{
    border-color:#7fa6ef;
    box-shadow:0 12px 26px rgba(37, 99, 235, .13);
}

.insufficient-points-plan-card-recommended h3{
    padding-right:108px;
}

.insufficient-points-plan-badge{
    position:absolute;
    top:14px;
    right:14px;
    padding:4px 7px;
    border-radius:999px;
    color:#fff;
    background:#235fc1;
    font-size:9px;
    font-weight:800;
    letter-spacing:.05em;
    text-transform:uppercase;
    white-space:nowrap;
}

.insufficient-points-plan-card h3{
    min-height:34px;
    margin:0;
    color:var(--navy-dark);
    font-size:17px;
    line-height:1.2;
}

.insufficient-points-plan-price{
    color:#173c7b;
    font-size:21px;
    line-height:1.1;
}

.insufficient-points-plan-points{
    padding:9px 10px;
    border-radius:10px;
    color:#5b6c85;
    background:#f3f6fb;
    font-size:10px;
}

.insufficient-points-plan-points strong{
    display:block;
    color:#193d79;
    font-size:20px;
    line-height:1.05;
}

.insufficient-points-plan-validity{
    display:grid;
    min-width:0;
    gap:3px;
    color:#6a7890;
    font-size:10px;
    line-height:1.35;
}

.insufficient-points-plan-validity strong{
    color:#2a4f8e;
    font-size:12px;
}

.insufficient-points-plan-validity small{
    color:#7b8799;
    font-size:9px;
}

.insufficient-points-plan-card .btn{
    width:100%;
    min-height:38px;
    margin-top:auto;
    padding-inline:8px;
    border-radius:10px;
    font-size:11px;
}

.insufficient-points-plans-state{
    margin:14px 0 0;
    color:#6b7b92;
    font-size:11px;
    text-align:center;
}

.insufficient-points-actions{
    display:flex;
    justify-content:flex-end;
    margin-top:18px;
}

.insufficient-points-actions .btn{
    min-height:38px;
}

.auth-modal-backdrop{
    --auth-modal-gutter-y:clamp(16px, 3vh, 24px);
    --auth-modal-gutter-x:clamp(16px, 4vw, 24px);
    overflow:hidden;
    padding:var(--auth-modal-gutter-y) var(--auth-modal-gutter-x);
}

.auth-modal{
    --auth-modal-content-padding:clamp(20px, 5vw, 28px);
    position:relative;
    display:flex;
    min-height:0;
    width:min(440px, 100%);
    max-height:calc(100vh - 32px);
    max-height:calc(100dvh - var(--auth-modal-gutter-y) - var(--auth-modal-gutter-y));
    flex-direction:column;
    box-sizing:border-box;
    padding:var(--auth-modal-content-padding);
    overflow:hidden;
    border:1px solid rgba(255,255,255,.7);
    border-radius:20px;
    background:white;
    box-shadow:0 30px 80px rgba(6, 22, 48, .28);
}

.auth-modal-scroll{
    flex:1 1 auto;
    min-height:0;
    width:100%;
    overflow-x:hidden;
    overflow-y:auto;
    overscroll-behavior:contain;
    scrollbar-gutter:stable;
    -webkit-overflow-scrolling:touch;
}

.auth-modal > .modal-close{
    z-index:2;
    right:calc(var(--auth-modal-content-padding) + 12px);
}

.modal-close{
    position:absolute;
    top:13px;
    right:13px;
    min-width:34px;
    min-height:34px;
    padding:0;
    border:0;
    border-radius:9px;
    color:#718097;
    background:#f1f4f8;
    font-size:22px;
    font-weight:400;
}

.auth-heading{
    padding:0;
    text-align:center;
}

.auth-mark{
    display:grid;
    width:44px;
    height:44px;
    margin:0 auto 16px;
    place-items:center;
    border-radius:13px;
    color:white;
    background:linear-gradient(135deg, #1d4ed8, var(--navy));
    font-size:13px;
    font-weight:800;
}

.auth-mark-image{
    position:relative;
    overflow:hidden;
    width:112px;
    height:88px;
    margin:0 auto;
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
}

.auth-mark img{
    position:absolute;
    top:-10px;
    left:50%;
    width:112px;
    max-width:none;
    height:auto;
    transform:translateX(-50%);
}

.auth-brand{
    margin:0 auto 16px;
    text-align:center;
}

.auth-wordmark{
    margin-top:-1px;
    color:var(--navy-dark);
    font-size:15px;
    font-weight:850;
    letter-spacing:-.025em;
    line-height:1.1;
    white-space:nowrap;
}

.auth-wordmark-ai{
    color:#1676e8;
}

.auth-heading h2{
    margin:0;
    color:var(--navy-dark);
    font-size:23px;
}

.auth-heading p{
    margin:7px 0 0;
    color:var(--muted);
    font-size:13px;
    line-height:1.5;
}

.google-auth-section{
    display:grid;
    gap:14px;
    margin-top:18px;
    justify-items:center;
}

.google-sign-in-button{
    width:min(100%, 320px);
    min-height:40px;
}

.google-sign-in-button > div{
    width:100%;
}

.google-sign-in-button iframe{
    max-width:100%;
}

.auth-divider{
    display:flex;
    align-items:center;
    gap:10px;
    width:100%;
    color:#8a96a8;
    font-size:11px;
    text-transform:uppercase;
}

.auth-divider::before,
.auth-divider::after{
    flex:1;
    height:1px;
    content:"";
    background:#e1e6ef;
}

.auth-tabs{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:4px;
    margin:22px 0 18px;
    padding:4px;
    border-radius:10px;
    background:#edf1f7;
}

.auth-tab{
    min-height:36px;
    border:0;
    color:#68748a;
    background:transparent;
    font-size:12px;
}

.auth-tab.active{
    color:var(--navy);
    background:white;
    box-shadow:0 2px 7px rgba(35, 53, 84, .1);
}

.auth-form{
    display:grid;
    gap:14px;
}

.auth-form .required-mark,
.account-profile-form .required-mark{
    margin-left:4px;
    color:#d62f45;
    font-weight:900;
}

.auth-form .field-error,
.account-profile-form .field-error{
    margin-top:-2px;
    color:#b42335;
    font-size:12px;
    font-weight:650;
    line-height:1.4;
}

.auth-form input.field-invalid,
.account-profile-form input.field-invalid{
    border-color:#d62f45;
    background:#fff8f8;
    box-shadow:0 0 0 4px rgba(214, 47, 69, .12);
}

.auth-form input{
    width:100%;
    min-height:44px;
    padding:0 12px;
    border:1px solid #cfd7e4;
    border-radius:9px;
    outline:none;
}

.auth-form input:focus{
    border-color:#7ba5ef;
    box-shadow:0 0 0 4px rgba(37, 99, 235, .1);
}

.password-input-wrapper{
    position:relative;
    display:block;
    width:100%;
    min-width:0;
}

.password-input-wrapper > input{
    width:100%;
    padding-right:52px !important;
}

.password-visibility-toggle{
    position:absolute;
    top:50%;
    right:3px;
    display:grid;
    width:40px;
    height:40px;
    padding:0;
    place-items:center;
    transform:translateY(-50%);
    border:0;
    border-radius:8px;
    color:#758198;
    background:transparent;
    cursor:pointer;
    transition:color .16s ease, background-color .16s ease;
    -webkit-tap-highlight-color:transparent;
}

.password-visibility-toggle:hover{
    transform:translateY(-50%);
    color:#344778;
    background:#edf1fb;
}

.password-visibility-toggle:focus-visible{
    outline:2px solid #5264d8;
    outline-offset:1px;
}

.password-visibility-toggle[aria-pressed="false"] .password-visibility-icon-hide,
.password-visibility-toggle[aria-pressed="true"] .password-visibility-icon-show{
    display:none;
}

.password-visibility-icon{
    width:20px;
    height:20px;
    fill:none;
    stroke:currentColor;
    stroke-linecap:round;
    stroke-linejoin:round;
    stroke-width:1.8;
}

.auth-error{
    padding:9px 11px;
    border-radius:8px;
    color:#9d2d3a;
    background:var(--red-soft);
    font-size:12px;
}

.auth-link-notice{
    display:flex;
    align-items:flex-start;
    gap:10px;
    margin:0 0 14px;
    padding:11px 12px;
    border:1px solid #d7e4f5;
    border-radius:10px;
    color:#355477;
    background:#f3f7fd;
    font-size:12px;
    line-height:1.5;
}

.auth-link-notice-icon{
    display:grid;
    flex:0 0 20px;
    width:20px;
    height:20px;
    place-items:center;
    border-radius:50%;
    color:#2f67a9;
    background:#dceafa;
    font-size:12px;
    font-weight:800;
}

.auth-link-notice-content{
    min-width:0;
}

.auth-link-notice strong{
    display:block;
    color:#203f67;
    font-size:13px;
}

.auth-link-notice p{
    margin:3px 0 8px;
}

.auth-link-cancel{
    min-height:30px;
    padding:5px 9px;
    border:1px solid #bdd0e8;
    border-radius:7px;
    color:#2f5f96;
    background:white;
    font-size:11px;
    font-weight:700;
}

.auth-link-cancel:hover{
    background:#eaf2fc;
}

.auth-toast{
    position:fixed;
    z-index:600;
    right:16px;
    bottom:18px;
    max-width:min(440px, calc(100vw - 32px));
    padding:11px 14px;
    border:1px solid #bce2cf;
    border-radius:10px;
    color:#0f6648;
    background:#e7f6ef;
    box-shadow:0 12px 30px rgba(6, 22, 48, .16);
    font-size:12px;
    font-weight:700;
    line-height:1.45;
}

.auth-submit{
    width:100%;
    margin-top:2px;
}

.password-recovery-note{
    margin:0;
    padding:10px 12px;
    border:1px solid #dbe5f2;
    border-radius:9px;
    color:#5d6d84;
    background:#f7faff;
    font-size:12px;
    line-height:1.5;
}

.password-recovery-actions{
    display:grid;
    gap:8px;
}

.password-recovery-result{
    display:grid;
    gap:12px;
    padding:16px;
    border:1px solid #bce2cf;
    border-radius:12px;
    background:#f3fbf7;
}

.password-recovery-result[hidden]{
    display:none;
}

.password-recovery-result h3{
    margin:0;
    color:#176447;
    font-size:18px;
}

.password-recovery-result > label{
    margin-bottom:-8px;
    color:#34445b;
    font-size:13px;
    font-weight:700;
}

.password-recovery-password-row{
    display:flex;
    align-items:center;
    gap:8px;
}

.password-recovery-password-row > .password-input-wrapper{
    flex:1 1 auto;
}

.password-recovery-password-row > button{
    flex:0 0 auto;
    min-height:42px;
}

#passwordRecoveryCopyStatus{
    min-height:16px;
    color:#176447;
    font-size:12px;
}

.mandatory-password-modal .auth-heading p{
    max-width:360px;
    margin-inline:auto;
}

.plans-modal{
    position:relative;
    width:min(1360px, calc(100vw - 36px));
    max-height:calc(100vh - 36px);
    padding:30px;
    overflow:auto;
    border:1px solid rgba(255,255,255,.7);
    border-radius:26px;
    background:linear-gradient(180deg, #fbfdff 0%, #f5f7fb 100%);
    box-shadow:0 30px 90px rgba(6, 22, 48, .32);
}

.plans-heading{
    max-width:680px;
    margin:0 auto 28px;
    text-align:center;
}

.plans-heading h2{
    margin:0;
    color:var(--navy-dark);
    font-size:30px;
    line-height:1.15;
    letter-spacing:-.025em;
}

.plans-heading p{
    margin:8px 0 0;
    color:var(--muted);
    font-size:13px;
}

.pricing-grid{
    display:grid;
    grid-template-columns:repeat(5, minmax(0, 1fr));
    gap:16px;
    align-items:stretch;
}

.pricing-card{
    position:relative;
    display:flex;
    min-height:405px;
    flex-direction:column;
    gap:12px;
    padding:20px;
    border:1px solid #dfe6f1;
    border-radius:20px;
    background:white;
    box-shadow:0 12px 30px rgba(29, 48, 82, .07);
    transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.pricing-card:hover{
    border-color:#b8c7e3;
    box-shadow:0 18px 38px rgba(29, 48, 82, .1);
    transform:translateY(-2px);
}

.pricing-card-featured{
    border-color:#7fa6ef;
    box-shadow:0 18px 42px rgba(37, 99, 235, .16);
    transform:none;
}

.pricing-popular{
    position:absolute;
    top:-11px;
    right:16px;
    padding:5px 9px;
    border-radius:999px;
    color:white;
    background:linear-gradient(135deg, #1d4ed8, #24458f);
    font-size:10px;
    font-weight:800;
    letter-spacing:.04em;
    text-transform:uppercase;
}

.pricing-label{
    color:var(--blue);
    font-size:10px;
    font-weight:800;
    letter-spacing:.12em;
    text-transform:uppercase;
}

.pricing-card h3{
    margin:0;
    color:var(--navy-dark);
    font-size:22px;
    line-height:1.15;
}

.pricing-price{
    color:#102f60;
    font-size:30px;
    font-weight:850;
    letter-spacing:-.03em;
}

.pricing-card p{
    min-height:62px;
    margin:0;
    color:var(--muted);
    font-size:13px;
    line-height:1.55;
}

.pricing-files{
    margin-top:auto;
    padding:15px;
    border-radius:16px;
    color:#526078;
    background:linear-gradient(180deg, #f5f7fb, #edf2f8);
    font-size:12px;
}

.pricing-files strong{
    display:block;
    color:var(--navy);
    font-size:30px;
    line-height:1;
}

.plan-validity-block{
    display:grid;
    min-width:0;
    gap:3px;
    padding:10px 12px;
    border-radius:13px;
    background:#f2f6fc;
}

.plan-validity-heading{
    display:flex;
    min-width:0;
    align-items:center;
    gap:6px;
    color:#5e6f88;
    font-size:10px;
    font-weight:800;
    line-height:1.3;
}

.plan-validity-icon{
    flex:0 0 auto;
    color:#3b64a5;
    font-size:15px;
    line-height:1;
}

.plan-validity-value{
    display:block;
    color:#183b75;
    font-size:18px;
    font-weight:800;
    line-height:1.15;
    overflow-wrap:anywhere;
}

.plan-validity-note{
    display:block;
    color:#617089;
    font-size:10px;
    line-height:1.4;
}

.pricing-examples{
    display:grid;
    gap:4px;
    min-height:74px;
    padding:12px 13px;
    border:1px solid #e5ebf4;
    border-radius:14px;
    color:#51627d;
    background:#fff;
    font-size:12px;
}

.pricing-examples span{
    color:#7a879b;
    font-size:10px;
    font-weight:800;
    letter-spacing:.08em;
    text-transform:uppercase;
}

.pricing-examples b{
    color:#132653;
    font-size:14px;
}

.pricing-examples small{
    color:#65748d;
    font-size:11px;
    line-height:1.35;
}

.pricing-card .btn{
    width:100%;
    min-height:44px;
    margin-top:0;
    border-radius:12px;
}

.plans-footnote,
.plan-request-notice{
    margin-top:18px;
    padding:10px 12px;
    border-radius:9px;
    color:#68748a;
    background:#eef2f7;
    font-size:11px;
    text-align:center;
}

.plan-request-notice{
    color:#0f7650;
    background:var(--green-soft);
    font-size:12px;
    font-weight:700;
}

.payment-modal{
    position:relative;
    width:min(900px, 100%);
    max-height:calc(100vh - 36px);
    padding:28px;
    overflow:auto;
    border:1px solid rgba(255,255,255,.75);
    border-radius:22px;
    background:#f8faff;
    box-shadow:0 30px 90px rgba(6, 22, 48, .34);
}

.payment-heading{
    margin-bottom:22px;
    text-align:center;
}

.payment-heading h2{
    margin:0;
    color:var(--navy-dark);
    font-size:25px;
    letter-spacing:-.025em;
}

.payment-heading p{
    margin:7px 0 0;
    color:var(--muted);
    font-size:12px;
}

.payment-layout{
    display:grid;
    grid-template-columns:270px minmax(0, 1fr);
    gap:18px;
}

.payment-qr-card,
.payment-details{
    border:1px solid #dde4ee;
    border-radius:16px;
    background:white;
    box-shadow:0 7px 22px rgba(29, 48, 82, .05);
}

.payment-qr-card{
    padding:18px;
}

.payment-qr-image{
    display:block;
    width:100%;
    aspect-ratio:1;
    object-fit:contain;
    border:1px solid #e1e7ef;
    border-radius:13px;
    background:white;
}

.payment-qr-placeholder{
    display:grid;
    min-height:235px;
    place-content:center;
    justify-items:center;
    border:2px dashed #cdd7e5;
    border-radius:13px;
    color:#66748a;
    background:#f7f9fc;
    text-align:center;
}

.qr-placeholder-grid{
    width:92px;
    height:92px;
    margin-bottom:13px;
    border:8px solid #dce4ef;
    border-radius:8px;
    background:
        linear-gradient(90deg, transparent 45%, #dce4ef 45%, #dce4ef 55%, transparent 55%),
        linear-gradient(transparent 45%, #dce4ef 45%, #dce4ef 55%, transparent 55%);
    background-size:20px 20px;
}

.payment-qr-placeholder strong{
    color:#445269;
    font-size:13px;
}

.payment-qr-placeholder span{
    margin-top:4px;
    color:#8b96a8;
    font-size:11px;
}

.payment-secure-note{
    margin-top:13px;
    color:#748096;
    font-size:10px;
    line-height:1.5;
    text-align:center;
}

.payment-details{
    padding:19px;
}

.payment-summary{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
    margin-bottom:14px;
}

.payment-summary > div{
    padding:12px;
    border-radius:10px;
    background:var(--blue-soft);
}

.payment-summary span,
.bank-detail span{
    display:block;
    margin-bottom:4px;
    color:#778399;
    font-size:10px;
    font-weight:700;
    letter-spacing:.04em;
    text-transform:uppercase;
}

.payment-summary strong{
    color:var(--navy);
    font-size:16px;
}

.bank-detail-list{
    display:grid;
    gap:8px;
}

.bank-detail{
    position:relative;
    padding:10px 80px 10px 11px;
    border:1px solid #e1e7ef;
    border-radius:10px;
    background:#fbfcfe;
}

.bank-detail strong{
    color:#29364d;
    font-size:14px;
    letter-spacing:.02em;
}

.bank-detail button{
    position:absolute;
    top:50%;
    right:8px;
    min-height:30px;
    padding:0 9px;
    border:0;
    color:#174eaf;
    background:var(--blue-soft);
    font-size:10px;
    transform:translateY(-50%);
}

.bank-detail button:hover{
    transform:translateY(calc(-50% - 1px));
}

.bank-detail-important{
    border-color:#e8cf8d;
    background:var(--amber-soft);
}

.bank-detail-important strong{
    color:#7a5209;
    font-size:16px;
}

.payment-order-meta{
    display:flex;
    justify-content:space-between;
    gap:10px;
    margin:13px 0;
    color:#7a8699;
    font-size:10px;
}

.payment-status{
    padding:9px 11px;
    border-radius:9px;
    font-size:11px;
    font-weight:750;
    text-align:center;
}

.payment-status-pending{
    color:#76510c;
    background:var(--amber-soft);
}

.payment-status-confirming{
    color:#174eaf;
    background:var(--blue-soft);
}

.payment-status-activated{
    color:#0f7650;
    background:var(--green-soft);
}

.development-notice-panel{
    width:min(420px,100%);
    padding:30px 28px 26px;
    border:1px solid rgba(255,255,255,.75);
    border-radius:20px;
    background:#fff;
    box-shadow:0 30px 80px rgba(6,22,48,.28);
    text-align:center;
}

.development-notice-icon{
    display:grid;
    width:42px;
    height:42px;
    margin:0 auto 14px;
    place-items:center;
    border:1px solid #e2e8ef;
    border-radius:14px;
    color:#52637a;
    background:#f3f6f9;
    font-size:18px;
    font-weight:800;
}

.development-notice-panel h2{
    margin:0;
    color:var(--navy-dark);
    font-size:22px;
}

.development-notice-panel p{
    margin:9px 0 22px;
    color:var(--muted);
    font-size:14px;
    line-height:1.55;
}

.development-notice-panel .btn{
    min-width:120px;
}

.payment-status-expired{
    color:#9d2d3a;
    background:var(--red-soft);
}

.payment-confirm{
    width:100%;
    margin-top:12px;
}

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

.payment-confirmation-notice{
    display:grid;
    gap:5px;
    margin-top:12px;
    padding:14px 16px;
    border:1px solid #cfe3da;
    border-radius:14px;
    color:#315f4b;
    background:linear-gradient(180deg,#f4fbf7 0%,#eef8f2 100%);
    font-size:13px;
    line-height:1.45;
}

.payment-confirmation-notice[hidden],
.payment-confirmation-actions[hidden]{
    display:none;
}

.payment-confirmation-notice strong{
    color:#174d35;
    font-size:15px;
}

.payment-confirmation-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
    margin-top:12px;
}

.payment-confirmation-actions .btn{
    width:100%;
}

@media (max-width:560px){
    .payment-confirmation-actions{
        grid-template-columns:1fr;
    }
}

.payment-warning{
    margin:9px 0 0;
    color:#8994a7;
    font-size:10px;
    line-height:1.45;
    text-align:center;
}

.document-defaults-modal{
    position:relative;
    width:min(760px, 100%);
    max-height:calc(100vh - 36px);
    padding:28px;
    overflow:auto;
    border:1px solid rgba(255,255,255,.75);
    border-radius:22px;
    background:#f8faff;
    box-shadow:0 30px 90px rgba(6, 22, 48, .34);
}

.directive-quick-config-card{
    display:grid;
    gap:12px;
    margin:4px 0 12px;
    padding:16px 18px;
    border:1px solid #dfe6f2;
    border-radius:14px;
    background:linear-gradient(145deg, #fbfcff 0%, #f7f9fe 100%);
    box-shadow:0 3px 12px rgba(28, 54, 92, .045);
}

.directive-quick-config-heading{
    display:grid;
    gap:4px;
}

.directive-quick-config-title-row{
    display:flex;
    align-items:center;
    gap:7px;
}

.directive-quick-config-title-row b{
    color:var(--navy-dark, #1e3154);
    font-size:15px;
    font-weight:750;
}

.directive-quick-config-info{
    display:grid;
    width:20px;
    height:20px;
    padding:0;
    place-items:center;
    border:0;
    border-radius:50%;
    color:#637493;
    background:transparent;
    cursor:help;
}

.directive-quick-config-info:hover,
.directive-quick-config-info:focus-visible{
    color:var(--primary, #3558d4);
    background:#edf1ff;
}

.directive-quick-config-info svg,
.directive-quick-config-field label svg,
.directive-quick-config-actions svg,
.directive-quick-config-create svg,
.directive-quick-config-manager-toolbar svg,
.directive-quick-config-manager-empty svg,
.directive-quick-config-icon-action svg,
.directive-quick-config-preset-icon svg,
.directive-quick-config-chevron,
.directive-quick-config-option-check{
    width:18px;
    height:18px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.directive-quick-config-heading > small{
    color:#6c7890;
    font-size:12px;
    line-height:1.45;
}

.directive-quick-config-toolbar{
    display:grid;
    grid-template-columns:minmax(190px, .78fr) minmax(250px, 1.1fr) minmax(420px, 1.55fr);
    align-items:end;
    gap:16px;
}

.directive-quick-config-field{
    position:relative;
    display:grid;
    min-width:0;
    gap:6px;
}

.directive-quick-config-system,
.directive-quick-config-preset-field{
    padding-right:16px;
    border-right:1px solid #dfe5ef;
}

.directive-quick-config-field label{
    display:flex;
    min-width:0;
    align-items:center;
    gap:7px;
    margin:0;
    color:#394967;
    font-size:12px;
    font-weight:700;
}

.directive-quick-config-field label svg{
    width:16px;
    height:16px;
    flex:none;
    color:#596b8b;
}

.directive-quick-config-control{
    position:relative;
    min-width:0;
}

.directive-quick-config-control::after{
    position:absolute;
    top:50%;
    right:13px;
    width:8px;
    height:8px;
    border-right:1.7px solid #60708b;
    border-bottom:1.7px solid #60708b;
    content:"";
    pointer-events:none;
    transform:translateY(-70%) rotate(45deg);
}

.directive-quick-config-control-icon{
    position:absolute;
    z-index:1;
    top:50%;
    left:12px;
    width:18px;
    height:18px;
    fill:none;
    stroke:#526586;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
    pointer-events:none;
    transform:translateY(-50%);
}

.directive-quick-config-control select{
    width:100%;
    min-width:0;
    min-height:44px;
    padding:8px 36px 8px 40px;
    appearance:none;
    border:1px solid #d5deed;
    border-radius:10px;
    outline:none;
    color:#263958;
    background:#fff;
    font:inherit;
    font-size:13px;
    text-overflow:ellipsis;
    cursor:pointer;
}

.directive-quick-config-control select:focus-visible,
.directive-quick-config-trigger:focus-visible,
.directive-quick-config-create:focus-visible,
.directive-quick-config-icon-action:focus-visible{
    outline:3px solid rgba(69, 104, 225, .22);
    outline-offset:1px;
    border-color:#8399eb;
}

.directive-quick-config-field > small{
    overflow:hidden;
    color:#77839a;
    font-size:10.5px;
    line-height:1.35;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.directive-quick-config-picker{
    position:relative;
    min-width:0;
}

.directive-quick-config-trigger{
    display:flex;
    width:100%;
    min-width:0;
    min-height:44px;
    align-items:center;
    gap:9px;
    padding:5px 11px 5px 6px;
    border:1px solid #d5deed;
    border-radius:10px;
    color:#263958;
    background:#fff;
    text-align:left;
    cursor:pointer;
    transition:border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.directive-quick-config-trigger:not(:disabled):hover,
.directive-quick-config-trigger[aria-expanded="true"]{
    border-color:#9cace8;
    box-shadow:0 0 0 3px rgba(71, 100, 213, .08);
}

.directive-quick-config-trigger:disabled{
    color:#758097;
    background:#fafbfc;
    cursor:not-allowed;
}

.directive-quick-config-preset-icon{
    display:grid;
    width:34px;
    height:32px;
    flex:none;
    place-items:center;
    border-radius:8px;
    color:#344f9a;
    background:#f0f3ff;
}

.directive-quick-config-preset-icon svg{
    width:19px;
    height:19px;
    stroke-width:1.7;
}

.directive-quick-config-selected-name{
    min-width:0;
    flex:1;
    overflow:hidden;
    color:#253657;
    font-size:13px;
    font-weight:650;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.directive-quick-config-default-badge{
    display:inline-flex;
    min-height:21px;
    flex:none;
    align-items:center;
    padding:2px 8px;
    border:1px solid #dce5ff;
    border-radius:999px;
    color:#4262c8;
    background:#eff3ff;
    font-size:10px;
    font-weight:700;
    line-height:1.2;
    white-space:nowrap;
}

.directive-quick-config-chevron{
    width:17px;
    height:17px;
    flex:none;
    color:#5c6b85;
    transition:transform .16s ease;
}

.directive-quick-config-trigger[aria-expanded="true"] .directive-quick-config-chevron{
    transform:rotate(180deg);
}

.directive-quick-config-menu{
    position:absolute;
    z-index:180;
    top:calc(100% + 6px);
    right:0;
    left:0;
    min-width:min(100%, 360px);
    overflow:hidden;
    border:1px solid #dbe2ef;
    border-radius:12px;
    background:#fff;
    box-shadow:0 16px 38px rgba(26, 43, 76, .16);
}

.directive-quick-config-menu[hidden]{
    display:none;
}

.directive-quick-config-listbox{
    display:grid;
    max-height:min(330px, 45vh);
    overflow:auto;
    padding:5px;
}

.directive-quick-config-option{
    display:grid;
    min-width:0;
    grid-template-columns:minmax(0, 1fr) 18px;
    align-items:center;
    gap:9px;
    padding:8px;
    border:0;
    border-radius:8px;
    color:#273958;
    background:transparent;
    text-align:left;
    cursor:pointer;
}

.directive-quick-config-option:hover,
.directive-quick-config-option:focus-visible,
.directive-quick-config-option.is-selected{
    background:#f0f3ff;
    outline:none;
}

.directive-quick-config-option-copy{
    display:grid;
    min-width:0;
    gap:2px;
}

.directive-quick-config-option-title-row{
    display:flex;
    min-width:0;
    align-items:center;
    gap:8px;
}

.directive-quick-config-option-title{
    min-width:0;
    flex:1 1 auto;
    overflow:hidden;
    color:#253657;
    font-size:12px;
    font-weight:700;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.directive-quick-config-option-detail{
    min-width:0;
    overflow-wrap:anywhere;
    color:#7a869b;
    font-size:11px;
    line-height:1.4;
}

.directive-quick-config-option-check{
    width:17px;
    height:17px;
    color:#4967d2;
    opacity:0;
}

.directive-quick-config-option[aria-selected="true"] .directive-quick-config-option-check{
    opacity:1;
}

.directive-quick-config-create{
    display:flex;
    width:100%;
    min-height:42px;
    align-items:center;
    gap:9px;
    padding:8px 14px;
    border:0;
    border-top:1px solid #e8edf5;
    color:#405fc9;
    background:#fff;
    font-size:12px;
    font-weight:700;
    text-align:left;
    cursor:pointer;
}

.directive-quick-config-create:hover{
    background:#f7f8ff;
}

.directive-quick-config-actions{
    display:grid;
    min-width:0;
    grid-template-columns:repeat(2, minmax(132px, 1fr));
    align-items:end;
    gap:10px;
    padding-left:2px;
}

.directive-quick-config-actions > .btn{
    display:inline-flex;
    min-width:0;
    min-height:44px;
    align-items:center;
    justify-content:center;
    gap:8px;
    padding:8px 11px;
    font-size:12px;
    white-space:nowrap;
}

.directive-quick-config-actions svg{
    width:17px;
    height:17px;
    flex:none;
}

.directive-quick-config-status{
    margin:0;
    color:#4c795b;
    font-size:11px;
    line-height:1.35;
}

.directive-quick-config-status.is-error{
    color:#a33a43;
}

.directive-quick-config-status:empty{
    display:none;
}

.directive-quick-config-modal{
    position:relative;
    width:min(500px, 100%);
    max-height:calc(100vh - 36px);
    padding:26px;
    overflow:auto;
    border:1px solid #e0e6f0;
    border-radius:16px;
    background:#fff;
    box-shadow:0 24px 64px rgba(16, 35, 68, .24);
}

.directive-quick-config-manager-modal{
    width:min(930px, 100%);
}

#directiveQuickConfigSaveModal{
    z-index:501;
}

#directiveQuickConfigEditModal{
    z-index:502;
}

.directive-quick-config-edit-modal{
    width:min(740px, 100%);
}

.directive-quick-config-modal-heading{
    padding:0 38px 16px 0;
    border-bottom:1px solid #edf0f5;
}

.directive-quick-config-modal-heading h2{
    margin:0;
    color:var(--navy-dark, #1e3154);
    font-size:21px;
    line-height:1.3;
}

.directive-quick-config-modal-heading p{
    margin:6px 0 0;
    color:#728097;
    font-size:12px;
    line-height:1.5;
}

.directive-quick-config-save-form,
.directive-quick-config-edit-form{
    display:grid;
    gap:15px;
    margin-top:17px;
}

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

.directive-quick-config-edit-grid .field-group-wide{
    grid-column:1 / -1;
}

.directive-quick-config-default-option{
    display:flex;
    align-items:flex-start;
    gap:10px;
    color:#34445f;
    font-size:13px;
    cursor:pointer;
}

.directive-quick-config-default-option input{
    width:16px;
    min-height:16px;
    flex:none;
    margin:2px 0 0;
    accent-color:#465ed5;
}

.directive-quick-config-default-option span{
    display:grid;
    gap:3px;
}

.directive-quick-config-default-option small{
    color:#79859a;
    font-size:11px;
    line-height:1.4;
}

.directive-quick-config-duplicate{
    padding:12px;
    border:1px solid #e7d7a6;
    border-radius:10px;
    background:#fffaf0;
}

.directive-quick-config-duplicate p{
    margin:0 0 10px;
    color:#6f5a25;
    font-size:13px;
    line-height:1.5;
}

.directive-quick-config-modal-actions{
    display:flex;
    justify-content:flex-end;
    gap:9px;
    margin-top:5px;
}

.directive-quick-config-modal-actions > .btn{
    min-width:100px;
}

.directive-quick-config-manager-toolbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding:14px 0 12px;
}

.directive-quick-config-manager-toolbar p{
    margin:0;
    color:#728097;
    font-size:12px;
    line-height:1.45;
}

.directive-quick-config-manager-toolbar .btn,
.directive-quick-config-manager-empty .btn{
    display:inline-flex;
    min-height:38px;
    flex:none;
    align-items:center;
    gap:7px;
    padding:7px 11px;
    font-size:12px;
}

.directive-quick-config-manager-toolbar svg,
.directive-quick-config-manager-empty svg{
    width:16px;
    height:16px;
}

.directive-quick-config-manager-list{
    max-height:min(56vh, 480px);
    overflow:auto;
    border:1px solid #e2e7f0;
    border-radius:10px;
}

.directive-quick-config-table{
    width:100%;
    border-collapse:collapse;
    table-layout:fixed;
}

.directive-quick-config-table th,
.directive-quick-config-table td{
    padding:11px 12px;
    border-bottom:1px solid #edf0f5;
    color:#3d4b63;
    font-size:12px;
    text-align:left;
    vertical-align:middle;
}

.directive-quick-config-table th{
    position:sticky;
    z-index:1;
    top:0;
    color:#65728a;
    background:#f7f9fc;
    font-size:11px;
    font-weight:700;
}

.directive-quick-config-table tbody tr:last-child td{
    border-bottom:0;
}

.directive-quick-config-table tbody tr:hover{
    background:#fafbfe;
}

.directive-quick-config-table th:nth-child(1){width:24%;}
.directive-quick-config-table th:nth-child(2){width:25%;}
.directive-quick-config-table th:nth-child(3){width:16%;}
.directive-quick-config-table th:nth-child(4){width:15%;}
.directive-quick-config-table th:nth-child(5){width:20%;}

.directive-quick-config-manager-name,
.directive-quick-config-manager-cell{
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.directive-quick-config-manager-name{
    color:#293b5b;
    font-weight:700;
}

.directive-quick-config-no-default{
    color:#a1aabb;
}

.directive-quick-config-default-badge.is-table-badge{
    min-height:23px;
    color:#3c7853;
    border-color:#d6ebdc;
    background:#eff8f1;
}

.directive-quick-config-manager-row-actions{
    display:flex;
    align-items:center;
    gap:6px;
}

.directive-quick-config-icon-action{
    display:grid;
    width:34px;
    height:32px;
    min-width:34px;
    min-height:32px;
    flex:none;
    place-items:center;
    padding:0;
    border:1px solid #e6eaf2;
    border-radius:8px;
    color:#53637e;
    background:#f8f9fc;
    cursor:pointer;
}

.directive-quick-config-icon-action:hover{
    border-color:#cbd5eb;
    color:#3f5fc6;
    background:#f0f3ff;
}

.directive-quick-config-icon-action.is-danger:hover{
    border-color:#f0cccc;
    color:#b14848;
    background:#fff4f4;
}

.directive-quick-config-icon-action svg{
    display:block;
    width:16px;
    height:16px;
    margin:0;
}

.directive-quick-config-manager-empty{
    display:grid;
    justify-items:center;
    gap:12px;
    padding:36px 16px;
    color:#758198;
    font-size:12px;
    text-align:center;
}

.directive-quick-config-manager-empty p{
    margin:0;
}

.directive-quick-config-manager-modal > .directive-quick-config-modal-actions{
    margin-top:14px;
}

@media (max-width:1100px){
    .directive-quick-config-toolbar{
        grid-template-columns:minmax(0, .9fr) minmax(0, 1.1fr);
        gap:14px;
    }

    .directive-quick-config-actions{
        grid-column:1 / -1;
        grid-template-columns:repeat(2, minmax(0, 1fr));
        padding:13px 0 0;
        border-top:1px solid #e3e8f1;
    }
}

.directive-quick-config-status{
    margin:0;
}

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

.document-defaults-standard-fields,
.criminal-procedure-defaults-fields{
    display:grid;
    grid-column:1 / -1;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:14px;
}

.document-defaults-tabs{
    display:grid;
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap:5px;
    margin:18px 0 8px;
    padding:5px;
    border-radius:12px;
    background:#edf1f7;
}

.document-defaults-tab{
    min-height:38px;
    border:0;
    color:#607089;
    background:transparent;
    font-size:12px;
}

.document-defaults-tab.active{
    color:#9d2d3a;
    background:white;
    box-shadow:0 2px 8px rgba(35, 53, 84, .12);
}

.document-defaults-system-hint{
    margin:0;
    color:#6f7a90;
    font-size:12px;
}

.criminal-dossier-defaults-card{
    margin:16px 0;
}

.document-defaults-form .field-group-wide,
.document-defaults-form .auth-error,
.document-defaults-form .standard-template-actions{
    grid-column:1 / -1;
}

.account-document-presets{
    display:grid;
    gap:14px;
    margin-top:16px;
}

.account-document-presets-toolbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}

.account-document-presets-toolbar h3{
    margin:0;
    color:#263957;
    font-size:16px;
}

.account-document-presets-toolbar .btn{
    display:inline-flex;
    min-height:38px;
    align-items:center;
    gap:7px;
}

.account-document-presets-toolbar .btn svg{
    width:17px;
    height:17px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
}

.account-document-preset-list{
    display:grid;
    max-height:min(58vh, 520px);
    grid-template-columns:repeat(2, minmax(0, 1fr));
    align-content:start;
    gap:10px;
    overflow:auto;
    padding:1px 3px 2px 1px;
}

.account-document-preset-card{
    display:grid;
    min-width:0;
    gap:10px;
    padding:14px;
    border:1px solid #e0e6f0;
    border-radius:13px;
    background:#fff;
    box-shadow:0 2px 8px rgba(32, 52, 83, .035);
}

.account-document-preset-card-heading{
    display:flex;
    min-width:0;
    align-items:center;
    justify-content:space-between;
    gap:8px;
}

.account-document-preset-card-heading h4{
    min-width:0;
    margin:0;
    overflow:hidden;
    color:#293b5b;
    font-size:14px;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.account-document-preset-agency{
    display:grid;
    min-width:0;
    gap:2px;
    margin:0;
}

.account-document-preset-agency span{
    color:#7b879a;
    font-size:10px;
}

.account-document-preset-agency strong{
    overflow-wrap:anywhere;
    color:#3f4e67;
    font-size:12px;
    font-weight:650;
}

.account-document-preset-meta{
    margin:0;
    color:#68758c;
    font-size:11px;
}

.account-document-preset-actions{
    display:flex;
    flex-wrap:wrap;
    gap:7px;
    padding-top:4px;
    border-top:1px solid #eef1f6;
}

.account-document-preset-actions .btn{
    min-height:32px;
    padding:6px 9px;
    font-size:11px;
}

.account-document-preset-actions .is-danger{
    margin-left:auto;
    color:#a64444;
}

.account-document-preset-empty{
    display:grid;
    min-height:150px;
    grid-column:1 / -1;
    align-content:center;
    justify-items:center;
    gap:7px;
    padding:20px;
    border:1px dashed #d5deed;
    border-radius:13px;
    color:#64728a;
    background:#fff;
    text-align:center;
}

.account-document-preset-empty-icon{
    display:grid;
    width:36px;
    height:36px;
    place-items:center;
    border-radius:10px;
    color:#4e66d4;
    background:#eff2ff;
    font-size:25px;
    line-height:1;
}

.account-document-preset-empty strong{
    color:#34435d;
    font-size:13px;
}

.account-document-preset-empty p{
    margin:0;
    font-size:11px;
}

.account-profile-modal{
    position:relative;
    width:min(980px, 100%);
    max-height:calc(100vh - 36px);
    padding:28px;
    overflow:auto;
    border:1px solid rgba(255,255,255,.75);
    border-radius:22px;
    background:#f8faff;
    box-shadow:0 30px 90px rgba(6, 22, 48, .34);
}

.account-profile-tabs{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:5px;
    margin:18px 0;
    padding:5px;
    border-radius:12px;
    background:#edf1f7;
}

.account-profile-tab{
    min-height:38px;
    border:0;
    color:#607089;
    background:transparent;
    font-size:12px;
}

.account-profile-tab.active{
    color:#9d2d3a;
    background:white;
    box-shadow:0 2px 8px rgba(35, 53, 84, .12);
}

.account-profile-pane{
    display:block;
}

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

.account-profile-form .field-group-wide,
.account-profile-form .auth-error,
.account-profile-form .standard-template-actions,
.account-withdraw-summary{
    grid-column:1 / -1;
}

.account-profile-note{
    margin:0 0 14px;
    padding:11px 13px;
    border:1px solid #d7e2f2;
    border-radius:12px;
    color:#4f5f76;
    background:white;
    font-size:12px;
    line-height:1.5;
}

.account-profile-note strong,
.account-profile-note span{
    display:block;
}

.account-profile-note .btn{
    margin-top:10px;
}

.account-withdraw-form{
    margin-top:16px;
    padding-top:16px;
    border-top:1px solid var(--line);
}

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

.account-withdraw-summary div{
    padding:12px;
    border:1px solid #d7e2f2;
    border-radius:12px;
    background:white;
}

.account-withdraw-summary span{
    display:block;
    color:#66758d;
    font-size:11px;
    font-weight:750;
}

.account-withdraw-summary strong{
    display:block;
    margin-top:4px;
    color:var(--navy-dark);
    font-size:18px;
}

.account-withdraw-table{
    margin-top:16px;
}

.auth-success{
    padding:9px 11px;
    border-radius:8px;
    color:#0f6648;
    background:#e7f6ef;
    font-size:12px;
}

.incoming-control{
    background:
        radial-gradient(circle at 90% 10%, rgba(42, 104, 196, .08), transparent 30%),
        white;
}

.incoming-defaults-card{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    margin:16px 0 18px;
    padding:14px 16px;
    border:1px solid #c8d8f4;
    border-radius:14px;
    background:linear-gradient(135deg, #f8fbff, #eef5ff);
}

.toggle-row{
    display:flex;
    align-items:flex-start;
    gap:11px;
    margin:0;
    color:#1f2d44;
    cursor:pointer;
}

.toggle-row input{
    width:18px;
    height:18px;
    margin-top:2px;
    accent-color:var(--blue);
}

.toggle-row b{
    display:block;
    margin-bottom:3px;
    color:var(--navy-dark);
    font-size:13px;
}

.toggle-row small{
    display:block;
    max-width:780px;
    color:#66758d;
    font-size:11px;
    line-height:1.45;
}

.incoming-defaults-actions{
    display:flex;
    flex-wrap:wrap;
    justify-content:flex-end;
    gap:8px;
}

.btn-small{
    min-height:34px;
    padding:8px 11px;
    font-size:11px;
}

.level-three-badge{
    padding:8px 11px;
    border:1px solid #b8d9ca;
    border-radius:999px;
    color:#0f7650;
    background:#edf9f4;
    font-size:10px;
    font-weight:850;
    white-space:nowrap;
}

.incoming-workspace{
    display:grid;
    grid-template-columns:minmax(310px, .72fr) minmax(560px, 1.5fr);
    gap:16px;
    margin-top:16px;
}

.legal-dossier-control{
    background:
        radial-gradient(circle at 92% 8%, rgba(15, 118, 80, .08), transparent 30%),
        white;
}

.legal-dossier-grid{
    display:grid;
    grid-template-columns:minmax(280px, 360px) minmax(0, 1fr);
    gap:16px;
    align-items:start;
}

.legal-case-panel,
.legal-dossier-form,
.legal-validation-panel,
.legal-output-panel{
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
}

.legal-case-panel,
.legal-dossier-form{
    padding:16px;
}

.legal-case-summary{
    margin-top:14px;
}

.legal-case-meta{
    display:flex;
    flex-wrap:wrap;
    gap:7px;
    margin:0 0 12px;
}

.legal-case-pill,
.legal-status-pill{
    display:inline-flex;
    align-items:center;
    min-height:26px;
    padding:5px 9px;
    border:1px solid #cdd9e8;
    border-radius:999px;
    color:#34445a;
    background:#f8fafc;
    font-size:11px;
    font-weight:800;
}

.legal-case-summary h3{
    margin:0 0 8px;
    color:var(--navy-dark);
    font-size:18px;
}

.legal-case-summary p{
    margin:0 0 12px;
    color:#58687d;
    font-size:13px;
    line-height:1.55;
}

.legal-case-summary h4,
.legal-output-section h3,
.legal-validation-group h3{
    margin:14px 0 8px;
    color:#1d2b3f;
    font-size:13px;
}

.legal-compact-list{
    display:grid;
    gap:7px;
    margin:0;
    padding:0;
    list-style:none;
}

.legal-compact-list li{
    padding:8px 10px;
    border:1px solid #edf1f6;
    border-radius:8px;
    background:#fbfcfe;
    color:#42526a;
    font-size:12px;
    line-height:1.45;
}

.legal-dossier-form .field-group textarea{
    min-height:82px;
}

.legal-form-step-heading{
    margin-top:22px;
    padding-top:16px;
    border-top:1px solid #e9eef5;
}

.legal-intake-slots{
    display:grid;
    gap:9px;
    margin-top:12px;
}

.legal-intake-input-store{
    display:none !important;
}

.legal-intake-workbench{
    display:grid;
    gap:12px;
    margin-top:14px;
    padding:14px;
    border:1px solid #dbe4ef;
    border-radius:10px;
    background:#f8fbff;
}

.legal-intake-stepper{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:6px;
    color:#8290a4;
    font-size:11px;
    font-weight:750;
    text-align:center;
}

.legal-intake-stepper span{
    padding:8px 5px;
    border-bottom:2px solid #e4eaf2;
}

.legal-intake-stepper span.active{
    border-color:#355fd0;
    color:#355fd0;
}

.legal-intake-toolbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:11px 12px;
    border:1px solid #dfe7f1;
    border-radius:8px;
    background:#fff;
}

.legal-intake-toolbar > div{
    display:grid;
    gap:4px;
    min-width:0;
}

.legal-intake-toolbar-actions{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:7px;
    flex-shrink:0;
}

.legal-intake-toolbar strong{
    color:#26364d;
    font-size:12px;
}

.legal-intake-toolbar small{
    color:#6d7b90;
    font-size:10px;
    line-height:1.4;
}

.legal-intake-slot{
    display:grid;
    grid-template-columns:minmax(0, 1fr) minmax(190px, .72fr);
    gap:12px;
    align-items:center;
    padding:11px 12px;
    border:1px solid #e1e8f2;
    border-radius:8px;
    background:#fbfcfe;
}

.legal-intake-slot-copy,
.legal-intake-document-result > span:last-child,
.legal-intake-field-result > span{
    display:grid;
    gap:4px;
    min-width:0;
}

.legal-intake-slot-copy strong,
.legal-intake-document-result strong,
.legal-intake-field-result strong{
    color:#26364d;
    font-size:12px;
}

.legal-intake-slot-copy small,
.legal-intake-document-result small,
.legal-intake-field-result small,
.legal-intake-disclaimer,
.legal-intake-muted{
    color:#6d7b90;
    font-size:11px;
    line-height:1.4;
}

.legal-intake-slot input[type="file"]{
    width:100%;
    min-width:0;
    color:#526179;
    font-size:11px;
}

.legal-intake-file-control{
    display:grid;
    gap:5px;
    min-width:0;
}

.legal-intake-file-actions{
    display:flex;
    flex-wrap:wrap;
    gap:7px;
    align-items:center;
}

.legal-intake-file-actions .btn{
    min-height:34px;
    padding:7px 10px;
    font-size:11px;
}

.legal-intake-file-picker{
    display:inline-flex;
    align-items:center;
    cursor:pointer;
}

.legal-intake-file-picker input[type="file"]{
    position:absolute;
    width:1px;
    height:1px;
    overflow:hidden;
    clip:rect(0 0 0 0);
    clip-path:inset(50%);
    white-space:nowrap;
}

.legal-intake-file-status{
    color:#6d7b90;
    font-size:10px;
    line-height:1.35;
}

.legal-intake-file-status.success{
    color:#16754f;
}

.legal-intake-file-status.muted{
    color:#7b8797;
}

.legal-intake-camera-panel{
    position:relative;
    width:min(580px, calc(100vw - 28px));
    max-height:calc(100vh - 28px);
    overflow:auto;
    padding:22px;
    border:1px solid #d8e1ed;
    border-radius:10px;
    background:#fff;
    box-shadow:0 24px 70px rgba(16, 32, 58, .24);
}

.legal-intake-camera-panel h2{
    margin:5px 0 7px;
    color:var(--navy-dark);
    font-size:20px;
}

.legal-intake-camera-help{
    margin:0 0 14px;
    color:#63728a;
    font-size:12px;
    line-height:1.5;
}

.legal-intake-camera-video{
    display:block;
    width:100%;
    aspect-ratio:4 / 3;
    border-radius:8px;
    background:#111a2b;
    object-fit:cover;
}

.legal-intake-camera-actions{
    display:flex;
    flex-wrap:wrap;
    justify-content:flex-end;
    gap:8px;
    margin-top:12px;
}

.legal-intake-camera-status{
    min-height:18px;
    margin-top:9px;
    color:#65748b;
    font-size:11px;
    line-height:1.4;
}

.legal-intake-related-page figcaption{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
}

.legal-intake-related-page figcaption button{
    padding:2px 5px;
    border:1px solid #e4c2c2;
    border-radius:5px;
    color:#a23b3b;
    background:#fff7f7;
    font:inherit;
    font-size:10px;
    cursor:pointer;
}

.legal-intake-actions{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    align-items:center;
    margin-top:12px;
}

.legal-intake-status{
    color:#5f6f84;
    font-size:12px;
    line-height:1.4;
}

.legal-intake-status.error{
    color:#b42318;
}

.legal-intake-manual-note{
    display:grid;
    gap:4px;
    padding:12px 13px;
    border:1px solid #e2e9f3;
    border-radius:8px;
    background:#f8fafc;
    color:#526179;
    font-size:12px;
    line-height:1.45;
}

.legal-intake-manual-note strong{
    color:#26364d;
}

.legal-intake-results{
    display:grid;
    gap:12px;
    margin-top:14px;
    padding:13px;
    border:1px solid #dce6f1;
    border-radius:8px;
    background:#f8fbff;
}

.legal-intake-inline-review{
    margin-top:0;
    padding:12px;
}

.legal-intake-review-fields{
    align-items:start;
}

.legal-intake-review-field{
    min-width:0;
    padding:8px;
    border:1px solid #dce8df;
    border-radius:7px;
    background:#fff;
}

.legal-intake-review-field small{
    display:block;
    color:#718097;
    font-size:10px;
    line-height:1.35;
    overflow-wrap:anywhere;
}

.legal-intake-review-field.is-conflict{
    border-color:#f0d18b;
    background:#fff9ea;
}

.legal-intake-review-documents{
    display:grid;
    gap:7px;
}

.legal-intake-review-documents h4{
    margin:0;
    color:#40516a;
    font-size:11px;
    text-transform:uppercase;
}

.legal-intake-summary-line{
    display:flex;
    flex-wrap:wrap;
    justify-content:space-between;
    gap:8px 14px;
    color:#5b6c83;
    font-size:11px;
}

.legal-intake-summary-line strong{
    color:#1d6c50;
}

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

.legal-intake-result-grid h4{
    margin:0 0 7px;
    color:#40516a;
    font-size:11px;
    text-transform:uppercase;
}

.legal-intake-document-list,
.legal-intake-field-list{
    display:grid;
    gap:6px;
}

.legal-intake-document-result,
.legal-intake-field-result{
    display:grid;
    grid-template-columns:24px minmax(0, 1fr);
    gap:8px;
    align-items:start;
    padding:8px;
    border:1px solid #e3eaf3;
    border-radius:7px;
    background:#fff;
}

.legal-intake-document-result > span:last-child{
    min-width:0;
}

.legal-intake-document-result strong{
    display:block;
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.legal-intake-field-result{
    grid-template-columns:minmax(0, 1fr) auto;
}

.legal-intake-field-result > em,
.legal-intake-document-result em{
    max-width:190px;
    color:#718097;
    font-size:10px;
    font-style:normal;
    line-height:1.4;
    text-align:right;
}

.legal-intake-document-result em{
    display:block;
    max-width:none;
    margin-top:3px;
    color:#a25d16;
    text-align:left;
}

.legal-intake-result-mark{
    display:inline-flex;
    width:22px;
    height:22px;
    align-items:center;
    justify-content:center;
    border-radius:999px;
    color:#fff;
    background:#b7791f;
    font-size:9px;
    font-weight:900;
}

.legal-intake-result-mark.readable{
    background:#16845b;
}

.legal-intake-result-mark.ocr{
    background:#2f6fbb;
}

.legal-intake-result-mark.ocr_low_confidence{
    background:#b7791f;
}

.legal-intake-result-mark.ocr_error,
.legal-intake-result-mark.ocr_empty{
    background:#b42318;
}

.legal-intake-field-result.is-conflict,
.legal-intake-conflict-note{
    border-color:#f0d18b;
    background:#fff9ea;
}

.legal-intake-conflict-note{
    padding:9px 10px;
    border:1px solid #f0d18b;
    border-radius:7px;
    color:#78521d;
    font-size:11px;
    line-height:1.45;
}

.legal-intake-disclaimer{
    display:block;
}

.legal-field-source{
    display:block;
    color:#4d7a68;
    font-size:10px;
    line-height:1.4;
}

.legal-field-source.is-conflict{
    color:#a25d16;
}

.legal-field-group-heading{
    margin-top:4px;
    padding-top:6px;
    border-top:1px solid #edf1f6;
    color:#607089;
    font-size:11px;
    font-weight:850;
    text-transform:uppercase;
}

.legal-field-group-heading-with-action{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}

.legal-field-group-heading-with-action > span{
    min-width:0;
}

.legal-field-group-scan{
    flex-shrink:0;
    min-height:36px;
    padding:8px 14px;
    white-space:nowrap;
}

.legal-person-scan{
    min-height:34px;
}

.legal-dossier-workspace{
    display:grid;
    grid-template-columns:minmax(300px, .8fr) minmax(520px, 1.4fr);
    gap:16px;
    margin-top:16px;
}

.legal-validation-content,
.legal-output-content{
    padding:16px;
}

.legal-status-card{
    display:grid;
    gap:8px;
    padding:13px 14px;
    border:1px solid #cdd9e8;
    border-radius:8px;
    background:#f8fafc;
}

.legal-status-card strong{
    color:#1f2d44;
    font-size:14px;
}

.legal-status-card span{
    color:#5e6c80;
    font-size:12px;
    line-height:1.45;
}

.legal-status-card.ready{
    border-color:#b8d9ca;
    background:#edf9f4;
}

.legal-status-card.warning{
    border-color:#f1d48d;
    background:#fff8e6;
}

.legal-status-card.blocked{
    border-color:#f1b8b2;
    background:#fff0ee;
}

.legal-validation-group{
    margin-top:14px;
}

.legal-issue{
    display:grid;
    grid-template-columns:26px 1fr;
    gap:8px;
    align-items:start;
    padding:9px 10px;
    border-bottom:1px solid #edf1f6;
    color:#35445a;
    font-size:12px;
    line-height:1.45;
}

.legal-issue:last-child{
    border-bottom:0;
}

.legal-issue-mark{
    display:inline-flex;
    width:22px;
    height:22px;
    align-items:center;
    justify-content:center;
    border-radius:999px;
    color:white;
    font-size:10px;
    font-weight:900;
}

.legal-issue-red .legal-issue-mark{
    background:#d64545;
}

.legal-issue-yellow .legal-issue-mark{
    background:#b7791f;
}

.legal-issue-green .legal-issue-mark{
    background:#16845b;
}

.legal-document-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
    gap:10px;
}

.legal-document-card{
    display:grid;
    gap:8px;
    padding:12px;
    border:1px solid #e3eaf3;
    border-radius:8px;
    background:#fbfcff;
}

.legal-document-card strong{
    color:#1f2d44;
    font-size:13px;
}

.legal-document-card span,
.legal-document-card small{
    color:#66758d;
    font-size:11px;
    line-height:1.45;
}

.legal-output-section{
    margin-top:16px;
}

.criminal-dossier-control{
    background:
        linear-gradient(120deg, rgba(166, 42, 42, .04), transparent 42%),
        white;
}

.criminal-dossier-saved-card{
    display:grid;
    gap:12px;
    margin:16px 0 18px;
    padding:14px 16px;
    border:1px solid #d7c8b8;
    border-radius:14px;
    background:linear-gradient(135deg, #fffaf4, #f9f5ee);
}

.criminal-dossier-saved-heading{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
}

.criminal-dossier-saved-heading > div{
    display:grid;
    gap:3px;
}

.criminal-dossier-saved-heading strong{
    color:#2f394b;
    font-size:13px;
}

.criminal-dossier-saved-heading small{
    color:#6f7787;
    font-size:11px;
}

.criminal-dossier-saved-controls{
    display:grid;
    grid-template-columns:minmax(190px, 1fr) minmax(190px, 1fr) auto auto auto;
    gap:8px;
    align-items:center;
}

.criminal-dossier-saved-controls input,
.criminal-dossier-saved-controls select{
    width:100%;
    min-width:0;
    min-height:42px;
    padding:0 11px;
    border:1px solid #d5deea;
    border-radius:7px;
    background:#fff;
    color:#26364d;
    font:inherit;
    font-size:12px;
}

.criminal-dossier-saved-controls .btn-danger{
    border-color:#efc7c7;
    color:#a22d38;
    background:#fff7f7;
}

.criminal-procedure-list,
.criminal-document-list{
    display:grid;
    gap:8px;
    margin-top:12px;
}

.criminal-pilot-card{
    display:grid;
    gap:10px;
    margin-top:18px;
    padding:14px;
    border:1px solid #d9e3ee;
    border-radius:8px;
    background:#f8fbfe;
}

.criminal-pilot-selector{
    display:grid;
    gap:6px;
}

.criminal-pilot-selector label,
.criminal-pilot-field > span{
    color:#33445e;
    font-size:11px;
    font-weight:700;
}

.criminal-pilot-selector select,
.criminal-pilot-field input,
.criminal-pilot-field textarea{
    width:100%;
    min-height:38px;
    padding:8px 10px;
    border:1px solid #cfdae7;
    border-radius:6px;
    background:#fff;
    color:#24344b;
    font:inherit;
    font-size:12px;
}

.criminal-pilot-field textarea{
    min-height:70px;
    resize:vertical;
}

.criminal-pilot-confirm-button{
    justify-self:start;
}

.criminal-pilot-selector small,
.criminal-pilot-field > span small{
    display:block;
    margin-top:3px;
    color:#718096;
    font-size:10px;
    font-weight:400;
}

.criminal-pilot-confirm-fields{
    display:grid;
    gap:9px;
}

.criminal-pilot-field{
    display:grid;
    gap:5px;
}

.criminal-pilot-status{
    min-height:18px;
    color:#68778b;
    font-size:11px;
}

.criminal-pilot-status.ready,
.criminal-pilot-ready{
    color:#1f6b45;
}

.criminal-pilot-status.blocked{
    color:#a23b3b;
}

.criminal-pilot-status.warning{
    color:#946c1b;
}

.criminal-pilot-ready{
    display:grid;
    gap:3px;
    padding:10px;
    border:1px solid #b9dfca;
    border-radius:6px;
    background:#f1fbf5;
    font-size:11px;
}

.criminal-pilot-ready span{
    color:#5f7769;
}

.criminal-pilot-blocked-reason{
    display:grid;
    gap:5px;
    padding:10px;
    border:1px solid #efd2a0;
    border-radius:6px;
    background:#fffaf0;
    color:#7a5a20;
    font-size:11px;
}

.criminal-pilot-blocked-reason strong{
    color:#7a4d10;
}

.criminal-pilot-blocked-reason ul{
    margin:2px 0 0 17px;
    padding:0;
}

.criminal-pilot-blocked-reason small{
    color:#896f42;
}

.criminal-pilot-actions{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}

.criminal-check-row{
    display:grid;
    grid-template-columns:20px minmax(0, 1fr);
    gap:8px;
    align-items:start;
    padding:10px;
    border:1px solid #e2e8f1;
    border-radius:8px;
    background:#fbfcfe;
    cursor:pointer;
}

.criminal-check-row:has(input:checked){
    border-color:#b8d9ca;
    background:#f0faf6;
}

.criminal-check-row input{
    margin-top:2px;
}

.criminal-check-row span{
    display:grid;
    gap:3px;
    min-width:0;
}

.criminal-check-row strong{
    color:#26364d;
    font-size:12px;
    line-height:1.35;
}

.criminal-check-row small{
    color:#6a788c;
    font-size:10px;
    line-height:1.4;
}

.criminal-person-toolbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin:12px 0;
    color:#607089;
    font-size:12px;
    line-height:1.45;
}

.criminal-person-toolbar-actions,
.criminal-person-document-toolbar{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:8px;
}

.criminal-person-document-toolbar{
    margin:8px 0 11px;
    color:#607089;
    font-size:11px;
    line-height:1.4;
}

.criminal-person-document-toolbar > span{
    margin-right:auto;
}

.criminal-document-scan-modal{
    align-items:start;
    overflow:auto;
    padding:18px;
}

.criminal-document-scan-panel{
    position:relative;
    width:min(780px, 100%);
    max-height:calc(100vh - 36px);
    overflow:auto;
    padding:24px;
    border:1px solid #dce5f0;
    border-radius:14px;
    background:#fff;
    box-shadow:0 24px 70px rgba(6, 22, 48, .28);
}

.criminal-document-scan-head{
    padding-right:38px;
}

.criminal-document-scan-head h2{
    margin:4px 0 6px;
    color:#1f2d44;
    font-size:22px;
}

.criminal-document-scan-head p{
    margin:0;
    color:#66758d;
    font-size:12px;
    line-height:1.5;
}

.criminal-document-scan-tabs{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:8px;
    margin:18px 0 12px;
}

.criminal-document-scan-tab{
    min-height:42px;
    padding:9px 12px;
    border:1px solid #d5deea;
    border-radius:7px;
    color:#43536b;
    background:#f7f9fc;
    font:inherit;
    font-size:12px;
    font-weight:750;
    cursor:pointer;
}

.criminal-document-scan-tab.active{
    border-color:#355fd0;
    color:#fff;
    background:#355fd0;
}

.criminal-document-scan-target{
    display:grid;
    gap:5px;
    margin-bottom:14px;
}

.criminal-document-scan-target label,
.criminal-related-upload-label{
    color:#43536b;
    font-size:11px;
    font-weight:750;
}

.criminal-document-scan-target select,
.criminal-document-scan-body input[type="file"]{
    width:100%;
    min-height:42px;
    padding:8px 10px;
    border:1px solid #d5deea;
    border-radius:7px;
    color:#26364d;
    background:#fbfcff;
    font:inherit;
    font-size:12px;
}

.criminal-document-scan-body{
    display:grid;
    gap:12px;
}

.criminal-scan-stepper{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:6px;
    color:#8290a4;
    font-size:11px;
    font-weight:750;
    text-align:center;
}

.criminal-scan-stepper span{
    padding:8px 5px;
    border-bottom:2px solid #e4eaf2;
}

.criminal-scan-stepper .active{
    border-color:#355fd0;
    color:#355fd0;
}

.criminal-scan-video{
    width:100%;
    max-height:42vh;
    min-height:180px;
    object-fit:contain;
    border-radius:8px;
    background:#162238;
}

.criminal-scan-actions{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}

.criminal-scan-actions .btn,
.criminal-document-scan-body > .btn,
.criminal-document-scan-result > .btn{
    min-height:40px;
}

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

.criminal-scan-preview figure,
.criminal-scan-empty{
    min-width:0;
    margin:0;
    padding:8px;
    border:1px solid #dce5f0;
    border-radius:8px;
    background:#f8fafc;
    cursor:pointer;
    transition:border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.criminal-scan-preview figure:hover,
.criminal-scan-preview figure:focus-visible,
.criminal-scan-empty:hover,
.criminal-scan-empty:focus-visible{
    border-color:#6a83dc;
    background:#f3f6ff;
    box-shadow:0 0 0 3px rgba(53, 95, 208, .12);
    outline:none;
}

.criminal-scan-preview img{
    display:block;
    width:100%;
    height:150px;
    object-fit:contain;
    border-radius:5px;
    background:#edf1f6;
}

.criminal-scan-preview figcaption,
.criminal-scan-empty{
    color:#68778e;
    font-size:11px;
    text-align:center;
}

.criminal-scan-preview figcaption{
    padding-top:7px;
}

.criminal-scan-empty{
    display:grid;
    min-height:174px;
    place-items:center;
}

.criminal-document-scan-status{
    min-height:20px;
    color:#64738b;
    font-size:12px;
    line-height:1.45;
}

.criminal-document-scan-status.success{
    color:#16734b;
}

.criminal-document-scan-status.error{
    color:#b42335;
}

.criminal-related-file-list{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
}

.criminal-related-file-list span{
    max-width:100%;
    overflow:hidden;
    padding:6px 8px;
    border:1px solid #dce5f0;
    border-radius:6px;
    color:#53637b;
    background:#f8fafc;
    font-size:11px;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.criminal-document-scan-result{
    display:grid;
    gap:12px;
    margin-top:4px;
    padding:14px;
    border:1px solid #cfe2d7;
    border-radius:9px;
    background:#f7fcf8;
}

.criminal-document-scan-result-head{
    display:grid;
    gap:3px;
}

.criminal-document-scan-result-head h3{
    margin:0;
    color:#1f2d44;
    font-size:14px;
}

.criminal-document-scan-result-head span{
    color:#61748c;
    font-size:11px;
    line-height:1.4;
}

.criminal-document-scan-fields{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:9px;
}

.criminal-scan-result-field{
    display:grid;
    gap:5px;
    min-width:0;
}

.criminal-scan-result-field span{
    color:#4b5b73;
    font-size:11px;
    font-weight:750;
}

.criminal-scan-result-field input{
    width:100%;
    min-width:0;
    min-height:38px;
    padding:8px 9px;
    border:1px solid #cbd9d0;
    border-radius:6px;
    color:#26364d;
    background:#fff;
    font:inherit;
    font-size:12px;
}

.criminal-document-scan-attachments{
    display:grid;
    gap:8px;
}

.criminal-scan-attachment-result{
    display:grid;
    gap:4px;
    padding:9px;
    border:1px solid #dce5f0;
    border-radius:7px;
    background:#fff;
}

.criminal-scan-attachment-result strong{
    color:#26364d;
    font-size:12px;
    overflow-wrap:anywhere;
}

.criminal-scan-attachment-result small{
    color:#738198;
    font-size:10px;
}

.criminal-scan-attachment-result details{
    color:#52647b;
    font-size:11px;
}

.criminal-scan-attachment-result pre{
    max-height:180px;
    overflow:auto;
    margin:8px 0 0;
    padding:8px;
    border-radius:6px;
    color:#46576f;
    background:#f5f7fa;
    font:inherit;
    font-size:11px;
    line-height:1.45;
    white-space:pre-wrap;
}

.criminal-person-list{
    display:grid;
    gap:12px;
}

.criminal-person-row{
    padding:13px;
    border:1px solid #dce5f0;
    border-radius:8px;
    background:#fbfcff;
}

.criminal-person-row-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:10px;
    margin-bottom:9px;
}

.criminal-person-row-head > div{
    display:grid;
    gap:3px;
}

.criminal-person-row-head strong{
    color:#1f2d44;
    font-size:13px;
}

.criminal-person-row-head small{
    color:#728097;
    font-size:11px;
}

.criminal-person-flags{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    margin-bottom:11px;
    color:#4e5d73;
    font-size:11px;
}

.criminal-person-flags label{
    display:inline-flex;
    align-items:center;
    gap:6px;
}

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

.criminal-person-field{
    display:grid;
    gap:5px;
    min-width:0;
}

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

.criminal-person-field > span{
    color:#4b5b73;
    font-size:11px;
    font-weight:750;
}

.criminal-person-field input,
.criminal-person-field select,
.criminal-person-field textarea{
    width:100%;
    min-width:0;
    padding:9px 10px;
    border:1px solid #d5deea;
    border-radius:6px;
    background:#fff;
    color:#26364d;
    font:inherit;
    font-size:12px;
}

.criminal-person-field textarea{
    min-height:65px;
    resize:vertical;
}

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

.criminal-stat-grid > div{
    display:grid;
    gap:3px;
    padding:11px;
    border:1px solid #dfe7f1;
    border-radius:8px;
    background:#f8fafc;
}

.criminal-stat-grid strong{
    color:#1d6c50;
    font-size:18px;
}

.criminal-stat-grid span{
    color:#66758d;
    font-size:10px;
    line-height:1.35;
}

.directive-workspace{
    grid-template-columns:1fr;
}

.directive-workspace .incoming-drafts-panel{
    overflow:hidden;
}

.directive-workspace .incoming-drafts-content{
    display:block;
    padding:0;
}

.directive-preview-shell{
    display:flex;
    min-height:740px;
    flex-direction:column;
    background:#f7f9fc;
}

.directive-preview-toolbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:12px 16px;
    border-bottom:1px solid var(--line);
    background:#fbfcff;
}

.directive-draft-tabs{
    display:flex;
    min-width:0;
    flex:1;
    flex-wrap:wrap;
    gap:8px;
}

.directive-draft-entry{
    display:flex;
    min-width:0;
    max-width:100%;
    align-items:center;
    gap:6px;
    flex-wrap:wrap;
}

.directive-draft-tab{
    display:inline-flex;
    align-items:center;
    gap:8px;
    max-width:260px;
    padding:8px 11px;
    border:1px solid #d7e0ed;
    border-radius:9px;
    color:#394963;
    background:white;
    font:800 11px "Segoe UI", Arial, sans-serif;
    cursor:pointer;
    transition:border-color .16s ease, box-shadow .16s ease, color .16s ease, background .16s ease;
}

.directive-draft-tab strong{
    color:#8a96aa;
    font-size:10px;
}

.directive-draft-tab span{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.directive-draft-tab:hover,
.directive-draft-tab.is-active{
    border-color:#9db4e6;
    color:var(--navy-dark);
    background:#eef4ff;
    box-shadow:0 8px 18px rgba(42, 79, 150, .10);
}

.directive-draft-handoff{
    max-width:100%;
    white-space:normal;
}

.directive-preview-meta{
    padding:14px 18px;
    border-bottom:1px solid var(--line);
    background:white;
}

.directive-preview-meta span{
    color:#2255a4;
    font-size:10px;
    font-weight:850;
    text-transform:uppercase;
}

.directive-preview-meta h3{
    margin:6px 0 5px;
    color:var(--navy-dark);
    font-size:18px;
}

.directive-preview-meta p{
    margin:0 0 8px;
    color:#65738a;
    font-size:12px;
    line-height:1.5;
}

.directive-word-preview{
    flex:1;
    min-height:620px;
    height:calc(100vh - 320px);
    border-radius:0;
}

.directive-preview-loading,
.directive-preview-error{
    margin:80px auto;
    max-width:520px;
}

.incoming-summary-panel,
.incoming-drafts-panel{
    min-width:0;
    border:1px solid rgba(204, 214, 228, .9);
    border-radius:var(--radius);
    background:white;
    box-shadow:var(--shadow-soft);
}

.incoming-summary-panel{
    align-self:start;
    position:sticky;
    top:86px;
}

.incoming-summary-content,
.incoming-drafts-content{
    padding:16px;
}

.incoming-overview-card{
    padding:15px;
    border:1px solid #ccd9ef;
    border-radius:12px;
    background:linear-gradient(145deg, #f8fbff, #eef4ff);
}

.incoming-overview-card h3{
    margin:10px 0 7px;
    color:var(--navy-dark);
    font-size:16px;
}

.incoming-overview-card p{
    margin:0 0 13px;
    color:#536178;
    font-size:11px;
    line-height:1.55;
}

.incoming-overview-card dl{
    display:grid;
    gap:7px;
    margin:0;
}

.incoming-overview-card dl div{
    display:grid;
    grid-template-columns:100px 1fr;
    gap:8px;
    padding-top:7px;
    border-top:1px solid rgba(154, 177, 216, .3);
}

.incoming-overview-card dt{
    color:#7c8aa1;
    font-size:9px;
    font-weight:800;
    text-transform:uppercase;
}

.incoming-overview-card dd{
    margin:0;
    color:#344258;
    font-size:10px;
    font-weight:650;
}

.incoming-response-status{
    display:inline-block;
    padding:5px 8px;
    border-radius:999px;
    color:#0f7650;
    background:#dff5eb;
    font-size:9px;
    font-weight:850;
    text-transform:uppercase;
}

.incoming-response-status.optional{
    color:#76510c;
    background:var(--amber-soft);
}

.incoming-summary-section{
    margin-top:12px;
    padding:13px 14px;
    border:1px solid #e4eaf2;
    border-radius:11px;
    background:#fbfcfe;
}

.incoming-summary-section h3{
    margin:0 0 9px;
    color:#334158;
    font-size:11px;
}

.incoming-summary-section ul{
    display:grid;
    gap:7px;
    margin:0;
    padding-left:17px;
    color:#59677d;
    font-size:10px;
    line-height:1.45;
}

.incoming-drafts-content{
    display:grid;
    gap:14px;
}

.incoming-drafts-content.incoming-preview-content{
    display:block;
    padding:0;
}

.incoming-preview-shell{
    min-height:740px;
}

.incoming-preview-missing-fields{
    margin:12px 0 0;
}

.incoming-word-preview{
    min-height:620px;
    height:calc(100vh - 340px);
}

.incoming-draft-card{
    padding:18px;
    border:1px solid #dce4ef;
    border-radius:13px;
    background:#fbfcfe;
}

.incoming-draft-heading{
    display:flex;
    justify-content:space-between;
    gap:16px;
    margin-bottom:15px;
}

.incoming-draft-heading span{
    color:#2255a4;
    font-size:9px;
    font-weight:850;
    text-transform:uppercase;
}

.incoming-draft-heading h3{
    margin:5px 0;
    color:var(--navy-dark);
    font-size:16px;
}

.incoming-draft-heading p{
    margin:0;
    color:var(--muted);
    font-size:10px;
}

.incoming-draft-status{
    display:inline-flex;
    margin-top:8px;
    padding:5px 9px;
    border-radius:999px;
    background:#eef7f1;
    color:#2f7048;
    font-size:10px;
    font-style:normal;
    font-weight:800;
}

.incoming-draft-heading > strong{
    color:#d7e0ee;
    font-size:34px;
}

.incoming-missing-fields{
    margin:0 0 14px;
    padding:10px 12px;
    border:1px solid #e6d9a8;
    border-radius:10px;
    background:#fffbea;
    color:#5f4b18;
    font-size:11px;
}

.incoming-missing-fields summary{
    cursor:pointer;
    font-weight:850;
}

.incoming-missing-fields ul{
    margin:8px 0 0;
    padding-left:18px;
}

.incoming-missing-fields li{
    margin:4px 0;
}

.incoming-draft-card label{
    display:block;
    margin:10px 0 6px;
    color:#536178;
    font-size:10px;
    font-weight:800;
}

.incoming-draft-card input,
.incoming-draft-card textarea{
    width:100%;
    box-sizing:border-box;
    border:1px solid #d5deea;
    border-radius:9px;
    color:#28364c;
    background:white;
    font-family:"Times New Roman", serif;
    font-size:14px;
    line-height:1.55;
}

.incoming-draft-card input{
    padding:9px 10px;
    font-weight:700;
}

.incoming-draft-card textarea{
    padding:14px;
    resize:vertical;
}

.incoming-loading,
.incoming-error{
    display:flex;
    min-height:150px;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:7px;
    padding:24px;
    border:1px dashed #bccbe0;
    border-radius:12px;
    color:#315b9d;
    background:#f7faff;
    text-align:center;
}

.incoming-loading span,
.incoming-error span{
    color:var(--muted);
    font-size:10px;
}

.incoming-error{
    color:#9d2d3a;
    background:var(--red-soft);
}

.review-processing-card{
    min-height:158px;
    box-sizing:border-box;
    padding:16px 18px;
    border:1px solid #d7e1ef;
    border-radius:14px;
    color:#283b57;
    background:linear-gradient(180deg,#fbfcff,#f5f8fc);
    text-align:left;
}

.review-processing-card.has-legal-check{
    min-height:184px;
}

.review-processing-card-header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
    margin-bottom:13px;
}

.review-processing-eyebrow{
    display:block;
    margin-bottom:3px;
    color:#71809a;
    font-size:9px;
    font-weight:800;
    letter-spacing:.06em;
    text-transform:uppercase;
}

.review-processing-card h3{
    margin:0;
    color:#203553;
    font-size:16px;
    line-height:1.25;
}

.review-processing-state{
    flex:0 0 auto;
    padding:4px 8px;
    border:1px solid #d7e1ef;
    border-radius:999px;
    color:#65758e;
    background:#fff;
    font-size:10px;
    font-weight:750;
}

.review-processing-steps{
    display:grid;
    gap:7px;
    margin:0;
    padding:0;
    list-style:none;
}

.review-processing-step{
    display:flex;
    align-items:center;
    gap:9px;
    min-height:22px;
    color:#8995a8;
    font-size:11px;
    line-height:1.35;
    transition:color 180ms ease;
}

.review-processing-step-icon{
    display:inline-flex;
    width:17px;
    height:17px;
    flex:0 0 17px;
    align-items:center;
    justify-content:center;
    color:#aab4c3;
    font-size:17px;
    line-height:1;
    transition:color 180ms ease;
}

.review-processing-step.is-completed{
    color:#477b66;
}

.review-processing-step.is-completed .review-processing-step-icon{
    color:#3c8868;
    font-size:15px;
    font-weight:800;
}

.review-processing-step.is-active{
    color:#2f5e9d;
    font-weight:750;
}

.review-processing-step.is-active .review-processing-step-icon{
    color:#3f76bc;
}

.review-processing-step.is-failed{
    color:#a2464f;
    font-weight:750;
}

.review-processing-step.is-failed .review-processing-step-icon{
    color:#b64855;
    font-size:15px;
    font-weight:800;
}

.directive-processing-message{
    min-height:15px;
}

.review-processing-spinner{
    display:block;
    width:13px;
    height:13px;
    box-sizing:border-box;
    border:2px solid #c9d8eb;
    border-top-color:#3f76bc;
    border-radius:50%;
    animation:review-processing-spin 800ms linear infinite;
}

@keyframes review-processing-spin{
    to{ transform:rotate(360deg); }
}

.review-processing-elapsed{
    margin:12px 0 0 26px;
    color:#7a879a;
    font-size:10px;
}

@media (max-width:600px){
    .review-processing-card,
    .review-processing-card.has-legal-check{
        min-height:0;
        padding:15px;
    }

    .review-processing-card-header{
        margin-bottom:11px;
    }

    .review-processing-state{
        display:none;
    }
}

.aggregate-control{
    background:
        radial-gradient(circle at 12% 10%, rgba(22, 132, 91, .09), transparent 30%),
        white;
}

.aggregate-note{
    margin:15px 0 18px;
    padding:13px 15px;
    border:1px solid #c9e4d8;
    border-radius:13px;
    color:#245946;
    background:linear-gradient(135deg, #f4fbf7, #edf9f3);
    font-size:12px;
    font-weight:650;
}

.aggregate-format-card{
    margin:14px 0 18px;
    border:1px solid #d7e0ed;
    border-radius:14px;
    background:#fbfcff;
    overflow:hidden;
}

.aggregate-format-card summary{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:13px 15px;
    color:#263c60;
    background:#f3f6fb;
    cursor:pointer;
    list-style:none;
}

.aggregate-format-card summary::-webkit-details-marker{
    display:none;
}

.aggregate-format-card summary span{
    font-size:13px;
    font-weight:850;
}

.aggregate-format-card summary small{
    color:#718099;
    font-size:10px;
}

.aggregate-format-card[open] summary{
    border-bottom:1px solid #e3e8f1;
}

.aggregate-format-card > .form-grid{
    padding:15px;
}

.aggregate-workspace{
    display:grid;
    grid-template-columns:minmax(700px, 1.8fr) minmax(330px, .65fr);
    gap:16px;
    margin-top:16px;
}

.aggregate-workspace-single{
    grid-template-columns:1fr;
}

.aggregate-indicator-review{
    margin-top:16px;
    padding:20px;
    border:1px solid #b8c9ef;
    border-radius:var(--radius);
    background:linear-gradient(145deg, #f8faff, #eef4ff);
    box-shadow:var(--shadow-soft);
}

.aggregate-review-heading{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:18px;
}

.aggregate-review-heading h2{
    margin:5px 0 6px;
    color:var(--navy-dark);
    font-size:21px;
}

.aggregate-review-heading p,
.aggregate-review-objective p{
    margin:0;
    color:#62718a;
    font-size:11px;
    line-height:1.5;
}

.aggregate-review-objective{
    display:grid;
    gap:5px;
    margin:15px 0;
    padding:13px 15px;
    border:1px solid #d7e0f6;
    border-radius:13px;
    background:white;
}

.aggregate-review-objective strong{
    color:#1e376b;
    font-size:14px;
}

.aggregate-review-objective span{
    color:#526481;
    font-size:10px;
    font-weight:750;
}

.aggregate-indicator-editor{
    display:grid;
    gap:10px;
}

.aggregate-indicator-editor-row{
    display:grid;
    grid-template-columns:68px minmax(0, 1fr);
    gap:12px;
    padding:14px;
    border:1px solid #d7e0ef;
    border-radius:14px;
    background:white;
}

.aggregate-indicator-toggle{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    align-self:start;
    padding:9px 7px;
    border-radius:10px;
    color:#244f41;
    background:#e8f5ef;
    font-size:10px;
    font-weight:850;
}

.aggregate-indicator-editor-main{
    min-width:0;
}

.aggregate-indicator-editor-grid{
    display:grid;
    grid-template-columns:minmax(260px, 2fr) minmax(130px, .7fr) minmax(130px, .7fr) minmax(180px, 1fr);
    gap:9px;
}

.aggregate-indicator-editor-grid label,
.aggregate-indicator-advanced-grid label{
    display:grid;
    gap:5px;
}

.aggregate-indicator-editor-grid label > span,
.aggregate-indicator-advanced-grid label > span{
    color:#60708a;
    font-size:9px;
    font-weight:850;
    text-transform:uppercase;
}

.aggregate-indicator-editor-grid input,
.aggregate-indicator-editor-grid select,
.aggregate-indicator-advanced-grid textarea{
    width:100%;
    border:1px solid #cfd9e8;
    border-radius:9px;
    color:#1f2f4b;
    background:#fbfcff;
    font:inherit;
}

.aggregate-indicator-editor-grid input,
.aggregate-indicator-editor-grid select{
    min-height:38px;
    padding:8px 10px;
}

.aggregate-indicator-advanced-grid textarea{
    padding:9px 10px;
    resize:vertical;
}

.aggregate-indicator-editor-main > p{
    margin:9px 0 6px;
    color:#53627a;
    font-size:11px;
    line-height:1.5;
}

.aggregate-indicator-editor-meta{
    display:flex;
    flex-wrap:wrap;
    gap:7px;
    margin-bottom:7px;
}

.aggregate-indicator-editor-meta span{
    padding:4px 7px;
    border-radius:999px;
    color:#53627a;
    background:#f0f3f8;
    font-size:9px;
}

.aggregate-indicator-editor-meta .needs-review{
    color:#8a5a12;
    background:#fff4d8;
}

.aggregate-indicator-editor-main details summary,
.aggregate-ambiguous-list summary{
    color:#365381;
    cursor:pointer;
    font-size:10px;
    font-weight:800;
}

.aggregate-indicator-advanced-grid{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:9px;
    margin-top:10px;
}

.aggregate-indicator-evidence-examples,
.aggregate-ambiguous-list ul{
    display:grid;
    gap:6px;
    margin:10px 0 0;
    padding:0;
    list-style:none;
}

.aggregate-indicator-evidence-examples li,
.aggregate-ambiguous-list li{
    display:grid;
    gap:3px;
    padding:9px 11px;
    border-left:3px solid #9eb5e6;
    color:#596980;
    background:#f7f9fd;
    font-size:10px;
}

.aggregate-ambiguous-list{
    margin-top:13px;
}

.aggregate-review-actions{
    justify-content:flex-end;
    margin-top:16px;
}

.aggregate-review-status{
    margin-top:10px;
    color:#48637d;
    font-size:11px;
    font-weight:700;
}

.aggregate-review-status.error{
    color:#a23443;
}

.aggregate-step-complete{
    display:grid;
    gap:6px;
    padding:15px;
    border:1px solid #bcded0;
    border-radius:13px;
    color:#245946;
    background:#eff9f4;
}

.aggregate-step-complete span,
.aggregate-step-complete small{
    color:#557064;
    font-size:11px;
    line-height:1.5;
}

.aggregate-main-panel,
.aggregate-side-panel{
    min-width:0;
    border:1px solid rgba(204, 214, 228, .9);
    border-radius:var(--radius);
    background:white;
    box-shadow:var(--shadow-soft);
}

.aggregate-overview,
.aggregate-section{
    padding:16px;
}

.aggregate-section{
    border-top:1px solid #edf1f6;
}

.aggregate-section h3{
    margin:0 0 12px;
    color:var(--navy-dark);
    font-size:15px;
}

.aggregate-kpis{
    display:grid;
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap:10px;
    margin-bottom:12px;
}

.aggregate-kpis div,
.aggregate-stat-card{
    padding:13px;
    border:1px solid #dbe5f3;
    border-radius:13px;
    background:#fbfdff;
}

.aggregate-kpis span,
.aggregate-stat-card span{
    display:block;
    margin-bottom:6px;
    color:#6b7a91;
    font-size:10px;
    font-weight:800;
    text-transform:uppercase;
}

.aggregate-kpis strong,
.aggregate-stat-card strong{
    color:var(--navy-dark);
    font-size:20px;
}

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

.aggregate-warning-list{
    margin-top:13px;
    padding:13px;
    border:1px solid #f0d9a1;
    border-radius:13px;
    background:#fffaf0;
}

.aggregate-selected-metrics{
    margin-top:13px;
    padding:14px;
    border:1px solid #c9e4d8;
    border-radius:13px;
    background:linear-gradient(135deg, #f5fcf8, #effaf4);
}

.aggregate-selected-metrics h3{
    margin:0 0 11px;
    color:#154b38;
    font-size:13px;
}

.aggregate-selected-metrics p{
    margin:0;
    color:#5d6b62;
    font-size:11px;
}

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

.aggregate-selected-grid article{
    padding:12px;
    border:1px solid #d7eadf;
    border-radius:11px;
    background:white;
}

.aggregate-selected-grid span,
.aggregate-selected-grid small{
    display:block;
}

.aggregate-selected-grid span{
    color:#607063;
    font-size:10px;
    font-weight:850;
    text-transform:uppercase;
}

.aggregate-selected-grid strong{
    display:block;
    margin:5px 0;
    color:#123c2e;
    font-size:15px;
}

.aggregate-selected-grid small{
    color:#6e7c72;
    font-size:10px;
    line-height:1.4;
}

.aggregate-indicator-proposal{
    margin-top:13px;
    padding:15px;
    border:1px solid #c9d8ff;
    border-radius:14px;
    background:linear-gradient(135deg, #f7f9ff, #eef4ff);
}

.aggregate-indicator-title{
    display:flex;
    justify-content:space-between;
    gap:14px;
    align-items:flex-start;
    margin-bottom:11px;
}

.aggregate-indicator-title h3{
    margin:0 0 5px;
    color:#19356d;
    font-size:13px;
}

.aggregate-indicator-title p{
    margin:0;
    color:#5c6983;
    font-size:11px;
    line-height:1.45;
}

.aggregate-indicator-title > span{
    flex:0 0 auto;
    padding:7px 10px;
    border-radius:999px;
    color:#1f3d88;
    background:#dfe8ff;
    font-size:11px;
    font-weight:850;
    white-space:nowrap;
}

.aggregate-indicator-rules{
    display:flex;
    flex-wrap:wrap;
    gap:7px;
    margin-bottom:13px;
}

.aggregate-indicator-rules span{
    padding:6px 9px;
    border:1px solid #d8e2fb;
    border-radius:999px;
    color:#4e5d7a;
    background:white;
    font-size:10px;
    line-height:1.35;
}

.aggregate-indicator-columns{
    display:grid;
    grid-template-columns:1fr;
    gap:13px;
}

.aggregate-indicator-columns h4{
    margin:0 0 8px;
    color:#24324e;
    font-size:12px;
}

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

.aggregate-objective-card{
    margin-top:13px;
    padding:16px;
    border:1px solid #bcd6ce;
    border-radius:14px;
    background:linear-gradient(135deg, #f4fbf8, #eef8f4);
}

.aggregate-objective-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
}

.aggregate-objective-head span{
    display:block;
    margin-bottom:5px;
    color:#39715d;
    font-size:10px;
    font-weight:850;
    text-transform:uppercase;
}

.aggregate-objective-head h3{
    margin:0;
    color:#153f31;
    font-size:16px;
}

.aggregate-objective-head strong{
    padding:5px 9px;
    border-radius:999px;
    color:#116044;
    background:#d7f0e5;
    font-size:10px;
    white-space:nowrap;
}

.aggregate-objective-card > p{
    margin:10px 0 13px;
    color:#405d53;
    font-size:12px;
    line-height:1.55;
}

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

.aggregate-objective-card dl div{
    padding:9px 10px;
    border:1px solid #d7e9e2;
    border-radius:10px;
    background:rgba(255,255,255,.72);
}

.aggregate-objective-card dt{
    color:#6b7f77;
    font-size:9px;
    font-weight:850;
    text-transform:uppercase;
}

.aggregate-objective-card dd{
    margin:4px 0 0;
    color:#263d35;
    font-size:11px;
    line-height:1.4;
}

.aggregate-source-file{
    display:block;
    margin-top:5px;
    color:#7c8798;
    font-size:9px;
}

.aggregate-excluded{
    margin-top:14px;
    padding:12px;
    border:1px solid #eadfc5;
    border-radius:12px;
    background:#fffdf8;
}

.aggregate-excluded summary{
    color:#72551b;
    cursor:pointer;
    font-size:11px;
    font-weight:800;
}

.aggregate-excluded[open] summary{
    margin-bottom:10px;
}

.aggregate-ai-assessment{
    padding:15px;
    border:1px solid #dce4ef;
    border-radius:13px;
    background:linear-gradient(180deg, #fbfcff, #f6f9fd);
}

.aggregate-ai-assessment h3{
    margin:5px 0 10px;
    color:#1f3150;
    font-size:16px;
}

.aggregate-ai-assessment h4{
    margin:15px 0 7px;
    color:#304766;
    font-size:12px;
}

.aggregate-ai-assessment p,
.aggregate-ai-assessment li{
    color:#536178;
    font-size:11px;
    line-height:1.55;
}

.aggregate-ai-assessment p{
    margin:0;
}

.aggregate-ai-assessment ul{
    margin:0;
    padding-left:18px;
}

.aggregate-indicator-card{
    padding:12px;
    border:1px solid #d9e4f8;
    border-radius:12px;
    background:white;
    box-shadow:0 6px 18px rgba(35, 57, 108, .06);
}

.aggregate-indicator-card-review{
    border-color:#f0dfb8;
    background:#fffdf7;
}

.aggregate-indicator-head{
    display:flex;
    justify-content:space-between;
    gap:10px;
    align-items:center;
    margin-bottom:7px;
}

.aggregate-indicator-head span{
    color:#5f6d86;
    font-size:10px;
    font-weight:850;
    text-transform:uppercase;
}

.aggregate-indicator-head strong{
    padding:4px 7px;
    border-radius:999px;
    color:#164f3b;
    background:#ddf4e8;
    font-size:10px;
}

.aggregate-indicator-card-review .aggregate-indicator-head strong{
    color:#78520c;
    background:#fff0c8;
}

.aggregate-indicator-card h4{
    margin:0 0 6px;
    color:#1c2e50;
    font-size:13px;
}

.aggregate-indicator-card p{
    margin:0 0 6px;
    color:#213657;
    font-size:12px;
    font-weight:750;
    line-height:1.45;
}

.aggregate-indicator-card small{
    display:block;
    color:#6a768a;
    font-size:10px;
    line-height:1.45;
}

.aggregate-indicator-card ul{
    margin:8px 0 0;
    padding:8px 0 0;
    border-top:1px solid #edf2fb;
    list-style:none;
}

.aggregate-indicator-card li{
    display:grid;
    grid-template-columns:110px 1fr;
    gap:7px;
    margin-top:6px;
    color:#66748a;
    font-size:10px;
    line-height:1.4;
}

.aggregate-indicator-card li b{
    color:#334761;
}

.aggregate-indicator-empty{
    margin:0;
    padding:12px;
    border:1px dashed #c9d6ec;
    border-radius:11px;
    color:#647086;
    background:white;
    font-size:11px;
}

.aggregate-warning-list h3{
    margin:0 0 9px;
    color:#6d4707;
    font-size:12px;
}

.aggregate-warning{
    display:flex;
    gap:6px;
    padding:8px 0;
    border-top:1px solid rgba(182, 107, 8, .15);
    color:#5f4a22;
    font-size:11px;
    line-height:1.45;
}

.aggregate-warning:first-of-type{
    border-top:0;
}

.aggregate-table-wrap{
    width:100%;
    overflow:auto;
    border:1px solid #e0e7f1;
    border-radius:12px;
}

.aggregate-table{
    width:100%;
    min-width:900px;
    border-collapse:collapse;
    background:white;
}

.aggregate-table th,
.aggregate-table td{
    padding:10px 11px;
    border-bottom:1px solid #edf1f6;
    color:#37445a;
    font-size:11px;
    line-height:1.45;
    text-align:left;
    vertical-align:top;
}

.aggregate-table th{
    position:sticky;
    top:0;
    z-index:1;
    color:#22304a;
    background:#f5f8fc;
    font-size:10px;
    font-weight:850;
    text-transform:uppercase;
}

.aggregate-status{
    display:inline-flex;
    align-items:center;
    padding:5px 8px;
    border-radius:999px;
    color:#0f7650;
    background:#dff5eb;
    font-size:10px;
    font-weight:800;
    white-space:nowrap;
}

.aggregate-status.missing{
    color:#9d2d3a;
    background:var(--red-soft);
}

.aggregate-group-card{
    margin-bottom:13px;
    padding:14px;
    border:1px solid #dce4ef;
    border-radius:13px;
    background:#fbfcfe;
}

.aggregate-group-card h3{
    margin:0 0 10px;
}

.aggregate-group-item{
    padding:10px 0;
    border-top:1px solid #edf1f6;
}

.aggregate-group-item:first-of-type{
    border-top:0;
}

.aggregate-group-item strong{
    display:flex;
    justify-content:space-between;
    gap:10px;
    color:#26364f;
    font-size:12px;
}

.aggregate-group-item strong span{
    color:#245b96;
    font-weight:750;
    white-space:nowrap;
}

.aggregate-group-item p{
    margin:7px 0;
    color:#536178;
    font-size:11px;
    line-height:1.5;
}

.aggregate-group-item small{
    color:#7b8798;
    font-size:10px;
}

.aggregate-draft-card{
    padding:14px;
    border:1px solid #dce4ef;
    border-radius:13px;
    background:#fbfcfe;
}

.aggregate-draft-card textarea{
    width:100%;
    box-sizing:border-box;
    padding:14px;
    border:1px solid #d5deea;
    border-radius:10px;
    color:#1d2738;
    background:white;
    font-family:"Times New Roman", serif;
    font-size:15px;
    line-height:1.55;
    resize:vertical;
}

.aggregate-draft-card p{
    margin:9px 0 0;
    color:#6a7689;
    font-size:11px;
}

.scan-word-control .incoming-defaults-card{
    margin:14px 0 18px;
}

.scan-word-minimal-form{
    grid-template-columns:minmax(0, 1fr);
    align-items:end;
}

.scan-word-image-order{
    display:grid;
    gap:10px;
    margin-top:12px;
}

.scan-word-image-order[hidden]{
    display:none !important;
}

.scan-word-image-order-heading{
    color:var(--muted);
    font-size:13px;
    font-weight:800;
}

.scan-word-image-card{
    display:grid;
    grid-template-columns:auto 58px minmax(0, 1fr) auto;
    gap:10px;
    align-items:center;
    min-height:78px;
    padding:8px 10px;
    border:1px solid rgba(204, 214, 228, 0.95);
    border-radius:8px;
    background:#fff;
    cursor:grab;
}

.scan-word-image-card.is-dragging{
    opacity:.58;
}

.scan-word-image-card.is-drag-over{
    border-color:var(--accent);
    box-shadow:0 0 0 3px rgba(58, 111, 248, 0.12);
}

.scan-word-image-page{
    min-width:54px;
    color:var(--navy-dark);
    font-size:13px;
}

.scan-word-image-thumb-button{
    width:58px;
    height:72px;
    padding:0;
    border:0;
    border-radius:6px;
    background:transparent;
    cursor:zoom-in;
}

.scan-word-image-thumb{
    width:58px;
    height:72px;
    border:1px solid rgba(204, 214, 228, 0.95);
    border-radius:6px;
    object-fit:cover;
    background:#f7f9fc;
}

.scan-word-image-meta{
    display:grid;
    gap:2px;
    min-width:0;
}

.scan-word-image-meta span{
    overflow:hidden;
    color:var(--navy-dark);
    font-size:13px;
    font-weight:800;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.scan-word-image-meta small{
    color:var(--muted);
    font-size:12px;
}

.scan-word-image-actions{
    display:flex;
    gap:6px;
    flex-wrap:wrap;
    justify-content:flex-end;
}

.scan-word-image-actions button{
    min-height:30px;
    padding:5px 8px;
    border:1px solid rgba(204, 214, 228, 0.95);
    border-radius:6px;
    background:#f8fafc;
    color:var(--navy-dark);
    font-size:12px;
    font-weight:800;
    cursor:pointer;
}

.scan-word-image-actions button:disabled{
    cursor:not-allowed;
    opacity:.45;
}

.scan-word-image-modal{
    position:fixed;
    inset:0;
    z-index:1200;
    display:grid;
    place-items:center;
    padding:24px;
}

.scan-word-image-modal[hidden]{
    display:none !important;
}

.scan-word-image-modal-backdrop{
    position:absolute;
    inset:0;
    background:rgba(10, 20, 38, 0.72);
}

.scan-word-image-modal-panel{
    position:relative;
    display:grid;
    grid-template-rows:auto minmax(0, 1fr);
    width:min(94vw, 980px);
    max-height:92vh;
    overflow:hidden;
    border-radius:8px;
    background:#fff;
    box-shadow:0 24px 80px rgba(15, 23, 42, 0.32);
}

.scan-word-image-modal-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    padding:12px 14px;
    border-bottom:1px solid rgba(204, 214, 228, 0.9);
}

.scan-word-image-modal-head strong{
    min-width:0;
    overflow:hidden;
    color:var(--navy-dark);
    font-size:15px;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.scan-word-image-modal-head button{
    width:34px;
    height:34px;
    border:1px solid rgba(204, 214, 228, 0.95);
    border-radius:6px;
    background:#f8fafc;
    color:var(--navy-dark);
    font-size:20px;
    font-weight:800;
    cursor:pointer;
}

.scan-word-image-modal-body{
    min-height:0;
    overflow:auto;
    padding:16px;
    background:#eef2f7;
}

.scan-word-image-modal-body img{
    display:block;
    max-width:100%;
    height:auto;
    margin:0 auto;
    background:#fff;
    box-shadow:0 8px 28px rgba(15, 23, 42, 0.18);
}

.scan-word-workspace{
    display:grid;
    grid-template-columns:minmax(0, 1fr);
    gap:18px;
    margin-top:18px;
}

.scan-word-source-panel{
    display:none;
}

.scan-word-source-panel,
.scan-word-result-panel{
    min-width:0;
    border:1px solid rgba(204, 214, 228, 0.9);
    border-radius:var(--radius);
    background:var(--surface);
    box-shadow:var(--shadow-soft);
}

.scan-word-source-panel .panel-header,
.scan-word-result-panel .panel-header{
    border-bottom:1px solid rgba(204, 214, 228, 0.72);
}

.scan-word-source-preview{
    display:grid;
    min-height:380px;
    height:min(58vh, 620px);
    margin:16px;
    place-items:center;
    overflow:auto;
    border:1px solid rgba(204, 214, 228, 0.82);
    border-radius:12px;
    background:#f7f9fc;
}

.scan-word-source-preview object,
.scan-word-source-preview img{
    width:100%;
    height:100%;
    border:0;
}

.scan-word-source-preview img{
    object-fit:contain;
}

.scan-word-text-panel{
    margin:0 16px 16px;
}

.scan-word-text-panel h3{
    margin:0 0 8px;
    color:var(--navy-dark);
    font-size:15px;
}

.scan-word-text-panel pre{
    max-height:300px;
    margin:0;
    overflow:auto;
    white-space:pre-wrap;
    word-break:break-word;
    border:1px solid rgba(204, 214, 228, 0.82);
    border-radius:12px;
    background:#fbfcff;
    color:#2c374a;
    font-family:"Times New Roman", serif;
    font-size:14px;
    line-height:1.55;
    padding:14px;
}

.scan-word-result-panel .aggregate-overview,
.scan-word-result-panel .aggregate-section{
    margin:16px;
}

#scanWordWarnings{
    display:none !important;
}

.scan-word-subject{
    display:grid;
    gap:4px;
    margin-top:12px;
    padding:12px 14px;
    border:1px solid rgba(204, 214, 228, 0.78);
    border-radius:12px;
    background:#f8fafc;
}

.scan-word-subject span{
    color:var(--muted);
    font-size:12px;
    font-weight:800;
    text-transform:uppercase;
}

.scan-word-subject strong{
    color:var(--navy-dark);
    font-size:15px;
    line-height:1.35;
}

.scan-word-preview{
    min-height:680px;
    margin:16px;
}

@media (max-width: 1100px){
    .scan-word-workspace{
        grid-template-columns:1fr;
    }

    .scan-word-source-preview{
        height:min(55vh, 520px);
    }
}

@media (max-width: 700px){
    .scan-word-image-card{
        grid-template-columns:auto 52px minmax(0, 1fr);
    }

    .scan-word-image-actions{
        grid-column:1 / -1;
        justify-content:flex-start;
    }
}

.standard-template-modal{
    position:relative;
    width:min(980px, calc(100% - 24px));
    max-height:calc(100vh - 32px);
    overflow:auto;
    padding:28px;
    border:1px solid var(--line);
    border-radius:18px;
    background:white;
    box-shadow:0 24px 70px rgba(17, 35, 67, .24);
}

.standard-template-heading{
    padding-right:38px;
}

.standard-template-heading h2{
    margin:5px 0 7px;
    color:var(--navy-dark);
    font-size:22px;
}

.standard-template-heading p{
    margin:0;
    color:var(--muted);
    font-size:12px;
    line-height:1.5;
}

.standard-template-note{
    margin:17px 0;
    padding:11px 13px;
    border:1px solid #e9d89c;
    border-radius:10px;
    color:#76510c;
    background:var(--amber-soft);
    font-size:11px;
}

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

.standard-template-form .auth-error,
.standard-template-actions{
    grid-column:1 / -1;
}

.standard-template-actions{
    display:flex;
    gap:9px;
    padding-top:15px;
    border-top:1px solid var(--line);
}

.standard-template-result{
    display:grid;
    gap:14px;
}

.standard-template-result-hero{
    padding:16px;
    border:1px solid #bfd8ca;
    border-radius:13px;
    background:linear-gradient(145deg, #f4fbf7, #e8f7f0);
}

.standard-template-result-hero h3{
    margin:8px 0 6px;
    color:var(--navy-dark);
    font-size:18px;
}

.standard-template-result-hero p{
    margin:0 0 13px;
    color:#516076;
    font-size:12px;
    line-height:1.5;
}

.standard-template-result-section{
    padding:14px;
    border:1px solid var(--line);
    border-radius:12px;
    background:#fbfcfe;
}

.standard-template-result-section h4{
    margin:0 0 10px;
    color:#354157;
    font-size:12px;
    letter-spacing:.05em;
    text-transform:uppercase;
}

.standard-template-assessment,
.standard-template-empty{
    padding:11px 12px;
    border-radius:9px;
    color:#4e5b70;
    background:white;
    font-size:13px;
    line-height:1.55;
}

.standard-template-empty{
    color:#7b8798;
    background:#f0f3f8;
}

.standard-template-advice-card{
    display:grid;
    gap:8px;
    margin-top:10px;
    padding:12px;
    border:1px solid #e2e8f0;
    border-radius:10px;
    background:white;
}

.standard-template-advice-card h5{
    margin:5px 0 -3px;
    color:#536178;
    font-size:11px;
    letter-spacing:.04em;
    text-transform:uppercase;
}

.standard-template-reference-list{
    display:flex;
    flex-wrap:wrap;
    gap:7px;
}

.standard-template-reference-list span{
    padding:6px 9px;
    border-radius:999px;
    color:#174eaf;
    background:var(--blue-soft);
    font-size:11px;
    font-weight:750;
}

.admin-backdrop{
    align-items:flex-start;
    padding:24px;
    overflow-y:auto;
}

.admin-modal{
    position:relative;
    width:min(1480px, 100%);
    margin:auto;
    padding:28px;
    border:1px solid var(--line);
    border-radius:18px;
    background:#f7f9fc;
    box-shadow:0 24px 70px rgba(17, 35, 67, .24);
}

.admin-heading{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:20px;
    padding-right:42px;
}

.admin-heading h2{
    margin:5px 0 5px;
    color:var(--navy-dark);
    font-size:25px;
}

.admin-heading p,
.admin-section-heading p{
    margin:0;
    color:var(--muted);
    font-size:12px;
}

.admin-error{
    margin-top:18px;
    padding:11px 13px;
    border:1px solid #edc8ce;
    border-radius:10px;
    color:#9d2d3a;
    background:var(--red-soft);
    font-size:12px;
}

.admin-kpis{
    display:grid;
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap:14px;
    margin:22px 0;
}

.admin-kpi{
    padding:17px 18px;
    border:1px solid var(--line);
    border-radius:13px;
    background:white;
    box-shadow:var(--shadow-soft);
}

.admin-kpi span{
    display:block;
    color:var(--muted);
    font-size:11px;
    font-weight:700;
}

.admin-kpi strong{
    display:block;
    margin-top:7px;
    color:var(--navy-dark);
    font-size:26px;
}

.admin-kpi-warning{
    border-color:#ead28c;
    background:#fffaf0;
}

.admin-section{
    margin-top:16px;
    padding:18px;
    border:1px solid var(--line);
    border-radius:14px;
    background:white;
    box-shadow:var(--shadow-soft);
}

.admin-section-heading{
    margin-bottom:14px;
}

.admin-section-heading h3{
    margin:0 0 4px;
    color:var(--navy-dark);
    font-size:16px;
}

.admin-table-wrap{
    overflow-x:auto;
    border:1px solid #e4e9f1;
    border-radius:10px;
}

.admin-table{
    width:100%;
    border-collapse:collapse;
    color:#344156;
    font-size:11px;
}

.admin-table th{
    padding:10px 12px;
    color:#66748a;
    background:#f5f7fb;
    font-size:10px;
    font-weight:800;
    text-align:left;
    text-transform:uppercase;
    white-space:nowrap;
}

.admin-table td{
    padding:11px 12px;
    border-top:1px solid #e8edf4;
    vertical-align:middle;
}

.admin-table td strong,
.admin-table td small{
    display:block;
}

.admin-table td strong{
    color:#1f2d43;
}

.admin-table td small{
    margin-top:3px;
    color:#8792a4;
}

.admin-role,
.admin-unlimited,
.admin-payment-status{
    display:inline-block;
    padding:5px 8px;
    border-radius:999px;
    color:#315b9d;
    background:#edf3ff;
    font-size:10px;
    font-weight:800;
    white-space:nowrap;
}

.admin-role-owner,
.admin-unlimited,
.admin-payment-activated{
    color:#0f7650;
    background:var(--green-soft);
}

.admin-payment-awaiting_confirmation{
    color:#8a5d08;
    background:var(--amber-soft);
}

.admin-payment-expired{
    color:#9d2d3a;
    background:var(--red-soft);
}

.admin-payment-rejected,
.admin-payment-cancelled{
    color:#9d2d3a;
    background:var(--red-soft);
}

.admin-plan-select{
    min-width:175px;
    padding:7px 8px;
    border:1px solid var(--line);
    border-radius:8px;
    color:#334158;
    background:white;
    font:inherit;
}

.admin-actions{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    align-items:center;
}

.admin-action{
    margin:0;
    padding:7px 10px;
    border:0;
    border-radius:8px;
    color:#174eaf;
    background:var(--blue-soft);
    font-size:10px;
    font-weight:800;
    white-space:nowrap;
}

.admin-action-approve{
    color:#0f6648;
    background:#e4f6ee;
}

.admin-action-credit{
    color:#7a4b08;
    background:#fff3d8;
}

.admin-action-danger{
    color:#9d2d3a;
    background:var(--red-soft);
}

.admin-muted{
    color:#8b96a7;
    font-size:10px;
}

.admin-empty{
    padding:24px !important;
    color:var(--muted);
    text-align:center;
}

.admin-usage-section{
    border-color:#cfd9ff;
    background:linear-gradient(180deg,#ffffff 0%,#f8faff 100%);
}

.admin-usage-filters{
    display:grid;
    grid-template-columns:minmax(220px,1.3fr) repeat(2,minmax(190px,1fr)) auto;
    gap:10px;
    align-items:end;
    margin-bottom:14px;
    padding:12px;
    border:1px solid #e1e7f5;
    border-radius:14px;
    background:#fff;
}

.admin-user-tools{
    margin:0 0 14px;
}

.admin-user-tools label{
    display:block;
    max-width:520px;
}

.admin-user-tools span{
    display:block;
    margin-bottom:6px;
    color:#6f7a8e;
    font-size:10px;
    font-weight:900;
    letter-spacing:.04em;
    text-transform:uppercase;
}

.admin-user-tools input{
    width:100%;
    min-height:40px;
    padding:9px 11px;
    border:1px solid var(--line);
    border-radius:10px;
    color:#23314d;
    background:#fff;
    font:inherit;
}

.admin-usage-filters label,
.admin-usage-filter-actions{
    display:flex;
    flex-direction:column;
    gap:6px;
}

.admin-usage-filters span{
    color:#6f7a8e;
    font-size:10px;
    font-weight:900;
    letter-spacing:.04em;
    text-transform:uppercase;
}

.admin-usage-filters select,
.admin-usage-filters input{
    width:100%;
    min-height:38px;
    padding:8px 10px;
    border:1px solid var(--line);
    border-radius:10px;
    color:#23314d;
    background:#fff;
    font:inherit;
}

.admin-usage-filter-actions{
    flex-direction:row;
    align-items:center;
}

.admin-usage-kpis{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:10px;
    margin-bottom:14px;
}

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

.admin-usage-kpis article{
    padding:12px;
    border:1px solid #e1e7f5;
    border-radius:12px;
    background:white;
}

.admin-usage-kpis span,
.admin-usage-kpis strong{
    display:block;
}

.admin-usage-kpis span{
    color:#778399;
    font-size:10px;
    font-weight:800;
    text-transform:uppercase;
}

.admin-usage-kpis strong{
    margin-top:5px;
    color:var(--navy-dark);
    font-size:18px;
}

.history-list-toolbar{
    display:flex;
    flex-wrap:wrap;
    justify-content:space-between;
    align-items:center;
    gap:14px;
    margin-bottom:10px;
    padding:10px 2px;
}

.history-shown-text{
    color:#68758c;
    font-size:13px;
    white-space:nowrap;
}

.history-shown-text b{
    color:var(--navy-dark);
}

.history-retention-notice{
    margin:6px 0 0;
    color:#8490a3;
    font-size:12px;
}

.history-page-tabs{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    justify-content:flex-end;
    gap:7px;
    margin:0;
}

.history-page-tabs[hidden]{
    display:none;
}

.history-page-tabs:has(.pagination-summary){
    align-items:center;
    justify-content:space-between;
    flex:1;
    min-width:0;
}

.history-page-tab{
    min-width:38px;
    height:38px;
    padding:0 12px;
    border:1px solid #dfe6f1;
    border-radius:9px;
    color:#41506a;
    background:#fff;
    box-shadow:0 2px 8px rgba(30, 45, 75, .05);
    font-size:13px;
    font-weight:800;
    line-height:1;
    cursor:pointer;
    transition:border-color .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}

.history-page-tab:hover,
.history-page-tab.active{
    border-color:#4f63e8;
}

.history-page-tab.active{
    color:#fff;
    background:#4f63e8;
    box-shadow:0 8px 18px rgba(79, 99, 232, .24);
}

.history-page-tab:disabled{
    cursor:not-allowed;
    color:#b4bdcc;
    background:#f8fafc;
    box-shadow:none;
}

.history-page-ellipsis{
    display:inline-flex;
    min-width:28px;
    height:38px;
    align-items:center;
    justify-content:center;
    color:#8b97aa;
    font-size:13px;
    font-weight:800;
}

.admin-usage-table{
    min-width:1120px;
}

.user-usage-table{
    min-width:680px;
}

.user-usage-table th,
.user-usage-table td{
    vertical-align:middle;
}

.user-usage-status{
    display:inline-flex;
    align-items:center;
    min-height:25px;
    padding:3px 8px;
    border-radius:999px;
    color:#31527e;
    background:#edf3ff;
    font-size:12px;
    font-weight:800;
    white-space:nowrap;
}

.user-usage-status-file_expired{
    color:#8a5b1c;
    background:#fff3d7;
}

.user-usage-status-failed,
.user-usage-status-cancelled{
    color:#9a3b44;
    background:#ffedf0;
}

.user-usage-status-processing{
    color:#6c5799;
    background:#f2edff;
}

.user-usage-table td > .user-usage-status + small{
    display:block;
    margin-top:4px;
    color:#8490a3;
    font-size:11px;
}

.user-usage-actions{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    min-width:150px;
}

.user-usage-files-menu{
    flex-basis:100%;
}

.user-usage-files-menu > summary{
    width:max-content;
    max-width:100%;
    padding:6px 10px;
    border:1px solid #d8e1ef;
    border-radius:8px;
    color:#31527e;
    background:#f7f9fc;
    font-size:12px;
    font-weight:800;
    cursor:pointer;
}

.user-usage-files-list{
    display:grid;
    gap:9px;
    min-width:270px;
    max-width:420px;
    margin-top:7px;
    padding:10px;
    border:1px solid #e1e7f0;
    border-radius:10px;
    background:#fff;
    box-shadow:0 8px 22px rgba(24,44,75,.12);
}

.user-usage-file-item{
    display:grid;
    gap:6px;
    padding-bottom:8px;
    border-bottom:1px solid #edf0f5;
}

.user-usage-file-item:last-child{
    padding-bottom:0;
    border-bottom:0;
}

.user-usage-file-name{
    overflow-wrap:anywhere;
    color:#34445c;
    font-size:12px;
    font-weight:700;
}

.user-usage-file-buttons{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
}

.user-usage-no-action{
    color:#8490a3;
    font-weight:700;
}

.admin-usage-cost-breakdown{
    display:block;
    margin-top:4px;
    line-height:1.35;
    white-space:nowrap;
}

.admin-usage-table td > small,
.admin-usage-table td > span > small,
.admin-usage-table td > strong + small{
    display:block;
    margin-top:3px;
    color:#8490a3;
    font-size:11px;
    line-height:1.35;
}

.meeting-usage-toggle{
    display:block;
    margin-top:6px;
    padding:0;
    border:0;
    background:transparent;
    color:#4f63e8;
    font:inherit;
    font-size:12px;
    font-weight:800;
    cursor:pointer;
}

.meeting-usage-toggle:hover,
.meeting-usage-toggle:focus-visible{
    color:#273aaf;
    text-decoration:underline;
}

.meeting-usage-details-row > td{
    padding:0 14px 14px;
    background:#f7f9fc;
    border-top:0;
}

.meeting-usage-step-list{
    display:grid;
    gap:8px;
    padding:12px 0 2px 24px;
}

.meeting-usage-step-card{
    display:grid;
    grid-template-columns:minmax(220px,1.4fr) minmax(150px,1fr) minmax(90px,.55fr) minmax(180px,1fr) minmax(120px,.7fr);
    gap:12px;
    align-items:center;
    padding:12px 14px;
    border:1px solid #e1e7f0;
    border-radius:12px;
    background:#fff;
    box-shadow:0 3px 12px rgba(31,48,76,.04);
}

.meeting-usage-step-title,
.meeting-usage-step-field{
    min-width:0;
}

.meeting-usage-step-title{
    display:grid;
    grid-template-columns:30px minmax(0,1fr);
    column-gap:8px;
    align-items:center;
}

.meeting-usage-step-title > span{
    display:grid;
    width:26px;
    height:26px;
    place-items:center;
    border-radius:50%;
    background:#edf1ff;
    color:#4f63e8;
    font-size:11px;
    font-weight:900;
}

.meeting-usage-step-title > strong{
    min-width:0;
    color:#21344b;
    font-size:13px;
}

.meeting-usage-step-title > small{
    grid-column:2;
    margin-top:3px;
    color:#8792a3;
    font-size:11px;
}

.meeting-usage-step-field > span{
    display:block;
    margin-bottom:4px;
    color:#8a95a5;
    font-size:10px;
    font-weight:900;
    letter-spacing:.06em;
    text-transform:uppercase;
}

.meeting-usage-step-field > div{
    min-width:0;
    color:#2b3e55;
    font-size:12px;
    font-weight:700;
}

.meeting-usage-variant{
    display:block;
    line-height:1.45;
}

.meeting-usage-variant small,
.meeting-usage-step-field > div > small{
    display:block;
    margin-top:2px;
    color:#8792a3;
    font-size:10px;
    font-weight:600;
}

@media (max-width:900px){
    .meeting-usage-step-list{
        padding-left:0;
    }

    .meeting-usage-step-card{
        grid-template-columns:1fr 1fr;
    }

    .meeting-usage-step-title{
        grid-column:1 / -1;
    }
}

@media (max-width:620px){
    .affiliate-payout-card{padding:14px;}
    .affiliate-payout-card-heading{align-items:flex-start;}
    .affiliate-payout-metrics{grid-template-columns:repeat(2,minmax(0,1fr));}
    .affiliate-payout-history-card .admin-card-heading{padding-inline:14px;}
}

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

@media (max-width:640px){
    .insufficient-points-modal{
        padding:23px 15px 16px;
    }

    .insufficient-points-heading h2{
        font-size:21px;
    }

    .insufficient-points-heading p{
        font-size:12px;
    }

    .insufficient-points-plans{
        grid-template-columns:1fr;
    }

    .insufficient-points-actions,
    .insufficient-points-actions .btn{
        width:100%;
    }
}

@media (max-width:640px){
    .meeting-usage-step-card{
        grid-template-columns:1fr;
    }
}

/* Review Word Preview workspace: the document is the only scrolling surface. */
#reviewPreviewShell.review-preview-shell{
    display:flex;
    min-height:0;
    flex:1;
    flex-direction:column;
    overflow:hidden;
    border:1px solid #d7dfec;
    border-radius:12px;
    background:#e9edf3;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.8);
}

#reviewPreviewShell .review-preview-toolbar{
    position:relative;
    z-index:4;
    display:flex;
    flex:0 0 auto;
    align-items:center;
    flex-wrap:wrap;
    gap:8px;
    min-height:48px;
    padding:7px 10px;
    border:0;
    border-bottom:1px solid #d9e1ed;
    border-radius:0;
    background:rgba(255,255,255,.98);
    box-shadow:0 2px 9px rgba(22,36,69,.08);
}

#reviewPreviewShell .review-manual-toolbar{
    position:sticky;
    top:0;
}

#reviewPreviewShell .review-preview-toolbar-group{
    display:flex;
    min-width:0;
    align-items:center;
    gap:5px;
}

#reviewPreviewShell .review-preview-toolbar-edit-group{
    flex:1 1 auto;
}

#reviewPreviewShell .review-preview-toolbar-divider{
    width:1px;
    height:24px;
    flex:0 0 1px;
    background:#dce3ee;
}

#reviewPreviewShell .review-preview-toolbar button,
#reviewPreviewShell .review-manual-find-panel button{
    display:inline-flex;
    min-width:34px;
    min-height:32px;
    align-items:center;
    justify-content:center;
    gap:6px;
    padding:5px 9px;
    border:1px solid transparent;
    border-radius:7px;
    color:#27385d;
    background:transparent;
    font:750 12px/1.2 Inter,"Segoe UI",Arial,sans-serif;
    cursor:pointer;
    transition:background .15s ease,border-color .15s ease,color .15s ease,box-shadow .15s ease;
}

#reviewPreviewShell .review-preview-toolbar button:hover:not(:disabled),
#reviewPreviewShell .review-preview-toolbar button:focus-visible,
#reviewPreviewShell .review-manual-find-panel button:hover:not(:disabled),
#reviewPreviewShell .review-manual-find-panel button:focus-visible{
    border-color:#cbd6ff;
    color:#3d51c6;
    background:#f1f4ff;
    box-shadow:0 2px 7px rgba(70,88,186,.1);
}

#reviewPreviewShell .review-preview-toolbar button:disabled{
    color:#9aa6b9;
    background:transparent;
    cursor:not-allowed;
    opacity:.58;
}

#reviewPreviewShell .review-preview-toolbar-icon{
    color:currentColor;
    font-size:18px;
    font-weight:500;
    line-height:1;
}

#reviewPreviewShell .review-manual-toolbar-state{
    min-height:30px;
    max-width:280px;
    overflow:hidden;
    padding:6px 9px;
    text-overflow:ellipsis;
    white-space:nowrap;
}

#reviewPreviewShell .review-manual-save-status{
    min-height:30px;
    margin-right:auto;
    padding:6px 2px;
    white-space:nowrap;
}

#reviewPreviewShell .review-preview-viewport{
    display:flex;
    min-height:0;
    flex:1;
    overflow:hidden;
    background:#e9edf3;
}

#reviewPreviewShell #wordPreview{
    width:100%;
    min-height:0;
    max-height:none;
    flex:1;
    overflow:auto;
    padding:26px 18px 34px;
    background:#e5e9ef;
    scrollbar-width:thin;
    scrollbar-color:#aeb9c9 transparent;
}

#reviewPreviewShell .review-preview-document{
    display:block;
    box-sizing:border-box;
    width:100%;
    min-height:100%;
    transform-origin:top center;
}

#reviewPreviewShell .review-preview-document .docx-wrapper{
    box-sizing:border-box;
    min-width:100%;
    padding:0;
    background:transparent;
}

#reviewPreviewShell .review-preview-document .docx-wrapper > section.docx{
    margin-right:auto;
    margin-left:auto;
    border:1px solid rgba(190,199,213,.65);
    box-shadow:0 7px 22px rgba(30,45,75,.14);
}

#reviewPreviewShell .review-manual-compare-panel{
    z-index:3;
    flex:0 0 auto;
    max-height:180px;
    overflow:auto;
    border:0;
    border-bottom:1px solid #d9e1ed;
    box-shadow:0 2px 7px rgba(30,45,75,.05);
}

#reviewPreviewShell .review-preview-statusbar{
    display:none;
    box-sizing:border-box;
    height:44px;
    min-height:44px;
    flex:0 0 auto;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:5px 11px;
    border-top:1px solid #d3dce9;
    color:#5d6b82;
    background:#fff;
    font:650 11px/1.2 Inter,"Segoe UI",Arial,sans-serif;
}

#reviewPreviewShell .review-preview-status-group{
    display:flex;
    min-width:0;
    align-items:center;
    gap:8px;
}

#reviewPreviewShell .review-preview-document-stats{
    overflow:hidden;
    white-space:nowrap;
}

#reviewPreviewShell .review-preview-status-divider{
    width:1px;
    height:15px;
    flex:0 0 1px;
    background:#dbe2ec;
}

#reviewPreviewShell .review-preview-view-controls{
    flex:0 0 auto;
}

#reviewPreviewShell .review-preview-view-controls > button{
    display:inline-grid;
    width:28px;
    min-width:28px;
    height:28px;
    min-height:28px;
    place-items:center;
    padding:0;
    border:1px solid #d5deeb;
    border-radius:6px;
    color:#3b4b69;
    background:#fff;
    font:800 16px/1 Inter,"Segoe UI",Arial,sans-serif;
    cursor:pointer;
}

#reviewPreviewShell .review-preview-view-controls > button:last-child{
    margin-left:2px;
    font-size:15px;
}

#reviewPreviewShell #reviewPreviewZoomValue{
    min-width:40px;
    color:#27385d;
    font-weight:800;
    text-align:right;
}

#reviewPreviewShell #reviewPreviewZoomSlider{
    width:92px;
    accent-color:#4f63e8;
    cursor:pointer;
}

#reviewPreviewShell #reviewPreviewFitMode{
    min-height:28px;
    padding:0 22px 0 7px;
    border:1px solid #d5deeb;
    border-radius:6px;
    color:#465674;
    background:#fff;
    font:700 10px/1 Inter,"Segoe UI",Arial,sans-serif;
}

#reviewWorkspace:fullscreen,
#reviewWorkspace.is-fullscreen{
    width:100vw;
    height:100dvh;
    min-height:100dvh;
    border:0;
    border-radius:0;
    background:#e5e9ef;
    overflow:hidden;
}

#reviewWorkspace:fullscreen::backdrop{
    background:#e5e9ef;
}

#reviewWorkspace:fullscreen .left-panel,
#reviewWorkspace:fullscreen .ai-panel,
#reviewWorkspace.is-fullscreen .left-panel,
#reviewWorkspace.is-fullscreen .ai-panel{
    height:100dvh;
    min-height:0;
}

#reviewWorkspace:fullscreen .ai-panel,
#reviewWorkspace.is-fullscreen .ai-panel{
    position:relative;
    top:0;
}

#reviewWorkspace:fullscreen .review-preview-toolbar,
#reviewWorkspace:fullscreen .review-preview-statusbar,
#reviewWorkspace.is-fullscreen .review-preview-toolbar,
#reviewWorkspace.is-fullscreen .review-preview-statusbar{
    flex-shrink:0;
}

#reviewWorkspace:fullscreen #reviewPreviewShell .review-preview-statusbar,
#reviewWorkspace.is-fullscreen #reviewPreviewShell .review-preview-statusbar{
    display:flex;
}

@media (max-width:760px){
    #reviewPreviewShell .review-preview-toolbar{
        gap:5px;
        padding:6px;
    }

    #reviewPreviewShell .review-preview-toolbar-label{
        display:none;
    }

    #reviewPreviewShell .review-preview-toolbar button{
        width:32px;
        padding:5px;
    }

    #reviewPreviewShell .review-manual-toolbar-state{
        max-width:160px;
        font-size:10px;
    }

    #reviewPreviewShell .review-manual-save-status{
        display:none;
    }

    #reviewPreviewShell .review-preview-document-stats{
        display:none;
    }

    #reviewPreviewShell .review-preview-statusbar{
        justify-content:flex-end;
    }
}

@media (max-width:430px){
    #reviewPreviewShell .review-preview-toolbar-divider{
        height:20px;
    }

    #reviewPreviewShell #reviewPreviewZoomSlider{
        width:62px;
    }

    #reviewPreviewShell #reviewPreviewFitMode{
        max-width:82px;
    }
}

body.support-widget-visible{
    padding-bottom:74px;
}

body.support-widget-visible.support-widget-expanded{
    padding-bottom:190px;
}

body.support-widget-visible.guide-page-active{
    padding-bottom:18px;
}

body.support-widget-visible.support-widget-expanded.guide-page-active{
    padding-bottom:190px;
}

@media (min-width:641px){
    body.support-widget-visible,
    body.support-widget-visible.support-widget-expanded,
    body.support-widget-visible.guide-page-active,
    body.support-widget-visible.support-widget-expanded.guide-page-active{
        padding-bottom:0;
    }
}

body.guide-page-active .app-shell{
    margin-bottom:8px;
}

body.support-widget-visible #reviewAssistantPanel .ai-panel{
    padding-bottom:74px;
}

body.support-widget-visible.support-widget-expanded #reviewAssistantPanel .ai-panel{
    padding-bottom:190px;
}

.support-widget{
    position:fixed;
    right:clamp(20px, 2.2vw, 24px);
    left:auto;
    bottom:max(20px, env(safe-area-inset-bottom));
    z-index:80;
    display:grid;
    justify-items:end;
    width:max-content;
    max-width:calc(100vw - 40px);
    pointer-events:none;
}

.support-widget-toggle-button,
.support-widget-close,
.support-action{
    pointer-events:auto;
}

.support-widget-toggle-button{
    display:grid;
    width:56px;
    height:56px;
    min-width:56px;
    min-height:56px;
    place-items:center;
    padding:0;
    border:1px solid rgba(255,255,255,.34);
    border-radius:50%;
    color:#fff;
    background:linear-gradient(145deg, #6c7bff, #4d55df);
    box-shadow:0 12px 26px rgba(56, 68, 178, .3), inset 0 1px 0 rgba(255,255,255,.24);
    cursor:pointer;
    transition:transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.support-widget-toggle-button:hover{
    transform:translateY(-2px);
    filter:saturate(1.08) brightness(1.04);
    box-shadow:0 16px 30px rgba(56, 68, 178, .34), inset 0 1px 0 rgba(255,255,255,.3);
}

.support-widget-toggle-button:active{
    transform:translateY(0);
}

.support-widget-toggle-button:focus-visible{
    outline:3px solid rgba(108,123,255,.48);
    outline-offset:4px;
}

.support-widget-headset-icon{
    display:block;
    width:31px;
    height:31px;
}

.support-widget-panel-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    min-height:24px;
    padding:0 2px 2px 4px;
    color:#253b69;
}

.support-widget-panel-head strong{
    font-size:13px;
    font-weight:800;
    line-height:1.2;
}

.support-widget-close{
    display:grid;
    flex:none;
    width:28px;
    height:28px;
    min-height:0;
    place-items:center;
    padding:0;
    border:1px solid #d9e3f1;
    border-radius:9px;
    color:#78818c;
    background:#fff;
    box-shadow:0 3px 10px rgba(18, 52, 99, .08);
    line-height:1;
    cursor:pointer;
    transition:color .14s ease;
}

.support-widget-close:hover{
    color:#4d5662;
}

.support-widget-close:active{
    color:#414a55;
}

.support-widget-close:focus-visible{
    outline:2px solid #275dad;
    outline-offset:2px;
}

.support-widget-close-icon{
    display:block;
    width:12px;
    height:12px;
}

.support-widget-panel{
    position:absolute;
    right:0;
    left:auto;
    bottom:calc(100% + 8px);
    display:grid;
    gap:8px;
    width:min(248px, calc(100vw - 40px));
}

.support-widget-panel[hidden]{
    display:none;
}

.support-action{
    display:flex;
    align-items:center;
    gap:11px;
    width:100%;
    min-height:54px;
    padding:7px 13px;
    border:1px solid transparent;
    border-radius:14px;
    color:#fff;
    text-decoration:none;
    box-shadow:0 9px 22px rgba(18, 52, 99, .18);
    transition:transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.support-action:hover{
    color:#fff;
    transform:translateY(-2px);
    filter:saturate(1.08);
    box-shadow:0 12px 26px rgba(18, 52, 99, .24);
}

.support-action-hotline{
    background:linear-gradient(135deg, #159a68, #08754d);
}

.support-action-zalo{
    background:linear-gradient(135deg, #087be8, #0755ad);
}

.support-action-icon{
    display:grid;
    width:32px;
    height:32px;
    flex:0 0 32px;
    place-items:center;
    border-radius:10px;
    color:currentColor;
    background:rgba(255,255,255,.17);
}

.support-action-icon svg{
    width:19px;
    height:19px;
    fill:currentColor;
}

.support-action-icon-zalo{
    border-radius:9px;
    color:#0755ad;
    background:#fff;
}

.support-action-icon-zalo svg{
    width:22px;
    height:22px;
}

.support-action-copy{
    display:grid;
    min-width:0;
    gap:1px;
}

.support-action-copy small{
    color:rgba(255,255,255,.78);
    font-size:10px;
    line-height:1.2;
}

.support-action-copy strong{
    overflow:hidden;
    color:#fff;
    font-size:13px;
    line-height:1.25;
    text-overflow:ellipsis;
    white-space:nowrap;
}

::-webkit-scrollbar{
    width:9px;
    height:9px;
}

::-webkit-scrollbar-thumb{
    border:2px solid transparent;
    border-radius:999px;
    background:#b8c3d2;
    background-clip:padding-box;
}

::-webkit-scrollbar-track{
    background:transparent;
}

@media (max-width:1180px){
    .workspace{
        grid-template-columns:1fr;
        gap:18px;
    }

    .workspace-resize-handle{
        display:none;
    }

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

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

    .home-hero-art img{
        max-width:680px;
        max-height:240px;
    }

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

    .billing-overview{
        grid-template-columns:1fr;
    }

    .billing-overview-actions{
        min-width:0;
        flex-direction:row;
        justify-content:flex-start;
    }

    .service-plan-grid,
    .unit-plan-panel,
    .point-explainer{
        grid-template-columns:1fr;
    }

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

    .affiliate-link-row{
        grid-template-columns:1fr;
    }

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

    .affiliate-tier-progress-label{
        align-items:flex-start;
        flex-direction:column;
        gap:4px;
    }

    .left-panel,
    .ai-panel{
        height:auto;
        position:static;
        min-height:0;
        max-height:none;
    }

    .result-content{
        max-height:none;
    }

    .word-preview{
        min-height:520px;
        max-height:none;
    }

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

    .payment-layout{
        grid-template-columns:1fr;
    }

    .incoming-workspace,
    .legal-dossier-grid,
    .legal-dossier-workspace,
    .criminal-dossier-grid,
    .criminal-dossier-workspace{
        grid-template-columns:1fr;
    }

    .directive-preview-toolbar{
        align-items:stretch;
        flex-direction:column;
    }

    .directive-draft-entry{
        width:100%;
        align-items:stretch;
        flex-direction:column;
    }

    .directive-draft-tab,
    .directive-draft-handoff{
        width:100%;
        max-width:none;
        justify-content:center;
    }

    .directive-word-preview{
        height:auto;
        min-height:560px;
    }

    .incoming-summary-panel{
        position:static;
    }

    .aggregate-workspace{
        grid-template-columns:1fr;
    }

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

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

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

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

    .payment-qr-card{
        display:none;
    }
}

@media (max-width:1400px){
    .app-header{
        position:sticky;
        min-height:60px;
        padding:8px 14px;
        box-shadow:0 4px 18px rgba(11, 36, 74, 0.18);
    }

    .brand-subtitle,
    .header-badges,
    #accountName{
        display:none;
    }

    .mobile-menu-button{
        display:grid;
    }

    .module-navigation{
        position:fixed;
        top:0;
        right:0;
        bottom:0;
        left:auto;
        z-index:190;
        width:min(86vw, 370px);
        margin:0;
        padding:22px 22px 28px;
        border:0;
        border-left:1px solid rgba(207, 216, 230, .95);
        border-radius:24px 0 0 24px;
        flex-direction:column;
        align-items:stretch;
        flex-wrap:nowrap;
        gap:10px;
        overflow-y:auto;
        overflow-x:hidden;
        background:#fff;
        box-shadow:-24px 0 60px rgba(15, 23, 42, .22);
        transform:translateX(106%);
        opacity:0;
        pointer-events:none;
        transition:transform .22s ease, opacity .22s ease;
        scrollbar-width:thin;
        scrollbar-color:#c6d2e6 transparent;
    }

    .app-shell{
        margin-top:18px;
    }

    .module-navigation.open{
        transform:translateX(0);
        opacity:1;
        pointer-events:auto;
    }

    .mobile-drawer-head{
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:16px;
        padding-bottom:14px;
        margin-bottom:4px;
        border-bottom:1px solid #edf1f7;
    }

    .mobile-drawer-head strong,
    .mobile-drawer-head span{
        display:block;
    }

    .mobile-drawer-head strong{
        color:var(--navy-dark);
        font-size:22px;
        line-height:1.2;
    }

    .mobile-drawer-head span{
        margin-top:3px;
        color:var(--muted);
        font-size:12px;
    }

    .mobile-drawer-head button{
        display:grid;
        width:42px;
        height:42px;
        place-items:center;
        border:0;
        border-radius:14px;
        color:#667085;
        background:#f3f6fb;
        font-size:28px;
        line-height:1;
    }

    .module-tab{
        justify-content:flex-start;
        width:100%;
        min-height:44px;
        padding:0 12px;
        border:1px solid #eef2f7;
        border-radius:14px;
        color:#536178;
        background:#fff;
        text-align:left;
    }

    .module-tab:hover,
    .module-tab.active{
        border-color:#d6e0f4;
        color:var(--navy-dark);
        background:#f2f6ff;
    }

    .module-menu-group{
        width:100%;
        padding:12px 0 4px;
        border-top:1px solid #edf1f7;
    }

    .module-menu-trigger{
        height:auto;
        min-height:auto;
        padding:0 4px 4px;
        border:0;
        color:#98a1b3;
        background:transparent;
        box-shadow:none;
        font-size:11px;
        letter-spacing:.1em;
        text-transform:uppercase;
        pointer-events:none;
    }

    .module-menu-trigger span{
        display:none;
    }

    .module-menu-dropdown,
    .module-menu-dropdown-small{
        position:static;
        display:grid;
        width:100%;
        gap:7px;
        padding:7px 0 0;
        border:0;
        border-radius:0;
        background:transparent;
        box-shadow:none;
    }

    .module-menu-item{
        border:1px solid #eef2f7;
        background:#fff;
    }
}

@media (max-width:760px){
    .app-header{
        position:sticky;
        min-height:58px;
        padding:8px 12px;
    }

    .brand-subtitle,
    .header-badges,
    #accountName{
        display:none;
    }

    .mobile-menu-button{
        display:grid;
    }

    .app-shell{
        width:min(100% - 20px, 1900px);
        margin-top:12px;
    }

    .control-card{
        padding:18px 15px;
    }

    .form-grid,
    .rule-findings-list,
    .pricing-grid{
        grid-template-columns:1fr;
    }

    .directive-structured-grid{
        grid-template-columns:1fr;
    }

    .directive-structured-heading{
        flex-direction:column;
    }

    .home-hero{
        padding:14px;
    }

    .home-hero h1{
        font-size:26px;
    }

    .home-feature-grid,
    .portal-card-grid,
    .affiliate-overview,
    .guide-steps{
        grid-template-columns:1fr;
    }

    .billing-overview{
        padding:14px;
        border-radius:18px;
    }

    .billing-overview-stats,
    .service-plan-features-wide{
        grid-template-columns:1fr;
    }

    .billing-overview-actions,
    .plan-picker-heading{
        align-items:stretch;
        flex-direction:column;
    }

    .plan-segmented{
        width:100%;
    }

    .plan-segmented button{
        flex:1 1 130px;
    }

    .service-plan-card,
    .unit-plan-copy,
    .point-explainer{
        border-radius:16px;
        padding:16px;
    }

    .aggregate-kpis,
    .aggregate-stat-grid,
    .aggregate-selected-grid,
    .aggregate-indicator-columns{
        grid-template-columns:1fr;
    }

    .aggregate-indicator-title{
        flex-direction:column;
    }

    .aggregate-review-heading{
        flex-direction:column;
    }

    .aggregate-indicator-editor-row{
        grid-template-columns:1fr;
    }

    .aggregate-indicator-toggle{
        justify-self:start;
    }

    .aggregate-indicator-editor-grid,
    .aggregate-indicator-advanced-grid{
        grid-template-columns:1fr;
    }

    .aggregate-indicator-card li{
        grid-template-columns:1fr;
    }

    .standard-template-modal,
    .document-defaults-modal,
    .directive-quick-config-modal,
    .document-template-picker-modal,
    .document-template-preview-modal,
    .account-profile-modal{
        width:calc(100% - 14px);
        padding:22px 12px 14px;
    }

    .standard-template-form,
    .document-defaults-form,
    .document-defaults-standard-fields,
    .criminal-procedure-defaults-fields,
    .account-profile-form{
        grid-template-columns:1fr;
    }

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

    .account-document-presets-toolbar{
        align-items:stretch;
        flex-direction:column;
    }

    .account-document-presets-toolbar .btn{
        justify-content:center;
    }

    .account-document-preset-list{
        grid-template-columns:1fr;
    }

    .account-document-preset-actions .btn{
        flex:1 1 auto;
    }

    .standard-template-form .field-group-wide,
    .document-defaults-form .field-group-wide,
    .account-profile-form .field-group-wide,
    .document-defaults-form .auth-error,
    .account-profile-form .auth-error,
    .document-defaults-form .standard-template-actions,
    .account-profile-form .standard-template-actions,
    .standard-template-form .auth-error,
    .account-withdraw-summary,
    .standard-template-actions{
        grid-column:auto;
    }

    .standard-template-actions,
    .incoming-defaults-card,
    .incoming-defaults-actions{
        flex-direction:column;
    }

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

    .directive-quick-config-system,
    .directive-quick-config-preset-field{
        padding-right:0;
        border-right:0;
    }

    .directive-quick-config-actions{
        grid-template-columns:repeat(2, minmax(0, 1fr));
        padding:12px 0 0;
        border-top:1px solid #e3e8f1;
    }

    .directive-quick-config-actions > .btn{
        width:100%;
        white-space:normal;
    }

    .directive-quick-config-manager-toolbar{
        align-items:flex-start;
        flex-direction:column;
    }

    .directive-quick-config-manager-toolbar > .btn{
        width:100%;
        justify-content:center;
    }

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

    .directive-quick-config-edit-grid .field-group-wide{
        grid-column:auto;
    }

    .directive-quick-config-modal-actions > .btn{
        min-width:0;
        flex:1;
    }

    .directive-quick-config-table{
        display:block;
        table-layout:auto;
    }

    .directive-quick-config-table thead{
        position:absolute;
        width:1px;
        height:1px;
        overflow:hidden;
        clip:rect(0, 0, 0, 0);
        clip-path:inset(50%);
        white-space:nowrap;
    }

    .directive-quick-config-table tbody{
        display:grid;
        gap:9px;
        padding:9px;
    }

    .directive-quick-config-table tbody tr{
        display:grid;
        grid-template-columns:1fr;
        padding:5px 10px;
        border:1px solid #e7ebf2;
        border-radius:10px;
        background:#fff;
    }

    .directive-quick-config-table tbody tr:last-child td,
    .directive-quick-config-table tbody tr td{
        display:flex;
        min-width:0;
        align-items:center;
        justify-content:space-between;
        gap:10px;
        padding:8px 0;
        border-bottom:1px solid #f0f2f6;
    }

    .directive-quick-config-table tbody tr td:last-child{
        border-bottom:0;
    }

    .directive-quick-config-table td::before{
        flex:none;
        color:#7a869a;
        content:attr(data-label);
        font-size:10px;
        font-weight:700;
    }

    .directive-quick-config-manager-row-actions{
        justify-content:flex-end !important;
    }

    .directive-quick-config-manager-row-actions::before{
        margin-right:auto;
    }

    .account-profile-tabs,
    .document-defaults-tabs,
    .account-withdraw-summary{
        grid-template-columns:1fr;
    }

    .incoming-defaults-actions .btn{
        width:100%;
    }

    .field-group-wide{
        grid-column:auto;
    }

    .control-actions{
        flex-direction:column;
    }

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

    .legal-intake-slot,
    .legal-intake-result-grid,
    .legal-intake-field-result{
        grid-template-columns:1fr;
    }

    .legal-intake-field-result > em{
        max-width:none;
        text-align:left;
    }

    .legal-intake-slot input[type="file"]{
        max-width:100%;
    }

    .legal-intake-toolbar{
        align-items:stretch;
        flex-direction:column;
    }

    .legal-intake-toolbar .btn{
        width:100%;
    }

    .legal-intake-toolbar-actions{
        width:100%;
        align-items:stretch;
        flex-direction:column;
    }

    .legal-intake-toolbar-actions .btn{
        width:100%;
    }

    .legal-field-group-heading-with-action{
        align-items:flex-start;
        flex-direction:column;
    }

    .legal-field-group-scan{
        width:100%;
    }

    .legal-intake-stepper{
        grid-template-columns:1fr;
        gap:0;
        text-align:left;
    }

    .legal-intake-stepper span{
        border-bottom:1px solid #e4eaf2;
    }

    .legal-intake-file-actions{
        align-items:stretch;
        flex-direction:column;
    }

    .legal-intake-file-actions .btn{
        justify-content:center;
        width:100%;
    }

    .criminal-person-grid,
    .criminal-stat-grid,
    .criminal-dossier-saved-controls{
        grid-template-columns:1fr;
    }

    .criminal-dossier-saved-heading{
        flex-direction:column;
    }

    .criminal-dossier-saved-controls .btn{
        width:100%;
    }

    .criminal-person-toolbar{
        align-items:stretch;
        flex-direction:column;
    }

    .criminal-person-toolbar-actions,
    .criminal-person-document-toolbar{
        align-items:stretch;
    }

    .criminal-person-toolbar-actions .btn,
    .criminal-person-document-toolbar .btn{
        width:100%;
    }

    .criminal-document-scan-panel{
        max-height:calc(100vh - 20px);
        padding:18px;
    }

    .criminal-document-scan-fields,
    .criminal-scan-preview{
        grid-template-columns:1fr;
    }

    .criminal-scan-actions .btn,
    .criminal-scan-actions label,
    .criminal-document-scan-body > .btn,
    .criminal-document-scan-result > .btn{
        width:100%;
        text-align:center;
    }

    .section-actions,
    .directive-template-options,
    .document-template-layout,
    .document-template-upload-panel,
    .document-template-filters,
    .document-template-item,
    .document-template-picker-body{
        grid-template-columns:1fr;
    }

    .section-actions,
    .document-template-actions,
    .directive-template-actions,
    .document-template-pagination{
        justify-content:stretch;
    }

    .section-actions .btn,
    .document-template-actions .btn,
    .directive-template-actions .btn,
    .document-template-preview-actions .btn{
        width:100%;
    }

    .document-template-preview-modal{
        height:calc(100dvh - 14px);
        min-height:0;
        max-height:calc(100dvh - 14px);
    }

    .document-template-preview-heading{
        flex-direction:column;
        gap:10px;
        padding-right:36px;
    }

    .document-template-preview-actions{
        width:100%;
        justify-content:stretch;
    }

    .document-template-word-preview{
        margin-top:10px;
        padding:18px 6px 24px;
    }

    .document-template-pdf-preview,
    .document-template-preview-fallback-surface{
        margin-top:10px;
    }

    .document-template-pagination{
        align-items:stretch;
        flex-direction:column;
    }

    .history-list-toolbar{
        align-items:stretch;
        flex-direction:column;
    }

    .user-usage-kpis{
        grid-template-columns:1fr;
    }

    .admin-table-wrap:has(.user-usage-table){
        overflow:visible;
        border:0;
    }

    .user-usage-table{
        display:block;
        min-width:0;
    }

    .user-usage-table thead{
        display:none;
    }

    .user-usage-table tbody{
        display:grid;
        gap:10px;
    }

    .user-usage-table tbody tr{
        display:grid;
        overflow:hidden;
        border:1px solid #e4e9f1;
        border-radius:12px;
        background:#fff;
    }

    .user-usage-table tbody tr td{
        display:grid;
        grid-template-columns:84px minmax(0,1fr);
        gap:8px;
        align-items:center;
        min-width:0;
        padding:10px 12px;
        border-bottom:1px solid #eef1f6;
    }

    .user-usage-table tbody tr td:last-child{
        display:block;
        border-bottom:0;
    }

    .user-usage-table tbody tr td::before{
        color:#8490a3;
        font-size:10px;
        font-weight:800;
        letter-spacing:.04em;
        text-transform:uppercase;
    }

    .user-usage-table tbody tr td:nth-child(1)::before{content:"Thời gian";}
    .user-usage-table tbody tr td:nth-child(2)::before{content:"Chức năng";}
    .user-usage-table tbody tr td:nth-child(3)::before{content:"Kết quả";}
    .user-usage-table tbody tr td:nth-child(4)::before{content:"Điểm";}
    .user-usage-table tbody tr td:nth-child(5)::before{
        display:block;
        margin-bottom:8px;
        content:"Thao tác";
    }

    .user-usage-table tbody tr:has(.admin-empty){
        display:block;
    }

    .user-usage-table tbody .admin-empty::before{
        display:none;
    }

    .user-usage-actions{
        min-width:0;
        flex-direction:column;
    }

    .user-usage-actions .btn{
        width:100%;
    }

    .user-usage-files-list{
        min-width:0;
        max-width:100%;
    }

    .user-usage-file-buttons .btn{
        width:auto;
    }

    .affiliate-pagination{
        align-items:stretch;
        flex-direction:column;
    }

    .affiliate-page-controls{
        justify-content:flex-start;
    }

    .history-page-tabs{
        justify-content:flex-start;
    }

    .history-page-tabs:has(.pagination-summary){
        align-items:stretch;
        flex-direction:column;
    }

    .document-template-page-controls{
        justify-content:flex-start;
    }

    .document-template-text-page{
        min-height:860px;
        padding:42px 24px;
    }

    .advisor-meta-grid,
    .advisor-two-columns{
        grid-template-columns:1fr;
    }

    .advisor-post-apply-summary{
        align-items:stretch;
        flex-direction:column;
    }

    .advisor-post-apply-summary-actions{
        justify-content:flex-end;
    }

    .advisor-actions{
        flex-direction:column;
    }

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

    .workspace{
        gap:12px;
    }

    .section-heading{
        gap:15px;
        flex-direction:column;
    }

    .usage-badge{
        align-items:flex-start;
    }

    .plans-modal{
        padding:24px 14px 16px;
    }

    .payment-modal{
        padding:24px 13px 16px;
    }

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

    .payment-order-meta{
        flex-direction:column;
    }

    .admin-backdrop{
        padding:8px;
    }

    .admin-modal{
        padding:22px 10px 12px;
    }

    .admin-heading{
        padding:0 36px 0 4px;
        flex-direction:column;
    }

    .admin-kpis{
        grid-template-columns:1fr 1fr;
        gap:8px;
    }

    .admin-kpi,
    .admin-section{
        padding:12px;
    }

    .pricing-card-featured{
        transform:none;
    }

    .word-preview{
        min-height:560px;
        padding:14px 8px;
    }
}

/* Guide page refresh: task-first navigation for new users. */
.guide-page{
    display:grid;
    gap:24px;
    max-width:1540px;
    margin:0 auto;
}

.guide-section,
.guide-example,
.guide-support{
    border:1px solid rgba(204, 214, 228, .9);
    border-radius:24px;
    background:var(--surface);
    box-shadow:var(--shadow-soft);
}

.guide-section,
.guide-example,
.guide-support{
    padding:28px;
}

.guide-section-soft{
    border-color:#d4e0f4;
    background:linear-gradient(145deg, #f8fbff, #f2f6fd);
}

.guide-section-heading{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:18px;
    margin-bottom:20px;
}

.guide-section-heading h2,
.guide-example h2,
.guide-support h2{
    margin:0;
    color:var(--navy-dark);
    font-size:26px;
    letter-spacing:-.025em;
}

.guide-section-heading p,
.guide-example-heading p,
.guide-support p{
    max-width:760px;
    margin:7px 0 0;
    color:var(--muted);
    line-height:1.6;
}

.guide-section-count{
    flex:0 0 auto;
    padding:8px 11px;
    border:1px solid #d6dfec;
    border-radius:999px;
    color:var(--blue);
    background:#f5f8ff;
    font-size:11px;
    font-weight:850;
    letter-spacing:.08em;
    text-transform:uppercase;
}

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

.guide-choice-card{
    display:flex;
    min-height:298px;
    flex-direction:column;
    padding:20px;
    border:1px solid #dbe3ef;
    border-top:4px solid var(--guide-accent, #315bd8);
    border-radius:18px;
    background:#fff;
    box-shadow:0 10px 25px rgba(29, 48, 82, .06);
    transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.guide-choice-card:hover{
    transform:translateY(-3px);
    border-color:color-mix(in srgb, var(--guide-accent, #315bd8) 42%, #dbe3ef);
    box-shadow:0 17px 34px rgba(29, 48, 82, .1);
}

.guide-choice-blue{--guide-accent:#315bd8;}
.guide-choice-green{--guide-accent:#2e946d;}
.guide-choice-teal{--guide-accent:#0f8a83;}
.guide-choice-navy{--guide-accent:#253c72;}
.guide-choice-orange{--guide-accent:#c47a24;}
.guide-choice-purple{--guide-accent:#6854ce;}

.guide-card-topline{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:17px;
}

.guide-choice-icon,
.guide-accordion-icon{
    display:grid;
    place-items:center;
    width:42px;
    height:42px;
    border-radius:14px;
    color:#fff;
    background:var(--guide-accent, #315bd8);
    box-shadow:0 9px 18px rgba(29, 48, 82, .13);
    font-size:15px;
    font-weight:900;
}

.guide-choice-number{
    color:#a2afc2;
    font-size:12px;
    font-weight:850;
    letter-spacing:.1em;
}

.guide-choice-card h3{
    margin:0;
    color:var(--navy-dark);
    font-size:18px;
    line-height:1.28;
}

.guide-choice-card p{
    margin:9px 0 0;
    color:var(--muted);
    font-size:13px;
    line-height:1.55;
}

.guide-compact-list{
    display:grid;
    gap:6px;
    margin:14px 0 18px;
    padding:0;
    color:#506078;
    font-size:12px;
    line-height:1.45;
    list-style:none;
}

.guide-compact-list li{
    position:relative;
    padding-left:17px;
}

.guide-compact-list li::before{
    position:absolute;
    top:.45em;
    left:0;
    width:7px;
    height:7px;
    border-radius:50%;
    background:var(--guide-accent, #315bd8);
    content:"";
}

.guide-card-link{
    display:flex;
    width:100%;
    min-height:34px;
    align-items:center;
    justify-content:space-between;
    margin-top:auto;
    padding:0;
    border:0;
    color:var(--guide-accent, #315bd8);
    background:transparent;
    font-size:12px;
    font-weight:850;
    text-align:left;
}

.guide-card-link:hover{
    color:var(--navy-dark);
    transform:none;
}

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

.guide-flow-step{
    position:relative;
    min-height:154px;
    padding:18px 17px;
    border:1px solid #d8e3f2;
    border-radius:17px;
    background:#fff;
}

.guide-flow-step:not(:last-child)::after{
    position:absolute;
    z-index:1;
    top:50%;
    right:-18px;
    color:#8ba5d4;
    content:"→";
    font-size:23px;
    font-weight:800;
}

.guide-flow-number{
    display:inline-flex;
    min-width:35px;
    height:27px;
    align-items:center;
    justify-content:center;
    border-radius:8px;
    color:#2451a4;
    background:#eaf1ff;
    font-size:11px;
    font-weight:900;
}

.guide-flow-step h3{
    min-height:42px;
    margin:14px 0 7px;
    color:var(--navy-dark);
    font-size:16px;
    line-height:1.3;
}

.guide-flow-step p{
    display:-webkit-box;
    margin:0;
    overflow:hidden;
    color:var(--muted);
    font-size:12px;
    line-height:1.55;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:3;
}

.guide-warning{
    display:flex;
    gap:10px;
    align-items:flex-start;
    margin-top:16px;
    padding:14px 16px;
    border:1px solid #f0d9a6;
    border-radius:14px;
    color:#72561c;
    background:#fffaf0;
}

.guide-warning-icon{
    display:grid;
    flex:0 0 22px;
    width:22px;
    height:22px;
    place-items:center;
    border-radius:50%;
    color:#fff;
    background:#d89a2d;
    font-size:13px;
    font-weight:900;
}

.guide-warning p{
    margin:0;
    font-size:13px;
    line-height:1.5;
}

.guide-accordion-list{
    display:grid;
    gap:10px;
}

.guide-accordion,
.guide-faq{
    border:1px solid #dce4ef;
    border-radius:16px;
    background:#fff;
    overflow:hidden;
}

.guide-accordion summary,
.guide-faq summary{
    display:flex;
    align-items:center;
    gap:13px;
    min-height:70px;
    padding:12px 17px;
    color:var(--navy-dark);
    cursor:pointer;
    list-style:none;
}

.guide-accordion summary::-webkit-details-marker,
.guide-faq summary::-webkit-details-marker{
    display:none;
}

.guide-accordion summary > span:nth-child(2){
    display:grid;
    flex:1;
    gap:3px;
}

.guide-accordion summary strong{
    font-size:16px;
}

.guide-accordion summary small{
    color:var(--muted);
    font-size:12px;
}

.guide-accordion summary > b,
.guide-faq summary > span{
    color:#8b9ab0;
    font-size:20px;
    font-weight:400;
    transition:transform .18s ease;
}

.guide-accordion[open] summary > b,
.guide-faq[open] summary > span{
    transform:rotate(45deg);
}

.guide-accordion-icon{
    flex:0 0 38px;
    width:38px;
    height:38px;
    border-radius:12px;
    font-size:13px;
}

.guide-accordion-blue{background:#315bd8;}
.guide-accordion-green{background:#2e946d;}
.guide-accordion-teal{background:#0f8a83;}
.guide-accordion-navy{background:#253c72;}
.guide-accordion-orange{background:#c47a24;}
.guide-accordion-purple{background:#6854ce;}

.guide-accordion-body{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:24px;
    padding:4px 24px 22px 68px;
    border-top:1px solid #edf1f6;
}

.guide-accordion-body h4{
    margin:16px 0 6px;
    color:var(--navy);
    font-size:12px;
    letter-spacing:.03em;
    text-transform:uppercase;
}

.guide-accordion-body p,
.guide-accordion-body li{
    color:var(--muted);
    font-size:13px;
    line-height:1.55;
}

.guide-accordion-body p{margin:0;}

.guide-accordion-body ul,
.guide-accordion-body ol{
    display:grid;
    gap:5px;
    margin:0;
    padding-left:18px;
}

.guide-example{
    border-color:#c9d8f3;
    background:
        radial-gradient(circle at 90% 0%, rgba(68, 103, 222, .14), transparent 35%),
        linear-gradient(135deg, #f8fbff, #eef4ff);
}

.guide-example-heading{
    display:flex;
    gap:13px;
    align-items:flex-start;
}

.guide-example-icon{
    display:grid;
    flex:0 0 43px;
    width:43px;
    height:43px;
    place-items:center;
    border-radius:14px;
    color:#fff;
    background:var(--navy);
    font-size:25px;
    font-weight:800;
}

.guide-example-flow{
    display:flex;
    align-items:center;
    gap:9px;
    margin-top:22px;
    overflow:auto;
    padding-bottom:4px;
}

.guide-example-flow span{
    display:flex;
    min-height:45px;
    align-items:center;
    justify-content:center;
    flex:1 1 150px;
    min-width:145px;
    padding:9px 12px;
    border:1px solid #d3dff3;
    border-radius:12px;
    color:#27416e;
    background:#fff;
    font-size:12px;
    font-weight:750;
    line-height:1.35;
    text-align:center;
}

.guide-example-flow i{
    flex:0 0 auto;
    color:#7090c9;
    font-style:normal;
    font-size:20px;
    font-weight:800;
}

.guide-example-footer{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-top:17px;
    padding-top:17px;
    border-top:1px solid #d7e2f5;
}

.guide-example-footer p{
    margin:0;
    color:#4a5e7c;
    font-size:13px;
    line-height:1.55;
}

.guide-example-footer .btn{
    flex:0 0 auto;
}

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

.guide-faq summary{
    justify-content:space-between;
    min-height:58px;
    padding:11px 16px;
}

.guide-faq summary strong{
    font-size:14px;
}

.guide-faq p{
    margin:0;
    padding:0 16px 16px;
    color:var(--muted);
    font-size:13px;
    line-height:1.6;
}

.guide-support{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:24px;
    border-color:#c6e0d3;
    background:linear-gradient(135deg, #f7fcf9, #eef9f3);
}

.guide-support > div:first-child{
    display:flex;
    align-items:flex-start;
    gap:14px;
}

.guide-support-icon{
    display:grid;
    flex:0 0 43px;
    width:43px;
    height:43px;
    place-items:center;
    border-radius:14px;
    color:#fff;
    background:#2e946d;
    font-size:23px;
    font-weight:900;
}

.guide-support-actions{
    display:flex;
    flex:0 0 auto;
    flex-wrap:wrap;
    gap:9px;
}

.guide-support-actions .btn{
    min-height:40px;
}

.guide-contact-card{
    display:flex;
    min-width:176px;
    min-height:56px;
    align-items:center;
    gap:10px;
    padding:8px 14px;
    border:1px solid #d7e1ef;
    border-radius:15px;
    text-decoration:none;
    box-shadow:0 7px 18px rgba(29,48,82,.07);
    transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.guide-contact-card:hover,
.guide-contact-card:focus-visible{
    transform:translateY(-2px);
    box-shadow:0 11px 24px rgba(29,48,82,.12);
}

.guide-contact-zalo{
    color:#0755ad;
    background:linear-gradient(135deg, #f5faff, #eaf4ff);
}

.guide-contact-zalo:hover,
.guide-contact-zalo:focus-visible{
    border-color:#9dc5f2;
    color:#06458f;
}

.guide-contact-hotline{
    color:#08754d;
    background:linear-gradient(135deg, #f6fcf9, #eaf8f1);
}

.guide-contact-hotline:hover,
.guide-contact-hotline:focus-visible{
    border-color:#9bd4b9;
    color:#05613f;
}

.guide-contact-icon{
    display:grid;
    width:36px;
    height:36px;
    flex:0 0 36px;
    place-items:center;
    border-radius:11px;
    background:#fff;
    box-shadow:0 4px 10px rgba(29,48,82,.09);
}

.guide-contact-icon svg{
    width:22px;
    height:22px;
}

.guide-contact-zalo .guide-contact-icon svg path:first-child{
    fill:currentColor;
}

.guide-contact-copy{
    display:grid;
    min-width:0;
    gap:2px;
}

.guide-contact-copy small{
    color:#72819a;
    font-size:10px;
    font-weight:750;
    line-height:1.2;
}

.guide-contact-copy strong{
    overflow:hidden;
    color:currentColor;
    font-size:13px;
    line-height:1.25;
    text-overflow:ellipsis;
    white-space:nowrap;
}

@media (max-width:1100px){
    .guide-choice-grid{
        grid-template-columns:repeat(2, minmax(0, 1fr));
    }

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

    .guide-flow-step:nth-child(3)::after{
        content:"↓";
        top:auto;
        right:calc(50% - 7px);
        bottom:-22px;
    }

    .guide-flow-step:nth-child(5)::after{
        display:none;
    }
}

@media (max-width:760px){
    .guide-section,
    .guide-example,
    .guide-support{
        padding:20px 16px;
        border-radius:19px;
    }

    .guide-section-heading{
        display:block;
    }

    .guide-section-count{
        display:inline-flex;
        margin-top:12px;
    }

    .guide-choice-grid,
    .guide-flow,
    .guide-faq-grid{
        grid-template-columns:1fr;
    }

    .guide-flow-step{
        min-height:auto;
    }

    .guide-flow-step::after,
    .guide-flow-step:nth-child(2)::after,
    .guide-flow-step:nth-child(5)::after{
        display:block;
        top:auto;
        right:calc(50% - 7px);
        bottom:-24px;
        content:"↓";
    }

    .guide-flow-step:last-child::after{
        display:none;
    }

    .guide-accordion-body{
        grid-template-columns:1fr;
        gap:0;
        padding:0 16px 16px 16px;
    }

    .guide-example-flow{
        display:grid;
        gap:7px;
        overflow:visible;
    }

    .guide-example-flow span{
        min-width:0;
    }

    .guide-example-flow i{
        justify-self:center;
        line-height:1;
        transform:rotate(90deg);
    }

    .guide-example-footer,
    .guide-support{
        align-items:stretch;
        flex-direction:column;
    }

    .guide-example-footer .btn,
    .guide-support-actions,
    .guide-support-actions .btn,
    .guide-support-actions .guide-contact-card{
        width:100%;
    }

    .guide-support-actions{
        display:grid;
    }
}

.guide-howto{
    padding:28px;
    border:1px solid #cbdaf1;
    border-radius:24px;
    background:linear-gradient(145deg, #fbfdff, #f0f5ff);
    box-shadow:var(--shadow-soft);
}

.guide-module-jump{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:8px;
    padding:14px 16px;
    border:1px solid #d7e2f2;
    border-radius:18px;
    background:#fff;
    box-shadow:var(--shadow-soft);
}

.guide-module-jump-label{
    margin-right:2px;
    color:#1b2b52;
    font-size:13px;
    font-weight:850;
}

.guide-jump-link{
    display:inline-flex;
    min-height:34px;
    align-items:center;
    padding:7px 11px;
    border:1px solid #d5e0f2;
    border-radius:999px;
    color:#315bd8;
    background:#f8faff;
    font-size:12px;
    font-weight:800;
    line-height:1.25;
    text-decoration:none;
    transition:background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.guide-jump-link:hover,
.guide-jump-link:focus-visible{
    border-color:#9eb8ed;
    color:#183f9f;
    background:#edf3ff;
    transform:translateY(-1px);
}

.guide-howto-badge{
    flex:0 0 auto;
    padding:8px 12px;
    border:1px solid #c9d7f1;
    border-radius:999px;
    color:#315bd8;
    background:#fff;
    font-size:11px;
    font-weight:850;
    letter-spacing:.08em;
    text-transform:uppercase;
}

.guide-howto-layout{
    display:grid;
    grid-template-columns:minmax(0, 1.3fr) minmax(270px, .7fr);
    gap:18px;
    align-items:start;
}

.guide-howto-steps{
    display:grid;
    gap:9px;
}

.guide-howto-step{
    display:grid;
    grid-template-columns:36px minmax(0, 1fr);
    gap:12px;
    padding:15px 16px;
    border:1px solid #d7e2f2;
    border-radius:15px;
    background:#fff;
}

.guide-howto-step > span{
    display:grid;
    width:34px;
    height:34px;
    place-items:center;
    border-radius:11px;
    color:#2854b1;
    background:#eaf1ff;
    font-size:11px;
    font-weight:900;
}

.guide-howto-step h3{
    margin:0;
    color:var(--navy-dark);
    font-size:15px;
    line-height:1.35;
}

.guide-howto-step p{
    margin:5px 0 0;
    color:var(--muted);
    font-size:13px;
    line-height:1.58;
}

.guide-input-example{
    margin-top:8px;
    padding:10px 12px;
    border-left:3px solid #315bd8;
    border-radius:0 10px 10px 0;
    color:#304b78;
    background:#f2f6ff;
    font-size:12px;
    line-height:1.55;
}

.guide-step-note{
    color:#63738b !important;
    font-size:12px !important;
}

.guide-howto-aside{
    display:grid;
    gap:10px;
}

.guide-howto-aside-card{
    padding:18px;
    border:1px solid #d7e2f2;
    border-radius:16px;
    background:#fff;
}

.guide-howto-aside-blue{
    border-color:#c5d6f4;
    background:#edf4ff;
}

.guide-aside-kicker{
    display:block;
    margin-bottom:6px;
    color:#315bd8;
    font-size:11px;
    font-weight:850;
    letter-spacing:.1em;
    text-transform:uppercase;
}

.guide-howto-aside-card h3,
.guide-template-howto h3{
    margin:0;
    color:var(--navy-dark);
    font-size:17px;
    line-height:1.35;
}

.guide-howto-aside-card ol{
    display:grid;
    gap:8px;
    margin:13px 0 0;
    padding-left:20px;
    color:#53657f;
    font-size:13px;
    line-height:1.45;
}

.guide-howto-aside-card p{
    margin:9px 0 0;
    color:#53657f;
    font-size:13px;
    line-height:1.58;
}

.guide-mode-explainer{
    margin-top:18px;
    padding:20px;
    border:1px solid #d7e2f2;
    border-radius:17px;
    background:#fff;
}

.guide-mode-heading h3{
    margin:0;
    color:var(--navy-dark);
    font-size:20px;
}

.guide-mode-heading p{
    margin:6px 0 0;
    color:var(--muted);
    font-size:13px;
    line-height:1.55;
}

.guide-mode-grid{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:10px;
    margin-top:15px;
}

.guide-mode-card{
    display:flex;
    min-height:245px;
    flex-direction:column;
    padding:16px;
    border:1px solid #dbe3ef;
    border-top:3px solid var(--guide-mode-accent, #315bd8);
    border-radius:14px;
    background:#fbfdff;
}

.guide-mode-sign{--guide-mode-accent:#315bd8;}
.guide-mode-detail{--guide-mode-accent:#2e946d;}
.guide-mode-advanced{--guide-mode-accent:#6854ce;}

.guide-mode-label{
    align-self:flex-start;
    margin-bottom:8px;
    padding:4px 7px;
    border-radius:6px;
    color:#2854b1;
    background:#eaf1ff;
    font-size:10px;
    font-weight:900;
    letter-spacing:.08em;
    text-transform:uppercase;
}

.guide-mode-card h4{
    margin:0;
    color:var(--navy-dark);
    font-size:16px;
}

.guide-mode-card p,
.guide-mode-card li{
    color:var(--muted);
    font-size:12px;
    line-height:1.55;
}

.guide-mode-card p{margin:8px 0 0;}

.guide-mode-card ul{
    display:grid;
    gap:5px;
    margin:10px 0 12px;
    padding-left:17px;
}

.guide-mode-example{
    margin-top:auto;
    padding-top:10px;
    border-top:1px solid #e3e9f2;
    color:#52647f;
    font-size:11px;
    line-height:1.5;
}

.guide-template-howto{
    display:grid;
    grid-template-columns:minmax(260px, .8fr) minmax(0, 1.2fr);
    gap:18px 26px;
    margin-top:18px;
    padding:20px;
    border:1px solid #cce2d5;
    border-radius:17px;
    background:#f5fbf7;
}

.guide-template-howto p,
.guide-template-howto li{
    color:#536b61;
    font-size:13px;
    line-height:1.58;
}

.guide-template-howto p{margin:8px 0 0;}

.guide-template-howto ol{
    display:grid;
    gap:7px;
    margin:0;
    padding-left:20px;
}

.guide-template-howto > .guide-step-note{
    grid-column:1 / -1;
    margin:0;
    padding-top:12px;
    border-top:1px solid #d8ebde;
}

@media (max-width:1000px){
    .guide-howto-layout{
        grid-template-columns:1fr;
    }

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

@media (max-width:760px){
    .guide-module-jump{
        display:grid;
        grid-template-columns:repeat(2, minmax(0, 1fr));
        align-items:stretch;
    }

    .guide-module-jump-label{
        grid-column:1 / -1;
    }

    .guide-jump-link{
        justify-content:center;
        text-align:center;
    }

    .guide-howto{
        padding:20px 16px;
        border-radius:19px;
    }

    .guide-howto-badge{
        display:inline-flex;
        margin-top:10px;
    }

    .guide-mode-explainer,
    .guide-template-howto{
        padding:16px;
    }

    .guide-mode-grid,
    .guide-template-howto{
        grid-template-columns:1fr;
    }

    .guide-mode-card{
        min-height:auto;
    }

    .guide-template-howto > .guide-step-note{
        grid-column:auto;
    }
}

@media (max-width:640px){
    body.support-widget-visible{
        padding-bottom:78px;
    }

    body.support-widget-visible.support-widget-expanded{
        padding-bottom:190px;
    }

    .support-widget{
        right:max(16px, env(safe-area-inset-right));
        left:auto;
        bottom:max(16px, env(safe-area-inset-bottom));
        max-width:calc(100vw - 32px);
    }

    .support-widget-toggle-button{
        width:54px;
        height:54px;
        min-width:54px;
        min-height:54px;
    }

    .support-widget-panel{
        width:min(240px, calc(100vw - 32px));
    }

    .support-action{
        min-height:52px;
        padding:6px 12px;
    }
}

@media (prefers-reduced-motion:reduce){
    .support-action,
    .support-widget-toggle-button,
    .support-widget-close,
    .support-widget-panel{
        transition:none;
    }
}

.admin-dashboard-tabs,
.admin-finance-mode-tabs{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin:18px 0;
    padding:6px;
    border:1px solid var(--line, #d9e1eb);
    border-radius:14px;
    background:var(--surface-muted, #f7f9fc);
}

.admin-dashboard-tab,
.admin-finance-mode-tabs button{
    border:0;
    border-radius:10px;
    padding:10px 14px;
    color:var(--ink-muted, #526174);
    background:transparent;
    cursor:pointer;
    font:inherit;
}

.admin-dashboard-tab.active,
.admin-finance-mode-tabs button.active{
    color:var(--ink, #182334);
    background:#fff;
    box-shadow:0 2px 8px rgba(31, 50, 76, .12);
    font-weight:700;
}

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

.admin-finance-kpis article{
    display:flex;
    min-height:78px;
    flex-direction:column;
    justify-content:space-between;
    gap:8px;
    padding:14px;
    border:1px solid var(--line, #d9e1eb);
    border-radius:12px;
    background:#fff;
}

.admin-finance-kpis span{
    color:var(--ink-muted, #526174);
    font-size:.85rem;
}

.admin-finance-kpis strong{
    font-size:1.12rem;
}

.admin-finance-chart-panel,
.admin-finance-entry-form{
    margin:18px 0;
    padding:16px;
    border:1px solid var(--line, #d9e1eb);
    border-radius:14px;
    background:#fff;
}

.admin-finance-chart{
    display:grid;
    grid-template-columns:repeat(12, minmax(28px, 1fr));
    align-items:end;
    gap:8px;
    min-height:220px;
    padding:18px 8px 8px;
    border-top:1px solid var(--line, #d9e1eb);
}

.admin-finance-chart-column{
    display:flex;
    min-width:0;
    height:190px;
    flex-direction:column;
    justify-content:flex-end;
    gap:6px;
}

.admin-finance-chart-bars{
    display:flex;
    height:160px;
    align-items:flex-end;
    justify-content:center;
    gap:3px;
}

.admin-finance-chart-bar{
    width:28%;
    min-height:2px;
    border-radius:4px 4px 0 0;
}

.admin-finance-chart-bar.revenue{background:#2f7d63}
.admin-finance-chart-bar.cost{background:#d58a38}
.admin-finance-chart-bar.profit{background:#4c73b8}

.admin-finance-chart-label{
    overflow:hidden;
    color:var(--ink-muted, #526174);
    font-size:.72rem;
    text-align:center;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.admin-finance-chart-legend{
    grid-column:1 / -1;
    display:flex;
    flex-wrap:wrap;
    gap:14px;
    margin-top:10px;
    color:var(--ink-muted, #526174);
    font-size:.8rem;
}

.admin-finance-chart-legend span::before{
    display:inline-block;
    width:10px;
    height:10px;
    margin-right:5px;
    border-radius:3px;
    content:"";
}

.admin-finance-chart-legend .revenue::before{background:#2f7d63}
.admin-finance-chart-legend .cost::before{background:#d58a38}
.admin-finance-chart-legend .profit::before{background:#4c73b8}

.admin-finance-entry-actions{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin:18px 0;
}

.admin-finance-entry-form h4,
.admin-finance-chart-panel h4{
    margin:0 0 14px;
}

.admin-finance-status{
    margin:12px 0;
    padding:10px 12px;
    border-radius:10px;
    color:#275f45;
    background:#eaf7ef;
}

.admin-finance-filters select,
.admin-finance-filters input{
    min-width:150px;
}

.admin-finance-table th,
.admin-finance-table td{
    white-space:nowrap;
}

.admin-finance-subheading{
    margin-top:24px;
}

@media (max-width:900px){
    .admin-finance-kpis{grid-template-columns:repeat(2, minmax(0, 1fr))}
    .admin-finance-chart{overflow-x:auto;grid-template-columns:repeat(12, 48px)}
}

@media (max-width:560px){
    .admin-finance-kpis{grid-template-columns:1fr}
    .admin-dashboard-tabs,.admin-finance-mode-tabs{overflow-x:auto;flex-wrap:nowrap}
    .admin-dashboard-tab,.admin-finance-mode-tabs button{white-space:nowrap}
}

@media (max-width:640px){
    .plan-validity-block{
        gap:2px;
        padding:9px 10px;
    }

    .plan-validity-value{
        font-size:17px;
    }

    .billing-validity-summary{
        width:100%;
    }
}

/* Directive workspace: quieter quick tools and one shared document-settings surface. */
#directiveModule .directive-quick-config-card{
    gap:9px;
    margin:0;
    padding:11px 14px;
    border:1px solid #e7ebf2;
    border-radius:12px;
    background:#fbfcfe;
    box-shadow:none;
}

#directiveModule .directive-quick-config-heading{
    display:flex;
    align-items:center;
    min-height:22px;
}

#directiveModule .directive-quick-config-toolbar{
    grid-template-columns:minmax(170px, .85fr) minmax(220px, 1.1fr) minmax(300px, 1.45fr);
    align-items:center;
    gap:12px;
}

#directiveModule .directive-quick-config-field{
    gap:5px;
}

#directiveModule .directive-quick-config-system,
#directiveModule .directive-quick-config-preset-field{
    padding-right:12px;
    border-right-color:#e9edf3;
}

#directiveModule .directive-quick-config-control select,
#directiveModule .directive-quick-config-trigger,
#directiveModule .directive-quick-config-actions > .btn{
    min-height:40px;
}

#directiveModule .directive-quick-config-actions{
    grid-template-columns:repeat(2, minmax(132px, 1fr));
    gap:8px;
}

#directiveModule .directive-quick-config-actions > .btn{
    padding:7px 9px;
    font-size:12px;
}

#directiveModule .directive-quick-config-heading > small,
#directiveModule .directive-quick-config-field > small{
    position:absolute;
    width:1px;
    height:1px;
    overflow:hidden;
    clip:rect(0, 0, 0, 0);
    clip-path:inset(50%);
    white-space:nowrap;
}

#directiveModule .directive-document-settings-card{
    display:grid;
    grid-column:1 / -1;
    grid-template-columns:minmax(0, 1fr);
    gap:0;
    min-width:0;
    padding:18px 20px;
    border:1px solid #e4e9f1;
    border-radius:16px;
    background:#fff;
    box-shadow:0 4px 16px rgba(32, 55, 96, .04);
}

#directiveModule .directive-document-settings-heading{
    display:flex;
    align-items:center;
    gap:11px;
    min-width:0;
    margin:0 0 16px;
}

#directiveModule .directive-document-settings-icon{
    display:grid;
    width:38px;
    height:38px;
    flex:0 0 38px;
    place-items:center;
    border-radius:11px;
    color:#4268df;
    background:#eef3ff;
}

#directiveModule .directive-document-settings-icon svg{
    width:20px;
    height:20px;
    fill:none;
    stroke:currentColor;
    stroke-linecap:round;
    stroke-linejoin:round;
    stroke-width:1.8;
}

#directiveModule .directive-document-settings-heading h2{
    margin:0;
    color:var(--navy-dark);
    font-size:17px;
    font-weight:800;
    line-height:1.25;
}

#directiveModule .directive-document-settings-heading p{
    margin:3px 0 0;
    color:#68778d;
    font-size:12px;
    line-height:1.4;
}

#directiveModule .directive-document-settings-card .directive-info-card,
#directiveModule .directive-document-settings-card .directive-reference-card,
#directiveModule .directive-document-settings-card .directive-draft-mode-grid{
    min-width:0;
    padding:0;
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
}

#directiveModule .directive-document-settings-card .directive-card-heading{
    gap:10px;
    margin:0 0 12px;
}

#directiveModule .directive-document-settings-card .directive-card-heading-icon{
    width:36px;
    height:36px;
    flex-basis:36px;
    border-radius:10px;
}

#directiveModule .directive-document-settings-card .directive-card-heading-icon svg{
    width:19px;
    height:19px;
}

#directiveModule .directive-document-settings-card .directive-card-heading-copy h2{
    font-size:15px;
    font-weight:800;
}

#directiveModule .directive-document-settings-card .directive-card-heading-copy small,
#directiveModule .directive-draft-mode-heading-copy small{
    color:#68778d;
    font-size:12px;
}

#directiveModule .directive-document-settings-divider{
    width:100%;
    height:1px;
    margin:18px 0;
    background:#edf0f4;
}

#directiveModule .directive-document-settings-card .directive-info-grid{
    gap:14px 16px;
}

#directiveModule .directive-document-settings-card .directive-reference-options{
    margin:0;
}

#directiveModule .directive-document-settings-card .directive-draft-mode-grid{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:12px;
    margin:0;
}

#directiveModule .directive-document-settings-card .directive-draft-mode-grid legend{
    grid-column:1 / -1;
    gap:10px;
    margin:0 0 2px;
}

#directiveModule .directive-draft-mode-heading-copy strong{
    color:var(--navy-dark);
    font-size:15px;
    font-weight:800;
}

#directiveModule .directive-document-settings-card .directive-draft-mode-card{
    min-height:112px;
    padding:12px;
    border-color:#e5e9f0;
}

#directiveModule .directive-form-actions{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    flex-direction:row;
    margin-top:16px;
    padding:14px 0 0;
    border-top:1px solid #e8edf3;
}

#directiveModule .directive-form-actions #directiveAnalyzeButton{
    min-height:48px;
    padding:0 24px;
    font-size:15px;
    font-weight:800;
    box-shadow:0 5px 14px rgba(53, 88, 212, .18);
}

@media (max-width:1100px){
    #directiveModule .directive-quick-config-toolbar{
        grid-template-columns:minmax(0, .9fr) minmax(0, 1.1fr);
        gap:11px;
    }

    #directiveModule .directive-quick-config-actions{
        grid-column:1 / -1;
        grid-template-columns:repeat(2, minmax(132px, 1fr));
        padding:10px 0 0;
        border-top:1px solid #e9edf3;
    }
}

@media (max-width:760px){
    #directiveModule .directive-quick-config-card{
        padding:11px 12px;
    }

    #directiveModule .directive-quick-config-toolbar{
        grid-template-columns:minmax(0, 1fr);
        gap:10px;
    }

    #directiveModule .directive-quick-config-system,
    #directiveModule .directive-quick-config-preset-field{
        padding-right:0;
        border-right:0;
    }

    #directiveModule .directive-quick-config-actions{
        grid-template-columns:repeat(2, minmax(0, 1fr));
        padding-top:10px;
    }

    #directiveModule .directive-document-settings-card{
        padding:14px 13px;
    }

    #directiveModule .directive-document-settings-heading{
        margin-bottom:14px;
    }

    #directiveModule .directive-info-grid,
    #directiveModule .directive-reference-options,
    #directiveModule .directive-document-settings-card .directive-draft-mode-grid{
        grid-template-columns:minmax(0, 1fr);
    }

    #directiveModule .directive-document-settings-divider{
        margin:15px 0;
    }

    #directiveModule .directive-document-settings-card .directive-draft-mode-grid legend{
        grid-column:1;
    }

    #directiveModule .directive-form-actions{
        padding-top:12px;
    }

    #directiveModule .directive-form-actions #directiveAnalyzeButton{
        width:100%;
    }
}

@media (max-width:420px){
    #directiveModule .directive-quick-config-actions{
        grid-template-columns:minmax(0, 1fr);
    }
}

/* Review form: keep the full-width workspace while grouping its inputs into balanced rows. */
#reviewModule .review-form-grid{
    grid-template-columns:repeat(20, minmax(0, 1fr));
    column-gap:22px;
    row-gap:22px;
}

#reviewModule .review-form-grid > .field-group{
    min-width:0;
}

#reviewModule .review-form-grid > .review-system-field{
    grid-column:span 4;
}

#reviewModule .review-form-grid > .review-type-field{
    grid-column:span 5;
}

#reviewModule .review-form-grid > .review-file-field{
    grid-column:span 6;
}

#reviewModule .review-form-grid .review-source-files-field{
    grid-column:span 5;
}

#reviewModule .review-form-grid .review-user-request-field{
    grid-column:1 / -1;
}

#reviewModule .review-form-grid .field-hint{
    line-height:1.45;
    overflow-wrap:anywhere;
}

#reviewModule .review-form-grid select,
#reviewModule .review-form-grid input[type="file"],
#reviewModule .review-form-grid textarea{
    box-sizing:border-box;
    min-width:0;
    max-width:100%;
}

#reviewModule .review-form-grid .review-user-request-field textarea{
    height:100px;
    min-height:100px;
}

@media (max-width:1100px){
    #reviewModule .review-form-grid{
        grid-template-columns:repeat(2, minmax(0, 1fr));
    }

    #reviewModule .review-form-grid > .review-system-field,
    #reviewModule .review-form-grid > .review-type-field,
    #reviewModule .review-form-grid > .review-file-field,
    #reviewModule .review-form-grid .review-source-files-field{
        grid-column:span 1;
    }

    #reviewModule .review-form-grid .review-user-request-field{
        grid-column:1 / -1;
    }
}

@media (max-width:900px){
    #reviewModule .review-form-grid{
        grid-template-columns:minmax(0, 1fr);
    }

    #reviewModule .review-form-grid > .field-group{
        grid-column:1 / -1;
    }
}

/* Directive authoring workspace aligned to the compact reference layout. */
#directiveModule > .incoming-control{
    padding:0;
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
}

#directiveModule .section-heading{
    margin:0 0 15px;
}

#directiveModule .directive-hero{
    position:relative;
    display:grid;
    grid-template-columns:minmax(0, 1fr) minmax(360px, 470px);
    align-items:center;
    gap:24px;
    min-height:116px;
    overflow:hidden;
    padding:11px 20px;
    border:1px solid #e1e9f8;
    border-radius:18px;
    background:
        radial-gradient(ellipse at 89% 54%, rgba(116, 151, 245, .18), transparent 34%),
        linear-gradient(108deg, #fff 0%, #f9fbff 54%, #f0f5ff 100%);
    box-shadow:0 8px 24px rgba(40, 65, 112, .055);
    isolation:isolate;
}

#directiveModule .directive-hero-copy{
    display:grid;
    grid-template-columns:50px minmax(0, 1fr);
    align-items:center;
    gap:16px;
    min-width:0;
}

#directiveModule .directive-hero-icon{
    display:grid;
    width:50px;
    height:50px;
    place-items:center;
    border:1px solid rgba(83, 112, 224, .12);
    border-radius:14px;
    color:#4564dc;
    background:linear-gradient(145deg, #eef3ff, #e4ebff);
    box-shadow:0 5px 14px rgba(72, 103, 210, .09);
}

#directiveModule .directive-hero-icon svg{
    width:30px;
    height:30px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.6;
    stroke-linecap:round;
    stroke-linejoin:round;
}

#directiveModule .directive-hero-text{
    min-width:0;
}

#directiveModule .directive-hero-text p .module-help-button{
    min-height:25px;
    margin:0 0 0 8px;
    padding:0 8px;
    vertical-align:baseline;
    white-space:nowrap;
}

#directiveModule .directive-hero-art{
    position:relative;
    display:block;
    min-width:0;
    height:104px;
    overflow:hidden;
}

#directiveModule .directive-hero-illustration{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    overflow:hidden;
    transform:translateX(30px) scale(1.04);
    transform-origin:right center;
}

#directiveModule .directive-hero-building{
    fill:rgba(119, 149, 222, .045);
    stroke:rgba(105, 133, 205, .16);
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
}

#directiveModule .directive-hero-paper-stack{
    fill:rgba(255, 255, 255, .65);
    stroke:rgba(119, 149, 222, .16);
    stroke-width:1.6;
    stroke-linejoin:round;
}

#directiveModule .directive-hero-document{
    fill:rgba(255, 255, 255, .82);
    stroke:rgba(100, 129, 213, .22);
    stroke-width:2;
    stroke-linecap:round;
    stroke-linejoin:round;
}

#directiveModule .directive-hero-flag rect{
    fill:#d52b3f;
    stroke:rgba(148, 22, 38, .28);
    stroke-width:.8;
}

#directiveModule .directive-hero-flag path{
    fill:#ffdc42;
    stroke:#f2bd21;
    stroke-width:.45;
    stroke-linejoin:round;
}

#directiveModule .directive-hero-art .directive-hero-tagline{
    position:absolute;
    z-index:1;
    left:6%;
    bottom:14px;
    display:block;
    margin:0;
    padding:0;
    color:#5671bd;
    background:transparent;
    box-shadow:none;
    font-family:"Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
    font-size:13px;
    font-style:italic;
    font-weight:600;
    line-height:1.35;
    text-align:center;
    white-space:nowrap;
    transform:rotate(-5deg);
}

#directiveModule .directive-hero-art .directive-hero-tagline span,
#directiveModule .directive-hero-art .directive-hero-tagline strong{
    display:block;
}

#directiveModule .directive-hero-art .directive-hero-tagline strong{
    color:#405eae;
    font-size:13px;
    font-weight:750;
}

#directiveModule .directive-hero-art .directive-hero-tagline::after{
    position:absolute;
    right:13px;
    bottom:-9px;
    width:43px;
    height:2px;
    border-radius:50%;
    background:#6d83ce;
    content:"";
    transform:rotate(-13deg);
}

#directiveModule .section-heading h1{
    font-size:clamp(22px, 1.8vw, 27px);
    font-weight:760;
    letter-spacing:-.035em;
    line-height:1.24;
}

#directiveModule .section-heading p{
    margin-top:4px;
    font-size:13px;
    line-height:1.45;
}

#directiveModule .directive-hero-text p{
    max-width:980px;
    margin-top:7px;
    font-size:14px;
    line-height:1.5;
}

#directiveModule .incoming-control > .form-grid{
    grid-template-columns:minmax(0, 1fr);
    gap:12px;
}

#directiveModule .directive-intake-layout{
    grid-template-columns:minmax(0, 1.65fr) minmax(320px, .95fr);
    gap:14px;
}

#directiveModule .directive-instruction-card,
#directiveModule .directive-quick-settings-card,
#directiveModule .directive-attachments-card,
#directiveModule .directive-document-info-card{
    min-width:0;
    padding:12px 14px;
    border:1px solid #dfe6f1;
    border-radius:12px;
    background:#fff;
    box-shadow:0 2px 8px rgba(32, 55, 96, .035);
}

#directiveModule .directive-intake-card-heading{
    gap:8px;
    margin-bottom:8px;
}

#directiveModule .directive-intake-card-heading > .directive-intake-heading-icon{
    display:none;
}

#directiveModule .directive-intake-card-heading h2,
#directiveModule .directive-instruction-card .directive-intake-card-heading label{
    font-size:14px;
    font-weight:750;
    line-height:1.3;
}

#directiveModule .directive-instruction-card textarea{
    height:132px;
    min-height:132px;
    max-height:220px;
    padding:12px 13px;
    border-color:#dbe3ef;
    border-radius:10px;
    background:#fcfdff;
    font-size:13px;
}

#directiveModule .directive-quick-settings-card{
    align-content:stretch;
    gap:9px;
}

#directiveModule .directive-quick-settings-card > .directive-intake-card-heading{
    margin-bottom:1px;
}

#directiveModule .directive-quick-settings-field,
#directiveModule .directive-subtype-field{
    gap:5px;
}

#directiveModule .directive-quick-settings-field > label{
    font-size:12.5px;
}

#directiveModule .directive-quick-settings-select,
#directiveModule .directive-quick-settings-select > select,
#directiveModule .directive-quick-settings-select .compact-select-button,
#directiveModule .directive-subtype-field .compact-select-button{
    min-height:40px;
}

#directiveModule .directive-quick-settings-select-icon{
    height:38px;
}

#directiveModule .directive-attachments-card{
    padding:10px 12px;
}

#directiveModule .directive-attachments-card > .directive-intake-card-heading{
    margin-bottom:8px;
}

#directiveModule .directive-attachments-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:12px;
}

#directiveModule .directive-upload-panel,
#directiveModule .directive-file-list-panel{
    min-width:0;
    padding:8px 9px;
    border:1px solid #e3e9f2;
    border-radius:10px;
    background:#fff;
}

#directiveModule .directive-upload-panel-heading{
    gap:7px;
    margin-bottom:6px;
}

#directiveModule .directive-upload-panel-icon{
    width:27px;
    height:27px;
    flex-basis:27px;
    border-radius:8px;
}

#directiveModule .directive-upload-panel-icon svg{
    width:17px;
    height:17px;
}

#directiveModule .directive-upload-panel-heading h3{
    font-size:12.5px;
}

#directiveModule .directive-attachment-count{
    padding:4px 7px;
    font-size:11px;
}

#directiveModule .directive-upload-dropzone{
    min-height:48px;
    padding:4px 8px;
    border-radius:8px;
}

#directiveModule .directive-upload-visual{
    display:grid;
    grid-template-columns:22px minmax(0, auto) minmax(120px, 1fr);
    align-items:center;
    justify-items:start;
    gap:8px;
    padding:2px;
    text-align:left;
}

#directiveModule .directive-upload-icon{
    width:21px;
    height:21px;
}

#directiveModule .directive-upload-visual strong{
    font-size:12px;
    white-space:nowrap;
}

#directiveModule .directive-upload-visual > span{
    padding-left:9px;
    border-left:1px solid #e5eaf2;
    font-size:10.5px;
    line-height:1.35;
    text-align:left;
}

#directiveModule .directive-file-list-panel .directive-attachment-list{
    min-height:48px;
    padding:3px 5px;
    border:0;
    border-radius:7px;
    background:#fbfcfe;
}

#directiveModule .directive-attachment-empty-state{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    min-height:40px;
}

#directiveModule .directive-attachment-empty-state svg{
    width:20px;
    height:20px;
    flex:0 0 20px;
}

#directiveModule .directive-attachment-empty-state .directive-attachment-empty{
    font-size:11.5px;
}

#directiveModule .directive-document-info-card{
    display:grid;
    grid-template-columns:minmax(0, 1fr);
    gap:0;
    padding:14px 16px 13px;
}

#directiveModule .directive-document-info-card > .directive-card-heading{
    gap:0;
    margin:0 0 10px;
}

#directiveModule .directive-document-info-card .directive-card-heading-copy h2{
    font-size:17px;
    font-weight:800;
    line-height:1.25;
}

#directiveModule .directive-document-info-card .directive-card-heading-copy small{
    margin-top:3px;
    color:#78869c;
    font-size:12.5px;
    line-height:1.4;
}

#directiveModule .directive-document-info-card .directive-quick-config-card{
    min-width:0;
    margin:0 0 12px;
    padding:8px 10px;
    border:0;
    border-radius:9px;
    background:#f6f8fc;
    box-shadow:none;
}

#directiveModule .directive-quick-config-toolbar{
    display:grid;
    grid-template-columns:minmax(190px, .72fr) minmax(280px, 1.12fr) minmax(300px, 1.16fr);
    align-items:center;
    gap:12px;
}

#directiveModule .directive-quick-config-field{
    display:flex;
    align-items:center;
    gap:9px;
    min-width:0;
}

#directiveModule .directive-quick-config-system,
#directiveModule .directive-quick-config-preset-field{
    padding:0;
    border:0;
}

#directiveModule .directive-quick-config-field > label{
    flex:0 0 82px;
    gap:0;
    color:#526078;
    font-size:11.5px;
    font-weight:700;
    line-height:1.25;
}

#directiveModule .directive-quick-config-preset-field > label{
    flex-basis:98px;
}

#directiveModule .directive-quick-config-field > label svg,
#directiveModule .directive-quick-config-control-icon{
    display:none;
}

#directiveModule .directive-quick-config-control,
#directiveModule .directive-quick-config-picker{
    flex:1 1 auto;
    width:100%;
    min-width:0;
}

#directiveModule .directive-quick-config-control select,
#directiveModule .directive-quick-config-trigger{
    min-height:40px;
    border:1px solid #d7dfeb;
    border-radius:8px;
    background:#fff;
    font-size:12px;
}

#directiveModule .directive-quick-config-control select{
    padding:0 28px 0 10px;
}

#directiveModule .directive-quick-config-trigger{
    padding:6px 9px;
}

#directiveModule .directive-quick-config-selected-name{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

#directiveModule .directive-quick-config-preset-icon{
    display:none;
}

#directiveModule .directive-quick-config-default-badge{
    flex:0 0 auto;
    padding:3px 6px;
    font-size:10px;
}

#directiveModule .directive-quick-config-actions{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:8px;
    min-width:0;
    padding:0;
    border:0;
}

#directiveModule .directive-quick-config-actions > .btn{
    min-width:0;
    min-height:40px;
    padding:5px 8px;
    font-size:11.5px;
    white-space:nowrap;
}

#directiveModule .directive-quick-config-actions > .btn svg{
    width:16px;
    height:16px;
    flex:0 0 16px;
}

#directiveModule .directive-quick-config-status:empty{
    display:none;
}

#directiveModule .directive-quick-config-status{
    margin:7px 0 0;
    font-size:11.5px;
}

#directiveModule .directive-document-info-card .directive-info-grid{
    grid-template-columns:repeat(3, minmax(0, 1fr));
    row-gap:6px;
    column-gap:14px;
}

#directiveModule .directive-info-field{
    gap:4px;
}

#directiveModule .directive-info-field > label{
    font-size:12px;
    line-height:1.25;
}

#directiveModule .directive-info-control{
    min-height:40px;
    border-radius:8px;
}

#directiveModule .directive-info-control-icon{
    width:38px;
    flex-basis:38px;
}

#directiveModule .directive-info-control-icon svg{
    width:17px;
    height:17px;
}

#directiveModule .directive-info-control > input,
#directiveModule .directive-info-control > textarea{
    min-height:38px;
    padding:0 10px;
    font-size:12px;
}

#directiveModule .directive-info-control-multiline{
    min-height:54px;
}

#directiveModule .directive-info-control-multiline > textarea{
    height:52px;
    min-height:52px;
    max-height:72px;
    padding:5px 10px;
    resize:vertical;
    line-height:1.35;
}

#directiveModule .directive-document-info-card .directive-document-settings-divider{
    width:100%;
    height:1px;
    margin:15px 0;
    background:#edf1f6;
}

#directiveModule .directive-reference-draft-row{
    display:grid;
    grid-template-columns:minmax(0, .85fr) minmax(0, 1.15fr);
    gap:18px;
    min-width:0;
    align-items:stretch;
}

#directiveModule .directive-reference-section{
    grid-column:1;
    grid-row:1;
    min-width:0;
}

#directiveModule .directive-reference-section .directive-card-heading{
    gap:0;
    margin:0 0 8px;
}

#directiveModule .directive-reference-section .directive-card-heading-copy h2,
#directiveModule .directive-draft-mode-heading-copy strong{
    color:var(--navy-dark);
    font-size:14px;
    font-weight:800;
    line-height:1.3;
}

#directiveModule .directive-reference-section .directive-card-heading-copy small,
#directiveModule .directive-draft-mode-heading-copy small{
    position:absolute;
    width:1px;
    height:1px;
    overflow:hidden;
    clip:rect(0, 0, 0, 0);
    clip-path:inset(50%);
    white-space:nowrap;
}

#directiveModule .directive-document-info-card .directive-reference-options{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:9px;
    margin:0;
}

#directiveModule .directive-reference-option{
    min-height:68px;
    gap:9px;
    padding:8px 10px;
    border-radius:9px;
}

#directiveModule .directive-reference-option input,
#directiveModule .directive-draft-mode-card input{
    width:16px;
    height:16px;
    flex-basis:16px;
}

#directiveModule .directive-reference-icon,
#directiveModule .directive-draft-mode-icon{
    width:30px;
    height:30px;
    flex-basis:30px;
    border-radius:8px;
}

#directiveModule .directive-reference-icon svg,
#directiveModule .directive-draft-mode-icon svg{
    width:17px;
    height:17px;
}

#directiveModule .directive-reference-option b,
#directiveModule .directive-draft-mode-card b{
    font-size:11.5px;
    line-height:1.3;
}

#directiveModule .directive-document-info-card .directive-draft-mode-grid{
    display:grid;
    grid-column:2;
    grid-row:1;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    align-content:start;
    column-gap:8px;
    row-gap:0;
    min-width:0;
    margin:0;
    padding:0;
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
}

#directiveModule .directive-document-info-card .directive-draft-mode-grid legend{
    display:flex;
    grid-column:1 / -1;
    align-items:center;
    min-height:18.2px;
    margin:0 0 8px;
    padding:0;
}

#directiveModule .directive-reference-section .directive-card-heading{
    min-height:18.2px;
}

#directiveModule .directive-document-info-card .directive-draft-mode-grid legend > .directive-card-heading-icon{
    display:none;
}

#directiveModule .directive-draft-mode-heading-copy strong{
    display:block;
}

#directiveModule .directive-draft-mode-card{
    min-height:68px;
    align-items:center;
    gap:9px;
    padding:8px 10px;
    border-radius:9px;
}

#directiveModule .directive-draft-mode-card input{
    margin:0;
}

#directiveModule .directive-draft-mode-icon{
    display:none;
}

#directiveModule .directive-draft-mode-card b{
    align-items:center;
    gap:5px;
}

#directiveModule .directive-draft-mode-card em{
    padding:2px 5px;
    font-size:9px;
}

#directiveModule .directive-document-info-card .directive-template-selection-panel{
    grid-column:1;
    grid-row:2;
    min-width:0;
    margin:0;
}

#directiveModule .directive-document-info-card .directive-template-selection-panel[hidden]{
    display:none;
}

#directiveModule .directive-document-info-card .directive-template-selection-panel:not([hidden]){
    display:grid;
    grid-template-columns:minmax(0, 1fr) auto;
    align-items:stretch;
    gap:9px;
    padding:12px 0 0;
    border:0;
    border-top:1px solid #edf1f6;
    border-radius:0;
    background:transparent;
    box-shadow:none;
}

#directiveModule .directive-template-summary{
    align-self:center;
    min-width:0;
}

#directiveModule .directive-document-info-card .directive-template-actions{
    display:flex;
    align-items:center;
    justify-content:center;
    align-self:center;
    gap:8px;
    min-width:0;
}

#directiveModule .directive-document-info-card .directive-template-actions > .btn{
    min-width:0;
    min-height:38px;
    padding:6px 9px;
    font-size:11.5px;
}

#directiveModule .directive-document-info-card .directive-template-usage{
    grid-column:1 / -1;
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    align-content:start;
    align-self:stretch;
    margin:0;
    padding:8px 0 0;
    border:0;
    border-top:1px solid #edf1f6;
    border-radius:0;
    background:transparent;
}

#directiveModule .directive-document-info-card .directive-template-usage legend{
    grid-column:1 / -1;
    margin-bottom:0;
}

#directiveModule .directive-document-info-card .directive-template-usage .directive-template-option{
    min-width:0;
    gap:8px;
    padding:8px 9px;
    border-radius:9px;
}

#directiveModule .directive-document-info-card .directive-form-actions{
    display:flex;
    align-items:center;
    justify-content:flex-start;
    flex-direction:row;
    margin-top:12px;
    padding:12px 0 0;
    border-top:1px solid #edf1f6;
}

#directiveModule .directive-form-actions #directiveAnalyzeButton{
    min-height:45px;
    padding:0 23px;
    border-radius:9px;
    font-size:14px;
    font-weight:750;
    box-shadow:0 3px 10px rgba(37, 78, 166, .13);
}

@media (max-width:1199px){
    #directiveModule .directive-hero{
        grid-template-columns:minmax(0, 1.1fr) minmax(280px, .8fr);
        gap:16px;
    }

    #directiveModule .directive-hero-copy{
        grid-column:1;
    }

    #directiveModule .directive-hero-art{
        grid-column:2;
        grid-row:1;
    height:98px;
    }

    #directiveModule .directive-intake-layout{
        grid-template-columns:minmax(0, 1.55fr) minmax(290px, .95fr);
    }

    #directiveModule .directive-quick-config-toolbar{
        grid-template-columns:minmax(0, 1fr) minmax(0, 1.25fr);
    }

    #directiveModule .directive-quick-config-actions{
        grid-column:1 / -1;
        justify-self:end;
        width:min(390px, 100%);
    }

    #directiveModule .directive-document-info-card .directive-info-grid{
        grid-template-columns:repeat(2, minmax(0, 1fr));
    }

    #directiveModule .directive-reference-draft-row{
        grid-template-columns:minmax(0, 1fr);
        gap:14px;
    }

    #directiveModule .directive-reference-section,
    #directiveModule .directive-document-info-card .directive-draft-mode-grid,
    #directiveModule .directive-document-info-card .directive-template-selection-panel{
        grid-column:1;
    }

    #directiveModule .directive-reference-section{
        grid-row:1;
    }

    #directiveModule .directive-document-info-card .directive-template-selection-panel{
        grid-row:2;
        grid-template-columns:minmax(0, .85fr) minmax(0, 1.15fr);
    }

    #directiveModule .directive-document-info-card .directive-draft-mode-grid{
        grid-row:3;
        grid-template-columns:repeat(3, minmax(0, 1fr));
    }

    #directiveModule .directive-document-info-card .directive-template-usage{
        grid-column:1 / -1;
    }
}

@media (max-width:900px){
    #directiveModule .directive-hero{
        grid-template-columns:minmax(0, 1fr);
        gap:8px;
    }

    #directiveModule .directive-hero-copy,
    #directiveModule .directive-hero-art{
        grid-column:1;
    }

    #directiveModule .directive-hero-art{
        justify-self:end;
        width:min(470px, 100%);
        height:96px;
    }
}

@media (max-width:760px){
    #directiveModule .section-heading{
        margin-bottom:12px;
    }

    #directiveModule .directive-hero{
        grid-template-columns:minmax(0, 1fr);
        gap:12px;
        padding:14px;
    }

    #directiveModule .directive-hero-copy{
        grid-template-columns:42px minmax(0, 1fr);
        grid-column:1;
        gap:10px;
    }

    #directiveModule .directive-hero-icon{
        width:42px;
        height:42px;
        border-radius:12px;
    }

    #directiveModule .directive-hero-icon svg{
        width:24px;
        height:24px;
    }

    #directiveModule .directive-hero-art{
        grid-column:1;
        grid-row:auto;
        height:82px;
    }

    #directiveModule .directive-hero-illustration{
        width:100%;
        right:0;
        left:auto;
        transform:translateX(18px) scale(1.04);
    }

    #directiveModule .directive-hero-art .directive-hero-tagline{
        left:2%;
        bottom:10px;
        font-size:11.5px;
    }

    #directiveModule .section-heading h1{
        font-size:22px;
    }

    #directiveModule .section-heading p{
        font-size:12.5px;
    }

    #directiveModule .directive-intake-layout,
    #directiveModule .directive-attachments-grid{
        grid-template-columns:minmax(0, 1fr);
    }

    #directiveModule .directive-instruction-card,
    #directiveModule .directive-quick-settings-card,
    #directiveModule .directive-attachments-card,
    #directiveModule .directive-document-info-card{
        padding:11px;
    }

    #directiveModule .directive-quick-config-toolbar{
        grid-template-columns:minmax(0, 1fr);
        gap:9px;
    }

    #directiveModule .directive-quick-config-field{
        align-items:stretch;
        flex-direction:column;
        gap:5px;
    }

    #directiveModule .directive-quick-config-field > label,
    #directiveModule .directive-quick-config-preset-field > label{
        flex-basis:auto;
    }

    #directiveModule .directive-quick-config-actions{
        grid-column:1;
        justify-self:stretch;
        width:100%;
        grid-template-columns:repeat(2, minmax(0, 1fr));
    }

    #directiveModule .directive-upload-visual{
        grid-template-columns:22px minmax(0, 1fr);
    }

    #directiveModule .directive-upload-visual > span{
        grid-column:2;
        padding:0;
        border:0;
    }

    #directiveModule .directive-document-info-card .directive-info-grid,
    #directiveModule .directive-document-info-card .directive-reference-options{
        grid-template-columns:minmax(0, 1fr);
    }

    #directiveModule .directive-document-settings-divider{
        margin:12px 0;
    }

    #directiveModule .directive-document-info-card .directive-draft-mode-grid{
        grid-template-columns:minmax(0, 1fr);
        row-gap:8px;
    }

    #directiveModule .directive-document-info-card .directive-draft-mode-grid legend{
        margin-bottom:0;
    }

    #directiveModule .directive-document-info-card .directive-template-selection-panel:not([hidden]){
        grid-template-columns:minmax(0, 1fr);
        gap:10px;
    }

    #directiveModule .directive-document-info-card .directive-template-usage{
        grid-column:1;
        grid-template-columns:minmax(0, 1fr);
    }

    #directiveModule .directive-document-info-card .directive-template-usage legend{
        grid-column:1;
    }

    #directiveModule .directive-form-actions #directiveAnalyzeButton{
        width:100%;
    }
}

@media (max-width:420px){
    #directiveModule .directive-quick-config-actions{
        grid-template-columns:minmax(0, 1fr);
    }

    #directiveModule .directive-reference-option{
        min-height:68px;
    }
}

#reviewModule .section-heading{
    align-items:center;
    gap:20px;
}

#reviewModule .review-heading-art{
    flex:0 0 auto;
    align-self:center;
    margin:0 clamp(48px, 10vw, 200px) 0 0;
    width:min(160px, 18vw);
    height:auto;
    max-width:25%;
    filter:brightness(1.04);
    object-fit:contain;
}

@media (max-width:900px){
    #reviewModule .section-heading{
        flex-direction:column;
        align-items:stretch;
        gap:8px;
    }

    #reviewModule .review-heading-art{
        align-self:flex-end;
        margin-right:0;
        width:min(160px, 50vw);
        max-width:100%;
    }
}
