/* CRBOX Dashboard CSS 
===============================
Dashboard-specific styles for CRBOX user portal with enhanced UI/UX
*/

:root {
    --primary: #FF6B00; /* Orange as primary color */
    --primary-dark: #E05A00;
    --primary-light: #FFF1E8;
    --secondary: #0052CC;
    --secondary-dark: #003D99;
    --secondary-light: #E6F0FF;
    --light: #F5F7FA;
    --dark: #1A202C;
    --gray: #7A869A;
    --success: #10B981;
    --success-light: #D1FAE5;
    --warning: #FBBF24;
    --warning-light: #FEF3C7;
    --danger: #EF4444;
    --danger-light: #FEE2E2;
    --info: #3B82F6;
    --info-light: #DBEAFE;
    --purple: #8B5CF6;
    --purple-light: #EDE9FE;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-3xl: 0 35px 60px -15px rgba(0, 0, 0, 0.3);
    
    /* Transitions */
    --transition-fast: 150ms;
    --transition-normal: 300ms;
    --transition-slow: 500ms;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-full: 9999px;
}

/* General dashboard styles */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Remove scrollbar but keep functionality */
.no-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.no-scrollbar::-webkit-scrollbar {
    display: none;  /* Chrome, Safari and Opera */
}

/* Shadow utilities */
.shadow-button {
    box-shadow: 0 4px 6px -1px rgba(255, 107, 0, 0.1), 0 2px 4px -1px rgba(255, 107, 0, 0.06);
}

.shadow-inner {
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
}

/* Glass card effect */
.glass-card {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* 3D Button effect */
.button-3d {
    transform: translateY(0);
    box-shadow: 
        0 4px 6px -1px rgba(255, 107, 0, 0.2), 
        0 2px 4px -1px rgba(255, 107, 0, 0.1),
        0 -2px 0 0 rgba(255, 255, 255, 0.15) inset,
        0 2px 0 0 rgba(0, 0, 0, 0.15) inset;
    transition: all 0.2s ease;
}

.button-3d:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 10px 15px -3px rgba(255, 107, 0, 0.2), 
        0 4px 6px -2px rgba(255, 107, 0, 0.1),
        0 -2px 0 0 rgba(255, 255, 255, 0.2) inset,
        0 2px 0 0 rgba(0, 0, 0, 0.1) inset;
}

.button-3d:active {
    transform: translateY(1px);
    box-shadow: 
        0 2px 4px -1px rgba(255, 107, 0, 0.2), 
        0 1px 2px -1px rgba(255, 107, 0, 0.1),
        0 -1px 0 0 rgba(255, 255, 255, 0.1) inset,
        0 1px 0 0 rgba(0, 0, 0, 0.2) inset;
}

/* Background pattern */
.bg-pattern {
    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='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
}

/* Floating shapes animation */
@keyframes float {
    0% {
        transform: translateY(0px) translateX(0px);
    }
    50% {
        transform: translateY(-10px) translateX(5px);
    }
    100% {
        transform: translateY(0px) translateX(0px);
    }
}

.floating-shape {
    animation: float 6s ease-in-out infinite;
}

.circle-1 {
    animation-delay: 0s;
}

.circle-2 {
    animation-delay: 1s;
}

.circle-3 {
    animation-delay: 2s;
}

/* Status badges */
.status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all var(--transition-normal) ease;
}

.status-badge-blue {
    background-color: var(--info-light);
    color: var(--info);
}

.status-badge-green {
    background-color: var(--success-light);
    color: var(--success);
}

.status-badge-yellow {
    background-color: var(--warning-light);
    color: var(--warning);
}

.status-badge-red {
    background-color: var(--danger-light);
    color: var(--danger);
}

.status-badge-purple {
    background-color: rgba(139, 92, 246, 0.1);
    color: #8B5CF6;
}

.status-badge-gray {
    background-color: rgba(156, 163, 175, 0.1);
    color: #6B7280;
}

/* Stat Card Hover Effects */
.stat-card {
    transition: all var(--transition-normal) ease;
    overflow: hidden;
    position: relative;
}

.stat-card:hover {
    transform: translateY(-5px);
}

/* Stat card radial gradient overlay */
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 60%);
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
    z-index: 1;
}

.stat-card:hover::before {
    opacity: 0.4;
}

/* Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.counter-animation {
    animation: countUp 1s ease-out forwards;
}

/* Primary Button Styles */
.primary-btn {
    background-color: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    transition: all var(--transition-normal) ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.primary-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.primary-btn:active {
    transform: translateY(0);
}

/* Secondary Button Styles */
.secondary-btn {
    background-color: var(--secondary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    transition: all var(--transition-normal) ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.secondary-btn:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-2px);
}

.secondary-btn:active {
    transform: translateY(0);
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--gray);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* WhatsApp Button */
.whatsapp-btn {
    background-color: #25D366;
    border-radius: var(--radius-full);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Toast Animation */
.toast-enter {
    animation: toastEnter 0.3s forwards;
}

.toast-exit {
    animation: toastExit 0.3s forwards;
}

@keyframes toastEnter {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastExit {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Sticky Header */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
    transition: box-shadow 0.3s ease;
}

.sticky-active {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Shimmer Loading Effect */
.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Card shine effect on hover */
.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    opacity: 0;
    transform: rotate(30deg);
    background: rgba(255, 255, 255, 0.13);
    background: linear-gradient(
        to right, 
        rgba(255, 255, 255, 0.13) 0%,
        rgba(255, 255, 255, 0.13) 77%,
        rgba(255, 255, 255, 0.5) 92%,
        rgba(255, 255, 255, 0.0) 100%
    );
    transition: opacity 0.3s ease;
}

.shine-effect:hover::after {
    opacity: 1;
    left: 130%;
    transition: left 0.7s ease, opacity 0.3s ease;
}

/* Progress Bar Animation */
.progress-bar {
    height: 8px;
    border-radius: 4px;
    background-color: #f1f1f1;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    transition: width 1s ease;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    animation: progressShine 1.5s infinite;
}

@keyframes progressShine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Notification badge pulse */
.notification-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--danger);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Custom switch toggle */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

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

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

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

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

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* 3D Card Effect */
.card-3d {
    perspective: 1000px;
    transition: transform 0.5s;
}

.card-3d-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.5s;
    transform-style: preserve-3d;
}

.card-3d:hover .card-3d-inner {
    transform: rotateY(10deg) rotateX(5deg);
}

/* Modern Tooltip */
.tooltip {
    position: relative;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 120px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Collapsible sections */
.collapsible {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
}

.collapsible.open {
    max-height: 1000px;
}

/* Custom checkbox */
.custom-checkbox {
    display: inline-block;
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    user-select: none;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #eee;
    border-radius: 4px;
    transition: all 0.3s;
}

.custom-checkbox:hover input ~ .checkmark {
    background-color: #ccc;
}

.custom-checkbox input:checked ~ .checkmark {
    background-color: var(--primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.custom-checkbox .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Glow effect for highlighted items */
.glow-on-hover {
    transition: all 0.3s ease;
}

.glow-on-hover:hover {
    box-shadow: 0 0 15px rgba(255, 107, 0, 0.5);
}

/* Animated background gradient */
.animated-gradient {
    background: linear-gradient(-45deg, #FF6B00, #FFA26B, #E05A00, #FF9A5E);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Animated waves for bottom of sections */
.wave-container {
    position: relative;
    overflow: hidden;
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: url('../img/wave.svg') repeat-x;
    background-size: 100% 100%;
}

.wave-1 {
    animation: wave 30s linear infinite;
    z-index: 1;
    opacity: 0.7;
    animation-delay: 0s;
    bottom: 0;
}

.wave-2 {
    animation: wave 15s linear infinite;
    z-index: 2;
    opacity: 0.5;
    animation-delay: -5s;
    bottom: 10px;
}

.wave-3 {
    animation: wave 20s linear infinite;
    z-index: 3;
    opacity: 0.3;
    animation-delay: -2s;
    bottom: 15px;
}

@keyframes wave {
    0% {
        background-position-x: 0;
    }
    100% {
        background-position-x: 1000px;
    }
}

/* Custom Dropdown */
.custom-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 8px;
    z-index: 1;
    overflow: hidden;
    transform-origin: top center;
    transition: all 0.3s ease;
    transform: scaleY(0);
    opacity: 0;
}

.custom-dropdown:hover .dropdown-content {
    display: block;
    transform: scaleY(1);
    opacity: 1;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .responsive-grid {
        grid-template-columns: 1fr;
    }
    
    .mobile-hidden {
        display: none;
    }
    
    .mobile-full-width {
        width: 100%;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .dark-mode-support {
        background-color: #121212;
        color: #f5f5f5;
    }
    
    .dark-mode-card {
        background-color: #1e1e1e;
        border-color: #333;
    }
    
    .dark-mode-text {
        color: #f5f5f5;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none;
    }
    
    .print-only {
        display: block;
    }
}

/* Enhanced Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus indicators for keyboard navigation */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Skip to content link for accessibility */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-to-content:focus {
    top: 0;
}

/* Escala para botones de acciones rápidas más compactos */
@media (min-width: 768px) {
    .quick-actions-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
    
    .quick-action-card {
        padding: 0.75rem;
    }
    
    .quick-action-card .icon {
        width: 2.5rem;
        height: 2.5rem;
    }
}

/* Ajustes para botón Calcular Envío */
.button-3d.primary-action {
    background-color: var(--primary);
    color: white;
}

.button-3d.primary-action:hover {
    background-color: var(--primary-dark);
}

/* Estilos para consolidación de paquetes */
.consolidation-progress {
    height: 0.5rem;
    border-radius: 0.25rem;
    background-color: #f3e8ff;
    overflow: hidden;
}

.consolidation-progress-bar {
    height: 100%;
    background: linear-gradient(to right, #c084fc, #8b5cf6);
    transition: width 1s ease;
}

/* Estilos específicos para el card de casillero */
.glass-card.orange-card {
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.92) 0%, rgba(194, 65, 12, 0.95) 100%) !important;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(251, 146, 60, 0.55) !important;
    box-shadow: 0 8px 32px rgba(234, 88, 12, 0.30), 0 2px 8px rgba(0, 0, 0, 0.25) !important;
}

.orange-card .card-number {
    color: #ffffff !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.orange-card .card-label {
    color: rgba(255, 237, 213, 1) !important;
}

.orange-card .copy-button {
    color: rgba(255, 237, 213, 0.9) !important;
}

.orange-card .copy-button:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.12) !important;
}

/* ==============================================================
   Portal primitives — shared across mi-cuenta / mis-facturas /
   mis-paquetes. These restore the design language for pages that
   don't ship their own inline <style> block. Tokens are pulled
   from :root above; no new palette is introduced.
   ============================================================== */

/* Primary action button */
.action-btn-primary {
    background-color: var(--primary);
    color: white;
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    box-shadow: 0 1px 2px 0 rgba(255, 107, 0, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-fast) ease,
                box-shadow var(--transition-fast) ease,
                transform var(--transition-fast) ease;
    cursor: pointer;
}
.action-btn-primary:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 6px 12px -2px rgba(255, 107, 0, 0.30);
    transform: translateY(-1px);
}
.action-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px 0 rgba(255, 107, 0, 0.20);
}
.action-btn-primary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.30);
}
.action-btn-primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Secondary / light action button */
.action-btn-light {
    background-color: white;
    color: #4A5568;
    border: 1px solid #E2E8F0;
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-fast) ease,
                border-color var(--transition-fast) ease,
                box-shadow var(--transition-fast) ease,
                transform var(--transition-fast) ease;
    cursor: pointer;
}
.action-btn-light:hover {
    background-color: #F7FAFC;
    border-color: #CBD5E0;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}
.action-btn-light:focus-visible {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.18);
}

/* Form primitives */
.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border-radius: var(--radius);
    border: 1px solid #E2E8F0;
    background-color: white;
    color: #1F2937;
    font-size: 0.9375rem;
    line-height: 1.4;
    transition: border-color var(--transition-fast) ease,
                box-shadow var(--transition-fast) ease,
                background-color var(--transition-fast) ease;
}
.form-control:hover:not(:focus):not(:disabled) {
    border-color: #CBD5E0;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.18);
}
.form-control:disabled {
    background-color: #F9FAFB;
    color: #6B7280;
    cursor: not-allowed;
}
.form-control::placeholder {
    color: #9CA3AF;
}
.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #4B5563;
    margin-bottom: 0.375rem;
    letter-spacing: 0.01em;
}

/* Data table (used by mis-facturas and similar) */
.data-table {
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.data-table thead th {
    padding: 0.75rem 1.25rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: #F9FAFB;
    border-bottom: 1px solid #E5E7EB;
}
.data-table tbody td {
    padding: 0.875rem 1.25rem;
    font-size: 0.875rem;
    color: #4A5568;
    border-bottom: 1px solid #F3F4F6;
}
.data-table tbody tr:last-child td {
    border-bottom: 0;
}
.data-table tbody tr {
    transition: background-color var(--transition-fast) ease;
}
.data-table tbody tr:hover {
    background-color: #FFF5EB;
}

/* ==============================================================
   Mi Cuenta — profile banner + header
   The banner gives the page a strong brand anchor; the avatar
   floats at the boundary between the banner and the content area.
   ============================================================== */

/* Orange identity band — replaces the old neutral white header */
.profile-banner {
    height: 6rem;
    background: linear-gradient(135deg, #FF6B00 0%, #FF8C40 55%, #FFB060 100%);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}
@media (min-width: 768px) {
    .profile-banner {
        height: 7rem;
    }
}
/* Decorative circles for depth — larger, softer, more balanced */
.profile-banner::before {
    content: '';
    position: absolute;
    right: -2rem;
    top: -3rem;
    width: 12rem;
    height: 12rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.11);
    pointer-events: none;
}
.profile-banner::after {
    content: '';
    position: absolute;
    right: 7rem;
    bottom: -4rem;
    width: 9rem;
    height: 9rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    pointer-events: none;
}

/* Profile header sits directly below banner — no top padding */
.profile-header {
    position: relative;
    padding: 0 1.5rem 2rem;
}
@media (min-width: 768px) {
    .profile-header {
        padding: 0 2.25rem 2.5rem;
    }
}
/* Legacy hook — kept harmless */
.profile-header-pattern {
    display: none;
}

/* Avatar initials scale with the larger avatar */
.profile-avatar span {
    font-size: 2rem;
    line-height: 1;
}
@media (min-width: 768px) {
    .profile-avatar span {
        font-size: 2.375rem;
    }
}

/* Avatar floats up to overlap the banner bottom edge */
.profile-avatar {
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    /* Overlap: pull avatar upward into the banner */
    margin-top: -2.5rem;
    position: relative;
    z-index: 2;
    /* Thicker white ring + stronger shadow for a more elevated look */
    border: 4px solid #ffffff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15), 0 0 0 1.5px rgba(255, 107, 0, 0.12);
}
@media (min-width: 768px) {
    .profile-avatar {
        width: 6.5rem;
        height: 6.5rem;
        margin-top: -3rem;
    }
}

/* ==============================================================
   Mi Cuenta — inner tab strip
   Uses a soft gray tray to visually distinguish from the orange
   portal nav pills above. Active state kept as bottom border
   (intentional difference from portal-level pill nav).
   ============================================================== */
.account-inner-tab-strip {
    background: #f9fafb;
    border-bottom: 1px solid #F3F4F6;
}
.account-tab-btn {
    transition: color var(--transition-fast) ease,
                background-color var(--transition-fast) ease,
                border-color var(--transition-fast) ease;
}
.account-tab-btn:hover {
    background-color: rgba(255, 107, 0, 0.05);
    color: #ea580c;
}
/* Active state: JS toggles text-orange-600 / border-orange-600 */
.account-tab-btn.text-orange-600 {
    background-color: rgba(255, 107, 0, 0.06);
}

/* ==============================================================
   Mi Cuenta — section title
   Elevated from a tiny uppercase eyebrow to a proper, readable
   section heading with a bottom divider for rhythm.
   ============================================================== */
.account-section-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 1.125rem;
    padding-bottom: 0.625rem;
    border-bottom: 1px solid #F3F4F6;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.01em;
}
/* Specificity override — lets Tailwind mb-{x} classes work when combined */
.account-section-title.mb-0 { margin-bottom: 0; }
.account-section-title.mb-4 { margin-bottom: 1rem; }

/* ==============================================================
   Mi Cuenta — "coming soon" feature block
   Replaces generic gray info boxes with a warmer, intentional
   treatment that communicates "upcoming" rather than "error".
   ============================================================== */
.account-coming-soon {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    background: #FFF7ED;
    border: 1px solid #FED7AA;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    color: #7C3402;
    line-height: 1.55;
}
.account-coming-soon i {
    color: #F97316;
    flex-shrink: 0;
    margin-top: 0.125rem;
    font-size: 0.9375rem;
}

/* ==============================================================
   Mi Cuenta — danger zone (delete account)
   Warm red accent treatment: muted border + strong left bar.
   ============================================================== */
.account-danger-zone {
    border: 1px solid #FEE2E2;
    border-left: 4px solid #FCA5A5;
    border-radius: 0.75rem;
    box-shadow: none;
}

/* Key/value list — used for the Miami address and similar
   read-only fact panels. Semantic <dl><dt><dd> structure. */
.account-kv-list {
    margin: 0;
    display: flex;
    flex-direction: column;
}
.account-kv-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.625rem 0;
    border-bottom: 1px solid #F3F4F6;
    font-size: 0.9375rem;
}
.account-kv-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}
.account-kv-row:first-child {
    padding-top: 0;
}
.account-kv-row dt {
    color: #6B7280;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
    margin: 0;
}
.account-kv-row dd {
    color: #1F2937;
    font-weight: 500;
    text-align: right;
    margin: 0;
    word-break: break-word;
}
/* Mirrors the dashboard casillero highlight treatment */
.account-kv-row.is-highlight dd {
    color: var(--primary);
    font-weight: 700;
}

/* ===== Copy button: no persistent focus/active artifact ===== */
.copy-button:focus:not(:focus-visible) {
    outline: none !important;
    box-shadow: none !important;
}

/* ==============================================================
   Mi Cuenta — read-only info card
   Clean, soft container for personal data display rows.
   Matches the Miami address panel treatment for visual consistency.
   ============================================================== */
.account-info-card {
    background: #F9FAFB;
    border: 1px solid #F3F4F6;
    border-radius: 0.875rem;
    padding: 1.25rem 1.375rem;
    transition: box-shadow var(--transition-fast) ease;
}
@media (min-width: 768px) {
    .account-info-card {
        padding: 1.375rem 1.5rem;
    }
}

/* Inside the info card, spread rows a little more generously */
.account-info-card .account-kv-row {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}
.account-info-card .account-kv-row:first-child {
    padding-top: 0;
}
.account-info-card .account-kv-row:last-child {
    padding-bottom: 0;
}

/* Make the value text more prominent than plain labels */
.account-info-card .account-kv-row dd {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #111827;
}

/* Email addresses and long values: prevent overflow on narrow screens */
.account-info-card .account-kv-row dd {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Mobile: stack label above value so long strings don't compress */
@media (max-width: 480px) {
    .account-info-card .account-kv-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    .account-info-card .account-kv-row dd {
        text-align: left;
        font-size: 0.9375rem;
    }
}

/* ==============================================================
   Mi Cuenta — profile header refinement
   Tighter top gap between avatar row and tab strip.
   ============================================================== */
.profile-header {
    padding-bottom: 1.25rem;
}
@media (min-width: 768px) {
    .profile-header {
        padding-bottom: 1.5rem;
    }
}

/* Casillero badge under the name — slightly warmer colour for premium feel */
#profile-casillero {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.875rem;
}

/* Tab strip: slightly elevated tray border */
.account-inner-tab-strip {
    border-top: 1px solid #F3F4F6;
}

/* Tab panel body: consistent inner breathing room */
.account-tab {
    min-height: 18rem;
}


/* =====================================================================
   Onboarding & activation (Task #113)
   ===================================================================== */

/* ---------- Dashboard activation checklist ---------- */
.activation-card {
    position: relative;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 50%, #fef3c7 100%);
    border: 1px solid #fed7aa;
    border-radius: 1rem;
    box-shadow: 0 8px 24px -8px rgba(234, 88, 12, 0.18);
    overflow: hidden;
}
.activation-card::before {
    content: "";
    position: absolute;
    top: -40px; right: -40px;
    width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(234, 88, 12, 0.15) 0%, rgba(234, 88, 12, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}
.activation-card-inner {
    position: relative;
    padding: 1.25rem 1.25rem 1rem;
}
@media (min-width: 768px) {
    .activation-card-inner { padding: 1.75rem 2rem 1.5rem; }
}
.activation-dismiss {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #9a3412;
    background: rgba(255,255,255,0.5);
    border: 1px solid rgba(154, 52, 18, 0.15);
    border-radius: 9999px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.activation-dismiss:hover { background: #fff; color: #7c2d12; }
.activation-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding-right: 2.5rem;
}
.activation-icon {
    flex-shrink: 0;
    width: 48px; height: 48px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #ea580c;
    color: #fff;
    border-radius: 14px;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.35);
}
.activation-eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.7rem;
    font-weight: 700;
    color: #c2410c;
    margin-bottom: 0.25rem;
}
.activation-title {
    font-size: 1.125rem;
    line-height: 1.35;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.25rem;
}
@media (min-width: 768px) {
    .activation-title { font-size: 1.25rem; }
}
.activation-subtitle {
    font-size: 0.875rem;
    color: #4b5563;
    margin: 0;
}
.activation-checklist {
    list-style: none;
    margin: 1.25rem 0 1rem;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}
.activation-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.875rem;
    background: rgba(255,255,255,0.85);
    border: 1px solid rgba(254, 215, 170, 0.7);
    border-radius: 0.75rem;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.activation-item:hover { background: #fff; border-color: #fdba74; transform: translateY(-1px); }
.activation-check {
    flex-shrink: 0;
    width: 28px; height: 28px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #d1d5db;
    font-size: 1.25rem;
}
.activation-item.is-complete .activation-check { color: #16a34a; }
.activation-item.is-complete .activation-item-title {
    color: #6b7280;
    text-decoration: line-through;
    text-decoration-color: rgba(107,114,128,0.4);
}
.activation-item-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.activation-item-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.25;
}
.activation-item-desc {
    font-size: 0.78rem;
    color: #6b7280;
    margin-top: 0.125rem;
    line-height: 1.3;
}
.activation-cta {
    flex-shrink: 0;
    display: inline-flex; align-items: center;
    padding: 0.45rem 0.85rem;
    background: #ea580c;
    color: #fff;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease;
    white-space: nowrap;
}
.activation-cta:hover { background: #c2410c; color: #fff; }
.activation-item.is-complete .activation-cta {
    background: rgba(255,255,255,0.7);
    color: #16a34a;
    border: 1px solid #bbf7d0;
}
.activation-item.is-complete .activation-cta:hover {
    background: #fff;
    color: #15803d;
}
.activation-progress-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.25rem;
}
.activation-progress-track {
    flex: 1 1 auto;
    height: 8px;
    background: rgba(255,255,255,0.7);
    border-radius: 9999px;
    overflow: hidden;
    border: 1px solid rgba(254, 215, 170, 0.6);
}
.activation-progress-bar {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #f97316, #16a34a);
    transition: width 0.4s ease;
}
.activation-progress-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #6b7280;
    white-space: nowrap;
}

/* ---------- Mi Cuenta setup-mode banner ---------- */
.setup-banner {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    margin: 1.25rem 1.5rem 1.5rem;
    padding: 1.375rem 1.5rem;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 1px solid rgba(253, 186, 116, 0.6);
    border-radius: 1rem;
    box-shadow: 0 2px 12px rgba(234, 88, 12, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
}
@media (min-width: 768px) {
    .setup-banner {
        margin: 1.5rem 2.25rem 2rem;
        padding: 1.625rem 1.875rem;
        gap: 1.5rem;
    }
}
.setup-banner-icon {
    flex-shrink: 0;
    width: 44px; height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #ea580c, #c2410c);
    color: #fff;
    border-radius: 12px;
    font-size: 1.1rem;
    box-shadow: 0 3px 10px rgba(234, 88, 12, 0.25);
    margin-top: 0.125rem;
}
.setup-banner-body {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 2.5rem;
}
.setup-banner-eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-size: 0.675rem;
    font-weight: 700;
    color: #c2410c;
    margin-bottom: 0.3rem;
}
.setup-banner-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.35rem;
    line-height: 1.3;
}
.setup-banner-text {
    font-size: 0.875rem;
    color: #4b5563;
    margin: 0 0 0.875rem;
    line-height: 1.5;
}
.setup-banner-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.setup-banner-link {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    background: rgba(255, 255, 255, 0.8);
    color: #c2410c;
    border: 1px solid #fed7aa;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
}
.setup-banner-link:hover {
    background: #fff;
    color: #9a3412;
    box-shadow: 0 2px 6px rgba(234, 88, 12, 0.12);
}
.setup-banner-link.is-current {
    background: #ea580c;
    color: #fff;
    border-color: #ea580c;
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.3);
}
.setup-banner-dismiss {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 30px; height: 30px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #9a3412;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(154, 52, 18, 0.15);
    border-radius: 9999px;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease;
    font-size: 0.75rem;
}
.setup-banner-dismiss:hover {
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* ─── Delivery option cards (afiliate.html Step 3) ────────────────── */
.delivery-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 12px;
}
@media (min-width: 640px) {
    .delivery-cards { grid-template-columns: 1fr 1fr; }
}
.delivery-card {
    position: relative;
    text-align: left;
    padding: 16px 18px 14px;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 116px;
    color: #1f2937;
}
.delivery-card:hover {
    border-color: #fdba74;
    background: #fff7ed;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px -8px rgba(234, 88, 12, 0.25);
}
.delivery-card:focus-visible {
    outline: 2px solid #ea580c;
    outline-offset: 2px;
}
.delivery-card.is-selected {
    border-color: #ea580c;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    box-shadow: 0 8px 24px -10px rgba(234, 88, 12, 0.45);
}
.delivery-card.is-selected::after {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 12px; right: 12px;
    width: 22px; height: 22px;
    background: #ea580c;
    color: #fff;
    border-radius: 9999px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 10px;
}
.delivery-card-icon {
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff7ed;
    color: #ea580c;
    border-radius: 10px;
    font-size: 16px;
    margin-bottom: 4px;
}
.delivery-card.is-selected .delivery-card-icon { background: #fff; }
.delivery-card-title {
    font-weight: 600;
    font-size: 0.9375rem;
    color: #111827;
}
.delivery-card-meta {
    font-size: 0.8125rem;
    color: #6b7280;
}
.delivery-card-tag {
    display: inline-block;
    margin-top: 6px;
    align-self: flex-start;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    background: #dcfce7;
    color: #166534;
    padding: 3px 8px;
    border-radius: 9999px;
}
.delivery-card-tag-alt { background: #fef3c7; color: #92400e; }
.delivery-cards-help {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 16px;
}


/* ─── Setup-mode field emphasis (Mi Cuenta ?setup=1) ─────────────── */
.setup-emphasis-wrap {
    position: relative;
    padding: 10px;
    margin: -10px -10px 6px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(254, 215, 170, 0.18) 0%, rgba(254, 215, 170, 0) 100%);
    transition: background 0.2s ease;
}
.setup-emphasis-wrap::before {
    content: "";
    position: absolute;
    left: 0; top: 12px; bottom: 12px;
    width: 3px;
    background: #ea580c;
    border-radius: 0 3px 3px 0;
}
.setup-emphasis {
    border-color: #fdba74 !important;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.12) !important;
}
.setup-emphasis:focus,
.setup-emphasis:focus-visible {
    border-color: #ea580c !important;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.25) !important;
}

.setup-active-tab {
    /* Active tab in setup mode dominates focus; no other surfaces compete. */
    animation: setupTabPop 0.35s ease both;
}
@keyframes setupTabPop {
    0%   { opacity: 0.65; transform: translateY(4px); }
    100% { opacity: 1;    transform: translateY(0);  }
}

.setup-cta {
    box-shadow: 0 10px 22px -10px rgba(234, 88, 12, 0.55);
}
