/* --- Extracted from 02_ICON_BUTTONS__BADGES.css --- */
/* === ICON BUTTONS & BADGES === */
.icon-btn-primary {
    background: var(--primary);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-size-20 {
    font-size: 20px;
}

.icon-size-12 {
    font-size: 1.2rem;
}

.icon-search-label {
    font-size: 0.8rem;
    opacity: 0.7;
}

.badge-hidden {
    display: none;
}

.cart-btn-wrapper {
    position: relative;
}



/* --- Extracted from 03_REALTIME_NOTIFICATION_BADGE_CAJA.css --- */
/* === REAL-TIME NOTIFICATION BADGE (CAJA) === */
.badge-notify {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
    }
}

.caja-stats-mini {
    background: var(--primary-soft);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

[data-theme="dark"] .badge-notify {
    border-color: #111;
}

/* UI ELEMENTS */
.btn {
    padding: 0.8rem 1.8rem;
    border-radius: var(--radius-pill);
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    font-family: var(--font-heading);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -5px rgba(211, 22, 40, 0.4);
}

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

.btn-ghost:hover,
.btn-ghost.active {
    background: var(--primary-soft);
    color: var(--primary);
}

.btn-danger {
    background: #fee2e2;
    color: #ef4444;
}

.btn-sm {
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.btn-icon:hover {
    transform: scale(1.1);
}

.btn-edit {
    background: #e0f2fe;
    color: #0284c7;
}

.btn-delete {
    background: #fee2e2;
    color: #ef4444;
}

.btn-view {
    background: #e0e7ff;
    color: #6366f1;
    border: none;
}

.action-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    vertical-align: middle;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--success);
}

input:checked+.slider:before {
    transform: translateX(24px);
}

.switch-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-light);
    margin: 0 8px;
}

/* LAYOUT */
.page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.page-wrapper:has(#view-nucleus.active) {
    max-width: 1600px;
}

.view-section {
    display: none;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.view-section.active {
    display: block;
}

/* Fullscreen Login Override */
#view-login.active {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    /* Ensure it covers and centers */
    align-items: center;
    justify-content: center;
    /* Full screen background pattern (Motorcycle Parts Watermark) */
    background-color: var(--bg-body);
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M25 25h10v18h-10z' fill='%23D31628' fill-opacity='0.03'/%3E%3Cpath d='M30 15c-2.8 0-5 2.2-5 5v30c0 2.8 2.2 5 5 5h10c2.8 0 5-2.2 5-5V20c0-2.8-2.2-5-5-5H30zm0 3h10c1.1 0 2 .9 2 2v24c0 1.1-.9 2-2 2H30c-1.1 0-2-.9-2-2V20c0-1.1.9-2 2-2z' fill='%23D31628' fill-opacity='0.03'/%3E%3Cpath d='M75 25l-5 9h10l-5-9z' fill='%23D31628' fill-opacity='0.03'/%3E%3Ccircle cx='75' cy='35' r='6' stroke='%23D31628' stroke-width='2' fill='none' stroke-opacity='0.03'/%3E%3Cpath d='M20 75h10v10h-10z' fill='%23D31628' fill-opacity='0.03'/%3E%3Cpath d='M25 70l-5 5h10l-5-5z' fill='%23D31628' fill-opacity='0.03'/%3E%3Crect x='65' y='70' width='14' height='14' rx='2' stroke='%23D31628' stroke-width='2' fill='none' stroke-opacity='0.03'/%3E%3Cpath d='M68 73h2v2h-2zm6 0h2v2h-2zm-6 6h2v2h-2zm6 0h2v2h-2z' fill='%23D31628' fill-opacity='0.03'/%3E%3C/svg%3E");
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.glass-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
    padding: 35px;
    margin-bottom: 30px;
}

/* TABS - DESKTOP DEFAULT */
.tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 25px;
    background: transparent;
    width: 100%;
    flex-wrap: nowrap;
    justify-content: center;
    /* Desktop: Force single line */
}

/* TABS WITH STAGGERED GRID - 7 on top, 7 below (Intercaladas) */
/* TABS - PROFESSIONAL FLEX LAYOUT */
.tabs.grid-staggered-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    padding: 24px 30px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 50%, #f1f5f9 100%);
    border-radius: 28px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    max-width: 1200px;
    margin: 0 auto 30px auto;
}

.tabs.grid-staggered-tabs .tab-btn {
    margin: 0;
    flex: 0 1 auto;
    min-width: auto;
    padding: 10px 24px;
    border-radius: 50px;
    transition: all 0.2s ease;
}

.tabs.grid-staggered-tabs .tab-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Remove old grid hacks */
.tabs.grid-staggered-tabs .tab-btn:nth-child(n) {
    grid-column: auto;
}

/* TABS - MOBILE SCROLL (App-like Experience) */
@media (max-width: 768px) {
    .tabs.grid-staggered-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        align-items: center;
        gap: 10px;
        padding: 10px 15px;
        background: transparent;
        border: none;
        box-shadow: none;
        border-radius: 0;
        width: 100vw;
        max-width: 100vw;
        margin-left: -15px;
        /* Offset parent padding if necessary, depends on layout. Assuming full width need */
        margin-right: -15px;
        margin-bottom: 20px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
        -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
    }

    .tabs.grid-staggered-tabs::-webkit-scrollbar {
        display: none;
    }

    .tabs.grid-staggered-tabs .tab-btn {
        flex: 0 0 auto;
        background: white;
        border: 1px solid #e2e8f0;
        padding: 8px 16px;
        font-size: 0.85rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    }

    .tabs.grid-staggered-tabs .tab-btn.active {
        border-color: var(--primary);
        box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
    }
}

.tab-btn {
    padding: 12px 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.88rem;
    font-family: var(--font-heading);
    border-radius: var(--radius-pill);
    white-space: nowrap;
    transition: all 0.25s ease;
    background: transparent;
    color: var(--text-light);
    border: 1px solid transparent;
}

.tab-btn:hover {
    color: var(--primary);
    background: white;
    border-color: var(--border);
}

.tab-btn.active {
    background: var(--primary-soft);
    color: var(--primary);
    border-color: var(--primary-soft);
}

/* [Consolidated forms styles moved] */

.auth-tab.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.password-wrapper {
    position: relative;
}

.toggle-pass {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    cursor: pointer;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
}

input,
select {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: var(--font-body);
    outline: none;
    transition: all 0.25s ease;
    background: #f8fafc;
    color: var(--text-main);
}

input:focus,
select:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.file-upload-wrapper {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    background: #f8fafc;
    transition: 0.2s;
}

.file-upload-wrapper:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.file-upload-wrapper input[type=file] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* BRANDING LOGIN */
.login-header-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.login-logo-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 5px;
}

.login-icon {
    background-color: var(--primary);
    color: white;
    width: 46px;
    height: 46px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: 0 4px 10px rgba(211, 22, 40, 0.2);
}

.login-brand-text {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
    line-height: 1;
}

.login-brand-text span {
    color: var(--text-light);
    font-weight: 700;
}

.login-welcome-text {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 700;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

/* COMPRAS GRID */
.purchase-grid-inputs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
    background: #f8fafc;
    padding: 20px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.purchase-image-area {
    grid-column: span 3;
    height: 80px;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 5px;
    text-align: center;
    background: white;
    position: relative;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.purchase-image-area:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.purchase-image-area input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.btn-add-grid {
    grid-column: span 1;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
}

/* TAGS DE PAGO */
.pay-tag {
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pay-cash {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.pay-credit {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.credit-alert {
    background: #fee2e2;
    color: #ef4444;
    border: 1px solid #fecaca;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}



/* --- Extracted from 25_BADGES_NUCLEUS.css --- */
/* --- BADGES NUCLEUS --- */
.n-badge {
    padding: 8px 18px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: inline-block;
    border-width: 1px;
    border-style: solid;
}

.n-badge-active {
    background: #f0fdf4 !important;
    color: #16a34a !important;
    border-color: #dcfce7 !important;
}

.n-badge-trial {
    background: #eff6ff !important;
    color: #2563eb !important;
    border-color: #dbeafe !important;
}

.n-badge-suspended {
    background: #fff1f2 !important;
    color: #e11d48 !important;
    border-color: #ffe4e6 !important;
}

.nucleus-table-premium tr:hover td {
    background: #fdfdfd;
}

/* MODAL */
.nucleus-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.nucleus-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.nucleus-modal-card {
    background: #ffffff;
    width: 100%;
    max-width: 600px;
    border-radius: 48px;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.nucleus-modal-overlay.active .nucleus-modal-card {
    transform: translateY(0) scale(1);
}

.nucleus-modal-header {
    padding: 2.5rem 3rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.nucleus-modal-body {
    padding: 3rem;
}

.nucleus-input-group {
    margin-bottom: 1.5rem;
}

.nucleus-label-premium {
    display: block;
    font-size: 10px;
    font-weight: 900;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.75rem;
}

.nucleus-input-premium {
    width: 100%;
    background: #f8fafc;
    border: 2px solid transparent;
    padding: 1.25rem 1.5rem;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    transition: all 0.2s;
    box-sizing: border-box;
}

.nucleus-input-premium:focus {
    outline: none;
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 10px 20px -5px rgba(59, 130, 246, 0.1);
}

/* BUTTONS */
.nucleus-btn-premium {
    border: none;
    outline: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1.25rem 2.25rem;
    border-radius: 24px;
    font-weight: 800;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 25px -10px rgba(0, 0, 0, 0.15);
}

.nucleus-btn-blue {
    background: #2563eb;
    color: #ffffff;
}

.nucleus-btn-blue:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 35px -10px rgba(37, 99, 235, 0.4);
    background: #1d4ed8;
}

.nucleus-btn-amber {
    background: #f59e0b;
    color: #ffffff;
}

.nucleus-btn-amber:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.4);
    background: #d97706;
}

.nucleus-btn-green {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #ffffff;
}

.nucleus-btn-green:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 35px -10px rgba(34, 197, 94, 0.4);
    background: #15803d;
}

@media (max-width: 1024px) {
    .nucleus-card-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nucleus-card-grid {
        grid-template-columns: 1fr;
        padding: 2rem;
    }

    .nucleus-section-container {
        margin: 0 2rem;
    }

    .nucleus-header {
        padding: 2rem;
    }

    .nucleus-title {
        font-size: 2rem;
    }
}

/* --- REPAIR STATUS BADGES (Extracted from login.html) --- */
.badge-status-recibido {
    background: #fef08a !important;
    color: #854d0e !important;
}

.badge-status-en_reparacion {
    background: #bfdbfe !important;
    color: #1e40af !important;
}

.badge-status-listo {
    background: #bbf7d0 !important;
    color: #166534 !important;
}

.badge-status-entregado {
    background: #f1f5f9 !important;
    color: #64748b !important;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-block;
}




