.students-table__cell--entry-head {
    justify-content: flex-start;
    width: 100%;
    text-align: left;
    padding-left: 0;
}
.topbar__toggle {
    display: none;
}

@media (max-width: 1024px) {
    .topbar__toggle {
        display: inline-flex;
    }
}
.modal--small {
    width: min(420px, 92vw);
}

.modal--medium {
    width: min(520px, 94vw);
}

.modal__icon--warning {
    background: rgba(15, 82, 186, 0.12);
    color: var(--color-primary);
}

.modal__header--inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-inline: 1.75rem;
}

.modal__title-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.modal__title-inline i {
    align-self: center;
}

.modal__title-block {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.modal__subtitle {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.renewal-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal__input {
    margin: 0.75rem 0 1rem;
}

.modal__title-inline i {
    font-size: 1.4rem;
    color: var(--color-primary);
}

.modal__text--center {
    text-align: center;
}

.key-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.65rem;
    border: 1px dashed rgba(15, 82, 186, 0.25);
    border-radius: 10px;
    background: rgba(15, 82, 186, 0.05);
    margin: 0.75rem auto 1rem;
    width: fit-content;
    min-width: 220px;
}

.key-display--centered {
    justify-content: center;
}

.key-display code {
    font-family: 'Fira Code', 'Source Code Pro', monospace;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    color: var(--color-primary);
}

.key-display code {
    color: var(--color-primary);
}

body.theme-dark .key-display code {
    color: #ffffff;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin: 1rem 0;
}

.history-entry {
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    background: rgba(28, 35, 51, 0.04);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.history-entry strong {
    font-size: 0.9rem;
    color: var(--color-text);
}

.history-entry span {
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

.history-entry--renewal strong {
    color: var(--color-primary);
}

.history-entry--entrada strong {
    color: var(--color-text);
}

.history-empty {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

body.theme-dark .history-entry {
    background: rgba(17, 28, 47, 0.55);
    border-color: rgba(255, 255, 255, 0.12);
}

.list-panel__item--muted {
    opacity: 0.6;
}

body.theme-dark .list-panel__item--muted {
    opacity: 0.5;
}

.list-panel__grid--costs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.costs__main {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1 1 220px;
}

.costs__amount {
    min-width: 120px;
    text-align: right;
    flex: 0 0 auto;
}

.costs__amount .caption {
    font-weight: 600;
}

.costs__actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.costs__actions .tag {
    font-size: 0.7rem;
}

.pill-button--danger {
    background: #e53935;
    color: #fff;
}

.pill-button--danger:hover {
    background: #c62828;
}

.theme-dark .pill-button--danger {
    background: #f87171;
    color: #0b1321;
}

.theme-dark .pill-button--danger:hover {
    background: #f44336;
    color: #0b1321;
}

.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(15, 82, 186, 0.25);
    transition: 0.2s;
    border-radius: 999px;
}

.slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: #ffffff;
    transition: 0.2s;
}

.switch input:checked + .slider {
    background: var(--color-primary);
}

.switch input:checked + .slider::before {
    transform: translateX(22px);
}

.history-actions {
    display: flex;
    gap: 0.45rem;
    align-items: center;
}

.modal__info {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-align: center;
    margin: 0 0 0.75rem;
}
:root {
    --color-background: #f5f7fb;
    --color-surface: #ffffff;
    --color-border: #e0e6f0;
    --color-border-strong: #c7d2e3;
    --color-text: #1c2333;
    --color-text-muted: #5a6478;
    --color-primary: #0f52ba; /* Azul Capri */
    --color-primary-soft: rgba(15, 82, 186, 0.12);
    --color-success: #1b998b;
    --color-info: #2978ff;
    --sidebar-width: 280px;
    --radius-large: 16px;
    --radius-medium: 12px;
    --radius-small: 8px;
    --shadow-soft: 0 20px 45px rgba(14, 32, 80, 0.08);
    font-size: 16px;
}

body.theme-dark {
    --color-background: #0b1220;
    --color-surface: #111c2f;
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-strong: rgba(255, 255, 255, 0.16);
    --color-text: #edf2ff;
    --color-text-muted: #96a0c2;
    --color-primary-soft: rgba(93, 135, 255, 0.18);
    --shadow-soft: 0 20px 45px rgba(9, 13, 26, 0.35);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--color-background);
    color: var(--color-text);
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: 100vh;
}

.sidebar {
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow: hidden;
}

.sidebar__brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand__logo {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.brand__details {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    color: var(--color-text-muted);
}

.sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1 1 auto;
    overflow-y: auto;
    padding-right: 0.25rem;
    scrollbar-width: thin;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-medium);
    color: var(--color-text-muted);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link--disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    position: relative;
}

.nav-link--disabled:hover {
    background: transparent;
    transform: none;
}

.nav-link__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
    padding: 0.25rem 0.5rem;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-small);
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.nav-link__badge i {
    font-size: 0.65rem;
}

body.theme-dark .nav-link__badge {
    background: rgba(93, 135, 255, 0.25);
    border-color: rgba(93, 135, 255, 0.5);
    color: #a8c4ff;
}

.nav-link i {
    font-size: 1.25rem;
}

.nav-link:hover {
    background: var(--color-primary-soft);
    color: var(--color-primary);
    transform: translateX(4px);
}

.nav-link:hover i,
.nav-link.is-active i {
    color: inherit;
}

body.theme-dark .nav-link {
    color: rgba(230, 236, 255, 0.75);
}

body.theme-dark .nav-link:hover,
body.theme-dark .nav-link.is-active {
    color: #ffffff;
    background: rgba(93, 135, 255, 0.22);
}

body.theme-dark .nav-link:hover i,
body.theme-dark .nav-link.is-active i,
body.theme-dark .nav-link:hover span,
body.theme-dark .nav-link.is-active span {
    color: #ffffff;
}

.sidebar__footer {
    margin-top: 1.5rem;
    padding: 1.75rem 0 1rem;
    border-top: 1px solid var(--color-border);
}

body.theme-dark .sidebar__footer {
    border-color: rgba(255, 255, 255, 0.12);
}

.sidebar__profile {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem 0 0;
    border-top: 1px solid var(--color-border);
    position: relative;
}

body.theme-dark .sidebar__profile {
    border-color: rgba(255, 255, 255, 0.12);
}

.user-chip--sidebar {
    position: relative;
    align-items: center;
    gap: 0.9rem;
    cursor: pointer;
    min-height: 70px;
    padding: 0.75rem 0.9rem;
}

.user-chip--sidebar strong {
    font-size: 0.95rem;
}

.user-chip--sidebar span,
.user-chip--sidebar small {
    font-size: 0.72rem;
}

.user-chip--sidebar small {
    color: var(--color-text-muted);
}

.user-chip__caret {
    font-size: 1rem;
    transition: transform 0.2s ease;
    color: var(--color-text-muted);
}

.user-chip.is-open .user-chip__caret {
    transform: rotate(180deg);
}

.sidebar__profile-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
}

.sidebar__action-button {
    width: 100%;
    aspect-ratio: auto;
    min-height: 40px;
    padding: 0.45rem 0.6rem;
    border-radius: var(--radius-medium);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    text-align: center;
    font: inherit;
    color: inherit;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.sidebar__action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 22px rgba(15, 82, 186, 0.18);
    border-color: rgba(15, 82, 186, 0.35);
}

.sidebar__action-button:active {
    transform: translateY(0);
    box-shadow: none;
}

.sidebar__action-icon {
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar__action-label {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.sidebar__action-label strong {
    font-size: 0.68rem;
    font-weight: 600;
}

.sidebar__action-button--theme {
    border-color: rgba(15, 82, 186, 0.28);
    background: rgba(15, 82, 186, 0.08);
}

.sidebar__action-button--logout {
    border-color: rgba(214, 40, 57, 0.25);
    background: rgba(214, 40, 57, 0.08);
}

.sidebar__action-button--logout:hover {
    border-color: rgba(214, 40, 57, 0.45);
    box-shadow: 0 12px 24px rgba(214, 40, 57, 0.18);
}

.sidebar__action-form {
    width: 100%;
}

body.theme-dark .sidebar__action-button {
    background: rgba(17, 28, 47, 0.85);
    border-color: rgba(255, 255, 255, 0.08);
    color: #eef1ff;
}

body.theme-dark .sidebar__action-button:hover {
    border-color: rgba(114, 144, 255, 0.5);
    box-shadow: 0 12px 22px rgba(34, 64, 156, 0.25);
}

body.theme-dark .sidebar__action-button--theme {
    background: rgba(114, 144, 255, 0.15);
    border-color: rgba(114, 144, 255, 0.4);
}

body.theme-dark .sidebar__action-button--logout {
    background: rgba(214, 40, 57, 0.2);
    border-color: rgba(255, 130, 145, 0.5);
}

body.theme-dark .sidebar__action-button--logout:hover {
    box-shadow: 0 12px 24px rgba(255, 120, 140, 0.25);
}

.auth-body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top right, #1a65d8 0%, #0b1220 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1c2333;
    position: relative;
    overflow: hidden;
}

.auth-body::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.auth-shell {
    width: min(440px, 92vw);
    z-index: 1;
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 
        0 20px 40px -10px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    backdrop-filter: blur(10px);
}

.auth-card__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.auth-card__logo {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, #0f52ba 0%, #0a3a85 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    box-shadow: 0 10px 20px -5px rgba(15, 82, 186, 0.4);
    margin-bottom: 0.5rem;
}

.auth-card__header div {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.auth-card__header h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #111827;
}

.auth-card__header p {
    margin: 0;
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.5;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.access-key-card {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 0;
    border: none;
    background: transparent;
    margin: 0;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding-right: 2.5rem; /* Space for icon */
}

.input-wrapper__icon {
    position: absolute;
    right: 1rem;
    color: #9ca3af;
    font-size: 1.1rem;
    pointer-events: none;
    transition: color 0.2s;
}

.input-wrapper__toggle {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    padding: 0.25rem;
    color: #9ca3af;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.2s, background-color 0.2s;
}

.input-wrapper__toggle:hover {
    color: #4b5563;
    background-color: rgba(0, 0, 0, 0.05);
}

.input-field:focus-within .input-wrapper__icon {
    color: var(--color-primary);
}

.access-key-card .input-field input {
    padding: 0.75rem 1rem;
    padding-right: 2.5rem;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.access-key-card .input-field input:focus {
    background: #ffffff;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(15, 82, 186, 0.1);
    outline: none;
}

.access-key-submit {
    margin-top: 0.5rem;
    width: 100%;
    justify-content: center;
    padding: 0.85rem;
    font-size: 1rem;
    border-radius: 12px;
    background: var(--color-primary);
    transition: all 0.2s ease;
}

.access-key-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 82, 186, 0.25);
}

.access-key-submit:active {
    transform: translateY(0);
}

.auth-card__footer {
    font-size: 0.85rem;
    color: #6b7280;
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #f3f4f6;
}

.auth-card__footer a {
    color: var(--color-primary);
    font-weight: 500;
    text-decoration: none;
}

.auth-card__footer a:hover {
    text-decoration: underline;
}

.clerk-signin-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.clerk-signin-inner {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.clerk-signin-placeholder {
    width: 100%;
}

@media (max-width: 520px) {
    .auth-card {
        padding: 2rem 1.75rem;
    }
}

.theme-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-medium);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.theme-toggle:hover {
    border-color: var(--color-border-strong);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.theme-toggle__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.theme-toggle__label {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    color: var(--color-text-muted);
    text-align: left;
}

.theme-toggle__label strong {
    color: var(--color-text);
    font-weight: 600;
}

.theme-toggle__label small {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

body.theme-dark .theme-toggle__label small {
    color: rgba(237, 242, 255, 0.65);
}

.theme-toggle--compact .theme-toggle__label {
    text-align: left;
}

.theme-toggle--compact .theme-toggle__label strong {
    font-size: 0.85rem;
}

.theme-toggle--compact .theme-toggle__label small {
    font-size: 0.7rem;
}

.nav-link.is-active {
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.app-shell__main {
    display: flex;
    flex-direction: column;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
    gap: 1.5rem;
}

.topbar__context h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.context__role {
    display: block;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.topbar__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.icon-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.icon-button--danger {
    background: rgba(214, 40, 57, 0.12);
    color: #d62839;
}

.icon-button--danger:hover {
    box-shadow: 0 12px 26px rgba(214, 40, 57, 0.25);
}

body.theme-dark .icon-button--danger {
    background: rgba(214, 40, 57, 0.22);
    color: #ff8b98;
}

.pill-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.4rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 600;
}

.pill-button--primary {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 8px 18px rgba(15, 82, 186, 0.2);
}

.pill-button--primary:hover {
    box-shadow: 0 12px 26px rgba(15, 82, 186, 0.25);
}

.pill-button--danger {
    background: #d62839;
    color: #fff;
    box-shadow: 0 8px 18px rgba(214, 40, 57, 0.24);
}

.pill-button--danger:hover {
    box-shadow: 0 12px 26px rgba(214, 40, 57, 0.32);
}

.pill-button--ghost {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    box-shadow: none;
}

.pill-button--ghost:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

body.theme-dark .pill-button--ghost {
    border-color: var(--color-border-strong);
    color: var(--color-text);
    background: rgba(17, 28, 47, 0.45);
}

body.theme-dark .pill-button--ghost:hover {
    border-color: rgba(93, 135, 255, 0.7);
    color: #a8c4ff;
}

.inline-form {
    display: inline;
}

.key-token {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.6rem;
    min-height: 2rem;
    border-radius: var(--radius-medium);
    border: 1px dashed var(--color-primary);
    color: var(--color-primary);
    background: rgba(15, 82, 186, 0.08);
    font-weight: 600;
    font-size: 0.78rem;
    line-height: 1.2;
}

.key-token__value {
    display: inline-flex;
    align-items: center;
    letter-spacing: 0.04em;
}

.key-token__copy {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
}

.key-token__copy:hover,
.key-token__copy:focus-visible {
    background: rgba(15, 82, 186, 0.15);
    color: var(--color-primary-strong);
    outline: none;
}

body.theme-dark .key-token {
    border-color: rgba(93, 135, 255, 0.6);
    color: #9eb9ff;
    background: rgba(93, 135, 255, 0.18);
}

body.theme-dark .key-token__copy:hover,
body.theme-dark .key-token__copy:focus-visible {
    background: rgba(93, 135, 255, 0.25);
    color: #c8d6ff;
}

.toast-stack {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    z-index: 2500;
    pointer-events: none;
}

.copy-toast {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.05rem;
    border-radius: var(--radius-medium);
    background: var(--color-primary);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(15, 82, 186, 0.25);
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: auto;
}

.copy-toast--error {
    background: var(--color-danger);
    box-shadow: 0 10px 25px rgba(208, 85, 98, 0.25);
}

.copy-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius-medium);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
}

.user-chip__avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-chip__details {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.app-shell__content {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.alert {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.2rem;
    border-radius: var(--radius-medium);
    border: 1px solid;
    font-weight: 500;
}

.alert--success {
    border-color: rgba(27, 153, 139, 0.3);
    background: rgba(27, 153, 139, 0.08);
    color: #0f6b60;
}

.alert--info {
    border-color: rgba(15, 82, 186, 0.3);
    background: rgba(15, 82, 186, 0.08);
    color: #0f52ba;
}

.alert--danger {
    border-color: rgba(214, 40, 57, 0.3);
    background: rgba(214, 40, 57, 0.08);
    color: #a32333;
}

body.theme-dark .alert--success {
    border-color: rgba(27, 153, 139, 0.4);
    background: rgba(27, 153, 139, 0.16);
    color: #5ae3d1;
}

body.theme-dark .alert--info {
    border-color: rgba(93, 135, 255, 0.4);
    background: rgba(93, 135, 255, 0.16);
    color: #9eb9ff;
}

body.theme-dark .alert--danger {
    border-color: rgba(214, 40, 57, 0.45);
    background: rgba(214, 40, 57, 0.2);
    color: #ff7a8b;
}

.section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.section__header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.link-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--color-primary);
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.link-button:hover {
    opacity: 0.7;
}

.metric-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.metric-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-large);
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
}

body.theme-dark .metric-card {
    background: rgba(17, 28, 47, 0.85);
    border-color: var(--color-border-strong);
}

.metric-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.metric-card__label {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.metric-card__value {
    display: block;
    font-size: 1.4rem;
    margin: 0.25rem 0;
}

.metric-card__meta {
    font-size: 0.85rem;
    color: var(--color-success);
}

body.theme-dark .metric-card__meta {
    color: #7ac7ff;
}

body.theme-dark .list-panel__item,
body.theme-dark .form-card,
body.theme-dark .user-chip,
body.theme-dark .theme-toggle {
    background: rgba(17, 28, 47, 0.92);
    border-color: var(--color-border-strong);
}

body.theme-dark .user-chip__avatar {
    background: rgba(93, 135, 255, 0.19);
}

body.theme-dark .tag--info {
    background: rgba(93, 135, 255, 0.2);
    color: #a8c4ff;
}

.list-panel {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.list-panel__item {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-large);
    padding: 1rem 1.2rem;
    background: var(--color-surface);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.list-panel__item:hover {
    border-color: var(--color-border-strong);
    transform: translateY(-2px);
}

.list-panel__actions--stacked {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.list-panel__actions-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}

.list-panel__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(120px, 0.9fr) minmax(100px, 0.8fr) auto;
    gap: 0.75rem;
    align-items: center;
}

.list-panel__grid--with-description {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto;
}

.caption {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
}

.tag--info {
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 4rem;
    color: var(--color-text-muted);
}

.placeholder i {
    font-size: 2.4rem;
    color: var(--color-primary);
}

.form-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-large);
    padding: 1.5rem;
    background: var(--color-surface);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-card--compact {
    padding: 1.25rem;
    gap: 0.9rem;
    border-radius: 18px;
}

.form-card__actions {
    display: flex;
    justify-content: flex-end;
}

.form-card--compact {
    padding: 1.25rem;
    gap: 0.9rem;
    border-radius: 18px;
}

.grid-two {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid-three {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.compact-grid {
    display: grid;
    gap: 0.85rem;
}

.compact-grid--three {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.compact-grid--two {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.compact-grid {
    display: grid;
    gap: 0.85rem;
}

.compact-grid--three {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.compact-grid--two {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.input-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.input-field--compact {
    gap: 0.3rem;
}

.input-field__label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
}

.input-field__label i {
    font-size: 1.05rem;
    color: var(--color-primary);
}

.input-field input,
.input-field select,
.input-field textarea {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-medium);
    padding: 0.65rem 0.8rem;
    font: inherit;
    background: rgba(255, 255, 255, 0.9);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-field--compact {
    gap: 0.3rem;
}

.input-field__label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
}

.input-field__label i {
    font-size: 1.05rem;
    color: var(--color-primary);
}

.input-field--compact input,
.input-field--compact select,
.input-field--compact textarea {
    padding: 0.55rem 0.7rem;
    font-size: 0.86rem;
}

.input-field--textarea textarea {
    min-height: 120px;
}

.input-field--compact input,
.input-field--compact select,
.input-field--compact textarea {
    padding: 0.55rem 0.7rem;
    font-size: 0.86rem;
}

body.theme-dark .input-field input,
body.theme-dark .input-field select,
body.theme-dark .input-field textarea {
    background: rgba(8, 13, 26, 0.7);
    border-color: var(--color-border);
    color: inherit;
}

.input-field input::placeholder,
.input-field select::placeholder,
.input-field textarea::placeholder {
    color: rgba(28, 35, 51, 0.5);
}

body.theme-dark .input-field input::placeholder,
body.theme-dark .input-field select::placeholder,
body.theme-dark .input-field textarea::placeholder {
    color: rgba(237, 242, 255, 0.55);
}

.input-field input:focus,
.input-field select:focus,
.input-field textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(15, 82, 186, 0.15);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.9rem;
    margin-bottom: 1.15rem;
}

.filter-bar__field {
    min-width: 200px;
}

.filter-bar__field--short {
    min-width: 140px;
}

.filter-bar__actions {
    display: flex;
    gap: 0.6rem;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.pagination__summary {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.pagination__controls {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.pagination__button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-medium);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    font-size: 0.85rem;
    font-weight: 600;
    color: inherit;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.pagination__button:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.pagination__button.is-active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.status-pill--active {
    background: rgba(31, 180, 135, 0.16);
    color: #0c3a34;
}

.status-pill--inactive {
    background: rgba(214, 40, 57, 0.14);
    color: #8f2733;
}

body.theme-dark .filter-bar__actions .pill-button--ghost:hover {
    color: var(--color-primary);
}

body.theme-dark .pagination__button {
    background: rgba(17, 28, 47, 0.9);
    border-color: rgba(255, 255, 255, 0.12);
    color: #e6ecff;
}

body.theme-dark .pagination__button:hover {
    border-color: rgba(114, 144, 255, 0.5);
    color: #a8c4ff;
}

body.theme-dark .pagination__button.is-active {
    background: rgba(114, 144, 255, 0.95);
    border-color: rgba(114, 144, 255, 1);
    color: #050915;
}

body.theme-dark .status-pill--active {
    background: rgba(53, 240, 200, 0.28);
    color: #cbfff3;
}

body.theme-dark .status-pill--inactive {
    background: rgba(214, 40, 57, 0.24);
    color: #ffb3c0;
}

.list-panel__item--compact {
    padding: 0.85rem 1rem;
}

.student-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}

.student-row--compact {
    gap: 0.55rem;
}

.student-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    color: var(--color-text-muted);
    padding: 0.25rem 0.45rem;
    border-radius: var(--radius-medium);
    background: rgba(28, 35, 51, 0.05);
}

.student-cell i {
    font-size: 1rem;
    color: var(--color-primary);
}

.student-cell--name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    background: transparent;
    padding: 0;
}

.student-cell--status {
    background: transparent;
    padding: 0;
}

.student-cell--highlight {
    font-weight: 600;
    color: var(--color-primary);
    background: rgba(15, 82, 186, 0.12);
}

.student-cell--actions {
    background: transparent;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.icon-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 82, 186, 0.25);
    background: rgba(15, 82, 186, 0.08);
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--color-primary);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.icon-chip--wide {
    min-width: 116px;
    justify-content: center;
}

.icon-chip--compact {
    padding: 0.28rem 0.45rem;
    min-width: auto;
}

.icon-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(15, 82, 186, 0.15);
}

.icon-chip--wide {
    min-width: 116px;
    justify-content: center;
}

.icon-chip--ghost {
    background: transparent;
}

body.theme-dark .icon-chip,
body.theme-dark .icon-chip--ghost {
    color: #ffffff;
    border-color: rgba(114, 144, 255, 0.35);
    background: rgba(114, 144, 255, 0.12);
}

body.theme-dark .icon-chip--ghost {
    background: transparent;
}

.icon-chip--icon-only {
    padding: 0.28rem;
    min-width: auto;
}

.icon-chip--icon-only i {
    font-size: 0.9rem;
}

body.theme-dark .icon-chip i,
body.theme-dark .icon-chip--ghost i {
    color: #ffffff;
}

.key-token--compact {
    font-size: 0.76rem;
    padding: 0.25rem 0.45rem;
}

@media (max-width: 720px) {
    .student-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.45rem;
    }

    .student-cell--actions {
        flex-wrap: wrap;
    }
}

.students-table {
    border: 1px solid var(--color-border);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.students-table__row {
    display: grid;
    grid-template-columns: 1.9fr 1.1fr 0.9fr 0.9fr 0.9fr 0.9fr 1.25fr;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.95rem;
    background: var(--color-surface);
}

.students-table__row:nth-child(even) {
    background: rgba(28, 35, 51, 0.03);
}

.students-table__row--head {
    background: rgba(15, 82, 186, 0.08);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.students-table__cell {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.25rem;
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

.students-table__cell--name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    justify-content: flex-start;
}

.students-table__cell--contact {
    padding-right: 1.3rem;
}

.students-table__cell--contact span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.students-table__cell i {
    font-size: 1rem;
    color: var(--color-primary);
}

.students-table__cell--highlight {
    font-weight: 600;
    color: var(--color-primary);
    justify-content: center;
}

.students-table__cell--entry,
.students-table__cell--highlight,
.students-table__cell--discord,
.students-table__cell--status {
    padding-left: 0;
    width: 100%;
    justify-content: center;
}

.students-table__row--head .students-table__cell {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.students-table__row--head .students-table__cell--discord,
.students-table__row--head .students-table__cell--status {
    justify-content: flex-start;
    width: auto;
    text-align: left;
    padding-left: 0;
    margin-left: 0rem;
}

.students-table__row--head .students-table__cell--entry {
    justify-content: flex-start;
    width: auto;
    text-align: left;
    padding-left: 0;
    margin-left: -1.25rem;
}

.students-table__row--head .students-table__cell--highlight {
    justify-content: flex-start;
    width: auto;
    text-align: left;
    padding-left: 0;
    margin-left: 1.05rem;
}

.students-table__row--head .students-table__cell--discord {
    justify-content: flex-start;
    width: auto;
    text-align: left;
    padding-left: 0;
    margin-left: -5.8rem;
}

.students-table__row--head .students-table__cell--contact {
    padding-right: 1.3rem;
}

.students-table__cell--actions {
    justify-content: flex-end;
    gap: 0.35rem;
}

.students-table__row--head .students-table__cell--actions {
    justify-content: flex-end;
    width: auto;
    text-align: right;
    padding-left: 0;
    transform: translateX(-7.5rem);
}

.students-table__cell--discord {
    justify-content: center;
    justify-self: center;
    text-align: center;
    grid-column-gap: 0.5rem;
}

.students-table__cell--discord::before {
    content: '';
}

.students-table__cell--discord span {
    text-transform: capitalize;
}

.students-table__cell--status {
    justify-content: center;
}

body.theme-dark .students-table {
    border-color: rgba(255, 255, 255, 0.1);
}

body.theme-dark .students-table__row {
    background: rgba(17, 28, 47, 0.92);
}

body.theme-dark .students-table__row:nth-child(even) {
    background: rgba(17, 28, 47, 0.82);
}

body.theme-dark .students-table__row--head {
    background: rgba(93, 135, 255, 0.18);
    color: #b3c7ff;
}

body.theme-dark .students-table__cell--highlight {
    color: #ffffff;
    font-weight: 700;
}

body.theme-dark .students-table__cell--highlight i {
    color: var(--color-primary);
}

@media (max-width: 1024px) {
    .students-table__row {
        grid-template-columns: 1.7fr 1.05fr 0.85fr 0.85fr 0.85fr 0.85fr 1.1fr;
        padding: 0.5rem 0.65rem;
        gap: 0.3rem;
    }
}

@media (max-width: 820px) {
    .students-table__row {
        grid-template-columns: 1.4fr 1fr 0.9fr 0.9fr 0.9fr 1fr;
        grid-template-rows: auto auto;
    }

    .students-table__cell--actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

body.theme-dark .input-field input:focus,
body.theme-dark .input-field select:focus,
body.theme-dark .input-field textarea:focus {
    box-shadow: 0 0 0 3px rgba(93, 135, 255, 0.25);
}

.section__actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.item-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.item-toggle-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin: 1rem 0 0;
}

.input-field--items .input-help {
    display: block;
    text-align: center;
}

.item-toggle {
    position: relative;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    border: 2px solid rgba(28, 35, 51, 0.32) !important;
    background: var(--color-surface);
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.item-toggle:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary);
    box-shadow: 0 10px 25px rgba(15, 82, 186, 0.12);
}

.item-toggle.is-active {
    border-color: #1fb487 !important;
    background: rgba(31, 180, 135, 0.18);
    color: #0c3a34;
}

.item-toggle.is-active::after {
    content: "✕";
    font-size: 0.85rem;
    color: inherit;
    opacity: 0.85;
    margin-left: 0.35rem;
}

body.theme-dark .item-toggle {
    background: rgba(17, 28, 47, 0.9);
    border-color: rgba(255, 255, 255, 0.35) !important;
    color: var(--color-text);
}

body.theme-dark .item-toggle:hover {
    border-color: var(--color-primary);
    box-shadow: 0 10px 25px rgba(93, 135, 255, 0.18);
}

body.theme-dark .item-toggle.is-active {
    border-color: #35f0c8 !important;
    background: rgba(53, 240, 200, 0.24);
    color: #d0fffa;
}

.input-field--items .input-help {
    text-align: center;
}

.hidden {
    display: none !important;
}

.modal__overlay {
    position: fixed;
    inset: 0;
    background: rgba(12, 18, 32, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    backdrop-filter: blur(6px);
    z-index: 120;
}

body.theme-dark .modal__overlay {
    background: rgba(4, 7, 14, 0.65);
}

.modal {
    background: var(--color-surface);
    border-radius: var(--radius-large);
    width: min(520px, 100%);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-border);
    max-height: calc(100vh - 4rem);
}

body.theme-dark .modal {
    background: rgba(17, 28, 47, 0.95);
    border-color: var(--color-border-strong);
}

.modal--confirm {
    width: min(420px, 100%);
}

.modal__header {
    padding: 1.5rem 1.75rem 1rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.modal__title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.modal__body {
    padding: 1.75rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.modal__actions {
    padding: 1.25rem 1.75rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.modal__close {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    transition: transform 0.2s ease;
}

.modal__close:hover {
    transform: translateY(-2px);
}


.input-field textarea {
    resize: vertical;
}

.input-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

@media (max-width: 1080px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(80%, 280px);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 100;
        box-shadow: var(--shadow-soft);
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .app-shell__main {
        margin-left: 0;
    }

    .topbar {
        position: sticky;
        top: 0;
        z-index: 90;
    }

    .list-panel__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "info tag"
            "meta actions";
    }
}

@media (max-width: 720px) {
    .topbar__actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .metric-list {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .list-panel__grid {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .list-panel__actions {
        justify-self: flex-end;
    }
}

/* Logs page styles */
.filters-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-large);
}

body.theme-dark .filters-form {
    background: rgba(17, 28, 47, 0.92);
    border-color: var(--color-border-strong);
}

.filters-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.log-details {
    margin-top: 0.5rem;
}

.log-payload {
    margin: 0.5rem 0 0;
    padding: 0.75rem;
    background: rgba(15, 82, 186, 0.05);
    border: 1px solid rgba(15, 82, 186, 0.15);
    border-radius: var(--radius-medium);
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
    color: var(--color-text);
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

body.theme-dark .log-payload {
    background: rgba(93, 135, 255, 0.12);
    border-color: rgba(93, 135, 255, 0.25);
    color: #e0e7ff;
}

.log-details summary {
    user-select: none;
    outline: none;
}

.log-details summary:hover {
    text-decoration: underline;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1rem;
}

.pagination__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-medium);
    background: var(--color-surface);
    color: var(--color-text);
    transition: all 0.2s ease;
}

.pagination__link:hover {
    background: var(--color-primary-soft);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

body.theme-dark .pagination__link {
    background: rgba(17, 28, 47, 0.92);
    border-color: var(--color-border-strong);
}

body.theme-dark .pagination__link:hover {
    background: rgba(93, 135, 255, 0.22);
    border-color: rgba(93, 135, 255, 0.4);
}

.pagination__info {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* Settings page styles - ERP Layout */
.settings-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.settings-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.settings-group {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-large);
    background: var(--color-surface);
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.settings-group:hover {
    box-shadow: 0 4px 12px rgba(15, 82, 186, 0.08);
    border-color: rgba(15, 82, 186, 0.2);
}

body.theme-dark .settings-group {
    background: rgba(17, 28, 47, 0.92);
    border-color: var(--color-border-strong);
}

body.theme-dark .settings-group:hover {
    box-shadow: 0 4px 12px rgba(93, 135, 255, 0.12);
    border-color: rgba(93, 135, 255, 0.3);
}

.settings-group__header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-border);
    background: rgba(15, 82, 186, 0.03);
}

body.theme-dark .settings-group__header {
    background: rgba(93, 135, 255, 0.08);
    border-color: var(--color-border-strong);
}

.settings-group__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(15, 82, 186, 0.12);
    color: var(--color-primary);
    flex-shrink: 0;
}

.settings-group__icon i {
    font-size: 1.5rem;
}

body.theme-dark .settings-group__icon {
    background: rgba(93, 135, 255, 0.2);
    color: #9eb9ff;
}

.settings-group__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.settings-group__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.3;
}

.settings-group__subtitle {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}

.settings-group__body {
    padding: 1.5rem;
}

.settings-group__fields {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 600px;
}

.settings-group__actions {
    display: flex;
    justify-content: flex-start;
    padding-top: 1.5rem;
    margin-top: 1rem;
    border-top: 1px solid var(--color-border);
}

body.theme-dark .settings-group__actions {
    border-color: var(--color-border-strong);
}

@media (max-width: 720px) {
    .settings-group__header {
        padding: 1.25rem;
    }

    .settings-group__icon {
        width: 40px;
        height: 40px;
    }

    .settings-group__icon i {
        font-size: 1.25rem;
    }

    .settings-group__body {
        padding: 1.25rem;
    }

    .settings-group__fields {
        max-width: 100%;
    }
}

/* Groups page styles - Table Layout */
.filter-bar {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-large);
    flex-wrap: wrap;
}

body.theme-dark .filter-bar {
    background: rgba(17, 28, 47, 0.92);
    border-color: var(--color-border-strong);
}

.filter-bar__field {
    flex: 1;
    min-width: 200px;
}

.filter-bar__field--short {
    min-width: 150px;
    flex: 0 0 auto;
}

.filter-bar__actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.groups-table {
    border: 1px solid var(--color-border);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.groups-table__row {
    display: grid;
    grid-template-columns: 2fr 0.9fr 1fr 1.8fr 1.2fr 1.5fr;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.95rem;
    background: var(--color-surface);
}

.groups-table__row:nth-child(even) {
    background: rgba(28, 35, 51, 0.03);
}

.groups-table__row--head {
    background: rgba(15, 82, 186, 0.08);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.groups-table__cell {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.25rem;
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

.groups-table__cell--name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    justify-content: flex-start;
}

.groups-table__cell--number {
    font-size: 0.85rem;
}

.groups-table__cell--status {
    justify-content: center;
}

.groups-table__cell--items {
    font-size: 0.85rem;
}

.groups-table__cell--mrr {
    font-weight: 600;
    justify-content: center;
}

.groups-table__cell--highlight {
    color: var(--color-primary);
    font-weight: 600;
}

.groups-table__cell--actions {
    justify-content: flex-end;
    gap: 0.35rem;
}

.groups-table__cell i {
    font-size: 1rem;
    color: var(--color-primary);
}

.groups-table__row--head .groups-table__cell {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.groups-table__row--head .groups-table__cell--status,
.groups-table__row--head .groups-table__cell--mrr {
    justify-content: center;
}

.groups-table__row--head .groups-table__cell--actions {
    justify-content: flex-end;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-chip i {
    font-size: 0.5rem;
}

.status-chip--active {
    background: rgba(31, 180, 135, 0.15);
    color: #0c3a34;
}

.status-chip--paused {
    background: rgba(255, 193, 7, 0.15);
    color: #856404;
}

.status-chip--inactive {
    background: rgba(214, 40, 57, 0.15);
    color: #721c24;
}

body.theme-dark .groups-table {
    border-color: rgba(255, 255, 255, 0.1);
}

body.theme-dark .groups-table__row {
    background: rgba(17, 28, 47, 0.92);
}

body.theme-dark .groups-table__row:nth-child(even) {
    background: rgba(17, 28, 47, 0.82);
}

body.theme-dark .groups-table__row--head {
    background: rgba(93, 135, 255, 0.18);
    color: #b3c7ff;
}

body.theme-dark .groups-table__cell--highlight {
    color: #ffffff;
    font-weight: 700;
}

body.theme-dark .groups-table__cell--highlight i {
    color: var(--color-primary);
}

body.theme-dark .status-chip--active {
    background: rgba(53, 240, 200, 0.2);
    color: #d0fffa;
}

body.theme-dark .status-chip--paused {
    background: rgba(255, 193, 7, 0.2);
    color: #ffd700;
}

body.theme-dark .status-chip--inactive {
    background: rgba(214, 40, 57, 0.2);
    color: #ff7a8b;
}

@media (max-width: 1024px) {
    .groups-table__row {
        grid-template-columns: 1.8fr 0.8fr 0.9fr 1.6fr 1.1fr 1.3fr;
        padding: 0.5rem 0.65rem;
        gap: 0.3rem;
    }
}

@media (max-width: 720px) {
    .filter-bar {
        flex-direction: column;
    }

    .filter-bar__field {
        width: 100%;
        min-width: 100%;
    }

    .groups-table__row {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 0.5rem;
    }

    .groups-table__cell--actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
        padding-top: 0.5rem;
        border-top: 1px solid var(--color-border);
    }
}

/* Users page styles - Table Layout */
.users-table {
    border: 1px solid var(--color-border);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.users-table__row {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.2fr 2fr 1.8fr;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.95rem;
    background: var(--color-surface);
}

.users-table__row:nth-child(even) {
    background: rgba(28, 35, 51, 0.03);
}

.users-table__row--head {
    background: rgba(15, 82, 186, 0.08);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.users-table__cell {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.25rem;
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

.users-table__cell--name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    justify-content: flex-start;
}

.users-table__cell--username {
    font-size: 0.85rem;
}

.users-table__cell--role {
    justify-content: center;
}

.users-table__cell--groups {
    font-size: 0.85rem;
}

.users-table__cell--actions {
    justify-content: flex-end;
    gap: 0.35rem;
}

.users-table__cell i {
    font-size: 1rem;
    color: var(--color-primary);
}

.users-table__row--head .users-table__cell {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.users-table__row--head .users-table__cell--role {
    justify-content: center;
}

.users-table__row--head .users-table__cell--actions {
    justify-content: flex-end;
}

body.theme-dark .users-table {
    border-color: rgba(255, 255, 255, 0.1);
}

body.theme-dark .users-table__row {
    background: rgba(17, 28, 47, 0.92);
}

body.theme-dark .users-table__row:nth-child(even) {
    background: rgba(17, 28, 47, 0.82);
}

body.theme-dark .users-table__row--head {
    background: rgba(93, 135, 255, 0.18);
    color: #b3c7ff;
}

@media (max-width: 1024px) {
    .users-table__row {
        grid-template-columns: 1.8fr 1.3fr 1fr 1.6fr 1.5fr;
        padding: 0.5rem 0.65rem;
        gap: 0.3rem;
    }
}

@media (max-width: 720px) {
    .users-table__row {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 0.5rem;
    }

    .users-table__cell--actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
        padding-top: 0.5rem;
        border-top: 1px solid var(--color-border);
    }
}

