/* -------------------------------------------------------------------------
 * Claude Enablement — assessment app
 * Visual language inspired by telekom.com: magenta accent, generous white,
 * bold geometric sans-serif, minimalist layout with angled hero.
 * ---------------------------------------------------------------------- */

:root {
    --magenta:        #E20074;   /* DT primary */
    --magenta-dark:   #B1005A;
    --magenta-light:  #FCE4F0;
    --black:          #000000;
    --dark:           #1A1A1A;
    --text:           #262626;
    --muted:          #6B6B6B;
    --border:         #D9D9D9;
    --bg:             #FFFFFF;
    --soft:           #F5F5F5;
    --softer:         #FAFAFA;

    --radius:         4px;
    --radius-lg:      8px;
    --shadow:         0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg:      0 12px 40px rgba(0, 0, 0, 0.08);

    --font:           "TeleNeo", "Inter", "Helvetica Neue", Arial, sans-serif;
}

/* Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: var(--magenta); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }

/* Layout --------------------------------------------------------------- */
.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.main-wrap {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    flex: 1;
    align-content: center;
}
.main-wrap > .hero {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.header {
    height: 56px;
    background: var(--black);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 10;
}
.header .brand {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.header .brand:hover { text-decoration: none; }
.header .t-logo {
    height: 32px;
    width: auto;
    display: block;
    background: var(--magenta);
    padding: 4px 8px;
    border-radius: 2px;
}
.header .t-mark {
    display: inline-block;
    width: 28px;
    height: 28px;
    background: var(--magenta);
    position: relative;
    border-radius: 2px;
}
.header .t-mark::before,
.header .t-mark::after {
    content: "";
    position: absolute;
    background: var(--magenta);
}
.header .t-mark::before {
    left: -7px;
    top: 2px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.header .t-mark::after {
    right: -7px;
    top: 2px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.header .t-glyph {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 900;
    font-size: 20px;
    line-height: 1;
    font-family: Arial, sans-serif;
}
.header .brand-title { font-size: 15px; font-weight: 700; }
.header .brand-sub { font-size: 13px; font-weight: 400; color: #bbb; margin-left: 8px; }
.header .header-actions {
    display: flex; gap: 16px; align-items: center;
    font-size: 13px; color: #bbb;
}
.header .header-actions a { color: #bbb; }
.header .header-actions a:hover { color: #fff; text-decoration: none; }

/* Hero with diagonal split — survey landing */
.hero {
    position: relative;
    background: #fff;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}
.hero-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 64px 32px 80px;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 40px;
    align-items: center;
    position: relative;
    z-index: 1;
}
.hero::after {
    /* Diagonal magenta wedge on the right, echoing the PDF cover. */
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 45%;
    background: var(--magenta);
    clip-path: polygon(22% 0, 100% 0, 100% 100%, 0 100%);
}
/* Once the hero-inner hits its 1280px cap, anchor the wedge's left edge
   just before the visual column so the diagonal stays clear of hero-text
   regardless of how wide the viewport gets. */
@media (min-width: 1280px) {
    .hero::after {
        width: auto;
        left: calc(50vw + 60px);
        clip-path: polygon(120px 0, 100% 0, 100% 100%, 0 100%);
    }
}
.hero-text h1 {
    font-size: 44px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--black);
}
.hero-text .eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--magenta);
    margin-bottom: 16px;
}
.hero-text p.lede {
    margin-top: 20px;
    font-size: 17px;
    color: var(--text);
    max-width: 560px;
}
.hero-text .meta {
    margin-top: 24px;
    display: flex;
    gap: 32px;
    font-size: 14px;
    color: var(--muted);
}
.hero-text .meta strong { color: var(--text); }
.hero-visual {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
}
.hero-visual .tx {
    font-size: 96px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.03em;
}
.hero-visual .tx .x { opacity: 0.55; font-weight: 700; }
.hero-visual .tagline {
    margin-top: 12px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.02em;
    opacity: 0.95;
}

/* Main content ---------------------------------------------------------- */
.main {
    flex: 1;
    max-width: 820px;
    margin: 0 auto;
    padding: 56px 32px 80px;
    width: 100%;
}

/* Section cards in survey */
.section {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
    transition: box-shadow 0.2s;
}
.section:hover { box-shadow: var(--shadow); }

.section-header {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 8px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--magenta);
}
.section-header .num {
    font-size: 14px;
    font-weight: 700;
    color: var(--magenta);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.section-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--black);
    letter-spacing: -0.01em;
}
.section-note {
    font-size: 14px;
    color: var(--muted);
    margin: 16px 0 0;
    padding: 12px 16px;
    background: var(--softer);
    border-left: 3px solid var(--magenta);
    border-radius: 2px;
}

/* Question groups */
.field {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.field:first-of-type { border-top: 0; padding-top: 8px; }
.field-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 4px;
    line-height: 1.4;
}
.field-sublabel {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 12px;
}
.field-required {
    color: var(--magenta);
    margin-left: 4px;
    font-weight: 700;
}

/* Inputs */
input[type="text"],
input[type="email"] {
    width: 100%;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 15px;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.15s, box-shadow 0.15s;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--magenta);
    box-shadow: 0 0 0 3px rgba(226, 0, 116, 0.15);
}

/* Radio / checkbox options as cards */
.options { display: flex; flex-direction: column; gap: 8px; }
.option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
    background: #fff;
}
.option:hover {
    border-color: var(--magenta);
    background: #fff;
}
.option input {
    margin: 0;
    accent-color: var(--magenta);
    margin-top: 2px;
    cursor: pointer;
}
.option input:checked + .option-label {
    color: var(--black);
    font-weight: 600;
}
.option:has(input:checked) {
    border-color: var(--magenta);
    background: var(--magenta-light);
}
.option-label {
    font-size: 14.5px;
    color: var(--text);
    line-height: 1.4;
    flex: 1;
}

/* Likert — a horizontal pill row */
.likert {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.likert label {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
    background: #fff;
}
.likert label:hover { border-color: var(--magenta); }
.likert input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.likert .n {
    font-size: 20px;
    font-weight: 800;
    color: var(--muted);
}
.likert .scale-hint {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.likert label:has(input:checked) {
    border-color: var(--magenta);
    background: var(--magenta);
}
.likert label:has(input:checked) .n { color: #fff; }
.likert label:has(input:checked) .scale-hint { color: #fff; }

/* Submit bar */
.submit-row {
    margin-top: 40px;
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    align-items: center;
}
.submit-row .small {
    font-size: 13px;
    color: var(--muted);
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
    border-radius: var(--radius);
    transition: all 0.15s;
    text-decoration: none;
    cursor: pointer;
}
.btn-primary {
    background: var(--magenta);
    color: #fff;
}
.btn-primary:hover {
    background: var(--magenta-dark);
    text-decoration: none;
}
.btn-secondary {
    background: #fff;
    color: var(--black);
    border-color: var(--border);
}
.btn-secondary:hover {
    border-color: var(--black);
    text-decoration: none;
}
.btn-ghost {
    background: transparent;
    color: var(--muted);
    padding: 8px 12px;
}
.btn-ghost:hover { color: var(--black); text-decoration: none; }

/* Errors */
.errors {
    background: #fff5f9;
    border: 1px solid var(--magenta);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 24px;
}
.errors h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--magenta-dark);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.errors ul { margin-left: 16px; list-style: disc; }
.errors li { font-size: 14px; color: var(--text); }

/* Thanks page ---------------------------------------------------------- */
.center-card {
    max-width: 620px;
    margin: 80px auto;
    padding: 48px 40px;
    text-align: center;
}
.center-card .icon {
    width: 72px; height: 72px;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: var(--magenta);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 800;
}
.center-card h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--black);
    letter-spacing: -0.01em;
    margin-bottom: 12px;
}
.center-card p {
    color: var(--text);
    font-size: 16px;
    margin-bottom: 8px;
}
.center-card .muted { color: var(--muted); font-size: 14px; }
.center-card .details {
    margin-top: 32px;
    padding: 20px;
    background: var(--softer);
    border-radius: var(--radius);
    text-align: left;
    border-left: 3px solid var(--magenta);
}
.center-card .details h3 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--magenta);
    margin-bottom: 10px;
}
.center-card .details p { font-size: 14px; margin: 4px 0; }

/* Admin login ---------------------------------------------------------- */
.login-box {
    max-width: 420px;
    margin: 120px auto;
    padding: 40px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.login-box h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--black);
    margin-bottom: 4px;
}
.login-box p.sub {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 24px;
}
.login-box .field { border-top: 0; padding-top: 0; margin-top: 0; }
input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 15px;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 20px;
}
.login-warn {
    font-size: 12px;
    padding: 10px 12px;
    margin-top: 20px;
    background: #fff5f9;
    border-left: 3px solid var(--magenta);
    color: var(--dark);
    border-radius: 2px;
}

/* Dashboard ------------------------------------------------------------ */
.dashboard {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px;
}
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}
.dashboard-header h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--black);
    letter-spacing: -0.01em;
}
.dashboard-header .eyebrow {
    font-size: 12px;
    font-weight: 700;
    color: var(--magenta);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}
.dashboard-header .controls {
    display: flex;
    gap: 12px;
    align-items: center;
}
.dashboard-header .controls label {
    font-size: 13px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 8px;
}
.dashboard-header input[type="number"] {
    width: 72px;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.stat {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
}
.stat .label {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.stat .value {
    font-size: 32px;
    font-weight: 800;
    color: var(--black);
    margin-top: 6px;
    line-height: 1;
    letter-spacing: -0.01em;
}
.stat .value .unit {
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    margin-left: 6px;
}
.stat.accent .value { color: var(--magenta); }

/* Level badges + bar */
.level-bar {
    display: flex;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 10px;
    background: var(--border);
}
.level-bar .seg-beginner { background: #F49AC2; }
.level-bar .seg-intermediate { background: #F2C94C; }
.level-bar .seg-advanced { background: #6BAE6E; }
.level-legend {
    display: flex;
    gap: 14px;
    margin-top: 8px;
    font-size: 11px;
    color: var(--muted);
}
.level-legend .dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
}

.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}
.tab {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    margin-bottom: -1px;
}
.tab:hover { color: var(--black); }
.tab.active {
    color: var(--black);
    border-bottom-color: var(--magenta);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Groups grid */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}
.group-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    position: relative;
    overflow: hidden;
}
.group-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--magenta);
}
.group-card h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--black);
}
.group-card .group-meta {
    font-size: 12px;
    color: var(--muted);
    margin: 4px 0 16px;
}
.group-card ol {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.group-card li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: var(--softer);
    border-radius: var(--radius);
}
.group-card .seat {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--black);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.group-card .name {
    flex: 1;
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.group-card .score {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    min-width: 28px;
    text-align: right;
}

.badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.badge.beginner     { background: #FFE4E1; color: #A13149; }
.badge.intermediate { background: #FFF4CE; color: #8B6B00; }
.badge.advanced     { background: #D9EAD3; color: #38761D; }

/* Table */
.data-table {
    width: 100%;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}
.data-table thead {
    background: var(--black);
    color: #fff;
}
.data-table th {
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 12px 16px;
    white-space: nowrap;
}
.data-table td {
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text);
    border-top: 1px solid var(--border);
    vertical-align: middle;
}
.data-table tbody tr:hover { background: var(--softer); }
.data-table .delete-btn {
    background: transparent;
    color: var(--magenta);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
}
.data-table .delete-btn:hover { background: var(--magenta); color: #fff; border-color: var(--magenta); }
.data-table .delete-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--muted);
}
.empty-state h3 {
    font-size: 20px;
    color: var(--black);
    margin-bottom: 8px;
}

/* Footer --------------------------------------------------------------- */
.footer {
    background: var(--black);
    color: #999;
    padding: 24px 32px;
    font-size: 13px;
    margin-top: auto;
}
.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.footer a { color: #ccc; }

/* Banner (QR check-in page) ------------------------------------------- */
.main-wrap > .banner {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    background: #fff;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 32px;
    box-sizing: border-box;
}
.banner-inner {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}
.banner-inner .eyebrow {
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--magenta);
}
.banner-inner h1 {
    font-size: clamp(28px, 3.2vw, 44px);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--black);
    margin: 0;
}
.banner-sub {
    font-size: clamp(18px, 1.6vw, 24px);
    color: var(--muted);
    max-width: 780px;
    margin-bottom: 40px;
}
.qr-wrap {
    background: #fff;
    padding: 12px;
    border: 4px solid var(--magenta);
    border-radius: 12px;
    line-height: 0;
    display: block;
}
.qr-wrap svg {
    width: min(40vh, 60vw) !important;
    height: min(40vh, 60vw) !important;
    display: block;
}
.qr-url {
    margin-top: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: clamp(14px, 1.2vw, 18px);
    color: var(--text);
    word-break: break-all;
    max-width: 900px;
}
.qr-empty {
    padding: 48px;
    border: 2px dashed var(--border);
    border-radius: 12px;
    color: var(--muted);
}

/* Settings tab --------------------------------------------------------- */
.settings-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px 32px;
    max-width: 720px;
}
.settings-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
}
.settings-hint {
    color: var(--muted);
    font-size: 14px;
    margin: 0 0 20px;
}
.settings-form label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
}
.settings-form input[type="url"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.settings-actions {
    margin-top: 16px;
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Responsive ----------------------------------------------------------- */
@media (max-width: 860px) {
    .hero-inner { grid-template-columns: 1fr; text-align: center; }
    .hero-text h1 { font-size: 32px; }
    .hero::after { display: none; }
    .hero-visual { display: none; }
    .main { padding: 32px 20px 48px; }
    .section { padding: 24px 20px; }
    .header { padding: 0 20px; }
    .header .brand-sub { display: none; }
    .header .brand-title { font-size: 14px; }
    .dashboard { padding: 20px; }
    .dashboard-header h1 { font-size: 24px; }
    .submit-row { flex-direction: column; align-items: stretch; }
    .submit-row .btn { width: 100%; }
    .likert label { padding: 12px 0; }
    .likert .n { font-size: 16px; }
}
