:root {
    --primary: #1683d8;
    --primary-dark: #0b5fa5;
    --primary-soft: #eaf5fd;
    --navy: #12263a;
    --sidebar: #102437;
    --canvas: #f5f7fa;
    --border: #e3e9ef;
    --text: #172536;
    --muted: #6f7d8c;
    --success: #1b9b69;
    --warning: #e79a27;
    --danger: #c94444;
    --violet: #7657cf;
    --radius: 14px;
    --shadow: 0 8px 28px rgba(25, 49, 74, .07);
    --sidebar-width: 270px;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--text); background: var(--canvas); font-family: Inter, "Segoe UI", Arial, sans-serif; font-size: 14px; }
a { color: var(--primary-dark); text-decoration: none; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 1030; display: flex; width: var(--sidebar-width); flex-direction: column; color: #dce7f0; background: var(--sidebar); }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; height: 78px; padding: 0 22px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-lockup { display: inline-flex; align-items: center; gap: 10px; color: inherit; font-size: 18px; font-weight: 750; letter-spacing: -.02em; }
.brand-lockup:hover { color: inherit; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: #fff; background: var(--primary); }
.tenant-switch { display: flex; align-items: center; gap: 10px; margin: 18px 14px; padding: 12px; border: 1px solid rgba(255,255,255,.09); border-radius: 11px; background: rgba(255,255,255,.045); }
.tenant-switch > div { min-width: 0; }
.tenant-switch small, .tenant-switch strong { display: block; }
.tenant-switch small { margin-bottom: 2px; color: #8ea3b5; font-size: 9px; letter-spacing: .09em; }
.tenant-switch strong { overflow: hidden; color: #fff; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.tenant-logo { display: grid; flex: 0 0 34px; height: 34px; place-items: center; border-radius: 9px; color: var(--primary-dark); background: #fff; font-size: 11px; font-weight: 800; }
.main-nav { overflow-y: auto; flex: 1; padding: 0 11px 18px; }
.nav-label { display: block; padding: 18px 11px 7px; color: #7790a4; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.main-nav a, .nav-disabled { display: flex; align-items: center; gap: 11px; min-height: 45px; margin: 2px 0; padding: 0 11px; border-radius: 9px; color: #b9c9d6; font-size: 14px; }
.main-nav a i, .nav-disabled i { width: 19px; font-size: 16px; }
.main-nav a:hover, .main-nav a.active { color: #fff; background: rgba(22,131,216,.2); }
.main-nav a.active { box-shadow: inset 3px 0 0 var(--primary); }
.nav-disabled { cursor: default; opacity: .58; }
.nav-disabled small { margin-left: auto; font-size: 9px; }
.sidebar-foot { display: grid; gap: 8px; padding: 16px 18px 20px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-foot a, .sidebar-security { display: flex; align-items: center; gap: 9px; color: #aebfcd; font-size: 12px; }
.sidebar-foot a:hover { color: #fff; }
.main-area { min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar { position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; height: 72px; padding: 0 28px; border-bottom: 1px solid var(--border); background: #fff; }
.topbar-tenant { align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.icon-btn { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--border); border-radius: 9px; color: #5e7183; background: #fff; }
.sidebar-close { color: #fff; border-color: rgba(255,255,255,.15); background: transparent; }
.user-chip { display: flex; align-items: center; gap: 9px; }
.user-chip strong, .user-chip small { display: block; }
.user-chip strong { font-size: 12px; }
.user-chip small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.user-avatar, .avatar { display: grid; place-items: center; border-radius: 10px; color: var(--primary-dark); background: var(--primary-soft); font-weight: 800; }
.user-avatar { width: 36px; height: 36px; font-size: 11px; }
.avatar { flex: 0 0 42px; width: 42px; height: 42px; font-size: 12px; }
.avatar.xl { flex-basis: 68px; width: 68px; height: 68px; border-radius: 17px; font-size: 19px; }
.page-content { max-width: 1600px; margin: auto; padding: 32px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-heading h1 { margin: 3px 0 6px; font-size: 30px; font-weight: 760; letter-spacing: -.035em; }
.page-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.eyebrow { color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.btn { padding: .67rem 1rem; border-radius: 9px; font-size: 14px; font-weight: 650; }
.btn-sm { padding: .4rem .7rem; font-size: 12px; }
.btn-primary { border-color: var(--primary); background: var(--primary); }
.btn-primary:hover, .btn-primary:focus { border-color: var(--primary-dark); background: var(--primary-dark); }
.btn-light { border-color: var(--border); background: #fff; }
.panel, .metric-card { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.panel { padding: 22px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel h2, .panel-head h2 { margin: 0; font-size: 16px; font-weight: 760; }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.metric-card { min-height: 160px; padding: 19px; }
.metric-card > small { display: block; margin: 15px 0 4px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.metric-value { display: flex; align-items: baseline; gap: 7px; }
.metric-value strong { font-size: 28px; letter-spacing: -.04em; }
.metric-value span { color: var(--muted); font-size: 12px; }
.metric-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 10px; font-size: 17px; }
.metric-icon.blue { color: var(--primary-dark); background: var(--primary-soft); }
.metric-icon.green { color: #16825b; background: #e8f8f1; }
.metric-icon.amber { color: #a96c17; background: #fff4df; }
.metric-icon.violet { color: var(--violet); background: #f1edfc; }
.metric-note { margin: 12px 0 0; color: var(--muted); font-size: 11px; }
.progress { height: 6px; border-radius: 99px; background: #e6edf2; }
.progress-bar { border-radius: 99px; background: var(--primary); }
.alert-soft { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 22px; padding: 15px 17px; border: 1px solid #cfe8fa; border-radius: 11px; color: #315a78; background: var(--primary-soft); }
.alert-soft i { color: var(--primary); font-size: 19px; }
.alert-soft strong { display: block; color: var(--text); font-size: 13px; }
.alert-soft p { margin: 3px 0 0; font-size: 12px; }
.area-list > div { display: grid; grid-template-columns: 42px minmax(0,1fr) minmax(120px,180px); align-items: center; gap: 12px; padding: 15px 0; border-top: 1px solid var(--border); }
.area-list > div:first-child { border-top: 0; }
.area-list strong, .area-list small { display: block; }
.area-list strong { font-size: 13px; }
.area-list small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.area-progress > span { display: block; margin-bottom: 5px; text-align: right; font-size: 11px; font-weight: 750; }
.task-list { display: grid; gap: 0; }
.task-item { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--border); }
.task-item:first-child { border-top: 0; }
.task-state { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; border-radius: 10px; color: var(--primary-dark); background: var(--primary-soft); }
.task-item strong, .task-item small { display: block; }
.task-item strong { font-size: 13px; }
.task-item small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.form-control, .form-select { min-height: 42px; border-color: #dbe4eb; border-radius: 9px; color: var(--text); font-size: 14px; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(22,131,216,.12); }
.form-label { margin-bottom: 6px; color: #44596a; font-size: 13px; font-weight: 700; }
.form-text { color: var(--muted); font-size: 11px; }
.section-title { display: flex; align-items: center; gap: 12px; margin-bottom: 21px; }
.section-title > span { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 9px; color: var(--primary-dark); background: var(--primary-soft); font-size: 10px; font-weight: 800; }
.section-title h2, .section-title p { margin: 0; }
.section-title h2 { font-size: 16px; }
.section-title p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.validation-summary-errors, .field-error { color: var(--danger); font-size: 12px; }
.validation-summary-errors { margin-bottom: 16px; padding: 12px 14px; border: 1px solid #f1cccc; border-radius: 9px; background: #fff7f7; }
.validation-summary-errors ul { margin: 0; padding-left: 18px; }
.message-success, .message-warning, .message-error { margin-bottom: 18px; padding: 12px 14px; border-radius: 9px; font-size: 13px; }
.message-success { color: #126d4c; border: 1px solid #bce6d5; background: #eaf8f2; }
.message-warning { color: #805313; border: 1px solid #f2d7a9; background: #fff7e9; }
.message-error { color: #9c3030; border: 1px solid #f1cccc; background: #fff7f7; }
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 17px; }
.toolbar .search-box { position: relative; flex: 1; }
.search-box i { position: absolute; top: 12px; left: 13px; color: #8695a4; }
.search-box input { padding-left: 38px; }
.toolbar .form-select { width: 190px; }
.data-table { margin: 0; }
.data-table th { padding: 11px; border-color: var(--border); color: #758494; background: #f8fafb; font-size: 10px; font-weight: 800; letter-spacing: .06em; white-space: nowrap; }
.data-table td { padding: 13px 11px; border-color: var(--border); color: #506173; font-size: 12px; vertical-align: middle; }
.contact-cell { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.contact-cell strong, .contact-cell small { display: block; }
.contact-cell strong { color: var(--text); font-size: 13px; }
.contact-cell small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.badge-soft, .status { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 99px; font-size: 10px; font-weight: 700; }
.badge-soft { margin: 2px; color: var(--primary-dark); background: var(--primary-soft); }
.status.active { color: #16825b; background: #e8f8f1; }
.status.inactive { color: #6e7780; background: #edf0f3; }
.empty-state { padding: 46px 20px; text-align: center; }
.empty-state i { display: grid; width: 50px; height: 50px; margin: 0 auto 13px; place-items: center; border-radius: 13px; color: var(--primary); background: var(--primary-soft); font-size: 22px; }
.empty-state h2 { margin: 0 0 6px; }
.empty-state p { margin: 0 0 16px; color: var(--muted); font-size: 12px; }
.profile-hero { display: flex; align-items: center; gap: 17px; margin-bottom: 24px; }
.profile-hero h1 { margin: 0 0 5px; font-size: 26px; }
.profile-hero p { margin: 0; color: var(--muted); font-size: 13px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.detail-grid small, .detail-grid strong { display: block; }
.detail-grid small { margin-bottom: 5px; color: var(--muted); font-size: 9px; letter-spacing: .08em; }
.detail-grid strong { font-size: 13px; }
.role-card { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-top: 1px solid var(--border); }
.role-card:first-of-type { border-top: 0; }
.role-card p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.role-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-options label { display: flex; gap: 10px; min-height: 78px; padding: 13px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.role-options label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.role-options input { margin-top: 3px; accent-color: var(--primary); }
.role-options strong, .role-options small { display: block; }
.role-options strong { font-size: 13px; }
.role-options small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.role-check-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; padding: 0; list-style: none; }
.role-check-list li { display: flex; align-items: center; min-height: 54px; padding: 13px; border: 1px solid var(--border); border-radius: 10px; }
.role-check-list input { margin-right: 9px; accent-color: var(--primary); }
.role-check-list label { font-size: 12px; font-weight: 650; }
.breadcrumb-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.back-link { display: inline-flex; align-items: center; gap: 7px; color: #526678; font-size: 12px; font-weight: 650; }
.side-summary { position: sticky; top: 94px; }
.check-list { display: grid; gap: 10px; }
.check-list > div { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.check-list > div.done { color: var(--text); }
.check-list .done i { color: var(--success); }
.sidebar-backdrop { display: none; }

.procedure-summary { display: flex; min-height: 116px; flex-direction: column; justify-content: center; padding: 20px 22px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.procedure-summary small { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .09em; }
.procedure-summary strong { margin: 3px 0 1px; font-size: 29px; line-height: 1; }
.procedure-summary span { color: var(--muted); font-size: 11px; }
.procedure-list-head { margin: 0; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.procedure-table td:nth-child(2) { min-width: 290px; }
.procedure-table .process-child td:nth-child(2) { padding-left: 28px; }
.process-code { display: inline-grid; min-width: 34px; height: 30px; padding: 0 8px; place-items: center; border-radius: 8px; color: var(--primary-dark); background: var(--primary-soft); font-size: 10px; font-weight: 800; }
.procedure-status { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 99px; font-size: 10px; font-weight: 750; white-space: nowrap; }
.procedure-status.not-started { color: #667481; background: #edf1f4; }
.procedure-status.in-progress { color: var(--primary-dark); background: var(--primary-soft); }
.procedure-status.in-review { color: #976216; background: #fff2d9; }
.procedure-status.approved { color: #12704e; background: #e5f7ef; }
.procedure-status.not-applicable { color: #69717a; background: #f1f2f3; }
.procedure-progress { min-width: 120px; }
.procedure-progress > span { display: block; margin-bottom: 5px; font-size: 10px; font-weight: 700; text-align: right; }
.procedure-hero { display: grid; grid-template-columns: 64px minmax(0,1fr) auto; align-items: center; gap: 18px; margin-bottom: 18px; }
.procedure-code-large { display: grid; width: 64px; height: 64px; place-items: center; border-radius: 16px; color: #fff; background: linear-gradient(145deg,var(--primary),var(--primary-dark)); font-size: 24px; font-weight: 800; box-shadow: 0 8px 20px rgba(22,131,216,.22); }
.procedure-hero-copy h1 { margin: 3px 0 7px; font-size: 25px; letter-spacing: -.03em; }
.procedure-hero-copy p { margin: 0; color: var(--muted); font-size: 13px; }
.procedure-meta-line { display: flex; flex-wrap: wrap; gap: 7px 16px; margin-top: 10px; color: #526678; font-size: 11px; }
.procedure-meta-line span { display: inline-flex; align-items: center; gap: 6px; }
.procedure-hero-state { display: grid; justify-items: end; gap: 5px; min-width: 112px; }
.procedure-hero-state strong { font-size: 24px; line-height: 1; }
.procedure-hero-state small { color: var(--muted); font-size: 10px; }
.procedure-anchor-nav { position: sticky; top: 82px; z-index: 1010; display: flex; overflow-x: auto; gap: 6px; margin: 0 0 18px; padding: 7px; border: 1px solid var(--border); border-radius: 11px; background: rgba(255,255,255,.97); box-shadow: 0 7px 20px rgba(18,38,58,.08); backdrop-filter: blur(8px); }
.procedure-anchor-nav a { flex: 0 0 auto; padding: 7px 10px; border-radius: 7px; color: #536778; font-size: 12px; font-weight: 650; }
.procedure-anchor-nav a:hover { color: var(--primary-dark); background: var(--primary-soft); }
.procedure-section { margin-bottom: 18px; scroll-margin-top: 90px; }
.procedure-section textarea.form-control { min-height: 92px; resize: vertical; }
.register-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 21px 0 10px; }
.register-heading-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.register-add-button { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.register-add-button.active { color: #fff; border-color: var(--primary); background: var(--primary); }
.register-count { min-width: 26px; padding: 4px 8px; border-radius: 99px; color: var(--primary-dark); background: var(--primary-soft); font-size: 10px; font-weight: 800; text-align: center; }
.register-table { margin-bottom: 0; }
.register-table td { min-width: 120px; }
.register-table td:first-child { min-width: 180px; }
.register-table .register-actions { min-width: 94px; white-space: nowrap; }
.register-empty { display: block; padding: 18px; border: 1px dashed #cbd7e0; border-radius: 9px; color: var(--muted); background: #fafcfd; font-size: 12px; text-align: center; }
.register-section { display: flex; flex-direction: column; }
.register-section > .register-heading { order: 1; }
.register-section > .register-editor { order: 2; }
.register-section > .register-empty, .register-section > .table-responsive { order: 3; }
.register-editor { margin: 0 0 14px; padding: 17px; border: 1px solid #d6e5f0; border-radius: 11px; background: #f8fbfd; scroll-margin-top: 138px; }
.register-editor:not([open]) { display: none; }
.register-editor > summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; color: var(--primary-dark); font-size: 13px; font-weight: 750; }
.register-editor > summary::after { color: var(--muted); content: "Chiudi ×"; font-size: 10px; font-weight: 650; }
.register-editor[open] > summary { margin-bottom: 13px; }
.register-editor .section-title { margin-bottom: 14px; }
.approval-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.procedure-workflow h2 { margin-bottom: 4px; }
.workflow-progress { margin: 17px 0; }
.workflow-progress > strong { display: block; margin-bottom: 7px; color: var(--text); font-size: 18px; text-align: right; }
.workflow-steps { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.workflow-steps > div { position: relative; display: grid; grid-template-columns: 28px 1fr; align-items: start; gap: 10px; min-height: 50px; color: var(--muted); font-size: 11px; }
.workflow-steps > div > i { display: grid; z-index: 1; width: 26px; height: 26px; place-items: center; border: 1px solid var(--border); border-radius: 50%; background: #fff; }
.workflow-steps > div:not(:last-child)::after { position: absolute; top: 26px; bottom: 0; left: 12px; width: 2px; background: var(--border); content: ""; }
.workflow-steps > div.done { color: var(--text); font-weight: 650; }
.workflow-steps > div.done > i { color: #fff; border-color: var(--success); background: var(--success); }
.workflow-steps > div.done:not(:last-child)::after { background: var(--success); }
.workflow-info { margin-top: 13px; padding: 11px 12px; border-radius: 9px; color: #4d6577; background: #f3f7fa; font-size: 10px; line-height: 1.55; }
.workflow-info span { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 0; }
.workflow-info small { color: var(--muted); font-size: 9px; letter-spacing: .06em; }

/* Compilazione guidata del manuale: stessi pannelli in tutte le procedure. */
.procedure-section { scroll-margin-top: 150px; }
.procedure-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 18px; }
.procedure-panel-heading > .section-title { margin-bottom: 0; min-width: 0; }
.procedure-panel-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.procedure-panel-toggle, .procedure-help-button { display: inline-grid; width: 32px; height: 32px; place-items: center; flex: 0 0 32px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--primary-dark); }
.procedure-help-button { border-radius: 50%; font-weight: 800; }
.procedure-panel-toggle:focus-visible, .procedure-help-button:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.procedure-panel-toggle[aria-expanded="true"] i { transform: rotate(180deg); }
.procedure-section.is-collapsed > .procedure-panel-heading, .procedure-workflow.is-collapsed > .procedure-panel-heading { margin-bottom: 0; }
.procedure-panel-body[hidden], .procedure-help[hidden], [data-other-target] ~ [hidden] { display: none !important; }
.register-section > .procedure-panel-body { order: 2; min-width: 0; }
.register-section > .procedure-panel-heading { order: 1; }
.procedure-panel-heading .section-title > span { min-width: 42px; width: auto; padding: 0 7px; }
.procedure-help { margin-bottom: 18px; padding: 16px 18px; border-left: 3px solid var(--primary); border-radius: 8px; background: var(--primary-soft); color: #39566b; font-size: 13px; line-height: 1.7; }
.procedure-help p:last-child { margin-bottom: 0; }
.manual-context { padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: #fafcfe; font-size: 15px; line-height: 1.8; }
.manual-sentence + .manual-sentence { margin-top: 22px; }
.manual-slot { display: block; margin: 8px 0; }
.manual-slot .form-label { font-size: 11px; color: var(--primary-dark); line-height: 1.5; }
.manual-context .manual-auto { padding: 3px 7px; border-radius: 5px; color: var(--primary-dark); background: var(--primary-soft); }
.manual-derived { background: #edf4f8; }
.manual-recipient-list { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 0; padding: 8px 0; list-style: none; }
.manual-recipient-list input { margin-right: 8px; accent-color: var(--primary); }
.manual-recipient-list label { cursor: pointer; }
.version-number::-webkit-inner-spin-button { opacity: 1; }
.threshold-table td { min-width: 190px; vertical-align: middle; }
.threshold-table td:nth-child(2) { min-width: 280px; }
.threshold-table .form-label { display: block; margin: 6px 0; }
.threshold-table .input-group > .form-control { min-width: 100px; }
.threshold-table .input-group > .form-select { max-width: 105px; }
@media (max-width: 767.98px) {
    .procedure-panel-heading { flex-wrap: wrap; }
    .procedure-panel-actions { margin-left: auto; }
    .procedure-panel-heading .register-heading-actions { flex-wrap: wrap; justify-content: flex-end; }
    .procedure-panel-heading .register-count { margin-right: auto; }
    .manual-context { padding: 14px; }
}

.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px,44%) 1fr; background: #fff; }
.login-brand-panel { position: relative; display: flex; overflow: hidden; flex-direction: column; justify-content: space-between; padding: 46px 56px; color: #fff; background: linear-gradient(145deg,rgba(10,85,143,.94),rgba(11,36,59,.98)), radial-gradient(circle at 20% 25%,#45b5ff,transparent 35%); }
.login-brand-panel::after { position: absolute; right: -240px; bottom: -180px; width: 440px; height: 440px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 75px rgba(255,255,255,.035),0 0 0 150px rgba(255,255,255,.025); content: ""; }
.login-brand-panel .brand-mark { color: var(--primary); background: #fff; }
.login-message { position: relative; z-index: 1; max-width: 510px; }
.login-message h1 { margin: 16px 0 22px; font-size: 48px; font-weight: 760; line-height: 1.12; letter-spacing: -.035em; }
.login-message p { color: rgba(255,255,255,.72); font-size: 18px; line-height: 1.65; }
.login-form-panel { display: grid; min-height: 100vh; padding: 40px; place-items: center; }
.login-card { width: 100%; max-width: 430px; }
.login-card h2 { margin: 0 0 8px; font-size: 34px; letter-spacing: -.025em; }
.support-note { display: flex; align-items: center; gap: 13px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; }
.support-note > i { color: var(--primary); font-size: 21px; }
.input-group .btn { border-color: #dbe4eb; }
.setup-shell { min-height: 100vh; padding: 40px 18px; background: linear-gradient(180deg,#f7fbfe,#f4f7fa); }
.setup-card { max-width: 780px; margin: 0 auto; }

.user-chip-button { padding: 4px 6px; border: 0; color: var(--text); background: transparent; text-align: left; }
.user-chip-button:hover, .user-chip-button:focus { color: var(--text); background: var(--primary-soft); }
.user-chip-button > i { margin-left: 4px; color: var(--muted); font-size: 11px; }
.user-chip-copy { line-height: 1.2; }
.account-menu { min-width: 210px; padding: 7px; border-color: var(--border); border-radius: 11px; box-shadow: var(--shadow); }
.account-menu .dropdown-item { padding: 9px 11px; border-radius: 7px; color: #405467; font-size: 13px; }
.account-menu .dropdown-item:hover { color: var(--primary-dark); background: var(--primary-soft); }
.global-message { margin-bottom: 22px; }

.auth-switch { margin: 20px 0 0; color: var(--muted); text-align: center; }
.auth-switch a { color: var(--primary); font-weight: 700; }
.register-shell { min-height: 100vh; background: linear-gradient(180deg,#f7fbfe,#f4f7fa); }
.register-topbar { display: flex; align-items: center; justify-content: space-between; height: 76px; padding: 0 clamp(22px,5vw,72px); border-bottom: 1px solid var(--border); background: #fff; }
.register-topbar > span { color: var(--muted); }
.register-main { display: grid; grid-template-columns: .85fr 1.15fr; align-items: start; gap: 70px; max-width: 1120px; margin: auto; padding: 64px 28px; }
.register-intro h1 { margin: 12px 0 20px; font-size: 42px; line-height: 1.14; letter-spacing: -.035em; }
.register-intro > p { color: var(--muted); font-size: 17px; line-height: 1.65; }
.register-steps { margin: 38px 0 0; padding: 0; list-style: none; }
.register-steps li { display: flex; align-items: center; gap: 13px; padding: 12px 0; color: #8795a3; }
.register-steps li > span { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid #cfd9e1; border-radius: 50%; font-weight: 700; }
.register-steps li strong, .register-steps li small { display: block; }
.register-steps li small { font-size: 11px; }
.register-steps li.active { color: var(--text); }
.register-steps li.active > span { color: #fff; border-color: var(--primary); background: var(--primary); }
.register-card { padding: 30px; border: 1px solid var(--border); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.consent-check { display: flex; gap: 10px; margin: 22px 0 4px; color: var(--muted); font-size: 13px; }
.consent-check input { margin-top: 3px; accent-color: var(--primary); }
.secure-copy { margin: 15px 0 0; color: var(--muted); font-size: 11px; text-align: center; }
.success-mark { display: grid; width: 62px; height: 62px; margin: 0 auto 18px; place-items: center; border-radius: 18px; color: #fff; background: var(--success); font-size: 30px; }

.account-grid { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(280px,.75fr); gap: 24px; }
.subscription-card { border-top: 3px solid var(--primary); }
.subscription-head { display: flex; justify-content: space-between; gap: 16px; }
.subscription-head h2 { margin: 4px 0; font-size: 23px; }
.subscription-head p { margin: 0; color: var(--muted); }
.plan-kicker { color: var(--primary); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.plan-price { display: flex; align-items: center; gap: 12px; margin: 24px 0; }
.plan-price strong { font-size: 35px; letter-spacing: -.04em; }
.plan-price span { color: var(--muted); font-size: 11px; line-height: 1.4; }
.plan-features { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; color: #465a6c; font-size: 12px; }
.plan-features i { margin-right: 7px; color: var(--success); }
.renewal-row { display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 18px; }
.renewal-row small, .renewal-row strong { display: block; }
.renewal-row small { margin-bottom: 3px; color: var(--muted); font-size: 9px; letter-spacing: .07em; }
.billing-summary .detail-line { padding: 11px 0; }
.detail-line { display: flex; justify-content: space-between; gap: 18px; padding: 7px 0; font-size: 12px; }
.detail-line strong { text-align: right; }
.payment-placeholder { display: flex; align-items: center; gap: 13px; padding: 17px; border: 1px dashed #cbd7e0; border-radius: 11px; color: var(--muted); background: #fafcfd; }
.payment-placeholder > i { color: var(--primary); font-size: 27px; }
.payment-placeholder strong, .payment-placeholder small { display: block; }
.payment-placeholder strong { color: var(--text); }
.payment-placeholder small { margin-top: 3px; font-size: 11px; }
.credit-card-panel { height: 100%; }
.credit-value { font-size: 34px; font-weight: 780; letter-spacing: -.04em; }
.credit-card-panel > p { color: var(--muted); font-size: 12px; line-height: 1.5; }
.invoice-table th { color: var(--muted); background: #f8fafb; font-size: 10px; letter-spacing: .06em; }
.invoice-table th, .invoice-table td { padding: 12px; border-color: var(--border); font-size: 12px; }
.empty-state.compact { padding: 28px 20px; }
.account-summary-card { text-align: center; }
.account-summary-card .account-avatar { width: 68px; height: 68px; margin: 0 auto 14px; border-radius: 17px; font-size: 19px; }
.account-summary-card > p { color: var(--muted); }
.account-summary-card .detail-line { text-align: left; }
.security-note > h2 { margin-top: 15px; }
.security-note > p { color: var(--muted); line-height: 1.6; }

@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
    .sidebar.open { transform: translateX(0); box-shadow: 10px 0 35px rgba(0,0,0,.2); }
    .main-area { margin-left: 0; }
    .sidebar-backdrop { position: fixed; inset: 0; z-index: 1020; background: rgba(5,18,31,.46); }
    .sidebar-backdrop.show { display: block; }
    body.sidebar-open { overflow: hidden; }
    .page-content { padding: 22px; }
    .role-options { grid-template-columns: 1fr; }
    .role-check-list { grid-template-columns: 1fr; }
    .side-summary { position: static; }
    .procedure-hero { grid-template-columns: 54px minmax(0,1fr); }
    .procedure-code-large { width: 54px; height: 54px; }
    .procedure-hero-state { grid-column: 1 / -1; grid-template-columns: auto auto 1fr; align-items: center; justify-items: start; }
    .login-shell { display: block; }
    .register-main { grid-template-columns: 1fr; gap: 34px; padding-top: 40px; }
    .account-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767.98px) {
    .topbar { padding: 0 18px; }
    .page-content { padding: 18px; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .page-heading .btn { width: 100%; }
    .page-heading h1 { font-size: 26px; }
    .toolbar { align-items: stretch; flex-direction: column; }
    .toolbar .form-select { width: 100%; }
    .area-list > div { grid-template-columns: 42px 1fr; }
    .area-progress { grid-column: 2; }
    .detail-grid { grid-template-columns: 1fr; }
    .panel { padding: 18px; }
    .login-form-panel { padding: 24px; }
    .breadcrumb-row { align-items: flex-start; flex-direction: column; }
    .procedure-anchor-nav { top: 80px; margin-right: -8px; margin-left: -8px; border-radius: 9px; }
    .procedure-hero { display: block; }
    .procedure-code-large { margin-bottom: 14px; }
    .procedure-hero-state { display: flex; margin-top: 15px; }
    .approval-grid { grid-template-columns: 1fr; }
    .procedure-section { padding: 16px; }
    .register-heading { align-items: flex-start; flex-direction: column; }
    .register-heading-actions { width: 100%; justify-content: space-between; }
    .register-topbar > span { font-size: 0; }
    .register-topbar .btn { font-size: 13px; }
    .register-main { padding: 30px 18px; }
    .register-intro h1 { font-size: 33px; }
    .plan-features { grid-template-columns: 1fr; }
    .renewal-row { grid-template-columns: 1fr 1fr; }
    .renewal-row .btn { grid-column: 1 / -1; }
    .subscription-head { align-items: flex-start; }
}
