:root {
    /* Brand from official logo: cyan → electric blue → navy */
    --qf-cyan: #00d4c8;
    --qf-cyan-deep: #00a8b0;
    --qf-blue: #1a8cff;
    --qf-blue-mid: #0070e0;
    --qf-navy: #061428;
    --qf-navy-mid: #0a2744;
    --qf-ink: #071525;
    --qf-teal: #00b8c4;
    --qf-teal-deep: #007a9a;
    --qf-mint: #d7f7f5;
    --qf-sand: #eef4fa;
    --qf-coral: #ff5c6c;
    --qf-white: #ffffff;
    --qf-muted: #5a6b7d;
    --qf-line: rgba(6, 20, 40, 0.12);
    --qf-shadow: 0 18px 50px rgba(6, 20, 40, 0.14);
    --qf-brand-gradient: linear-gradient(135deg, #00d4c8 0%, #1a8cff 55%, #0a3d8f 100%);
    --font-display: "Fraunces", Georgia, serif;
    --font-body: "Manrope", system-ui, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--qf-ink);
    background: var(--qf-sand);
    line-height: 1.5;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.qf-container {
    width: min(1120px, calc(100% - 2rem));
    margin-inline: auto;
}

.qf-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.03em;
    font-size: 1.35rem;
    color: var(--qf-ink);
}

.qf-brand img,
.qf-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    flex-shrink: 0;
}

.qf-brand span {
    background: var(--qf-brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.qf-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #000;
    overflow: hidden;
    flex-shrink: 0;
}

.qf-brand-mark img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

/* Public landing */
.qf-site {
    background:
        radial-gradient(circle at 12% 18%, rgba(0, 212, 200, 0.18), transparent 42%),
        radial-gradient(circle at 88% 8%, rgba(26, 140, 255, 0.16), transparent 36%),
        linear-gradient(180deg, #f4f8fc 0%, #e8eef6 55%, #dff5f3 100%);
    min-height: 100vh;
}

.qf-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0;
}

.qf-nav-links {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.qf-hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2.5rem;
    align-items: center;
    padding: 3rem 0 5rem;
    min-height: calc(100vh - 5rem);
}

.qf-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 6vw, 4.6rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
    margin: 0 0 1rem;
}

.qf-hero p {
    font-size: 1.1rem;
    color: var(--qf-muted);
    max-width: 34rem;
    margin: 0 0 1.75rem;
}

.qf-hero-visual {
    position: relative;
    min-height: 380px;
    border-radius: 2rem;
    background:
        radial-gradient(circle at 30% 25%, rgba(0, 212, 200, 0.28), transparent 45%),
        radial-gradient(circle at 75% 70%, rgba(26, 140, 255, 0.35), transparent 50%),
        linear-gradient(160deg, #02060f 0%, #061428 55%, #0a2744 100%);
    box-shadow: var(--qf-shadow);
    overflow: hidden;
    color: white;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
}

.qf-hero-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.08), transparent 35%);
    pointer-events: none;
}

.qf-hero-logo {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 2.5rem;
}

.qf-hero-logo img {
    width: min(280px, 70%);
    height: auto;
    filter: drop-shadow(0 18px 40px rgba(0, 180, 255, 0.35));
    animation: qf-float 5s ease-in-out infinite;
}

@keyframes qf-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.qf-hero-visual strong {
    font-family: var(--font-display);
    font-size: 2.2rem;
    letter-spacing: -0.04em;
    position: relative;
    z-index: 1;
}

.qf-hero-visual span {
    position: relative;
    z-index: 1;
    opacity: 0.9;
}

.qf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    padding: 0.75rem 1.25rem;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.95rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.qf-btn:hover {
    transform: translateY(-1px);
}

.qf-btn-primary {
    background: var(--qf-brand-gradient);
    color: white;
    box-shadow: 0 10px 24px rgba(26, 140, 255, 0.3);
}

.qf-btn-primary:hover {
    filter: brightness(1.05);
}

.qf-btn-ghost {
    background: transparent;
    color: var(--qf-ink);
    border: 1px solid var(--qf-line);
}

.qf-btn-light {
    background: rgba(255, 255, 255, 0.16);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.qf-btn-block {
    width: 100%;
}

.qf-section {
    padding: 3.5rem 0;
}

.qf-section h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    letter-spacing: -0.03em;
    margin: 0 0 0.75rem;
}

.qf-section > p,
.qf-lead {
    color: var(--qf-muted);
    max-width: 36rem;
    margin: 0 0 2rem;
}

.qf-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.qf-step {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--qf-line);
    border-radius: 1.25rem;
    padding: 1.35rem;
}

.qf-step b {
    display: block;
    font-family: var(--font-display);
    font-size: 2rem;
    background: var(--qf-brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
}

.qf-footer {
    padding: 2rem 0 3rem;
    color: var(--qf-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--qf-line);
}

/* Auth + portal shells */
.qf-auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
    background:
        radial-gradient(circle at 18% 20%, rgba(0, 212, 200, 0.2), transparent 42%),
        radial-gradient(circle at 85% 15%, rgba(26, 140, 255, 0.18), transparent 40%),
        linear-gradient(160deg, #f4f8fc, #e4eef8 50%, #dff4f2);
}

.qf-auth-card {
    width: min(420px, 100%);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--qf-line);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: var(--qf-shadow);
}

.qf-auth-card h1 {
    font-family: var(--font-display);
    font-size: 1.85rem;
    letter-spacing: -0.03em;
    margin: 0.35rem 0 0.35rem;
}

.qf-auth-card .qf-sub {
    color: var(--qf-muted);
    margin: 0 0 1.5rem;
    font-size: 0.95rem;
}

.qf-field {
    margin-bottom: 1rem;
}

.qf-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.qf-field input[type="email"],
.qf-field input[type="text"],
.qf-field input[type="password"],
.qf-field input[type="number"],
.qf-field input[type="date"],
.qf-field select {
    width: 100%;
    border: 1px solid var(--qf-line);
    border-radius: 0.85rem;
    padding: 0.8rem 0.95rem;
    font: inherit;
    background: white;
}

.qf-field input:focus,
.qf-field select:focus {
    outline: 2px solid rgba(26, 140, 255, 0.25);
    border-color: var(--qf-blue);
}

.qf-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    margin: 0.5rem 0 1.25rem;
}

.qf-error {
    background: #fdece8;
    color: #8a3a28;
    border: 1px solid #f3c4b7;
    border-radius: 0.85rem;
    padding: 0.75rem 0.9rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.qf-error ul {
    margin: 0;
    padding-left: 1.1rem;
}

.qf-portal {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 240px 1fr;
}

.qf-sidebar {
    background:
        radial-gradient(circle at 20% 0%, rgba(0, 212, 200, 0.22), transparent 45%),
        linear-gradient(180deg, #061428 0%, #0a2744 55%, #071b33 100%);
    color: white;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.qf-sidebar .qf-brand {
    padding: 0 0.5rem;
    color: white;
}

.qf-sidebar .qf-brand span {
    background: none;
    color: var(--qf-cyan);
    -webkit-background-clip: unset;
    background-clip: unset;
}

.qf-sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.qf-sidebar a,
.qf-sidebar .nav-item {
    padding: 0.7rem 0.85rem;
    border-radius: 0.75rem;
    color: rgba(255, 255, 255, 0.82);
    font-weight: 600;
    font-size: 0.95rem;
}

.qf-sidebar a.active,
.qf-sidebar a:hover {
    background: rgba(0, 212, 200, 0.16);
    color: white;
}

.qf-sidebar-footer {
    margin-top: auto;
    padding: 0.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.qf-main {
    padding: 1.5rem;
    background:
        radial-gradient(circle at 100% 0%, rgba(26, 140, 255, 0.06), transparent 35%),
        var(--qf-sand);
}

.qf-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.qf-topbar h1 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    margin: 0;
    letter-spacing: -0.03em;
}

.qf-topbar p {
    margin: 0.2rem 0 0;
    color: var(--qf-muted);
}

.qf-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.qf-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--qf-line);
    border-radius: 1.15rem;
    padding: 1.25rem;
}

.qf-card .label {
    color: var(--qf-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.qf-card .value {
    font-family: var(--font-display);
    font-size: 2rem;
    letter-spacing: -0.03em;
    margin-top: 0.35rem;
    background: var(--qf-brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.qf-panel {
    margin-top: 1.25rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--qf-line);
    border-radius: 1.15rem;
    padding: 1.35rem;
}

.qf-panel h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin: 0 0 0.75rem;
}

.qf-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1.25rem;
}

.qf-meta div {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--qf-line);
}

.qf-meta dt {
    font-size: 0.8rem;
    color: var(--qf-muted);
    font-weight: 600;
}

.qf-meta dd {
    margin: 0.15rem 0 0;
    font-weight: 700;
}

.qf-plus { color: var(--qf-cyan-deep); font-weight: 700; }
.qf-minus { color: var(--qf-coral); font-weight: 700; }

@media (max-width: 900px) {
    .qf-hero,
    .qf-steps,
    .qf-cards,
    .qf-portal,
    .qf-meta {
        grid-template-columns: 1fr;
    }

    .qf-sidebar {
        min-height: auto;
    }

    .qf-hero {
        min-height: auto;
        padding-top: 1.5rem;
    }
}
