:root {
    --ink: #172033;
    --muted: #667085;
    --line: #d9e1ea;
    --surface: #ffffff;
    --canvas: #f4f7fb;
    --primary: #17616b;
    --primary-2: #1f7a68;
    --accent: #c98a1d;
    --danger: #b42318;
    --sidebar: #123746;
    --sidebar-2: #0f4f55;
    --shadow: 0 18px 50px rgba(15, 35, 55, .10);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--canvas);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: 0;
}

a { text-decoration: none; }

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

.app-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 20px 16px;
    background: linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 20;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}

.brand:hover { color: #fff; }

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: #e9f7f2;
    color: var(--primary);
    font-size: 22px;
}

.brand strong,
.brand small {
    display: block;
    line-height: 1.05;
}

.brand small {
    color: #bfd7d9;
    font-size: 12px;
    margin-top: 4px;
}

.brand.big .brand-mark {
    width: 56px;
    height: 56px;
    font-size: 28px;
}

.brand.big strong { font-size: 24px; }

.sidebar-nav {
    display: grid;
    gap: 6px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #dcebed;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255, 255, 255, .13);
    color: #fff;
    transform: translateX(2px);
}

.sidebar-nav i { font-size: 18px; }

.sidebar-foot {
    margin-top: auto;
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
}

.role-chip {
    width: fit-content;
    background: #f5c56d;
    color: #1f2937;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
}

.sidebar-foot small { color: #c4d7d9; }

.app-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    min-height: 76px;
    padding: 14px 28px;
    background: rgba(244, 247, 251, .92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(217, 225, 234, .8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.app-topbar h1 {
    font-size: 22px;
    line-height: 1.2;
    margin: 0;
}

.app-topbar span {
    color: var(--muted);
    font-size: 13px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-user strong,
.topbar-user small {
    display: block;
    line-height: 1.1;
}

.topbar-user small { color: var(--muted); }

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #e7f5f0;
    color: var(--primary);
    font-weight: 800;
}

.content-wrap {
    width: min(1440px, 100%);
    padding: 26px 28px 48px;
}

.panel,
.metric-card,
.hero-band,
.process-item {
    background: var(--surface);
    border: 1px solid rgba(217, 225, 234, .9);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.panel { padding: 20px; margin-bottom: 20px; }
.panel.narrow { max-width: 980px; }

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.panel-head h3 {
    font-size: 18px;
    margin: 0;
}

.panel-head span {
    color: var(--muted);
    font-size: 13px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, minmax(170px, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.hero-band {
    min-height: 150px;
    padding: 24px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(18, 55, 70, .96), rgba(31, 122, 104, .94)),
        repeating-linear-gradient(45deg, rgba(255,255,255,.12) 0, rgba(255,255,255,.12) 1px, transparent 1px, transparent 14px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.hero-band.compact { min-height: 116px; }

.hero-band h2 {
    margin: 6px 0;
    font-size: 28px;
    line-height: 1.15;
}

.hero-band p { margin: 0; color: #d7eeee; }
.eyebrow { color: #f5c56d; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.status-pill .badge { font-size: 14px; padding: 8px 12px; }

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.metric-grid.five { grid-template-columns: repeat(5, minmax(150px, 1fr)); }

.metric-card {
    min-height: 150px;
    padding: 18px;
    display: grid;
    align-content: space-between;
    gap: 8px;
}

.metric-card.link { color: inherit; transition: transform .18s ease, border-color .18s ease; }
.metric-card.link:hover { transform: translateY(-3px); border-color: #9ccfc7; }

.metric-card i {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: #e7f5f0;
    color: var(--primary);
    font-size: 22px;
}

.metric-card span { color: var(--muted); }
.metric-card strong { font-size: 30px; line-height: 1; }

.progress {
    height: 9px;
    background: #e8edf3;
}

.progress.slim { height: 6px; min-width: 120px; }
.progress-bar { background: linear-gradient(90deg, var(--primary), var(--accent)); }

.action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px;
}

.action-row.end {
    justify-content: flex-end;
    margin-top: 18px;
}

.btn {
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: #104f58;
    border-color: #104f58;
}

.icon-btn {
    width: 42px;
    height: 42px;
    padding: 0;
}

.status-stepper {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.status-stepper span {
    min-height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.status-stepper span.current {
    background: #e7f5f0;
    color: var(--primary);
    border-color: #9ccfc7;
}

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

.section-list a {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    transition: background .18s ease, border-color .18s ease;
}

.section-list a:hover,
.section-list a.active {
    background: #f3faf8;
    border-color: #c8e5df;
}

.section-list.compact {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

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

.section-nav {
    position: sticky;
    top: 94px;
}

.editor-panel { min-height: 620px; }
.rich-textarea { line-height: 1.65; }

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

.field.span-2,
.span-2 { grid-column: span 2; }

.form-control,
.form-select {
    border-radius: 8px;
    border-color: #cfd8e3;
}

.form-control:focus,
.form-select:focus {
    border-color: #7dbdb3;
    box-shadow: 0 0 0 .2rem rgba(23, 97, 107, .13);
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 220px auto;
    gap: 10px;
    margin-bottom: 16px;
}

.input-icon { position: relative; }
.input-icon i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
}
.input-icon .form-control { padding-left: 38px; }

.app-table {
    --bs-table-bg: transparent;
    margin-bottom: 0;
}

.app-table th {
    color: #344054;
    font-size: 12px;
    text-transform: uppercase;
    background: #f7fafc;
}

.app-table td small,
.app-table td strong { display: block; }

.process-list {
    display: grid;
    gap: 12px;
}

.process-item {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.process-item h4,
.review-process h4 {
    font-size: 17px;
    margin: 6px 0;
}

.process-item p { color: var(--muted); margin-bottom: 8px; }
.table-actions { display: flex; align-items: center; gap: 8px; }

.mini-status {
    font-size: 11px;
    font-weight: 800;
    color: var(--primary);
    background: #e7f5f0;
    border-radius: 999px;
    padding: 4px 8px;
}

.steps-table-wrap {
    overflow-x: auto;
}

.steps-table {
    min-width: 1180px;
}

.steps-table th:first-child,
.steps-table td:first-child { width: 70px; }

.steps-table textarea { min-width: 260px; }

.flow-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.flow-tools .icon-btn {
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
}

.flow-scale {
    min-width: 48px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-align: right;
}

.flow-preview,
.live-mermaid {
    height: clamp(460px, calc(100vh - 260px), 780px);
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
    background: #fbfdff;
}

.flow-canvas {
    --flow-scale: 1;
    width: max-content;
    min-height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin: 0 auto;
    padding: 18px;
    zoom: var(--flow-scale);
}

.flow-canvas .mermaid {
    margin: 0;
    width: max-content;
    min-width: 1040px;
}

.flow-canvas svg {
    width: auto !important;
    min-width: 1040px;
    max-width: none !important;
    height: auto !important;
    filter: drop-shadow(0 12px 24px rgba(15, 35, 55, .08));
}

.flow-canvas svg .label,
.flow-canvas svg .nodeLabel,
.flow-canvas svg .edgeLabel {
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
}

.flow-canvas svg .nodeLabel p,
.flow-canvas svg .label p {
    margin: 0 !important;
    line-height: 1.35 !important;
}

.flow-canvas svg .node.default rect,
.flow-canvas svg .node rect {
    rx: 7px;
    ry: 7px;
}

.flow-canvas .node rect,
.flow-canvas .node polygon,
.flow-canvas .node path,
.flow-canvas .node circle,
.flow-canvas .node ellipse {
    stroke-width: 2px !important;
}

.flow-canvas .edgePaths path {
    stroke-width: 2.2px !important;
}

.flow-canvas .edgeLabel {
    color: var(--ink) !important;
}

.panel.flow-fullscreen {
    position: fixed;
    inset: 16px;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    margin: 0;
    overflow: hidden;
}

.panel.flow-fullscreen .flow-preview,
.panel.flow-fullscreen .live-mermaid {
    height: auto;
    flex: 1;
}

.code-block {
    background: #172033;
    color: #eff7f8;
    border-radius: 8px;
    padding: 14px;
    overflow: auto;
}

.review-header,
.review-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, .6fr);
    gap: 18px;
    align-items: stretch;
}

.review-actions {
    display: grid;
    align-content: center;
    gap: 10px;
}

.review-actions form,
.doc-actions form { margin: 0; }

.timeline {
    display: grid;
    gap: 14px;
}

.timeline article {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 10px;
}

.timeline i {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff8e6;
    color: var(--accent);
}

.timeline p { margin: 4px 0; color: var(--muted); }
.timeline small { color: var(--muted); }

.review-process {
    padding: 16px 0;
    border-top: 1px solid var(--line);
}

.review-process:first-of-type { border-top: 0; padding-top: 0; }

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

.empty-state {
    min-height: 180px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    color: var(--muted);
    text-align: center;
}

.empty-state i {
    font-size: 42px;
    color: var(--primary);
}

.empty-state strong {
    color: var(--ink);
    font-size: 20px;
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        linear-gradient(135deg, rgba(18,55,70,.96), rgba(31,122,104,.88)),
        repeating-linear-gradient(45deg, rgba(255,255,255,.08) 0, rgba(255,255,255,.08) 1px, transparent 1px, transparent 18px);
}

.login-wrap {
    width: min(1060px, calc(100% - 32px));
}

.login-panel {
    min-height: 600px;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(0,0,0,.25);
}

.login-art {
    position: relative;
    padding: 40px;
    color: #fff;
    background:
        linear-gradient(160deg, rgba(18,55,70,.95), rgba(23,97,107,.88)),
        repeating-linear-gradient(90deg, rgba(255,255,255,.13) 0, rgba(255,255,255,.13) 1px, transparent 1px, transparent 52px);
}

.login-art .brand { position: relative; z-index: 2; }

.art-card {
    position: absolute;
    left: 40px;
    bottom: 44px;
    min-width: 240px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 8px;
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(8px);
    font-weight: 800;
}

.art-card i { font-size: 28px; color: #f5c56d; }

.art-grid {
    position: absolute;
    right: 34px;
    bottom: 120px;
    display: grid;
    grid-template-columns: repeat(3, 72px);
    gap: 12px;
}

.art-grid span {
    height: 72px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.22);
    background: rgba(255,255,255,.08);
}

.login-card {
    padding: 56px 48px;
    align-self: center;
}

.login-card h1 {
    font-size: 34px;
    margin-bottom: 8px;
}

.segmented {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.segmented .btn {
    border: 1px solid var(--line);
    background: #fff;
}

.segmented .btn-check:checked + .btn {
    background: #e7f5f0;
    border-color: #8fc9bf;
    color: var(--primary);
}

.myid-login-body {
    min-height: 100vh;
    margin: 0;
    color: #142033;
    background:
        linear-gradient(90deg, rgba(13, 90, 158, .06) 1px, transparent 1px),
        linear-gradient(rgba(13, 90, 158, .06) 1px, transparent 1px),
        linear-gradient(140deg, #eef4f8 0%, #f8fbfd 48%, #edf7f4 100%);
    background-size: 34px 34px, 34px 34px, 100% 100%;
    font-family: Inter, Arial, Helvetica, sans-serif;
}

.myid-login {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 34px;
}

.myid-login-stage {
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 34px;
    align-items: center;
}

.myid-login-copy {
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    position: relative;
}

.myid-login-copy::before {
    content: "";
    position: absolute;
    right: 4%;
    top: 19%;
    width: min(560px, 82%);
    aspect-ratio: 1.7;
    border: 1px solid rgba(13, 90, 158, .17);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255,255,255,.48), rgba(255,255,255,.12)),
        repeating-linear-gradient(-18deg, rgba(0, 139, 128, .08) 0 2px, transparent 2px 14px);
    transform: rotate(-6deg);
    z-index: -1;
}

.myid-brand {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 13px;
    color: #142033;
}

.myid-brand:hover {
    color: #142033;
}

.myid-brand-logo {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    padding: 7px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid rgba(13, 90, 158, .16);
    box-shadow: 0 12px 26px rgba(21, 43, 70, .10);
}

.myid-brand-logo img,
.myid-ticket-stamp img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.myid-brand strong,
.myid-brand small {
    display: block;
    line-height: 1.08;
}

.myid-brand strong {
    font-size: 1rem;
    font-weight: 900;
}

.myid-brand small {
    max-width: 230px;
    margin-top: 4px;
    color: #667386;
    font-size: .78rem;
    font-weight: 700;
}

.myid-login-title {
    max-width: 660px;
}

.myid-login-title > span,
.myid-ticket-top span {
    display: inline-flex;
    width: fit-content;
    color: #0d5a9e;
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.myid-login-title h1 {
    max-width: 10ch;
    margin: 18px 0 0;
    color: #0d223a;
    font-size: 5rem;
    line-height: .9;
    letter-spacing: 0;
    font-weight: 900;
}

.myid-login-title p {
    width: min(560px, 100%);
    margin: 24px 0 0;
    color: #667386;
    font-size: 1.02rem;
    line-height: 1.72;
}

.myid-info-panel {
    width: min(680px, 100%);
    padding: 18px 20px;
    border: 1px solid rgba(13, 90, 158, .18);
    border-radius: 8px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 18px 38px rgba(21, 43, 70, .12);
}

.myid-info-panel div {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0d5a9e;
    font-weight: 900;
}

.myid-info-panel i {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, #0d5a9e, #008b80);
}

.myid-info-panel p {
    margin: 12px 0 0;
    color: #44546a;
    line-height: 1.62;
}

.myid-login-ticket {
    position: relative;
    padding: 28px;
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.76), rgba(255,253,247,.98)),
        #fffdf7;
    border: 1px solid rgba(20, 32, 51, .12);
    box-shadow: 0 26px 58px rgba(21, 43, 70, .18);
}

.myid-login-ticket::before,
.myid-login-ticket::after {
    content: "";
    position: absolute;
    left: -17px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #edf4f8;
    border-right: 1px solid rgba(20, 32, 51, .12);
}

.myid-login-ticket::before {
    top: 126px;
}

.myid-login-ticket::after {
    bottom: 94px;
}

.myid-ticket-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 18px;
    border-bottom: 1px dashed #becbd9;
}

.myid-ticket-top h2 {
    margin: 8px 0 0;
    color: #142033;
    font-size: 2.05rem;
    font-weight: 900;
    letter-spacing: 0;
}

.myid-ticket-stamp {
    width: 74px;
    height: 74px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    padding: 9px;
    border: 3px solid rgba(13, 90, 158, .22);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 10px 18px rgba(21, 43, 70, .10);
    transform: rotate(10deg);
}

.myid-ticket-stamp img {
    transform: rotate(-10deg);
}

.myid-ticket-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 18px 0;
}

.myid-ticket-meta span {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: 8px;
    background: #eef5fb;
    color: #35506f;
    font-size: .76rem;
    font-weight: 800;
}

.myid-login-alert {
    border-radius: 8px;
    font-size: .88rem;
    margin-bottom: 14px;
}

.myid-login-button {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d6e0ec;
    border-radius: 8px;
    color: #364555;
    background: #fff;
    box-shadow: 0 12px 24px rgba(15, 23, 42, .10);
    font-weight: 900;
    text-align: center;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.myid-login-button:hover {
    color: #364555;
    border-color: #b8cbe2;
    box-shadow: 0 16px 30px rgba(15, 23, 42, .14);
    transform: translateY(-1px);
}

.myid-button-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, #0d5a9e, #008b80);
    font-size: 1.05rem;
}

.myid-button-copy {
    min-width: 0;
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    line-height: 1.1;
}

.myid-button-copy span {
    color: #435366;
}

.myid-button-copy strong {
    color: #f2b51d;
    font-size: 1.16em;
    line-height: 1;
}

.myid-button-copy strong span {
    color: #1f6fd1;
}

.myid-login-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 14px;
    color: #8490a0;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.myid-login-divider::before,
.myid-login-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #d8dfeb;
}

.myid-dev-form {
    display: grid;
    gap: 8px;
}

.myid-login-footer {
    display: grid;
    gap: 4px;
    margin-top: 22px;
    color: #8793a3;
    text-align: center;
    font-size: .72rem;
}

.myid-login-footer small {
    color: #667386;
}

.error-panel { width: min(620px, calc(100% - 32px)); }

@media (max-width: 1180px) {
    .dashboard-grid { grid-template-columns: 1fr 1fr; }
    .metric-grid.five { grid-template-columns: repeat(3, 1fr); }
    .portfolio-layout,
    .review-header,
    .review-grid { grid-template-columns: 1fr; }
    .section-nav { position: static; }
}

@media (max-width: 991px) {
    .app-shell { grid-template-columns: 1fr; }
    .app-sidebar {
        position: fixed;
        left: 0;
        transform: translateX(-100%);
        transition: transform .2s ease;
        width: 284px;
    }
    body.sidebar-open .app-sidebar { transform: translateX(0); }
    .content-wrap,
    .app-topbar { padding-left: 18px; padding-right: 18px; }
    .myid-login-stage { grid-template-columns: 1fr; }
    .myid-login-copy { min-height: auto; }
    .myid-login-title h1 { font-size: 3.7rem; max-width: 12ch; }
    .myid-login-ticket { width: min(520px, 100%); margin: 0 auto; }
}

@media (max-width: 760px) {
    .dashboard-grid,
    .metric-grid,
    .metric-grid.five,
    .form-grid,
    .filter-bar { grid-template-columns: 1fr; }
    .field.span-2,
    .span-2 { grid-column: auto; }
    .hero-band,
    .process-item {
        align-items: flex-start;
        flex-direction: column;
    }
    .status-stepper { grid-template-columns: 1fr; }
    .login-panel { grid-template-columns: 1fr; }
    .login-art { min-height: 260px; }
    .login-card { padding: 32px 24px; }
    .art-grid { display: none; }
    .myid-login { padding: 18px; place-items: start center; }
    .myid-login-title h1 { font-size: 3rem; }
    .myid-login-title p { font-size: .95rem; }
    .myid-brand small { max-width: 180px; }
    .myid-info-panel { padding: 16px; }
    .myid-login-ticket { padding: 22px; }
    .myid-ticket-top h2 { font-size: 1.72rem; }
    .myid-ticket-stamp { width: 62px; height: 62px; padding: 7px; }
    .myid-ticket-meta { grid-template-columns: 1fr; }
    .myid-login-button { min-height: 56px; }
    .myid-login-ticket::before,
    .myid-login-ticket::after { display: none; }
    .flow-preview,
    .live-mermaid {
        height: clamp(420px, 70vh, 680px);
        padding: 14px;
    }
    .flow-canvas .mermaid,
    .flow-canvas svg {
        min-width: 820px;
    }
}
