/* ===================== Design tokens ===================== */
:root {
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-primary-soft: #eaf0ff;
    --color-success: #16a34a;
    --color-success-soft: #e8f8ee;
    --color-danger: #dc2626;
    --color-danger-soft: #fdecec;
    --color-warning: #d97706;
    --color-warning-soft: #fef3e2;
    --color-bg: #f4f5f7;
    --color-surface: #ffffff;
    --color-border: #e5e7eb;
    --color-text: #111827;
    --color-text-muted: #6b7280;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shell-max-width: 480px;
    --topbar-height: 56px;
    --bottomnav-height: 60px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-top: env(safe-area-inset-top, 0px);
    --content-max-width: 480px;
}

/* Tablet: nới khung app rộng ra để tận dụng màn hình, danh sách người dùng
   chuyển sang nhiều cột (grid) nhưng form/chi tiết vẫn giữ 1 cột ~480px
   cho dễ đọc, không kéo giãn input quá rộng. */
@media (min-width: 700px) {
    :root {
        --shell-max-width: 760px;
    }
}

@media (min-width: 1000px) {
    :root {
        --shell-max-width: 1000px;
    }
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
}

h1:focus {
    outline: none;
}

/* ===================== App shell ===================== */
.app-shell {
    max-width: var(--shell-max-width);
    margin: 0 auto;
    min-height: 100vh;
    background: var(--color-bg);
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.06);
}

.app-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-bottom: calc(var(--bottomnav-height) + var(--safe-bottom) + 12px);
}

/* ===================== Top bar ===================== */
.app-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: var(--topbar-height);
    padding-top: var(--safe-top);
    padding-left: 8px;
    padding-right: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.app-topbar .topbar-action {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 50%;
    color: var(--color-text);
}

.app-topbar .topbar-action:active {
    background: var(--color-bg);
}

.app-topbar .topbar-logo {
    flex: 0 0 auto;
    height: 22px;
    width: auto;
}

.app-topbar .topbar-logo:first-child {
    margin-left: 8px;
}

.app-topbar .topbar-title {
    flex: 1;
    min-width: 0;
    font-size: 17px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-topbar .topbar-subtitle {
    font-size: 12px;
    font-weight: 400;
    color: var(--color-text-muted);
}

.app-topbar .topbar-trailing {
    display: flex;
    align-items: center;
}

/* Nút chữ kiểu "Chọn / Hủy" trong album ảnh iPhone — thay cho icon tick. */
.topbar-text-action {
    flex: 0 0 auto;
    border: none;
    background: transparent;
    color: var(--color-primary);
    font-size: 15px;
    font-weight: 500;
    padding: 8px 4px;
    margin-right: 4px;
}

.topbar-text-action:active {
    opacity: 0.6;
}

/* ===================== Bottom navigation ===================== */
.app-bottomnav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--shell-max-width);
    height: calc(var(--bottomnav-height) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    display: flex;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    z-index: 30;
}

.app-bottomnav .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--color-text-muted);
    font-size: 11px;
    font-weight: 500;
}

.app-bottomnav .nav-item.active {
    color: var(--color-primary);
}

.app-bottomnav .nav-item svg {
    width: 22px;
    height: 22px;
}

/* ===================== Floating action button ===================== */
.fab {
    position: fixed;
    left: 50%;
    bottom: calc(var(--bottomnav-height) + var(--safe-bottom) + 16px);
    transform: translateX(calc(var(--shell-max-width) / 2 - 60px));
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 25;
}

.fab svg {
    width: 24px;
    height: 24px;
}

.fab:active {
    background: var(--color-primary-dark);
}

/* ===================== Search + chips ===================== */
.search-bar {
    position: sticky;
    top: var(--topbar-height);
    z-index: 15;
    background: var(--color-bg);
    padding: 10px 16px 8px;
}

.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 420px;
}

.search-input-wrap svg {
    position: absolute;
    left: 12px;
    width: 18px;
    height: 18px;
    color: var(--color-text-muted);
}

.search-input {
    width: 100%;
    height: 40px;
    padding: 0 12px 0 36px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    font-size: 14px;
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Tab kiểu slider (segmented control) — 1 khối nền kéo qua lại giữa các tab thay vì từng
   chip rời rạc, dùng cho kết quả check-in (Thành công / Không thành công). */
.tab-slider {
    position: relative;
    display: flex;
    width: 100%;
    max-width: 420px;
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    padding: 4px;
}

.tab-slider-thumb {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    transition: transform 0.25s ease;
}

.tab-slider-btn {
    position: relative;
    z-index: 1;
    flex: 1;
    border: none;
    background: transparent;
    padding: 9px 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-muted);
    border-radius: var(--radius-md);
    white-space: nowrap;
}

.tab-slider-btn.active {
    color: var(--color-text);
}

.chip-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 16px 4px;
    scrollbar-width: none;
}

.chip-row::-webkit-scrollbar {
    display: none;
}

.chip {
    flex: 0 0 auto;
    padding: 6px 14px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    font-size: 13px;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.chip.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    font-weight: 600;
}

/* ===================== User list / cards ===================== */
.user-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 10px;
    padding: 4px 16px 16px;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    padding: 10px 12px;
    position: relative;
}

.user-card.selected {
    border-color: var(--color-primary);
    background: var(--color-primary-soft);
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-primary-soft);
    color: var(--color-primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    flex: 0 0 auto;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 15px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-meta {
    font-size: 12.5px;
    color: var(--color-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    flex: 0 0 auto;
}

.user-badge.checked-in {
    background: var(--color-success-soft);
    color: var(--color-success);
}

.user-badge.not-checked-in {
    background: var(--color-warning-soft);
    color: var(--color-warning);
}

.user-card-menu-btn {
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-checkbox {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

/* ===================== Room list / cards ===================== */
.room-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 16px 16px;
}

.room-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    padding: 14px;
}

.room-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--color-primary-soft);
    color: var(--color-primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.room-card-icon svg {
    width: 24px;
    height: 24px;
}

.room-card-info {
    flex: 1;
    min-width: 0;
}

.room-card-name {
    font-size: 16px;
    font-weight: 700;
}

.room-card-meta {
    font-size: 12.5px;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.room-card-chevron {
    width: 20px;
    height: 20px;
    color: var(--color-text-muted);
    flex: 0 0 auto;
}

.empty-state {
    text-align: center;
    color: var(--color-text-muted);
    padding: 60px 24px;
    font-size: 14px;
}

/* ===================== Selection action bar ===================== */
.selection-bar {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(var(--bottomnav-height) + var(--safe-bottom) + 10px);
    width: calc(var(--shell-max-width) - 32px);
    background: var(--color-text);
    color: #fff;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    padding: 10px 14px;
    gap: 10px;
    z-index: 26;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.selection-bar .count {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
}

.selection-bar button {
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ===================== Bottom sheet ===================== */
.sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 40;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.sheet {
    width: 100%;
    max-width: var(--shell-max-width);
    background: var(--color-surface);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 10px 18px calc(18px + var(--safe-bottom));
    max-height: 85vh;
    overflow-y: auto;
    animation: sheet-up 0.18s ease-out;
}

@keyframes sheet-up {
    from {
        transform: translateY(16px);
        opacity: 0.6;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.sheet-handle {
    width: 36px;
    height: 4px;
    border-radius: 999px;
    background: var(--color-border);
    margin: 4px auto 12px;
}

.sheet-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.sheet-subtitle {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.sheet-footer {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.action-sheet-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 4px;
    border: none;
    background: transparent;
    border-bottom: 1px solid var(--color-border);
    font-size: 15px;
    color: var(--color-text);
    text-align: left;
}

.action-sheet-item:last-child {
    border-bottom: none;
}

.action-sheet-item svg {
    width: 20px;
    height: 20px;
    color: var(--color-text-muted);
}

.action-sheet-item.danger {
    color: var(--color-danger);
}

.action-sheet-item.danger svg {
    color: var(--color-danger);
}

/* ===================== Buttons ===================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 44px;
    padding: 0 18px;
    border-radius: var(--radius-md);
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
}

.btn-primary:active {
    background: var(--color-primary-dark);
}

.btn-outline {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-danger {
    background: var(--color-danger);
    color: #fff;
}

.btn-danger-soft {
    background: var(--color-danger-soft);
    color: var(--color-danger);
}

.btn:disabled {
    opacity: 0.5;
}

.btn-icon {
    width: 16px;
    height: 16px;
}

.confirm-icon {
    width: 44px;
    height: 44px;
    color: var(--color-danger);
    background: var(--color-danger-soft);
    border-radius: 50%;
    padding: 10px;
}

.confirm-icon.success {
    color: var(--color-success);
    background: var(--color-success-soft);
}

/* ===================== Form ===================== */
.form-page {
    padding: 16px;
}

.form-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin: 18px 0 10px;
}

.form-field {
    margin-bottom: 14px;
}

.form-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--color-text);
}

.form-field .required {
    color: var(--color-danger);
}

.form-control {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    font-size: 15px;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
}

textarea.form-control {
    height: auto;
    padding: 12px 14px;
    resize: vertical;
}

.form-field-with-remove {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remove-field-btn {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--color-danger-soft);
    color: var(--color-danger);
}

.add-field-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 0;
}

.avatar-picker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 12px 0 6px;
}

.avatar-picker-circle {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: var(--color-primary-soft);
    color: var(--color-primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    overflow: hidden;
}

.avatar-picker-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.alert {
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 13px;
    margin: 12px 16px 0;
}

.alert-success {
    background: var(--color-success-soft);
    color: var(--color-success);
}

.alert-danger {
    background: var(--color-danger-soft);
    color: var(--color-danger);
}

.form-submit-bar {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 100%;
    max-width: var(--shell-max-width);
    padding: 10px 16px calc(10px + var(--safe-bottom));
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    z-index: 30;
    display: flex;
    justify-content: center;
}

.form-submit-bar .btn {
    max-width: var(--content-max-width);
}

.form-page {
    padding-bottom: 90px;
    max-width: var(--content-max-width);
    margin: 0 auto;
}

/* ===================== Detail page ===================== */
.detail-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px 12px;
    text-align: center;
    max-width: var(--content-max-width);
    margin: 0 auto;
}

.detail-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--color-primary-soft);
    color: var(--color-primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    overflow: hidden;
    margin-bottom: 12px;
}

.detail-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-name {
    font-size: 19px;
    font-weight: 700;
}

.detail-sub {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.detail-actions {
    display: flex;
    gap: 10px;
    padding: 12px 16px 4px;
    max-width: var(--content-max-width);
    margin: 0 auto;
}

.info-list {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    margin: 14px auto;
    max-width: calc(var(--content-max-width) - 32px);
    overflow: hidden;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--color-border);
}

.info-row:last-child {
    border-bottom: none;
}

.info-row svg {
    width: 18px;
    height: 18px;
    color: var(--color-text-muted);
    flex: 0 0 auto;
}

.info-row .info-label {
    font-size: 11px;
    color: var(--color-text-muted);
}

.info-row .info-value {
    font-size: 14px;
    font-weight: 500;
}

.lucky-code {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--color-primary-soft);
    color: var(--color-primary-dark);
    border-radius: var(--radius-lg);
    padding: 6px 14px;
    font-weight: 700;
    font-size: 14px;
    margin-top: 10px;
}

/* ===================== Auth (Login) ===================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    background: var(--color-bg);
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--color-surface);
    border-radius: 24px;
    box-shadow: 0 16px 40px rgba(17, 24, 39, 0.08);
    padding: 36px 24px 28px;
}

.auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.auth-logo img {
    height: 48px;
    width: auto;
}

.auth-title {
    font-size: 21px;
    font-weight: 700;
    color: var(--color-text);
    text-align: center;
    margin: 0 0 6px;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--color-text-muted);
    text-align: center;
    margin: 0 0 26px;
}

.auth-subtitle.tight {
    margin-bottom: 2px;
}

.auth-phone-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    text-align: center;
    margin: 0 0 22px;
}

/* Floating label input, kiểu form-floating của src cũ: label nằm trong viền,
   nổi lên góc trên khi input có giá trị hoặc đang focus. */
.form-floating {
    position: relative;
    margin-bottom: 16px;
}

.form-floating input {
    width: 100%;
    height: 58px;
    padding: 21px 14px 6px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    font-size: 15px;
}

.form-floating input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-floating label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    color: var(--color-text-muted);
    font-size: 15px;
    pointer-events: none;
    transform-origin: 0 0;
    transition: transform 0.1s ease-in-out, color 0.1s ease-in-out;
}

.form-floating label svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.form-floating input:focus ~ label,
.form-floating input:not(:placeholder-shown) ~ label {
    transform: translateY(-11px) scale(0.78);
    color: var(--color-primary);
}

.form-floating input:focus ~ label {
    color: var(--color-primary);
}

.auth-captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.auth-captcha-row img {
    height: 48px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
}

.auth-captcha-refresh {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-submit-btn {
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.04em;
    font-size: 13.5px;
}

.auth-code-input {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 10px;
}

.auth-link-row {
    text-align: center;
    margin-top: 14px;
    font-size: 13.5px;
}

.auth-link-row a,
.auth-link-row button {
    color: var(--color-primary);
    font-weight: 600;
    background: none;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ===================== Camera check-in ===================== */
.camera-page {
    flex: 1;
    min-height: 0;
    padding: 20px 16px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.camera-frame {
    width: 100%;
    max-width: 420px;
    aspect-ratio: 3 / 4;
    border: 2px dashed var(--color-border);
    border-radius: 20px;
    padding: 10px;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.camera-frame video,
.camera-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
    background: #111;
}

.camera-frame video.flip-horizontal {
    transform: scaleX(-1);
}

.camera-select-row {
    width: 100%;
    max-width: 420px;
    margin-top: 10px;
}

.camera-select-row select {
    width: 100%;
    height: 42px;
    padding: 0 32px 0 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 14px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
}

.camera-hint {
    margin-top: 14px;
    font-size: 13.5px;
    color: var(--color-text-muted);
    text-align: center;
}

.shutter-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 4px solid var(--color-surface);
    background: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary), 0 8px 20px rgba(37, 99, 235, 0.35);
    margin-top: 22px;
    flex: 0 0 auto;
}

.shutter-btn:active {
    background: var(--color-primary-dark);
}

.shutter-btn:disabled {
    opacity: 0.4;
}

.checkin-mode-select {
    flex: 1;
    min-height: 0;
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.checkin-mode-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    flex: 1 1 140px;
    padding: 24px;
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    text-align: center;
}

.checkin-mode-card:active {
    background: var(--color-primary-soft);
    border-color: var(--color-primary);
}

.checkin-mode-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.checkin-mode-icon svg {
    width: 24px;
    height: 24px;
}

.checkin-mode-title {
    font-size: 15.5px;
    font-weight: 600;
    color: var(--color-text);
}

.checkin-mode-desc {
    font-size: 13px;
    color: var(--color-text-muted);
}

.upload-frame {
    cursor: pointer;
    border-style: dashed;
    border-width: 2px;
    border-color: var(--color-primary);
    background: var(--color-primary-soft);
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.upload-frame.dropzone-active {
    border-style: solid;
    border-color: var(--color-primary-dark);
    background: #dbeafe;
    transform: scale(1.02);
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--color-primary-dark);
    font-size: 13.5px;
    text-align: center;
    padding: 0 20px;
}

.upload-placeholder svg {
    width: 36px;
    height: 36px;
    color: var(--color-primary);
}

.upload-input-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.camera-result-actions {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 420px;
    margin-top: 18px;
}

/* ===================== Placeholder / stub pages ===================== */
.placeholder-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 32px;
    color: var(--color-text-muted);
}

.placeholder-page svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    color: var(--color-border);
}

/* ===================== Blazor defaults kept ===================== */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 1.25rem;
    color: white;
    border-radius: var(--radius-sm);
    margin: 12px 16px;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}
