:root {
    color-scheme: light;
    --ink: #21152f;
    --muted: #716b7a;
    --purple: #532b83;
    --purple-dark: #32134f;
    --pink: #e72e81;
    --line: #e9e3ee;
    --surface: #fff;
    --soft: #f7f3fa;
    --shadow: 0 24px 70px rgba(38, 11, 61, .16);
}

@font-face {
    font-family: "Montserrat";
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url("../fonts/montserrat-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;
}
@font-face {
    font-family: "Montserrat";
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url("../fonts/montserrat-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Noto Sans Thai";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/noto-sans-thai-thai.woff2") format("woff2");
    unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
    font-family: "Noto Sans Thai";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/noto-sans-thai-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Noto Sans Thai";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/noto-sans-thai-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;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: #fbf9fc;
    font-family: "Montserrat", "Noto Sans Thai";
    font-synthesis: none;
    -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.site-header, .admin-header {
    position: relative;
    z-index: 2;
    display: flex;
    width: 100%;
    min-height: 78px;
    align-items: center;
    justify-content: space-between;
    padding: 16px clamp(20px, 5.6vw, 84px);
    background: #fff;
}
.brand { display: inline-flex; align-items: center; }
.brand img { display: block; width: 88px; height: auto; }
.header-kicker { color: #5d5066; font-size: 10px; font-weight: 700; letter-spacing: .16em; }
.header-kicker span { padding: 0 7px; color: var(--pink); }

.registration-hero {
    position: relative;
    min-height: calc(100vh - 78px);
    overflow: hidden;
    background: #d3b0d0;
}
.hero-art {
    position: absolute;
    inset: 0;
    height: 100%;
    background: url("../images/260429-innovate-masthead.jpg") center center / cover no-repeat;
}
.hero-content {
    position: relative;
    display: grid;
    width: min(1180px, calc(100% - 64px));
    min-height: 690px;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 455px);
    align-items: center;
    gap: clamp(48px, 8vw, 120px);
    margin: 0 auto;
    padding: 76px 0 90px;
}
.event-copy { max-width: 590px; padding: 4px 0 80px; color: #4d144a; }
.eyebrow { margin: 0 0 14px; color: var(--pink); font-size: 10px; font-weight: 800; letter-spacing: .16em; line-height: 1.5; }
.event-logo { display: block; width: 137px; max-width: 100%; height: auto; margin: 0 0 30px; }
.event-copy h1 { max-width: 602px; margin: 0 0 20px; color: #4d144a; font-size: clamp(32px, 3.34vw, 48px); font-weight: 700; line-height: 1.04; }
.hero-description { max-width: 530px; margin: 0 0 20px; color: #4d144a; font-family: "Montserrat", "Noto Sans Thai"; font-size: 18px; line-height: 1.5; }
.event-details, .event-tagline { margin: 0 0 12px; color: #4d144a; font-size: 18px; line-height: 1.5; }
.event-tagline { font-weight: 700; }

.registration-card, .thanks-card, .login-card {
    width: 100%;
    padding: clamp(26px, 4vw, 42px);
    border: 1px solid rgba(255,255,255,.8);
    border-radius: 17px;
    background: rgba(255,255,255,.98);
    box-shadow: var(--shadow);
}
.registration-card { align-self: center; }
.card-heading { margin-bottom: 26px; }
.card-heading .eyebrow { margin-bottom: 7px; }
.card-heading h2, .table-heading h2, .qr-panel h2 { margin: 0; font-size: 23px; font-weight: 700; letter-spacing: -.04em; }
.card-heading > p:last-child { margin: 8px 0 0; color: var(--muted); font-family: "Montserrat", "Noto Sans Thai"; font-size: 13px; line-height: 1.6; }
.field-group { margin-bottom: 18px; }
.field-group label, .filters label { display: block; margin-bottom: 8px; color: #342942; font-size: 12px; font-weight: 700; }
.required-mark { color: var(--pink); }
.field-group input, .filters input {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #d9d1e0;
    border-radius: 8px;
    outline: 0;
    background: #fff;
    color: var(--ink);
    font-family: "Montserrat", "Noto Sans Thai";
    font-size: 14px;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.field-group input:hover, .filters input:hover { border-color: #aa91bd; }
.field-group input:focus, .filters input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(83,43,131,.15); }
.field-group input[aria-invalid="true"] { border-color: #b42348; background: #fffafb; }
.field-error { margin: 7px 0 0; color: #a5163a; font-family: "Montserrat", "Noto Sans Thai"; font-size: 12px; line-height: 1.5; }
.submit-button {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
    padding: 12px 45px 12px 20px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(100deg, #57277f 0%, #722b8a 52%, #c82c83 100%);
    box-shadow: 0 8px 18px rgba(91, 34, 119, .2);
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}
.submit-button:hover { transform: translateY(-1px); box-shadow: 0 11px 22px rgba(91, 34, 119, .28); }
.submit-button:focus-visible, .export-button:focus-visible, .back-link:focus-visible, .text-link:focus-visible { outline: 3px solid #e79dc4; outline-offset: 3px; }
.submit-button:disabled { cursor: wait; opacity: .78; transform: none; }
.button-arrow { position: absolute; right: 19px; font-size: 18px; font-weight: 400; }
.button-loading { display: none; align-items: center; gap: 8px; }
.submit-button.is-loading .button-label, .submit-button.is-loading .button-arrow { display: none; }
.submit-button.is-loading .button-loading { display: inline-flex; }
.spinner { width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.privacy-note { margin: 14px 0 0; color: #81798a; font-family: "Montserrat", "Noto Sans Thai"; font-size: 10px; line-height: 1.6; text-align: center; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 19px clamp(20px, 5.6vw, 84px); background: #fff; color: #8b8391; font-size: 10px; }
.site-footer img { display: block; width: 82px; height: auto; }

.thanks-page { min-height: 100vh; background: #d3b0d0; }
.thanks-main { position: relative; display: grid; min-height: calc(100vh - 135px); place-items: center; overflow: hidden; padding: 50px 20px; background: #d3b0d0; }
.thanks-art { position: absolute; inset: 0; background: url("../images/260429-innovate-masthead.jpg") center / cover no-repeat; }
.thanks-card { position: relative; width: min(610px, 100%); padding: clamp(34px, 6vw, 64px); border: 1px solid rgba(255,255,255,.8); border-radius: 17px; background: rgba(255,255,255,.98); box-shadow: var(--shadow); text-align: center; }
.thanks-logo { display: block; width: 137px; max-width: 100%; height: auto; margin: 0 auto 25px; }
.success-icon { display: grid; width: 65px; height: 65px; place-items: center; margin: 0 auto 22px; border-radius: 50%; background: #f4e4f1; color: #4d144a; }
.success-icon svg { width: 49px; height: 49px; }
.thanks-card h1 { margin: 0; color: #4d144a; font-family: "Montserrat", "Noto Sans Thai"; font-size: clamp(24px, 5vw, 34px); font-weight: 700; line-height: 1.4; }
.thanks-english { margin: 8px 0 0; color: #4d144a; font-size: clamp(15px, 3vw, 19px); font-weight: 600; }
.back-link, .text-link { display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; color: var(--purple); font-size: 12px; font-weight: 700; text-decoration: none; }
.back-link span, .text-link span { color: var(--pink); font-size: 17px; }

.admin-page { min-height: 100vh; background: #f7f5f9; }
.admin-header { min-height: 72px; border-bottom: 1px solid #eee9f1; }
.admin-brand img { display: block; width: 88px; height: auto; }
.admin-user { display: flex; align-items: center; gap: 18px; color: #554a60; font-size: 12px; }
.admin-user form { margin: 0; }
.admin-user button { padding: 7px 0; border: 0; background: none; color: var(--purple); cursor: pointer; font-size: 12px; font-weight: 700; }
.admin-main { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 42px 0 70px; }
.admin-title-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.admin-title-row .eyebrow { margin-bottom: 8px; }
.admin-title-row h1, .login-card h1 { margin: 0; color: var(--purple-dark); font-size: clamp(26px, 4vw, 34px); letter-spacing: -.05em; }
.admin-intro, .login-subtitle { margin: 8px 0 0; color: var(--muted); font-family: "Montserrat", "Noto Sans Thai"; font-size: 12px; }
.export-button { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 15px; border: 1px solid #d9cbe3; border-radius: 7px; background: #fff; color: var(--purple); font-size: 11px; font-weight: 700; text-decoration: none; }
.export-button span { font-size: 16px; }
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 16px; margin: 28px 0 18px; }
.stat-card, .qr-panel, .registrations-panel { border: 1px solid #ece6f0; border-radius: 11px; background: #fff; box-shadow: 0 5px 18px rgba(35,14,52,.035); }
.stat-card { display: flex; min-height: 104px; flex-direction: column; justify-content: space-between; padding: 17px 20px; }
.stat-card > span { display: flex; align-items: center; gap: 6px; color: #776d80; font-size: 11px; font-weight: 600; }
.stat-card small { color: #9b91a2; font-size: 9px; font-weight: 500; }
.stat-card strong { color: var(--purple-dark); font-size: 30px; font-weight: 700; letter-spacing: -.06em; }
.qr-panel { display: flex; min-height: 180px; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 18px; padding: 18px 24px; }
.qr-panel .eyebrow { margin-bottom: 6px; }
.qr-panel h2, .table-heading h2 { font-size: 17px; }
.qr-panel p:not(.eyebrow) { margin: 7px 0 0; color: var(--muted); font-family: "Montserrat", "Noto Sans Thai"; font-size: 11px; }
.qr-panel .text-link { margin-top: 12px; font-size: 11px; }
.registration-qr { display: block; width: 144px; height: 144px; padding: 7px; border: 1px solid var(--line); border-radius: 6px; background: white; }
.registrations-panel { overflow: hidden; }
.table-heading { padding: 20px 22px 16px; }
.table-heading p { margin: 6px 0 0; color: #8b8391; font-size: 10px; }
.filters { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(130px, 170px) minmax(130px, 170px) auto; align-items: end; gap: 12px; padding: 16px 22px; border-top: 1px solid #f0ebf3; border-bottom: 1px solid #f0ebf3; background: #fbfafc; }
.filters > div { min-width: 0; }
.filters label { margin-bottom: 6px; font-size: 10px; }
.filters input { min-height: 38px; padding: 8px 10px; font-family: "Montserrat", "Noto Sans Thai"; font-size: 11px; }
.filter-button { min-height: 38px; padding: 0 16px; border: 0; border-radius: 6px; background: var(--purple); color: #fff; cursor: pointer; font-size: 11px; font-weight: 700; }
.filter-error { grid-column: 1/-1; margin: 0; }
.table-scroll { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 13px 15px; border-bottom: 1px solid #f0edf2; font-size: 11px; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 22px; }
th:last-child, td:last-child { padding-right: 22px; }
th { background: #fff; color: #766e7d; font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
th span { color: #aaa1af; font-size: 8px; letter-spacing: 0; text-transform: none; }
td { color: #403747; }
td:last-child { font-variant-numeric: tabular-nums; }
.empty-state { height: 100px; color: #89818f; text-align: center; }
.pagination { display: flex; justify-content: flex-end; padding: 16px 20px; }
.pagination nav { display: flex; align-items: center; gap: 5px; }
.pagination nav > div:first-child { display: none; }
.pagination nav > div:last-child > span { display: flex; gap: 4px; }
.pagination a, .pagination span[aria-current] span, .pagination span[aria-disabled] span { display: inline-grid; min-width: 30px; min-height: 30px; place-items: center; padding: 0 8px; border: 1px solid #e9e3ee; border-radius: 5px; color: #51455f; font-size: 10px; text-decoration: none; }
.pagination span[aria-current] span { border-color: var(--purple); background: var(--purple); color: #fff; }
.login-card { width: min(440px, calc(100% - 36px)); margin: clamp(34px, 8vw, 90px) auto; padding: clamp(27px, 5vw, 42px); }
.login-card .eyebrow { margin-bottom: 8px; }
.login-card h1 { font-size: 28px; }
.login-card form { margin-top: 27px; }
.login-card .submit-button { margin-top: 24px; }

@media (min-width: 1200px) {
    .registration-hero { min-height: 730px; }
    .hero-content { min-height: 730px; }
}
@media (max-width: 800px) {
    .hero-content { width: min(680px, calc(100% - 44px)); grid-template-columns: 1fr; gap: 24px; padding: 50px 0 60px; }
    .event-copy { max-width: 602px; padding-bottom: 10px; }
    .event-copy h1 { font-size: clamp(32px, 5vw, 44px); }
    .registration-card { max-width: 455px; justify-self: end; }
    .filters { grid-template-columns: 1fr 1fr 1fr auto; gap: 9px; padding-inline: 15px; }
    th, td { padding-inline: 11px; }
}
@media (max-width: 640px) {
    .site-header { min-height: 64px; padding: 13px 20px; }
    .brand img { width: 78px; }
    .header-kicker { font-size: 8px; }
    .registration-hero { min-height: 0; background: #d3b0d0; }
    .hero-art { position: relative; inset: auto; width: 100%; height: auto; aspect-ratio: 1856 / 1536; background: url("../images/260429-innovate-masthead-mobile.jpg") center center / cover no-repeat; }
    .hero-content { display: flex; width: 100%; min-height: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 30px 20px 40px; }
    .event-copy { min-height: 0; padding: 0 0 29px; color: #4d144a; }
    .event-logo { margin-bottom: 26px; }
    .event-copy h1 { max-width: 602px; font-size: 28px; line-height: 1; }
    .hero-description { max-width: 530px; margin: 0 0 18px; font-size: 16px; line-height: 1.5; }
    .event-details, .event-tagline { font-size: 16px; }
    .registration-card { padding: 25px 21px 22px; border-radius: 12px; }
    .card-heading { margin-bottom: 22px; }
    .card-heading h2 { font-size: 21px; }
    .card-heading .eyebrow { font-size: 8px; }
    .field-group { margin-bottom: 16px; }
    .field-group input { min-height: 46px; }
    .submit-button { min-height: 50px; }
    .site-footer { padding: 17px 20px; }
    .site-footer img { width: 70px; }
    .site-footer span { font-size: 9px; text-align: right; }
    .thanks-main { display: flex; min-height: calc(100vh - 121px); flex-direction: column; align-items: stretch; padding: 0 0 32px; background: #d3b0d0; }
    .thanks-art { position: relative; inset: auto; width: 100%; aspect-ratio: 1856 / 1536; background: url("../images/260429-innovate-masthead-mobile.jpg") center / cover no-repeat; }
    .thanks-card { width: calc(100% - 36px); align-self: center; margin-top: 24px; padding: 34px 22px; }
    .thanks-logo { margin-bottom: 21px; }
    .thanks-card h1 { font-size: 25px; }
    .admin-header { min-height: 64px; padding: 12px 18px; }
    .admin-brand img { width: 78px; }
    .admin-user { gap: 10px; font-size: 10px; }
    .admin-user button { font-size: 10px; }
    .admin-main { width: calc(100% - 32px); padding: 28px 0 48px; }
    .admin-title-row { align-items: flex-start; }
    .admin-title-row h1 { font-size: 27px; }
    .admin-title-row .eyebrow { font-size: 8px; }
    .admin-intro { max-width: 215px; font-size: 10px; line-height: 1.5; }
    .export-button { min-height: 38px; padding: 0 10px; font-size: 9px; white-space: nowrap; }
    .stats-grid { gap: 10px; margin-top: 21px; }
    .stat-card { min-height: 88px; padding: 13px; }
    .stat-card > span { font-size: 9px; }
    .stat-card strong { font-size: 26px; }
    .qr-panel { min-height: 150px; gap: 10px; padding: 15px; }
    .qr-panel h2 { font-size: 14px; }
    .qr-panel p:not(.eyebrow) { max-width: 190px; font-size: 10px; }
    .qr-panel .eyebrow { font-size: 8px; }
    .registration-qr { width: 110px; height: 110px; padding: 5px; }
    .table-heading { padding: 17px 15px 13px; }
    .filters { grid-template-columns: 1fr 1fr; gap: 12px 9px; padding: 14px; }
    .filter-search { grid-column: 1/-1; }
    .filter-button { min-height: 38px; }
    th:first-child, td:first-child { padding-left: 14px; }
    th:last-child, td:last-child { padding-right: 14px; }
    th, td { padding: 12px 10px; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
