﻿:root {
    --primary: #0e2c6c;
    --secondary: #a7a8a9;
    --light-gray: #f4f6f9;
    --white: #ffffff;
}

body {
    background-color: var(--light-gray);
    font-family: "Montserrat", Arial, sans-serif;
}

.header {
    font-family: "Montserrat", Arial, sans-serif;
    background-color: var(--primary);
    color: white;
    padding: 25px;
}

.header-title {
    font-weight: 700;
    font-size: 36px;
    margin: 0;
}
.header-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 80px;
    padding: 0 12px;
}

.header-side {
    display: flex;
    align-items: center;
}

.header-center {
    display: flex;
    justify-content: center;
    text-align: center;
}

.header-logo {
    height: 60px;
    max-width: 100%;
    object-fit: contain;
}

.container {
    max-width: 1400px;
    width: 92%;
    margin: 8px auto 40px auto;
    padding: 24px;
    overflow: auto;
}

.section-title {
    color: var(--primary);
    border-bottom: 2px solid var(--secondary);
    padding-bottom: 10px;
    margin-top: 35px;
    margin-bottom: 10px;
    font-size: 26px;
}

.section-content {
    margin-top: 10px;
}

.instructions-wrapper {
    padding: 16px 16px 8px 16px;
    max-width: 900px;
    margin: 0 auto;
}

.confirmation-section {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    text-align: center;
}

.confirmation-section .mud-checkbox {
    max-width: 700px;
}

.button-container {
    margin-top: 40px;
}

.button-container .mud-button-root {
    align-self: flex-start;
}

.button-container .mud-grid-item {
    display: flex;
}

.submit-item {
    display: flex;
    justify-content: flex-end;
}

.cert-submit-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 600px; 
}

.cert-submit-column .mud-button-root {
    align-self: flex-start; 
}

.cert-checkbox {
    flex: 1 1 100%;
}

.cert-submit-row .mud-button-root {
    margin-left: auto;
}
/* ------------------------------------MEDIA -------------------------------------*/
@media (max-width: 768px) {

    .header-grid {
        grid-template-columns: 1fr;
        row-gap: 8px;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .header-side,
    .header-center {
        justify-content: center;
    }

    .header-logo {
        height: 42px;
    }

    .cert-submit-row {
        flex-direction: column;
        align-items: stretch;
    }

        .cert-submit-row .mud-button-root {
            width: 100%;
            margin-left: 0;
        }
}

.instructions-text {
    font-size: 18px;
    color: #444;
    line-height: 1.6;
}

.mud-input-label {
    background-color: white;
    padding: 0 4px;
}

.first-section {
    margin-top: 5px;
}

.center-input input {
    text-align: center;
}

.footer {
    text-align: center;
    padding: 5px;
    font-size: 13px;
    color: #666;
}

/* Portal styles */

.forms-portal-shell {
    min-height: 100vh;
    background: #f8fafc;
    color: #0f172a;
}

.portal-landing {
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
    align-items: center;
}
.eyebrow {
    display: inline-block;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: #e2e8f0;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.landing-copy h1 {
    font-size: clamp(2.3rem, 5vw, 4rem);
    line-height: 1.05;
    margin: 0;
}
.landing-copy p {
    max-width: 760px;
    color: #475569;
    font-size: 1.05rem;
    line-height: 1.7;
    margin-top: 1.2rem;
}
.landing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    padding: 0.85rem 1.2rem;
    border: 1px solid transparent;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: 0.2s ease;
    font-family: "Montserrat", Arial, sans-serif;
}

.btn-primary {
    background: #14377d;
    color: white;
}

.btn-primary:hover {
    background: #1e293b;
}

.btn-secondary {
    background: white;
    color: #0f172a;
    border-color: #cbd5e1;
}

.btn-secondary:hover {
    background: #f8fafc;
}

.feature-grid {
    margin-top: 2.2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.feature-card,
.landing-panel,
.department-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
    overflow: hidden;
    margin-bottom: 0.85rem;
}
.viewer-card {
    background: white;
    border: 1px solid #e2e8f0;
    position: sticky;
    border-radius: 1.5rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
    overflow: hidden;
    width: 100%;
}
.viewer-empty-wrap {
    height: 100%;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.viewer-empty-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.feature-card {
    padding: 1.2rem;
}

.feature-card h3,
.landing-panel h2 {
    margin-top: 0;
}

.feature-card p,
.info-box p {
    font-size: 0.95rem;
    color: #64748b;
}

.landing-panel {
    padding: 1.5rem;
}

.info-box {
    background: #f1f5f9;
    border-radius: 1rem;
    padding: 1rem;
    margin-top: 1rem;
}

.portal-app {
    height: 100vh;
    display: grid;
    grid-template-rows: 72px minmax(0, 1fr);
    overflow: hidden;
}

.portal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(10px);
    padding: 0 1.5rem;
    height: 72px;
    border-bottom: 1px solid color-mix(in srgb, var(--secondary) 40%, transparent);
    background: linear-gradient(
        90deg,
        var(--primary),
        color-mix(in srgb, var(--primary) 70%, var(--secondary))
    );

    color: white;

    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.portal-header-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;

    background: white;
    padding: 4px;

    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Title */
.portal-header-title {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Right side */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Status badge */
.status-badge {
    font-size: 0.8rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(6px);

    border: 1px solid rgba(255, 255, 255, 0.25);
}

.portal-header .btn {
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem;

    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.25);

    border-radius: 8px;
    transition: all 0.2s ease;
}

.portal-header .btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.header-kicker {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
}

.header-title-portal {
    font-size: 1.05rem;
    font-weight: 700;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.status-badge,
.meta-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    background: #e2e8f0;
    color: #0f172a;
}

.meta-badge.alt {
    background: white;
    border: 1px solid #cbd5e1;
}

.portal-layout {
    height: calc(100vh-72px);
    min-height: 0;
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
}

.sidebar {
    background: white;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.sidebar-search-wrap {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}
.sidebar-search {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 1rem;
    padding: 0.8rem 0.95rem;
    font-size: 0.95rem;
    background: #fff;
    font-family: "Montserrat", Arial, sans-serif;
}
.sidebar-list {
    overflow-y: auto;
    flex: 1;
    padding: 0.9rem;
    overflow: auto;
}
.department-card {
    overflow: hidden;
    margin-bottom: 0.85rem;
}
.department-button {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 0;
    background: transparent;
    padding: 1rem;
    text-align: left;
    cursor: pointer;
    font-family: "Montserrat", Arial, sans-serif;
}

.department-name {
    font-weight: 700;
}

.department-count,

.form-description {
    font-size: 0.82rem;
    line-height: 1.4;
}

.viewer-description,
.empty-state,
.viewer-department {
    color: #64748b;
    font-size: 0.88rem;
}

.department-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.department-chevron {
    display: flex;
    align-items: center;
    transition: transform 0.25s ease;
    opacity: 0.7;
}

.department-chevron.open {
    transform: rotate(180deg);
}

.department-button:hover .department-chevron {
    opacity: 1;
}
.form-list {
    padding: 0 0.5rem 0.5rem;
    display: grid;
    gap: 0.35rem;
}

.form-button {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    background: #f8fafc;
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    align-items: flex-start;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}


.form-button:hover {
    background: color-mix(in srgb, var(--primary) 4%, white);
    border-color: color-mix(in srgb, var(--secondary) 35%, transparent);
    transform: translateY(-1px);
}

.form-button.active {
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--primary) 10%, white),
        color-mix(in srgb, var(--secondary) 18%, white)
    );
    border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--secondary));
    border-radius: 1rem;
    box-shadow:
        0 6px 18px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transform: translateY(-1px);
}

.form-button.active::before {
    content: "";
    position: absolute;
    left: 0.35rem;
    top: 0.75rem;
    bottom: 0.75rem;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
}

.form-button.active .form-name {
    color: var(--primary);
}

.form-button.active .form-description {
    color: #334155;
}

.form-name {
    font-weight: 700;
    color: var(--primary);
    line-height: 1.3;
}

.main-panel {
    min-height: 0;
    position: sticky;
    top: 72px; 
    height: calc(100vh - 72px);
    overflow-y: auto;
}
.main-panel.empty {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Card */
.viewer-empty-card {
    text-align: center;
    padding: 3rem 2.5rem;
    border-radius: 20px;
    max-width: 420px;
    width: 100%;

    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--primary) 10%, white),
        color-mix(in srgb, var(--secondary) 10%, white)
    );

    border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.05);

    backdrop-filter: blur(6px);

    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Icon */
.viewer-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}

/* Title */
.viewer-empty-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

/* Body text */
.viewer-empty-text {
    font-size: 0.95rem;
    color: rgba(0, 0, 0, 0.65);
    margin-bottom: 1.25rem;
}

/* Hint */
.viewer-empty-hint {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
    display: inline-block;

    background: color-mix(in srgb, var(--secondary) 15%, white);
    color: var(--secondary);
    font-weight: 500;
}

.viewer-empty-hint span {
    font-weight: 700;
}

.viewer-empty-icon {
    animation: float 3s ease-in-out infinite;
}

.viewer-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;

    position: relative;

    border: 1px solid color-mix(in srgb, var(--secondary) 40%, transparent);

    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.06),
        0 1px 0 rgba(255, 255, 255, 0.6) inset;

    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--secondary) 25%, white),
        color-mix(in srgb, var(--secondary) 10%, white)
    );
    border-bottom: 1px solid color-mix(in srgb, var(--secondary) 40%, transparent);

    border-top-left-radius: 1.5rem;
    border-top-right-radius: 1.5rem;
}

.viewer-header h2 {
    margin: 0.25rem 0 0;
    color: var(--primary);
}

.viewer-description {
    color: rgba(0, 0, 0, 0.7);
}
.viewer-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.8rem;
}
.viewer-body {
    padding: 1rem 1.5rem 1.5rem;
    min-height: 520px;
    width: 100%;
    box-sizing: border-box;
}

.form-iframe {
    width: 100%;
    height: 100%;
    min-height: 620px;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: white;
}

.form-iframe-debug {
    width: 100%;
    min-height: 900px;
    border: 2px solid red;
    display: block;
}

.iframe-blocked {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    border: 1px dashed #cbd5e1;
    border-radius: 1rem;
    background: #f8fafc;
    padding: 2rem;
}

.internal-form-host {
    height: 100%;
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: white;
    padding: 1.25rem;
}

.internal-form-card {
    width: 100%;
    max-width: none;
}

.internal-form-header h3 {
    margin: 0;
    font-size: 1.35rem;
}

.internal-form-header p {
    margin-top: 0.5rem;
    color: #64748b;
}

.internal-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.internal-form-grid label {
    display: grid;
    gap: 0.45rem;
    font-weight: 600;
    color: #334155;
}
.internal-form-grid input,
.internal-form-grid textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 0.9rem;
    padding: 0.85rem 0.95rem;
    font: inherit;
    background: white;
    color: #0f172a;
}

.internal-form-grid textarea {
    resize: vertical;
}

.full-width {
    grid-column: 1 / -1;
}

.internal-form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.blocked-form-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
}

.blocked-form-description {
    max-width: 680px;
    margin-top: 0.75rem;
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
}

.blocked-form-message {
    margin-top: 0.75rem;
    color: #334155;
    font-weight: 600;
}

.blocked-form-button {
    margin-top: 1rem;
}

.form-shell {
    width: 100%;
    box-sizing: border-box;
}

.form-shell.standalone {
    width: 90vw;
    max-width: 1400px;
    margin: 2rem auto;
    padding: 2rem;
    border-radius: 24px;
    background: var(--mud-palette-surface, #fff);
    box-shadow: var(--mud-elevation-4);

    display: block;
    height: auto;
    min-height: auto;
    overflow: visible;
}
.form-shell.embedded {
    width: 100%;
    padding: 1.5rem;
    margin: 0;
    border-radius: 16px;
    background: white;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);

    display: block;
    height: auto;
    min-height: auto;
    overflow: visible;
    box-sizing: border-box;
}

.form-shell form,
.form-shell .mud-form {
    width: 100%;
    display: block;
    height: auto;
    overflow: visible;
}
.empty-state {
    border: 1px dashed #cbd5e1;
    border-radius: 1rem;
    padding: 1.25rem;
    background: white;
}

@media (max-width: 1024px) {
    .portal-landing {
        grid-template-columns: 1fr;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .portal-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .sidebar {
        max-height: 360px;
    }

    .viewer-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .portal-landing,
    .main-panel {
        padding: 1rem;
    }

    .portal-header {
        padding: 0 1rem;
    }

    .header-actions {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .internal-form-grid {
        grid-template-columns: 1fr;
    }
}
