/* ==========================================================================
   nssync Admin — admin.css
   v0.1.0 — 2026-04-23
   Prefijo: adm-
   Bootstrap 5.3 base, extensión propia sin sobreescribir variables core.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Variables CSS
   -------------------------------------------------------------------------- */
:root {
    /* --------------------------------------------------------------------
       Paleta de marca nubixstore (manual de marca) — nsSync
       Dark Slate #272e35 · Deep Navy #00033d · Royal Blue #004a99
       Cyan Teal #00cfae · Mint Green #00dc86 · Emerald #1ca56a
       -------------------------------------------------------------------- */
    --adm-brand-slate:   #272e35;
    --adm-brand-navy:    #00033d;
    --adm-brand-royal:   #004a99;
    --adm-brand-teal:    #00cfae;
    --adm-brand-mint:    #00dc86;
    --adm-brand-emerald: #1ca56a;
    --adm-brand-gradient: linear-gradient(135deg, #272e35, #00033d, #004a99, #00cfae, #00dc86, #1ca56a);

    --adm-sidebar-bg:       var(--adm-brand-navy);
    --adm-sidebar-width:    260px;
    --adm-accent:           var(--adm-brand-royal);
    --adm-accent-hover:     #00337a;
    --adm-accent-light:     rgba(0, 74, 153, 0.12);
    --adm-primary:          var(--adm-brand-royal);   /* alias usado por sort links */
    --adm-text-sidebar:     #bcc6e0;
    --adm-text-sidebar-dim: #6f7aa0;
    --adm-nav-active-bg:    rgba(0, 207, 174, 0.16);
    --adm-nav-active-text:  #fff;
    --adm-body-bg:          #f4f6fa;
    --adm-card-bg:          #ffffff;
    --adm-card-border:      #e4e6f0;
    --adm-navbar-height:    56px;
    --adm-sidebar-logo-h:   64px;
    --adm-sidebar-user-h:   70px;

    /* Stat colors (alineados a marca) */
    --adm-stat-primary-bg:  #e7f0fb;
    --adm-stat-primary-icon:#004a99;
    --adm-stat-success-bg:  #e3f7ee;
    --adm-stat-success-icon:#1ca56a;
    --adm-stat-danger-bg:   #fff0f0;
    --adm-stat-danger-icon: #e84c4c;
    --adm-stat-warning-bg:  #fff8e6;
    --adm-stat-warning-icon:#f5a623;
}

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

body {
    background-color: var(--adm-body-bg);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #2d3045;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Layout principal (sidebar + contenido)
   -------------------------------------------------------------------------- */
.adm-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.adm-sidebar {
    width: var(--adm-sidebar-width);
    min-height: 100vh;
    background-color: var(--adm-sidebar-bg);
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

/* Contenido principal */
.adm-content {
    flex: 1;
    padding: 1.5rem;
    overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   Navbar (móvil)
   -------------------------------------------------------------------------- */
.adm-navbar {
    background-color: var(--adm-sidebar-bg);
    height: var(--adm-navbar-height);
    position: sticky;
    top: 0;
    z-index: 1030;
}

/* --------------------------------------------------------------------------
   Offcanvas sidebar (móvil)
   -------------------------------------------------------------------------- */
.adm-offcanvas {
    background-color: var(--adm-sidebar-bg);
    width: var(--adm-sidebar-width) !important;
    color: var(--adm-text-sidebar);
}

/* --------------------------------------------------------------------------
   Sidebar — Logo / Brand
   -------------------------------------------------------------------------- */
.adm-sidebar-logo {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    min-height: var(--adm-sidebar-logo-h);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.adm-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.3px;
}

.adm-brand-sub {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--adm-text-sidebar-dim);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: block;
    margin-top: 0.15rem;
}

/* --------------------------------------------------------------------------
   Sidebar — Usuario logueado
   -------------------------------------------------------------------------- */
.adm-sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    min-height: var(--adm-sidebar-user-h);
}

.adm-user-avatar {
    font-size: 2rem;
    color: var(--adm-accent);
    line-height: 1;
}

.adm-user-name {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.adm-user-role {
    display: block;
    font-size: 0.72rem;
    color: var(--adm-text-sidebar-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --------------------------------------------------------------------------
   Sidebar — Navegación
   -------------------------------------------------------------------------- */
.adm-nav {
    padding: 0.75rem 0;
    display: flex;
    flex-direction: column;
}

.adm-nav-link {
    display: flex;
    align-items: center;
    padding: 0.65rem 1.5rem;
    color: var(--adm-text-sidebar);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.adm-nav-link:hover {
    background-color: rgba(255,255,255,0.06);
    color: #ffffff;
}

.adm-nav-link.active {
    background-color: var(--adm-nav-active-bg);
    color: var(--adm-nav-active-text);
    border-left-color: var(--adm-accent);
    font-weight: 600;
}

.adm-nav-logout {
    color: #f08080;
    margin-top: 0.25rem;
}

.adm-nav-logout:hover {
    background-color: rgba(232, 76, 76, 0.12);
    color: #ff6b6b;
}

/* --------------------------------------------------------------------------
   Sidebar — Footer
   -------------------------------------------------------------------------- */
.adm-sidebar-divider {
    border-top: 1px solid rgba(255,255,255,0.07);
    margin: 0.5rem 0;
}

.adm-sidebar-footer {
    padding: 0.5rem 1.5rem 1rem;
    color: var(--adm-text-sidebar-dim);
    font-size: 0.72rem;
}

/* --------------------------------------------------------------------------
   Page header
   -------------------------------------------------------------------------- */
.adm-page-header {
    margin-bottom: 1.5rem;
}

.adm-page-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a1d2e;
    margin: 0 0 0.2rem;
}

.adm-page-subtitle {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Stat cards
   -------------------------------------------------------------------------- */
.adm-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    background-color: var(--adm-card-bg);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: box-shadow 0.15s ease;
}

.adm-stat-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.adm-stat-icon {
    font-size: 2rem;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.adm-stat-body {
    display: flex;
    flex-direction: column;
}

.adm-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    color: #1a1d2e;
}

.adm-stat-label {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Variantes de color */
.adm-stat-primary .adm-stat-icon { background-color: var(--adm-stat-primary-bg); color: var(--adm-stat-primary-icon); }
.adm-stat-success .adm-stat-icon { background-color: var(--adm-stat-success-bg); color: var(--adm-stat-success-icon); }
.adm-stat-danger  .adm-stat-icon { background-color: var(--adm-stat-danger-bg);  color: var(--adm-stat-danger-icon); }
.adm-stat-warning .adm-stat-icon { background-color: var(--adm-stat-warning-bg); color: var(--adm-stat-warning-icon); }

/* --------------------------------------------------------------------------
   Cards genéricas
   -------------------------------------------------------------------------- */
.adm-card {
    border: 1px solid var(--adm-card-border);
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.adm-card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid var(--adm-card-border);
    font-weight: 600;
    font-size: 0.875rem;
    color: #1a1d2e;
    padding: 0.85rem 1.25rem;
    border-radius: 12px 12px 0 0 !important;
}

/* --------------------------------------------------------------------------
   Botones
   -------------------------------------------------------------------------- */
.adm-btn-quick {
    background-color: #ffffff;
    border: 1px solid var(--adm-card-border);
    color: #2d3045;
    font-size: 0.875rem;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.adm-btn-quick:hover {
    background-color: var(--adm-accent-light);
    border-color: var(--adm-accent);
    color: var(--adm-accent);
}

/* --------------------------------------------------------------------------
   Login page
   -------------------------------------------------------------------------- */
.adm-login-body {
    background-color: var(--adm-sidebar-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.adm-login-wrapper {
    width: 100%;
    max-width: 420px;
}

.adm-login-card {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    box-shadow: 0 8px 40px rgba(0,0,0,0.3);
}

.adm-login-logo {
    font-size: 2.5rem;
    color: var(--adm-accent);
    text-align: center;
    margin-bottom: 0.5rem;
}

.adm-login-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    color: #1a1d2e;
    margin-bottom: 0.15rem;
}

.adm-login-subtitle {
    font-size: 0.85rem;
    text-align: center;
    color: #6b7280;
    margin-bottom: 1.75rem;
}

.adm-login-version {
    margin: 1.5rem 0 0;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    color: #9ca3af;
}

.adm-login-version .bi {
    margin-right: 0.25rem;
    opacity: 0.8;
}

.adm-btn-login {
    background-color: var(--adm-accent);
    border-color: var(--adm-accent);
    color: #ffffff;
    font-weight: 600;
    padding: 0.65rem;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: background-color 0.15s ease;
}

.adm-btn-login:hover,
.adm-btn-login:focus {
    background-color: var(--adm-accent-hover);
    border-color: var(--adm-accent-hover);
    color: #ffffff;
}

.adm-btn-toggle-pass {
    border-color: #dee2e6;
}

/* --------------------------------------------------------------------------
   Responsive — ajustes móvil
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    .adm-content {
        padding: 1rem;
        padding-top: calc(var(--adm-navbar-height) + 1rem);
    }
}

@media (max-width: 575.98px) {
    .adm-login-card {
        padding: 2rem 1.25rem;
    }

    .adm-stat-value {
        font-size: 1.5rem;
    }
}

/* ==========================================================================
   v0.2.0 — ABM Applications — 2026-04-23
   ========================================================================== */

/* --------------------------------------------------------------------------
   Botones adicionales
   -------------------------------------------------------------------------- */
.adm-btn-primary {
    background-color: var(--adm-accent);
    border-color: var(--adm-accent);
    color: #fff;
    font-weight: 500;
}
.adm-btn-primary:hover,
.adm-btn-primary:focus {
    background-color: var(--adm-accent-hover);
    border-color: var(--adm-accent-hover);
    color: #fff;
}

.btn-xs {
    padding: 0.2rem 0.45rem;
    font-size: 0.775rem;
    line-height: 1.4;
    border-radius: 5px;
}

/* --------------------------------------------------------------------------
   Tabla de listado
   -------------------------------------------------------------------------- */
.adm-table-wrap {
    background: #fff;
    border: 1px solid var(--adm-card-border);
    border-radius: 12px;
    overflow: hidden;
}

.adm-table {
    margin: 0;
    font-size: 0.875rem;
}

.adm-table thead th {
    background-color: #f8f9fc;
    border-bottom: 1px solid var(--adm-card-border);
    font-weight: 600;
    color: #4b5563;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 0.65rem 0.85rem;
    white-space: nowrap;
}

.adm-table tbody td {
    vertical-align: middle;
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid #f0f1f6;
}

.adm-table tbody tr:last-child td {
    border-bottom: none;
}

.adm-table tbody tr:hover td {
    background-color: #fafbff;
}

/* --------------------------------------------------------------------------
   Color dot
   -------------------------------------------------------------------------- */
.adm-color-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.15);
    flex-shrink: 0;
}

.adm-color-dot-lg {
    width: 28px;
    height: 28px;
}

/* --------------------------------------------------------------------------
   App name link
   -------------------------------------------------------------------------- */
.adm-app-name {
    color: #1a1d2e;
    font-weight: 600;
    text-decoration: none;
}
.adm-app-name:hover { color: var(--adm-accent); text-decoration: underline; }

/* --------------------------------------------------------------------------
   Badges
   -------------------------------------------------------------------------- */
.adm-badge-ns       { background-color: #dbeafe; color: #1d4ed8; }
.adm-badge-tn       { background-color: #fce7f3; color: #9d174d; }
.adm-badge-cb       { background-color: #d1fae5; color: #065f46; }
.adm-badge-country  { background-color: #f3f4f6; color: #374151; }
.adm-badge-active   { background-color: #d1fae5; color: #065f46; }
.adm-badge-inactive { background-color: #fee2e2; color: #991b1b; }
.adm-badge-platform {
    background-color: #f3f4f6;
    color: #111827;
    border: 1px solid #9ca3af;
    font-size: 0.68rem;
    letter-spacing: 0.3px;
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   Sync flags (tabla)
   -------------------------------------------------------------------------- */
.adm-sync-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--adm-accent-light);
    color: var(--adm-accent);
    border-radius: 4px;
    padding: 0 5px;
    font-size: 0.7rem;
    font-weight: 700;
    height: 18px;
    line-height: 1;
}

/* --------------------------------------------------------------------------
   Cards móvil (applications)
   -------------------------------------------------------------------------- */
.adm-app-card {
    background: #fff;
    border: 1px solid var(--adm-card-border);
    border-radius: 10px;
    overflow: hidden;
}

.adm-app-card-header {
    display: flex;
    align-items: center;
    padding: 0.65rem 1rem;
    background: #f8f9fc;
    border-bottom: 1px solid var(--adm-card-border);
    gap: 0.25rem;
    flex-wrap: nowrap;
}

.adm-app-card-body {
    padding: 0.75rem 1rem;
}

/* --------------------------------------------------------------------------
   Empty state
   -------------------------------------------------------------------------- */
.adm-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.adm-empty-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.75rem;
    opacity: 0.4;
}

/* --------------------------------------------------------------------------
   Filtros
   -------------------------------------------------------------------------- */
.adm-filter-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 0.25rem;
    display: block;
}

/* --------------------------------------------------------------------------
   Breadcrumb
   -------------------------------------------------------------------------- */
.adm-breadcrumb {
    font-size: 0.85rem;
    background: none;
    padding: 0;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Formulario (create / edit)
   -------------------------------------------------------------------------- */
.adm-form-tabs .nav-link {
    font-size: 0.85rem;
    padding: 0.45rem 0.85rem;
    color: #4b5563;
}
.adm-form-tabs .nav-link.active {
    color: var(--adm-accent);
    font-weight: 600;
}

.adm-sync-checks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.75rem;
}

.adm-sync-check {
    background: #f8f9fc;
    border: 1px solid var(--adm-card-border);
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
}

.adm-color-input {
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
}

.adm-form-actions {
    border-top: 1px solid var(--adm-card-border);
    padding-top: 1rem;
}

.adm-form-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--adm-card-border);
}

.adm-ext-section { margin-top: 0.5rem; }

/* --------------------------------------------------------------------------
   Vista detalle (view.php)
   -------------------------------------------------------------------------- */
.adm-detail-list {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 0.5rem 1rem;
    font-size: 0.875rem;
    margin: 0;
}

.adm-detail-list dt {
    color: #6b7280;
    font-weight: 500;
    padding-top: 0.1rem;
}

.adm-detail-list dd {
    margin: 0;
    color: #1a1d2e;
    word-break: break-all;
}

.adm-secret {
    font-size: 0.78rem;
    word-break: break-all;
}

.adm-blur {
    filter: blur(4px);
    cursor: pointer;
    user-select: none;
    transition: filter 0.2s ease;
}
.adm-blur.revealed { filter: none; }

.adm-sync-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.5rem;
}

.adm-sync-item {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
}

@media (max-width: 575.98px) {
    .adm-detail-list {
        grid-template-columns: 1fr;
    }
    .adm-detail-list dt { color: #9ca3af; font-size: 0.75rem; margin-top: 0.5rem; }
}

/* ==========================================================================
   v0.2.1 — Ajustes listado Applications — 2026-04-23
   ========================================================================== */

/* --------------------------------------------------------------------------
   Status dot (reemplaza columna Estado)
   -------------------------------------------------------------------------- */
.adm-status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.adm-status-dot-on  { background-color: #22c55e; box-shadow: 0 0 0 2px rgba(34,197,94,0.2); }
.adm-status-dot-off { background-color: #ef4444; box-shadow: 0 0 0 2px rgba(239,68,68,0.2); }

/* --------------------------------------------------------------------------
   Sync flags principales: STOCK y PRECIO (siempre visibles, on/off)
   -------------------------------------------------------------------------- */
.adm-sync-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-right: 3px;
}
.adm-sync-main-on  { background-color: #dcfce7; color: #15803d; }
.adm-sync-main-off { background-color: #fee2e2; color: #b91c1c; }

/* --------------------------------------------------------------------------
   Clave de sync (SKU / EAN)
   -------------------------------------------------------------------------- */
.adm-sync-key {
    display: inline-flex;
    align-items: center;
    background-color: #ede9fe;
    color: #6d28d9;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-right: 2px;
}

/* --------------------------------------------------------------------------
   APP-ID copiable
   -------------------------------------------------------------------------- */
.adm-appid-copy {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    color: #6b7280;
    cursor: pointer;
    user-select: none;
    border-radius: 4px;
    padding: 1px 4px;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.adm-appid-copy:hover {
    background-color: var(--adm-accent-light);
    color: var(--adm-accent);
}
.adm-appid-copy.copied {
    background-color: #dcfce7;
    color: #15803d;
}
.adm-copy-icon {
    font-size: 0.65rem;
    opacity: 0.6;
}

/* --------------------------------------------------------------------------
   URL de producción
   -------------------------------------------------------------------------- */
.adm-url-cell {
    max-width: 200px;
}
.adm-url-link {
    color: #374151;
    text-decoration: none;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    max-width: 180px;
    vertical-align: middle;
}
.adm-url-link:hover { color: var(--adm-accent); text-decoration: underline; }
.adm-url-ext-icon {
    font-size: 0.65rem;
    opacity: 0.5;
    margin-left: 2px;
}

/* ==========================================================================
   v0.3.0 — Visor Items — 2026-04-23
   ========================================================================== */

/* Badges de estado de sincronización */
.adm-badge-sync-on {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: .02em;
    background-color: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}
.adm-badge-sync-off {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: .02em;
    background-color: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

/* Valores numéricos especiales */
.adm-val-na   { color: #9ca3af; font-style: italic; font-size: 0.85em; }
.adm-num-neg  { color: #ef4444; font-weight: 600; }
.adm-num-zero { color: #9ca3af; }

/* Celda de código de ítem */
.adm-item-code {
    font-family: var(--bs-font-monospace);
    font-size: 0.82rem;
    color: #374151;
}

/* Descripción truncada en tabla */
.adm-item-desc {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Línea de metadatos bajo la descripción: fecha sync | código */
.adm-item-meta {
    flex-wrap: nowrap;
    min-width: 0;
}

.adm-item-sync-ts {
    font-size: 0.78rem;
    white-space: nowrap;
}

.adm-item-meta-sep {
    font-size: 0.78rem;
    opacity: 0.4;
}

/* Punto de color de aplicación en listado */
.adm-app-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
    flex-shrink: 0;
}

/* Card de ítem (móvil) */
.adm-item-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

/* Historial de cambios */
.adm-history-pre {
    font-size: 0.75rem;
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.75rem;
    max-height: 380px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
}
.adm-history-list   { display: flex; flex-direction: column; gap: 0.4rem; }
.adm-history-entry  { font-size: 0.78rem; padding: 0.35rem 0.5rem; background: #f8f9fa; border-radius: 4px; border-left: 3px solid #d1d5db; display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; }
.adm-history-ts     { color: #6b7280; font-size: 0.72rem; flex-basis: 100%; margin-bottom: 2px; }
.adm-history-field  { font-weight: 600; color: #374151; }
.adm-history-old    { color: #ef4444; text-decoration: line-through; font-family: var(--bs-font-monospace); font-size: 0.75rem; }
.adm-history-new    { color: #15803d; font-weight: 600; font-family: var(--bs-font-monospace); font-size: 0.75rem; }

/* ==========================================================================
   v0.4.0 — Visor Deposit Items — 2026-04-23
   Todos los estilos necesarios (adm-badge-sync-on/off, adm-val-na,
   adm-num-neg/zero, adm-item-code, adm-item-meta, adm-app-dot,
   adm-item-card, adm-appid-copy, adm-status-dot, adm-copy-icon)
   ya están presentes desde v0.3.0. Sin estilos nuevos requeridos.
   ========================================================================== */

/* ==========================================================================
   v0.4.1 — Ordenamiento de columnas — 2026-04-23
   ========================================================================== */

.adm-sort-link {
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.adm-sort-link:hover { color: var(--adm-primary); }
.adm-sort-active { color: var(--adm-primary); font-weight: 600; }
.adm-sort-icon { font-size: 0.75rem; opacity: 0.7; }

/* ==========================================================================
   v0.5.0 — Toasts flotantes (flash messages) — 2026-06-03
   ========================================================================== */

.adm-toast-container {
    position: fixed;
    bottom: 20px;                  /* ángulo inferior derecho */
    right: 20px;
    z-index: 1080;                 /* por encima del navbar (1030) */
    width: min(360px, calc(100vw - 32px));
    pointer-events: none;          /* el contenedor no bloquea; el toast sí */
}

.adm-toast {
    position: relative;
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    overflow: hidden;
    padding: 13px 14px;
    background: var(--adm-card-bg);
    border: 1px solid var(--adm-card-border);
    border-left: 4px solid var(--adm-accent);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(20, 23, 46, 0.18);
    /* Estado inicial: fuera de pantalla (entra desde la derecha) */
    opacity: 0;
    transform: translateX(120%);
    transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

/* Entrada / salida controladas por JS */
.adm-toast.adm-toast-in  { opacity: 1; transform: translateX(0); }
.adm-toast.adm-toast-out { opacity: 0; transform: translateX(120%); }

.adm-toast-icon {
    flex-shrink: 0;
    font-size: 1.15rem;
    line-height: 1.4;
}

.adm-toast-body {
    flex: 1 1 auto;
    font-size: 0.875rem;
    line-height: 1.4;
    color: #2b2f45;
    word-break: break-word;
}

.adm-toast-close {
    flex-shrink: 0;
    border: 0;
    background: transparent;
    color: #9aa0b8;
    font-size: 0.8rem;
    line-height: 1;
    padding: 2px;
    cursor: pointer;
    transition: color 0.15s ease;
}
.adm-toast-close:hover { color: #3b3f57; }

/* Barra de progreso del auto-dismiss */
.adm-toast-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    transform-origin: left center;
    opacity: 0.5;
    background: currentColor;
}
.adm-toast.adm-toast-in .adm-toast-progress {
    animation: admToastProgress 5s linear forwards;
}

@keyframes admToastProgress {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

/* Variantes por tipo (color del borde, ícono y progreso) */
.adm-toast-success { border-left-color: var(--adm-stat-success-icon); }
.adm-toast-success .adm-toast-icon,
.adm-toast-success .adm-toast-progress { color: var(--adm-stat-success-icon); }

.adm-toast-warning { border-left-color: var(--adm-stat-warning-icon); }
.adm-toast-warning .adm-toast-icon,
.adm-toast-warning .adm-toast-progress { color: var(--adm-stat-warning-icon); }

.adm-toast-error { border-left-color: var(--adm-stat-danger-icon); }
.adm-toast-error .adm-toast-icon,
.adm-toast-error .adm-toast-progress { color: var(--adm-stat-danger-icon); }

.adm-toast-info { border-left-color: var(--adm-accent); }
.adm-toast-info .adm-toast-icon,
.adm-toast-info .adm-toast-progress { color: var(--adm-accent); }

/* Móvil: ocupar el ancho disponible */
@media (max-width: 575.98px) {
    .adm-toast-container {
        right: 12px;
        left: 12px;
        bottom: 12px;
        width: auto;
    }
}

/* Respeto a usuarios que prefieren menos movimiento */
@media (prefers-reduced-motion: reduce) {
    .adm-toast { transition: opacity 0.2s ease; transform: none; }
    .adm-toast.adm-toast-out { transform: none; }
    .adm-toast.adm-toast-in .adm-toast-progress { animation: none; }
}

/* ==========================================================================
   v0.2.0 — Branding nsSync by nubixstore — 2026-06-03
   ========================================================================== */

/* Sidebar: wordmark nsSync (grande) + versión al costado, logo nubixstore debajo.
   El bloque es un <a> al dashboard. */
.adm-sidebar-logo {
    text-decoration: none;
    align-items: flex-start;
    gap: 0.6rem;
    position: relative;
    transition: background-color 0.15s ease;
}
.adm-sidebar-logo:hover { background-color: rgba(255, 255, 255, 0.04); }
/* Barra de acento con el degradé de marca */
.adm-sidebar-logo::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2px;
    background: var(--adm-brand-gradient);
    opacity: 0.9;
}

/* Línea: nsSync + versión */
.adm-brand-line {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}

.adm-brand-product {
    font-size: 1.7rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
    line-height: 1;
}

.adm-brand-version {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--adm-text-sidebar-dim);
    letter-spacing: 0.3px;
}

/* Crédito nubixstore al pie del sidebar (link a nubixstore.ar) */
.adm-sidebar-credit {
    display: inline-flex;
    align-items: center;
    opacity: 0.85;
    transition: opacity 0.15s ease;
}
.adm-sidebar-credit:hover { opacity: 1; }
.adm-credit-logo {
    height: 24px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

/* Navbar móvil / offcanvas */
.adm-navbar-logo {
    height: 26px;
    width: auto;
    object-fit: contain;
}
.navbar-brand.adm-brand { text-decoration: none; color: #fff; }

/* Login: logo color sobre tarjeta blanca */
.adm-login-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.75rem;
}
.adm-login-logo-img {
    height: 56px;
    width: auto;
    max-width: 80%;
    object-fit: contain;
}

/* Botón de login: degradé de marca sutil */
.adm-btn-login {
    background: var(--adm-brand-royal);
    border-color: var(--adm-brand-royal);
}
.adm-btn-login:hover,
.adm-btn-login:focus {
    background: var(--adm-accent-hover);
    border-color: var(--adm-accent-hover);
}

/* Badge de plataforma / super admin con tono de marca */
.adm-badge-platform {
    background-color: var(--adm-accent-light);
    color: var(--adm-brand-royal);
    border: 1px solid rgba(0, 74, 153, 0.35);
    font-weight: 600;
}

/* ==========================================================================
   v0.2.0 — Dashboard: listas de actividad de aplicaciones — 2026-06-03
   ========================================================================== */

.adm-activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.adm-activity-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--adm-card-border);
}
.adm-activity-row:last-child { border-bottom: 0; }

/* Acento verde de "en uso" a la izquierda */
.adm-activity-row:not(.adm-activity-idle) {
    box-shadow: inset 3px 0 0 var(--adm-brand-mint);
}
.adm-activity-idle { opacity: 0.72; }

.adm-activity-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.adm-activity-name {
    font-weight: 600;
    color: #2b2f45;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.adm-activity-name:hover { color: var(--adm-brand-royal); text-decoration: underline; }

.adm-activity-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

.adm-activity-time {
    font-size: 0.78rem;
    color: var(--adm-text-sidebar-dim);
    white-space: nowrap;
}

/* Lista de "sin uso" con scroll para no estirar el dashboard */
.adm-activity-scroll {
    max-height: 360px;
    overflow-y: auto;
}

/* Visor de logs */
.adm-log-pre {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #d7dbe6;
    background: #1a1d2e;
    padding: 1rem 1.1rem;
    margin: 0;
    max-height: 65vh;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    border-radius: 0 0 0.5rem 0.5rem;
}
