/* IRIS theme · design tokens and components */
:root {
    --ink: #0b1c30;
    --slate: #131b2e;
    --muted: #65738a;
    --blue: #006398;
    --blue-strong: #087dba;
    --blue-soft: #e8f3ff;
    --canvas: #f8f9ff;
    --wash: #eff4ff;
    --line: #dce6f5;
    --white: #ffffff;
    --green: #16815d;
    --green-soft: #e9f7ef;
    --amber: #a9690b;
    --red: #bf4444;
    --red-soft: #fff0ef;
    --shadow: 0 1px 3px rgba(15, 23, 42, .04), 0 8px 30px rgba(25, 55, 91, .025);
    --shadow-lift: 0 14px 35px rgba(15, 35, 65, .09);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --font-heading: "Plus Jakarta Sans", sans-serif;
    --font-body: Inter, sans-serif;
    --font-mono: "JetBrains Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 14px/1.55 var(--font-body); -webkit-font-smoothing: antialiased; }
body, button, input, select, textarea { font-family: var(--font-body); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img, svg { max-width: 100%; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { font-family: var(--font-heading); letter-spacing: -.035em; line-height: 1.18; }
h1 { font-size: clamp(30px, 4vw, 48px); }
h2 { font-size: clamp(23px, 2.7vw, 32px); }
h3 { font-size: 18px; }
.material-symbols-outlined { font-size: 20px; line-height: 1; vertical-align: middle; font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24; }
.eyebrow { color: var(--blue); font: 600 10px/1.4 var(--font-mono); letter-spacing: .15em; text-transform: uppercase; }
.small, small { color: var(--muted); font-size: 12px; }
.mono, kbd { font-family: var(--font-mono); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid rgba(0, 99, 152, .28); outline-offset: 2px; }

/* Shared controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 1px solid transparent; border-radius: 9px; font-size: 12px; font-weight: 700; line-height: 1.2; transition: background .18s, border-color .18s, transform .18s, box-shadow .18s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--slate); color: var(--white); box-shadow: 0 3px 0 rgba(0, 0, 0, .1); }
.btn-primary:hover { background: var(--ink); color: var(--white); }
.btn-primary .material-symbols-outlined, .nav-aux a.btn-primary, .nav-aux a.btn-primary:hover { color: var(--white); }
.btn-blue { background: var(--blue); color: var(--white); }
.btn-blue:hover { background: var(--blue-strong); }
.btn-outline { background: var(--white); border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--blue); background: var(--blue-soft); }
.btn-ghost { background: transparent; color: var(--blue); }
.btn-ghost:hover { background: var(--blue-soft); }
.btn-wide { width: 100%; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.card-pad { padding: 22px; }
.card-hover { transition: transform .18s, box-shadow .18s, border-color .18s; }
.card-hover:hover { border-color: #bfd3e8; box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.icon-tile { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--blue-soft); color: var(--blue); }
.icon-tile .material-symbols-outlined { font-size: 19px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 999px; background: #edf2f9; color: var(--muted); font-size: 10px; font-weight: 700; line-height: 1.1; white-space: nowrap; }
.badge .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-red { background: var(--red-soft); color: var(--red); }
.field { display: grid; gap: 6px; }
.field label { color: #33445b; font-size: 11px; font-weight: 700; }
.input, .select, .textarea { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid #cfdced; border-radius: var(--radius-sm); background: var(--white); color: var(--ink); outline: none; transition: border .2s, box-shadow .2s; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 99, 152, .11); }
.input::placeholder, .textarea::placeholder { color: #96a4b7; }
.textarea { min-height: 100px; resize: vertical; }
.input-icon { position: relative; width: 100%; }
.input-icon > .material-symbols-outlined { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #7d8ca1; font-size: 18px; pointer-events: none; }
.input-icon > .input { padding-left: 39px; }
.check { display: inline-flex; align-items: flex-start; gap: 8px; color: #46576b; font-size: 12px; line-height: 1.5; }
.check input[type="checkbox"] { flex: 0 0 16px; width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--blue); }
.auth-form .check { width: 100%; }

/* Public shell */
.public-header { position: sticky; top: 0; z-index: 50; height: 62px; background: rgba(248, 249, 255, .94); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.public-nav { display: flex; align-items: center; gap: 28px; height: 100%; max-width: 1320px; margin: auto; padding: 0 28px; }
.brand { display: inline-flex; align-items: center; gap: 9px; min-width: max-content; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: #fb7e1a; color: var(--white); }
.brand-mark .material-symbols-outlined { font-size: 20px; }
.brand-logo { display: block; width: 32px; height: 32px; flex: none; }
.login-title .brand-logo { width: 25px; height: 25px; }
.brand strong { display: block; font: 800 15px/1 var(--font-heading); letter-spacing: -.06em; }
.brand small { display: block; color: var(--muted); font: 500 8px/1.3 var(--font-mono); letter-spacing: .09em; }
.brand-word { font: 800 15px/1 var(--font-heading); letter-spacing: -.06em; }
.brand-sub { display: block; color: var(--muted); font: 500 8px/1.3 var(--font-mono); letter-spacing: .09em; }
.version { padding: 2px 5px; border-radius: 3px; background: #e1eeff; color: #2779aa; font: 600 8px var(--font-mono); }
.public-links { display: flex; align-items: center; gap: 24px; margin-right: auto; }
.public-links ul { display: flex; gap: 24px; padding: 0; margin: 0; list-style: none; }
.public-links a { color: #536176; font-size: 11px; font-weight: 600; }
.public-links a:hover { color: var(--blue); }
.nav-aux { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.nav-aux a { color: #536176; font-size: 11px; font-weight: 600; }
.nav-aux a:hover { color: var(--blue); }
.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border: 1px solid #e0e8f4; border-radius: 999px; background: var(--white); color: #455369; font: 500 9px var(--font-mono); }
.status-pill::before { width: 6px; height: 6px; border-radius: 50%; background: #2ac081; content: ""; }
.public-main { overflow: hidden; }
.hero { position: relative; padding: 72px 20px 60px; background: linear-gradient(135deg, var(--wash), var(--blue-soft) 55%, var(--wash)); text-align: center; }
.hero::before { position: absolute; inset: 0; opacity: .38; background-image: linear-gradient(to right, rgba(13, 59, 99, .055) 1px, transparent 1px), linear-gradient(to bottom, rgba(13, 59, 99, .055) 1px, transparent 1px); background-size: 28px 28px; content: ""; mask-image: linear-gradient(to bottom, transparent 10%, #000 100%); pointer-events: none; }
.hero > * { position: relative; }
.hero .eyebrow-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); font: 500 9px var(--font-mono); letter-spacing: .045em; }
.hero h1 { max-width: 760px; margin: 18px auto 10px; font-size: clamp(32px, 4vw, 55px); line-height: 1.12; letter-spacing: -.06em; }
.hero h1 em { color: var(--blue); font-style: normal; }
.hero-lead { margin: 0 auto 5px; color: #005684; font: 500 16px var(--font-heading); }
.hero-copy { max-width: 680px; margin: 0 auto; color: #56677c; font-size: 12px; }
.login-card { width: min(100%, 420px); margin: 32px auto 0; padding: 18px; border: 1px solid #e5ebf6; border-radius: 15px; background: var(--white); box-shadow: 0 18px 38px rgba(22, 52, 87, .12); text-align: left; }
.login-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid #ecf0f6; }
.login-title { display: flex; align-items: center; gap: 8px; font: 700 12px var(--font-heading); }
.login-title .brand-mark { width: 25px; height: 25px; border-radius: 5px; }
.login-title .material-symbols-outlined { font-size: 16px; }
.login-fields { display: grid; gap: 12px; }
.login-card .field label { display: flex; justify-content: space-between; gap: 8px; font-size: 10px; }
.login-card .field label a { color: var(--blue); font-weight: 500; }
.login-options { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.login-divider { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; color: #9ba8ba; font: 500 9px var(--font-mono); text-align: center; }
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.login-card .iris-login { margin-top: 15px; }
.login-card .iris-login > h2 { display: none; }
.login-card .login-remember { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--muted); font-size: 10px; }
.login-card .login-submit { margin-top: 14px; }
.login-card .login-submit input { width: 100%; min-height: 39px; border: 0; border-radius: 9px; background: var(--slate); color: var(--white); font-weight: 700; cursor: pointer; }
.login-card .login-submit input:hover { background: var(--ink); }
.login-footer { display: flex; justify-content: space-between; gap: 12px; padding-top: 11px; color: #8a9bb1; font: 500 9px var(--font-mono); }
.login-footer a { color: var(--blue); }
.hero-features { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; margin-top: 28px; color: #647b96; font: 500 10px var(--font-mono); }
.hero-features span { display: inline-flex; align-items: center; gap: 5px; }
.hero-features .material-symbols-outlined { color: var(--blue); font-size: 13px; }
.public-section { padding: 72px 24px; }
.public-section.tint { background: var(--wash); }
.public-container { max-width: 1260px; margin: auto; }
.public-section-heading { max-width: 660px; margin: 0 auto 28px; text-align: center; }
.public-section-heading h2 { margin: 7px 0; }
.public-section-heading p, .module-card p, .metric-card p { color: var(--muted); font-size: 12px; }
.section-title { margin: 7px 0 24px; }
.metrics-grid, .module-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.metric-card { min-height: 127px; padding: 19px; border: 1px solid #e4ebfa; border-radius: 10px; background: #f7f9ff; }
.metric-label { display: flex; align-items: center; justify-content: space-between; font: 600 9px var(--font-mono); letter-spacing: .04em; text-transform: uppercase; }
.metric-label .material-symbols-outlined { color: var(--blue); font-size: 16px; }
.metric-value { margin: 9px 0 2px; font: 600 29px var(--font-heading); letter-spacing: -.06em; }
.metric-card p { margin: 0; line-height: 1.35; }
.module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.module-card { display: flex; flex-direction: column; min-height: 230px; padding: 20px; border: 1px solid #e6ecf8; border-radius: 11px; background: var(--white); }
.module-code { display: flex; align-items: center; justify-content: space-between; color: #8190a1; font: 500 9px var(--font-mono); }
.module-code .icon-tile { width: 30px; height: 30px; }
.module-card h3 { margin: 20px 0 9px; font-size: 16px; }
.module-card p { line-height: 1.55; }
.module-card a { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 13px; border-top: 1px solid #eef2f7; color: var(--blue); font-size: 10px; font-weight: 700; }
.support-banner { display: grid; grid-template-columns: 1fr 330px; align-items: center; gap: 32px; padding: 30px; border-radius: 14px; background: linear-gradient(145deg, var(--ink), var(--slate) 65%, #8196b1); box-shadow: 0 15px 26px rgba(8, 28, 54, .17); color: var(--white); }
.support-banner h2 { max-width: 560px; font-size: 30px; }
.support-banner p { max-width: 630px; color: #d6e1f0; font-size: 12px; }
.support-card { padding: 22px; border-radius: 11px; background: var(--white); color: var(--ink); box-shadow: 0 10px 20px rgba(0, 0, 0, .14); }
.support-card h3 { font-size: 15px; }
.public-footer { padding: 22px 28px; border-top: 1px solid var(--line); background: var(--white); color: #708098; font: 500 10px var(--font-mono); }
.public-footer .public-container { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.public-footer a:hover { color: var(--blue); }

/* Portal shell */
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 80; top: 0; left: 0; display: flex; flex-direction: column; width: 235px; height: 100vh; overflow-y: auto; padding: 21px 13px; background: var(--slate); color: #d9e5f3; }
.sidebar-brand { margin: 0 11px 30px; }
.sidebar .brand { color: var(--white); }
.sidebar .brand-mark { background: #fb7e1a; color: var(--white); }
.sidebar .brand small { color: #9cafc7; }
.side-label { padding: 0 12px; margin: 16px 0 8px; color: #7488a2; font: 600 9px var(--font-mono); letter-spacing: .15em; text-transform: uppercase; }
.side-nav { display: grid; gap: 3px; }
.side-nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px; color: #9db0c6; font-size: 11px; font-weight: 600; }
.side-nav a:hover, .side-nav a.active { background: #21354b; color: var(--white); }
.side-nav a.active { box-shadow: inset 2px 0 var(--blue-strong); }
.side-nav .material-symbols-outlined { font-size: 18px; }
.nav-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: auto; padding: 0 5px; border-radius: 999px; background: #d73545; color: #fff; font: 700 11px/1 var(--font-body); }
.preview-picker { display: grid; gap: 8px; padding: 0 10px; }
.preview-picker label { color: #9db0c6; font-size: 11px; }
.preview-picker select { width: 100%; min-width: 0; padding: 9px 7px; border: 1px solid #40566d; border-radius: 8px; background: #21354b; color: #fff; font-size: 11px; }
.preview-picker .btn { width: 100%; white-space: normal; }
.preview-banner { display: flex; align-items: center; gap: 9px; margin-bottom: 20px; padding: 10px 13px; border: 1px solid #f1d2d6; border-radius: 9px; background: #fff1f2; color: #913342; font-size: 12px; font-weight: 600; }
.preview-banner a { margin-left: auto; text-decoration: underline; }
.sidebar-bottom { margin-top: auto; padding: 17px 9px 0; border-top: 1px solid #293b51; }
.sidebar-bottom .person { margin-bottom: 15px; }
.sidebar-profile { padding: 6px 3px; border-radius: 9px; color: inherit; text-decoration: none; }
.sidebar-profile:hover { background: #21354b; }
.sidebar-profile:focus-visible { outline: 2px solid var(--blue-strong); outline-offset: 2px; }
.sidebar-bottom .person strong { display: block; color: var(--white); font-size: 12px; }
.sidebar-bottom .person small { display: block; color: #8fa3bc; font-size: 10px; }
.sidebar-bottom a { display: flex; align-items: center; gap: 8px; padding: 7px 3px; color: #a9bbcf; font-size: 11px; }
.sidebar-bottom a:hover { color: var(--white); }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; background: #dce9ff; color: #265a83; font: 700 11px var(--font-heading); }
.sidebar .avatar { background: #31516f; color: var(--white); }
.app-main { min-width: 0; margin-left: 235px; }
.app-topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; height: 62px; padding: 0 32px; border-bottom: 1px solid var(--line); background: rgba(248, 249, 255, .95); backdrop-filter: blur(12px); }
.search-top { display: flex; align-items: center; gap: 8px; width: min(380px, 100%); padding: 7px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); color: #8c9bb0; font-size: 11px; }
.search-top .material-symbols-outlined { color: var(--blue); font-size: 17px; }
.search-top kbd { margin-left: auto; color: #9aa8b9; font-size: 10px; }
.topbar-actions { display: flex; align-items: center; gap: 7px; margin-left: auto; }
.topbar-user { display: flex; align-items: center; gap: 9px; padding-left: 13px; border-left: 1px solid var(--line); font-size: 11px; font-weight: 700; }
.topbar-user .avatar { width: 30px; height: 30px; }
.mobile-toggle { display: none; border: 0; background: transparent; color: var(--ink); }
.portal-page { max-width: 1380px; margin: 0 auto; padding: 28px 32px 65px; }
.page-header { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.page-header h1 { margin: 6px 0 7px; font-size: 30px; }
.page-header p { margin: 0; color: var(--muted); font-size: 12px; }
.welcome { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 23px 26px; border-radius: 18px; background: linear-gradient(115deg, #142137, #233955 62%, #e1efff 180%); color: var(--white); }
.welcome h2 { margin: 5px 0; font-size: 27px; }
.welcome p { max-width: 570px; margin: 0; color: #bbccdf; font-size: 12px; }
.welcome .eyebrow { color: #7ec9fa; }
.welcome .btn { background: var(--white); color: var(--slate); }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(270px, .7fr); gap: 22px; }
.stack { display: grid; gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stat-strip { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.stat { min-width: 120px; }
.stat strong { display: block; margin-top: 5px; font: 600 25px var(--font-heading); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.section-head h2, .section-head h3 { margin: 0; }
.text-link { color: var(--blue); font-size: 12px; font-weight: 700; }
.text-link:hover { text-decoration: underline; }
.folder-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.folder-card { display: flex; flex-direction: column; gap: 14px; min-height: 160px; padding: 18px; }
.folder-card h3 { margin: 0; font-size: 15px; }
.folder-card p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.folder-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; color: #6c7b8e; font-size: 10px; }
.file-list { overflow: hidden; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 17px; border-bottom: 1px solid #edf1f7; }
.list-head h3 { margin: 0; font-size: 14px; }
.file-row { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; padding: 13px 14px; border-bottom: 1px solid #edf1f7; transition: background .15s; }
.file-row:last-child { border-bottom: 0; }
.file-row:hover { background: #f8fbff; }
.file-main { min-width: 0; flex: 1; }
.file-title { display: block; overflow: hidden; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.file-title:hover { color: var(--blue); text-decoration: underline; }
.file-meta { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.file-actions { display: flex; align-items: center; gap: 4px; }
.icon-button { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: #8695a7; }
.icon-button:hover { background: var(--blue-soft); color: var(--blue); }
.icon-button.is-favorite, .icon-button.is-favorite:hover { color: var(--white); background: var(--blue); }
.iris-accreditation form p, .iris-otp form p { display: grid; gap: 6px; margin: 0 0 14px; }
.iris-accreditation label, .iris-otp label { color: var(--muted); font-size: 11px; font-weight: 700; }
.iris-accreditation input, .iris-accreditation textarea, .iris-otp input { width: 100%; box-sizing: border-box; padding: 10px 11px; border: 1px solid #cfd9e5; border-radius: 8px; background: var(--white); font: inherit; }
.iris-accreditation textarea { resize: vertical; }
.profile-form { margin-top: 22px; }
.profile-form p { display: grid; gap: 6px; }
.profile-form label { color: var(--muted); font-size: 11px; font-weight: 700; }
.profile-form input { width: 100%; box-sizing: border-box; padding: 10px 11px; border: 1px solid #cfd9e5; border-radius: 8px; font: inherit; }
.empty { display: grid; place-items: center; padding: 45px 24px; text-align: center; }
.empty .icon-tile { width: 52px; height: 52px; margin-bottom: 12px; }
.empty h3 { margin: 0 0 5px; }
.empty p { max-width: 320px; color: var(--muted); font-size: 12px; }
.search-hero { display: flex; align-items: center; gap: 9px; margin: 0 0 20px; padding: 8px 9px 8px 15px; border: 1px solid #cfddeb; border-radius: 12px; background: var(--white); box-shadow: var(--shadow); }
.search-hero .material-symbols-outlined { color: var(--blue); }
.search-hero input { min-width: 0; flex: 1; border: 0; outline: 0; font-size: 13px; }
.search-hero select { min-height: 32px; padding: 0 7px; border: 1px solid #dbe4ee; border-radius: 7px; background: var(--white); color: #52647a; font: 500 10px var(--font-body); }
.details { display: grid; gap: 0; margin: 0; }
.details div { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid #edf1f7; font-size: 11px; }
.details dt { color: #8190a2; }
.details dd { margin: 0; font-weight: 700; text-align: right; }
.notice { display: flex; align-items: flex-start; gap: 10px; padding: 13px 15px; border: 1px solid #d7e8fa; border-radius: 10px; background: #eef6ff; color: #365f84; font-size: 11px; }
.login-page { width: min(100%, 560px); margin: 45px auto; text-align: center; }
.login-page h1 { margin: 8px 0; }
.login-page > p { color: var(--muted); }
.login-page .iris-login { margin-top: 28px; text-align: left; }
.auth-layout { display: grid; place-items: center; min-height: calc(100vh - 124px); padding: 45px 20px; background: linear-gradient(135deg, var(--wash), var(--canvas)); }
.auth-card { width: min(100%, 650px); padding: 30px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); box-shadow: var(--shadow-lift); }
.auth-card h1 { margin: 8px 0; font-size: 30px; }
.auth-card > p { margin: 0 0 18px; color: var(--muted); font-size: 12px; }
.auth-card .notice { margin: 18px 0 22px; }
.auth-form { display: grid; gap: 16px; margin-top: 24px; }
.auth-form .grid-2 { gap: 14px; }
.auth-form .check { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 11px; }
.auth-form .check input { margin-top: 2px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 20px; color: var(--blue); font-size: 11px; font-weight: 700; }
.back-link .material-symbols-outlined { font-size: 16px; }
.notice-success { border-color: #bfe5ce; background: var(--green-soft); color: var(--green); }
.notice-error { border-color: #f0c8c4; background: var(--red-soft); color: var(--red); }
.admin-dashboard h1, .admin-page h1 { margin: 6px 0 7px; font-size: 30px; }
.admin-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admin-kpis .metric-value { font-size: 23px; overflow-wrap: anywhere; }
.admin-status-value { font-size: 17px !important; letter-spacing: 0 !important; text-transform: uppercase; }
.admin-two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.admin-form { display: grid; gap: 13px; }
.admin-form .btn { justify-self: start; }
.page-actions, .inline-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 11px 2px; border-bottom: 2px solid transparent; color: var(--muted); font-size: 12px; font-weight: 700; }
.tab.active { border-color: var(--blue); color: var(--blue); }
.request-card { padding: 22px; }
.request-card .section-head { align-items: center; }
.request-card .person strong { display: block; font: 700 16px var(--font-heading); }
.request-card .person small { display: block; color: var(--muted); font-size: 11px; }
.request-card .avatar { width: 44px; height: 44px; }
.request-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 18px 0; font-size: 12px; overflow-wrap: anywhere; }
.request-meta strong { color: var(--ink); font-size: 11px; }
.request-card .page-actions form { margin: 0; }
.company-filter { display: flex; align-items: center; gap: 9px; }
.company-filter .input-icon { max-width: 420px; margin-right: 8px; }
.chip { min-height: 34px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--muted); font-size: 11px; font-weight: 700; }
.chip.active { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.company-link:hover strong { color: var(--blue); }
.breadcrumb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: #8a9aab; font-size: 11px; }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb .material-symbols-outlined { font-size: 14px; }
.folder-permission-list { margin-top: 15px; }
.folder-permission { cursor: pointer; }
.folder-permission input[type="checkbox"] { width: 17px; height: 17px; flex: 0 0 17px; accent-color: var(--blue); }
.folder-permission .file-main { min-width: 0; }
.folder-permission .file-meta { overflow-wrap: anywhere; }
.permission-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 11px; }
.table th, .table td { padding: 13px 14px; border-bottom: 1px solid #edf1f7; text-align: left; vertical-align: middle; }
.table th { color: #718198; font: 600 9px var(--font-mono); letter-spacing: .05em; text-transform: uppercase; }
.table tr:last-child td { border-bottom: 0; }
.table td small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.table code { color: #53667e; font: 500 10px var(--font-mono); white-space: nowrap; }
.btn-sm { min-height: 30px; padding: 0 9px; font-size: 10px; }
.admin-page .search-hero { margin-top: 2px; }
.admin-page .search-hero .btn { min-height: 32px; }
.admin-page .page-header > .badge { margin-top: 10px; }
.prose h1 { margin-bottom: 20px; }
.prose p, .prose li { color: #44566c; }
.mobile-bottom { display: none; }

@media (max-width: 1050px) {
    .public-links { display: none; }
    .content-grid { grid-template-columns: 1fr; }
    .metrics-grid { grid-template-columns: repeat(2, 1fr); }
    .support-banner, .admin-two-column { grid-template-columns: 1fr; }
    .admin-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
    .app-shell { display: block; }
    .sidebar { transform: translateX(-100%); transition: transform .2s; }
    .app-main { margin-left: 0; }
    body.iris-menu-open .sidebar { transform: translateX(0); }
    .app-topbar { padding: 0 16px; }
    .mobile-toggle { display: grid; place-items: center; }
    .topbar-user span:last-child { display: none; }
    .topbar-user { border-left: 0; padding-left: 0; }
    .portal-page { padding: 24px 16px 90px; }
    .page-header { flex-direction: column; margin-bottom: 20px; }
    .welcome { grid-template-columns: 1fr; }
    .folder-grid, .grid-3 { grid-template-columns: 1fr 1fr; }
    .mobile-bottom { position: fixed; z-index: 70; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(4, 1fr); padding: 7px 8px calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255, 255, 255, .96); box-shadow: 0 -5px 20px rgba(18, 42, 67, .07); }
    .mobile-bottom a { position: relative; display: grid; justify-items: center; gap: 2px; color: var(--muted); font-size: 9px; }
    .mobile-bottom a:hover, .mobile-bottom a:focus { color: var(--blue); }
    .mobile-bottom .nav-count { position: absolute; top: 2px; right: calc(50% - 26px); margin: 0; min-width: 16px; height: 16px; font-size: 9px; }
}

@media (max-width: 560px) {
    .request-meta { grid-template-columns: 1fr; gap: 9px; }
    .company-filter { flex-wrap: wrap; }
    .company-filter .input-icon { max-width: none; flex: 1 1 100%; }
    .folder-permission .badge { display: none; }
    .public-nav { padding: 0 16px; }
    .public-nav > .btn { min-height: 36px; padding: 0 11px; }
    .hero { padding-top: 48px; }
    .hero h1 { font-size: 34px; }
    .login-footer { flex-direction: column; }
    .public-section { padding: 48px 16px; }
    .metrics-grid, .module-grid, .folder-grid, .grid-2, .grid-3, .admin-kpis { grid-template-columns: 1fr; }
    .auth-card { padding: 22px 17px; }
    .file-row { align-items: flex-start; }
    .file-row > .badge { display: none; }
    .search-hero { margin-bottom: 16px; }
}

/* Percorsi documenti e permessi individuali. */
.folder-card { color: inherit; text-decoration: none; }
.folder-card:focus-visible, .quick-folders a:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.quick-folders { display: flex; flex-wrap: wrap; gap: 10px; }
.user-permission-row { flex-wrap: wrap; gap: 12px; }
.user-permission-row .file-main { flex: 1 1 220px; }
.permission-choices { display: flex; flex-wrap: wrap; gap: 12px; flex: 1 1 100%; border: 0; padding: 0 0 0 54px; margin: 0; }
.permission-choices label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.effective-permissions { padding: 0; margin: 16px 0 0; list-style: none; }
.effective-permissions li { display: flex; align-items: center; gap: 8px; padding: 11px 0; border-top: 1px solid var(--line); }
.effective-permissions li .badge { margin-left: auto; }
.document-preview { min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; }
.document-preview .icon-tile { width: 72px; height: 72px; }
.document-preview-frame { width: 100%; min-height: 560px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.document-detail .page-actions { flex-wrap: wrap; }
.admin-shortcuts > a { color: inherit; text-decoration: none; }
.admin-shortcuts > a > .material-symbols-outlined { color: var(--blue); font-size: 30px; }
.admin-shortcuts h3 { margin: 12px 0 5px; }
.admin-shortcuts p { margin: 0 0 16px; color: var(--muted); }
@media (max-width: 560px) { .permission-choices { padding-left: 0; } }
.folder-sync-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.folder-sync-actions .btn { white-space: nowrap; }
.document-preview-image { display: block; max-width: 100%; max-height: 720px; width: auto; height: auto; object-fit: contain; border-radius: 8px; }
.brand-beta { display:inline-block; vertical-align:middle; padding:2px 6px; margin-left:5px; border:1px solid currentColor; border-radius:5px; font:700 9px/1.2 var(--font-mono); letter-spacing:.08em; }
.iris-search-top { position:relative; }
.iris-search-top input { width:100%; min-width:0; border:0; outline:0; background:transparent; color:var(--ink); font:inherit; }
.iris-search-top button { border:0; background:transparent; color:var(--blue); cursor:pointer; }
.search-suggestions { position:absolute; z-index:100; top:calc(100% + 5px); left:0; right:0; padding:6px; border:1px solid var(--line); border-radius:10px; background:#fff; box-shadow:0 12px 28px rgba(18,42,67,.15); }
.search-suggestions[hidden] { display:none; }
.search-suggestions a, .search-suggestions span { display:block; padding:9px 10px; color:var(--ink); text-decoration:none; }
.search-suggestions a:hover, .search-suggestions a:focus { background:var(--blue-soft); }
.sidebar-overlay { display:none; }
@media (max-width:780px) {
 html { margin-top:0 !important; }
 .sidebar-overlay { position:fixed; inset:0; z-index:79; background:rgba(6,21,37,.35); opacity:0; pointer-events:none; display:block; transition:opacity .2s; }
 body.iris-menu-open .sidebar-overlay { opacity:1; pointer-events:auto; }
 .sidebar { z-index:80; }
 .mobile-toggle { z-index:81; }
}
.favorite-toggle.is-favorite, .favorite-toggle.is-favorite:hover { color: var(--white); background: var(--blue); }
.preview-launch { width:calc(100% - 18px); margin:18px 9px; justify-content:center; }
.iris-preview-backdrop { position:fixed; z-index:200; inset:0; display:flex; align-items:center; justify-content:center; padding:18px; background:rgba(8,24,42,.55); }
.iris-preview-backdrop[hidden] { display:none; }
.iris-preview-modal { width:min(480px,100%); padding:26px; border-radius:18px; background:#fff; box-shadow:0 18px 50px rgba(0,0,0,.2); }
.iris-preview-modal .field { margin:16px 0; }
.iris-preview-modal .select { width:100%; }
.iris-preview-modal .page-actions { justify-content:flex-end; }
body.iris-preview-open { overflow:hidden; }
@media (max-width:780px) { .mobile-bottom[aria-label="Navigazione rapida"] { grid-template-columns:repeat(5,minmax(0,1fr)); } }
.profile-layout { display:grid; grid-template-columns:minmax(0,1.8fr) minmax(280px,.85fr); gap:22px; align-items:start; }
.profile-layout > .notice { grid-column:1/-1; }
.profile-main { min-height:520px; }
.profile-heading { margin-bottom:28px; }
.profile-heading .avatar { width:64px; height:64px; font-size:22px; }
.profile-heading strong { font-size:22px; }
.profile-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.profile-fields .field { display:grid; gap:8px; min-width:0; }
.profile-fields label { color:var(--ink); font-size:12px; font-weight:700; }
.profile-fields .input { width:100%; box-sizing:border-box; }
.profile-fields .input[readonly] { color:var(--ink); background:#f8fafd; cursor:default; }
.profile-form { display:grid; gap:20px; }
.profile-form > .btn { justify-self:start; }
.profile-note { margin-top:26px; }
.profile-aside h2 { margin-bottom:18px; font-size:20px; }
.profile-aside .btn-wide { margin-top:20px; }
.profile-aside p { color:var(--muted); }
@media(max-width:900px) { .profile-layout { grid-template-columns:1fr; } }
@media(max-width:560px) { .profile-fields { grid-template-columns:1fr; } .profile-main { min-height:0; } }

/* Pagina pubblica di accesso richiesto */
.iris-access-hero { min-height: calc(100vh - 135px); display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:64px 20px; background:linear-gradient(135deg,var(--wash),var(--blue-soft) 55%,var(--wash)); }
.iris-access-hero h1 { margin:15px 0 10px; font-size:clamp(34px,4vw,54px); }
.iris-access-hero > p { margin:0; max-width:580px; color:var(--muted); font-size:16px; }
.iris-access-hero .login-card { margin-top:32px; }
.iris-access-info { padding:72px 20px; background:var(--canvas); }
.iris-access-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.iris-access-grid .card { text-align:left; }
.iris-access-grid h3 { margin:15px 0 8px; }
.iris-access-grid p { margin:0; color:var(--muted); }
@media(max-width:700px) { .iris-access-grid { grid-template-columns:1fr; } .iris-access-hero { min-height:100vh; } }

/* Front page: assetto mobile */
@media (max-width: 560px) {
    body.home .hero { padding: 42px 20px 42px; text-align: start; }
    body.home .hero .eyebrow-pill { display: none; }
    body.home .hero h1 { max-width: 100%; margin: 20px 0 14px; font-size: clamp(32px, 9vw, 40px); line-height: 1.12; overflow-wrap: normal; }
    body.home .hero h1 br { display: none; }
    body.home .hero-lead { margin: 0; text-align: start; }
    body.home .hero-copy, body.home .hero-features { display: none; }
    body.home .login-card { margin: 28px 0 0; width: 100%; min-width: 0; padding: 20px; text-align: start; }
    body.home .login-card form, body.home .login-card .field, body.home .login-card .input-icon { min-width: 0; max-width: 100%; }
    body.home .login-card input:not([type="checkbox"]) { display: block; width: 100%; min-width: 0; max-width: 100%; }
    body.home .login-title .mono, body.home .login-footer, body.home .login-options .mono { display: none; }
    body.home .login-card .login-fields { width: 100%; grid-template-columns: minmax(0, 1fr); gap: 18px; }
    body.home .login-card .field { width: 100%; grid-template-columns: minmax(0, 1fr); }
    body.home .login-card .input-icon, body.home .login-card .input-icon > .input { width: 100%; min-width: 0; max-width: 100%; }
    body.home .login-card .field label { min-width: 0; flex-wrap: wrap; align-items: baseline; justify-content: flex-start; gap: 3px 8px; overflow-wrap: anywhere; }
    body.home .login-card .field label .mono { display: none; }
    body.home .login-card .field label a { display: block; width: 100%; }
    body.home .login-card .input { min-height: 44px; }
    body.home .public-section, body.home .public-section-heading, body.home .support-banner, body.home .support-card { text-align: start; }
    body.home .support-banner { grid-template-columns: minmax(0, 1fr); min-width: 0; padding: 20px 16px; }
    body.home .support-card { width: 100%; min-width: 0; max-width: 100%; padding: 22px 18px; }
    body.home .support-card form { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; max-width: 100%; gap: 14px; }
    body.home .support-card form .field { min-width: 0; margin: 0; }
    body.home .support-card form .input { display: block; width: 100%; min-width: 0; max-width: 100%; min-height: 44px; }
    body.home .support-card form .btn { margin-top: 4px !important; }
}

/* Contenitori e azioni condivisi su schermi stretti. */
.header-action-short { display: none; }
@media (max-width: 780px) {
    .public-nav { min-width: 0; gap: 12px; justify-content: space-between; }
    .public-nav .brand { min-width: 0; flex: 0 1 auto; }
    .public-nav .nav-aux { min-width: 0; gap: 8px; margin-left: auto; }
    .public-nav .status-pill, .public-nav .nav-aux > a:not(.btn-primary) { display: none; }
    .public-nav .nav-aux .btn-primary { min-height: 40px; padding: 0 12px; white-space: nowrap; }
    .header-action-full { display: none; }
    .header-action-short { display: inline; }
    .app-topbar { min-width: 0; gap: 10px; }
    .app-topbar .search-top { min-width: 0; flex: 1 1 auto; width: auto; }
    .app-topbar .topbar-actions { flex: 0 0 auto; }
    .portal-page, .portal-page > *, .content-grid > *, .admin-two-column > *, .profile-layout > *, .grid-2 > *, .grid-3 > *, .folder-grid > *, .module-grid > *, .metrics-grid > * { min-width: 0; max-width: 100%; }
    .content-grid, .admin-two-column, .support-banner { grid-template-columns: minmax(0, 1fr); }
    .page-actions .btn, .inline-actions .btn, .folder-sync-actions .btn { max-width: 100%; min-width: 0; white-space: normal; text-align: center; overflow-wrap: anywhere; }
    .table-wrap, .tabs { max-width: 100%; overflow-x: auto; }
    .auth-card, .login-card, .support-card, .iris-preview-modal { max-width: 100%; min-width: 0; }
    .auth-card form, .login-card form, .support-card form { min-width: 0; max-width: 100%; }
    .login-fields { grid-template-columns: minmax(0, 1fr); }
    .login-fields > *, .login-fields .field { min-width: 0; max-width: 100%; }
    .auth-card .field, .login-card .field, .support-card .field, .input-icon { min-width: 0; max-width: 100%; }
    .auth-card input:not([type="checkbox"]), .login-card input:not([type="checkbox"]), .support-card input:not([type="checkbox"]) { min-width: 0; max-width: 100%; }
}
@media (max-width: 380px) {
    .public-nav { padding: 0 12px; }
    .public-nav .brand { gap: 6px; }
    .public-nav .brand-sub { display: none; }
    .public-nav .nav-aux .btn-primary { padding: 0 9px; font-size: 11px; }
    .mobile-bottom a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; }
}

/* Layout fluido delle viste IRIS su tablet e mobile. */
@media (max-width: 1050px) {
    .app-topbar .hide-mobile { display: none; }
    .portal-page, .portal-page .stack, .portal-page .card, .portal-page form { min-width: 0; max-width: 100%; }
    .section-head, .list-head, .preview-banner { flex-wrap: wrap; min-width: 0; }
    .section-head > *, .list-head > *, .preview-banner > * { min-width: 0; max-width: 100%; }
    .section-head .text-link, .preview-banner a { margin-left: 0; }
    .search-hero { min-width: 0; max-width: 100%; flex-wrap: wrap; }
    .search-hero input { flex: 1 1 100%; width: 100%; }
    .search-hero select { min-width: 0; flex: 1 1 150px; max-width: 100%; }
    .search-hero .btn { flex: 1 1 150px; min-width: 0; }
    .file-row .file-main { min-width: 0; flex: 1 1 0; }
    .file-row .file-title, .file-row .file-meta { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
    .file-row .file-actions { flex: 0 0 auto; max-width: 100%; }
    .file-row > .badge { flex: 0 0 auto; }
    .breadcrumb, .details, .notice { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
}
@media (max-width: 560px) {
    .search-hero { display: grid; grid-template-columns: minmax(0, 1fr); }
    .search-hero > .material-symbols-outlined { display: none; }
    .search-hero input, .search-hero select, .search-hero .btn { width: 100%; min-width: 0; max-width: 100%; }
    .file-row { gap: 8px; }
    .file-row .icon-tile { width: 34px; height: 34px; }
    .file-row .file-actions { gap: 0; }
    .section-head { align-items: start; }
    .section-head .text-link { width: 100%; }
}

/* Intestazione profilo e navigazione. */
.profile-back { margin-bottom: 18px; }
.profile-back .back-link { margin-top: 0; }
.profile-heading > span:last-child { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; gap: 4px; }
.profile-heading strong, .profile-heading small { display: block; max-width: 100%; overflow-wrap: anywhere; }
.profile-heading small { color: var(--muted); line-height: 1.45; }

/* Conferma richiesta di accreditamento. */
.auth-card-success { max-width: 560px; }
.auth-card-success h1 { margin-bottom: 16px; }
.auth-card-success > p { color: var(--ink); font-size: 16px; line-height: 1.6; }
