/* ==========================================================================
   Panel DAMKA — estilos (rediseño 2026-10-26, ver docs/PANEL-ADMIN.md)
   Estructura del portal de EverDesk + tokens del sitio público (base.css).
   ========================================================================== */

:root {
    color-scheme: light;

    /* Marca (mismos valores que public_html/assets/css/base.css) */
    --brand-950: #082630;
    --brand-900: #0b2f3a;
    --brand-800: #124857;
    --accent-700: #0b6574;
    --accent-600: #0b7285;
    --accent-200: #a5f3fc;
    --accent-050: #e6f3f5;

    /* Superficies y texto */
    --bg: #f4f7f7;
    --bg-2: #eaf0f1;
    --surface: #ffffff;
    --text: #172126;
    --text-2: #4b5b62;
    --border: #cad5d8;
    --border-soft: #e1e8ea;
    --border-field: #7f9298;

    /* Semánticos: texto / fondo / borde */
    --ok-text: #1e6b3c;
    --ok-bg: #e8f6ee;
    --ok-border: #b5dfc5;
    --warn-text: #7a5a00;
    --warn-bg: #fff4d6;
    --warn-border: #f0d68a;
    --danger: #b42318;
    --danger-hover: #912018;
    --danger-text: #9b1c1c;
    --danger-bg: #fdecec;
    --danger-border: #f3b9b9;
    --info-text: var(--accent-700);
    --info-bg: var(--accent-050);
    --info-border: #b8dde3;

    --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --radius: 8px;
    --radius-lg: 12px;
    --radius-pill: 999px;
    --control: 44px;
    --control-sm: 32px;
    --topbar-h: 60px;
    --nav-w: 220px;

    --shadow-overlay: 0 8px 32px rgba(8, 38, 48, 0.2);
    --shadow-drawer: 6px 0 28px rgba(8, 38, 48, 0.18);
    --focus: 3px solid var(--accent-600);
}

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

html {
    -webkit-text-size-adjust: 100%;
    /* Reserva el lugar de la barra de scroll: al bloquear el fondo con un
       diálogo abierto el contenido no se corre de lugar. */
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
}

a {
    color: var(--accent-700);
}

a:hover {
    color: var(--brand-800);
}

:focus-visible {
    outline: var(--focus);
    outline-offset: 2px;
}

img {
    max-width: 100%;
}

code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--bg-2);
    padding: 0.05em 0.35em;
    border-radius: 4px;
}

[hidden] {
    display: none !important;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.muted {
    color: var(--text-2);
}

.mono {
    font-family: var(--font-mono);
    font-size: 13px;
}

/* ==========================================================================
   Shell: barra superior + navegación + contenido
   ========================================================================== */

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 14px;
    height: var(--topbar-h);
    padding: 0 32px;
    background: var(--brand-900);
    color: #fff;
}

.topbar__brand {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    color: #fff;
    text-decoration: none;
}

.topbar__brand:hover {
    color: #fff;
}

.topbar__wordmark {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.topbar__product {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-200);
}

.topbar__end {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
}

.topbar__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #d6e6ea;
    font-size: 14px;
    text-decoration: none;
}

.topbar__link:hover {
    color: #fff;
}

.topbar__link svg {
    width: 16px;
    height: 16px;
}

.topbar__menu-button {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    margin-left: -8px;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.topbar__menu-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-menu {
    position: relative;
}

.user-menu > summary {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    padding: 0 12px 0 4px;
    border-radius: var(--radius-pill);
    list-style: none;
    cursor: pointer;
    color: #fff;
    font-size: 14px;
}

.user-menu > summary::-webkit-details-marker {
    display: none;
}

.user-menu > summary:hover,
.user-menu[open] > summary {
    background: rgba(255, 255, 255, 0.1);
}

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: none;
    border-radius: 50%;
    background: var(--accent-200);
    color: var(--brand-950);
    font-size: 13px;
    font-weight: 700;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar--lg {
    width: 40px;
    height: 40px;
    font-size: 15px;
}

.user-menu__panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 300px;
    padding: 8px 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-overlay);
}

.user-menu__who {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px 12px;
    border-bottom: 1px solid var(--border-soft);
}

.user-menu__who strong {
    display: block;
    font-size: 14px;
}

.user-menu__who span {
    display: block;
    font-size: 13px;
    color: var(--text-2);
    overflow-wrap: anywhere;
}

.user-menu__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    color: var(--text);
    font-size: 14px;
    text-decoration: none;
}

.user-menu__item:hover {
    background: var(--bg);
    color: var(--text);
}

.user-menu__item svg {
    width: 18px;
    height: 18px;
    color: var(--text-2);
}

.body {
    display: flex;
    gap: 28px;
    padding: 32px 32px 56px;
}

.nav {
    position: sticky;
    top: calc(var(--topbar-h) + 32px);
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: var(--nav-w);
    flex: none;
}

.nav__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius);
    color: var(--text-2);
    font-size: 15px;
    text-decoration: none;
}

.nav__link svg {
    width: 20px;
    height: 20px;
    flex: none;
}

.nav__link:hover {
    background: var(--bg-2);
    color: var(--text);
}

.nav__link[aria-current="page"] {
    background: var(--accent-050);
    color: var(--accent-700);
    font-weight: 600;
}

.nav__count {
    margin-left: auto;
    min-width: 22px;
    padding: 0 7px;
    border-radius: var(--radius-pill);
    background: var(--warn-bg);
    color: var(--warn-text);
    font-size: 12px;
    font-weight: 600;
    line-height: 22px;
    text-align: center;
}

.backdrop {
    position: fixed;
    inset: var(--topbar-h) 0 0 0;
    z-index: 30;
    background: rgba(8, 38, 48, 0.4);
}

.content {
    flex: 1;
    min-width: 0;
}

/* ==========================================================================
   Encabezado de página
   ========================================================================== */

.page-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 24px;
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
    color: var(--text-2);
}

.crumbs li + li::before {
    content: "/";
    margin-right: 6px;
    color: var(--border-field);
}

.crumbs a {
    color: var(--text-2);
}

.page-header__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.page-header h1 {
    margin: 0;
    font-size: 24px;
    line-height: 32px;
    font-weight: 600;
}

.page-header__title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.page-header__desc {
    max-width: 720px;
    margin: 0;
    color: var(--text-2);
    font-size: 14px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.eyebrow {
    display: inline-block;
    color: var(--accent-700);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ==========================================================================
   Botones
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--control);
    padding: 0 16px;
    border: 1px solid var(--accent-700);
    border-radius: var(--radius);
    background: var(--accent-700);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
    background: var(--brand-800);
    border-color: var(--brand-800);
    color: #fff;
}

.btn svg {
    width: 18px;
    height: 18px;
    flex: none;
}

.btn--secondary {
    background: var(--surface);
    color: var(--accent-700);
}

.btn--secondary:hover {
    background: var(--accent-050);
    border-color: var(--accent-700);
    color: var(--brand-800);
}

.btn--ghost {
    border-color: transparent;
    background: transparent;
    color: var(--text-2);
}

.btn--ghost:hover {
    border-color: transparent;
    background: var(--bg-2);
    color: var(--text);
}

.btn--danger {
    border-color: var(--danger);
    background: var(--danger);
}

.btn--danger:hover {
    border-color: var(--danger-hover);
    background: var(--danger-hover);
}

.btn--danger-ghost {
    border-color: transparent;
    background: transparent;
    color: var(--danger);
}

.btn--danger-ghost:hover {
    border-color: transparent;
    background: var(--danger-bg);
    color: var(--danger-hover);
}

.btn--sm {
    min-height: var(--control-sm);
    padding: 0 10px;
    font-size: 13px;
    gap: 6px;
}

.btn--sm svg {
    width: 16px;
    height: 16px;
}

.btn--icon {
    width: var(--control-sm);
    padding: 0;
}

.btn:disabled,
.btn[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.inline-form {
    display: inline;
    margin: 0;
}

/* ==========================================================================
   Tarjetas, KPI y datos
   ========================================================================== */

.card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    margin-bottom: 20px;
}

.card__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-soft);
}

.card__title {
    margin: 0;
    font-size: 16px;
    line-height: 24px;
    font-weight: 600;
}

.card__body {
    padding: 20px;
}

.card__body > :first-child {
    margin-top: 0;
}

.card__body > :last-child {
    margin-bottom: 0;
}

.card__footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid var(--border-soft);
    background: var(--bg);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.kpi {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
}

a.kpi:hover {
    border-color: var(--accent-700);
    background: var(--accent-050);
    color: var(--text);
}

.kpi__label {
    color: var(--text-2);
    font-size: 14px;
    font-weight: 500;
}

.kpi__value {
    font-size: 32px;
    line-height: 40px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.kpi__hint {
    color: var(--text-2);
    font-size: 13px;
}

.kpi--attention {
    border-color: var(--warn-border);
    background: var(--warn-bg);
}

.kpi--attention .kpi__label,
.kpi--attention .kpi__hint {
    color: var(--warn-text);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
    gap: 0 20px;
}

.data {
    display: grid;
    grid-template-columns: minmax(110px, max-content) 1fr;
    gap: 6px 16px;
    margin: 0;
    font-size: 14px;
}

.data dt {
    color: var(--text-2);
}

.data dd {
    margin: 0;
    overflow-wrap: anywhere;
}

/* ==========================================================================
   Tablas
   ========================================================================== */

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    margin-bottom: 20px;
}

.card .table-wrap {
    border: 0;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    margin: 0;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-2);
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
}

.table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-soft);
    vertical-align: middle;
}

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

.table tbody tr:hover td {
    background: #f8fbfb;
}

.table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.table .col-actions {
    width: 1%;
    white-space: nowrap;
    text-align: right;
}

.cell-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.cell-title {
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
}

a.cell-title:hover {
    color: var(--accent-700);
    text-decoration: underline;
}

.cell-sub {
    display: block;
    margin-top: 2px;
    color: var(--text-2);
    font-size: 13px;
}

.thumb {
    width: 44px;
    height: 44px;
    flex: none;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    background: #fff;
    object-fit: contain;
}

.thumb--empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    color: var(--border-field);
}

.thumb--empty svg {
    width: 20px;
    height: 20px;
}

tr.is-inactive .cell-title,
tr.is-inactive .thumb {
    opacity: 0.55;
}

.row-actions {
    display: inline-flex;
    gap: 4px;
    justify-content: flex-end;
}

/* ==========================================================================
   Pastillas de estado
   ========================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
    padding: 0 10px;
    border-radius: var(--radius-pill);
    background: var(--bg-2);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.8;
}

.badge--ok {
    background: var(--ok-bg);
    color: var(--ok-text);
}

.badge--warn {
    background: var(--warn-bg);
    color: var(--warn-text);
}

.badge--danger {
    background: var(--danger-bg);
    color: var(--danger-text);
}

.badge--info {
    background: var(--info-bg);
    color: var(--info-text);
}

a.badge {
    text-decoration: none;
}

a.badge:hover {
    text-decoration: underline;
}

button.badge {
    border: 0;
    font-family: inherit;
    cursor: pointer;
}

button.badge:hover {
    filter: brightness(0.96);
    text-decoration: underline;
}

/* ==========================================================================
   Pestañas y filtros
   ========================================================================== */

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin: 0 0 20px;
    border-bottom: 1px solid var(--border);
}

.tabs__tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: var(--control);
    padding: 0 14px;
    margin-bottom: -1px;
    border: 0;
    border-bottom: 3px solid transparent;
    background: none;
    color: var(--text-2);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

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

.tabs__tab[aria-selected="true"],
.tabs__tab[aria-current="page"] {
    border-bottom-color: var(--accent-700);
    color: var(--accent-700);
    font-weight: 600;
}

.tabs__count {
    min-width: 22px;
    padding: 0 7px;
    border-radius: var(--radius-pill);
    background: var(--bg-2);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 600;
    line-height: 20px;
    text-align: center;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 16px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    background: var(--bg-2);
}

.filters .field {
    flex: 1 1 180px;
    margin: 0;
}

.filters .field--grow {
    flex: 3 1 260px;
}

.filters__summary {
    margin-left: auto;
    align-self: center;
    color: var(--text-2);
    font-size: 13px;
}

/* ==========================================================================
   Formularios
   ========================================================================== */

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.field label,
.field legend {
    font-size: 14px;
    font-weight: 500;
}

.req {
    color: var(--danger);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field input[type="search"],
.field select,
.field textarea {
    width: 100%;
    min-height: var(--control);
    padding: 0 12px;
    border: 1px solid var(--border-field);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 15px;
}

.field textarea {
    min-height: 88px;
    padding: 10px 12px;
    line-height: 1.5;
    resize: vertical;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
    border-color: var(--text-2);
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
    outline: var(--focus);
    outline-offset: 0;
    border-color: var(--accent-700);
}

.field input[type="file"] {
    padding: 10px;
    border: 1px dashed var(--border-field);
    border-radius: var(--radius);
    background: var(--bg);
    font: inherit;
    font-size: 14px;
}

.help {
    margin: 0;
    color: var(--text-2);
    font-size: 13px;
}

.check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
    font-size: 14px;
    cursor: pointer;
}

.check input {
    width: 20px;
    height: 20px;
    margin: 0;
    flex: none;
    accent-color: var(--accent-700);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0 16px;
}

fieldset.field {
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
}

.spec-editor {
    font-family: var(--font-mono) !important;
    font-size: 13px !important;
    line-height: 1.55 !important;
    min-height: 420px !important;
    white-space: pre;
}

.variant-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
}

.variant-list .check {
    margin: 0;
}

/* ==========================================================================
   Avisos y estados vacíos
   ========================================================================== */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
    border: 1px solid var(--info-border);
    border-radius: var(--radius-lg);
    background: var(--info-bg);
    color: var(--info-text);
    font-size: 14px;
}

.alert svg {
    width: 20px;
    height: 20px;
    flex: none;
    margin-top: 1px;
}

.alert ul {
    margin: 4px 0 0;
    padding-left: 18px;
}

.alert--success {
    border-color: var(--ok-border);
    background: var(--ok-bg);
    color: var(--ok-text);
}

.alert--error {
    border-color: var(--danger-border);
    background: var(--danger-bg);
    color: var(--danger-text);
}

.alert--warn {
    border-color: var(--warn-border);
    background: var(--warn-bg);
    color: var(--warn-text);
}

.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 36px 16px;
    color: var(--text-2);
    text-align: center;
}

.empty svg {
    width: 32px;
    height: 32px;
    color: var(--border-field);
}

.empty strong {
    color: var(--text);
    font-size: 16px;
}

.empty p {
    max-width: 420px;
    margin: 0;
    font-size: 14px;
}

/* ==========================================================================
   Diálogos
   ========================================================================== */

.dialog {
    width: min(560px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-overlay);
}

.dialog--sm {
    width: min(440px, calc(100vw - 32px));
}

/* Con un diálogo abierto el fondo no se desplaza (el <dialog> nativo bloquea
   clics pero no el scroll). :has() en navegadores actuales; panel.js agrega
   la clase como respaldo. */
html:has(dialog[open]),
html.dialog-open {
    overflow: hidden;
}

.dialog__body {
    overscroll-behavior: contain;
}

.dialog::backdrop {
    background: rgba(8, 38, 48, 0.45);
}

.dialog__form {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 34px);
    margin: 0;
}

.dialog__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 24px 6px;
}

.dialog__title {
    margin: 0;
    font-size: 18px;
    line-height: 26px;
    font-weight: 600;
}

.dialog__body {
    padding: 12px 24px 8px;
    overflow-y: auto;
}

.dialog__body p {
    margin: 0 0 12px;
    color: var(--text-2);
}

.dialog__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border-top: 1px solid var(--border-soft);
    background: var(--bg);
}

.dialog__footer .spacer {
    flex: 1;
}

/* ==========================================================================
   Consultas
   ========================================================================== */

.message-card .card__header {
    align-items: flex-start;
}

.message-card__who strong {
    font-size: 15px;
}

.message-card__text {
    margin: 16px 0 0;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: var(--bg);
    font-size: 14px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* ==========================================================================
   Login
   ========================================================================== */

.login-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.login-page .topbar {
    position: static;
}

.login {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.login__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 440px;
    padding: 44px 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    text-align: center;
}

.login__card h1 {
    margin: 0;
    font-size: 26px;
    line-height: 1.2;
    font-weight: 600;
}

.login__card p {
    margin: 0;
    color: var(--text-2);
    font-size: 14px;
}

.login__card form {
    width: 100%;
    text-align: left;
}

.login__card .btn {
    width: 100%;
}

.login__divider {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    color: var(--text-2);
    font-size: 13px;
}

.login__divider::before,
.login__divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-soft);
}

.login__legal {
    font-size: 13px !important;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 899px) {
    .topbar {
        padding: 0 16px;
    }

    .topbar__menu-button {
        display: inline-flex;
    }

    .topbar__link span,
    .user-menu__name {
        display: none;
    }

    .body {
        display: block;
        padding: 20px 16px 40px;
    }

    .nav {
        position: fixed;
        top: var(--topbar-h);
        bottom: 0;
        left: 0;
        z-index: 35;
        width: 260px;
        padding: 16px 12px;
        border-right: 1px solid var(--border);
        background: var(--surface);
        box-shadow: var(--shadow-drawer);
        align-self: stretch;
        transform: translateX(-102%);
        transition: transform 0.2s ease;
        overflow-y: auto;
    }

    .nav.is-open {
        transform: translateX(0);
    }

    body.nav-locked {
        overflow: hidden;
    }

    .table .hide-sm {
        display: none;
    }

    .login__card {
        padding: 32px 20px;
    }
}

@media (max-width: 599px) {
    .row-actions .btn span {
        display: none;
    }

    .row-actions .btn {
        width: var(--control-sm);
        padding: 0;
    }

    .filters .field {
        flex-basis: 100%;
    }
}

@media (min-width: 900px) {
    .backdrop {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}

.check--center {
    align-self: center;
}

.alert--inset {
    margin: 16px 0 0;
}

.help--spaced {
    margin-top: 12px;
}

.card__summary {
    cursor: pointer;
    list-style: none;
}

.card__summary::-webkit-details-marker {
    display: none;
}

details.card:not([open]) > .card__summary {
    border-bottom: 0;
}
