/* Testavera – stylesheet (no framework). Values taken from the design mockups. */

@font-face {
    font-family: "Outfit";
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("../fonts/outfit-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --teal: #12A08A;
    --teal-text: #0B7A69;
    --teal-dark: #085A4D;
    --teal-tint: #E3F3EF;
    --teal-light: #5FD4BE;
    --slate: #1B2B3A;
    --slate-dark: #13212E;
    --text-2: #3D4E5C;
    --muted: #5B6B78;
    --muted-2: #4A5B68;
    --surface: #F4F8F7;
    --line: #DCE5E3;
    --line-soft: #E6EEEC;
    --line-app: #E1EAE8;
    --line-input: #C9D6D3;
    --error: #A3401F;
    --error-bg: #FBE9E4;
    --footer-link: #C7D3DC;
    --white: #FFFFFF;
    --font: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--slate);
    background: var(--white);
}

h1, h2, h3, p, ul, ol { margin: 0; }
img, svg { max-width: 100%; }

a { color: var(--teal-text); }
a:hover { color: var(--teal-dark); }

:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}

.container { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.container.narrow { max-width: 760px; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--slate);
    color: var(--white);
    text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---- Brand ---------------------------------------------------------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand-word { font-size: 26px; font-weight: 600; letter-spacing: -0.6px; line-height: 1; }
.brand-a { color: var(--slate); }
.brand-b { color: var(--teal-text); }
.brand--dark .brand-mark { width: 30px; height: 30px; }
.brand--dark .brand-word { font-size: 22px; letter-spacing: -0.4px; }
.brand--dark .brand-a { color: var(--white); }
.brand--dark .brand-b { color: var(--teal-light); }

/* ---- Buttons and pills ---------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: 1px solid transparent;
    border-radius: 12px;
    font: inherit;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}
.btn-primary { background: var(--teal-text); color: var(--white); }
.btn-primary:hover { background: var(--teal-dark); color: var(--white); }
.btn-secondary { background: var(--white); color: var(--slate); border-color: var(--line-input); }
.btn-secondary:hover { color: var(--slate); border-color: var(--teal-text); }
.btn-outline { background: var(--white); color: var(--teal-text); border-color: var(--teal-text); }
.btn-outline:hover { background: var(--teal-tint); color: var(--teal-dark); }
.btn-block { display: flex; width: 100%; padding-top: 14px; padding-bottom: 14px; font-size: 17px; }
.btn-large { padding: 16px 26px; border-radius: 14px; font-size: 17px; }
.btn.is-disabled { opacity: 0.7; cursor: not-allowed; pointer-events: none; }

.pill {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
}
.pill--soon { background: #EAF0EE; color: var(--muted); }
.pill--soon-on-dark { background: rgba(255, 255, 255, 0.22); color: var(--white); }
.pill--standard {
    padding: 8px 14px;
    background: var(--white);
    border: 1px solid var(--line);
    color: var(--teal-text);
    font-size: 14px;
}

.link-strong { font-weight: 500; }
.link-plain { color: var(--slate); font-weight: 500; text-decoration: none; padding: 12px 8px; }
.link-plain:hover { color: var(--teal-text); }

/* ---- Alerts ---------------------------------------------------------- */
.flash-stack { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.alert { padding: 12px 14px; border-radius: 12px; font-size: 15px; line-height: 1.45; }
.alert--error { background: var(--error-bg); color: var(--error); }
.alert--error a { color: var(--error); font-weight: 500; }
.alert--success { background: var(--teal-tint); color: var(--teal-dark); }
.alert--info { background: var(--surface); color: var(--muted-2); border: 1px solid var(--line); }
.container > .flash-stack { margin-top: 18px; }

/* ---- Header ---------------------------------------------------------- */
.site-header { border-bottom: 1px solid var(--line-soft); background: var(--white); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-top: 18px; padding-bottom: 18px; }
.main-nav { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-left: 24px; font-size: 16px; }
.main-nav a { color: var(--text-2); text-decoration: none; }
.main-nav a:hover { color: var(--teal-text); }
.nav-soon { color: var(--muted); cursor: default; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }

/* ---- Hero ------------------------------------------------------------ */
.hero { background: var(--surface); }
.hero-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 48px 64px; padding-top: 88px; padding-bottom: 96px; }
.hero-copy { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero-copy .pill--standard { align-self: flex-start; }
.hero h1 { font-size: 60px; line-height: 1.05; font-weight: 600; letter-spacing: -1.6px; }
.hero-lead { font-size: 20px; line-height: 1.55; color: var(--muted-2); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.check-list { list-style: none; padding: 0; margin-top: 16px; display: flex; flex-direction: column; gap: 12px; color: var(--text-2); }
.check-list li { display: flex; gap: 10px; align-items: center; }
.check-list .icon { color: var(--teal-text); flex: none; }
.hero-card { flex: 1 1 380px; min-width: 0; max-width: 440px; }

/* ---- Cards and forms ------------------------------------------------- */
.login-card,
.auth-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 36px;
}
.login-card { box-shadow: 0 24px 48px -24px rgba(27, 43, 58, 0.18); }
.auth-card .login-card { border: 0; box-shadow: none; padding: 0; border-radius: 0; }

.card-title { font-size: 26px; font-weight: 600; letter-spacing: -0.4px; line-height: 1.2; margin-bottom: 6px; }
.card-lead { color: var(--muted); font-size: 15px; margin-bottom: 24px; }
.card-text { color: var(--muted-2); font-size: 15px; margin-bottom: 24px; }
.card-subtitle { font-size: 17px; font-weight: 600; margin-bottom: 12px; }
.card-foot { margin-top: 20px; text-align: center; font-size: 15px; color: var(--muted); }

.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field label { font-size: 14px; font-weight: 500; }
.field-aside { font-size: 14px; }
.field input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--line-input);
    border-radius: 12px;
    background: var(--white);
    color: var(--slate);
    font: inherit;
    font-size: 16px;
}
.field input::placeholder { color: var(--muted); }
.field input:focus { outline: 2px solid var(--teal); outline-offset: 1px; border-color: var(--teal); }
.field--error input { border-color: var(--error); }
.field-hint { font-size: 13px; color: var(--muted); }
.field-error { font-size: 14px; color: var(--error); }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 96px; }
.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    padding: 6px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--teal-text);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.password-toggle:hover { background: var(--teal-tint); }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--text-2); cursor: pointer; }
.check input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--teal-text); }

.recipient-note {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line-soft);
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 14px;
    line-height: 1.5;
    color: var(--muted);
}
.recipient-note .icon { flex: none; margin-top: 2px; color: var(--teal-text); }

/* ---- Sections -------------------------------------------------------- */
.section { padding: 96px 0; }
.section--tint { background: var(--surface); }
.section-head { display: flex; flex-direction: column; gap: 12px; max-width: 720px; margin-bottom: 48px; }
.section-head h2 { font-size: 40px; font-weight: 600; letter-spacing: -1px; line-height: 1.15; }
.section-head p { font-size: 18px; line-height: 1.55; color: var(--muted-2); }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.feature-card { display: flex; flex-direction: column; gap: 12px; padding: 28px; border-radius: 20px; background: var(--surface); }
.feature-card .icon { color: var(--teal-text); }
.feature-card h3 { font-size: 21px; font-weight: 600; }
.feature-card p { color: var(--muted-2); line-height: 1.55; }

.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px; }
.steps li { display: flex; flex-direction: column; gap: 12px; }
.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--teal-tint);
    color: var(--teal-text);
    font-size: 20px;
    font-weight: 600;
}
.steps h3 { font-size: 21px; font-weight: 600; }
.steps p { color: var(--muted-2); line-height: 1.55; }

.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.price-card { display: flex; flex-direction: column; gap: 16px; padding: 32px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); }
.price-card--featured { border: 2px solid var(--teal); padding: 31px; }
.price-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.price-card h3 { font-size: 22px; font-weight: 600; }
.price-card .pill--standard { padding: 6px 10px; font-size: 13px; background: var(--teal-tint); border: 0; }
.price-note { color: var(--muted-2); }
.price-amount { font-size: 40px; font-weight: 600; letter-spacing: -1px; line-height: 1.1; }
.price-unit { font-size: 18px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.price-sub { color: var(--muted); }
.price-card .btn { margin-top: auto; }

/* ---- Footer ---------------------------------------------------------- */
.site-footer { background: var(--slate); color: var(--footer-link); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; padding-top: 48px; padding-bottom: 48px; }
.footer-nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 15px; }
.footer-nav a { color: var(--footer-link); text-decoration: none; }
.footer-nav a:hover { color: var(--white); text-decoration: underline; }

/* ---- Auth pages ------------------------------------------------------ */
.page-auth { background: var(--surface); min-height: 100vh; }
.auth-wrap { max-width: 480px; margin: 0 auto; padding: 40px 16px 32px; display: flex; flex-direction: column; gap: 24px; }
.auth-brand { display: flex; justify-content: center; }
.auth-card { box-shadow: 0 24px 48px -24px rgba(27, 43, 58, 0.14); }
.auth-foot { text-align: center; font-size: 14px; color: var(--muted); }
.auth-foot a { color: var(--muted-2); }

.notice-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    border-radius: 20px;
    background: var(--teal-tint);
    color: var(--teal-text);
}
.notice-icon--warn { background: var(--error-bg); color: var(--error); }
.mail-address { margin-bottom: 16px; font-weight: 600; word-break: break-all; }

.info-card { padding: 48px 32px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); text-align: center; }
.info-card--left { text-align: left; }
.info-card h1 { font-size: 36px; font-weight: 600; letter-spacing: -0.8px; line-height: 1.2; margin-bottom: 12px; }
.info-card p { color: var(--muted-2); margin-bottom: 24px; }
.info-card .notice-icon { margin-left: auto; margin-right: auto; }
.info-card--left .notice-icon { margin-left: 0; }
.error-code { font-size: 64px; font-weight: 600; letter-spacing: -2px; color: var(--teal-text); line-height: 1; margin-bottom: 12px; }

/* ---- Application shell ---------------------------------------------- */
.page-app { background: var(--surface); }
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
    flex: none;
    width: 260px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 24px 16px;
    background: var(--white);
    border-right: 1px solid var(--line-app);
}
.app-sidebar-brand { padding: 0 8px; }
.app-sidebar .brand-mark { width: 34px; height: 34px; }
.app-sidebar .brand-word { font-size: 24px; letter-spacing: -0.5px; }
.app-nav { display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.app-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 12px;
    color: var(--text-2);
    text-decoration: none;
}
.app-nav-item .icon { flex: none; }
.app-nav-item.is-active { background: var(--teal-tint); color: var(--teal-text); font-weight: 600; }
.app-nav-item.is-soon { color: var(--muted); cursor: default; }
.app-nav-label { flex: 1 1 auto; }
.app-org { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.avatar {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--slate);
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
}
.app-org-text { display: flex; flex-direction: column; min-width: 0; }
.app-org-name { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-org-role { font-size: 13px; color: var(--muted); }

.app-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.app-topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 76px;
    padding: 12px 32px;
    background: var(--white);
    border-bottom: 1px solid var(--line-app);
}
.app-search {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 420px;
    max-width: 100%;
    height: 44px;
    padding: 0 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--muted);
}
.app-search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font: inherit; font-size: 15px; color: var(--slate); }
.app-search input::placeholder { color: var(--muted); }
.icon-button {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
    color: var(--text-2);
}
.icon-button:disabled { opacity: 0.6; cursor: not-allowed; }
.app-topbar .btn { height: 44px; padding: 0 18px; font-size: 15px; }

.user-menu { position: relative; }
.user-menu summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 4px 4px;
    border-radius: 12px;
    cursor: pointer;
    list-style: none;
}
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: var(--surface); }
.user-menu-name { font-size: 14px; font-weight: 500; }
.user-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 20;
    min-width: 240px;
    padding: 12px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 16px 32px -16px rgba(27, 43, 58, 0.25);
}
.user-menu-email { padding: 4px 8px 10px; font-size: 13px; color: var(--muted); word-break: break-all; border-bottom: 1px solid var(--line-soft); margin-bottom: 8px; }
.user-menu-logout {
    width: 100%;
    padding: 10px 8px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--slate);
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
}
.user-menu-logout:hover { background: var(--surface); }

.app-content { flex: 1 1 auto; padding: 32px; display: flex; flex-direction: column; gap: 24px; }
.page-head h1 { font-size: 30px; font-weight: 600; letter-spacing: -0.6px; }
.welcome-card,
.empty-card { padding: 24px 26px; background: var(--white); border: 1px solid var(--line-app); border-radius: 18px; }
.welcome-card h2 { font-size: 22px; font-weight: 600; margin-bottom: 4px; }
.welcome-card p { color: var(--muted-2); }
.empty-card { padding: 48px 26px; text-align: center; }
.empty-card .notice-icon { margin-left: auto; margin-right: auto; }
.empty-card h2 { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.empty-card p { color: var(--muted-2); max-width: 480px; margin: 0 auto; }

/* ---- Responsive ------------------------------------------------------ */
@media (max-width: 960px) {
    .hero-inner { padding-top: 56px; padding-bottom: 64px; }
    .hero h1 { font-size: 44px; letter-spacing: -1.2px; }
    .hero-card { max-width: none; flex-basis: 100%; }
    .section { padding: 64px 0; }
    .section-head h2 { font-size: 32px; }
}

@media (max-width: 760px) {
    .main-nav { order: 3; width: 100%; margin-left: 0; gap: 8px 20px; font-size: 15px; }
    .footer-nav { margin-left: 0; }

    .app-shell { flex-direction: column; }
    .app-sidebar { width: auto; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 12px 16px; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line-app); }
    .app-nav { flex-direction: row; overflow-x: auto; order: 3; width: 100%; padding-bottom: 4px; }
    .app-nav-item { white-space: nowrap; padding: 9px 12px; }
    .app-org { margin-top: 0; margin-left: auto; }
    .app-org-text { display: none; }
    .app-topbar { flex-wrap: wrap; padding: 12px 16px; gap: 12px; }
    .app-search { flex: 1 1 100%; width: auto; order: 5; }
    .app-content { padding: 20px 16px; }
    .user-menu-name { display: none; }
}

@media (max-width: 520px) {
    .container { padding-left: 16px; padding-right: 16px; }
    .hero h1 { font-size: 36px; }
    .hero-lead { font-size: 18px; }
    .login-card, .auth-card { padding: 24px 20px; }
    .field-row { grid-template-columns: 1fr; }
    .info-card { padding: 32px 20px; }
    .info-card h1 { font-size: 28px; }
    .header-actions .link-plain { padding: 12px 4px; }
}

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
