/* ============================================================
   ZeroEditor Web — tema claro (no todo blanco)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --ze-bg:           #eef1f6;
    --ze-bg-accent:    #e4e9f2;
    --ze-surface:      #ffffff;
    --ze-surface-2:    #f7f9fc;
    --ze-border:       #d5dde8;
    --ze-text:         #1a2332;
    --ze-text-muted:   #5c6b7f;
    --ze-primary:      #2563eb;
    --ze-primary-hover:#1d4ed8;
    --ze-primary-soft: rgba(37, 99, 235, 0.1);
    --ze-success:      #059669;
    --ze-danger:       #dc2626;
    --ze-warning:      #d97706;
    --ze-radius:       12px;
    --ze-shadow:       0 4px 24px rgba(26, 35, 50, 0.08);
    --ze-shadow-sm:    0 1px 3px rgba(26, 35, 50, 0.06);

    --bs-body-bg:      var(--ze-bg);
    --bs-body-color:   var(--ze-text);
    --bs-primary:      var(--ze-primary);
    --bs-primary-rgb:  37, 99, 235;
    --bs-border-color: var(--ze-border);
    --bs-secondary-color: var(--ze-text-muted);
}

* { box-sizing: border-box; }

body {
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    background: var(--ze-bg);
    color: var(--ze-text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

code, .font-mono {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.9em;
}

/* ── PWA iOS install tip ──────────────────────────────────── */
.ze-pwa-ios-tip {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    padding: 0.75rem 0.85rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
    pointer-events: none;
    animation: zePwaSlideUp .28s ease-out;
}

.ze-pwa-ios-tip.is-hiding {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .2s, transform .2s;
}

.ze-pwa-ios-card {
    pointer-events: auto;
    max-width: 420px;
    margin: 0 auto;
    background: var(--ze-surface, #fff);
    border: 1px solid var(--ze-border, #d5dde8);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
    padding: 0.9rem 1rem 1rem;
}

.ze-pwa-ios-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.ze-pwa-ios-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ze-primary-soft, rgba(37, 99, 235, 0.12));
    color: var(--ze-primary, #2563eb);
    flex-shrink: 0;
}

.ze-pwa-ios-head strong {
    flex: 1;
    font-size: 0.95rem;
    color: var(--ze-text, #1a2332);
}

.ze-pwa-ios-close {
    border: 0;
    background: transparent;
    color: var(--ze-text-muted, #5c6b7f);
    padding: 0.25rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 6px;
}

.ze-pwa-ios-close:hover {
    background: var(--ze-bg-accent, #e4e9f2);
    color: var(--ze-text, #1a2332);
}

.ze-pwa-ios-steps {
    margin: 0 0 0.65rem;
    padding: 0 0 0 0.15rem;
    list-style: none;
}

.ze-pwa-ios-steps li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--ze-text, #1a2332);
    padding: 0.28rem 0;
    line-height: 1.35;
}

.ze-pwa-ios-steps i {
    color: var(--ze-primary, #2563eb);
    font-size: 1.05rem;
    margin-top: 0.05rem;
    flex-shrink: 0;
}

.ze-pwa-ios-note {
    font-size: 0.8rem;
    color: var(--ze-text-muted, #5c6b7f);
    margin: 0 0 0.75rem;
    line-height: 1.4;
}

@keyframes zePwaSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Auth shell ───────────────────────────────────────────── */

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background:
        radial-gradient(ellipse 80% 60% at 10% 0%, rgba(37, 99, 235, 0.12), transparent 50%),
        radial-gradient(ellipse 60% 50% at 90% 100%, rgba(5, 150, 105, 0.08), transparent 45%),
        linear-gradient(160deg, #e8edf5 0%, #eef1f6 40%, #e6ebf4 100%);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--ze-surface);
    border: 1px solid var(--ze-border);
    border-radius: calc(var(--ze-radius) + 4px);
    box-shadow: var(--ze-shadow);
    overflow: hidden;
}

.auth-card.wide { max-width: 560px; }

.auth-card-header {
    padding: 1.75rem 1.75rem 0.5rem;
    text-align: center;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--ze-primary), #3b82f6);
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 0.85rem;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.auth-card-body { padding: 1rem 1.75rem 1.75rem; }

.auth-title {
    font-weight: 700;
    font-size: 1.35rem;
    margin: 0 0 0.25rem;
    color: var(--ze-text);
}

.auth-subtitle {
    color: var(--ze-text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* Choice cards */
.choice-grid {
    display: grid;
    gap: 0.85rem;
}

.choice-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--ze-surface-2);
    border: 1.5px solid var(--ze-border);
    border-radius: var(--ze-radius);
    padding: 1.15rem 1.2rem;
    transition: border-color .15s, box-shadow .15s, background .15s, transform .15s;
    cursor: pointer;
}

.choice-card:hover {
    border-color: var(--ze-primary);
    background: var(--ze-primary-soft);
    box-shadow: var(--ze-shadow-sm);
    transform: translateY(-1px);
    color: inherit;
}

.choice-card .choice-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ze-primary-soft);
    color: var(--ze-primary);
    font-size: 1.15rem;
    margin-bottom: 0.65rem;
}

.choice-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.3rem;
}

.choice-card p {
    font-size: 0.82rem;
    color: var(--ze-text-muted);
    margin: 0;
    line-height: 1.4;
}

/* Forms */
.form-label {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--ze-text);
    margin-bottom: 0.35rem;
}

.form-control, .form-select {
    border-radius: 10px;
    border-color: var(--ze-border);
    background: var(--ze-surface-2);
    padding: 0.6rem 0.85rem;
    font-size: 0.95rem;
}

/* Select con flecha visible (tema claro) */
.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 2.25rem;
    background-color: var(--ze-surface-2);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%235c6b7f' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 14px 10px;
    cursor: pointer;
}

.form-select:focus {
    border-color: var(--ze-primary);
    box-shadow: 0 0 0 3px var(--ze-primary-soft);
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%232563eb' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 14px 10px;
}

.form-control:focus {
    border-color: var(--ze-primary);
    box-shadow: 0 0 0 3px var(--ze-primary-soft);
    background: #fff;
}

/* Móvil/tablet: Safari iOS hace zoom forzado al enfocar cualquier campo con
   font-size < 16px, y hay que pellizcar para volver. Se fuerzan 16px por debajo
   del breakpoint de la topbar; el padding compacto de los -sm se conserva para
   no descuadrar los formularios densos (editor de item, find_item, guilds…). */
@media (max-width: 991.98px) {
    .form-control,
    .form-select,
    .form-control-sm,
    .form-select-sm,
    .input-group-text,
    .swal2-input,
    .swal2-textarea,
    .swal2-select {
        font-size: 16px;
    }
}

.btn {
    border-radius: 10px;
    font-weight: 600;
    padding: 0.55rem 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

.btn.is-loading,
.btn[data-ze-busy="1"] {
    pointer-events: none;
    opacity: 0.85;
    cursor: wait;
}

.btn .ze-btn-loading-text {
    line-height: 1.2;
}

/* ── Spinners / loading blocks / panel busy overlay ─────── */

@keyframes ze-spin {
    to { transform: rotate(360deg); }
}

@keyframes ze-pulse-soft {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

.ze-spinner {
    display: inline-block;
    width: 1.35rem;
    height: 1.35rem;
    border: 2.5px solid rgba(37, 99, 235, 0.2);
    border-top-color: var(--ze-primary);
    border-radius: 50%;
    animation: ze-spin 0.7s linear infinite;
    flex-shrink: 0;
    vertical-align: middle;
}

.ze-spinner-sm {
    width: 0.95rem;
    height: 0.95rem;
    border-width: 2px;
}

.ze-spinner-lg {
    width: 2.25rem;
    height: 2.25rem;
    border-width: 3px;
    border-color: rgba(37, 99, 235, 0.18);
    border-top-color: var(--ze-primary);
}

.btn-save .ze-spinner,
.btn-primary .ze-spinner,
.btn-danger .ze-spinner,
.btn-success .ze-spinner,
.btn-warning .ze-spinner,
.btn-secondary .ze-spinner {
    border-color: rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
}

.ze-loading-host,
.ze-loading-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.75rem 1rem;
    text-align: center;
    color: var(--ze-text-muted);
    min-height: 5rem;
}

.ze-loading-block .ze-loading-text {
    font-size: 0.92rem;
    font-weight: 500;
    animation: ze-pulse-soft 1.4s ease-in-out infinite;
}

.ze-busy-host {
    position: relative;
}

.ze-busy-overlay {
    position: absolute;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(238, 241, 246, 0.72);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: inherit;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.ze-busy-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    cursor: wait;
}

.ze-busy-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.15rem 1.5rem;
    background: #fff;
    border: 1px solid var(--ze-border);
    border-radius: 14px;
    box-shadow: var(--ze-shadow);
    min-width: 140px;
    max-width: 90%;
}

.ze-busy-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ze-text);
    text-align: center;
}

.modal-content.ze-busy-host .ze-busy-overlay,
.modal-content > .ze-busy-overlay {
    border-radius: var(--bs-modal-border-radius, 0.5rem);
}

.app-main.ze-busy-host {
    min-height: 12rem;
}

.btn-primary {
    background: var(--ze-primary);
    border-color: var(--ze-primary);
    color: #fff;
}

.btn-primary:hover, .btn-primary:focus {
    background: var(--ze-primary-hover);
    border-color: var(--ze-primary-hover);
    color: #fff;
}

/* Botones sólidos (evitar outline en tema claro) */
.btn-secondary {
    background: #5c6b7f;
    border-color: #5c6b7f;
    color: #fff;
}
.btn-secondary:hover, .btn-secondary:focus {
    background: #4a5668;
    border-color: #4a5668;
    color: #fff;
}

.btn-danger {
    background: var(--ze-danger);
    border-color: var(--ze-danger);
    color: #fff;
}
.btn-danger:hover, .btn-danger:focus {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #fff;
}

.btn-warning {
    background: var(--ze-warning);
    border-color: var(--ze-warning);
    color: #fff;
}

/*
 * Jerarquía de acciones:
 *  - btn-save  → acción principal de persistir (verde, se distingue del primary azul)
 *  - btn-tool  → atajos / módulos (suave, no compite con Guardar)
 *  - btn-secondary → cancelar / neutro
 */
.btn-save {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
    border-color: #047857;
    color: #fff !important;
    font-weight: 650;
    box-shadow: 0 1px 2px rgba(5, 150, 105, 0.25);
}
.btn-save:hover,
.btn-save:focus {
    background: linear-gradient(180deg, #059669 0%, #047857 100%);
    border-color: #065f46;
    color: #fff !important;
}
.btn-save:disabled,
.btn-save.disabled {
    background: #86efac;
    border-color: #6ee7b7;
    color: #fff !important;
    opacity: 0.75;
    box-shadow: none;
}
.btn-save .ze-spinner {
    border-color: rgba(255,255,255,0.35);
    border-top-color: #fff;
}

.btn-tool {
    background: #fff;
    border: 1px solid var(--ze-border);
    color: var(--ze-text);
    font-weight: 550;
}
.btn-tool:hover,
.btn-tool:focus {
    background: var(--ze-primary-soft);
    border-color: color-mix(in srgb, var(--ze-primary) 35%, var(--ze-border));
    color: var(--ze-primary);
}
.btn-tool.btn-sm {
    font-weight: 550;
}

/* Footer de modal: herramientas arriba/izq · Cancelar+Guardar abajo a la derecha */
.modal-footer.modal-footer-ze {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding-top: 0.85rem;
}
.modal-footer-ze .modal-footer-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: flex-start;
}
.modal-footer-ze .modal-footer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
    align-items: center;
    padding-top: 0.65rem;
    border-top: 1px solid var(--ze-border);
    margin-top: 0.15rem;
}

/* Acciones de formulario en paneles (no modal) */
.ze-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
    align-items: center;
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--ze-border);
}
.ze-form-actions-start {
    justify-content: flex-start;
}
.ze-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}
.btn-warning:hover, .btn-warning:focus {
    background: #b45309;
    border-color: #b45309;
    color: #fff;
}

.btn-success {
    background: var(--ze-success);
    border-color: var(--ze-success);
    color: #fff;
}

/* Compat: outline → mismo aspecto sólido */
.btn-outline-secondary {
    background: #5c6b7f;
    border-color: #5c6b7f;
    color: #fff;
}
.btn-outline-secondary:hover {
    background: #4a5668;
    border-color: #4a5668;
    color: #fff;
}
.btn-outline-danger {
    background: var(--ze-danger);
    border-color: var(--ze-danger);
    color: #fff;
}
.btn-outline-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #fff;
}
.btn-outline-warning {
    background: var(--ze-warning);
    border-color: var(--ze-warning);
    color: #fff;
}
.btn-outline-warning:hover {
    background: #b45309;
    border-color: #b45309;
    color: #fff;
}
.btn-outline-primary {
    background: var(--ze-primary);
    border-color: var(--ze-primary);
    color: #fff;
}
.btn-outline-primary:hover {
    background: var(--ze-primary-hover);
    border-color: var(--ze-primary-hover);
    color: #fff;
}

.form-text { color: var(--ze-text-muted); font-size: 0.8rem; }

.auth-footer-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.auth-footer-links a {
    color: var(--ze-text-muted);
    text-decoration: none;
    font-size: 0.85rem;
}

.auth-footer-links a:hover { color: var(--ze-primary); }

/* License list */
.license-item {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    background: var(--ze-surface-2);
    border: 1.5px solid var(--ze-border);
    border-radius: var(--ze-radius);
    padding: 1rem 1.1rem;
    margin-bottom: 0.75rem;
    transition: border-color .15s;
}

.license-item:hover { border-color: #b8c5d8; }

.license-item .lic-key {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ze-primary);
}

.license-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.8rem;
    color: var(--ze-text-muted);
}

/* ── App shell (logged in) ────────────────────────────────── */

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    background: var(--ze-surface);
    border-bottom: 1px solid var(--ze-border);
    box-shadow: var(--ze-shadow-sm);
    padding: 0.55rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    position: sticky;
    top: 0;
    z-index: 100;
    min-width: 0;
    flex-wrap: nowrap;
}

.app-topbar-start {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex: 1 1 auto;
}

.app-topbar .brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 700;
    color: var(--ze-text);
    text-decoration: none;
    flex-shrink: 0;
}

.app-topbar .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--ze-primary), #3b82f6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.app-topbar .user-meta {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.875rem;
    color: var(--ze-text-muted);
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
    background: var(--ze-surface);
    padding-left: 0.35rem;
}

.app-topbar .user-meta-name {
    white-space: nowrap;
    flex-shrink: 0;
    color: var(--ze-text);
    font-weight: 500;
}

.app-topbar .user-meta .badge-soft {
    flex-shrink: 0;
    white-space: nowrap;
}

.app-topbar .user-meta .btn {
    flex-shrink: 0;
}

/* Toggle menú (móvil / tablet) */
.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    padding: 0;
    border: 1px solid var(--ze-border);
    border-radius: 9px;
    background: var(--ze-surface-2, var(--ze-bg-accent));
    color: var(--ze-text);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s, border-color .15s, color .15s;
}

.nav-toggle:hover {
    background: var(--ze-bg-accent);
    border-color: color-mix(in srgb, var(--ze-primary) 35%, var(--ze-border));
    color: var(--ze-primary);
}

.app-topbar.nav-open .nav-toggle {
    background: var(--ze-primary-soft);
    border-color: color-mix(in srgb, var(--ze-primary) 40%, var(--ze-border));
    color: var(--ze-primary);
}

/* ── Nav horizontal (grupos + links) ─────────────────────────────────────── */
.app-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.15rem;
    min-width: 0;
    flex: 1 1 auto;
    overflow: visible;
}

.app-nav .nav-link-ze,
.app-nav .nav-dd-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.42rem 0.6rem;
    border-radius: 8px;
    color: var(--ze-text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background .15s, color .15s;
    white-space: nowrap;
    border: 0;
    background: transparent;
    cursor: pointer;
    line-height: 1.2;
    font-family: inherit;
}

.app-nav .nav-link-ze i,
.app-nav .nav-dd-toggle > i:first-child {
    font-size: 1.05rem;
    line-height: 1;
}

.app-nav .nav-link-ze:hover,
.app-nav .nav-dd-toggle:hover {
    background: var(--ze-bg-accent);
    color: var(--ze-text);
}

.app-nav .nav-link-ze.active,
.app-nav .nav-dd.is-current > .nav-dd-toggle,
.app-nav .nav-dd.is-open > .nav-dd-toggle {
    background: var(--ze-primary-soft);
    color: var(--ze-primary);
}

.nav-dd-caret {
    font-size: 0.7rem !important;
    opacity: 0.7;
    margin-left: 0.05rem;
    transition: transform .15s;
}

.nav-dd.is-open .nav-dd-caret {
    transform: rotate(180deg);
}

/* Dropdown desktop */
.nav-dd {
    position: relative;
    flex-shrink: 0;
}

.nav-dd-menu {
    display: none;
    position: absolute;
    /* Sin hueco: el gap hace que :hover se pierda al bajar el cursor */
    top: 100%;
    left: 0;
    min-width: 11.5rem;
    /* padding-top actúa de “puente” hover entre botón y opciones */
    padding: 0.4rem 0.35rem 0.35rem;
    margin: 0;
    background: var(--ze-surface);
    border: 1px solid var(--ze-border);
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
    z-index: 130;
}

.nav-dd.is-open > .nav-dd-menu {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

/* Últimos dropdowns: anclar a la derecha para no salirse */
.app-nav > .nav-dd:nth-last-child(-n+2) .nav-dd-menu {
    left: auto;
    right: 0;
}

.app-nav .nav-dd-item {
    width: 100%;
    justify-content: flex-start;
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    font-size: 0.875rem;
}

.app-nav .nav-dd-item .nav-link-label {
    display: inline !important;
}

.app-nav .nav-dd-item i {
    width: 1.2rem;
    text-align: center;
    font-size: 1rem;
}

.nav-backdrop {
    display: none;
}

body.nav-menu-open {
    overflow: hidden;
}

/* Desktop: el open/close lo maneja JS (con delay) para no “matar” el menú al bajar */
@media (min-width: 992px) {
    .nav-dd.is-open > .nav-dd-toggle {
        background: var(--ze-bg-accent);
        color: var(--ze-text);
    }
    .nav-dd.is-current.is-open > .nav-dd-toggle {
        background: var(--ze-primary-soft);
        color: var(--ze-primary);
    }
}

/* Móvil / tablet: panel hamburguesa + accordion de grupos */
@media (max-width: 991.98px) {
    .nav-toggle {
        display: inline-flex;
    }

    .app-nav {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        flex-direction: column;
        /* Imprescindible: la regla base trae flex-wrap:wrap y, en columna con
           max-height, el contenido que no cabe se envuelve en una SEGUNDA COLUMNA
           lateral que overflow-x:hidden recorta. Al abrir un grupo con varios
           hijos (Tools) sus opciones se iban fuera de pantalla. Con nowrap, lo
           que no cabe se desplaza en vertical, que es lo que se espera. */
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 0.15rem;
        padding: 0.65rem 0.85rem 0.9rem;
        background: var(--ze-surface);
        border-bottom: 1px solid var(--ze-border);
        box-shadow: var(--ze-shadow);
        max-height: min(78vh, 36rem);
        overflow-x: hidden;
        overflow-y: auto;
        z-index: 101;
        flex: none;
    }

    .app-topbar.nav-open .app-nav {
        display: flex;
    }

    .app-nav .nav-link-ze,
    .app-nav .nav-dd-toggle {
        width: 100%;
        padding: 0.7rem 0.85rem;
        border-radius: 10px;
        font-size: 0.95rem;
        justify-content: flex-start;
    }

    .app-nav .nav-dd-toggle {
        justify-content: space-between;
    }

    .app-nav .nav-dd-toggle .nav-link-label {
        flex: 1;
        text-align: left;
    }

    .app-nav .nav-link-ze i,
    .app-nav .nav-dd-toggle > i:first-child {
        font-size: 1.1rem;
        width: 1.35rem;
        text-align: center;
    }

    .nav-dd {
        width: 100%;
    }

    .nav-dd-menu {
        position: static;
        display: none;
        min-width: 0;
        margin: 0.15rem 0 0.25rem 0.5rem;
        padding: 0.25rem;
        border-radius: 10px;
        box-shadow: none;
        background: var(--ze-surface-2, var(--ze-bg-accent));
        border-color: transparent;
    }

    .nav-dd.is-open > .nav-dd-menu {
        display: flex;
    }

    .app-nav > .nav-dd:nth-last-child(-n+2) .nav-dd-menu {
        left: auto;
        right: auto;
    }

    .nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        top: 0;
        background: rgba(15, 23, 42, 0.35);
        z-index: 99;
        border: 0;
        padding: 0;
        margin: 0;
        cursor: pointer;
    }

    .nav-backdrop[hidden] {
        display: none !important;
    }

    .app-topbar .user-meta {
        max-width: none;
    }
}

.ze-table thead th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--ze-text-muted);
    font-weight: 600;
    border-bottom-width: 1px;
    background: var(--ze-surface-2);
}

.ze-table tbody td {
    border-color: var(--ze-border);
    font-size: 0.92rem;
}

.modal-content {
    border: 1px solid var(--ze-border);
    border-radius: var(--ze-radius);
    box-shadow: var(--ze-shadow);
}

.modal-header, .modal-footer {
    border-color: var(--ze-border);
}

.input-group-text {
    border-color: var(--ze-border);
    color: var(--ze-text-muted);
}

.app-main-wide {
    max-width: 1280px;
}

/* Item grid */
.item-grid {
    display: grid;
    gap: 0;
    background: #1e2430;
    border: 1px solid #2c3545;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    user-select: none;
}

.ig-cell {
    width: 36px;
    height: 36px;
    box-sizing: border-box;
    border: 1px solid rgba(255,255,255,.06);
    background: #252b38;
}

.ig-cell:hover {
    background: #2e3648;
    cursor: pointer;
}

.ig-item {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #3a4558, #2a3242);
    border: 1px solid #5b6b88;
    border-radius: 4px;
    margin: 1px;
    cursor: pointer;
    overflow: hidden;
}

.ig-item img {
    max-width: 90%;
    max-height: 90%;
    image-rendering: pixelated;
    pointer-events: none;
}

.ig-item.selected {
    outline: 2px solid var(--ze-primary);
    outline-offset: -1px;
    z-index: 3;
}

.item-grid.is-moving {
    cursor: grabbing;
}

.item-grid.is-moving .ig-item {
    cursor: grabbing;
}

.ig-cell.drop-ok {
    background: rgba(5, 150, 105, 0.35) !important;
    box-shadow: inset 0 0 0 1px #059669;
}

.ig-cell.drop-bad {
    background: rgba(220, 38, 38, 0.25) !important;
    box-shadow: inset 0 0 0 1px #dc2626;
}

.ig-ghost {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.85;
    border: 2px solid var(--ze-primary);
    border-radius: 4px;
    background: linear-gradient(145deg, #3a4558, #2a3242);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0,0,0,.35);
}

.ig-ghost img {
    max-width: 90%;
    max-height: 90%;
    image-rendering: pixelated;
}

.ig-lvl {
    position: absolute;
    right: 1px;
    bottom: 0;
    font-size: 9px;
    font-weight: 700;
    color: #ffd666;
    text-shadow: 0 0 2px #000;
    pointer-events: none;
}

/* Equip slot bar */
.slot-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sb-slot {
    width: 72px;
    min-height: 80px;
    border: 1.5px solid var(--ze-border);
    border-radius: 10px;
    background: var(--ze-surface-2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.35rem;
    position: relative;
    cursor: pointer;
}

.sb-slot img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    image-rendering: pixelated;
}

.sb-slot .sb-label {
    font-size: 0.65rem;
    color: var(--ze-text-muted);
    text-align: center;
    line-height: 1.1;
}

.sb-slot.selected {
    border-color: var(--ze-primary);
    background: var(--ze-primary-soft);
}

.sb-slot.empty {
    opacity: 0.85;
}

/* ── Muun (pets) — misma disposición que la ventana MUUN Inventory del cliente:
      Main/Sub arriba y la bolsa de 4×5 paginada debajo. La cuadrícula es
      pequeña (4×5), así que aquí la celda y los slots van más grandes que en el
      inventario normal: con el tamaño por defecto no se distinguen los iconos. */
/* Ancho útil de la ventana = el de la cuadrícula. --muun-cell lo fija el JS
   desde BAG_CELL al pintar, para que no puedan desincronizarse. */
.muun-window {
    --muun-cell: 84px;
    --muun-panel-w: calc(var(--muun-cell) * 4);
}

.muun-layout {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1.25rem;
}

.muun-side {
    flex: 1 1 320px;
    min-width: 300px;
    max-width: 440px;
}

/* `.ze-card` se define MÁS ABAJO en este archivo y con la misma especificidad,
   así que su `padding: 1.25rem 1.35rem` ganaba a un `.muun-window { padding: 0 }`
   y metía ~43px de relleno lateral fantasma: en escritorio sobraba sitio, pero
   en móvil sacaba la ventana fuera de pantalla y obligaba a alejar con zoom.
   Se sube la especificidad para que gane la regla del módulo. */
.ze-card.muun-window {
    width: max-content;
    padding: 0;
    overflow: hidden;
}

.muun-window-title {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #cbd5e1;
    text-align: center;
    padding: 0.7rem 1rem;
    background: linear-gradient(180deg, #2b3446, #1e2430);
    border-bottom: 1px solid #2c3545;
}

/* Todo el interior es un panel oscuro, como la ventana del juego: así los
   slots Main/Sub y la bolsa se leen como una sola pieza. */
.muun-window-body {
    background: #161b25;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
}

.muun-equip-box,
.muun-reserved-box,
.muun-bag-box {
    width: var(--muun-panel-w);
}

/* `.ig-cell` mide 36px fijos (el tamaño por defecto del grid). Aquí las pistas
   son de --muun-cell, así que cada celda se quedaba pequeña dentro de su hueco
   y la cuadrícula salía llena de huecos. Se estira a su área. */
.muun-bag-box .ig-cell {
    width: 100%;
    height: 100%;
}

.muun-equip-box .slot-bar,
.muun-reserved-box .slot-bar {
    gap: 0.5rem;
    flex-wrap: nowrap;
}

/* Main / Sub: mismas celdas oscuras que la bolsa, repartidas a lo ancho */
.muun-window .sb-slot {
    flex: 1 1 0;
    width: auto;
    min-height: calc(var(--muun-cell) + 26px);
    border: 1px solid #2c3545;
    border-radius: 8px;
    background: #252b38;
    gap: 0.2rem;
}

.muun-window .sb-slot:hover {
    background: #2e3648;
}

.muun-window .sb-slot img {
    width: calc(var(--muun-cell) - 12px);
    height: calc(var(--muun-cell) - 12px);
}

.muun-window .sb-slot .sb-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
}

.muun-window .sb-slot.selected {
    border-color: var(--ze-primary);
    background: #2e3a55;
}

.muun-reserved-box .inv-combined-title,
.muun-reserved-box .form-text {
    color: #94a3b8;
    text-align: center;
}

.muun-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: var(--muun-panel-w);
}

.muun-pager-label {
    font-size: 0.95rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #cbd5e1;
    min-width: 4rem;
    text-align: center;
}

@media (max-width: 575.98px) {
    .muun-window {
        width: 100%;
    }

    /* La celda de la bolsa ya se calcula del ancho disponible (ver muun.php),
       así que el contenido cabe y no hace falta desplazarlo en horizontal ni
       alinearlo a la izquierda: se deja centrado como en escritorio. */
    .muun-window-body {
        padding: 0.75rem;
    }

    /* Sin esto el panel lateral fuerza 300px y desborda en teléfonos de 320px */
    .muun-side {
        min-width: 0;
        max-width: none;
    }
}

.muun-page-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.muun-page-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    padding: 0.2rem 0.55rem;
    border: 1px solid var(--ze-border);
    border-radius: 999px;
    background: var(--ze-surface-2);
    color: var(--ze-text-muted);
    cursor: pointer;
}

.muun-page-chip.active {
    border-color: var(--ze-primary);
    background: var(--ze-primary-soft);
    color: var(--ze-text);
}

/* Catalog */
.catalog-list {
    max-height: 420px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.catalog-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-align: left;
    border: 1px solid var(--ze-border);
    background: var(--ze-surface-2);
    border-radius: 8px;
    padding: 0.4rem 0.55rem;
    cursor: pointer;
    width: 100%;
}

.catalog-item:hover, .catalog-item.active {
    border-color: var(--ze-primary);
    background: var(--ze-primary-soft);
}

.catalog-item img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    image-rendering: pixelated;
}

.catalog-item strong {
    font-size: 0.82rem;
}

.ie-preview {
    width: 72px;
    height: 72px;
    object-fit: contain;
    image-rendering: pixelated;
    background: #1e2430;
    border-radius: 8px;
    padding: 6px;
}

.inv-tabs .nav-link {
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--ze-text-muted);
    background: var(--ze-surface-2);
    border: 1px solid var(--ze-border);
    padding: 0.35rem 0.85rem;
}

.inv-tabs .nav-link.active {
    background: var(--ze-primary);
    border-color: var(--ze-primary);
    color: #fff;
}

.inv-panel-host {
    overflow: auto;
    max-width: 100%;
}

.catalog-list-modal {
    max-height: 200px;
    border: 1px solid var(--ze-border);
    border-radius: 8px;
    padding: 0.35rem;
    background: var(--ze-surface-2);
}

.ie-exc-box {
    max-height: 180px;
    overflow: auto;
    border: 1px solid var(--ze-border);
    border-radius: 8px;
    padding: 0.5rem 0.65rem;
    background: var(--ze-surface-2);
}

/* ── Inventario unificado: equipo + bag ──────────────────────── */
.inv-combined {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem 1.75rem;
    align-items: flex-start;
    justify-content: center;
}

.inv-combined-equip {
    flex: 0 0 auto;
}

.inv-combined-bag {
    flex: 1 1 280px;
    min-width: 0;
    overflow: auto;
}

.inv-combined-title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ze-text-muted);
    margin-bottom: 0.5rem;
}

.inv-combined-ext {
    justify-content: flex-start;
    gap: 1.5rem 2rem;
}

.inv-combined-ext .inv-combined-bag {
    flex: 0 0 auto;
}

/* ── Paper-doll equipo (estilo MU / equip.png) ───────────────── */
.equip-host {
    display: flex;
    justify-content: center;
    padding: 0;
}

.equip-doll {
    width: 100%;
    max-width: 420px;
}

.ed-grid {
    display: grid;
    grid-template-columns: 88px 100px 88px;
    grid-template-rows: 72px 110px 72px 52px;
    gap: 8px;
    justify-content: center;
    align-items: center;
    justify-items: center;
    padding: 12px;
    background:
        radial-gradient(ellipse at center, #2a3140 0%, #1a1f2a 70%);
    border-radius: 14px;
    border: 1px solid #2c3545;
}

/* Visual: sin fila de anillos */
.ed-grid-visual {
    grid-template-rows: 72px 110px 72px;
}

.ed-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.ed-pet   { grid-column: 1; grid-row: 1; }
.ed-helm  { grid-column: 2; grid-row: 1; }
.ed-wings { grid-column: 3; grid-row: 1; }
.ed-wepr  { grid-column: 1; grid-row: 2; }
.ed-armor-wrap {
    grid-column: 2;
    grid-row: 2;
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ed-wepl  { grid-column: 3; grid-row: 2; }
.ed-gloves{ grid-column: 1; grid-row: 3; }
.ed-pants { grid-column: 2; grid-row: 3; }
.ed-boots { grid-column: 3; grid-row: 3; }
.ed-ring1 { grid-column: 1; grid-row: 4; justify-self: end; }
.ed-ring-gap { grid-column: 2; grid-row: 4; }
.ed-ring2 { grid-column: 3; grid-row: 4; justify-self: start; }

.ed-pendant-wrap {
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.ed-slot {
    width: 72px;
    height: 72px;
    border: 2px solid #3d4a5c;
    border-radius: 10px;
    background: linear-gradient(160deg, #2c3344 0%, #1e2430 100%);
    box-shadow: inset 0 0 12px rgba(0,0,0,.35);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 4px;
    position: relative;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, transform .1s;
}

.ed-slot:hover {
    border-color: #5b6b88;
    transform: translateY(-1px);
}

.ed-slot.selected {
    border-color: var(--ze-primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35), inset 0 0 12px rgba(0,0,0,.35);
}

.ed-slot.ed-tall {
    width: 72px;
    height: 100px;
}

.ed-slot.ed-wide {
    width: 84px;
    height: 72px;
}

.ed-slot.ed-armor {
    width: 92px;
    height: 100px;
}

.ed-slot.ed-small {
    width: 44px;
    height: 44px;
    border-radius: 8px;
}

.ed-slot img {
    max-width: 85%;
    max-height: 70%;
    object-fit: contain;
    image-rendering: pixelated;
    pointer-events: none;
}

.ed-slot.ed-small img {
    max-height: 75%;
}

.ed-slot .ed-label {
    font-size: 0.58rem;
    color: #8b9bb0;
    text-align: center;
    line-height: 1.1;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ed-slot.ed-small .ed-label {
    font-size: 0.5rem;
}

.ed-slot.empty .ed-placeholder {
    width: 40%;
    height: 40%;
    border: 1px dashed #4a5568;
    border-radius: 4px;
    opacity: 0.5;
}

.ed-slot .ig-lvl {
    right: 3px;
    bottom: 14px;
}

@media (max-width: 480px) {
    .ed-grid {
        grid-template-columns: 70px 80px 70px;
        grid-template-rows: 60px 90px 60px 44px;
        gap: 6px;
    }
    .ed-slot { width: 60px; height: 60px; }
    .ed-slot.ed-tall { width: 60px; height: 84px; }
    .ed-slot.ed-armor { width: 76px; height: 84px; }
    .ed-slot.ed-wide { width: 70px; height: 60px; }
    .ed-slot.ed-small { width: 38px; height: 38px; }
}

.app-main {
    flex: 1;
    padding: 1.5rem 1.25rem 2.5rem;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}

.page-title {
    font-size: 1.45rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}

.page-subtitle {
    color: var(--ze-text-muted);
    margin: 0 0 1.5rem;
    font-size: 0.95rem;
}

.ze-card {
    background: var(--ze-surface);
    border: 1px solid var(--ze-border);
    border-radius: var(--ze-radius);
    box-shadow: var(--ze-shadow-sm);
    padding: 1.25rem 1.35rem;
    margin-bottom: 1rem;
}

.ze-card h2 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 1rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.85rem;
}

.stat-item {
    background: var(--ze-surface-2);
    border: 1px solid var(--ze-border);
    border-radius: 10px;
    padding: 0.85rem 1rem;
}

.stat-item .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ze-text-muted);
    margin-bottom: 0.25rem;
}

.stat-item .value {
    font-weight: 600;
    font-size: 0.95rem;
    word-break: break-all;
}

/* ── Dashboard stats ─────────────────────────────────────── */

.dash-stats-card {
    border-top: 3px solid #2563eb;
    background:
        radial-gradient(ellipse 70% 80% at 0% 0%, rgba(37, 99, 235, 0.06), transparent 55%),
        radial-gradient(ellipse 50% 60% at 100% 100%, rgba(5, 150, 105, 0.05), transparent 50%),
        var(--ze-surface);
}

.dash-stats-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 8px;
    margin-right: 0.4rem;
    vertical-align: -0.25rem;
    color: #1d4ed8;
    background: rgba(37, 99, 235, 0.12);
    font-size: 0.95rem;
}

.dash-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.85rem;
}

@media (min-width: 992px) {
    .dash-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1400px) {
    .dash-stats-grid {
        grid-template-columns: repeat(7, 1fr);
    }
}

.dash-stat {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1rem 0.95rem;
    border-radius: 14px;
    border: 1px solid var(--ze-border);
    background: var(--ze-surface);
    box-shadow: var(--ze-shadow-sm);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.dash-stat::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--dash-tone, var(--ze-primary));
    opacity: 0.9;
}

.dash-stat.is-link {
    cursor: pointer;
}
.dash-stat.is-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 35, 50, 0.1);
    border-color: color-mix(in srgb, var(--dash-tone, var(--ze-primary)) 35%, var(--ze-border));
    color: inherit;
}

.dash-stat-icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: var(--dash-tone, var(--ze-primary));
    background: var(--dash-tone-soft, var(--ze-primary-soft));
}

.dash-stat-value {
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    color: var(--ze-text);
}

.dash-stat-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ze-text-muted);
    line-height: 1.25;
    margin-top: 0.15rem;
}

.dash-stat-blue   { --dash-tone: #2563eb; --dash-tone-soft: rgba(37, 99, 235, 0.12); }
.dash-stat-indigo { --dash-tone: #4f46e5; --dash-tone-soft: rgba(79, 70, 229, 0.12); }
.dash-stat-violet { --dash-tone: #7c3aed; --dash-tone-soft: rgba(124, 58, 237, 0.12); }
.dash-stat-green  { --dash-tone: #059669; --dash-tone-soft: rgba(5, 150, 105, 0.12); }
.dash-stat-red    { --dash-tone: #dc2626; --dash-tone-soft: rgba(220, 38, 38, 0.12); }
.dash-stat-orange { --dash-tone: #ea580c; --dash-tone-soft: rgba(234, 88, 12, 0.12); }
.dash-stat-amber  { --dash-tone: #d97706; --dash-tone-soft: rgba(217, 119, 6, 0.14); }

.dash-stats-empty {
    text-align: center;
    padding: 2rem 1rem;
    border: 1px dashed var(--ze-border);
    border-radius: 12px;
    background: var(--ze-surface-2);
}
.dash-stats-empty-icon {
    font-size: 2rem;
    color: var(--ze-text-muted);
    opacity: 0.55;
    margin-bottom: 0.5rem;
}

.dash-stats-foot {
    border-top: 1px solid var(--ze-border);
    padding-top: 0.75rem;
}

.badge-soft {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--ze-primary-soft);
    color: var(--ze-primary);
}

.badge-soft.success {
    background: rgba(5, 150, 105, 0.12);
    color: var(--ze-success);
}

.badge-soft.warning {
    background: rgba(217, 119, 6, 0.12);
    color: var(--ze-warning);
}

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

.feature-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--ze-border);
    font-size: 0.95rem;
}

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

/* Accesos directos del dashboard */
.dash-modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 0.65rem;
}

.dash-module-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.9rem 0.95rem;
    border-radius: 12px;
    border: 1px solid var(--ze-border);
    background: var(--ze-surface-2, var(--ze-bg-accent));
    text-decoration: none;
    color: var(--ze-text);
    min-height: 6.25rem;
    position: relative;
    transition: border-color .15s, box-shadow .15s, transform .12s, background .15s;
}

a.dash-module-tile:hover {
    border-color: color-mix(in srgb, var(--dash-mod-tone, var(--ze-primary)) 40%, var(--ze-border));
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07);
    transform: translateY(-1px);
    background: var(--ze-surface);
    color: var(--ze-text);
}

.dash-module-tile.is-disabled {
    opacity: 0.62;
    cursor: not-allowed;
}

.dash-module-icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: var(--dash-mod-tone, var(--ze-primary));
    background: var(--dash-mod-soft, var(--ze-primary-soft));
}

.dash-module-label {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.25;
}

.dash-module-arrow {
    position: absolute;
    right: 0.65rem;
    top: 0.65rem;
    color: var(--ze-text-muted);
    font-size: 1.25rem;
    line-height: 1;
    opacity: 0.55;
}

a.dash-module-tile:hover .dash-module-arrow {
    color: var(--dash-mod-tone, var(--ze-primary));
    opacity: 1;
}

.dash-module-badge {
    font-size: 0.68rem;
    margin-top: auto;
}

.dash-module-blue   { --dash-mod-tone: #2563eb; --dash-mod-soft: rgba(37, 99, 235, 0.12); }
.dash-module-indigo { --dash-mod-tone: #4f46e5; --dash-mod-soft: rgba(79, 70, 229, 0.12); }
.dash-module-violet { --dash-mod-tone: #7c3aed; --dash-mod-soft: rgba(124, 58, 237, 0.12); }
.dash-module-green  { --dash-mod-tone: #059669; --dash-mod-soft: rgba(5, 150, 105, 0.12); }
.dash-module-red    { --dash-mod-tone: #dc2626; --dash-mod-soft: rgba(220, 38, 38, 0.12); }
.dash-module-orange { --dash-mod-tone: #ea580c; --dash-mod-soft: rgba(234, 88, 12, 0.12); }
.dash-module-amber  { --dash-mod-tone: #d97706; --dash-mod-soft: rgba(217, 119, 6, 0.14); }

@media (max-width: 576px) {
    .dash-modules-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ── Backups SQL ─────────────────────────────────────────────────────────── */
.bk-sched-card .form-label {
    font-size: 0.82rem;
    margin-bottom: 0.35rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--ze-text);
}

.bk-sched-fields {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 0.9rem 1rem;
    align-items: end;
}

.bk-field {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.bk-field .form-select,
.bk-field .form-control {
    width: 100%;
}

/* Tipo de copia en fila aparte (no compite con el resto) */
.bk-sched-mode-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem 1.25rem;
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px dashed var(--ze-border);
}

.bk-field-mode {
    flex: 0 1 220px;
    min-width: 180px;
    max-width: 280px;
}

.bk-sched-mode-row .form-text {
    flex: 1 1 220px;
    margin: 0;
    padding-bottom: 0.15rem;
    max-width: 28rem;
    line-height: 1.4;
}

.bk-sched-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-top: 1px solid var(--ze-border);
    margin-top: 0.5rem;
    padding-top: 0.85rem;
}

@media (min-width: 992px) {
    .bk-sched-fields {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.bk-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.65rem;
}

.bk-status-item {
    padding: 0.7rem 0.85rem;
    border-radius: 10px;
    border: 1px solid var(--ze-border);
    background: var(--ze-surface-2, var(--ze-bg-accent));
}

.bk-status-item.is-running {
    border-color: color-mix(in srgb, #d97706 45%, var(--ze-border));
    background: rgba(217, 119, 6, 0.1);
}

.bk-status-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ze-text-muted);
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.bk-status-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ze-text);
    line-height: 1.3;
}

.bk-status-sub {
    margin-top: 0.15rem;
    word-break: break-all;
}

.bk-usage-bar {
    height: 0.55rem;
    border-radius: 999px;
    background: var(--ze-bg-accent);
    border: 1px solid var(--ze-border);
    overflow: hidden;
}

.bk-usage-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    transition: width .35s ease, background .2s;
}

.bk-usage-fill.is-warn {
    background: linear-gradient(90deg, #d97706, #f59e0b);
}

.bk-usage-fill.is-danger {
    background: linear-gradient(90deg, #dc2626, #ef4444);
}

/* ── Dashboard: Tools / Configuraciones ──────────────────────────────────── */
.dash-tools-card {
    margin-top: 1rem;
}

.dash-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.75rem;
}

.dash-tool-tile {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.95rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--ze-border);
    background: var(--ze-surface-2, var(--ze-bg-accent));
    text-decoration: none;
    color: var(--ze-text);
    position: relative;
    min-height: 4.5rem;
    transition: border-color .15s, box-shadow .15s, transform .12s, background .15s;
}

a.dash-tool-tile:hover {
    border-color: color-mix(in srgb, var(--dash-tool-tone, var(--ze-primary)) 40%, var(--ze-border));
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07);
    transform: translateY(-1px);
    background: var(--ze-surface);
    color: var(--ze-text);
}

.dash-tool-tile.is-disabled {
    opacity: 0.62;
    cursor: not-allowed;
}

.dash-tool-icon {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    color: var(--dash-tool-tone, var(--ze-primary));
    background: var(--dash-tool-soft, var(--ze-primary-soft));
}

.dash-tool-body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    padding-right: 1.25rem;
}

.dash-tool-label {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.25;
}

.dash-tool-desc {
    font-size: 0.78rem;
    color: var(--ze-text-muted);
    line-height: 1.35;
}

.dash-tool-arrow {
    position: absolute;
    right: 0.65rem;
    top: 0.75rem;
    color: var(--ze-text-muted);
    font-size: 1.25rem;
    opacity: 0.55;
}

a.dash-tool-tile:hover .dash-tool-arrow {
    color: var(--dash-tool-tone, var(--ze-primary));
    opacity: 1;
}

.dash-tool-badge {
    font-size: 0.68rem;
    margin-top: 0.25rem;
    align-self: flex-start;
}

.dash-tool-slate {
    --dash-tool-tone: #475569;
    --dash-tool-soft: rgba(71, 85, 105, 0.12);
}

.dash-tool-danger {
    --dash-tool-tone: #dc2626;
    --dash-tool-soft: rgba(220, 38, 38, 0.12);
}

/* ── Mantenimiento (SQL Maker) ───────────────────────────────────────────── */
.mnt-warn {
    font-size: 0.9rem;
}

.mnt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.mnt-card-head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.mnt-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.mnt-icon-empty {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.12);
}

.mnt-icon-inactive {
    color: #d97706;
    background: rgba(217, 119, 6, 0.12);
}

.mnt-icon-banned {
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.12);
}

.mnt-icon-logs {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.12);
}

.mnt-stat {
    margin-top: 0.85rem;
    padding: 0.65rem 0.8rem;
    border-radius: 10px;
    background: var(--ze-surface-2, var(--ze-bg-accent));
    border: 1px solid var(--ze-border);
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}

.mnt-stat-label {
    font-size: 0.82rem;
    color: var(--ze-text-muted);
}

.mnt-stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--ze-text);
}

.mnt-logs-info {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.mnt-log-db {
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    background: var(--ze-surface-2, var(--ze-bg-accent));
    border: 1px solid var(--ze-border);
}

/* ── Dashboard: módulos + chat ───────────────────────────────────────────── */
.dash-bottom-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: stretch;
}

@media (min-width: 992px) {
    .dash-bottom-grid {
        grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    }
}

.dash-chat-card {
    display: flex;
    flex-direction: column;
    min-height: 420px;
    max-height: 560px;
    padding-bottom: 0.9rem;
}

.dash-chat-card > h2 {
    margin-bottom: 0.35rem;
}

.chat-room-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
}

.chat-room-tabs .chat-tab {
    border: 1px solid var(--ze-border);
    background: var(--ze-surface-2, var(--ze-bg-accent));
    color: var(--ze-text-muted);
    border-radius: 999px;
    padding: 0.3rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}

.chat-room-tabs .chat-tab:hover {
    color: var(--ze-text);
    border-color: color-mix(in srgb, var(--ze-primary) 30%, var(--ze-border));
}

.chat-room-tabs .chat-tab.active {
    background: var(--ze-primary-soft);
    color: var(--ze-primary);
    border-color: color-mix(in srgb, var(--ze-primary) 40%, var(--ze-border));
}

.chat-room-hint {
    font-size: 0.78rem;
    color: var(--ze-text-muted);
    margin-bottom: 0.65rem;
}

.chat-messages {
    flex: 1 1 auto;
    min-height: 220px;
    max-height: 340px;
    overflow-y: auto;
    border: 1px solid var(--ze-border);
    border-radius: 12px;
    background: var(--ze-bg, #f8fafc);
    padding: 0.65rem 0.7rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.chat-empty {
    margin: auto;
    text-align: center;
    color: var(--ze-text-muted);
    padding: 1.5rem 0.75rem;
    font-size: 0.9rem;
}

.chat-empty i {
    font-size: 1.6rem;
    display: block;
    margin-bottom: 0.35rem;
    opacity: 0.7;
}

.chat-msg {
    max-width: 92%;
    align-self: flex-start;
    background: var(--ze-surface);
    border: 1px solid var(--ze-border);
    border-radius: 12px 12px 12px 4px;
    padding: 0.45rem 0.65rem 0.55rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.chat-msg.is-mine {
    align-self: flex-end;
    border-radius: 12px 12px 4px 12px;
    background: color-mix(in srgb, var(--ze-primary) 8%, var(--ze-surface));
    border-color: color-mix(in srgb, var(--ze-primary) 22%, var(--ze-border));
}

.chat-msg.is-master {
    border-left: 3px solid #d97706;
}

.chat-msg.is-mine.is-master {
    border-left: 0;
    border-right: 3px solid #d97706;
}

.chat-msg-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem 0.4rem;
    margin-bottom: 0.15rem;
}

.chat-msg-name {
    font-weight: 700;
    font-size: 0.84rem;
    color: var(--ze-text);
}

.chat-msg-time {
    font-size: 0.72rem;
    color: var(--ze-text-muted);
    margin-left: auto;
}

.chat-msg-sub {
    font-size: 0.72rem;
    color: var(--ze-text-muted);
    margin-bottom: 0.2rem;
}

.chat-msg-body {
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 0.12rem 0.4rem;
    border-radius: 999px;
    line-height: 1.2;
}

.chat-badge-master {
    background: rgba(217, 119, 6, 0.16);
    color: #b45309;
}

.chat-badge-secondary {
    background: rgba(100, 116, 139, 0.14);
    color: #475569;
}

/* Popover de emojis (flotante, no empuja el layout del chat) */
.chat-emoji-wrap {
    position: relative;
    flex-shrink: 0;
}

.chat-emoji-popover {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    z-index: 40;
    width: min(17.5rem, calc(100vw - 2.5rem));
    max-height: 11.5rem;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 0.1rem;
    padding: 0.45rem;
    border: 1px solid var(--ze-border);
    border-radius: 12px;
    background: var(--ze-surface);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16), 0 2px 8px rgba(15, 23, 42, 0.08);
}

.chat-emoji-popover[hidden] {
    display: none !important;
}

.chat-emoji-popover::after {
    content: '';
    position: absolute;
    left: 0.85rem;
    bottom: -6px;
    width: 10px;
    height: 10px;
    background: var(--ze-surface);
    border-right: 1px solid var(--ze-border);
    border-bottom: 1px solid var(--ze-border);
    transform: rotate(45deg);
}

.chat-emoji-btn {
    border: 0;
    background: transparent;
    border-radius: 8px;
    font-size: 1.15rem;
    line-height: 1.35;
    cursor: pointer;
    padding: 0.2rem 0.1rem;
}

.chat-emoji-btn:hover {
    background: var(--ze-bg-accent);
}

.chat-composer {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-top: 0.55rem;
}

.chat-composer .form-control {
    width: 100%;
    resize: vertical;
    min-height: 4.25rem;
    max-height: 9rem;
    font-size: 0.92rem;
}

.chat-composer-bar {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.chat-composer-bar .chat-counter {
    flex: 1 1 auto;
    margin: 0;
    text-align: left;
}

.chat-composer-bar #chatSendBtn {
    margin-left: auto;
    flex-shrink: 0;
}

.chat-counter {
    font-size: 0.72rem;
    color: var(--ze-text-muted);
}

.chat-counter.is-warn {
    color: #b45309;
}

@media (max-width: 576px) {
    .dash-chat-card {
        min-height: 380px;
        max-height: none;
    }
    .chat-messages {
        max-height: 280px;
    }
}

/* Item expirable */
.ie-expire-box {
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--ze-border);
    border-radius: 10px;
    background: var(--ze-bg, #f8fafc);
}
.ie-expire-days {
    width: 5.5rem;
}

/* ── Paquetes de sockets (item editor) ───────────────────────────────────── */
.ie-sock-pack-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.ie-sock-pack-row .form-select {
    flex: 1 1 auto;
    min-width: 0;
}

.spack-list {
    border: 1px solid var(--ze-border);
    border-radius: 10px;
    max-height: 280px;
    overflow-y: auto;
    background: var(--ze-bg, #f8fafc);
}

.spack-list-empty {
    padding: 1rem 0.75rem;
    text-align: center;
}

.spack-list-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--ze-border);
    background: transparent;
    padding: 0.55rem 0.7rem;
    text-align: left;
    cursor: pointer;
    color: var(--ze-text);
}

.spack-list-item:last-child {
    border-bottom: 0;
}

.spack-list-item:hover {
    background: var(--ze-bg-accent);
}

.spack-list-item.is-active {
    background: var(--ze-primary-soft);
}

.spack-list-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.spack-list-meta {
    font-size: 0.72rem;
    color: var(--ze-text-muted);
    word-break: break-all;
}

/* Modal de paquetes (segundo modal): solo sube este modal, no el backdrop global */
#modalSockPack.modal {
    z-index: 1065;
}

.alert {
    border-radius: 10px;
    border: none;
    font-size: 0.9rem;
}

.alert-danger {
    background: rgba(220, 38, 38, 0.1);
    color: #b91c1c;
}

.alert-warning {
    background: rgba(217, 119, 6, 0.12);
    color: #b45309;
}

.alert-success {
    background: rgba(5, 150, 105, 0.12);
    color: #047857;
}

.alert-info {
    background: var(--ze-primary-soft);
    color: #1d4ed8;
}

/* ── Gremory Case ────────────────────────────────────────── */

.gc-send-card { border-top: 3px solid #2563eb; }
.gc-list-card { border-top: 3px solid #0d9488; }

.gc-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 8px;
    margin-right: 0.35rem;
    vertical-align: -0.2rem;
    font-size: 0.9rem;
}
.gc-icon-send { color: #1d4ed8; background: rgba(37, 99, 235, 0.12); }
.gc-icon-list { color: #0f766e; background: rgba(13, 148, 136, 0.12); }

.gc-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 640px;
    overflow: auto;
}
.gc-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--ze-border);
    border-radius: 10px;
    background: var(--ze-surface-2);
}
.gc-row-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
}
.gc-row-body { flex: 1; min-width: 0; }

/* ── VIP ─────────────────────────────────────────────────── */

.vip-add-card { border-top: 3px solid #d97706; }
.vip-list-card { border-top: 3px solid #7c3aed; }

.vip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 8px;
    margin-right: 0.35rem;
    vertical-align: -0.2rem;
    font-size: 0.9rem;
}
.vip-icon-add { color: #b45309; background: rgba(217, 119, 6, 0.14); }
.vip-icon-list { color: #6d28d9; background: rgba(124, 58, 237, 0.12); }

.vip-badge {
    background: rgba(217, 119, 6, 0.14) !important;
    color: #b45309 !important;
    font-weight: 650;
}

/* ── Accounts: conexión + cards de personajes ────────────── */

.acc-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    padding: 0.4rem 0.55rem;
    border-radius: 10px;
    border: 1px solid var(--ze-border);
    background: var(--ze-surface-2);
    font-size: 0.8rem;
}
.acc-meta-chip-copy {
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.acc-meta-chip-copy:hover,
.acc-meta-chip-copy:focus-visible {
    border-color: color-mix(in srgb, var(--ze-primary) 40%, var(--ze-border));
    background: var(--ze-primary-soft);
    box-shadow: 0 1px 4px rgba(37, 99, 235, 0.12);
    outline: none;
}
.acc-meta-chip-copy:active {
    transform: scale(0.98);
}
.acc-meta-label {
    color: var(--ze-text-muted);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.acc-meta-val {
    max-width: min(14rem, 50vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.78rem;
}
.acc-copy-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    color: var(--ze-text-muted);
    font-size: 0.9rem;
}
.acc-meta-chip-copy:hover .acc-copy-icon {
    color: var(--ze-primary);
}

.acc-chars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.65rem;
}
.acc-char-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.45rem;
    padding: 0.75rem 0.55rem 0.65rem;
    border-radius: 12px;
    border: 1px solid var(--ze-border);
    background: var(--ze-surface-2);
    color: inherit;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.acc-char-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--ze-primary) 35%, var(--ze-border));
    box-shadow: 0 6px 16px rgba(26, 35, 50, 0.1);
    color: inherit;
}
.acc-char-avatar {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background: var(--ze-surface);
    border: 1px solid var(--ze-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.acc-char-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.acc-char-fallback {
    font-size: 1.6rem;
    color: var(--ze-text-muted);
    opacity: 0.55;
}
.acc-char-body {
    min-width: 0;
    width: 100%;
}
.acc-char-name {
    font-weight: 700;
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.acc-char-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 0.55rem;
    margin-top: 0.2rem;
    font-size: 0.72rem;
    color: var(--ze-text-muted);
    font-weight: 600;
}
.acc-char-meta i {
    margin-right: 0.1rem;
}

/* ── Find Item DB ────────────────────────────────────────── */

.fid-search-card { border-top: 3px solid #2563eb; }
.fid-results-card { border-top: 3px solid #dc2626; }

.fid-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 8px;
    margin-right: 0.35rem;
    vertical-align: -0.2rem;
    color: #1d4ed8;
    background: rgba(37, 99, 235, 0.12);
    font-size: 0.9rem;
}
.fid-icon-list { color: #b91c1c; background: rgba(220, 38, 38, 0.12); }

.fid-tabs .nav-link {
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ze-text-muted);
}
.fid-tabs .nav-link.active {
    background: var(--ze-primary);
    color: #fff;
}

.fid-table-wrap {
    border: 1px solid var(--ze-border);
    border-radius: 10px;
    background: var(--ze-surface-2);
    max-height: 62vh;
    overflow: auto;
}
.fid-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.fid-adv {
    border: 1px solid var(--ze-border);
    border-radius: 10px;
    padding: 0.55rem 0.75rem;
    background: var(--ze-surface-2);
}
.fid-adv summary {
    cursor: pointer;
    user-select: none;
}
.fid-adv[open] summary {
    margin-bottom: 0.5rem;
}
.fid-exc-box, .fid-socks-box {
    border: 1px dashed var(--ze-border);
    border-radius: 8px;
    padding: 0.45rem 0.55rem;
    max-height: 160px;
    overflow: auto;
}
.fid-exc-box.disabled, .fid-socks-box.disabled {
    opacity: 0.55;
    pointer-events: none;
}
.fid-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    margin-top: 0.15rem;
}
.fid-tags .badge-soft {
    font-size: 0.65rem;
    padding: 0.1rem 0.35rem;
}

/* Tooltip detalle al hover de la imagen */
.fid-tip-img {
    cursor: help;
}
.fid-tip {
    position: fixed;
    z-index: 1080;
    width: min(280px, calc(100vw - 16px));
    max-height: min(70vh, 420px);
    overflow: auto;
    padding: 0.7rem 0.8rem;
    border-radius: 12px;
    border: 1px solid var(--ze-border);
    background: var(--ze-surface);
    box-shadow: 0 12px 32px rgba(26, 35, 50, 0.18);
    pointer-events: auto;
}

/* Pares clave/valor dentro de las tarjetas móviles que sustituyen a las tablas
   anchas (investigation, cash, logs…). La clave se autoajusta y el valor ocupa
   el resto, así que no hay scroll horizontal por mucho que crezca el contenido. */
.ze-kv-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.2rem 0.75rem;
    font-size: 0.8rem;
}

.ze-kv-grid > span:nth-child(odd) {
    color: var(--ze-text-muted);
    font-weight: 600;
    white-space: nowrap;
}

.ze-kv-grid > span:nth-child(even) {
    word-break: break-word;
    min-width: 0;
}

/* Detalle fijado con tap: en táctil es la única vía de verlo, así que necesita
   cierre explícito. En pantalla pequeña se ancla abajo como hoja para no quedar
   recortado por el borde de la tabla. */
.fid-tip-close {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    width: 2rem;
    height: 2rem;
    display: none;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: var(--ze-surface-2);
    color: var(--ze-text-muted);
    font-size: 0.9rem;
    line-height: 1;
}

.fid-tip.is-pinned {
    padding-top: 0.7rem;
}

.fid-tip.is-pinned .fid-tip-close {
    display: inline-flex;
}

.fid-tip.is-pinned .fid-tip-head {
    padding-right: 2.2rem;
}

@media (max-width: 575.98px) {
    .fid-tip.is-pinned {
        left: 0.5rem;
        right: 0.5rem;
        top: auto;
        bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
        width: auto;
        max-height: 65vh;
    }
}
.fid-tip-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.55rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--ze-border);
}
.fid-tip-img-lg {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}
.fid-tip-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.2rem 0.65rem;
    font-size: 0.78rem;
}
.fid-tip-k {
    color: var(--ze-text-muted);
    font-weight: 600;
    white-space: nowrap;
}
.fid-tip-v {
    word-break: break-word;
}
.fid-tip-hex {
    margin-top: 0.5rem;
    padding-top: 0.4rem;
    border-top: 1px solid var(--ze-border);
    font-size: 0.65rem;
    color: var(--ze-text-muted);
    word-break: break-all;
}

/* ── Battle Pass ─────────────────────────────────────────── */

.bp-edit-card { border-top: 3px solid #7c3aed; }
.bp-list-card { border-top: 3px solid #d97706; }

.bp-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 8px;
    margin-right: 0.35rem;
    vertical-align: -0.2rem;
    font-size: 0.9rem;
}
.bp-icon-edit { color: #6d28d9; background: rgba(124, 58, 237, 0.12); }
.bp-icon-list { color: #b45309; background: rgba(217, 119, 6, 0.14); }

.bp-table-wrap {
    border: 1px solid var(--ze-border);
    border-radius: 10px;
    background: var(--ze-surface-2);
    max-height: 480px;
    overflow: auto;
}

.bp-rewards {
    border: 1px solid var(--ze-border);
    border-radius: 10px;
    background: var(--ze-surface-2);
    max-height: 180px;
    overflow: auto;
}
.bp-reward-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0.7rem;
    border-bottom: 1px solid var(--ze-border);
}
.bp-reward-row:last-child { border-bottom: 0; }

/* ── Castle Siege ────────────────────────────────────────── */

.cs-config-card { border-top: 3px solid #7c3aed; }
.cs-reg-card { border-top: 3px solid #d97706; }
.cs-list-card { border-top: 3px solid #475569; }

.cs-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 8px;
    margin-right: 0.35rem;
    vertical-align: -0.2rem;
    font-size: 0.9rem;
}
.cs-icon-cfg   { color: #6d28d9; background: rgba(124, 58, 237, 0.12); }
.cs-icon-reg   { color: #b45309; background: rgba(217, 119, 6, 0.14); }
.cs-icon-list  { color: #475569; background: rgba(100, 116, 139, 0.12); }
.cs-icon-siege { color: #1d4ed8; background: rgba(37, 99, 235, 0.12); }

.cs-table-wrap {
    border: 1px solid var(--ze-border);
    border-radius: 10px;
    background: var(--ze-surface-2);
    max-height: 220px;
    overflow: auto;
}

/* ── Editor logs ─────────────────────────────────────────── */

.log-card {
    border-top: 3px solid #475569;
}
.log-table-wrap {
    border: 1px solid var(--ze-border);
    border-radius: 10px;
    background: var(--ze-surface-2);
    max-height: 65vh;
    overflow: auto;
}
.log-table-wrap thead th {
    position: sticky;
    top: 0;
    background: var(--ze-surface);
    z-index: 1;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--ze-text-muted);
}

/* ── Ban Manager ─────────────────────────────────────────── */

.ban-tabs .nav-link {
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--ze-text-muted);
    border: 1px solid transparent;
}
.ban-tabs .nav-link:hover {
    color: var(--ze-text);
    background: var(--ze-surface-2);
}
.ban-tabs .nav-link.active {
    color: #fff;
    background: var(--ze-danger);
    border-color: var(--ze-danger);
}

.ban-action-card.ban-card-acc { border-top: 3px solid #dc2626; }
.ban-action-card.ban-card-chr { border-top: 3px solid #ea580c; }
.ban-list-card { border-top: 3px solid #64748b; }
.ban-net-card.ban-card-ip { border-top: 3px solid #2563eb; }
.ban-net-card.ban-card-hwid { border-top: 3px solid #7c3aed; }

.ban-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 8px;
    margin-right: 0.35rem;
    vertical-align: -0.2rem;
    font-size: 0.9rem;
}
.ban-icon-acc  { color: #b91c1c; background: rgba(220, 38, 38, 0.12); }
.ban-icon-chr  { color: #c2410c; background: rgba(234, 88, 12, 0.12); }
.ban-icon-list { color: #475569; background: rgba(100, 116, 139, 0.12); }
.ban-icon-ip   { color: #1d4ed8; background: rgba(37, 99, 235, 0.12); }
.ban-icon-hwid { color: #6d28d9; background: rgba(124, 58, 237, 0.12); }

.ban-list {
    max-height: 420px;
    overflow: auto;
    border: 1px solid var(--ze-border);
    border-radius: 10px;
    background: var(--ze-surface-2);
}
.ban-list-sm { max-height: 280px; }

.ban-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid var(--ze-border);
}
.ban-row:last-child { border-bottom: 0; }
.ban-row-main {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1;
}

.ban-na-box {
    text-align: center;
    padding: 2rem 1rem;
    border: 1px dashed var(--ze-border);
    border-radius: 12px;
    background: var(--ze-surface-2);
}
.ban-na-icon {
    font-size: 2rem;
    color: var(--ze-text-muted);
    opacity: 0.5;
    margin-bottom: 0.5rem;
}

.badge-soft.danger {
    background: rgba(220, 38, 38, 0.12);
    color: var(--ze-danger);
}

/* ── Cash Editor ─────────────────────────────────────────── */

.cash-card {
    border-top: 3px solid #d97706;
    background:
        radial-gradient(ellipse 70% 70% at 0% 0%, rgba(217, 119, 6, 0.07), transparent 55%),
        var(--ze-surface);
}

.cash-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 8px;
    margin-right: 0.35rem;
    vertical-align: -0.2rem;
    color: #b45309;
    background: rgba(217, 119, 6, 0.14);
    font-size: 0.95rem;
}

.cash-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 576px) {
    .cash-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.cash-tile {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--ze-border);
    background: var(--ze-surface-2);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cash-tile:focus-within {
    border-color: color-mix(in srgb, var(--cash-tone, #d97706) 45%, var(--ze-border));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cash-tone, #d97706) 15%, transparent);
}

.cash-tile-disabled {
    opacity: 0.55;
}

.cash-tile-icon {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    color: var(--cash-tone, #d97706);
    background: var(--cash-soft, rgba(217, 119, 6, 0.14));
}

.cash-tile-body {
    flex: 1;
    min-width: 0;
}

.cash-tile-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 650;
    color: var(--ze-text-muted);
    margin-bottom: 0.35rem;
}

.cash-input {
    font-size: 1.05rem !important;
    font-weight: 600;
}

.cash-tone-gold   { --cash-tone: #d97706; --cash-soft: rgba(217, 119, 6, 0.14); }
.cash-tone-teal   { --cash-tone: #0d9488; --cash-soft: rgba(13, 148, 136, 0.12); }
.cash-tone-violet { --cash-tone: #7c3aed; --cash-soft: rgba(124, 58, 237, 0.12); }
.cash-tone-rose   { --cash-tone: #e11d48; --cash-soft: rgba(225, 29, 72, 0.12); }

.cash-tone-border-gold   { --cash-tone: #d97706; }
.cash-tone-border-teal   { --cash-tone: #0d9488; }
.cash-tone-border-violet { --cash-tone: #7c3aed; }
.cash-tone-border-rose   { --cash-tone: #e11d48; }

/* ── Item Bank ───────────────────────────────────────────── */

.ib-pick-card { border-top: 3px solid #0d9488; }
.ib-list-card { border-top: 3px solid #7c3aed; }

.ib-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 8px;
    margin-right: 0.35rem;
    vertical-align: -0.2rem;
    color: #6d28d9;
    background: rgba(124, 58, 237, 0.12);
}

.ib-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}

.ib-card {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    border: 1px solid var(--ze-border);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(124, 58, 237, 0.05) 0%, #fff 55%);
    padding: 0.7rem;
    box-shadow: var(--ze-shadow-sm);
}

.ib-card-img {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ze-surface-2);
    border-radius: 8px;
    border: 1px solid var(--ze-border);
}
.ib-card-img img {
    max-width: 36px;
    max-height: 36px;
    object-fit: contain;
}
.ib-card-body { flex: 1; min-width: 0; }
.ib-card-name {
    font-weight: 600;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ib-card-meta { font-size: 0.72rem; }

/* ── Skills ──────────────────────────────────────────────── */

.sk-pick-card { border-top: 3px solid #7c3aed; }
.sk-catalog-card { border-top: 3px solid #2563eb; }
.sk-owned-card { border-top: 3px solid #d97706; }

.sk-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 8px;
    margin-right: 0.35rem;
    vertical-align: -0.2rem;
    font-size: 0.95rem;
}
.sk-icon-cat { color: #1d4ed8; background: rgba(37, 99, 235, 0.12); }
.sk-icon-own { color: #b45309; background: rgba(217, 119, 6, 0.14); }

.sk-meta-badge {
    font-size: 0.85rem;
    padding: 0.35rem 0.7rem;
}

.sk-list {
    max-height: 420px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.15rem;
}

.sk-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    text-align: left;
    border: 1px solid var(--ze-border);
    background: var(--ze-surface-2);
    border-radius: 10px;
    padding: 0.45rem 0.65rem;
    font-size: 0.9rem;
    color: var(--ze-text);
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
button.sk-item {
    cursor: pointer;
}
button.sk-item:hover:not(:disabled) {
    border-color: rgba(37, 99, 235, 0.45);
    background: rgba(37, 99, 235, 0.06);
    box-shadow: var(--ze-shadow-sm);
}
.sk-item.is-owned {
    opacity: 0.55;
    cursor: default;
}
.sk-item-owned {
    background: #fff;
    border-color: rgba(217, 119, 6, 0.25);
}
.sk-code {
    font-size: 0.75rem;
    color: var(--ze-text-muted);
    min-width: 2.8rem;
}
.sk-name {
    flex: 1;
    font-weight: 550;
}
.sk-ord {
    font-size: 0.75rem;
    min-width: 1.4rem;
}
.sk-add {
    color: var(--ze-primary);
    font-size: 1rem;
}
.sk-remove {
    padding: 0.15rem 0.4rem;
}

/* ── Guilds ──────────────────────────────────────────────── */

.gld-list-card { border-top: 3px solid #7c3aed; }
.gld-info-card { border-top: 3px solid #2563eb; }
.gld-members-card { border-top: 3px solid #0d9488; }
.gld-vault-card { border-top: 3px solid #d97706; }

/* Logo guild 8×8 */
.gld-logo-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}
.gld-logo-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 280px;
}
.gld-swatch {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    border: 2px solid #c5cdd8;
    padding: 0;
    cursor: pointer;
}
.gld-swatch.active {
    border-color: #1d4ed8;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
}
.gld-logo-grid {
    display: grid;
    grid-template-columns: repeat(8, 22px);
    grid-template-rows: repeat(8, 22px);
    gap: 1px;
    background: #94a3b8;
    border: 2px solid #64748b;
    border-radius: 6px;
    padding: 2px;
    width: fit-content;
    user-select: none;
    touch-action: none;
}
.gld-pixel {
    width: 22px;
    height: 22px;
    border: 0;
    padding: 0;
    cursor: crosshair;
    border-radius: 1px;
}

.gld-tabs .nav-link {
    border-radius: 999px;
    font-weight: 550;
    color: var(--ze-text-muted);
    background: var(--ze-surface-2);
    border: 1px solid var(--ze-border);
    padding: 0.4rem 0.9rem;
}
.gld-tabs .nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, #7c3aed, #2563eb);
    border-color: transparent;
}

/* ── Import configs: subpaneles Servidor / Cliente ───────── */

.imp-upload-card {
    border-top: 3px solid var(--ze-primary);
}

.imp-upload-head {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1.15rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed var(--ze-border);
}

.imp-upload-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}

.imp-subpanel {
    border-radius: 12px;
    border: 1px solid var(--ze-border);
    overflow: hidden;
    background: var(--ze-surface);
}

/* Pares multi-archivo (Ancient, Cash Shop) */
.imp-subpanel-pair {
    border-color: rgba(245, 158, 11, 0.35);
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.05) 0%, var(--ze-surface) 55%);
}

.imp-subpanel-pair .imp-subpanel-head {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.1), transparent);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 0.85rem;
}

.imp-subpanel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.85rem;
    padding: 0.7rem 0.95rem;
    border-bottom: 1px solid transparent;
}

.imp-subpanel-badge {
    display: inline-flex;
    align-items: center;
    font-weight: 650;
    font-size: 0.88rem;
    letter-spacing: 0.01em;
}

.imp-subpanel-hint {
    font-size: 0.78rem;
    color: var(--ze-text-muted);
}

.imp-subpanel-body {
    padding: 0.85rem 0.95rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Servidor — azul / índigo */
.imp-subpanel-server {
    border-color: rgba(37, 99, 235, 0.28);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.06) 0%, #fff 48%);
    box-shadow: 0 2px 12px rgba(37, 99, 235, 0.06);
}

.imp-subpanel-server .imp-subpanel-head {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.12), rgba(99, 102, 241, 0.06));
    border-bottom-color: rgba(37, 99, 235, 0.15);
}

.imp-subpanel-server .imp-subpanel-badge {
    color: #1d4ed8;
}

.imp-subpanel-server .imp-file-code {
    color: #3730a3;
    background: rgba(37, 99, 235, 0.1);
}

.imp-subpanel-server .form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Cliente — teal / esmeralda */
.imp-subpanel-client {
    border-color: rgba(13, 148, 136, 0.3);
    background: linear-gradient(180deg, rgba(13, 148, 136, 0.07) 0%, #fff 48%);
    box-shadow: 0 2px 12px rgba(13, 148, 136, 0.06);
}

.imp-subpanel-client .imp-subpanel-head {
    background: linear-gradient(90deg, rgba(13, 148, 136, 0.14), rgba(5, 150, 105, 0.06));
    border-bottom-color: rgba(13, 148, 136, 0.16);
}

.imp-subpanel-client .imp-subpanel-badge {
    color: #0f766e;
}

.imp-subpanel-client .imp-file-code {
    color: #115e59;
    background: rgba(13, 148, 136, 0.12);
}

.imp-subpanel-client .form-control:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.imp-file-row .form-label {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.5rem;
}

.imp-file-label {
    font-weight: 550;
    color: var(--ze-text);
}

.imp-file-code {
    font-size: 0.72rem;
    padding: 0.12rem 0.4rem;
    border-radius: 6px;
    font-weight: 500;
}

.imp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 0.25rem;
}

.imp-status-card {
    border-top: 3px solid #7c3aed;
}

.imp-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 8px;
    margin-right: 0.35rem;
    vertical-align: -0.2rem;
    font-size: 0.95rem;
    color: #6d28d9;
    background: rgba(124, 58, 237, 0.12);
}

.imp-status-table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ze-text-muted);
    border-bottom-color: rgba(124, 58, 237, 0.15);
}

.imp-result-card {
    border-top: 3px solid #d97706;
    background: linear-gradient(180deg, rgba(217, 119, 6, 0.05) 0%, var(--ze-surface) 40%);
}

.imp-result-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 8px;
    margin-right: 0.35rem;
    vertical-align: -0.2rem;
    font-size: 0.9rem;
    color: #b45309;
    background: rgba(217, 119, 6, 0.14);
}

.imp-result-pre {
    max-height: 240px;
    overflow: auto;
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    background: #0f172a;
    color: #e2e8f0;
    border: 1px solid #1e293b;
}

@media (max-width: 576px) {
    .auth-card-header, .auth-card-body { padding-left: 1.25rem; padding-right: 1.25rem; }
    .app-main { padding: 1rem 0.85rem 2rem; }
    .user-meta .hide-sm { display: none; }
    .imp-subpanel-head { flex-direction: column; align-items: flex-start; }
}
