/* 
  ========================================
  STYLESHEET
  ========================================
*/
:root {
    /* Backgrounds */
    --bg: #001e32;
    --card-bg: rgba(0, 24, 42, 0.75);
    --header-bg: #01416b;
    --footer-bg: #01416b;

    /* Text */
    --text-primary: #f0f6fc;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --header-text: #ffffff;
    --footer-text: #e2e8f0;

    /* Borders & Highlights */
    --border: rgba(255, 255, 255, 0.1);
    --border-card: rgba(255, 255, 255, 0.08);
    --border-card-top: rgba(56, 189, 248, 0.25);
    --border-focus: #38bdf8;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 35px rgba(1, 65, 107, 0.22);

    /* Button Colors */
    --btn-bg: #0263a1;
    --btn-hover: #0277c2;
    --btn-active: #014f82;

    /* Status Colors */
    --error: #f87171;
    --passed: #4ade80;
    --failed: #f87171;

    /* Sizing */
    --radius: 16px;
    --radius-sm: 10px;
    --header-height: 72px;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    background-image:
        radial-gradient(circle at 50% 12%, rgba(1, 65, 107, 0.35) 0%, rgba(0, 30, 50, 0.6) 55%, var(--bg) 100%);
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-header {
    width: 100%;
    background: var(--header-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    position: relative;
    z-index: 10;
}

.header-inner {
    width: min(1200px, 94vw);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    min-height: var(--header-height);
}

.logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--header-text);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.logo-start,
.logo-end {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-link:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.logo-link:active {
    transform: translateY(0);
}

.header-title {
    margin: 0;
    padding: 0 14px;
    flex: 1;
    min-width: 0;
    text-align: center;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: clamp(13px, 1.6vw, 17px);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #ffffff;
    line-height: 1.35;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.site-logo {
    display: block;
    object-fit: contain;
    transition: filter 0.2s ease;
}

.site-logo--emblem {
    height: 48px;
    width: auto;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

.site-logo--text {
    height: 40px;
    width: auto;
    filter:
        brightness(0) invert(1) drop-shadow(0 2px 5px rgba(0, 0, 0, 0.35));
}

.logo-text {
    font-weight: 600;
    letter-spacing: -0.01em;
    font-size: 15px;
    color: #ffffff;
    display: none;
}

.logo-text--visible {
    display: inline-flex;
}

.page-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(20px, 4vw, 40px);
}

.card {
    width: min(90vw, 430px);
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-card);
    border-top: 1px solid var(--border-card-top);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: clamp(28px, 6vw, 42px);
    display: flex;
    flex-direction: column;
    gap: 24px;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    box-shadow: 0 24px 65px rgba(0, 0, 0, 0.55), 0 0 45px rgba(1, 65, 107, 0.3);
}

.card-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.title {
    margin: 0;
    font-size: clamp(23px, 4vw, 28px);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.subtitle {
    margin: 0;
    font-size: clamp(14px, 2vw, 15px);
    color: var(--text-secondary);
}

.code-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.code-input {
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 20, 36, 0.65);
    padding: 13px 15px;
    font-size: 16px;
    font-family: inherit;
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.code-input::placeholder {
    color: var(--text-tertiary);
}

.code-input:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(0, 20, 36, 0.85);
}

.code-input:focus-visible {
    outline: none;
    border-color: var(--border-focus);
    background: rgba(0, 20, 36, 0.95);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.22);
}

.code-input.is-invalid {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.2);
}

.hint {
    margin: 0;
    font-size: 13px;
    color: var(--text-tertiary);
}

.submit-button {
    border: 1px solid rgba(56, 189, 248, 0.35);
    background: linear-gradient(135deg, var(--btn-bg) 0%, #01416b 100%);
    color: #ffffff;
    border-radius: var(--radius-sm);
    padding: 13px 20px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.submit-button:hover {
    background: linear-gradient(135deg, var(--btn-hover) 0%, #025387 100%);
    border-color: rgba(56, 189, 248, 0.55);
    box-shadow: 0 6px 20px rgba(1, 65, 107, 0.45);
    transform: translateY(-1px);
}

.submit-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35);
}

.submit-button:active {
    transform: translateY(1px);
    background: var(--btn-active);
}

.error-message {
    margin: -6px 0 0;
    min-height: 22px;
    font-size: 14px;
    color: var(--error);
    text-align: center;
}

.error-message:empty::before {
    content: "\00a0";
}

.error-message:not(:empty) {
    animation: shake 320ms ease-in-out;
}

.result-page {
    background-color: var(--bg);
}

.result-card {
    width: min(92vw, 460px);
    align-items: center;
    text-align: center;
    gap: 22px;
}

.result-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin-bottom: -4px;
}

.icon-passed {
    background: rgba(74, 222, 128, 0.12);
    border: 1px solid rgba(74, 222, 128, 0.25);
    box-shadow: 0 0 25px rgba(74, 222, 128, 0.18);
}

.icon-failed {
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.25);
    box-shadow: 0 0 25px rgba(248, 113, 113, 0.18);
}

.result-title {
    font-size: clamp(26px, 5vw, 32px);
}

.result-subtitle {
    max-width: 100%;
    line-height: 1.55;
}

.stakeholder-notes {
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 16px;
    width: 100%;
}

.stakeholder-notes:empty {
    display: none;
}

.result-actions {
    display: flex;
    justify-content: center;
    width: 100%;
}

.link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    padding: 11px 20px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-primary);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.link-button:hover {
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.link-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.3);
}

.site-footer {
    width: 100%;
    background: var(--footer-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    margin-top: auto;
    position: relative;
    z-index: 10;
}

.footer-inner {
    width: min(1200px, 94vw);
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-contact {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13.5px;
    flex-wrap: wrap;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--footer-text);
    text-decoration: none;
    transition: color 0.15s ease, opacity 0.15s ease;
}

.footer-link:hover {
    color: #ffffff;
    text-decoration: underline;
    opacity: 1;
}

.footer-icon {
    display: inline-block;
    flex-shrink: 0;
    opacity: 0.85;
}

.footer-divider {
    color: rgba(255, 255, 255, 0.35);
    font-size: 12px;
    user-select: none;
}

.footer-bottom {
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
}

.footer-bottom small {
    font-size: inherit;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-6px);
    }

    75% {
        transform: translateX(6px);
    }
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .header-inner {
        padding: 10px 0;
        gap: 10px;
    }

    .header-title {
        font-size: 14px;
        padding: 0 8px;
    }
}

@media (max-width: 680px) {
    .logo-end {
        display: none !important;
    }

    .header-inner {
        display: flex;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        min-height: 52px;
        gap: 10px;
    }

    .logo-start {
        flex-shrink: 0;
        width: 38px;
        display: flex;
        align-items: center;
        order: unset;
    }

    .header-title {
        flex: 1;
        width: auto;
        margin-top: 0;
        text-align: center;
        order: unset;
        font-size: clamp(12px, 3.4vw, 14.5px);
        line-height: 1.3;
        padding: 0 6px;
        letter-spacing: -0.01em;
    }

    .header-inner::after {
        content: "";
        width: 38px;
        flex-shrink: 0;
        display: block;
    }

    .site-logo--emblem {
        height: 38px;
        width: auto;
    }

    .footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 8px;
        padding: 14px 0;
    }

    .footer-contact {
        justify-content: center;
        gap: 8px;
    }
}

@media (max-width: 420px) {
    .page-content {
        padding: 16px;
    }

    .card {
        padding: 24px 20px;
        gap: 20px;
    }

    .footer-divider {
        display: none;
    }

    .footer-contact {
        flex-direction: column;
        gap: 4px;
    }
}