/* ============================================================
   INSEE Conference — Registration System
   Design tokens
   ============================================================ */
:root {
    --blue: #0d6efd;
    --violet: #6610f2;
    --ink: #12142b;
    --ink-soft: #4a4d6a;
    --paper: #f6f7fc;
    --paper-raised: #ffffff;
    --line: #e3e5f2;
    --mint: #0fae7a;
    --gold: #f2a413;
    --danger: #e5484d;

    --font-display: 'Space Grotesk', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;

    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 10px;
    --shadow-soft: 0 18px 45px rgba(19, 22, 60, 0.10);
    --shadow-pop: 0 24px 60px rgba(19, 22, 60, 0.18);
}

* { box-sizing: border-box; }

body {
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .display {
    font-family: var(--font-display);
    letter-spacing: -0.01em;
}

.mono, .code-chip, .stat-number {
    font-family: var(--font-mono);
}

a { text-decoration: none; }

/* ---------- Dot-grid QR-inspired texture ---------- */
.qr-texture {
    background-image:
        radial-gradient(rgba(255,255,255,0.16) 1.5px, transparent 1.5px);
    background-size: 14px 14px;
}

/* ============================================================
   Split hero shell (register + admin login)
   ============================================================ */
.shell {
    min-height: 100vh;
    display: flex;
}

.shell-brand {
    position: relative;
    flex: 0 0 42%;
    background: linear-gradient(160deg, var(--violet) 0%, var(--blue) 100%);
    color: #fff;
    padding: 3.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.shell-brand::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.14) 1.6px, transparent 1.6px);
    background-size: 16px 16px;
    opacity: 0.6;
    pointer-events: none;
}

.shell-brand .brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.02em;
    position: relative;
    z-index: 1;
}

.shell-brand .brand-mark i { font-size: 1.4rem; }

.shell-brand .brand-copy {
    position: relative;
    z-index: 1;
    margin-top: 2.5rem;
}

.shell-brand .brand-copy h1 {
    font-size: clamp(2.1rem, 3.4vw, 2.85rem);
    font-weight: 700;
    line-height: 1.12;
    margin-bottom: 1rem;
}

.shell-brand .brand-copy p {
    font-size: 1.02rem;
    opacity: 0.86;
    max-width: 34ch;
    line-height: 1.6;
}

.shell-brand .brand-foot {
    position: relative;
    z-index: 1;
    font-size: 0.85rem;
    opacity: 0.7;
}

.shell-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    background: var(--paper);
}

.panel {
    width: 100%;
    max-width: 460px;
}

.panel-card {
    background: var(--paper-raised);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 2.5rem 2.25rem;
    border: 1px solid var(--line);
}

.panel-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--violet);
    margin-bottom: 0.5rem;
}

.panel-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.6rem;
    margin-bottom: 0.35rem;
}

.panel-sub {
    color: var(--ink-soft);
    font-size: 0.92rem;
    margin-bottom: 1.75rem;
}

/* ---------- Form ---------- */
.field {
    margin-bottom: 1.15rem;
}

.field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.4rem;
}

.field .form-control {
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0.72rem 0.9rem;
    font-size: 0.96rem;
    background: var(--paper);
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.field .form-control:focus {
    outline: none;
    border-color: var(--blue);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(13,110,253,0.12);
}

.field .invalid-feedback { font-size: 0.78rem; }

.btn-brand {
    width: 100%;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    font-weight: 600;
    font-size: 0.98rem;
    color: #fff;
    background: linear-gradient(90deg, var(--blue), var(--violet));
    box-shadow: 0 10px 24px rgba(13,110,253,0.28);
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.btn-brand:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(13,110,253,0.34); color:#fff; }
.btn-brand:disabled { opacity: 0.65; transform: none; cursor: not-allowed; }

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0.6rem 1rem;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--ink);
    background: #fff;
    transition: border-color .15s ease, color .15s ease;
}
.btn-ghost:hover { border-color: var(--violet); color: var(--violet); }

.alert-soft {
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    font-size: 0.86rem;
    border: 1px solid transparent;
}
.alert-soft.danger { background: #fdeceb; color: #a3262a; border-color: #f6c6c6; }
.alert-soft.mint { background: #e8f8f1; color: #0b7f56; border-color: #bdeed7; }

/* ============================================================
   Ticket / badge — signature element
   ============================================================ */
.ticket-wrap { display: flex; justify-content: center; }

.ticket {
    width: 100%;
    max-width: 380px;
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-pop);
    overflow: hidden;
    position: relative;
}

.ticket-top {
    background: linear-gradient(120deg, var(--violet), var(--blue));
    color: #fff;
    padding: 1.35rem 1.5rem 1.6rem;
    position: relative;
}

.ticket-top .t-eyebrow {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    opacity: 0.8;
    margin-bottom: 0.15rem;
}

.ticket-top .t-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
    line-height: 1.2;
}

.ticket-top .t-org {
    font-size: 0.83rem;
    opacity: 0.85;
    margin-top: 0.2rem;
}

/* perforation between top and bottom of ticket */
.ticket-perf {
    position: relative;
    height: 0;
    border-top: 2px dashed rgba(19,22,60,0.18);
    margin: 0 0;
}
.ticket-perf::before, .ticket-perf::after {
    content: "";
    position: absolute;
    top: -12px;
    width: 24px;
    height: 24px;
    background: var(--paper);
    border-radius: 50%;
}
.ticket-perf::before { left: -12px; }
.ticket-perf::after { right: -12px; }

.ticket-bottom {
    padding: 1.6rem 1.5rem 1.75rem;
    text-align: center;
}

.ticket-bottom img.qr-img {
    width: 168px;
    height: 168px;
    image-rendering: pixelated;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 8px;
    background: #fff;
}

.ticket-bottom .code-chip {
    display: inline-block;
    margin-top: 0.9rem;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    color: var(--ink-soft);
    background: var(--paper);
    border: 1px solid var(--line);
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
}

.ticket-actions {
    display: flex;
    gap: 0.6rem;
    margin-top: 1.25rem;
}
.ticket-actions .btn-ghost, .ticket-actions .btn-brand { flex: 1; text-align: center; justify-content: center; font-size: 0.85rem; padding: 0.6rem 0.8rem;}

/* ============================================================
   Admin dashboard
   ============================================================ */
.topbar {
    background: linear-gradient(90deg, var(--violet), var(--blue));
    color: #fff;
    padding: 1.35rem 0;
    box-shadow: 0 6px 20px rgba(13,110,253,0.22);
}

.topbar .brand-mark {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.stat-card {
    background: #fff;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    padding: 1.4rem 1.5rem;
    box-shadow: var(--shadow-soft);
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-soft);
    font-weight: 600;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ink);
    margin-top: 0.25rem;
}

.stat-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    color: #fff;
}

.data-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.data-card .card-head {
    padding: 1.4rem 1.6rem;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    max-width: 280px;
    width: 100%;
}
.search-box input {
    width: 100%;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    padding: 0.55rem 1rem 0.55rem 2.3rem;
    font-size: 0.88rem;
    background: var(--paper);
}
.search-box input:focus { outline: none; border-color: var(--blue); background: #fff; }
.search-box i {
    position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%);
    color: var(--ink-soft); font-size: 0.9rem;
}

table.reg-table { margin-bottom: 0; }
table.reg-table thead th {
    background: var(--paper);
    color: var(--ink-soft);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    border-bottom: 1px solid var(--line);
    padding: 0.9rem 1rem;
}
table.reg-table tbody td {
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--line);
}
table.reg-table tbody tr:hover { background: #fbfbfe; }

.qr-thumb {
    width: 42px; height: 42px;
    border-radius: 8px;
    border: 1px solid var(--line);
    padding: 3px;
    background: #fff;
    cursor: pointer;
    transition: transform .15s ease;
}
.qr-thumb:hover { transform: scale(1.12); }

.pill-code {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    background: var(--paper);
    border: 1px solid var(--line);
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    color: var(--ink-soft);
}

.empty-state {
    text-align: center;
    padding: 4rem 1.5rem;
    color: var(--ink-soft);
}
.empty-state i { font-size: 2.4rem; display:block; margin-bottom: 1rem; opacity: 0.5; }

@media (max-width: 991px) {
    .shell { flex-direction: column; }
    .shell-brand { flex: none; padding: 2.5rem 1.75rem; }
    .shell-brand .brand-copy { margin-top: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
