/* Kizuna Event Check-in — pure CSS layout (Inter + Material Symbols) */
:root {
    --primary: #003b79;
    --primary-light: #eff6ff;
    --accent: #f58220;
    --bg-light: #f1f5f9;
    --surface: #ffffff;
    --text-main: #171c1f;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius-card: 16px;
    --radius-btn: 12px;
    --sidebar-width: 256px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --error: #ba1a1a;
    --error-bg: #ffdad6;
    --success-bg: #ecfdf5;
    --success-text: #065f46;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body.kz-body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    min-height: 100vh;
}

body.kz-body.kz-overflow-hidden {
    overflow: hidden;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    line-height: 1;
    vertical-align: middle;
}

/* ----- Sidebar (manager / admin) ----- */
aside.kz-sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: #f8fafc;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    z-index: 50;
    transition: transform 0.2s ease;
}

aside.kz-sidebar.kz-admin-sidebar {
    display: none;
}

@media (min-width: 1024px) {
    aside.kz-sidebar.kz-admin-sidebar {
        display: flex;
    }
}

@media (max-width: 1023px) {
    aside.kz-sidebar#mgr-sidebar:not(.open) {
        transform: translateX(-100%);
    }
}

.kz-sidebar-brand {
    padding: 0 24px;
    margin-bottom: 24px;
}

.kz-sidebar-brand-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 0 12px;
}

.kz-sidebar-icon {
    display: flex;
    height: 40px;
    width: 40px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
}

.kz-sidebar-brand h1,
.kz-sidebar-brand .kz-sidebar-title {
    font-size: 1.125rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: -0.025em;
}

.kz-sidebar-brand p,
.kz-sidebar-brand .kz-sidebar-sub {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-top: 4px;
}

.kz-sidebar-brand .kz-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.kz-sidebar nav {
    flex: 1;
    padding: 0 12px;
    overflow-y: auto;
}

.kz-nav-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-muted);
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    margin-bottom: 4px;
    border: 1px solid transparent;
}

.kz-nav-link .material-symbols-outlined {
    margin-right: 12px;
    font-size: 22px;
}

.kz-nav-link:hover:not(.active) {
    background: #e2e8f0;
    color: var(--primary);
}

.kz-nav-link.active {
    color: var(--primary);
    background: var(--primary-light);
    border-right: 4px solid var(--primary);
    border-radius: 8px 0 0 8px;
    font-weight: 700;
}

.kz-sidebar-footer {
    padding: 12px 24px 0;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
    margin-top: auto;
}

.kz-sidebar-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
}

.kz-sidebar-logout:hover {
    background: #e2e8f0;
    color: var(--primary);
}

.kz-sidebar-toggle {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 60;
    padding: 8px;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 59, 121, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 1024px) {
    .kz-sidebar-toggle {
        display: none;
    }
}

/* ----- Shell: wrapper + main ----- */
.kz-wrapper {
    margin-left: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

@media (min-width: 1024px) {
    .kz-wrapper {
        margin-left: var(--sidebar-width);
    }
}

header.kz-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(248, 250, 252, 0.88);
    backdrop-filter: blur(12px);
    padding: 12px 24px 12px 56px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

@media (min-width: 1024px) {
    header.kz-topbar {
        padding: 16px 32px;
    }
}

.kz-topbar-title {
    min-width: 0;
    flex: 1;
}

.kz-topbar-title h1 {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
}

@media (min-width: 640px) {
    .kz-topbar-title h1 {
        font-size: 1.25rem;
    }
}

.kz-topbar-divider {
    display: none;
    height: 16px;
    width: 1px;
    background: var(--border);
}

@media (min-width: 640px) {
    .kz-topbar-divider {
        display: block;
    }
}

.kz-topbar-event {
    display: none;
    font-weight: 600;
    color: var(--primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 280px;
}

@media (min-width: 640px) {
    .kz-topbar-event {
        display: inline;
    }
}

.kz-topbar-sub {
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kz-topbar-actions {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 12px;
}

.kz-topbar-email {
    display: none;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.75rem;
    color: var(--text-muted);
}

@media (min-width: 640px) {
    .kz-topbar-email {
        display: inline;
    }
}

.kz-avatar {
    display: flex;
    height: 36px;
    width: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 59, 121, 0.1);
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--primary);
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--border);
}

main.kz-main {
    padding: 24px 16px 48px;
    flex: 1;
}

@media (min-width: 640px) {
    main.kz-main {
        padding: 32px 32px 48px;
    }
}

.kz-page-inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.kz-page-inner--xl {
    max-width: 1600px;
}

.kz-stack {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ----- Admin layout (sidebar + content) ----- */
.kz-admin-header {
    position: sticky;
    top: 0;
    z-index: 40;
    width: 100%;
    margin-left: 0;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

@media (min-width: 1024px) {
    .kz-admin-header {
        margin-left: var(--sidebar-width);
    }
}

.kz-admin-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
}

.kz-admin-main {
    margin-left: 0;
    padding: 24px;
    max-width: 1280px;
}

@media (min-width: 1024px) {
    .kz-admin-main {
        margin-left: var(--sidebar-width);
        padding: 40px;
    }
}

.kz-mobile-logout {
    display: flex;
    padding: 8px;
    border-radius: 8px;
    background: #1e293b;
    color: #fff;
    text-decoration: none;
}

@media (min-width: 1024px) {
    .kz-mobile-logout {
        display: none;
    }
}

/* ----- Cards & stats ----- */
.kz-card {
    background: var(--surface);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow);
}

.kz-card-pad {
    padding: 24px;
}

@media (min-width: 640px) {
    .kz-card-pad {
        padding: 32px;
    }
}

.kz-stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 640px) {
    .kz-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .kz-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.kz-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 1024px) {
    .kz-grid-2 {
        grid-template-columns: 2fr 1fr;
    }
}

.kz-grid-2-equal {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 1024px) {
    .kz-grid-2-equal {
        grid-template-columns: 1fr 1fr;
    }
}

.kz-grid-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 640px) {
    .kz-grid-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ----- Flex helpers ----- */
.kz-flex {
    display: flex;
}

.kz-flex-col {
    display: flex;
    flex-direction: column;
}

.kz-flex-wrap {
    flex-wrap: wrap;
}

.kz-items-center {
    align-items: center;
}

.kz-items-start {
    align-items: flex-start;
}

.kz-items-end {
    align-items: flex-end;
}

.kz-justify-between {
    justify-content: space-between;
}

.kz-justify-center {
    justify-content: center;
}

.kz-justify-end {
    justify-content: flex-end;
}

.kz-gap-1 {
    gap: 4px;
}

.kz-gap-2 {
    gap: 8px;
}

.kz-gap-3 {
    gap: 12px;
}

.kz-gap-4 {
    gap: 16px;
}

.kz-gap-6 {
    gap: 24px;
}

.kz-flex-1 {
    flex: 1;
    min-width: 0;
}

.kz-shrink-0 {
    flex-shrink: 0;
}

/* ----- Typography ----- */
.kz-text-xs {
    font-size: 0.75rem;
}

.kz-text-sm {
    font-size: 0.875rem;
}

.kz-text-lg {
    font-size: 1.125rem;
}

.kz-text-xl {
    font-size: 1.25rem;
}

.kz-text-2xl {
    font-size: 1.5rem;
}

.kz-text-3xl {
    font-size: 1.875rem;
}

.kz-text-4xl {
    font-size: 2.25rem;
}

.kz-font-bold {
    font-weight: 700;
}

.kz-font-extrabold {
    font-weight: 800;
}

.kz-font-black {
    font-weight: 900;
}

.kz-text-primary {
    color: var(--primary);
}

.kz-text-muted {
    color: var(--text-muted);
}

.kz-text-white {
    color: #fff;
}

.kz-text-white-70 {
    color: rgba(255, 255, 255, 0.7);
}

.kz-text-center {
    text-align: center;
}

.kz-uppercase-track {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.kz-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ----- Buttons ----- */
.kz-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-btn);
    font-size: 0.875rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.15s;
}

.kz-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.kz-btn-primary {
    background: var(--primary);
    color: #fff;
}

.kz-btn-primary:hover {
    opacity: 0.92;
}

.kz-btn-secondary {
    background: #e2e8f0;
    color: var(--text-main);
}

.kz-btn-ghost {
    background: transparent;
    color: var(--text-muted);
}

.kz-btn-ghost:hover {
    background: #e2e8f0;
    color: var(--primary);
}

.kz-btn-icon {
    padding: 8px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.kz-btn-icon:hover {
    background: #e2e8f0;
}

.kz-btn-new-event {
    width: 100%;
    background: var(--primary);
    color: white;
    padding: 12px;
    border: none;
    border-radius: var(--radius-btn);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
}

.kz-btn-new-event:hover {
    opacity: 0.9;
}

/* ----- Forms ----- */
.kz-label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.kz-input,
.kz-textarea,
.kz-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.875rem;
    font-family: inherit;
    background: #f8fafc;
    color: var(--text-main);
}

.kz-input:focus,
.kz-textarea:focus,
.kz-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 59, 121, 0.15);
}

.kz-textarea {
    resize: vertical;
    min-height: 80px;
}

.kz-form-row-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 640px) {
    .kz-form-row-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.kz-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-main);
}

/* ----- Tables ----- */
.kz-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-card);
    border: 1px solid var(--border);
    background: var(--surface);
}

.kz-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.kz-table thead th {
    padding: 16px 24px;
    text-align: left;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    background: #fafbfc;
}

.kz-table tbody td {
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.kz-table tbody tr {
    transition: background 0.15s;
}

.kz-table tbody tr:hover {
    background: rgba(241, 245, 249, 0.5);
}

.kz-table-foot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #f1f5f9;
    background: rgba(248, 250, 252, 0.6);
    font-size: 0.75rem;
    color: var(--text-muted);
}

@media (min-width: 640px) {
    .kz-table-foot {
        flex-direction: row;
    }
}

/* ----- Badges ----- */
.kz-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.625rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.kz-badge-ok {
    background: #d1fae5;
    color: #047857;
}

.kz-badge-wait {
    background: #f1f5f9;
    color: #64748b;
}

.kz-badge-live {
    background: rgba(245, 130, 32, 0.12);
    color: #c2410c;
}

.kz-badge-soft {
    background: #ffedd5;
    color: #9a3412;
}

/* ----- Alerts ----- */
.kz-alert {
    padding: 12px 16px;
    border-radius: var(--radius-card);
    font-size: 0.875rem;
}

.kz-alert-error {
    border: 1px solid rgba(186, 26, 26, 0.2);
    background: var(--error-bg);
    color: #7f1d1d;
}

.kz-alert-success {
    border: 1px solid rgba(5, 150, 105, 0.2);
    background: #d1fae5;
    color: #065f46;
}

.kz-alert-info {
    border: 1px solid rgba(0, 59, 121, 0.15);
    background: var(--primary-light);
    color: var(--primary);
}

/* ----- Modals / overlays ----- */
.kz-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
}

.kz-modal-overlay.kz-open {
    display: flex;
}

.kz-modal-overlay.z-110 {
    z-index: 110;
}

.kz-modal-overlay.z-120 {
    z-index: 120;
}

/* Attendees table row */
tr.attendee-row {
    cursor: pointer;
    transition: background 0.15s;
}

tr.attendee-row:hover {
    background: rgba(241, 245, 249, 0.65);
}

tr.attendee-row .row-actions {
    opacity: 0;
    transition: opacity 0.15s;
}

tr.attendee-row:hover .row-actions {
    opacity: 1;
}

@media (min-width: 640px) {
    tr.attendee-row .row-actions {
        opacity: 1;
    }
}

.kz-att-stat-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .kz-att-stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .kz-att-stat-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.kz-att-stat-card {
    border-radius: var(--radius-card);
    background: var(--surface);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s;
}

.kz-att-stat-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.kz-toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: 16px;
    border-radius: var(--radius-card);
    background: #f0f4f8;
    padding: 16px;
}

@media (min-width: 1024px) {
    .kz-toolbar {
        flex-direction: row;
        align-items: center;
    }
}

.kz-search-wrap {
    position: relative;
    width: 100%;
    min-width: 200px;
}

@media (min-width: 768px) {
    .kz-search-wrap {
        width: 16rem;
    }
}

.kz-search-wrap .material-symbols-outlined {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    color: #94a3b8;
    pointer-events: none;
}

.kz-search-input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border: none;
    border-radius: var(--radius-card);
    background: var(--surface);
    font-size: 0.875rem;
}

.kz-search-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 59, 121, 0.12);
}

.kz-select-filter {
    min-width: 180px;
    padding: 12px 16px;
    border: none;
    border-radius: var(--radius-card);
    background: var(--surface);
    font-size: 0.875rem;
}

.kz-btn-outline-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 24px;
    border: 2px solid var(--primary);
    border-radius: var(--radius-card);
    background: transparent;
    font-weight: 800;
    color: var(--primary);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}

.kz-btn-outline-primary:hover {
    background: rgba(0, 59, 121, 0.05);
}

@media (min-width: 1024px) {
    .kz-btn-outline-primary {
        width: auto;
    }
}

.kz-btn-accent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 32px;
    border: none;
    border-radius: var(--radius-card);
    background: var(--accent);
    font-weight: 800;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(245, 130, 32, 0.25);
    transition: transform 0.1s;
}

.kz-btn-accent:hover {
    opacity: 0.95;
}

@media (min-width: 1024px) {
    .kz-btn-accent {
        width: auto;
    }
}

.kz-code-inline {
    border-radius: 6px;
    background: #f1f5f9;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-family: ui-monospace, monospace;
}

.kz-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

.kz-modal {
    position: relative;
    width: 100%;
    max-width: 28rem;
    max-height: 92vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.kz-modal--lg {
    max-width: 42rem;
}

.kz-modal--wide {
    max-width: 56rem;
}

.kz-modal--tall {
    max-height: 95vh;
}

.kz-modal-hd {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    background: #fafbfc;
}

@media (min-width: 640px) {
    .kz-modal-hd {
        padding: 16px 24px;
    }
}

.kz-modal-hd h2,
.kz-modal-hd h3 {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--text-main);
}

.kz-modal-bd {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

@media (min-width: 640px) {
    .kz-modal-bd {
        padding: 24px;
    }
}

.kz-modal-ft {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid #f1f5f9;
    background: #fafbfc;
}

.kz-modal-close {
    display: flex;
    height: 40px;
    width: 40px;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}

.kz-modal-close:hover {
    background: #e2e8f0;
}

/* ----- Misc ----- */
.kz-hidden {
    display: none !important;
}

.kz-initials {
    display: flex;
    height: 40px;
    width: 40px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 59, 121, 0.08);
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--primary);
}

.kz-initials-sm {
    height: 36px;
    width: 36px;
    font-size: 0.6875rem;
}

.kz-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.kz-link:hover {
    text-decoration: underline;
}

.kz-divide-y > * + * {
    border-top: 1px solid #f1f5f9;
}

.kz-list-scroll {
    max-height: 20rem;
    overflow-y: auto;
}

/* Báo cáo bàn (dashboard): muốn kéo danh sách xuống full panel */
#mgr-table-report .kz-list-scroll {
    /* Không dùng !important để JS có thể set max-height theo số dòng (>=10 có scroll). */
    max-height: none;
    flex: 1 1 auto;
    min-height: 0;
}

.kz-border-t {
    border-top: 1px solid var(--border);
}

.kz-rounded-xl {
    border-radius: 12px;
}

.kz-rounded-card {
    border-radius: var(--radius-card);
}

.kz-shadow-card {
    box-shadow: var(--shadow);
}

.kz-bg-surface {
    background: var(--surface);
}

.kz-bg-slate-50 {
    background: #f8fafc;
}

.kz-bg-primary-block {
    background: var(--primary);
    color: #fff;
}

.kz-bg-primary-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, #002651 100%);
}

.kz-progress-track {
    height: 6px;
    width: 100%;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.kz-progress-bar {
    height: 100%;
    border-radius: 999px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.kz-progress-track-dark {
    background: #e2e8f0;
}

.kz-progress-bar-primary {
    background: linear-gradient(90deg, var(--primary), #1e40af);
}

/* FAB mobile */
.kz-fab {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 50;
    display: flex;
    height: 56px;
    width: 56px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

@media (min-width: 768px) {
    .kz-fab {
        display: none;
    }
}

/* Login / centered pages */
.kz-auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg-light);
}

.kz-auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border-radius: var(--radius-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 32px;
}

/* Invitation template grid */
.kz-invite-grid {
    display: grid;
    gap: 24px;
}

@media (min-width: 1024px) {
    .kz-invite-grid {
        grid-template-columns: 4fr 5fr 3fr;
    }
}

.kz-section-title {
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.kz-page-hero h2,
.kz-hero-title {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: -0.03em;
}

@media (min-width: 640px) {
    .kz-page-hero h2,
    .kz-hero-title {
        font-size: 2.25rem;
    }
}

/* Pulse animation (dashboard) */
@keyframes kz-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.kz-pulse {
    animation: kz-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes mgrAttPulse {
    0% { background: rgba(0, 59, 121, 0.08); }
    100% { background: transparent; }
}

/* Admin dashboard cards */
.kz-admin-tile {
    display: block;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 24px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.kz-admin-tile:hover {
    box-shadow: 0 8px 24px rgba(0, 59, 121, 0.08);
    border-color: rgba(0, 59, 121, 0.25);
}

.kz-admin-tile h2 {
    margin-top: 12px;
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--text-main);
}

.kz-admin-tile p {
    margin-top: 8px;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.kz-admin-tile-cta {
    margin-top: 16px;
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary);
}

/* Utility spacing (minimal) */
.kz-mb-2 { margin-bottom: 8px; }
.kz-mb-4 { margin-bottom: 16px; }
.kz-mb-6 { margin-bottom: 24px; }
.kz-mb-8 { margin-bottom: 32px; }
.kz-mt-1 { margin-top: 4px; }
.kz-mt-2 { margin-top: 8px; }
.kz-mt-4 { margin-top: 16px; }
.kz-mt-6 { margin-top: 24px; }
.kz-mt-10 { margin-top: 40px; }
.kz-p-4 { padding: 16px; }
.kz-p-6 { padding: 24px; }
.kz-p-8 { padding: 32px; }
.kz-px-4 { padding-left: 16px; padding-right: 16px; }
.kz-px-6 { padding-left: 24px; padding-right: 24px; }
.kz-px-8 { padding-left: 32px; padding-right: 32px; }
.kz-py-3 { padding-top: 12px; padding-bottom: 12px; }
.kz-py-4 { padding-top: 16px; padding-bottom: 16px; }
.kz-py-10 { padding-top: 40px; padding-bottom: 40px; }
.kz-px-8 { padding-left: 32px; padding-right: 32px; }
.kz-h-10 { height: 40px; }
.kz-w-10 { width: 40px; }
.kz-max-w-md { max-width: 28rem; }
.kz-w-full { width: 100%; }

/* File input */
.kz-file-input {
    width: 100%;
    font-size: 0.875rem;
}

.kz-file-input::file-selector-button {
    margin-right: 12px;
    padding: 8px 16px;
    border: 0;
    border-radius: 8px;
    background: #ffdcc6;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
}

/* Dashboard / manager extras */
.kz-hero-banner {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
    border-radius: var(--radius-card);
    background: var(--surface);
    padding: 24px;
    box-shadow: var(--shadow);
}

@media (min-width: 768px) {
    .kz-hero-banner {
        flex-direction: row;
        align-items: flex-end;
        padding: 32px;
    }
}

.kz-kpi-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 640px) {
    .kz-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .kz-kpi-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Dashboard table KPIs: force 3 columns */
@media (min-width: 1024px) {
    .kz-kpi-grid--3-table {
        grid-template-columns: repeat(3, 1fr);
    }
}

.kz-kpi-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: var(--radius-card);
    background: var(--surface);
    padding: 24px;
    box-shadow: var(--shadow);
}

.kz-kpi-card--inverse {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 10px 25px rgba(0, 59, 121, 0.2);
}

.kz-kpi-bar-wrap {
    margin-top: 16px;
    height: 6px;
    width: 100%;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.kz-kpi-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.kz-icon-box {
    border-radius: 8px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kz-icon-box--soft {
    background: rgba(255, 221, 198, 0.5);
    color: var(--accent);
}

.kz-badge-live {
    border-radius: 9999px;
    background: #ffdcc6;
    padding: 4px 12px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #642f00;
}

.kz-tag-auto {
    font-size: 10px;
    font-weight: 600;
    text-transform: lowercase;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(0, 59, 121, 0.12);
    color: var(--primary);
}

.kz-modal-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.kz-modal-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.kz-space-y-4 > * + * {
    margin-top: 16px;
}

.kz-space-y-6 > * + * {
    margin-top: 24px;
}

.kz-grid-3-1 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 1024px) {
    .kz-grid-3-1 {
        grid-template-columns: 2fr 1fr;
    }
}

/* Dashboard custom layout: table UI ~60% width, right column ~40% */
.kz-grid-60-40 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 1024px) {
    .kz-grid-60-40 {
        grid-template-columns: minmax(0, 60%) minmax(0, 40%);
    }
}

.kz-panel {
    overflow: hidden;
    border-radius: var(--radius-card);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.kz-panel-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    padding: 16px 32px;
}

.kz-quick-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #f8fafc;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    transition: background 0.15s;
}

.kz-quick-row:hover {
    background: #f1f5f9;
}

.kz-invite-split {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 32px;
    border-radius: var(--radius-card);
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 32px;
    box-shadow: var(--shadow);
}

@media (min-width: 768px) {
    .kz-invite-split {
        flex-direction: row;
        align-items: center;
    }
}

.kz-invite-visual {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 12px;
    background: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 59, 121, 0.25);
}

@media (min-width: 768px) {
    .kz-invite-visual {
        width: 50%;
        flex-shrink: 0;
    }
}

.kz-invite-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}

.kz-invite-visual-placeholder {
    display: flex;
    height: 100%;
    width: 100%;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, #002651 100%);
}

.kz-invite-visual-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent);
    pointer-events: none;
}

.kz-invite-visual-caption {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
}

.kz-stat-block {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    border-radius: var(--radius-card);
    background: var(--primary);
    padding: 40px;
    color: #fff;
    box-shadow: var(--shadow);
}

.kz-stat-block .kz-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(48px);
    opacity: 0.35;
    pointer-events: none;
}

.kz-stat-block .kz-blob-1 {
    right: -48px;
    top: -48px;
    width: 192px;
    height: 192px;
    background: rgba(255, 255, 255, 0.08);
}

.kz-stat-block .kz-blob-2 {
    left: -48px;
    bottom: -48px;
    width: 192px;
    height: 192px;
    background: rgba(255, 137, 40, 0.15);
}

.kz-cap-bar {
    height: 16px;
    width: 100%;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
}

.kz-cap-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #f58220, #ff8928);
    transition: width 0.3s ease;
}

.kz-mini-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.kz-mini-stat {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    padding: 16px;
}

.kz-dashed-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 8px;
    padding: 12px;
    border-radius: 12px;
    border: 1px dashed #c3c6d2;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    transition: background 0.15s;
}

.kz-dashed-btn:hover {
    background: #f8fafc;
}

.kz-agenda-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.kz-agenda-time {
    width: 33%;
    flex-shrink: 0;
}

.kz-agenda-del {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    margin-top: 2px;
    border: none;
    border-radius: 8px;
    background: rgba(186, 26, 26, 0.1);
    color: var(--error);
    cursor: pointer;
}

.kz-agenda-del:hover {
    background: rgba(186, 26, 26, 0.18);
}

.kz-agenda-add {
    margin-top: 4px;
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    background: rgba(0, 59, 121, 0.1);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
}

.kz-agenda-add:hover {
    background: rgba(0, 59, 121, 0.16);
}

.kz-logo-thumb {
    height: 56px;
    width: 56px;
    flex-shrink: 0;
    border-radius: 8px;
    border: 1px solid var(--border);
    object-fit: cover;
}

.kz-initials--sm {
    height: 36px;
    width: 36px;
    font-size: 0.6875rem;
}
