:root {
    --color-primary: #dff18e;
    --color-secondary: #6256ca;
    --color-text: #4a4a4a;
    --color-surface: #fafafa;
    --color-surface-strong: #ffffff;
    --color-border: rgba(74, 74, 74, 0.12);
    --color-border-strong: rgba(98, 86, 202, 0.2);
    --color-muted: #6d6d6d;
    --color-shadow: rgba(53, 44, 120, 0.12);
    --color-shadow-strong: rgba(53, 44, 120, 0.2);
    --radius-sm: 9px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --sidebar-width: 19rem;
    --content-max: 1320px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body,
button,
input,
select,
textarea,
label,
a,
p,
span,
small,
li,
td,
th,
div {
    font-family: "Quicksand", sans-serif;
    font-weight: 400;
}

body {
    margin: 0;
    color: var(--color-text);
    background:
        radial-gradient(circle at top left, rgba(223, 241, 142, 0.65), transparent 28%),
        radial-gradient(circle at top right, rgba(98, 86, 202, 0.18), transparent 24%),
        linear-gradient(180deg, #fefef9 0%, #f6f7ff 48%, #fafafa 100%);
}

.w3-content.app-body {
    max-width: none !important;
}

h1,
h2,
.w3-xxxlarge,
.w3-xxlarge,
.w3-xlarge,
.page-title,
.page-heading,
.hero-title {
    margin: 0;
    font-family: "Quicksand", sans-serif;
    font-weight: 700;
    letter-spacing: -0.03em;
}

h3,
h4,
h5,
h6,
.w3-large,
.w3-wide,
.subtitle,
.subtitulo,
.section-title,
.card-title {
    font-family: "Quicksand", sans-serif;
    font-weight: 500;
}

strong,
b {
    font-weight: 700;
}

a {
    color: inherit;
}

.app-shell {
    min-height: 100vh;
}

.app-sidebar {
    z-index: 5;
    width: var(--sidebar-width);
    border-right: 1px solid rgba(250, 250, 250, 0.08);
    background: #6256ca;
    color: #fafafa;
    box-shadow: 0 28px 60px rgba(40, 33, 93, 0.28);
}

.app-sidebar__inner {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.25rem;
}

.app-sidebar__brand {
    position: relative;
    display: grid;
    gap: 1rem;
    padding: 1.35rem;
    border: 1px solid rgba(74, 74, 74, 0.08);
    border-radius: var(--radius-md);
    background: #ffffff;
    backdrop-filter: blur(18px);
}

.app-sidebar__close {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    border-radius: 999px;
    color: #fafafa;
}

.app-sidebar__logo-wrap {
    display: flex;
    justify-content: center;
}

.app-sidebar__logo {
    width: min(9rem, 100%);
    max-height: 4.25rem;
    object-fit: contain;
}

.app-sidebar__brand-copy {
    display: grid;
    gap: 0.35rem;
    text-align: left;
}

.app-sidebar__eyebrow {
    color: rgba(74, 74, 74, 0.72);
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.app-sidebar__program {
    color: #4a4a4a;
    font-size: 1.02rem;
    line-height: 1.35;
}

.app-user-chip {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.85rem;
    align-items: center;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(250, 250, 250, 0.14);
    border-radius: var(--radius-md);
    background: rgba(250, 250, 250, 0.08);
}

.app-user-chip__avatar {
    display: inline-flex;
    width: 2.7rem;
    height: 2.7rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--color-primary), #f6ffce);
    color: var(--color-secondary);
    font-weight: 700;
    text-transform: uppercase;
}

.app-user-chip__label {
    display: block;
    color: rgba(250, 250, 250, 0.68);
    font-size: 0.78rem;
}

.app-user-chip__name {
    color: #fafafa;
    font-size: 0.96rem;
}

.app-user-chip__role {
    display: block;
    margin-top: 0.08rem;
    color: rgba(250, 250, 250, 0.68);
    font-size: 0.78rem;
    font-weight: 500;
}

.app-sidebar__section,
.app-sidebar__footer {
    display: grid;
    gap: 0.45rem;
}

.app-sidebar__section {
    flex: 1;
}

.app-nav-link,
.app-nav-sublink {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 2.8rem;
    padding: 0.9rem 1rem;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #fafafa;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.app-nav-link:hover,
.app-nav-link:focus,
.app-nav-sublink:hover,
.app-nav-sublink:focus {
    background: rgba(250, 250, 250, 0.11);
    border-color: rgba(250, 250, 250, 0.16);
    color: #fafafa !important;
    transform: translateX(2px);
}

.app-nav-link--toggle i {
    font-size: 0.9rem;
}

.app-nav-submenu {
    margin-top: 0.45rem;
    display: grid;
    gap: 0.12rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.app-nav-sublink {
    min-height: 2.45rem;
    padding-left: 1rem;
    border-top: 1px solid rgba(98, 86, 202, 0.22);
    border-color: rgba(98, 86, 202, 0.08);
    background: rgba(144, 130, 225, 0.42);
    border-radius: 0;
    color: #f6f4ff;
    font-size: 0.92rem;
}

.app-nav-submenu .app-nav-sublink:first-child {
    border-top: 1px solid rgba(98, 86, 202, 0.22);
}

.app-nav-sublink:hover,
.app-nav-sublink:focus {
    background: rgba(177, 166, 243, 0.5);
    border-color: rgba(250, 250, 250, 0.2);
}

.app-mobile-topbar {
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 4.9rem;
    border-bottom: 1px solid rgba(74, 74, 74, 0.08);
    background: rgba(250, 250, 250, 0.92);
    backdrop-filter: blur(18px);
}

.app-mobile-topbar__brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex: 1;
    min-width: 0;
}

.app-mobile-topbar__brand > div {
    min-width: 0;
}

.app-mobile-topbar__brand strong,
.app-mobile-topbar__brand small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-mobile-topbar__brand strong {
    display: block;
}

.app-mobile-topbar__brand small {
    display: block;
    color: var(--color-muted);
}

.app-mobile-topbar__logo {
    display: block;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: #ffffff;
    border: 1px solid rgba(53, 115, 87, 0.12);
}

.app-mobile-topbar__trigger {
    display: inline-flex;
    width: 3rem;
    height: 3rem;
    margin-right: 0.85rem;
    margin-left: auto;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: transparent;
    color: var(--color-secondary);
    box-shadow: none;
}

.app-mobile-topbar__trigger:hover,
.app-mobile-topbar__trigger:focus {
    background: transparent;
    color: var(--color-secondary) !important;
}

.app-mobile-topbar__trigger i {
    font-size: 1.25rem;
    font-weight: 700;
}

.app-overlay {
    cursor: pointer;
    background: rgba(27, 24, 52, 0.42);
    backdrop-filter: blur(4px);
}

.app-main-shell {
    min-height: 100vh;
    padding-left: var(--sidebar-width);
}

.app-main {
    margin-left: 0 !important;
    padding: 1.5rem;
}

.app-mobile-spacer {
    margin-top: 5.8rem;
}

.app-page-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    width: min(100%, var(--content-max));
    margin: 0 auto 1.35rem;
    padding: 2rem 2.2rem;
    border: 1px solid rgba(250, 250, 250, 0.6);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at top left, rgba(223, 241, 142, 0.58), transparent 34%),
        linear-gradient(135deg, rgba(250, 250, 250, 0.96), rgba(245, 246, 255, 0.94));
    box-shadow: 0 26px 70px var(--color-shadow);
}

.app-page-header__copy {
    display: grid;
    gap: 0.35rem;
}

.app-page-eyebrow {
    color: var(--color-secondary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.app-page-title {
    font-size: clamp(1.6rem, 2.4vw, 2.35rem);
    line-height: 1.03;
    color: #2f2959;
}

.app-page-subtitle {
    margin: 0;
    max-width: 48rem;
    color: var(--color-muted);
    font-size: 1rem;
}

.app-page-header__meta {
    display: flex;
    justify-content: flex-end;
}

.app-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(98, 86, 202, 0.12);
    border-radius: 12px;
    background: rgba(250, 250, 250, 0.78);
    color: var(--color-secondary);
    font-weight: 500;
}

.app-content {
    width: min(100%, var(--content-max));
    margin: 0 auto;
    padding-bottom: 3rem;
}

.app-dashboard,
.app-list-stack,
.app-form-page,
.app-events-page {
    display: grid;
    gap: 1rem;
}

.app-dashboard-card,
.app-form-card,
.app-filter-card,
.app-list-card {
    padding: 1.25rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: rgba(250, 250, 250, 0.88);
    box-shadow: 0 18px 40px rgba(58, 51, 111, 0.08);
}

.app-dashboard-link,
.app-list-link {
    display: block;
    text-decoration: none;
}

.app-list-card {
    min-height: 4.4rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.app-list-link:hover .app-list-card,
.app-dashboard-link:hover .app-dashboard-card {
    transform: translateY(-1px);
    border-color: rgba(98, 86, 202, 0.22);
    box-shadow: 0 22px 44px rgba(58, 51, 111, 0.12);
}

.app-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.9rem;
}

.app-metric-card {
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 248, 255, 0.88));
}

.app-metric-card small {
    display: block;
    font-size: 0.84rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.app-metric-card strong {
    display: block;
    line-height: 1.15;
}

.app-metric-card--violet {
    border-color: rgba(98, 86, 202, 0.16);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 243, 255, 0.9));
}

.app-metric-card--slate {
    border-color: rgba(74, 74, 74, 0.12);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 247, 252, 0.9));
}

.app-metric-card--lime {
    border-color: rgba(223, 241, 142, 0.64);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 252, 235, 0.94));
}

.app-metric-card--sand {
    border-color: rgba(223, 190, 142, 0.34);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 248, 239, 0.94));
}

.app-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.app-empty-state {
    padding: 1.3rem 1.35rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: rgba(250, 250, 250, 0.92);
    box-shadow: 0 18px 40px rgba(58, 51, 111, 0.08);
    color: var(--color-text);
}

.app-empty-state__message {
    margin: 0;
}

.app-empty-state__link {
    display: inline-block;
    margin-top: 0.55rem;
    color: var(--color-secondary);
    text-decoration: none;
    font-weight: 500;
}

.app-hero-card {
    display: grid;
    gap: 1rem;
    padding: 1.35rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    background:
        radial-gradient(circle at top left, rgba(223, 241, 142, 0.3), transparent 32%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(242, 244, 255, 0.9));
    box-shadow: 0 18px 40px rgba(58, 51, 111, 0.08);
}

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

.app-hero-card__title {
    margin: 0;
    color: #2f2959;
    font-size: 1.3rem;
}

.app-hero-card__meta {
    display: grid;
    gap: 0.3rem;
    min-width: 220px;
}

.app-hero-card__meta small {
    display: block;
    font-size: 0.78rem;
}

.app-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.8rem;
}

.app-action-card {
    display: flex;
    min-height: 4.2rem;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.05rem;
    border: 1px solid rgba(98, 86, 202, 0.14);
    border-radius: 12px;
    background: rgba(250, 250, 250, 0.84);
    color: var(--color-text);
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.app-action-card:hover {
    transform: translateY(-1px);
    border-color: rgba(98, 86, 202, 0.24);
    box-shadow: 0 18px 34px rgba(58, 51, 111, 0.12);
}

.app-action-card__icon {
    display: inline-flex;
    width: 2.6rem;
    height: 2.6rem;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(98, 86, 202, 0.16);
    color: var(--color-secondary);
}

.app-action-card__text {
    display: grid;
    gap: 0.15rem;
}

.app-action-card__text strong {
    color: #2f2959;
    font-size: 0.96rem;
}

.app-action-card__text small {
    font-size: 0.75rem;
}

.app-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.85rem;
}

.app-detail-item {
    min-width: 0;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(74, 74, 74, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.78);
}

.app-detail-item--wide {
    grid-column: 1 / -1;
}

.app-detail-item--full-line {
    grid-column: 1 / -1;
}

.app-detail-item small {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.76rem;
}

.app-detail-item strong,
.app-detail-item span,
.app-detail-item a {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.app-detail-item:not(.app-detail-item--wide) strong,
.app-detail-item:not(.app-detail-item--wide) span,
.app-detail-item:not(.app-detail-item--wide) a {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-detail-item--wide strong,
.app-detail-item--wide span,
.app-detail-item--wide a {
    white-space: normal;
}

.app-detail-item--full-line strong,
.app-detail-item--full-line span,
.app-detail-item--full-line a {
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: normal;
}

.app-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.8rem;
}

.app-stat-tile {
    padding: 0.95rem 1rem;
    border: 1px solid rgba(74, 74, 74, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.82);
}

.app-stat-tile small {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.76rem;
    line-height: 1.2;
}

.app-stat-tile strong {
    display: block;
    font-size: 1.05rem;
    line-height: 1.15;
}

.app-section-stack {
    display: grid;
    gap: 0.8rem;
}

.app-compact-card {
    display: grid;
    gap: 0.45rem;
    padding: 1rem;
    border: 1px solid rgba(74, 74, 74, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.82);
}

.app-compact-card__row {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 0.85rem;
    align-items: start;
}

.app-compact-card__title {
    margin: 0;
    color: #2f2959;
    font-size: 1rem;
}

.app-compact-card__meta {
    display: grid;
    gap: 0.2rem;
}

.app-compact-card__meta small {
    font-size: 0.76rem;
}

.app-inline-link {
    color: var(--color-secondary);
    text-decoration: none;
    font-weight: 500;
}

.app-inline-link .material-symbols-outlined {
    font-size: 1rem;
    vertical-align: text-bottom;
}

.app-content > div[style*="width: 98%"] {
    width: 100% !important;
}

.app-content > div > div[style*="border: 1px"],
.app-content > div > a > div[style*="border: 1px"] {
    border-color: var(--color-border) !important;
    border-radius: var(--radius-md) !important;
    background: rgba(250, 250, 250, 0.92) !important;
    box-shadow: 0 18px 40px rgba(58, 51, 111, 0.08);
}

.app-content > div > a {
    display: block;
    text-decoration: none !important;
}

.app-content > div > a > div[style*="display: flex"] {
    min-height: 4.3rem;
    padding: 1rem 1.15rem !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.app-content > div > a:hover > div[style*="display: flex"] {
    transform: translateY(-1px);
    border-color: rgba(98, 86, 202, 0.24) !important;
    box-shadow: 0 22px 44px rgba(58, 51, 111, 0.12);
}

form {
    display: grid;
    gap: 0.95rem;
}

small {
    display: inline-block;
    color: var(--color-muted);
    font-weight: 500;
}

input,
select,
textarea {
    width: 100%;
    min-height: 3.2rem;
    border: 1px solid var(--color-border-strong) !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.96);
    color: var(--color-text);
    padding: 0.95rem 1rem !important;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
    appearance: none;
}

textarea {
    min-height: 8rem;
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: #9a9a9a;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(98, 86, 202, 0.45) !important;
    box-shadow: 0 0 0 5px rgba(98, 86, 202, 0.12);
    transform: translateY(-1px);
}

input[type="submit"],
button,
.app-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.2rem;
    border: 1px solid transparent !important;
    border-radius: 10px !important;
    padding: 0.95rem 1.2rem !important;
    background: linear-gradient(135deg, #6256ca, #4d42b4) !important;
    color: #fafafa !important;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: none;
    box-shadow: 0 16px 30px rgba(98, 86, 202, 0.2);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

input[type="submit"]:hover,
button:hover,
.app-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.02);
    box-shadow: 0 20px 36px rgba(98, 86, 202, 0.24);
}

.app-button--secondary,
a[style*="background-color: #fff"][style*="color: #357357"] {
    border-color: rgba(98, 86, 202, 0.18) !important;
    background: rgba(250, 250, 250, 0.92) !important;
    color: var(--color-secondary) !important;
    box-shadow: none;
}

.app-choice-list {
    display: grid;
    gap: 0.75rem;
}

.app-choice {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 0.9rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.88);
}

.app-choice__input {
    width: 1.05rem !important;
    min-width: 1.05rem;
    height: 1.05rem;
    margin: 0.15rem 0 0;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    box-shadow: none !important;
    transform: none !important;
    appearance: auto !important;
    accent-color: var(--color-secondary);
    background: transparent !important;
    flex: 0 0 auto;
}

.app-choice__input[type="checkbox"] {
    border-radius: 0.28rem !important;
}

.app-choice__body {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
    flex: 1 1 auto;
}

.app-choice__title {
    font-weight: 500;
    color: #2f2959;
    line-height: 1.35;
}

.app-choice__hint {
    color: var(--color-muted);
    font-size: 0.84rem;
    line-height: 1.35;
}

table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.86);
}

th,
td {
    padding: 0.95rem 1rem;
    border-bottom: 1px solid rgba(74, 74, 74, 0.08);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--color-secondary);
    font-weight: 700;
    background: rgba(98, 86, 202, 0.06);
}

tr:last-child td {
    border-bottom: 0;
}

.accordion {
    margin-bottom: 1rem;
    border: 1px solid var(--color-border) !important;
    border-radius: 14px;
    background: rgba(250, 250, 250, 0.92);
    overflow: hidden;
    box-shadow: 0 16px 36px rgba(58, 51, 111, 0.08);
}

.accordion-toggle {
    display: none;
}

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
    background:
        linear-gradient(180deg, rgba(250, 250, 250, 0.98), rgba(245, 246, 255, 0.96));
    cursor: pointer;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 1.25rem;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.accordion-content > div[style*="border: 1px #4a4a4a solid"] {
    margin-top: 0.85rem !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.accordion-arrow {
    transition: transform 0.3s ease;
}

.accordion-toggle:checked + .accordion-header + .accordion-content {
    max-height: 1200px;
    padding: 0 1.25rem 1.25rem;
}

.accordion-toggle:checked + .accordion-header .accordion-arrow {
    transform: rotate(180deg);
}

/* CHECKBOX SWITCH */
.switch {
    position: relative;
    display: inline-block;
    width: 54px;
    height: 30px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    border-radius: 999px;
    background-color: rgba(74, 74, 74, 0.34);
    transition: 0.25s ease;
}

.slider::before {
    position: absolute;
    bottom: 4px;
    left: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    content: "";
    transition: 0.25s ease;
}

.switch input:checked + .slider {
    background: linear-gradient(135deg, var(--color-secondary), #4d42b4);
}

.switch input:checked + .slider::before {
    transform: translateX(24px);
}

/* POPUP */
.popupOverlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(27, 24, 52, 0.48);
    backdrop-filter: blur(6px);
}

.popupContenido {
    position: relative;
    width: min(92vw, 560px);
    padding: 1.5rem;
    border: 1px solid rgba(250, 250, 250, 0.6);
    border-radius: 16px;
    background: rgba(250, 250, 250, 0.96);
    box-shadow: 0 24px 60px rgba(34, 31, 68, 0.2);
}

.cerrarPopup {
    position: absolute;
    top: 0.8rem;
    right: 0.9rem;
    border: 0;
    background: transparent !important;
    color: var(--color-muted) !important;
    box-shadow: none !important;
    font-size: 1.2rem;
    cursor: pointer;
}

.app-login {
    min-height: 100vh;
    padding: 2rem;
    display: grid;
    place-items: center;
}

.app-login__shell {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 460px);
    gap: 1.5rem;
    width: min(1120px, 100%);
    align-items: stretch;
}

.app-login__hero,
.app-login__card {
    border: 1px solid rgba(250, 250, 250, 0.7);
    border-radius: 20px;
    background: rgba(250, 250, 250, 0.92);
    box-shadow: 0 26px 70px var(--color-shadow);
}

.app-login__hero {
    position: relative;
    overflow: hidden;
    padding: 2.2rem;
    background:
        radial-gradient(circle at top left, rgba(223, 241, 142, 0.85), transparent 32%),
        radial-gradient(circle at bottom right, rgba(98, 86, 202, 0.16), transparent 34%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(245, 247, 255, 0.92));
}

.app-login__badge {
    display: inline-flex;
    margin-bottom: 1.25rem;
    padding: 0.5rem 0.8rem;
    border: 1px solid rgba(98, 86, 202, 0.12);
    border-radius: 999px;
    background: rgba(250, 250, 250, 0.76);
    color: var(--color-secondary);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-login__hero h1 {
    max-width: 11ch;
    color: #2f2959;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 0.96;
}

.app-login__hero p {
    max-width: 40rem;
    color: var(--color-muted);
    font-size: 1.02rem;
    line-height: 1.7;
}

.app-login__highlights {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.app-login__highlight {
    padding: 1rem;
    border: 1px solid rgba(74, 74, 74, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
}

.app-login__highlight strong {
    display: block;
    margin-bottom: 0.35rem;
    color: #2f2959;
}

.app-login__card {
    padding: 2rem;
}

.app-login__logo {
    width: min(11rem, 100%);
    margin-bottom: 1.15rem;
}

.app-login__card h2 {
    margin: 0 0 0.4rem;
    color: #2f2959;
    font-size: 2rem;
}

.app-login__card p {
    margin: 0 0 1.5rem;
    color: var(--color-muted);
}

.app-login__alert {
    margin-bottom: 1rem;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(98, 86, 202, 0.14);
    border-radius: 18px;
    background: rgba(98, 86, 202, 0.08);
    color: #3f3785;
    font-weight: 500;
}

.app-login__footer {
    margin-top: 1rem;
    color: var(--color-muted);
    font-size: 0.92rem;
    text-align: center;
}

@media (max-width: 1100px) {
    .app-login__shell {
        grid-template-columns: 1fr;
    }

    .app-login__hero h1 {
        max-width: none;
    }
}

@media (max-width: 992px) {
    .app-main-shell {
        padding-left: 0;
    }

    .app-main {
        padding: 1rem;
    }

    .app-page-header {
        padding: 1.4rem;
        border-radius: 16px;
    }
}

@media (max-width: 720px) {
    .app-metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.7rem;
    }

    .app-metric-card {
        padding: 0.85rem;
    }

    .app-metric-card small {
        font-size: 0.76rem;
    }

    .app-metric-card strong {
        font-size: 1rem !important;
    }

    .app-page-header {
        align-items: start;
        flex-direction: column;
    }

    .app-page-title {
        font-size: 1.75rem;
    }

    .app-login {
        padding: 1rem;
    }

    .app-login__hero,
    .app-login__card {
        padding: 1.35rem;
        border-radius: 18px;
    }

    .app-login__highlights {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .app-metric-card {
        padding: 0.8rem;
    }

    .app-metric-card small {
        font-size: 0.72rem;
    }

    .app-metric-card strong {
        font-size: 0.96rem !important;
    }

    .app-main {
        padding: 0.85rem;
    }

    .app-page-header {
        padding: 1.2rem;
    }

    .app-content > div > div[style*="border: 1px"],
    .app-content > div > a > div[style*="border: 1px"] {
        padding: 1rem !important;
        border-radius: 14px !important;
    }
}
