/* ==========================================================================
   SICS-GROUP · Panel de administración
   ========================================================================== */

:root {
    --a-primary: #112955;
    --a-primary-soft: #eef2fb;
    --a-accent: #2563eb;
    --a-bg: #f4f6fb;
    --a-surface: #ffffff;
    --a-border: #e3e8f2;
    --a-text: #0f1b33;
    --a-muted: #64748b;
    --a-success: #059669;
    --a-warning: #d97706;
    --a-danger: #dc2626;
    --a-radius: 14px;
    --a-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
    --sidebar-w: 262px;
}

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

html,
body {
    height: 100%;
}

body.admin {
    margin: 0;
    background: var(--a-bg);
    color: var(--a-text);
    font-family: 'Inter', -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14.5px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--a-accent);
    text-decoration: none;
}

img {
    max-width: 100%;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    font-weight: 700;
    letter-spacing: -.01em;
}

p {
    margin: 0 0 1em;
}

svg.nav-icon {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
}

.w-5 {
    width: 20px;
    height: 20px;
}

.w-6 {
    width: 24px;
    height: 24px;
}

/* ------------------------------------------------------------- Estructura */
.admin-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-w);
    flex: 0 0 var(--sidebar-w);
    background: #0d1b36;
    color: #c8d3e8;
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    overflow-y: auto;
    scrollbar-width: thin;
}

.sidebar-brand {
    padding: 20px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.sidebar-brand a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.sidebar-brand img {
    max-height: 50px;
    width: auto;
    background: #fff;
    border-radius: 8px;
    padding: 5px 8px;
}

.sidebar-initials {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: rgba(255, 255, 255, .12);
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: .95rem;
    color: #fff;
    flex: 0 0 40px;
}

.sidebar-name {
    font-weight: 700;
    font-size: .92rem;
    line-height: 1.2;
}

.sidebar-nav {
    padding: 14px 12px;
    flex: 1;
}

.sidebar-group {
    font-size: .64rem;
    text-transform: uppercase;
    letter-spacing: .16em;
    color: #6f83a6;
    font-weight: 800;
    margin: 16px 10px 8px;
}

.sidebar-group:first-child {
    margin-top: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    border-radius: 9px;
    color: #c8d3e8;
    font-size: .875rem;
    font-weight: 500;
    margin-bottom: 2px;
    transition: background .15s, color .15s;
}

.nav-item:hover {
    background: rgba(255, 255, 255, .07);
    color: #fff;
}

.nav-item.is-active {
    background: var(--a-accent);
    color: #fff;
    box-shadow: 0 6px 16px rgba(37, 99, 235, .35);
}

.nav-badge {
    margin-left: auto;
    background: #ef4444;
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 1px 7px;
}

.sidebar-footer {
    padding: 10px 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.admin-main {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--a-border);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 28px;
}

.admin-heading h1 {
    font-size: 1.18rem;
}

.admin-heading p {
    margin: 2px 0 0;
    font-size: .78rem;
    color: var(--a-muted);
}

.topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-btn {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--a-border);
    background: #fff;
    display: grid;
    place-items: center;
    color: var(--a-text);
    cursor: pointer;
}

.icon-btn:hover {
    background: var(--a-primary-soft);
}

.icon-btn .dot {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #fff;
    font-size: .62rem;
    font-weight: 700;
    border-radius: 999px;
    min-width: 17px;
    height: 17px;
    display: grid;
    place-items: center;
    padding: 0 4px;
}

.sidebar-toggle {
    display: none;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 12px;
    border-left: 1px solid var(--a-border);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: .8rem;
}

.user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-meta strong {
    font-size: .84rem;
}

.user-meta small {
    font-size: .72rem;
    color: var(--a-muted);
}

.admin-content {
    padding: 26px 28px 40px;
    flex: 1;
}

.admin-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 28px;
    border-top: 1px solid var(--a-border);
    color: var(--a-muted);
    font-size: .76rem;
}

/* ---------------------------------------------------------------- Avisos */
.toast-inline {
    border-radius: 10px;
    padding: 12px 16px;
    font-size: .875rem;
    margin-bottom: 16px;
    border: 1px solid;
}

.toast-success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.toast-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.toast-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.toast-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

/* ---------------------------------------------------------------- Tarjetas */
.card {
    background: var(--a-surface);
    border: 1px solid var(--a-border);
    border-radius: var(--a-radius);
    box-shadow: var(--a-shadow);
    padding: 22px;
    margin-bottom: 22px;
}

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

.card-header h2 {
    font-size: 1rem;
}

.card-header p {
    margin: 3px 0 0;
    font-size: .8rem;
    color: var(--a-muted);
}

.card-empty {
    text-align: center;
    padding: 52px 24px;
}

.card-empty h2 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.card-empty p {
    color: var(--a-muted);
    max-width: 460px;
    margin: 0 auto 20px;
}

.empty-icon {
    color: #94a3b8;
    margin-bottom: 14px;
    display: flex;
    justify-content: center;
}

.card-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.grid-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.stat {
    background: #fff;
    border: 1px solid var(--a-border);
    border-radius: var(--a-radius);
    padding: 18px 20px;
    box-shadow: var(--a-shadow);
}

.stat-label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--a-muted);
    font-weight: 700;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 6px 0 2px;
    letter-spacing: -.02em;
}

.stat-hint {
    font-size: .76rem;
    color: var(--a-muted);
}

.stat.is-alert .stat-value {
    color: var(--a-danger);
}

.stat.is-good .stat-value {
    color: var(--a-success);
}

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

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

.grid-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 22px;
    align-items: start;
}

/* ---------------------------------------------------------------- Formularios */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
}

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

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

.field>label {
    font-size: .78rem;
    font-weight: 700;
    color: #334155;
}

.field .hint {
    font-size: .74rem;
    color: var(--a-muted);
}

input[type=text],
input[type=email],
input[type=password],
input[type=number],
input[type=url],
input[type=tel],
input[type=date],
input[type=time],
input[type=search],
select,
textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid #cfd8e6;
    border-radius: 9px;
    font-family: inherit;
    font-size: .88rem;
    color: var(--a-text);
    background: #fff;
    transition: border .15s, box-shadow .15s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--a-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}

textarea {
    resize: vertical;
    min-height: 110px;
    line-height: 1.6;
}

input[type=color] {
    width: 100%;
    height: 42px;
    padding: 4px;
    border: 1px solid #cfd8e6;
    border-radius: 9px;
    background: #fff;
    cursor: pointer;
}

/* ------------------------------------------------- Editor de texto enriquecido */
.rte {
    border: 1px solid #cfd8e6;
    border-radius: 11px;
    background: #fff;
    overflow: hidden;
    transition: border .15s, box-shadow .15s;
}

.rte:focus-within {
    border-color: var(--a-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}

.rte.is-uploading {
    opacity: .7;
}

.rte-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px;
    padding: 7px 8px;
    background: #f8fafc;
    border-bottom: 1px solid var(--a-border);
}

.rte-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #475569;
    cursor: pointer;
    transition: background .12s, color .12s, border-color .12s;
}

.rte-btn:hover {
    background: #e8eefb;
    color: #1e3a8a;
}

.rte-btn.is-active {
    background: #dbeafe;
    border-color: #bdd6fb;
    color: #1d4ed8;
}

.rte-btn svg {
    width: 17px;
    height: 17px;
}

.rte-btn-txt {
    width: auto;
    min-width: 32px;
    padding: 0 8px;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .02em;
}

.rte-sep {
    width: 1px;
    height: 20px;
    margin: 0 4px;
    background: var(--a-border);
}

.rte-content {
    min-height: 280px;
    max-height: 620px;
    overflow-y: auto;
    padding: 18px 20px;
    font-size: .92rem;
    line-height: 1.75;
    color: var(--a-text);
    outline: none;
}

.rte-content:empty::before {
    content: attr(data-placeholder);
    color: #94a3b8;
    pointer-events: none;
}

.rte-content>*+* {
    margin-top: 14px;
}

.rte-content h2 {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.3;
    margin-top: 26px;
}

.rte-content h3 {
    font-size: 1.14rem;
    font-weight: 700;
    margin-top: 22px;
}

.rte-content h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-top: 18px;
}

.rte-content ul,
.rte-content ol {
    padding-left: 24px;
}

.rte-content ul {
    list-style: disc;
}

.rte-content ol {
    list-style: decimal;
}

.rte-content li+li {
    margin-top: 6px;
}

.rte-content blockquote {
    border-left: 4px solid var(--a-accent);
    padding: 6px 0 6px 16px;
    color: #475569;
    font-style: italic;
}

/* Alineación: se guarda como clase porque el saneado elimina los estilos en línea.
   Las reglas para el sitio público (.page-content, .card-text) están en site.css */
.rte-content .rte-align-left {
    text-align: left;
}

.rte-content .rte-align-center {
    text-align: center;
}

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

.rte-content .rte-align-justify {
    text-align: justify;
    text-justify: inter-word;
}

.rte-content li.rte-align-center,
.rte-content li.rte-align-right {
    list-style-position: inside;
}

.rte-content a {
    color: var(--a-accent);
    text-decoration: underline;
}

.rte-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.rte-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: .86rem;
}

.rte-content th,
.rte-content td {
    border: 1px solid #e2e8f0;
    padding: 8px 10px;
    text-align: left;
}

.rte-content th {
    background: #f1f5f9;
    font-weight: 700;
}

.rte-status {
    padding: 6px 12px;
    border-top: 1px solid var(--a-border);
    background: #fbfcfe;
    font-size: .72rem;
    color: var(--a-muted);
    text-align: right;
}

.rte-file {
    display: none;
}

.is-hidden-for-richtext {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

input[type=checkbox],
input[type=radio] {
    width: 17px;
    height: 17px;
    accent-color: var(--a-accent);
}

.check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .86rem;
    font-weight: 600;
}

.switch {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    font-size: .875rem;
}

.switch input {
    width: 40px;
    height: 22px;
    appearance: none;
    background: #cbd5e1;
    border-radius: 999px;
    position: relative;
    cursor: pointer;
    transition: background .2s;
}

.switch input::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform .2s;
}

.switch input:checked {
    background: var(--a-accent);
}

.switch input:checked::after {
    transform: translateX(18px);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 9px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: .86rem;
    font-weight: 650;
    cursor: pointer;
    transition: filter .15s, background .15s, box-shadow .15s;
    white-space: nowrap;
}

.btn:hover {
    filter: brightness(.96);
}

.btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--a-accent);
    color: #fff;
    box-shadow: 0 6px 16px rgba(37, 99, 235, .24);
}

.btn-dark {
    background: var(--a-primary);
    color: #fff;
}

.btn-ghost {
    background: #fff;
    border-color: #cfd8e6;
    color: #334155;
}

.btn-danger {
    background: var(--a-danger);
    color: #fff;
}

.btn-warn {
    background: var(--a-warning);
    color: #fff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: .78rem;
}

.btn-icon {
    padding: 7px 10px;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* ---------------------------------------- Registro de dispositivo push */
.push-device {
    border: 1px solid var(--a-border);
    border-radius: 12px;
    padding: 16px 18px;
    background: #fbfcfe;
}

.push-device-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.push-device-head strong {
    font-size: .9rem;
    color: var(--a-text);
}

.push-device-detail {
    margin-top: 8px;
    font-size: .78rem;
    color: #475569;
    min-height: 1em;
}

.push-device-detail:empty {
    margin-top: 0;
}

/* ------------------------------------------------------ Orden del listado */
.order-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-pos {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: #eef2fb;
    color: #112955;
    font-size: .74rem;
    font-weight: 800;
    flex: 0 0 24px;
}

.order-buttons {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.order-btn {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 18px;
    padding: 0;
    border: 1px solid #cfd8e6;
    border-radius: 5px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    transition: background .12s, color .12s, border-color .12s;
}

.order-btn:hover:not(:disabled) {
    background: #e8eefb;
    border-color: #b9c9e6;
    color: #1d4ed8;
}

.order-btn:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.order-btn svg {
    width: 12px;
    height: 12px;
}

/* ---------------------------------------------------------------- Tablas */
.table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--a-border);
}

table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: .855rem;
    background: #fff;
}

table.data th {
    text-align: left;
    padding: 11px 14px;
    background: #f8fafc;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: #64748b;
    font-weight: 800;
    border-bottom: 1px solid var(--a-border);
    white-space: nowrap;
}

table.data td {
    padding: 12px 14px;
    border-bottom: 1px solid #eef2f7;
    vertical-align: middle;
}

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

table.data tbody tr:hover {
    background: #fafbfe;
}

table.data .actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .7rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    letter-spacing: .02em;
    white-space: nowrap;
}

.badge-green {
    background: #dcfce7;
    color: #166534;
}

.badge-blue {
    background: #dbeafe;
    color: #1e40af;
}

.badge-gray {
    background: #eef2f7;
    color: #475569;
}

.badge-red {
    background: #fee2e2;
    color: #991b1b;
}

.badge-amber {
    background: #fef3c7;
    color: #92400e;
}

/* ---------------------------------------------------------------- Login */
.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: radial-gradient(circle at 15% 15%, #1e3a8a 0%, #112955 45%, #0b1c3a 100%);
}

.login-card {
    width: 100%;
    max-width: 410px;
    background: #fff;
    border-radius: 20px;
    padding: 38px 34px;
    box-shadow: 0 30px 80px rgba(3, 10, 26, .42);
}

.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 22px;
}

.login-logo img {
    max-height: 74px;
}

.login-card h1 {
    font-size: 1.28rem;
    text-align: center;
    margin-bottom: 6px;
}

.login-card .sub {
    text-align: center;
    color: var(--a-muted);
    font-size: .84rem;
    margin-bottom: 26px;
}

.login-card .field {
    margin-bottom: 14px;
}

.login-card .field input {
    padding: 12px 14px;
}

.login-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .82rem;
    margin: 4px 0 18px;
}

.login-foot {
    text-align: center;
    font-size: .74rem;
    color: #8794ab;
    margin-top: 22px;
}

.login-alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: 9px;
    padding: 11px 14px;
    font-size: .84rem;
    margin-bottom: 16px;
}

/* ---------------------------------------------------------------- Varios */
.alert {
    border-radius: 10px;
    padding: 13px 16px;
    font-size: .86rem;
    border: 1px solid;
    margin-bottom: 18px;
}

.alert-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

.alert-success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.alert-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.alert-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.muted {
    color: var(--a-muted);
}

.small {
    font-size: .78rem;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .8rem;
}

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

.divider {
    height: 1px;
    background: var(--a-border);
    margin: 22px 0;
}

.empty-row {
    text-align: center;
    color: var(--a-muted);
    padding: 26px !important;
}

.color-field {
    display: grid;
    gap: 6px;
}

.color-value {
    display: flex;
    gap: 8px;
    align-items: center;
}

.preview-box {
    border: 1px dashed #cfd8e6;
    border-radius: 10px;
    padding: 16px;
    background: #fbfcfe;
}

.image-preview {
    width: 100%;
    height: 110px;
    object-fit: contain;
    background: #f1f5f9;
    border-radius: 9px;
    border: 1px solid var(--a-border);
    padding: 8px;
    display: block;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    background: #eef2fb;
    border: 1px solid #dbe4f6;
    color: #1e3a8a;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: .78rem;
    font-weight: 600;
}

.progress {
    height: 8px;
    background: #eef2f7;
    border-radius: 999px;
    overflow: hidden;
}

.progress>span {
    display: block;
    height: 100%;
    background: var(--a-accent);
}

.list-plain {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.list-plain li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: .86rem;
    padding-bottom: 12px;
    border-bottom: 1px solid #eef2f7;
}

.list-plain li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    display: none;
    place-items: center;
    z-index: 200;
    padding: 20px;
}

.modal-backdrop.is-open {
    display: grid;
}

.modal {
    background: #fff;
    border-radius: 16px;
    max-width: 560px;
    width: 100%;
    padding: 26px;
    box-shadow: 0 30px 80px rgba(3, 10, 26, .4);
    max-height: 90vh;
    overflow: auto;
}

.modal h3 {
    margin-bottom: 14px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.tabs-inline {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    background: #eef2f7;
    padding: 5px;
    border-radius: 11px;
    margin-bottom: 20px;
}

.tabs-inline a {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 650;
    color: #475569;
}

.tabs-inline a.is-active {
    background: #fff;
    color: var(--a-primary);
    box-shadow: var(--a-shadow);
}

.message-body {
    background: #f8fafc;
    border: 1px solid var(--a-border);
    border-radius: 11px;
    padding: 16px;
    white-space: pre-line;
    font-size: .88rem;
    line-height: 1.7;
}

.kv {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 8px 14px;
    font-size: .86rem;
}

.kv dt {
    color: var(--a-muted);
    font-weight: 600;
}

.kv dd {
    margin: 0;
}

/* ---------------------------------------------------------- Responsive */
@media (max-width: 1200px) {
    .grid-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid-sidebar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform .25s ease;
    }

    .sidebar.is-open {
        transform: none;
        box-shadow: 0 0 60px rgba(0, 0, 0, .4);
    }

    .admin-main {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: grid;
    }

    .admin-content {
        padding: 18px 16px 32px;
    }

    .admin-topbar {
        padding: 12px 16px;
    }

    .grid-2,
    .grid-3,
    .form-grid {
        grid-template-columns: 1fr;
    }

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

    .user-meta {
        display: none;
    }
}

@media (max-width: 560px) {
    .grid-stats {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 16px;
    }

    .admin-heading p {
        display: none;
    }
}