/* ==========================================================================
   FUTURE TECH GLOBAL — LINEAR × MAPBOX DESIGN SYSTEM (WORKSHOP TICKET PORTAL)
   Near-monochrome obsidian • single crimson brand accent • asymmetric bento
   ========================================================================== */

:root {
    --bg: #08090A;
    --surface-1: #0E0F11;
    --surface-2: #141518;
    --surface-3: #1B1C20;
    --surface-glass: rgba(12, 13, 15, 0.78);

    --line-1: rgba(255, 255, 255, 0.06);
    --line-2: rgba(255, 255, 255, 0.11);
    --line-3: rgba(255, 255, 255, 0.18);

    --text-1: #F7F8F8;
    --text-2: #B4B8BF;
    --text-3: #8A8F98;
    --text-4: #62666D;

    --accent: #FF3366;
    --accent-hover: #FF4D7A;
    --accent-soft: rgba(255, 51, 102, 0.12);
    --accent-line: rgba(255, 51, 102, 0.45);
    --accent-glow: rgba(255, 51, 102, 0.32);

    --ok: #3FCF8E;
    --ok-soft: rgba(63, 207, 142, 0.14);
    --ok-line: rgba(63, 207, 142, 0.45);

    --warn: #F5A623;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

    --ease-hover: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
}

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

html, body {
    background-color: var(--bg);
    color: var(--text-1);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body {
    background-image:
        radial-gradient(circle at 15% 0%, rgba(255, 51, 102, 0.09) 0%, transparent 45%),
        radial-gradient(circle at 85% 10%, rgba(79, 169, 245, 0.05) 0%, transparent 40%);
    background-attachment: fixed;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 120ms var(--ease-hover);
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 clamp(16px, 3.5vw, 40px);
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--surface-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line-1);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    gap: 16px;
    flex-wrap: wrap;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-logo-img {
    height: 36px;
    max-width: 220px;
    width: auto;
    object-fit: contain;
    display: block;
}

.brand-badge {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
    padding: 3px 8px;
    border-radius: 999px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-2);
    padding: 7px 13px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 140ms var(--ease-hover);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-1);
    background: var(--surface-2);
    border-color: var(--line-2);
}

.nav-link-accent {
    color: var(--text-1);
    border-color: var(--accent-line);
    background: rgba(255, 51, 102, 0.08);
}

.nav-link-accent:hover,
.nav-link-accent.active {
    background: rgba(255, 51, 102, 0.18);
    border-color: var(--accent);
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 10px var(--ok);
    display: inline-block;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 10px;
    border-left: 1px solid var(--line-2);
}

.nav-user-name {
    font-size: 13px;
    color: var(--text-3);
}

/* Main & Footer */
.site-main {
    flex: 1;
    padding: 32px 0 64px;
}

.site-footer {
    border-top: 1px solid var(--line-1);
    padding: 24px 0;
    background: var(--surface-1);
    margin-top: auto;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-3);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-mark {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.footer-links a {
    color: var(--text-2);
    font-family: var(--font-mono);
    font-size: 12px;
}

.footer-links a:hover {
    color: var(--accent);
}

/* Alerts & Flash */
.flash-wrap {
    margin-bottom: 24px;
}

.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    border-radius: var(--radius-md);
    background: var(--surface-2);
    border: 1px solid var(--line-2);
    font-size: 14px;
    font-weight: 500;
}

.alert-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.alert-success {
    border-color: var(--ok-line);
    background: var(--ok-soft);
    color: #E3FFF2;
}
.alert-success .alert-indicator {
    background: var(--ok);
}

.alert-error {
    border-color: var(--accent-line);
    background: var(--accent-soft);
    color: #FFE4EC;
}
.alert-error .alert-indicator {
    background: var(--accent);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 120ms var(--ease-hover), background-color 140ms var(--ease-hover), border-color 140ms var(--ease-hover), box-shadow 140ms var(--ease-hover);
    white-space: nowrap;
}

.btn:active {
    transform: translateY(1px);
}

.btn-sm {
    font-size: 13px;
    padding: 6px 12px;
}

.btn-lg {
    font-size: 15px;
    padding: 13px 24px;
    border-radius: var(--radius-md);
}

.btn-primary {
    background: var(--accent);
    color: #FFFFFF;
    border-color: var(--accent);
    box-shadow: 0 4px 20px rgba(255, 51, 102, 0.25);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    box-shadow: 0 6px 26px rgba(255, 51, 102, 0.4);
}

.btn-secondary {
    background: var(--surface-3);
    color: var(--text-1);
    border-color: var(--line-2);
}

.btn-secondary:hover {
    background: #23252A;
    border-color: var(--line-3);
}

.btn-outline {
    background: transparent;
    color: var(--text-1);
    border-color: var(--line-2);
}

.btn-outline:hover {
    background: var(--surface-2);
    border-color: var(--line-3);
}

.btn-ghost {
    background: transparent;
    color: var(--text-2);
    border-color: transparent;
}

.btn-ghost:hover {
    color: var(--text-1);
    background: var(--surface-2);
}

.btn-danger {
    background: rgba(255, 51, 102, 0.12);
    color: #FF6B8E;
    border-color: rgba(255, 51, 102, 0.3);
}

.btn-danger:hover {
    background: var(--accent);
    color: #FFFFFF;
}

/* Bento Cards & Panels */
.card {
    background: var(--surface-1);
    border: 1px solid var(--line-2);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    min-width: 0;
}

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.section-eyebrow {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    display: inline-block;
    margin-bottom: 6px;
}

.page-title {
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-1);
}

.page-subtitle {
    color: var(--text-2);
    font-size: 14px;
    margin-top: 4px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--surface-1);
    border: 1px solid var(--line-2);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    min-width: 0;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    font-family: var(--font-mono);
    margin-top: 6px;
    color: var(--text-1);
}

.stat-value.accent {
    color: var(--accent);
}

.stat-value.ok {
    color: var(--ok);
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px;
}

.form-hint {
    font-size: 12px;
    color: var(--text-3);
    font-weight: 400;
}

.instructor-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: end;
    background: var(--surface-2);
    border: 1px solid var(--line-2);
    border-radius: 10px;
    padding: 14px;
}

.form-control {
    width: 100%;
    background: var(--surface-2);
    border: 1px solid var(--line-2);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    color: var(--text-1);
    font-family: var(--font-sans);
    font-size: 14px;
    transition: border-color 140ms var(--ease-hover), box-shadow 140ms var(--ease-hover);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

textarea.form-control {
    min-height: 110px;
    resize: vertical;
}

.mono-input {
    font-family: var(--font-mono);
}

/* Logo Picker */
.logo-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.logo-option {
    cursor: pointer;
    position: relative;
}

.logo-option input {
    position: absolute;
    opacity: 0;
}

.logo-option-box {
    border: 1px solid var(--line-2);
    background: var(--surface-2);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 140ms var(--ease-hover);
}

.logo-option-preview {
    height: 48px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #08090A;
    border-radius: 6px;
    padding: 6px;
}

.logo-option-preview img {
    max-height: 36px;
    max-width: 100%;
    object-fit: contain;
}

.logo-option-name {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-2);
    text-align: center;
}

.logo-option input:checked + .logo-option-box {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: 0 0 0 2px rgba(255, 51, 102, 0.25);
}

/* Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
    padding: 12px 14px;
    border-bottom: 1px solid var(--line-2);
    background: var(--surface-2);
    white-space: nowrap;
}

.data-table td {
    padding: 14px;
    border-bottom: 1px solid var(--line-1);
    font-size: 14px;
    vertical-align: middle;
}

.data-table td.td-actions {
    text-align: right;
    white-space: nowrap;
}

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.ticket-table-link-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ticket-table-link {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-2);
    text-decoration: underline;
    word-break: break-all;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.badge-ok {
    background: var(--ok-soft);
    color: var(--ok);
    border: 1px solid var(--ok-line);
}

.badge-pending {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-2);
    border: 1px solid var(--line-2);
}

.badge-accent {
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--accent-line);
}

.code-pill {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.06em;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
    padding: 4px 9px;
    border-radius: 6px;
    white-space: nowrap;
    display: inline-block;
}

/* Workshop Bento List */
.workshop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
    gap: 20px;
}

.workshop-card {
    background: var(--surface-1);
    border: 1px solid var(--line-2);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    position: relative;
    overflow: hidden;
    min-width: 0;
    transition: border-color 160ms var(--ease-hover), transform 160ms var(--ease-hover);
}

.workshop-card:hover {
    border-color: var(--line-3);
    transform: translateY(-2px);
}

.workshop-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
}

.workshop-meta-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line-1);
    font-size: 13px;
    color: var(--text-2);
}

.workshop-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.workshop-meta-label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-3);
    min-width: 78px;
    text-transform: uppercase;
}

.progress-bar-track {
    width: 100%;
    height: 6px;
    background: var(--surface-3);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 6px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--ok));
    border-radius: 999px;
    transition: width 300ms var(--ease-out);
}

/* ==========================================================================
   PUBLIC DIGITAL INVITE TICKET VIEW
   ========================================================================== */
.ticket-showcase-wrap {
    max-width: 980px;
    margin: 0 auto;
}

.ticket-hero-header {
    text-align: center;
    margin-bottom: 28px;
}

.ticket-pass {
    display: grid;
    grid-template-columns: 1fr 300px;
    background: linear-gradient(135deg, #111317 0%, #0B0C0E 100%);
    border: 1px solid var(--line-3);
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
    box-shadow:
        0 28px 80px rgba(0, 0, 0, 0.7),
        0 0 60px rgba(255, 51, 102, 0.12);
}

.ticket-pass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 6px;
    background: var(--accent);
}

.ticket-main-pane {
    padding: 36px 36px 36px 42px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
    position: relative;
    min-width: 0;
    background-image: radial-gradient(circle at 0% 0%, rgba(255, 51, 102, 0.12), transparent 55%);
}

.ticket-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.ticket-brand-logo {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.ticket-workshop-title {
    font-size: clamp(22px, 2.8vw, 32px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: var(--text-1);
    margin-top: 6px;
}

.ticket-workshop-desc {
    font-size: 14px;
    color: var(--text-2);
    margin-top: 8px;
    line-height: 1.55;
}

.ticket-attendee-box {
    background: rgba(255, 51, 102, 0.08);
    border: 1px solid var(--accent-line);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.ticket-attendee-label {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
}

.ticket-attendee-name {
    font-size: clamp(20px, 2.4vw, 26px);
    font-weight: 800;
    color: #FFFFFF;
    margin-top: 2px;
}

.ticket-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line-2);
}

.ticket-info-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.ticket-info-cell.full {
    grid-column: 1 / -1;
}

.ticket-info-label {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
}

.ticket-info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-1);
    word-break: break-word;
}

.ticket-info-sub {
    font-size: 13px;
    color: var(--accent);
    font-weight: 500;
    word-break: break-word;
}

/* Perforated Stub Divider & QR Pane */
.ticket-qr-pane {
    background: #0B0C0F;
    border-left: 2px dashed var(--line-3);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 14px;
    position: relative;
}

.ticket-qr-pane::before,
.ticket-qr-pane::after {
    content: '';
    position: absolute;
    left: -13px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--line-3);
}

.ticket-qr-pane::before {
    top: -13px;
}

.ticket-qr-pane::after {
    bottom: -13px;
}

.qr-frame {
    background: #FFFFFF;
    padding: 14px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.qr-frame canvas,
.qr-frame img {
    display: block;
    width: 176px;
    height: 176px;
}

.ticket-code-box {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--text-1);
    background: var(--surface-2);
    border: 1px solid var(--line-2);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
}

.ticket-actions-bar {
    margin-top: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.ticket-link-card {
    margin-top: 16px;
    background: var(--surface-1);
    border: 1px solid var(--line-2);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.ticket-link-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1 1 240px;
}

.ticket-link-label {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--text-3);
    text-transform: uppercase;
}

.ticket-link-url {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.ticket-link-url:hover {
    color: var(--accent);
}

.ticket-link-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ==========================================================================
   QR CHECK-IN SCANNER
   ========================================================================== */
.scanner-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
    align-items: start;
}

.scanner-layout > * {
    min-width: 0;
}

.camera-viewport {
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 240px;
    background: #050506;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-viewport video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    z-index: 1;
}

.camera-viewport video.active {
    display: block;
}

.camera-placeholder {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    text-align: center;
    padding: 24px 18px;
    color: var(--text-3);
}

.scanner-reticle {
    position: absolute;
    z-index: 3;
    width: min(220px, 65%);
    aspect-ratio: 1 / 1;
    height: auto;
    border: 2px solid var(--accent);
    border-radius: 16px;
    box-shadow: 0 0 0 9999px rgba(8, 9, 10, 0.48);
    pointer-events: none;
}

.scanner-laser {
    position: absolute;
    left: 8px;
    right: 8px;
    height: 2px;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent);
    animation: scanLaser 2.2s infinite ease-in-out;
}

@keyframes scanLaser {
    0%, 100% { top: 12px; }
    50% { top: calc(100% - 14px); }
}

.manual-checkin-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.manual-checkin-form .form-control {
    flex: 1 1 200px;
    min-width: 0;
}

.checkin-result-card {
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 2px solid var(--line-2);
    background: var(--surface-2);
    transition: all 180ms var(--ease-out);
    min-width: 0;
}

.checkin-result-card.state-success {
    background: rgba(63, 207, 142, 0.12);
    border-color: var(--ok);
    box-shadow: 0 0 35px rgba(63, 207, 142, 0.2);
}

.checkin-result-card.state-duplicate {
    background: rgba(255, 51, 102, 0.14);
    border-color: var(--accent);
    box-shadow: 0 0 35px rgba(255, 51, 102, 0.25);
}

.checkin-result-card.state-error {
    background: rgba(245, 166, 35, 0.12);
    border-color: var(--warn);
}

.result-details-grid {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 8px;
    align-items: baseline;
}

/* Modal for Mobile Image Save Preview */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(5, 6, 8, 0.86);
    backdrop-filter: blur(10px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-backdrop.open {
    display: flex;
}

.modal-box {
    background: var(--surface-1);
    border: 1px solid var(--line-3);
    border-radius: var(--radius-lg);
    max-width: 820px;
    width: 100%;
    padding: 20px;
    text-align: center;
}

.modal-box img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--line-2);
    margin: 14px 0;
}

/* Responsive Breakpoints */
@media (max-width: 860px) {
    .ticket-pass {
        grid-template-columns: 1fr;
    }
    .ticket-qr-pane {
        border-left: none;
        border-top: 2px dashed var(--line-3);
    }
    .ticket-qr-pane::before {
        top: -13px;
        left: -13px;
    }
    .ticket-qr-pane::after {
        top: -13px;
        left: auto;
        right: -13px;
        bottom: auto;
    }
    .scanner-layout,
    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .site-main {
        padding: 20px 0 44px;
    }

    .header-inner {
        padding: 10px 0;
        min-height: 56px;
        gap: 10px;
    }

    .brand-logo {
        gap: 8px;
    }

    .brand-logo-img {
        height: 28px;
        max-width: 165px;
    }

    .brand-badge {
        font-size: 10px;
        padding: 2px 7px;
    }

    .site-nav {
        width: 100%;
        justify-content: space-between;
        gap: 6px;
        padding-top: 6px;
        border-top: 1px solid var(--line-1);
        flex-wrap: nowrap;
    }

    .nav-link {
        font-size: 12px;
        padding: 6px 9px;
        gap: 5px;
        white-space: nowrap;
    }

    .nav-user {
        border-left: none;
        padding-left: 0;
        margin-left: auto;
    }

    .nav-user .btn-sm {
        font-size: 12px;
        padding: 5px 8px;
    }

    .nav-user-name {
        display: none;
    }

    .card,
    .workshop-card,
    .checkin-result-card {
        padding: 18px 16px;
        border-radius: var(--radius-md);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 20px;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-value {
        font-size: 22px;
    }

    .instructor-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .instructor-row .btn-remove-instructor {
        width: 100%;
        height: 36px !important;
    }

    .manual-checkin-form {
        flex-direction: column;
    }

    .manual-checkin-form .form-control,
    .manual-checkin-form .btn {
        width: 100%;
        flex: none;
    }

    .workshop-filter-form,
    .tickets-filter-form {
        width: 100%;
    }

    .workshop-filter-form select,
    .tickets-filter-form .form-control {
        width: 100% !important;
        min-width: 0 !important;
        flex: 1 1 100%;
    }

    .ticket-main-pane {
        padding: 22px 18px 22px 24px;
        gap: 18px;
    }

    .ticket-brand-logo {
        height: 28px;
    }

    .ticket-attendee-box {
        padding: 14px 16px;
    }

    .ticket-info-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .ticket-qr-pane {
        padding: 24px 18px;
    }

    .ticket-actions-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .ticket-actions-bar .btn {
        width: 100%;
        white-space: normal;
        text-align: center;
        padding: 13px 16px;
    }

    .ticket-link-card {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 14px;
    }

    .ticket-link-info {
        flex: none;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        background: var(--surface-2);
        border: 1px solid var(--line-1);
        border-radius: var(--radius-sm);
        padding: 8px 12px;
    }

    .ticket-link-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .ticket-link-actions .btn {
        width: 100%;
    }

    .result-details-grid {
        grid-template-columns: 90px 1fr;
    }

    /* Mobile Stacked Card Layout for Data Tables */
    .table-responsive {
        overflow-x: visible;
    }

    .data-table,
    .data-table tbody {
        display: block;
        width: 100%;
    }

    .data-table thead {
        display: none;
    }

    .data-table tbody tr {
        display: flex;
        flex-direction: column;
        gap: 10px;
        background: var(--surface-2);
        border: 1px solid var(--line-2);
        border-radius: var(--radius-md);
        padding: 14px;
        margin-bottom: 12px;
    }

    .data-table tbody tr:last-child {
        margin-bottom: 0;
    }

    .data-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 0 0 10px 0;
        border-bottom: 1px solid var(--line-1);
        text-align: right;
    }

    .data-table td:last-child {
        padding-bottom: 0;
        border-bottom: none;
    }

    .data-table td[data-label]::before {
        content: attr(data-label);
        font-family: var(--font-mono);
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: var(--text-3);
        text-align: left;
        flex-shrink: 0;
    }

    .data-table td[colspan] {
        display: block;
        text-align: center;
        padding: 12px 0;
        border: none;
    }

    .ticket-table-link-group {
        flex-direction: column;
        align-items: flex-end;
        gap: 6px;
    }
}
