:root {
    --bg-main: #020617;
    --bg-card: rgba(15, 23, 42, 0.92);
    --bg-input: #111827;
    --text-main: #e5e7eb;
    --text-muted: #9ca3af;
    --text-soft: #cbd5e1;
    --accent-cyan: #22d3ee;
    --accent-green: #22c55e;
    --danger: #ef4444;
    --border-soft: rgba(148, 163, 184, 0.32);
    --border-cyan: rgba(34, 211, 238, 0.68);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: transparent;
    color: var(--text-main);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow: visible;
}

body {
    min-height: auto;
}

.nzt-modal-wrapper {
    width: 100%;
    max-width: 540px;
    margin: 5px auto;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.11), transparent 36%),
        #020617;
    border: 1px solid var(--border-cyan);
    border-radius: 1rem;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.92);
    overflow: visible;
}

.nzt-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.9rem;
    padding: 1.15rem 1rem 0.75rem 1rem;
}

.nzt-modal-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 1.12rem;
    font-weight: 750;
    color: #f9fafb;
    letter-spacing: -0.02em;
    margin: 0;
}

.nzt-modal-title i {
    color: var(--accent-cyan);
    font-size: 1.1rem;
}

.nzt-modal-subtitle {
    margin: 0.45rem 0 0 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.45;
}

.nzt-close-button {
    border: none;
    background: transparent;
    color: rgba(229, 231, 235, 0.72);
    font-size: 1.35rem;
    line-height: 1;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.nzt-close-button:hover {
    color: #ffffff;
}

.nzt-modal-body {
    padding: 0.35rem 1rem 0 1rem;
}

.nzt-mode-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.nzt-mode-option {
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(2, 6, 23, 0.72);
    color: var(--text-soft);
    border-radius: 0.85rem;
    padding: 0.75rem;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.nzt-mode-option:hover {
    border-color: rgba(34, 211, 238, 0.72);
    color: #ffffff;
}

.nzt-mode-option.active {
    border-color: #22d3ee;
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.22);
    background: rgba(8, 47, 73, 0.34);
}

.nzt-mode-icon {
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(34, 211, 238, 0.35);
    color: #67e8f9;
    flex-shrink: 0;
}

.nzt-mode-content {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.nzt-mode-content strong {
    font-size: 0.82rem;
    color: #f9fafb;
    line-height: 1.2;
}

.nzt-mode-content small {
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.nzt-panel {
    display: none;
}

.nzt-panel.active {
    display: block;
}

.nzt-panel-intro {
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    padding: 0.8rem 0;
    margin-bottom: 0.9rem;
}

.nzt-kicker {
    font-size: 0.72rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: #67e8f9;
    margin-bottom: 0.35rem;
}

.nzt-panel-intro p {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.55;
    color: #e5e7eb;
}

.nzt-bloques-lista {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.nzt-form-card {
    border: 1px solid rgba(229, 231, 235, 0.82);
    border-radius: 0.55rem;
    padding: 0.8rem 0.6rem 0.9rem 0.6rem;
    background: rgba(2, 6, 23, 0.68);
}

.nzt-form-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
}

.nzt-card-title {
    display: block;
    color: #f9fafb;
    font-size: 0.82rem;
    line-height: 1.25;
}

.nzt-card-help {
    display: block;
    color: var(--text-muted);
    font-size: 0.72rem;
    margin-top: 0.18rem;
}

.nzt-button-remove {
    border: 1px solid rgba(239, 68, 68, 0.55);
    background: rgba(127, 29, 29, 0.22);
    color: #fecaca;
    border-radius: 0.35rem;
    width: 28px;
    height: 28px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    font-size: 0.78rem;
    flex-shrink: 0;
}

.nzt-button-remove:hover {
    background: rgba(127, 29, 29, 0.38);
    color: #ffffff;
}

.nzt-error-bloque {
    display: none;
    border: 1px solid rgba(239, 68, 68, 0.55);
    background: rgba(127, 29, 29, 0.28);
    color: #fecaca;
    border-radius: 0.45rem;
    padding: 0.5rem 0.6rem;
    font-size: 0.78rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.nzt-error-bloque.show {
    display: block;
}

.nzt-form-row {
    margin-bottom: 0.75rem;
}

.nzt-label {
    display: block;
    font-size: 0.78rem;
    color: var(--text-soft);
    margin-bottom: 0.3rem;
}

.nzt-input,
.nzt-select {
    width: 100%;
    min-height: 33px;
    border-radius: 0.32rem;
    border: 1px solid rgba(75, 85, 99, 0.95);
    background-color: var(--bg-input);
    color: #f9fafb;
    font-size: 0.83rem;
    padding: 0.38rem 0.55rem;
    outline: none;
    box-shadow: none;
}

.nzt-input:focus,
.nzt-select:focus {
    border-color: rgba(34, 211, 238, 0.82);
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.18);
}

.nzt-input::placeholder {
    color: rgba(156, 163, 175, 0.75);
}

.nzt-select {
    appearance: auto;
}

input[type="date"].nzt-input {
    color-scheme: dark;
}

.nzt-grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
}

.nzt-grid-three {
    display: grid;
    grid-template-columns: 0.9fr 0.85fr 1fr;
    gap: 0.55rem;
}

.nzt-switch-line {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.3rem;
    margin-bottom: 0.55rem;
    font-size: 0.78rem;
    color: var(--text-soft);
    cursor: pointer;
}

.nzt-switch {
    position: relative;
    width: 2.4rem;
    height: 1.3rem;
    border-radius: 999px;
    border: 1px solid #4b5563;
    background-color: #ffffff;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
    box-shadow: none;
    transition: background-color 0.15s ease-out, border-color 0.15s ease-out;
    flex-shrink: 0;
}

.nzt-switch::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 2px;
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    background-color: #020617;
    transform: translate(0, -50%);
    transition: transform 0.15s ease-out, background-color 0.15s ease-out;
}

.nzt-switch:checked {
    background-color: #22c55e;
    border-color: #22c55e;
}

.nzt-switch:checked::before {
    transform: translate(1.05rem, -50%);
    background-color: #ecfdf5;
}

.gasto-categoria-nueva-wrap,
.tarjeta-categoria-nueva-wrap {
    display: none;
    margin-top: 0.65rem;
}

.gasto-categoria-nueva-wrap.show,
.tarjeta-categoria-nueva-wrap.show {
    display: block;
}

.nzt-cupo-box {
    display: none;
    margin: -0.25rem 0 0.85rem 0;
    border: 1px solid rgba(34, 211, 238, 0.42);
    background: rgba(8, 47, 73, 0.28);
    border-radius: 0.5rem;
    padding: 0.65rem 0.75rem;
}

.nzt-cupo-box.show {
    display: block;
}

.nzt-cupo-label {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 0.22rem;
}

.nzt-cupo-value {
    font-size: 0.98rem;
    font-weight: 750;
    color: #f9fafb;
    font-variant-numeric: tabular-nums;
}

.nzt-cupo-value.negativo {
    color: #fecaca;
}

.nzt-button-add {
    border: 1px solid rgba(34, 211, 238, 0.75);
    background: #06b6d4;
    color: #020617;
    border-radius: 0.32rem;
    padding: 0.48rem 0.78rem;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    cursor: pointer;
    margin-top: 0.85rem;
    font-weight: 650;
}

.nzt-button-add:hover {
    background: #22d3ee;
    color: #020617;
}

.nzt-modal-footer {
    padding: 1rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
}

.nzt-button-secondary,
.nzt-button-primary {
    border-radius: 0.34rem;
    padding: 0.42rem 0.78rem;
    font-size: 0.82rem;
    min-height: 34px;
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.38rem;
}

.nzt-button-secondary {
    background: transparent;
    color: #f9fafb;
    border-color: rgba(229, 231, 235, 0.85);
}

.nzt-button-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

.nzt-button-primary {
    background: #15803d;
    color: #ffffff;
    border-color: #15803d;
    font-weight: 650;
}

.nzt-button-primary:hover {
    background: #16a34a;
    border-color: #16a34a;
}

.nzt-button-primary:disabled,
.nzt-button-secondary:disabled,
.nzt-button-add:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.nzt-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 260px;
    max-width: 380px;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    background: #020617;
    color: #e5e7eb;
    font-size: 0.85rem;
    text-align: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.55);
}

.nzt-toast.show {
    opacity: 1;
}

.nzt-toast.ok {
    border: 1px solid rgba(34, 197, 94, 0.45);
    color: #bbf7d0;
}

.nzt-toast.error {
    border: 1px solid rgba(239, 68, 68, 0.45);
    color: #fecaca;
}

@media (max-width: 520px) {
    .nzt-modal-wrapper {
        width: 100%;
        max-width: none;
        margin: 0 auto;
        border-radius: 0.9rem;
    }

    .nzt-modal-header {
        padding: 1rem 0.9rem 0.6rem 0.9rem;
    }

    .nzt-modal-body,
    .nzt-modal-footer {
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }

    .nzt-mode-selector,
    .nzt-grid-two,
    .nzt-grid-three {
        grid-template-columns: 1fr;
    }

    .nzt-modal-footer {
        align-items: stretch;
    }

    .nzt-button-secondary,
    .nzt-button-primary {
        flex: 1;
    }
}

@media (max-width: 767.98px) {
    html,
    body {
        height: 100%;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .nzt-button-add {
        margin-bottom: 0.4rem;
    }
}

/* SweetAlert NZT premium */

.nzt-swal-arrastre-premium {
    width: min(520px, calc(100vw - 28px)) !important;
    padding: 0 !important;
    border: 1px solid rgba(34, 211, 238, 0.55) !important;
    border-radius: 24px !important;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.20), transparent 38%),
        radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.10), transparent 34%),
        linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.98)) !important;
    color: var(--text-main) !important;
    box-shadow:
        0 28px 80px rgba(0, 0, 0, 0.72),
        0 0 0 1px rgba(255, 255, 255, 0.03),
        0 0 42px rgba(34, 211, 238, 0.16) !important;
    overflow: hidden !important;
}

.nzt-swal-arrastre-premium::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.20), transparent);
    height: 1px;
}

.nzt-swal-arrastre-premium .swal2-html-container {
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    color: inherit !important;
}

.nzt-swal-arrastre-premium .swal2-actions {
    margin: 0 !important;
    padding: 0 28px 28px 28px !important;
}

.nzt-swal-arrastre-contenido {
    padding: 30px 28px 20px 28px;
    text-align: left;
}

.nzt-swal-arrastre-icono {
    width: 62px;
    height: 62px;
    margin-bottom: 18px;
    border: 1px solid rgba(34, 211, 238, 0.68);
    border-radius: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top, rgba(34, 211, 238, 0.32), rgba(8, 47, 73, 0.28));
    color: #67e8f9;
    box-shadow:
        0 0 28px rgba(34, 211, 238, 0.24),
        inset 0 0 18px rgba(34, 211, 238, 0.10);
    font-size: 30px;
}

.nzt-swal-arrastre-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    color: #67e8f9;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.nzt-swal-arrastre-titulo {
    margin: 0;
    color: #f9fafb;
    font-size: 27px;
    font-weight: 850;
    letter-spacing: -0.04em;
    line-height: 1.08;
}

.nzt-swal-arrastre-card {
    margin-top: 18px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.42);
    padding: 16px;
}

.nzt-swal-arrastre-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    border: 1px solid rgba(245, 158, 11, 0.34);
    border-radius: 999px;
    background: rgba(120, 53, 15, 0.22);
    color: #fde68a;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
}

.nzt-swal-arrastre-texto {
    margin: 0;
    color: #dbeafe;
    font-size: 15px;
    line-height: 1.55;
}

.nzt-swal-arrastre-check {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 16px;
    color: #94a3b8;
    font-size: 13px;
}

.nzt-swal-arrastre-check input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #22d3ee;
    cursor: pointer;
}

.nzt-swal-arrastre-check label {
    cursor: pointer;
    user-select: none;
}

.nzt-swal-arrastre-boton {
    min-width: 145px !important;
    min-height: 42px !important;
    border: 1px solid rgba(34, 211, 238, 0.82) !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, #06b6d4, #22d3ee) !important;
    color: #020617 !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    box-shadow:
        0 14px 32px rgba(34, 211, 238, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
}

.nzt-swal-arrastre-boton:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

@media (max-width: 520px) {
    .nzt-swal-arrastre-contenido {
        padding: 26px 22px 18px 22px;
    }

    .nzt-swal-arrastre-titulo {
        font-size: 24px;
    }

    .nzt-swal-arrastre-premium .swal2-actions {
        padding: 0 22px 24px 22px !important;
    }

    .nzt-swal-arrastre-boton {
        width: 100% !important;
    }
}

.nzt-swal-arrastre-titulo {
    margin-top: 6px;
    margin-bottom: 18px;
    color: #f9fafb;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

.nzt-swal-arrastre-card {
    margin-top: 16px;
}

.nzt-swal-arrastre-check input {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    accent-color: #22d3ee;
}