@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
    --bg: #f3f6fb;
    --card: #ffffff;
    --text: #050f40;
    --muted: #4f5f7c;
    --line: #d4ddeb;
    --teal: #1f4b82;
    --slate: #0a315e;
    --danger: #b91c1c;
    --blue-soft: #eef4fb;
    --blue-strong: #0a315e;
    --green-soft: #dcfce7;
    --green-strong: #166534;
    --red-soft: #fee2e2;
    --red-strong: #b91c1c;
    --panel-shadow: 0 12px 30px rgba(5, 15, 64, 0.08);
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "DM Sans", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

.layout,
.page,
.wrap {
    max-width: 1450px;
    margin: 0 auto;
    padding: 24px;
}

.app-layout {
    width: 100%;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 0;
}

.topbar h1,
h1 {
    margin: 0 0 8px;
    font-size: 28px;
}

h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

p,
.muted,
.meta,
.hint,
.section-note,
.notice {
    color: var(--muted);
    font-size: 14px;
}

.actions,
.submit-row,
.filter-actions,
.row-actions,
.pagination,
.status-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.button,
.button-secondary,
.button-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    color: #fff;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.2;
}

.button {
    background: var(--teal);
}

.button-secondary {
    background: var(--slate);
}

.button-danger {
    background: var(--danger);
}

.button:disabled,
.button-secondary:disabled,
.button-danger:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.button__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.button__icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.panel,
.card,
.meta-card,
.hero,
.app-nav {
    background: var(--card);
    border: 1px solid rgba(219, 226, 234, 0.85);
    border-radius: var(--radius-md);
    box-shadow: var(--panel-shadow);
}

.panel,
.hero {
    padding: 24px;
    margin-bottom: 20px;
}

.app-content {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.app-content::after {
    content: "Desarrollado por AGI Calidad que impulsa tu marca, S.A. de C.V.";
    display: block;
    margin-top: 4px;
    padding: 8px 4px 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.app-content > .panel,
.app-content > .hero,
.app-content > .topbar {
    margin-bottom: 0;
}

.card,
.meta-card {
    padding: 16px;
}

.card--full {
    grid-column: 1 / -1;
}

.hero-inner {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.grid,
.summary-grid,
.form-grid,
.filters {
    display: grid;
    gap: 16px;
}

.grid,
.form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.summary-grid--compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.filters {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 20px;
}

.filters-bar-form {
    margin-bottom: 20px;
}

.filters-bar {
    display: grid;
    grid-template-columns: minmax(260px, 1.8fr) repeat(3, minmax(180px, 1fr));
    gap: 0;
    border: 1px solid #d5e2f0;
    border-radius: 999px;
    background: #fff;
    overflow: hidden;
}

.filters-bar__search,
.filters-bar__select {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
    background: #fff;
}

.filters-bar__search + .filters-bar__select,
.filters-bar__select + .filters-bar__select {
    border-left: 1px solid #e2e8f0;
}

.filters-bar__search-icon {
    position: absolute;
    left: 18px;
    display: inline-flex;
    color: #94a3b8;
    pointer-events: none;
}

.filters-bar__search-icon svg {
    width: 18px;
    height: 18px;
}

.filters-bar input,
.filters-bar select {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    min-height: 54px;
}

.filters-bar__search input {
    padding-left: 48px;
    padding-right: 16px;
}

.filters-bar__select select {
    padding-right: 38px;
}

.filters-bar input:hover,
.filters-bar input:focus,
.filters-bar select:hover,
.filters-bar select:focus {
    background: #f8fbff;
}

.field-full {
    grid-column: 1 / -1;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    font-size: 14px;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    box-sizing: border-box;
    background: #fff;
    color: var(--text);
    font-size: 14px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

input:hover,
select:hover,
textarea:hover {
    background: #f4f8fd;
    border-color: #b8c9df;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    background: #fdfefe;
    border-color: #1f4b82;
    box-shadow: 0 0 0 4px rgba(31, 75, 130, 0.12);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

input[type="file"] {
    padding: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 14px 12px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
}

td {
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.35;
}

tbody tr {
    transition: background-color 0.18s ease;
}

tbody tr:hover {
    background: rgba(238, 244, 251, 0.92);
}

.payments-group-row.is-group-hover {
    background: rgba(238, 244, 251, 0.92);
}

.payments-amount {
    color: #1f4b82;
}

.label,
.meta-label,
.section-label,
.app-nav__title {
    font-size: 12px;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.app-nav__brand {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
}

.app-nav__logo {
    display: block;
    width: 100%;
    max-width: 160px;
    height: auto;
}

.app-nav__meta {
    margin: -2px 0 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.value,
.meta-value {
    font-size: 16px;
    color: var(--text);
    word-break: break-word;
}

.value strong,
.price {
    font-size: 24px;
    font-weight: bold;
}

.tag,
.pill,
.status,
.status-pill {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: #e2e8f0;
    font-size: 12px;
    font-weight: bold;
}

.tag--compact {
    padding: 4px 8px;
    font-size: 11px;
}

.status-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}

.attendance-progress {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.attendance-progress--compact {
    margin-top: 12px;
}

.attendance-progress--hero .attendance-progress__track {
    height: 16px;
}

.attendance-progress__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 13px;
}

.attendance-progress__track {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.attendance-progress__fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #050f40 0%, #1f4b82 100%);
}

.attendance-hero {
    margin: 20px 0 18px;
    padding: 20px 22px;
    background: linear-gradient(180deg, #f7faff 0%, #edf3fb 100%);
    border: 1px solid #cfdbeb;
    border-radius: var(--radius-md);
}

.attendance-hero__header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 12px;
}

.attendance-hero__value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    color: var(--teal);
}

.dashboard-quick-actions {
    margin-bottom: 18px;
}

.metric-card {
    padding: 14px 16px;
}

.metric-card .label {
    margin-bottom: 6px;
}

.metric-card .value {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.1;
}

.flash {
    margin-bottom: 16px;
    padding: 12px;
    background: var(--green-soft);
    color: var(--green-strong);
    border-radius: var(--radius-sm);
}

.errors,
.error,
.error-list {
    margin-bottom: 16px;
    padding: 12px;
    background: var(--red-soft);
    color: var(--red-strong);
    border-radius: var(--radius-sm);
}

.info,
.info-box,
.notice {
    margin-bottom: 16px;
    padding: 12px;
    background: var(--blue-soft);
    color: var(--blue-strong);
    border-radius: var(--radius-sm);
}

.empty {
    padding-top: 8px;
    color: #64748b;
}

.inline-form {
    display: inline;
}

.action-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--slate);
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.action-icon-button:hover,
.action-icon-button:focus-visible {
    background: var(--blue-soft);
    color: var(--blue-strong);
    transform: translateY(-1px);
}

.action-icon-button svg {
    width: 16px;
    height: 16px;
}

.registration-status-form {
    margin-bottom: 8px;
}

.switch {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.switch__track {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 38px;
    height: 22px;
    padding: 2px;
    border-radius: 999px;
    background: #d7dde6;
    transition: background-color 0.18s ease;
}

.switch__thumb {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
    transition: transform 0.18s ease;
}

.switch input:checked + .switch__track {
    background: #74da63;
}

.switch input:checked + .switch__track .switch__thumb {
    transform: translateX(16px);
}

.inline-form select {
    width: auto;
    min-width: 140px;
    padding: 9px 10px;
}

.events-table-shell {
    margin-top: 8px;
    width: 100%;
}

.events-table {
    width: 100%;
    table-layout: fixed;
}

.events-table th,
.events-table td {
    padding: 12px 12px;
}

.events-table__name {
    font-weight: 700;
    line-height: 1.2;
    word-break: break-word;
}

.events-table__slug,
.events-table__dates,
.events-table__client-email {
    color: var(--muted);
    font-size: 13px;
}

.events-table__client,
.events-table__dates {
    line-height: 1.35;
    word-break: break-word;
}

.events-table__client-name {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.events-table__empty {
    color: var(--muted);
    font-size: 13px;
}

.events-actions {
    position: relative;
    display: flex;
    justify-content: flex-end;
}

.events-status-form {
    display: grid;
    gap: 8px;
}

.events-status-form select {
    min-width: 0;
    width: 100%;
    padding: 9px 10px;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    flex: 0 0 auto;
}

.icon-button--secondary {
    background: var(--slate);
}

.icon-button--primary {
    background: var(--teal);
}

.icon-button--danger {
    background: var(--danger);
}

.icon-button--ghost {
    background: transparent;
    color: var(--teal);
    border: 1px solid #b7d6d0;
}

.events-actions__toggle {
    font-size: 22px;
}

.events-actions__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 20;
    width: 240px;
    padding: 12px;
    background: #fff;
    border: 1px solid #dbe2ea;
    border-radius: 14px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
}

.events-actions__item {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
}

.events-actions__item:hover,
.events-actions__item:focus-visible {
    background: #f8fafc;
    outline: none;
}

.events-actions__item--danger {
    color: #ef4444;
}

.events-actions__item-icon {
    font-size: 16px;
    line-height: 1;
}

.events-actions__label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.events-actions__status {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

.events-actions__status-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.directory-checklist,
.directory-repeat {
    display: grid;
    gap: 12px;
}

.directory-checklist {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.directory-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-weight: 400;
}

.directory-check input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.accordion-group {
    display: grid;
    gap: 14px;
}

.accordion-section {
    border: 1px solid #dbe2ea;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}

.accordion-section__summary {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px 20px;
    cursor: pointer;
    position: relative;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.accordion-section__summary::-webkit-details-marker {
    display: none;
}

.accordion-section__summary::after {
    content: "+";
    position: absolute;
    right: 20px;
    top: 16px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #eef2f7;
    color: var(--slate);
    font-size: 20px;
    font-weight: 400;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.accordion-section[open] .accordion-section__summary::after {
    content: "-";
    background: rgba(15, 118, 110, 0.12);
    color: var(--teal);
}

.accordion-section__hint {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.accordion-section__content {
    padding: 0 20px 20px;
    border-top: 1px solid #edf2f7;
}

.events-table__stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.events-table__stat {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.events-table__stat-label {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.events-table__stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.checkin-history-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.checkin-history-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.checkin-history-search {
    min-width: min(100%, 360px);
    flex: 1 1 320px;
}

.checkin-history-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    background: #f8fafc;
    border: 1px solid #dbe2ea;
    border-radius: var(--radius-md);
}

.checkin-history-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.checkin-history-card__date {
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.checkin-history-card__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 100%;
}

.checkin-history-card__item .label {
    margin-bottom: 4px;
}

.checkin-history-card__item .value {
    font-size: 14px;
}

.checkin-history-card__name {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--text);
}

.checkin-history-card__folio {
    margin-top: 6px;
    font-size: 13px;
    color: var(--muted);
}

.list-row,
.benefit-row,
.item,
.meta-list > div {
    padding: 14px 0;
    border-bottom: 1px solid #e2e8f0;
}

.benefit-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.banner-preview {
    max-width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid #cbd5e1;
}

.section-divider {
    margin: 24px 0;
    border: 0;
    border-top: 1px solid #e2e8f0;
}

.section-title {
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: bold;
}

.video-shell {
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    border-radius: var(--radius-lg);
    padding: 12px;
    overflow: hidden;
    border: 3px solid #1f2937;
}

.scanner-region {
    width: 100%;
    min-height: 300px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #020617;
}

.result-box {
    border-radius: 22px;
    padding: 22px;
    min-height: 220px;
    border: 5px solid transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.result-box--idle {
    background: #f3f4f6;
    color: #374151;
    border-color: #cbd5e1;
}

.result-kicker {
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 10px;
    opacity: 0.9;
}

.result-title {
    margin: 0 0 10px;
    font-size: 38px;
    line-height: 1;
    font-weight: 900;
}

.result-name {
    margin: 4px 0 10px;
    font-size: 34px;
    line-height: 1.05;
    font-weight: 900;
}

.result-message {
    margin: 0 0 10px;
    font-size: 24px;
    line-height: 1.2;
    font-weight: bold;
}

.result-meta {
    margin: 4px 0;
    font-size: 18px;
    line-height: 1.3;
}

.status-bar {
    margin-top: 10px;
    gap: 8px;
}

.status-pill {
    background: rgba(255, 255, 255, 0.35);
}

.app-nav {
    grid-column: 1;
    grid-row: 1 / -1;
    margin: 0;
    padding: 18px 16px;
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    overflow: auto;
    display: flex;
    flex-direction: column;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 0;
    box-shadow: none;
}

.app-nav__main {
    flex: 1 1 auto;
}

.app-nav__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.app-nav__link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    min-height: 44px;
    padding: 10px 12px 10px 16px;
    border-radius: 12px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--slate);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.app-nav__link--primary {
    min-height: 46px;
    padding: 12px 14px 12px 18px;
}

.app-nav__link:hover {
    background: rgba(238, 244, 251, 0.92);
    border-color: rgba(184, 201, 223, 0.9);
}

.app-nav__link.is-active {
    background: rgba(238, 244, 251, 0.98);
    border-color: rgba(184, 201, 223, 0.95);
    color: var(--slate);
    box-shadow: none;
}

.app-nav__link.is-active::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 7px;
    bottom: 7px;
    width: 6px;
    border-radius: 0 999px 999px 0;
    background: var(--teal);
}

.app-nav__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
}

.app-nav__icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.app-nav__label {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.app-nav__group {
    border-radius: 14px;
}

.app-nav__group[open] {
    background: rgba(248, 250, 252, 0.9);
}

.app-nav__group-toggle {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 10px 12px 10px 16px;
    border-radius: 12px;
    cursor: pointer;
    color: var(--slate);
    font-size: 15px;
    font-weight: 500;
    list-style: none;
    user-select: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.app-nav__group-toggle::-webkit-details-marker {
    display: none;
}

.app-nav__group-toggle:hover,
.app-nav__group-toggle.is-open {
    background: rgba(238, 244, 251, 0.92);
}

.app-nav__group-toggle.is-open::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 7px;
    bottom: 7px;
    width: 6px;
    border-radius: 0 999px 999px 0;
    background: var(--teal);
}

.app-nav__chevron {
    margin-left: auto;
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.app-nav__group[open] .app-nav__chevron {
    transform: rotate(225deg);
}

.app-nav__submenu {
    display: grid;
    gap: 6px;
    padding: 6px 0 4px 34px;
}

.app-nav__sublink {
    min-height: 38px;
    padding: 8px 10px 8px 14px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
}

.app-nav__sublink .app-nav__icon {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
}

.app-nav__sublink .app-nav__icon svg {
    width: 18px;
    height: 18px;
}

.app-nav__sublink.is-active {
    background: rgba(238, 244, 251, 0.98);
    border-color: rgba(184, 201, 223, 0.95);
    color: var(--slate);
    box-shadow: none;
}

.app-nav__sublink.is-active::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 6px;
    bottom: 6px;
    width: 5px;
    border-radius: 0 999px 999px 0;
    background: var(--teal);
}

.app-nav__sublink.is-disabled {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
}

.app-nav__footer {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #e2e8f0;
}

.form-spacing-top {
    margin-top: 20px;
}

.dropzone {
    position: relative;
    border: 1px dashed #b8c9df;
    border-radius: 16px;
    background: linear-gradient(180deg, #fbfdff 0%, #f4f8fd 100%);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.dropzone:hover,
.dropzone.is-dragover {
    border-color: #1f4b82;
    background: #f0f6ff;
    box-shadow: 0 0 0 4px rgba(31, 75, 130, 0.08);
}

.dropzone__input {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.dropzone__content {
    display: grid;
    gap: 10px;
    padding: 20px;
}

.dropzone__title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.dropzone__hint,
.dropzone__file,
.dropzone__existing {
    color: var(--muted);
    font-size: 14px;
}

.dropzone__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.dropzone__actions .button-secondary {
    min-height: 40px;
}

.dropzone__preview-shell {
    margin-top: 12px;
    max-width: 360px;
    border: 1px solid #dbe2ea;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.dropzone__preview-image {
    display: block;
    width: 100%;
    height: auto;
}

.initials-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 999px;
    background: linear-gradient(180deg, #eef2f7 0%, #dfe7f2 100%);
    color: var(--slate);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.initials-avatar--sm {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    font-size: 13px;
}

.table-identity {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.table-identity__body {
    min-width: 0;
}

.table-identity__primary {
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
}

.table-identity__secondary {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.3;
    word-break: break-word;
}

@media (max-width: 900px) {
    .layout,
    .page,
    .wrap {
        padding: 16px;
    }

    .app-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .app-content {
        grid-column: auto;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .summary-grid,
    .grid,
    .form-grid,
    .filters,
    .filters-bar {
        grid-template-columns: 1fr;
    }

    .filters-bar {
        border-radius: 22px;
    }

    .filters-bar__search + .filters-bar__select,
    .filters-bar__select + .filters-bar__select {
        border-left: 0;
        border-top: 1px solid #e2e8f0;
    }

    .actions,
    .submit-row,
    .filter-actions,
    .row-actions,
    .app-nav__list {
        width: 100%;
    }

    .button,
    .button-secondary,
    .button-danger,
    .app-nav__link,
    .app-nav__group-toggle,
    .app-nav__sublink {
        width: 100%;
    }

    .app-nav {
        grid-column: auto;
        grid-row: auto;
        position: static;
        max-height: none;
    }

    .app-nav__submenu {
        padding-left: 18px;
    }

    .registration-summary {
        flex-direction: column;
    }

    .status-stack--inline {
        justify-content: flex-start;
    }

    .registration-detail-grid,
    .registration-contact-card__grid {
        grid-template-columns: 1fr;
    }

    .checkin-history-toolbar {
        align-items: stretch;
    }

    .checkin-history-search {
        min-width: 100%;
    }

    .checkin-history-grid {
        grid-template-columns: 1fr;
    }

    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    thead {
        display: none;
    }

    tr {
        padding: 12px 0;
        border-bottom: 1px solid #e2e8f0;
    }

    td {
        border: 0;
        padding: 8px 0;
    }

    td::before {
        content: attr(data-label);
        display: block;
        font-size: 14px;
        color: var(--muted);
        text-transform: none;
        font-weight: 400;
        margin-bottom: 4px;
    }

    .benefit-row {
        flex-direction: column;
    }

    .result-title {
        font-size: 32px;
    }

    .result-name {
        font-size: 30px;
    }

    .result-message {
        font-size: 22px;
    }
}

@media (min-width: 901px) and (max-width: 1280px) {
    .checkin-history-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1281px) and (max-width: 1560px) {
    .checkin-history-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.checkin-history-pagination {
    margin-top: 18px;
    align-items: center;
}

.checkin-history-pagination__meta {
    color: var(--muted);
    font-size: 14px;
}

.modal-open {
    overflow: hidden;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.68);
    z-index: 1000;
}

.modal-backdrop[hidden] {
    display: none !important;
}

.modal-dialog {
    width: min(100%, 760px);
    max-height: calc(100vh - 48px);
    overflow: auto;
    background: var(--card);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.modal-dialog--wide {
    width: min(100%, 1080px);
}

.modal-header {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid #e2e8f0;
    backdrop-filter: blur(8px);
}

.modal-header h2 {
    margin: 0;
}

.modal-close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background: #e2e8f0;
    color: var(--slate);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.modal-body {
    padding: 22px;
}

.registration-detail {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.registration-detail__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.registration-summary {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
}

.registration-summary__main {
    min-width: 0;
}

.registration-summary__name {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.05;
    margin-bottom: 8px;
}

.registration-summary__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: var(--muted);
    font-size: 13px;
}

.status-stack--inline {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.registration-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.registration-contact-card {
    display: grid;
    gap: 14px;
}

.registration-contact-card__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 14px;
}

.registration-contact-card__item {
    min-width: 0;
}

.registration-contact-card__notes {
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.card--compact {
    padding: 12px 14px;
}

.card--compact .label {
    margin-bottom: 4px;
}

.card--compact .value {
    font-size: 14px;
    line-height: 1.35;
}

.list-row--compact {
    padding: 10px 0;
}

.payment-proof-thumb {
    margin-top: 8px;
}

.payment-proof-thumb a {
    display: inline-flex;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #dbe2ea;
}

.payment-proof-thumb img {
    display: block;
    width: 120px;
    height: 120px;
    object-fit: cover;
    background: #fff;
}
