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

:root {
    --bg: #e8edf3;
    --surface: #ffffff;
    --surface-soft: #f0f4f8;
    --text: #0f172a;
    --muted: #64748b;
    --border: #d1d9e0;
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.07), 0 4px 20px rgba(0, 0, 0, 0.07);
    --radius: 10px;
    --container: 1120px;
    --font-display: "Inter", system-ui, -apple-system, sans-serif;
    --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}

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

button,
input,
select,
textarea {
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    padding: 0.7rem 0.9rem;
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
}

select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.1em;
    padding-right: 2.25rem;
    cursor: pointer;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--tenant-primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

input[type="color"] {
    padding: 0;
    cursor: pointer;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0.35rem;
}

input[type="color"]::-webkit-color-swatch {
    border: 0;
    border-radius: 6px;
}

input[type="color"]::-moz-color-swatch {
    border: 0;
    border-radius: 6px;
}

textarea {
    resize: vertical;
}

label {
    display: grid;
    gap: 0.4rem;
}

label span {
    font-size: 0.875rem;
    font-weight: 600;
}

.container {
    width: min(100% - 2rem, var(--container));
    margin: 0 auto;
}

.page {
    padding: 2rem 0 4rem;
}

/* ─── Topbar ─────────────────────────────────────────────────────────────── */

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--border);
}

.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-display);
}

.brand strong {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.brand small {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 400;
}

.brand__mark {
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    background: linear-gradient(145deg, var(--tenant-primary), var(--tenant-secondary));
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.brand__mark img {
    position: absolute;
    width: calc(var(--logo-scale, 1) * 100%);
    height: calc(var(--logo-scale, 1) * 100%);
    left: calc(var(--logo-position-x, 50%) * (1 - var(--logo-scale, 1)));
    top: calc(var(--logo-position-y, 50%) * (1 - var(--logo-scale, 1)));
    object-fit: cover;
}

.brand__mark--logo {
    background: none;
}

/* ─── Nav ────────────────────────────────────────────────────────────────── */

.nav {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.nav__menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.nav__toggle {
    display: none;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}

.nav__bell {
    display: none;
    position: relative;
    width: 2.5rem;
    height: 2.5rem;
    align-items: center;
    justify-content: center;
    padding: 0.3rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    text-decoration: none;
    flex-shrink: 0;
}

.nav__bell svg {
    width: 2rem;
    height: 2rem;
}

.nav__bell-badge {
    position: absolute;
    top: -1px;
    right: 2px;
    background: #dc2626;
    color: #fff;
    font-size: .6rem;
    font-weight: 700;
    min-width: 1rem;
    height: 1rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 .2rem;
    line-height: 1;
}

.nav__toggle span {
    display: block;
    width: 1.1rem;
    height: 2px;
    margin: 0.2rem auto;
    border-radius: 999px;
    background: currentColor;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.nav[data-open="true"] .nav__toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.nav[data-open="true"] .nav__toggle span:nth-child(2) {
    opacity: 0;
}

.nav[data-open="true"] .nav__toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.locale-toggle-form {
    margin: 0;
    flex-shrink: 0;
}

.locale-toggle {
    display: flex;
    align-items: center;
    background: var(--surface-soft, #f1f5f9);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}

.locale-toggle__btn {
    background: transparent;
    border: none;
    border-radius: 6px;
    padding: 0.25rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--muted);
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
    letter-spacing: 0.04em;
    line-height: 1.4;
}

.locale-toggle__btn.is-active {
    background: #fff;
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.locale-toggle__btn:hover:not(.is-active) {
    color: var(--text);
}

@media (min-width: 1024px) {
    .locale-toggle-form--menu {
        padding-right: 0.75rem;
        margin-right: 0.25rem;
        border-right: 1px solid var(--border);
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.nav a {
    padding: 0.55rem 0.75rem;
    border-radius: 0;
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.nav a:hover {
    color: var(--text);
}

.nav a.is-active {
    color: var(--tenant-primary);
    border-bottom-color: var(--tenant-primary);
    font-weight: 600;
}

.nav a.nav__bell {
    padding: 0.3rem;
    border-bottom: none;
    color: var(--text);
}

.nav__logout {
    margin: 0;
}

/* ─── Admin subnav ───────────────────────────────────────────────────────── */

.admin-subnav {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}

.admin-subnav__inner {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    width: min(100% - 2rem, var(--container));
    margin: 0 auto;
    padding: 0;
}

.admin-subnav__inner::after {
    content: '';
    flex: 0 0 0.75rem;
}

.admin-subnav a {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--muted);
    border-radius: 0;
    white-space: nowrap;
    transition: color 0.15s;
    border-bottom: 2px solid transparent;
}

.admin-subnav a:hover {
    color: var(--text);
    background: none;
}

.admin-subnav a.is-active {
    background: none;
    color: var(--text);
    font-weight: 600;
    box-shadow: none;
    border-bottom: 2px solid var(--tenant-primary);
}

.admin-subnav--platform {
    background: var(--surface-soft, #f8fafc);
    border-bottom: 1px solid var(--border);
}

.admin-subnav--platform .admin-subnav__inner {
    padding: 0.5rem 0;
    gap: 0.3rem;
}

.admin-subnav--platform a {
    border-radius: 9999px;
    border-bottom: none;
    padding: 0.3rem 0.9rem;
    font-size: 0.8rem;
}

.admin-subnav--platform a:hover {
    background: var(--border);
    color: var(--text);
}

.admin-subnav--platform a.is-active {
    background: var(--tenant-primary, #1a3849);
    color: #fff;
    font-weight: 500;
    border-bottom: none;
    box-shadow: none;
}

.upgrade-banner {
    background: #fffbeb;
    border-bottom: 1px solid #fde68a;
}

.upgrade-banner--info {
    background: #eff6ff;
    border-bottom-color: #bfdbfe;
}

.upgrade-banner--warning {
    background: #fffbeb;
    border-bottom-color: #fcd34d;
}

.upgrade-banner--danger {
    background: #fef2f2;
    border-bottom-color: #fca5a5;
}

.upgrade-banner__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: min(100% - 2rem, var(--container));
    margin: 0 auto;
    padding: 0.5rem 0;
    font-size: 0.8rem;
    color: #92400e;
}

.upgrade-banner--info .upgrade-banner__inner {
    color: #1e40af;
}

.upgrade-banner--danger .upgrade-banner__inner {
    color: #7f1d1d;
}

/* ─── Hero ───────────────────────────────────────────────────────────────── */

.hero {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1.2rem;
    align-items: stretch;
}

.hero__content,
.hero__panel,
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow-x: hidden;
}

.hero__content {
    padding: 2.5rem;
}

.hero__panel,
.card {
    padding: 1.5rem;
}

.card--soft {
    background: var(--surface-soft);
    box-shadow: none;
}

.admin-create-user {
    margin-bottom: 1.2rem;
}

/* ─── Typography ─────────────────────────────────────────────────────────── */

.hero h1,
.section-header h1,
.empty-state h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.8rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    font-weight: 800;
}

.section-header h1 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    letter-spacing: -0.025em;
}

.lead {
    max-width: 52rem;
    font-size: 1.05rem;
    color: var(--muted);
    line-height: 1.65;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    background: var(--surface-soft);
    color: var(--tenant-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */

.hero__actions,
.quick-actions,
.calendar-nav,
.install-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1rem;
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 2.4rem;
    padding: 0.55rem 1.1rem;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
    transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.1s, filter 0.15s;
    white-space: nowrap;
}

.button--primary {
    background: var(--tenant-primary);
    color: var(--tenant-button-text, #fff);
    border-color: var(--tenant-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.button--primary:hover {
    filter: brightness(1.07);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
    transform: translateY(-1px);
}

.button--secondary {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.button--secondary:hover {
    background: var(--surface-soft);
    border-color: var(--muted);
    transform: translateY(-1px);
}

.button--ghost {
    background: transparent;
    border-color: transparent;
    color: var(--muted);
    box-shadow: none;
}

.button--ghost:hover {
    background: var(--surface-soft);
    color: var(--text);
    transform: none;
}

.button--sm {
    min-height: 1.8rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.78rem;
    border-radius: 6px;
}

.button--success {
    background: var(--tenant-status-success, var(--success));
    color: var(--tenant-button-text, #fff);
    border-color: var(--tenant-status-success, var(--success));
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.button--success:hover {
    filter: brightness(1.07);
    transform: translateY(-1px);
}

.button--danger {
    background: var(--tenant-status-danger, var(--danger));
    color: #fff;
    border-color: var(--tenant-status-danger, var(--danger));
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.button--danger:hover {
    filter: brightness(1.07);
    transform: translateY(-1px);
}

.button--disabled,
.button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ─── Layout helpers ─────────────────────────────────────────────────────── */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.section-header>div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
}

.section-header .eyebrow {
    margin: 0;
}

.section-header--top {
    margin-bottom: 0rem;
}

.section-header--calendar {
    align-items: flex-start;
}

.calendar-nav--floating {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    margin: -0.3rem 0 1rem;
}

.grid {
    display: grid;
    gap: 1.2rem;
}

.grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.grid--40-60 {
    grid-template-columns: 2fr 3fr;
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.stats-grid--dashboard {
    grid-template-columns: repeat(4, 1fr);
}

.stat-card span,
.muted {
    color: var(--muted);
    font-size: 0.875rem;
}

.stat-card {
    border-left: 3px solid var(--tenant-primary);
}

.stat-card--wide {
    grid-column: span 2;
}

.stat-card--warning {
    border-left-color: #f59e0b;
}

.stat-card--danger {
    border-left-color: #ef4444;
}

@media (max-width: 600px) {
    .stat-card--wide {
        grid-column: 1 / -1;
    }
}


.stat-card strong {
    display: block;
    margin-top: 0.4rem;
    font-size: 1.9rem;
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--text);
    line-height: 1;
}

.stat-card__value--compact {
    font-size: 1.35rem;
    line-height: 1.15;
}

.stat-card__upgrade {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--tenant-primary);
    text-decoration: none;
    white-space: nowrap;
    opacity: 0.85;
}

.stat-card__upgrade:hover {
    text-decoration: underline;
}

.dashboard-calendar-cta {
    margin: 0 0 1rem;
}

.dashboard-calendar-cta .button {
    width: 100%;
}

.dashboard-calendar-cta--desktop {
    display: inline-flex;
}

/* ─── Stats bars ─────────────────────────────────────────────────────────── */

.stats-bars {
    display: grid;
    gap: 0.6rem;
}

.stats-bar-row {
    display: grid;
    grid-template-columns: 5rem 1fr 4rem;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.8rem;
}

.stats-bar-label {
    color: var(--muted);
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stats-bar-track {
    background: var(--surface-soft);
    border-radius: 4px;
    height: 0.55rem;
    overflow: hidden;
}

.stats-bar-fill {
    height: 100%;
    background: var(--tenant-primary);
    border-radius: 4px;
    min-width: 2px;
    transition: width 0.4s ease;
}

.stats-bar-value {
    font-weight: 600;
    color: var(--text);
}

.stack {
    display: grid;
    gap: 0.75rem;
    align-content: start;
}

.feature-list {
    margin: 0;
    padding-left: 1.2rem;
    display: grid;
    gap: 0.65rem;
}

.steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 1.1rem;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
}

.step__num {
    flex-shrink: 0;
    display: inline-grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: var(--tenant-primary);
    color: var(--button-text-color, #fff);
    font-size: 0.8rem;
    font-weight: 800;
    margin-top: 0.1rem;
}

.step strong {
    display: block;
    font-weight: 600;
    margin-bottom: 0.1rem;
}

.step p {
    margin: 0;
}

/* ─── Rows & chips ───────────────────────────────────────────────────────── */

.tenant-chip,
.event-row,
.list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    min-width: 0;
    overflow: hidden;
}

.tenant-chip,
.event-row,
.list-row {
    padding: 0.85rem 1rem;
    border-radius: 8px;
    background: var(--surface-soft);
}

.event-row--link {
    color: inherit;
    text-decoration: none;
    transition: background-color 0.15s;
}

.event-row--link:hover {
    background: var(--border);
}

.list-row--dense {
    align-items: flex-start;
}

.card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.card__header h2,
.card__header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.table-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.table-search {
    padding: 0.35rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
    width: 200px;
    background: var(--surface);
    color: var(--text);
}

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

.table-filter {
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}

.column-picker {
    position: relative;
}

.column-picker__menu {
    position: fixed;
    right: auto;
    top: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    padding: 0.4rem;
    min-width: 190px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.column-picker__menu label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem;
    border-radius: 5px;
    font-size: 0.85rem;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.column-picker__menu label input[type="checkbox"] {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    margin: 0;
    cursor: pointer;
}

.column-picker__menu label:hover {
    background: var(--surface-soft);
}

/* ─── Alerts ─────────────────────────────────────────────────────────────── */

.alert {
    padding: 0.85rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border-left: 3px solid currentColor;
}

.alert--success {
    background: rgba(var(--tenant-status-success-rgb, 34, 197, 94), 0.08);
    color: var(--tenant-status-success, var(--success));
}

.alert--danger {
    background: rgba(var(--tenant-status-danger-rgb, 239, 68, 68), 0.08);
    color: var(--tenant-status-danger, var(--danger));
}

.alert--warning {
    background: rgba(var(--tenant-status-warning-rgb, 245, 158, 11), 0.08);
    color: var(--tenant-status-warning, var(--warning));
}

.alert--info {
    background: rgba(59, 130, 246, 0.08);
    color: #2563eb;
}

/* ─── Page loader overlay (body.is-loading) ──────────────────────────────── */
body.is-loading::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 9998;
}

body.is-loading::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: page-spin 0.65s linear infinite;
    z-index: 9999;
    transform: translate(-50%, -50%);
}

@keyframes page-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Botón Voy desactivado mientras se guarda */
.attendance-form.is-saving [data-set-status],
.attendance-form.is-saving [data-add-companion-submit],
.attendance-form.is-saving [data-remove-self-attendance] {
    opacity: 0.55;
    pointer-events: none;
}

/* ─── Status pills ───────────────────────────────────────────────────────── */

.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.status--neutral {
    background: rgba(var(--tenant-status-neutral-rgb, 19, 49, 92), 0.1);
    color: var(--tenant-status-neutral, var(--tenant-secondary));
}

.status--success {
    background: rgba(var(--tenant-status-success-rgb, 34, 197, 94), 0.1);
    color: var(--tenant-status-success, var(--success));
}

.status--warning {
    background: rgba(var(--tenant-status-warning-rgb, 245, 158, 11), 0.12);
    color: var(--tenant-status-warning, var(--warning));
}

.status--danger {
    background: rgba(var(--tenant-status-danger-rgb, 239, 68, 68), 0.1);
    color: var(--tenant-status-danger, var(--danger));
}

.status--xs {
    padding: 0.1rem 0.45rem;
    font-size: 0.7rem;
    border-radius: 4px;
    vertical-align: middle;
}

/* ─── Forms ──────────────────────────────────────────────────────────────── */

.input-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-content: start;
    align-items: start;
}

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

.form-grid__full {
    grid-column: 1 / -1;
}

.form-grid__wide {
    grid-column: span 2;
}

.field-error {
    color: var(--danger);
    font-size: 0.82rem;
    font-weight: 500;
}

.field-ok {
    color: var(--success);
    font-size: 0.82rem;
    font-weight: 500;
}

.field-checking {
    color: var(--muted);
    font-size: 0.82rem;
}

.plan-gate {
    position: relative;
}

.plan-gate.is-locked {
    opacity: 0.9;
}

.plan-gate__hint {
    margin: 0 0 0.75rem;
}

.plan-gate__hint--link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem 0.25rem 0.5rem;
    background: #fef2f2;
    color: #c0392b;
    border: 1px solid #fca5a5;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.01em;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
}

.plan-gate__hint--link svg,
.plan-lock-icon {
    width: 0.8rem;
    height: 0.8rem;
    flex-shrink: 0;
    vertical-align: middle;
    color: #c0392b;
}

.plan-gate__hint--link:hover {
    background: #fee2e2;
    border-color: #f87171;
}

.plan-gate__fieldset {
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

.plan-gate__fieldset[disabled] {
    opacity: 0.55;
}

.button--locked {
    opacity: 0.75;
}

/* ─── Pricing ────────────────────────────────────────────────────────────── */

.pricing-hero {
    text-align: center;
    max-width: 52rem;
    margin: 0 auto 2rem;
    padding: 1.5rem 0 0.5rem;
}

.pricing-hero h1 {
    margin: 0.5rem 0 1rem;
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 4rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
    font-weight: 800;
}

.pricing-hero .lead {
    max-width: 38rem;
    margin: 0 auto 1.5rem;
    color: var(--muted);
}

.pricing-hero .hero__actions {
    justify-content: center;
    margin-bottom: 1rem;
}

.pricing-hero__meta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 0.3rem 0.9rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto auto auto 1fr;
    column-gap: 1.2rem;
    row-gap: 1rem;
    margin-bottom: 1.5rem;
}

.pricing-card {
    position: relative;
    display: grid;
    grid-row: span 4;
    grid-template-rows: subgrid;
    gap: 0;
}

.pricing-card--premium {
    background: var(--surface);
    border-left: 4px solid var(--success);
}

.pricing-card--pro {
    background: var(--surface);
    border-left: 4px solid var(--tenant-primary);
}

.pricing-card--free {
    background: var(--surface-soft);
    border-left: 4px solid var(--border);
}

.pricing-card--especial {
    background: var(--surface);
    border-left: 4px solid #ea580c;
}

.pricing-card--featured {
    background: linear-gradient(170deg, #f0fdf4 0%, var(--surface) 28%);
    outline: 2px solid #16a34a;
    outline-offset: -1px;
    box-shadow: 0 8px 40px rgba(22, 163, 74, 0.18);
}

.pricing-card--focused {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.pricing-card__head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.pricing-card__head h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
}

.pricing-card__price {
    margin: 0;
    font-family: var(--font-display);
    font-size: 2.3rem;
    line-height: 1;
    letter-spacing: -0.04em;
    font-weight: 800;
}

.pricing-card__billing {
    margin: 0;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.875rem;
}

.pricing-card__cta,
.pricing-card__current {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 3rem;
    padding: 0.65rem 1.25rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    align-self: start;
}

.pricing-card__features-wrap {
    display: grid;
    gap: 0.75rem;
}

.pricing-card__feature-intro {
    margin: 0;
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 600;
}

.pricing-card__pricing {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
}

.pricing-card__features {
    margin-top: 0;
}

.pricing-card__features--matrix {
    list-style: none;
    padding-left: 0;
    gap: 0.6rem;
}

.pricing-card__feature {
    display: grid;
    grid-template-columns: 1.6rem minmax(0, 1fr);
    gap: 0.65rem;
    align-items: start;
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    background: var(--surface-soft);
}

.pricing-card__feature-icon {
    display: inline-grid;
    place-items: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 800;
}

.pricing-card__feature--enabled .pricing-card__feature-icon {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success);
}

.pricing-card__feature--disabled {
    color: var(--muted);
}

.pricing-card__feature--disabled .pricing-card__feature-icon {
    background: rgba(0, 0, 0, 0.06);
    color: var(--muted);
}

.pricing-compare {
    margin-bottom: 1.5rem;
}

.pricing-banner {
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 60%, #fde68a 100%);
    border-color: #f59e0b;
    border-left: 4px solid #f59e0b;
}

.pricing-banner__inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    justify-content: space-between;
    padding: 1.5rem 1.75rem;
}

.pricing-banner__copy {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.pricing-banner__copy .eyebrow {
    color: #92400e;
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
}

.pricing-banner__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.15;
    color: #78350f;
}

.pricing-banner__right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.pricing-banner__price {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    white-space: nowrap;
    color: #92400e;
}

.pricing-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.pricing-table {
    width: 100%;
    min-width: 42rem;
    border-collapse: collapse;
}

.pricing-table th,
.pricing-table td {
    padding: 1rem 0.9rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.pricing-table th {
    font-size: 0.875rem;
    font-weight: 600;
}

/* ─── Auth ───────────────────────────────────────────────────────────────── */

.auth-shell {
    display: grid;
    place-items: center;
    min-height: 60vh;
    padding: 2rem 0;
}

.auth-card {
    width: min(100%, 26rem);
    border-top: 3px solid var(--tenant-primary);
    display: grid;
    gap: 1.5rem;
}

.auth-card__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.auth-card__brand-name {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.02em;
    color: var(--text);
}

.auth-card__header h1 {
    margin: 0 0 0.35rem;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.auth-card__header p {
    margin: 0;
}

.auth-submit {
    width: 100%;
    min-height: 2.6rem;
    font-size: 0.9rem;
}

.auth-card__footer {
    margin: 0;
    text-align: center;
    font-size: 0.875rem;
}

.auth-card__footer a {
    color: var(--tenant-primary);
    font-weight: 600;
}

/* ─── Choices / option groups ────────────────────────────────────────────── */

.option-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.choice {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.9rem;
    background: var(--surface-soft);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.choice input {
    width: auto;
}

.choice--checkbox {
    justify-content: flex-start;
}

/* ─── Toggle switch ──────────────────────────────────────────────────────── */

.switch {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
    padding: 0.1rem 0;
}

.switch__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.switch__track {
    position: relative;
    flex-shrink: 0;
    width: 42px;
    height: 24px;
    background: var(--border);
    border-radius: 12px;
    transition: background 0.18s;
}

.switch__track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.18s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.switch__input:checked+.switch__track {
    background: var(--tenant-primary, #1a3849);
}

.switch__input:checked+.switch__track::after {
    transform: translateX(18px);
}

.switch__label {
    font-size: 0.9rem;
    color: var(--text);
}

.switch__desc {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 0.1rem;
}

.meal-type-toggle {
    min-height: 3.25rem;
    align-self: end;
}

/* ─── Calendar ───────────────────────────────────────────────────────────── */

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.6rem;
    margin-bottom: 1.2rem;
}

.calendar-grid__head {
    font-weight: 600;
    color: var(--muted);
    text-align: center;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-bottom: 0.5rem;
}

.calendar-day {
    min-height: 7rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: var(--surface-soft);
    border: 1px solid transparent;
    transition: border-color 0.15s;
}

.calendar-day--empty {
    background: transparent;
    border: 1px dashed var(--border);
}

.calendar-day__number {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.calendar-pill {
    display: block;
    padding: 0.35rem 0.5rem;
    border-left: 3px solid var(--pill-color);
    border-radius: 4px;
    background: var(--surface);
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ─── Event card compact (calendar view) ────────────────────────────────── */

.event-card--compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    color: inherit;
    transition: background-color 0.15s, transform 0.1s, box-shadow 0.15s;
}

.event-card--compact:hover {
    background: var(--surface-soft);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.event-card--past {
    background: var(--surface-soft);
    opacity: 0.75;
}

.event-card--past:hover {
    opacity: 1;
}

.admin-event-row__info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    flex: 1;
}

.admin-event-row__meta {
    margin: 0;
    font-size: 0.875rem;
}

.admin-event-row__pending {
    margin: 0;
    font-size: 0.8125rem;
}

.event-card-compact__body {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.event-card-compact__body p {
    margin: 0 0 5px;
}

.event-card-compact__title-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.event-card-compact__tag {
    flex-shrink: 0;
    display: inline-block;
    padding: 0.1rem 0.4rem;
    background: var(--surface-soft);
    color: var(--tenant-primary);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    white-space: nowrap;
}

.event-card-compact__title {
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.event-card-compact__meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

.event-card-compact__badges {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    .event-card-compact__title-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .event-card-compact__title,
    .event-card-compact__title-row>strong {
        white-space: normal;
    }
}

/* ─── Event card ─────────────────────────────────────────────────────────── */

.event-card {
    scroll-margin-top: 7rem;
}

.event-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.event-payment {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.event-detail-header {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.75rem;
}

.event-detail-header h1 {
    margin: 0;
    line-height: 1.2;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    letter-spacing: -0.025em;
}

.event-detail-header__back {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.6rem;
    margin-bottom: 0;
    flex-wrap: wrap;
}

.event-detail-header__info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.event-info-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 0.4rem;
}

.event-info-row__item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.event-info-row__item svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.event-info-row__sep {
    opacity: 0.35;
    font-size: 0.85rem;
}

.event-detail-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: -0.1rem 0 1rem;
}

.event-detail-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.attendance-summary {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex-shrink: 0;
}


.attendance-panel {
    padding: 1rem;
    border-radius: 8px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
}

.attendance-panel--notes {
    display: grid;
    gap: 0.75rem;
    align-content: start;
}

.attendance-panel__title {
    font-weight: 600;
    font-size: 0.875rem;
}

.selected-attendees {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface);
    margin-top: 0.5rem;
}

.selected-attendees.is-empty {
    border: none;
    background: none;
    margin-top: 0;
}

.selected-attendees__row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.selected-attendees__row:last-child {
    border-bottom: none;
}

.attendee-icon {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
    color: var(--muted);
    opacity: 0.5;
}

.selected-attendees__info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.selected-attendees__actions {
    display: flex;
    align-items: center;
}

.attendee-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    border: none;
    background: none;
    color: var(--muted);
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    transition: background 0.15s, color 0.15s;
}

.attendee-remove:hover {
    background: #fee2e2;
    color: #dc2626;
}

.attendee-remove svg {
    width: 1.1rem;
    height: 1.1rem;
    pointer-events: none;
}

.companion-box {
    padding: 0.85rem 1rem;
    border-radius: 8px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
}

.companion-add-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.companion-add-form input {
    flex: 1 1 10rem;
    min-width: 8rem;
}

.companion-add-form select {
    flex: 0 0 auto;
    width: 8rem;
}

.saved-companions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.65rem;
}

.saved-companions__label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}

.saved-companions__button {
    min-height: 2.2rem;
    padding: 0.45rem 0.8rem;
    font-size: 0.85rem;
}

/* ─── Tables ─────────────────────────────────────────────────────────────── */

.table-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.text-right {
    text-align: right;
}

.data-table {
    width: 100%;
    min-width: max-content;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.85rem 0.8rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.data-table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    font-weight: 700;
}

/* ─── Pagination ─────────────────────────────────────────────────────────── */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
}

/* ─── Misc form elements ─────────────────────────────────────────────────── */

.companion-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
}

.companion-row>[data-draft-companion-name] {
    grid-column: 1 / -1;
    width: 100%;
}

.companion-row>[data-draft-companion-age-group] {
    min-width: 0;
}

.companion-row>[data-add-draft-companion] {
    white-space: nowrap;
}

.color-field {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.color-field input[type="color"] {
    flex-shrink: 0;
    width: 3rem;
    min-height: 3rem;
    height: 3rem;
    padding: 0.25rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    cursor: pointer;
}

.color-field__value {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.form-actions--info {
    justify-content: flex-start;
}

.inline-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.event-payment-editor {
    padding: 1rem;
}

.payment-toggle {
    padding: 0;
    background: none;
    border: none;
    gap: 0.3rem;
    font-size: 0.875rem;
}

.payment-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-size: 0.875rem;
    white-space: nowrap;
    padding: 0.5rem 0.75rem;
    background: var(--surface-soft);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.data-table .payment-cell {
    text-align: center;
}

/* ─── Logo editor ────────────────────────────────────────────────────────── */

.logo-editor__body {
    display: grid;
    grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.logo-preview {
    position: relative;
    width: 100%;
    max-width: 14rem;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 12px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
}

.logo-preview img,
.logo-preview__fallback {
    position: absolute;
    inset: 0;
}

.logo-preview img {
    position: absolute;
    width: calc(var(--logo-scale, 1) * 100%);
    height: calc(var(--logo-scale, 1) * 100%);
    left: calc(var(--logo-position-x, 50%) * (1 - var(--logo-scale, 1)));
    top: calc(var(--logo-position-y, 50%) * (1 - var(--logo-scale, 1)));
    object-fit: cover;
}

.logo-preview__fallback {
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    background: linear-gradient(145deg, var(--tenant-primary), var(--tenant-secondary));
    color: #fff;
}

.logo-controls {
    display: grid;
    gap: 0.8rem;
}

/* ─── Cards & empty state ────────────────────────────────────────────────── */

.link-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.link-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.admin-nav-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-nav-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    text-decoration: none;
    color: var(--text);
    border-left: 3px solid var(--tenant-primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-nav-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.admin-nav-card h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.admin-nav-card p {
    margin: 0;
    font-size: 0.875rem;
}

.admin-nav-card__top {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.25rem;
}

.admin-nav-card__count {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--tenant-primary);
}

.admin-nav-card__arrow {
    font-size: 1.25rem;
    color: var(--muted);
}

.empty-state {
    text-align: center;
    max-width: 40rem;
    margin: 4rem auto;
}

/* ─── Install banner ─────────────────────────────────────────────────────── */

.install-banner {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    z-index: 50;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    max-width: 42rem;
    margin: 0 auto;
    padding: 1rem 1.25rem;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.16);
}

.install-banner__copy {
    display: grid;
    gap: 0.25rem;
}

.install-banner__copy p {
    margin: 0;
    color: var(--muted);
    font-size: 0.875rem;
}

.install-banner__ios-hint {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    line-height: 1.45;
}

.install-banner__ios-hint strong {
    color: var(--text);
}

.install-banner__ios-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text);
    font-weight: 700;
    white-space: nowrap;
}

.install-banner__ios-pill svg {
    width: 1rem;
    height: 1rem;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ─── Legal document ─────────────────────────────────────────────────────── */

.legal-doc {
    max-width: 800px;
    margin-inline: auto;
    line-height: 1.75;
}

.legal-doc h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 1.5rem;
    color: var(--text);
}

.legal-doc h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1.25rem;
    color: var(--text);
}

.legal-doc p,
.legal-doc ul {
    color: var(--muted);
    font-size: 0.92rem;
}

.legal-doc ul {
    padding-left: 1.4rem;
}

.legal-doc ul li {
    margin-bottom: 0.25rem;
}

.legal-doc hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2rem 0;
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */

.site-footer {
    padding: 0 0 2rem;
}

.site-footer__inner {
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    text-align: center;
    font-size: 0.875rem;
}

.site-footer__inner a {
    color: var(--muted);
    text-decoration: none;
}

.site-footer__inner a:hover {
    color: var(--text);
    text-decoration: underline;
}

/* ─── Install platform variants ──────────────────────────────────────────── */

.install-banner[data-platform="ios"] {
    border-left: 4px solid var(--tenant-secondary);
}

.install-banner[data-platform="android"] {
    border-left: 4px solid var(--tenant-primary);
}

.install-banner [data-dismiss-install] {
    background: var(--surface-soft);
    border-color: var(--border);
    color: var(--text);
}

/* ─── Landing page ───────────────────────────────────────────────────────── */

.landing-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 4rem 0 3rem;
}

.landing-hero__copy {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.landing-hero__copy .hero__actions {
    margin-top: 0.5rem;
}

.landing-hero__helper {
    max-width: 42rem;
}

.landing-hero__visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.landing-hero--tenant {
    padding-bottom: 2.5rem;
}

.landing-section--tenant:first-of-type {
    padding-top: 2.75rem;
}

/* App preview mockup */
.app-preview {
    width: 100%;
    max-width: 320px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    animation: preview-float 4s ease-in-out infinite;
}

@keyframes preview-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.app-preview__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    background: var(--tenant-primary, #1a3849);
    color: #fff;
}

.app-preview__nav-brand {
    font-weight: 700;
    font-size: 0.9rem;
}

.app-preview__nav-hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.app-preview__nav-hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
}

.app-preview__body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.app-preview__greeting {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.app-preview__label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin: 0.25rem 0 0;
}

.app-preview__event {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    background: var(--surface-soft);
    border-radius: 10px;
    border: 1px solid var(--border);
}

.app-preview__event-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

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

.app-preview__event-info strong {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-preview__event-info span {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.app-preview__badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.app-preview__badge--going {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

/* Landing sections */
.landing-section {
    padding: 3.5rem 0;
    border-top: 1px solid var(--border);
}

.landing-section__header {
    text-align: center;
    max-width: 560px;
    margin: 0 auto 2.5rem;
}

.landing-section__header h2 {
    margin-bottom: 0.5rem;
}

/* Features grid */
.landing-features__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.feature-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 3px solid var(--tenant-primary, #1a3849);
    transition: box-shadow 0.2s, transform 0.2s;
}

.feature-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.feature-card__icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-card__icon svg {
    width: 1.375rem;
    height: 1.375rem;
}

.feature-icon--blue {
    background: #dbeafe;
    color: #2563eb;
}

.feature-icon--green {
    background: #dcfce7;
    color: #16a34a;
}

.feature-icon--purple {
    background: #ede9fe;
    color: #7c3aed;
}

.feature-icon--amber {
    background: #fef3c7;
    color: #d97706;
}

.feature-icon--yellow {
    background: #fefce8;
    color: #c7c100;
}

.feature-icon--red {
    background: #fef2f2;
    color: #c0392b;
}

.feature-icon--indigo {
    background: #e0e7ff;
    color: #4f46e5;
}

.feature-card h3 {
    margin: 0;
    font-size: 1rem;
}

.feature-card p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* How it works grid */
.landing-how__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    position: relative;
}

.landing-step {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.5rem;
}

.landing-step__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--tenant-primary, #1a3849);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-bottom: 0.25rem;
}

.landing-step h3 {
    margin: 0;
    font-size: 1rem;
}

.landing-step p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Pricing more link */
.landing-pricing__more {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

/* CTA strip */
.landing-cta {
    text-align: center;
    padding: 3.5rem 2rem;
    background: var(--surface-soft);
    border-radius: 16px;
    border: 1px solid var(--border);
    margin: 2rem 0 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.landing-cta h2 {
    margin: 0;
}

.landing-cta p {
    margin: 0;
    color: var(--text-muted);
}

.landing-cta .button {
    margin-top: 0.5rem;
    background: var(--tenant-primary, #1a3849);
    color: #fff;
    border-color: var(--tenant-primary, #1a3849);
}

/* ─── Main domain footer ─────────────────────────────────────────────────── */

.main-footer {
    margin-top: 4rem;
    background: var(--tenant-primary, #1a3849);
    color: rgba(255, 255, 255, 0.85);
}

.main-footer__inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2.5rem;
    padding: 3rem 0 2rem;
}

.main-footer__logo {
    width: 3rem;
    height: 3rem;
    margin-bottom: 0.75rem;
}

.main-footer__brand p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.5rem;
    max-width: 20ch;
    line-height: 1.5;
}

.main-footer__col {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.main-footer__col strong {
    color: #fff;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.25rem;
}

.main-footer__col a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.15s;
}

.main-footer__col a:hover {
    color: #fff;
}

.main-footer__bottom {
    padding: 1.25rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.main-footer__social {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.main-footer__social-link {
    color: rgba(255, 255, 255, 0.45);
    transition: color 0.15s;
    line-height: 0;
}

.main-footer__social-link:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* ─── Admin footer ───────────────────────────────────────────────────────── */

.admin-footer {
    margin-top: 3rem;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.admin-footer__support {
    padding: .75rem 0 0;
    font-size: 0.82rem;
    color: var(--muted);
    text-align: center;
}

.admin-footer__support a {
    color: var(--tenant-primary);
    text-decoration: none;
    font-weight: 500;
}

.admin-footer__support a:hover {
    text-decoration: underline;
}

.admin-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem 0;
    font-size: 0.8rem;
    color: var(--muted);
}

.admin-footer__links {
    display: flex;
    gap: 1.25rem;
}

.admin-footer__links a {
    color: var(--muted);
    text-decoration: none;
}

.admin-footer__links a:hover {
    color: var(--tenant-primary);
    text-decoration: underline;
}

.admin-footer__powered {
    color: var(--muted);
    text-decoration: none;
}

.admin-footer__powered:hover {
    color: var(--tenant-primary);
    text-decoration: underline;
}

/* ─── Guide steps ────────────────────────────────────────────────────────── */

.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.guide-step {
    display: flex;
    gap: 1.5rem;
    padding: 1.75rem 0;
    border-bottom: 1px solid var(--border);
}

.guide-step:last-child {
    border-bottom: none;
}

.guide-step__num {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--tenant-primary);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: .15rem;
}

.guide-step__body {
    flex: 1;
}

.guide-step__body h2 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 .5rem;
}

.guide-step__body p {
    margin: 0 0 .75rem;
}

.guide-step__body p:last-child {
    margin-bottom: 0;
}

.guide-step__highlight {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    background: var(--surface-alt, #f1f5f9);
    border: 1px solid var(--border);
    border-radius: .5rem;
    padding: .45rem .85rem;
    margin-bottom: .75rem;
}

.guide-step__label {
    font-size: .78rem;
    font-weight: 600;
    color: var(--muted-color);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.guide-step__url {
    font-weight: 600;
    color: var(--tenant-primary);
    font-size: .95rem;
    word-break: break-all;
}

.guide-install__platforms {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.guide-install__platform {
    display: flex;
    gap: .85rem;
    align-items: flex-start;
}

.guide-install__icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    color: var(--tenant-primary);
}

.guide-install__icon svg {
    width: 100%;
    height: 100%;
}

.guide-install__platform strong {
    display: block;
    margin-bottom: .25rem;
}

@media (max-width: 600px) {
    .guide-install__platforms {
        grid-template-columns: 1fr;
    }
}

/* Guide layout: sidebar + content */
.guide-layout {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1.5rem;
    align-items: start;
    margin-top: 1.5rem;
}

.guide-layout__sidebar {
    position: sticky;
    top: 1rem;
}

@media (max-width: 700px) {
    .guide-layout {
        grid-template-columns: 1fr;
    }

    /* En móvil: barra horizontal con scroll */
    .guide-layout__sidebar {
        position: static;
        display: flex;
        overflow-x: auto;
        gap: .4rem;
        padding: .4rem .5rem;
        background: var(--surface, #fff);
        border-radius: var(--radius, .75rem);
        box-shadow: 0 1px 3px rgba(0,0,0,.06);
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .guide-layout__sidebar::-webkit-scrollbar { display: none; }

    /* Oculta el label "GUIA D'ÚS" en móvil */
    .guide-layout__sidebar > p { display: none; }

    /* Cada enlace pasa a ser una píldora compacta */
    .guide-layout__sidebar > a {
        display: inline-flex !important;
        flex-shrink: 0;
        border-radius: 99px;
        padding: .35rem .85rem !important;
        font-size: .8rem;
        white-space: nowrap;
        border: none;
        background: transparent;
        gap: .35rem;
    }

    .guide-layout__sidebar > a.guide-nav--active {
        border-radius: 5px !important;
    }
}

/* ─── Media queries ──────────────────────────────────────────────────────── */

@media (min-width: 1024px) {
    .install-banner {
        display: none !important;
    }
}

@media (max-width: 900px) {
    .page {
        padding-top: 1rem;
    }

    .dashboard-calendar-cta--desktop {
        display: none;
    }

    .main-footer__inner {
        grid-template-columns: 1fr 1fr;
    }

    .main-footer__brand {
        grid-column: 1 / -1;
    }

    .hero,
    .grid--two,
    .grid--three,
    .grid--40-60,
    .pricing-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .stats-grid--dashboard .stat-card {
        min-height: 0;
        padding: 0.8rem 0.9rem;
    }

    .stats-grid--dashboard .stat-card span {
        font-size: 0.8rem;
        line-height: 1.2;
    }

    .stats-grid--dashboard .stat-card strong {
        margin-top: 0.2rem;
        font-size: 1.55rem;
        line-height: 1.05;
    }

    .stats-grid--dashboard .stat-card__value--compact {
        font-size: 1.15rem;
        line-height: 1.15;
    }

    .stats-grid--dashboard .stat-card__upgrade {
        margin-top: 0.3rem;
        font-size: 0.62rem;
        white-space: normal;
        line-height: 1.2;
    }

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

    .pricing-banner__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .pricing-banner__right {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .pricing-banner__right .button {
        width: 100%;
        text-align: center;
    }

    .event-card__header,
    .section-header,
    .topbar__inner,
    .tenant-chip,
    .event-row,
    .list-row {
        align-items: stretch !important;
        flex-direction: column;
    }

    .companion-add-form {
        flex-wrap: wrap;
    }

    .companion-add-form input {
        flex: 0 0 100%;
        min-width: 0;
    }

    .companion-add-form select {
        flex: 1 1 0;
        width: auto;
        min-width: 0;
    }

    .companion-add-form button {
        flex: 0 0 auto;
    }

    .section-header .quick-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .card__header:has(.table-controls) {
        flex-wrap: wrap;
    }

    .card__header .table-controls {
        width: 100%;
        flex-wrap: wrap;
    }

    .card__header .table-search {
        flex: 0 0 100%;
        width: 100%;
    }

    .card__header .table-filter {
        flex: 1;
        min-width: 0;
    }

    .section-header .quick-actions .button {
        width: 100%;
        justify-content: center;
    }

    .list-row .quick-actions {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
        width: 100%;
    }

    .list-row .quick-actions>*:first-child {
        grid-column: 1 / -1;
    }

    .list-row .quick-actions .button {
        width: 100%;
        justify-content: center;
    }

    .list-row .quick-actions>form {
        display: flex;
    }

    .list-row .quick-actions>form .button {
        flex: 1;
    }

    .event-detail-header__top {
        flex-wrap: wrap;
    }

    .event-detail-header__back {
        justify-content: center;
    }

    .event-detail-actions {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .event-detail-toolbar {
        display: grid;
        gap: 0.75rem;
        align-items: stretch;
        margin: 0 0 1rem;
    }

    .section-header--calendar {
        align-items: stretch;
    }

    .calendar-nav--floating {
        display: grid;
        grid-template-columns: 2fr 1fr 2fr;
        align-items: stretch;
        width: 100%;
        gap: 0.5rem;
        margin: 0 0 1rem;
    }

    .calendar-nav--floating .button {
        width: 100%;
        padding-inline: 0.6rem;
        min-width: 0;
    }

    .calendar-grid {
        gap: 0.35rem;
    }

    .calendar-day {
        min-height: 5.5rem;
        padding: 0.5rem;
    }

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

    .logo-editor__body {
        grid-template-columns: 1fr;
    }

    .logo-preview {
        max-width: 12rem;
    }

    .landing-hero {
        grid-template-columns: 1fr;
        padding: 2rem 0;
        gap: 2rem;
    }

    .landing-hero__visual {
        order: -1;
    }

    .landing-hero--tenant .landing-hero__copy {
        order: -1;
    }

    .landing-hero--tenant .landing-hero__visual {
        order: 0;
    }

    .landing-hero--tenant .hero__actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .landing-hero--tenant .hero__actions .button {
        width: 100%;
        min-height: 3rem;
        padding: 0.8rem 1rem;
        font-size: 0.95rem;
    }

    .app-preview {
        max-width: 280px;
    }

    .landing-how__grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 600px) {
    .hide-mobile {
        display: none;
    }
}

@media (min-width: 901px) {
    .dashboard-calendar-cta {
        display: none;
    }
}

@media (max-width: 480px) {
    .main-footer__inner {
        grid-template-columns: 1fr;
    }

    .landing-features__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1023px) {
    .topbar__inner {
        position: relative;
        align-items: center;
        flex-direction: row;
    }

    .nav {
        margin-left: auto;
    }

    .nav__toggle {
        display: inline-grid;
        place-content: center;
        flex-shrink: 0;
    }

    .nav__bell {
        display: inline-flex;
    }

    .nav__menu {
        position: absolute;
        top: calc(100% + 0.6rem);
        right: 0;
        z-index: 40;
        display: grid;
        gap: 0.4rem;
        width: min(16rem, calc(100vw - 2rem));
        padding: 0.75rem;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 12px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    }

    .nav__menu a,
    .nav__menu .button {
        width: 100%;
    }

    .nav__menu a {
        padding: 0.75rem 0.9rem;
        border-radius: 8px;
        background: transparent;
        border-bottom: none;
    }

    .nav__menu a:hover {
        background: var(--surface-soft);
        border-bottom: none;
    }

    .nav__menu a.is-active {
        background: var(--surface-soft);
        border-bottom: none;
    }

    .nav__menu .nav__logout {
        width: 100%;
    }

    .nav__menu .locale-toggle-form--menu {
        width: 100%;
        display: flex;
        justify-content: center;
        padding-bottom: 0.4rem;
        margin-bottom: 0.2rem;
        border-bottom: 1px solid var(--border);
    }

    .nav__menu .button {
        justify-content: center;
    }
}

@media (min-width: 1024px) {
    .nav__menu {
        display: flex !important;
    }

    .nav__mobile-only {
        display: none !important;
    }
}

@media (max-width: 1023px) {
    .admin-footer__soporte {
        display: none;
    }
}

.plan-gate__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    padding: 3rem 1.5rem;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.plan-gate__icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.plan-gate__icon svg {
    width: 1.75rem;
    height: 1.75rem;
}

.plan-gate__inner h2 {
    margin: 0;
    font-size: 1.15rem;
}

.plan-gate__inner p {
    margin: 0;
    color: var(--muted);
    max-width: 34ch;
}

/* ── DNS Domain modal ──────────────────────────────────────────────────── */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-panel {
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem 1rem;
    border-bottom: 1px solid var(--border);
}

.modal-panel__header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.modal-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    padding: 0.25rem;
    display: flex;
    align-items: center;
    border-radius: 0.25rem;
    transition: color 0.15s;
}

.modal-close-btn:hover {
    color: var(--text);
}

.modal-close-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

.modal-panel__body {
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.modal-panel__body>p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.dns-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dns-step {
    display: flex;
    gap: 0.875rem;
    align-items: flex-start;
}

.dns-step__num {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: var(--primary, #3b5bdb);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dns-step>div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dns-step strong {
    font-size: 0.9rem;
}

.dns-step .muted {
    font-size: 0.825rem;
    margin: 0;
}

.dns-record-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    background: #f8fafc;
    border-radius: 0.375rem;
    overflow: hidden;
}

.dns-record-table th,
.dns-record-table td {
    padding: 0.375rem 0.625rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.dns-record-table th {
    background: #f1f5f9;
    font-weight: 600;
    color: var(--muted);
}

.dns-record-table tr:last-child td {
    border-bottom: none;
}

.dns-record-table code {
    background: #e2e8f0;
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
}

/* Plan comparison grid */
@media (max-width: 700px) {
    .plan-comparison {
        grid-template-columns: 1fr !important;
    }

    .plan-col--premium {
        order: 1;
    }

    .plan-col--especial {
        order: 2;
    }

    .plan-col--pro {
        order: 3;
    }

    .plan-col--basic {
        order: 4;
    }
}

/* Email preview tooltip */
.email-preview-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--border, #d1d9e0);
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    cursor: default;
    margin-left: 5px;
    vertical-align: middle;
}

/* El tooltip se mueve al body via JS para evitar el clipping de overflow */
.email-preview-tooltip {
    display: none;
}

.email-preview-tooltip-floating {
    display: none;
    position: fixed;
    background: #1e293b;
    color: #f1f5f9;
    font-size: 0.75rem;
    line-height: 1.5;
    white-space: pre-line;
    width: 300px;
    padding: 10px 12px;
    border-radius: 6px;
    z-index: 9999;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.email-preview-tooltip-floating::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1e293b;
}

/* ─── Shop frontend layout ───────────────────────────────────────── */
.shop-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.5rem;
    align-items: flex-start;
}

.shop-sidebar {
    position: sticky;
    top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.shop-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.shop-cat-list a {
    display: block;
    padding: .45rem .75rem;
    border-radius: .375rem;
    font-size: .875rem;
    color: inherit;
    text-decoration: none;
    transition: background .12s;
}

.shop-cat-list a:hover {
    background: var(--border);
}

.shop-cat-list a.is-active {
    background: var(--tenant-primary, #1a3849);
    color: #fff;
}

@media (max-width: 1023px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }

    .shop-sidebar {
        display: none;
    }

    .nav__desktop-only {
        display: none !important;
    }
}

@media (min-width: 1024px) {
    .shop-mobile-header {
        display: none;
    }

    .nav__submenu {
        display: none !important;
    }
}

/* Nav submenu (mobile shop categories) */
.nav__submenu summary {
    padding: .75rem .9rem;
    border-radius: 8px;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: inherit;
    color: inherit;
    user-select: none;
}

.nav__submenu summary:hover {
    background: var(--surface-soft);
}

.nav__submenu summary::-webkit-details-marker {
    display: none;
}

.nav__submenu__items {
    padding: .25rem 0 .25rem .75rem;
    display: flex;
    flex-direction: column;
    gap: .1rem;
}

.nav__submenu__items a {
    font-size: .875rem !important;
    padding: .5rem .9rem !important;
    color: var(--muted) !important;
}

.nav__submenu__items a.is-active {
    color: var(--tenant-primary, #1a3849) !important;
    font-weight: 600;
    background: transparent !important;
}


/* ====================================================================
   Tareas (módulo) — kanban + slide-in panel
   ==================================================================== */

/* Stats cards (vista miembro) */
.task-summary-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
    border-radius: 10px;
    padding: .6rem 1rem;
    white-space: nowrap;
}

.task-summary-badge svg {
    width: 1.4rem;
    height: 1.4rem;
}

.task-summary-badge strong {
    font-size: 1.5rem;
    line-height: 1;
}

.task-summary-badge span {
    font-size: .85rem;
}

.task-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: .75rem;
}

.task-stat {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: .9rem 1rem;
    display: flex;
    align-items: center;
    gap: .75rem;
}

.task-stat__icon {
    width: 36px;
    height: 36px;
    border-radius: 99px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--stat-color, #64748b)20;
    color: var(--stat-color, #64748b);
}

.task-stat__icon svg {
    width: 1.2rem;
    height: 1.2rem;
}

.task-stat__label {
    color: #64748b;
    font-size: .85rem;
    font-weight: 500;
}

.task-stat__value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.1;
}

/* Filtros */
.task-filters__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: .75rem;
    align-items: end;
}

.task-filters__actions {
    display: flex;
    gap: .4rem;
    align-items: end;
}

/* Tablero kanban */
.task-board--kanban {
    display: grid;
    grid-template-columns: repeat(var(--cols, 3), minmax(260px, 1fr));
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: .5rem;
}

@media (max-width: 900px) {
    .task-board--kanban {
        grid-template-columns: repeat(var(--cols, 3), 82vw);
    }
}

.task-board__col {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-top: 3px solid var(--status-color, #94a3b8);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

.task-board__col-head {
    padding: .75rem .85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
}

.task-board__col-title {
    font-weight: 700;
    font-size: .95rem;
}

.task-board__col-count {
    background: #e2e8f0;
    color: #475569;
    padding: .1rem .5rem;
    border-radius: 99px;
    font-size: .75rem;
    font-weight: 700;
    min-width: 1.5rem;
    text-align: center;
}

.task-board__col-body {
    padding: 0 .6rem .6rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    flex: 1;
}

.task-board__add {
    text-align: center;
    color: #2563eb;
    font-size: .85rem;
    padding: .5rem;
    border-radius: 6px;
    text-decoration: none;
    border: 1px dashed transparent;
}

.task-board__add:hover {
    border-color: #cbd5e1;
    background: #fff;
}

.task-board__empty {
    text-align: center;
    padding: 1rem;
    font-size: .85rem;
    font-style: italic;
}

/* Task card */
.task-card {
    display: block;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: .75rem;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .15s ease, transform .15s ease;
}

.task-card:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, .06);
    transform: translateY(-1px);
}

.task-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.task-card__head {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: .35rem;
}

.task-card__priority-pill,
.task-card__due-pill,
.task-card__list-pill {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .72rem;
    font-weight: 600;
    padding: .15rem .45rem;
    border-radius: 4px;
}

.task-card__due-pill {
    background: #f1f5f9;
    color: #475569;
}

.task-card__due-pill.is-overdue {
    background: #fee2e2;
    color: #b91c1c;
}

.task-card__title {
    margin: 0;
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
}

.task-card__desc {
    margin: .3rem 0 0;
    font-size: .82rem;
    color: #64748b;
    line-height: 1.4;
}

.task-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .5rem;
    align-items: center;
}

.task-card__completed {
    margin-top: .35rem;
    font-size: .8rem;
    color: #16a34a;
    display: flex;
    align-items: center;
    gap: .25rem;
}

.task-card__completed::before {
    content: "✓";
    font-weight: 700;
}

.task-card__assignees-row {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    align-items: center;
    margin-top: .5rem;
}

.task-card__assignee-item {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    background: #f1f5f9;
    padding: .15rem .4rem .15rem .15rem;
    border-radius: 99px;
    font-size: .75rem;
    color: #334155;
}

.task-card__assignee-name {
    white-space: nowrap;
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-card__avatar {
    width: 22px;
    height: 22px;
    border-radius: 99px;
    background: var(--tenant-primary, #1a3849);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.task-card__avatar--more {
    background: #94a3b8;
}

.task-card__progress {
    font-size: .75rem;
    margin-top: .4rem;
}

.task-card__advance {
    margin-top: .6rem;
}

/* Tareas canceladas (sección colapsable) */
.task-cancelled summary {
    display: flex;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
    font-weight: 600;
    color: #475569;
}

.task-cancelled summary::-webkit-details-marker {
    display: none;
}

.task-cancelled summary::before {
    content: "▸";
    transition: transform .15s ease;
}

.task-cancelled details[open] summary::before {
    transform: rotate(90deg);
}

.task-cancelled__row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .75rem;
    padding: .5rem .75rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    font-size: .85rem;
}

.task-cancelled__row:hover {
    background: #f8fafc;
}

.task-cancelled__title {
    font-weight: 600;
    flex: 1;
    min-width: 200px;
}

.task-cancelled__reason {
    font-size: .8rem;
}

/* Slide-in drawer */
.task-drawer {
    position: fixed;
    inset: 0;
    z-index: 1100;
}

.task-drawer[hidden] {
    display: none;
}

.task-drawer__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .35);
    animation: fadeIn .15s ease;
}

.task-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(540px, 92vw);
    background: #fff;
    box-shadow: -8px 0 24px rgba(0, 0, 0, .12);
    display: flex;
    flex-direction: column;
    animation: slideInRight .2s ease;
    overflow: hidden;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

.task-drawer__loading {
    flex-shrink: 0;
}

.task-drawer__content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.task-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.task-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem .5rem;
    border-bottom: 1px solid #e2e8f0;
}

.task-panel__title {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.3;
    color: #0f172a;
}

.task-panel__head-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
}

.task-panel__status-pill {
    padding: .25rem .6rem;
    border-radius: 99px;
    font-size: .75rem;
    font-weight: 700;
}

.task-panel__close {
    background: transparent;
    border: 0;
    font-size: 1.6rem;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    padding: 0 .25rem;
}

.task-panel__close:hover {
    color: #0f172a;
}

.task-panel__body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
}

.task-panel__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: 1rem;
}

.task-panel__chip {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .25rem .55rem;
    border-radius: 6px;
    font-size: .78rem;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
}

.task-panel__chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 99px;
}

.task-panel__chip--danger {
    background: #fee2e2;
    color: #b91c1c;
}

.task-panel__section {
    margin-bottom: 1.25rem;
}

.task-panel__section h3 {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #64748b;
    margin: 0 0 .5rem;
    font-weight: 700;
}

.task-panel__desc {
    white-space: pre-wrap;
    line-height: 1.5;
    color: #334155;
}

.task-panel__assignees {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.task-panel__assignee {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: #f1f5f9;
    padding: .25rem .55rem .25rem .25rem;
    border-radius: 99px;
    font-size: .8rem;
}

.task-panel__statuses {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    align-items: center;
}

.task-panel__status-option {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 99px;
    padding: .3rem .65rem;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .8rem;
    color: #475569;
    cursor: pointer;
    font-weight: 500;
}

.task-panel__status-option:hover {
    background: #f8fafc;
}

.task-panel__status-option.is-active {
    background: var(--status-color, #2563eb)15;
    border-color: var(--status-color, #2563eb);
    color: var(--status-color, #2563eb);
    font-weight: 700;
}

.task-panel__status-radio {
    width: 12px;
    height: 12px;
    border-radius: 99px;
    border: 2px solid currentColor;
    display: inline-block;
}

.task-panel__status-option.is-active .task-panel__status-radio {
    background: currentColor;
}

.task-panel__status-arrow {
    color: #cbd5e1;
}

.task-panel__subtasks {
    display: block;
}

.task-panel__subtask {
    display: block;
    margin: 0;
}

.task-panel__subtask>input[type="hidden"] {
    display: none;
}

.task-panel__subtask>label {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: .5rem !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: .3rem 0 !important;
    cursor: pointer;
}

.task-panel__subtask>label>input[type="checkbox"] {
    flex: 0 0 auto !important;
    margin: 0 !important;
    width: 16px;
    height: 16px;
}

.task-panel__subtask>label>span {
    flex: 1 1 auto !important;
    min-width: 0;
    margin: 0 !important;
    font-size: .9rem !important;
    font-weight: 400 !important;
    line-height: 1.3;
}

.task-panel__subtask .is-done {
    text-decoration: line-through;
    color: #94a3b8;
}

.task-panel__subtask-add {
    display: flex;
    gap: .35rem;
    margin-top: .5rem;
}

.task-panel__subtask-add input {
    flex: 1;
}

.task-panel__comments {
    display: flex;
    flex-direction: column;
    gap: .65rem;
    margin-bottom: .5rem;
}

.task-panel__comment {
    background: #f8fafc;
    border-radius: 8px;
    padding: .6rem .75rem;
}

.task-panel__comment-head {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .8rem;
    margin-bottom: .25rem;
}

.task-panel__comment-head .muted {
    font-size: .72rem;
    margin-left: auto;
}

.task-panel__comment-body {
    font-size: .9rem;
    color: #334155;
    line-height: 1.4;
    white-space: pre-wrap;
}

.task-panel__comment-form {
    display: flex;
    gap: .35rem;
    margin-top: .5rem;
}

.task-panel__comment-form input {
    flex: 1;
}

.task-panel__cancelled {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: .75rem;
    margin-bottom: 1rem;
}

.task-panel__cancelled strong {
    display: block;
    color: #92400e;
    margin-bottom: .25rem;
}

.task-panel__cancelled p {
    margin: 0;
    color: #78350f;
    white-space: pre-wrap;
}

.task-panel__foot {
    border-top: 1px solid #e2e8f0;
    padding: .75rem 1.25rem;
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    align-items: center;
    background: #f8fafc;
}

.task-panel__cancel summary {
    list-style: none;
    cursor: pointer;
}

.task-panel__cancel summary::-webkit-details-marker {
    display: none;
}

.task-panel__cancel form {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin-top: .35rem;
}

.task-panel__cancel textarea {
    width: 100%;
}

/* Cuando el drawer está abierto, evitar scroll del body */
body.has-task-drawer {
    overflow: hidden;
}

/* Página de detalle como contenedor del panel (no drawer) */
.task-page-detail .task-panel {
    height: auto;
}

.task-page-detail .task-panel__foot {
    background: transparent;
}

/* ====================================================================
   Tareas — vista lista + toggle + actividad
   ==================================================================== */

.task-view-toggle {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-start;
    gap: .75rem;
}

/* Tabla de lista */
.task-list__table-wrap {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow-x: auto;
}

.task-list__table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}

.task-list__table thead th {
    text-align: left;
    padding: .65rem .75rem;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #94a3b8;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.task-list__row td {
    padding: .65rem .75rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.task-list__row:last-child td {
    border-bottom: 0;
}

.task-list__row.is-completed {
    opacity: .65;
}

.task-list__row.is-completed .task-list__title strong {
    text-decoration: line-through;
}

.task-list__check {
    width: 36px;
}

.task-list__checkbox {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
}

.task-list__checkbox input {
    position: absolute;
    opacity: 0;
}

.task-list__checkbox-box {
    width: 22px;
    height: 22px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    display: inline-block;
    transition: all .15s ease;
}

.task-list__checkbox:hover .task-list__checkbox-box {
    border-color: #16a34a;
}

.task-list__checkbox.is-checked .task-list__checkbox-box,
.task-list__checkbox input:checked+.task-list__checkbox-box {
    background: #16a34a;
    border-color: #16a34a;
}

.task-list__checkbox.is-checked .task-list__checkbox-box::after,
.task-list__checkbox input:checked+.task-list__checkbox-box::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.task-list__title {
    min-width: 220px;
}

.task-list__resp-short {
    display: none;
}

.task-list__title a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.task-list__title a:hover strong {
    color: var(--tenant-primary, #1a3849);
}

.task-list__title strong {
    font-weight: 600;
    color: #0f172a;
}

.task-list__title .muted {
    font-size: .78rem;
    margin-top: .15rem;
}

.task-list__assignees-col {
    min-width: 120px;
}

.task-list__assignees {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem .6rem;
}

.task-list__assignee {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .82rem;
    color: #334155;
    white-space: nowrap;
}

.task-list__assignee .task-card__avatar {
    width: 22px;
    height: 22px;
    font-size: .68rem;
}

.task-list__assignee-name {
    font-weight: 500;
}

.task-list__assignee-extra {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 .4rem;
    border-radius: 99px;
    background: #f1f5f9;
    color: #475569;
    font-size: .72rem;
    font-weight: 700;
}

.task-list__date {
    text-align: center;
    min-width: 60px;
}

.task-list__date.is-overdue {
    color: #dc2626;
}

/* Círculo indicador de estado (col 2) */
.task-list__status-cell {
    width: 28px;
    padding-left: 0;
    padding-right: 0;
    text-align: center;
}

.task-list__status-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--c, #94a3b8);
    background: transparent;
    color: #fff;
    vertical-align: middle;
}

.task-list__status-dot.is-terminal {
    background: var(--c, #16a34a);
}

.task-list__status-dot svg {
    width: 12px;
    height: 12px;
}

/* Dot + label de prioridad */
.task-list__priority {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .85rem;
    color: #334155;
    white-space: nowrap;
}

.task-list__priority-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.task-list__advance {
    white-space: nowrap;
}

.task-list__comments {
    color: #64748b;
    font-size: .8rem;
    text-align: center;
    min-width: 40px;
}

.task-list__actions {
    text-align: right;
    white-space: nowrap;
}

.task-list__footer {
    margin-top: .75rem;
    padding: .5rem .25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .75rem 1rem;
    font-size: .85rem;
    color: #64748b;
}

.task-list__legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem 1rem;
}

.task-list__legend-item {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--c, #64748b);
    font-weight: 500;
    white-space: nowrap;
}

.task-list__legend-item strong {
    font-weight: 700;
}

.task-list__legend-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--c, #64748b);
    flex: 0 0 auto;
}

.task-list__legend-total {
    color: #475569;
    white-space: nowrap;
}

.task-list__sep {
    color: #cbd5e1;
}

.task-list__updated {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: #64748b;
    white-space: nowrap;
}

.task-list__updated button {
    padding: .35rem .45rem;
    line-height: 0;
}

/* Móvil: ocultar columnas secundarias */
@media (max-width: 768px) {

    /* Ocultar Lista, Prioridad, Círculo de estado y Comentarios por clase */
    .task-list__list-col,
    .task-list__priority-col,
    .task-list__status-cell,
    .task-list__comments {
        display: none;
    }

    /* En móvil sólo se muestran los avatares; ocultamos los nombres */
    .task-list__assignee-name {
        display: none;
    }
}

@media (max-width: 600px) {

    /* Cabecera Asignados → Asig. */
    .task-list__resp-full {
        display: none;
    }

    .task-list__resp-short {
        display: inline;
    }

    /* Sin scroll horizontal */
    .task-list__table-wrap {
        overflow-x: hidden;
    }

    /* Asignados y acción se ajustan al contenido mínimo, el título toma el resto */
    .task-list__assignees-col,
    .task-list__action-col {
        width: 1%;
        white-space: nowrap;
    }

    /* Título flexible y truncado con elipsis */
    .task-list__title {
        min-width: 0;
    }

    .task-list__title a {
        display: block;
    }

    .task-list__title strong {
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Ocultar descripción dentro del título */
    .task-list__title .muted {
        display: none;
    }

    /* Padding más compacto */
    .task-list__row td,
    .task-list__table thead th {
        padding: .5rem .35rem;
    }

    /* Ocultar Fecha, Editar y Acción por clase */
    .task-list__date,
    .task-list__actions,
    .task-list__action-col {
        display: none;
    }
}

/* Actividad del sistema en el timeline de comentarios */
.task-panel__activity {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem 0 .35rem 1.5rem;
    position: relative;
    font-size: .82rem;
    color: #475569;
    border-left: 2px solid #e2e8f0;
    margin-left: .35rem;
}

.task-panel__activity-dot {
    position: absolute;
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 99px;
    background: #cbd5e1;
}

.task-panel__activity-msg {
    flex: 1;
    line-height: 1.4;
}

.task-panel__activity-msg strong {
    color: #0f172a;
    font-weight: 600;
}

.task-panel__activity-msg em {
    font-style: normal;
    font-weight: 600;
    color: #475569;
}

.task-panel__activity-time {
    font-size: .7rem;
    white-space: nowrap;
}

/* ---- Member picker (asignados / seguidores con buscador y chips) ---- */
.member-picker {
    border: 1px solid var(--border, #d1d9e0);
    border-radius: 8px;
    background: var(--surface, #fff);
    padding: .6rem .75rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.member-picker__chips {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .4rem;
    min-height: 1.6rem;
    align-items: center;
}

.member-picker__chips-empty {
    font-size: .85rem;
}

.member-picker__chip {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    background: #e0f2fe;
    color: #075985;
    border: 1px solid #bae6fd;
    border-radius: 999px;
    padding: .15rem .25rem .15rem .65rem;
    font-size: .85rem;
    line-height: 1.2;
}

.member-picker__chip button {
    background: transparent;
    border: 0;
    color: #075985;
    cursor: pointer;
    font-size: 1.05rem;
    line-height: 1;
    padding: 0 .35rem;
    border-radius: 999px;
}

.member-picker__chip button:hover {
    background: #bae6fd;
}

.member-picker__search {
    position: relative;
}

.member-picker__input {
    width: 100%;
    padding: .45rem .65rem;
    border: 1px solid var(--border, #d1d9e0);
    border-radius: 6px;
    font-size: .9rem;
    background: #fff;
}

.member-picker__input:focus {
    outline: none;
    border-color: var(--tenant-primary, #1a3849);
    box-shadow: 0 0 0 3px rgba(26, 56, 73, .08);
}

.member-picker__dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 30;
    background: #fff;
    border: 1px solid var(--border, #d1d9e0);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
    max-height: 240px;
    overflow-y: auto;
    padding: .25rem;
}

.member-picker__option {
    padding: .45rem .65rem;
    border-radius: 6px;
    font-size: .9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.member-picker__option:hover,
.member-picker__option:focus {
    background: #f1f5f9;
    outline: none;
}

.member-picker__option.is-already {
    color: #64748b;
    cursor: default;
    background: #f8fafc;
}

.member-picker__option.is-already:hover {
    background: #f8fafc;
}

.member-picker__option.is-locked {
    color: #64748b;
    cursor: not-allowed;
    background: transparent;
}

.member-picker__option.is-locked:hover {
    background: transparent;
}

.member-picker__option--empty {
    cursor: default;
    padding: .65rem;
    text-align: center;
}

.member-picker__badge-other {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    padding: .05rem .45rem;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 500;
}