@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&display=swap');

:root {
    --bg: linear-gradient(180deg, #f6f9fc 0%, #eef5fb 32%, #f5f8fc 100%);
    --bg-overlay: radial-gradient(circle at 12% 10%, rgba(22, 101, 180, 0.14), rgba(22, 101, 180, 0) 36%),
        radial-gradient(circle at 88% 12%, rgba(9, 134, 196, 0.12), rgba(9, 134, 196, 0) 34%),
        linear-gradient(130deg, rgba(215, 170, 74, 0.08), rgba(215, 170, 74, 0) 44%);
    --surface: rgba(255, 255, 255, 0.94);
    --surface-border: #d9e5f1;
    --text: #12314d;
    --muted: #607792;
    --primary: #0f5ea7;
    --primary-soft: #2e8fd6;
    --accent: #0f5ea7;
    --accent-2: #0d79c9;
    --warm-accent: #c9972c;
    --warm-accent-soft: #f4e4ba;
    --card-border: #d7e1ec;
    --card-shadow: 0 24px 70px rgba(17, 58, 97, 0.12);
    --btn-shadow: 0 14px 34px rgba(15, 94, 167, 0.22);
    --ghost-border: rgba(15, 94, 167, 0.18);
    --info-gradient: linear-gradient(120deg, #0f5ea7, #1176c0 55%, #3098d6);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
    background: var(--bg), var(--bg-overlay);
    color: var(--text);
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.auth-mode .wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 18px;
}

a {
    color: inherit;
    text-decoration: none;
}

.wrapper {
    max-width: 1320px;
    margin: 0 auto;
    padding: 28px 20px 72px;
}

.institutional-ribbon {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding: 10px 14px;
    border: 1px solid rgba(15, 94, 167, 0.08);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(240, 246, 253, 0.9));
    box-shadow: 0 10px 28px rgba(15, 94, 167, 0.07);
}

.ribbon-item {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.22px;
    text-transform: uppercase;
    color: var(--primary);
}

.ribbon-separator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--warm-accent);
    opacity: 0.7;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    padding: 16px 18px;
    border-radius: 26px;
    background: linear-gradient(135deg, rgb(4, 49, 88), rgba(4, 59, 101, 0.909));
    border: 1px solid rgba(12, 20, 31, 0.18);
    box-shadow: 0 18px 44px rgba(68, 85, 100, 0.895);
}

.brand-left {
    display: flex;
    gap: 12px;
    align-items: center;
}

.brand-mark {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 247, 224, 0.98), rgba(214, 176, 85, 0.92));
    display: grid;
    place-items: center;
    padding: 6px;
    border: 1px solid rgba(201, 151, 44, 0.38);
    box-shadow: inset 0 0 0 1px rgba(255, 245, 214, 0.28), 0 14px 30px rgba(7, 14, 26, 0.24);
    overflow: hidden;
}

.brand-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    filter: saturate(1.02) contrast(1.02);
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brand-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.26px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.64);
}

.brand-title {
    font-weight: 800;
    font-size: 24px;
    color: #f5f7fb;
}

.brand-sub {
    color: rgba(226, 235, 246, 0.74);
    font-size: 13px;
    letter-spacing: 0.18px;
}

.institutional-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.08));
    color: #f5f7fb;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.15px;
    box-shadow: 0 12px 28px rgba(7, 14, 26, 0.22);
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.institutional-link::before {
    content: '↗';
    font-size: 16px;
    line-height: 1;
}

.institutional-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(7, 14, 26, 0.28);
    border-color: rgba(255, 255, 255, 0.22);
}

.institutional-link:focus-visible {
    outline: 3px solid rgba(29, 165, 217, 0.26);
    outline-offset: 3px;
}

.session-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #eef4fb;
    flex-wrap: wrap;
    box-shadow: 0 10px 24px rgba(7, 14, 26, 0.14);
}

.back-btn {
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.08));
    color: #f5f7fb;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(7, 14, 26, 0.18);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.back-btn::before {
    content: '←';
    font-weight: 800;
}

.ghost-btn {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    color: #f5f7fb;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
}

.ghost-link {
    color: var(--primary);
    font-weight: 700;
}

.surface {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 30px;
    box-shadow: 0 24px 70px rgba(15, 88, 150, 0.1);
    padding: 26px;
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
}

.surface-head {
    margin-bottom: 18px;
}

.surface-head h1 {
    margin: 0 0 6px;
    font-size: 34px;
    color: #0c2c4c;
}

.surface-head p {
    margin: 0;
    color: var(--muted);
    max-width: 760px;
}

.surface-home {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
    overflow: hidden;
}

.surface-home::before,
.viewer-surface::before {
    content: '';
    position: absolute;
    right: 22px;
    top: 20px;
    width: 200px;
    height: 200px;
    background: url('assets/logo.png') center/contain no-repeat;
    opacity: 0.055;
    filter: saturate(0.8) sepia(0.35);
    pointer-events: none;
}

.surface-home>*,
.viewer-surface>* {
    position: relative;
    z-index: 1;
}

.hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.58fr) minmax(300px, 0.92fr);
    gap: 28px;
    padding: 12px 6px 4px;
    align-items: start;
}

.hero-copy {
    padding: 10px 2px;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: rgba(201, 151, 44, 0.12);
    color: #8b6516;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.24px;
    text-transform: uppercase;
}

.hero-kicker::before,
.section-kicker::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--warm-accent);
}

.hero-copy h1 {
    margin: 0;
    font-size: clamp(2.35rem, 4vw, 4.1rem);
    line-height: 1.08;
    max-width: 880px;
    color: #102c48;
}

.hero-copy p {
    margin: 18px 0 0;
    max-width: 720px;
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.hero-credibility {
    display: grid;
    gap: 14px;
    margin-top: 24px;
    padding: 18px 20px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(11, 52, 92, 0.97), rgba(15, 94, 167, 0.94));
    color: #f8fbff;
    box-shadow: 0 22px 46px rgba(12, 59, 105, 0.24);
}

.credibility-line {
    display: grid;
    gap: 8px;
}

.credibility-eyebrow {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.24px;
    text-transform: uppercase;
    color: rgba(248, 251, 255, 0.72);
}

.credibility-line strong {
    font-size: 1.05rem;
    line-height: 1.6;
}

.credibility-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.credibility-chips .meta-chip {
    background: rgba(255, 255, 255, 0.16);
    color: #f8fbff;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.hero-btn:hover {
    transform: translateY(-1px);
}

.hero-btn-primary {
    color: #f8fbff;
    background: linear-gradient(120deg, var(--accent), var(--accent-2));
    box-shadow: var(--btn-shadow);
}

.hero-btn-secondary {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--ghost-border);
    box-shadow: 0 12px 28px rgba(15, 94, 167, 0.08);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 28px;
}

.hero-stat {
    padding: 20px 18px 18px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 252, 0.95));
    border: 1px solid rgba(15, 94, 167, 0.08);
    box-shadow: 0 16px 34px rgba(15, 94, 167, 0.08);
}

.hero-stat-value {
    display: block;
    font-size: 1.7rem;
    font-weight: 800;
    color: #102c48;
}

.hero-stat-label {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.9rem;
}

.hero-aside {
    display: grid;
    gap: 16px;
}

.seal-card {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 18px 20px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(244, 236, 214, 0.9), rgba(255, 255, 255, 0.96));
    border: 1px solid rgba(201, 151, 44, 0.22);
    box-shadow: 0 18px 34px rgba(122, 93, 24, 0.12);
}

.seal-card-ring {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), rgba(231, 212, 163, 0.9));
    box-shadow: inset 0 0 0 1px rgba(201, 151, 44, 0.22), 0 10px 26px rgba(122, 93, 24, 0.12);
}

.seal-card-image {
    width: 68px;
    height: 68px;
    object-fit: contain;
    display: block;
}

.seal-card-copy p {
    margin: 0;
    color: #5f5d4d;
    line-height: 1.7;
}

.aside-card {
    padding: 22px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 252, 0.96));
    border: 1px solid rgba(15, 94, 167, 0.08);
    box-shadow: 0 18px 36px rgba(15, 94, 167, 0.08);
}

.aside-card-highlight {
    background: linear-gradient(180deg, rgba(14, 89, 160, 0.96), rgba(17, 118, 192, 0.94));
    color: #f8fbff;
}

.aside-card-neutral {
    background: linear-gradient(180deg, rgba(246, 242, 232, 0.98), rgba(255, 255, 255, 0.96));
}

.aside-card h2 {
    margin: 0 0 10px;
    font-size: 1.35rem;
    line-height: 1.25;
}

.aside-card p {
    margin: 0;
    line-height: 1.7;
    color: inherit;
    opacity: 0.95;
}

.aside-label {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.24px;
    text-transform: uppercase;
    color: inherit;
    opacity: 0.8;
}

.contact-list {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    display: grid;
    gap: 10px;
    line-height: 1.6;
}

.highlight-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.highlight-metrics>div {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.highlight-value {
    display: block;
    font-size: 1.15rem;
    font-weight: 800;
}

.highlight-caption {
    display: block;
    margin-top: 4px;
    font-size: 0.85rem;
    color: rgba(248, 251, 255, 0.82);
}

.welcome-banner {
    display: flex;
    gap: 10px;
    align-items: center;
    background: linear-gradient(120deg, rgba(245, 249, 253, 0.98), rgba(233, 242, 250, 0.98));
    border: 1px solid rgba(15, 94, 167, 0.08);
    color: #0f2942;
    border-radius: 20px;
    padding: 16px 18px;
    font-size: 15px;
    font-weight: 600;
}

.welcome-wave {
    font-size: 22px;
}

.welcome-banner strong {
    color: var(--primary);
    font-weight: 800;
}

.section-shell {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.section-head h2 {
    margin: 0;
    font-size: clamp(1.6rem, 2.8vw, 2.4rem);
    color: #102c48;
}

.section-note {
    max-width: 520px;
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.info-banner {
    display: flex;
    gap: 14px;
    align-items: center;
    background: var(--info-gradient);
    color: #f8fbff;
    border-radius: 20px;
    padding: 16px 18px;
    box-shadow: 0 14px 40px rgba(14, 89, 160, 0.2);
}

.info-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.2);
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 18px;
}

.info-title {
    font-weight: 800;
    font-size: 20px;
    margin-bottom: 2px;
}

.info-sub {
    color: rgba(248, 251, 255, 0.9);
}

.document-stage {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 20px 22px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(246, 241, 230, 0.78));
    border: 1px solid rgba(201, 151, 44, 0.18);
}

.stage-copy {
    display: grid;
    gap: 8px;
}

.stage-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.stage-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.22px;
    text-transform: uppercase;
    color: #8b6516;
}

.stage-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.stage-badge {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(15, 94, 167, 0.08);
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18px;
    text-transform: uppercase;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 22px;
}

.card {
    position: relative;
    background: linear-gradient(180deg, #ffffff, #f8fbfd);
    border: 1px solid rgba(15, 94, 167, 0.08);
    border-radius: 24px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 312px;
    box-shadow: var(--card-shadow);
    transition: transform 140ms ease, box-shadow 140ms ease;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--primary-soft), var(--warm-accent));
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 26px 56px rgba(15, 88, 150, 0.16);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.card-index,
.card-tag,
.meta-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

.card-index {
    background: rgba(15, 94, 167, 0.08);
    color: var(--primary);
}

.card-tag,
.meta-chip {
    background: rgba(201, 151, 44, 0.14);
    color: #8b6516;
}

.card-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.card-icon {
    min-width: 52px;
    height: 52px;
    border-radius: 18px;
    background: linear-gradient(135deg, #0f5ea7, #2a91d8 60%, #c9972c);
    color: #f5fffa;
    display: grid;
    place-items: center;
    font-size: 24px;
    font-weight: 800;
    box-shadow: 0 14px 30px rgba(15, 94, 167, 0.18);
}

.card-icon svg {
    width: 30px;
    height: 30px;
    display: block;
}

.card-title-wrap h3 {
    margin: 0 0 4px;
    font-size: 19px;
    color: #0f2942;
    line-height: 1.3;
}

.card-sub {
    margin: 0;
    color: #6a7c92;
    font-weight: 600;
    letter-spacing: 0.15px;
    text-transform: uppercase;
    font-size: 13px;
}

.card-text {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
    font-size: 0.96rem;
}

.card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 2px;
}

.card-hint {
    color: #8b6516;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18px;
    text-transform: uppercase;
}

.primary-btn {
    border: none;
    border-radius: 16px;
    padding: 13px 16px;
    background: linear-gradient(120deg, var(--accent), var(--accent-2));
    color: #f7fffb;
    font-weight: 800;
    cursor: pointer;
    box-shadow: var(--btn-shadow);
    transition: transform 140ms ease, box-shadow 140ms ease;
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 36px rgba(15, 94, 167, 0.28);
}

.viewer-surface {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.viewer-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(15, 94, 167, 0.08);
    flex-wrap: wrap;
}

.viewer-hero h1 {
    margin: 0;
    font-size: clamp(1.9rem, 3vw, 2.8rem);
    color: #102c48;
}

.viewer-hero p {
    margin: 10px 0 0;
    max-width: 680px;
    color: var(--muted);
    line-height: 1.7;
}

.viewer-hero-side {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.viewer-summary {
    padding: 18px 20px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(245, 249, 253, 0.96), rgba(255, 255, 255, 0.96));
    border: 1px solid rgba(15, 94, 167, 0.08);
}

.viewer-status-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.viewer-summary-text {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.viewer-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.viewer-summary-box {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(15, 94, 167, 0.08);
}

.viewer-summary-box strong {
    color: #102c48;
    line-height: 1.45;
}

.viewer-summary-box-accent {
    background: linear-gradient(135deg, rgba(15, 94, 167, 0.1), rgba(201, 151, 44, 0.12));
}

.viewer-summary-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18px;
    text-transform: uppercase;
    color: var(--primary);
}

.viewer-shell {
    background: #ffffff;
    border: 1px solid rgba(15, 94, 167, 0.08);
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.viewer-header {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(15, 94, 167, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.viewer-title {
    margin: 0;
    color: #0f2942;
}

.viewer-label {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.3px;
    color: #0f63b1;
    text-transform: uppercase;
}

.viewer-actions {
    display: flex;
    gap: 10px;
}

.viewer-actions a {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(15, 94, 167, 0.08);
    border: 1px solid var(--ghost-border);
    color: var(--primary);
    font-weight: 700;
}

iframe.viewer-frame {
    width: 100%;
    height: 82vh;
    border: none;
    background: #f2f7fb;
}

.empty {
    padding: 20px;
    border: 1px dashed var(--surface-border);
    border-radius: 12px;
    text-align: center;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.8);
}

.portal-footer {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-end;
    padding-top: 4px;
    border-top: 1px solid rgba(15, 94, 167, 0.08);
    flex-wrap: wrap;
}

.portal-footer p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.portal-footer-compact {
    padding-top: 0;
    border-top: none;
}

.footer-title {
    font-size: 1rem;
    font-weight: 800;
    color: #102c48;
}

.footer-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(15, 94, 167, 0.07);
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

@media (max-width: 720px) {
    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-panel,
    .hero-stats,
    .viewer-summary-grid,
    .highlight-metrics {
        grid-template-columns: 1fr;
    }

    .seal-card {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .section-head,
    .viewer-hero,
    .portal-footer,
    .document-stage {
        align-items: flex-start;
    }

    .document-stage,
    .card-footer {
        flex-direction: column;
    }

    .card-footer .primary-btn {
        width: 100%;
    }

    .institutional-ribbon {
        border-radius: 22px;
    }

    .institutional-link {
        width: 100%;
    }

    .session-chip {
        width: 100%;
        justify-content: flex-start;
    }

    .brand-mark {
        width: 56px;
        height: 56px;
    }

    .surface {
        padding: 22px 18px;
        border-radius: 24px;
    }

    .surface-home::before,
    .viewer-surface::before {
        width: 160px;
        height: 160px;
        right: 10px;
        top: 14px;
    }

    .hero-copy h1 {
        font-size: 2rem;
    }
}

/* Auth UI */
.auth-card {
    position: relative;
    background: #ffffff;
    border: 1px solid var(--surface-border);
    border-radius: 22px;
    box-shadow: 0 25px 80px rgba(15, 88, 150, 0.16);
    padding: 38px 34px 30px;
    width: 448px;
    max-width: 92vw;
    margin: 48px auto;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.auth-card.loading {
    text-align: center;
}

.auth-card h2 {
    margin: 0 0 4px;
    letter-spacing: 0.2px;
    color: #0f2942;
    font-size: 1.35rem;
}

.auth-card p {
    margin: 0 0 4px;
    color: var(--muted);
    line-height: 1.4;
    font-size: 0.88rem;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 6px;
}

.auth-field label {
    font-weight: 700;
    color: #0f2942;
    font-size: 14px;
    letter-spacing: 0.2px;
}

.auth-field input {
    border-radius: 10px;
    border: 1px solid rgba(15, 99, 177, 0.18);
    padding: 10px 12px;
    background: rgba(248, 252, 255, 0.92);
    color: #0f2942;
    font-size: 0.88rem;
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

.auth-field input:focus {
    outline: none;
    border-color: rgba(15, 99, 177, 0.55);
    box-shadow:
        0 0 0 4px rgba(14, 165, 233, 0.16),
        0 10px 24px rgba(15, 99, 177, 0.10);
}

.auth-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 2px;
}

.auth-submit {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(120deg, var(--accent), var(--accent-2));
    color: #f7fffb;
    font-weight: 800;
    font-size: 0.88rem;
    cursor: pointer;
    box-shadow: var(--btn-shadow);
    transition: transform 140ms ease, box-shadow 140ms ease;
}

.auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 34px rgba(30, 183, 120, 0.45);
}

.auth-submit:active {
    transform: translateY(0px) scale(0.99);
}

.auth-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-org {
    margin: 0;
    font-size: 0.82rem;
    font-style: normal;
    color: rgba(15, 41, 66, 0.62);
    letter-spacing: 0.2px;
}

.error-text {
    color: #e03131;
    font-weight: 700;
    font-size: 12px;
    margin-top: 2px;
    text-align: center;
    min-height: 16px;
}

.subtle {
    color: var(--muted);
    font-size: 14px;
}

.hidden {
    display: none !important;
}

.auth-hero {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 4px;
    align-items: center;
    text-align: center;
}

.auth-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: #ffffff;
    display: grid;
    place-items: center;
    box-shadow: 0 14px 30px rgba(15, 99, 177, 0.22);
    margin: -58px auto 4px;
    border: 6px solid #eef6ff;
    overflow: hidden;
}

.auth-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.auth-pill {
    width: fit-content;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.12);
    color: var(--accent-2);
    font-weight: 800;
    letter-spacing: 0.3px;
    font-size: 11px;
}

.auth-lead {
    margin: 0;
    color: rgba(15, 41, 66, 0.72);
    line-height: 1.5;
    font-weight: 600;
}

/* Toggle link between login / register */
.auth-toggle {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--muted);
    text-align: center;
}

.auth-toggle a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

.auth-toggle a:hover {
    color: var(--primary-soft);
}

/* Verification pending card */
.verify-pill {
    border-color: rgba(14, 165, 233, 0.35) !important;
    background: rgba(14, 165, 233, 0.12) !important;
    color: #0ea5e9 !important;
}

.verify-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.verify-actions .ghost-btn {
    width: 100%;
    text-align: center;
    padding: 10px 16px;
}

.success-text {
    color: var(--accent-2);
    font-weight: 700;
    font-size: 12px;
    margin-top: 6px;
    text-align: center;
    min-height: 16px;
}

.success-text.error {
    color: #e03131;
}