/* ============================================================
   NetCargo Demo - Custom Styles
   Industrial "Heavy Duty" Theme — Caterpillar / Kenworth Inspired
   Platform-wide visual identity system
   ============================================================ */

/* ---- Base ---- */
* { box-sizing: border-box; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; }

/* ============================================================
   HERO SLIDER
   ============================================================ */
.hero-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 550px;
    max-height: 800px;
    overflow: hidden;
}
.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    background-size: cover;
    background-position: center;
}
.hero-slide.active { opacity: 1; }
.hero-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(18,4,2,0.92) 0%,
        rgba(18,4,2,0.7) 40%,
        rgba(18,4,2,0.5) 100%
    );
}
.hero-content {
    position: relative;
    z-index: 10;
    height: 100%;
}

/* Slider dots */
.slider-dots {
    display: flex;
    gap: 10px;
    justify-content: center;
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
}
.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #edb404;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s;
}
.slider-dot.active {
    background: #edb404;
    box-shadow: 0 0 12px rgba(237,180,4,0.5);
}

/* Slider navigation arrows */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    background: rgba(18,4,2,0.5);
    border: 1px solid rgba(237,180,4,0.3);
    color: #edb404;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    transition: all 0.3s;
}
.slider-arrow:hover {
    background: rgba(237,180,4,0.15);
    border-color: #edb404;
}
.slider-arrow.prev { left: 1rem; }
.slider-arrow.next { right: 1rem; }

@media (max-width: 768px) {
    .hero-slider { height: 90vh; min-height: 500px; max-height: none; }
    .slider-arrow { width: 36px; height: 36px; font-size: 1rem; }
    .slider-dots { bottom: 1.5rem; }
}

/* ============================================================
   INDUSTRIAL PANEL CARDS — Platform-wide
   ============================================================ */
.card-industrial {
    background: linear-gradient(145deg, #18181b 0%, #151515 100%);
    border: 1px solid #452d01;
    border-left: 4px solid #edb404;
    border-radius: 8px;
    padding: 1.25rem;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.3s;
    position: relative;
    overflow: hidden;
}
.card-industrial::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(237,180,4,0.03) 0%, transparent 70%);
    pointer-events: none;
}
.card-industrial:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(237, 180, 4, 0.06);
    border-color: rgba(237,180,4,0.3);
}

/* ---- KPI Card ---- */
.card-kpi {
    background: linear-gradient(135deg, #18181b 0%, #111 100%);
    border: 1px solid #452d01;
    border-top: 3px solid #edb404;
    border-radius: 8px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}
.card-kpi::after {
    content: '';
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    border: 2px solid rgba(237,180,4,0.06);
    border-radius: 50%;
}

/* ---- Badge Styles ---- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.badge-verified,
.badge-status-green {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}
.badge-pending {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
    border: 1px solid rgba(156, 163, 175, 0.3);
}
.badge-status-orange {
    background: rgba(249, 115, 22, 0.12);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.3);
}
.badge-status-yellow {
    background: rgba(234, 179, 8, 0.12);
    color: #eab308;
    border: 1px solid rgba(234, 179, 8, 0.3);
}
.badge-status-red {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.badge-role {
    background: rgba(237, 180, 4, 0.12);
    color: #edb404;
    border: 1px solid rgba(237, 180, 4, 0.25);
}
.badge-plan {
    background: rgba(147, 51, 234, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(147, 51, 234, 0.3);
}
.badge-plan.pro {
    background: rgba(237, 180, 4, 0.12);
    color: #edb404;
    border: 1px solid rgba(237, 180, 4, 0.3);
}
.badge-plan.enterprise {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ---- Industrial Button ---- */
.btn-cargo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #edb404;
    color: #120402;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
    transition: background 0.2s, transform 0.1s, box-shadow 0.3s;
}
.btn-cargo:hover {
    background: #c7a230;
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(237,180,4,0.2);
}
.btn-cargo:active { transform: scale(0.98); }
.btn-cargo-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: transparent;
    color: #edb404;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    border: 2px solid #edb404;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
    transition: all 0.2s;
}
.btn-cargo-outline:hover {
    background: rgba(237, 180, 4, 0.1);
    box-shadow: 0 4px 16px rgba(237,180,4,0.1);
}

/* ---- Route Arrow (platform-wide) ---- */
.route-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
}
.route-arrow .arrow {
    color: #edb404;
    font-size: 1.25rem;
}

/* ---- Technical Label (industrial accent) ---- */
.tech-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #666;
    padding: 2px 8px;
    border: 1px solid #333;
    border-radius: 3px;
    display: inline-block;
}

/* ---- Corner Marker (visual accent) ---- */
.corner-marker {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: rgba(237,180,4,0.2);
}
.corner-marker.tl { top: 0; left: 0; border-top: 2px solid; border-left: 2px solid; }
.corner-marker.tr { top: 0; right: 0; border-top: 2px solid; border-right: 2px solid; }
.corner-marker.bl { bottom: 0; left: 0; border-bottom: 2px solid; border-left: 2px solid; }
.corner-marker.br { bottom: 0; right: 0; border-bottom: 2px solid; border-right: 2px solid; }

/* ---- Section Divider ---- */
.hazard-stripe {
    height: 4px;
    background: repeating-linear-gradient(90deg, #edb404 0, #edb404 20px, #120402 20px, #120402 40px);
}

/* ---- Form Inputs ---- */
.input-cargo {
    background: #171717;
    border: 1px solid #333;
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    width: 100%;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.input-cargo:focus {
    outline: none;
    border-color: #edb404;
    box-shadow: 0 0 0 2px rgba(237, 180, 4, 0.15);
}
.input-cargo::placeholder { color: #555; }

/* ---- Select ---- */
select.input-cargo {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg fill='%23FFD700' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

/* ============================================================
   POPUP NOTIFICATION SYSTEM
   ============================================================ */
.popup-notification {
    background: linear-gradient(145deg, #18181b 0%, #111 100%);
    border: 2px solid #edb404;
    border-radius: 12px;
    padding: 2rem 2.5rem;
    text-align: center;
    min-width: 300px;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(18,4,2,0.7), 0 0 30px rgba(237,180,4,0.1);
    animation: popIn 0.3s ease-out;
}
.popup-icon { font-size: 3rem; margin-bottom: 1rem; line-height: 1; }
.popup-icon.success { color: #22c55e; }
.popup-icon.error { color: #ef4444; }
.popup-icon.info { color: #edb404; }
.popup-message { color: #e5e7eb; font-size: 1rem; font-weight: 600; margin-bottom: 1.5rem; line-height: 1.5; }
.popup-close-btn {
    background: #edb404;
    color: #120402;
    font-weight: 800;
    padding: 0.6rem 2rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.8rem;
    transition: background 0.2s, transform 0.1s;
}
.popup-close-btn:hover { background: #c7a230; transform: scale(1.03); }
@keyframes popIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes popOut { from { transform: scale(1); opacity: 1; } to { transform: scale(0.8); opacity: 0; } }
@media (max-width: 480px) {
    .popup-notification { min-width: auto; max-width: calc(100vw - 2rem); margin: 0 1rem; padding: 1.5rem; }
}

/* ---- Diagonal stripe background ---- */
.stripe-bg {
    background-image: repeating-linear-gradient(
        -45deg, transparent, transparent 10px,
        rgba(237,180,4,0.03) 10px, rgba(237,180,4,0.03) 20px
    );
}

/* ---- Pulsing Dot ---- */
.pulse-dot {
    width: 8px; height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.5); } }

/* ---- Admin Sidebar (refined) ---- */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    color: #9ca3af;
    transition: all 0.2s;
    position: relative;
}
.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(237, 180, 4, 0.08);
    color: #edb404;
}
.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: #edb404;
    border-radius: 0 3px 3px 0;
}

/* ---- Striped Table Rows ---- */
.table-striped tr:nth-child(even) { background: rgba(255, 255, 255, 0.02); }
.table-striped tr:hover { background: rgba(237, 180, 4, 0.04); }

/* ---- Landing Feature Card ---- */
.feature-card {
    background: linear-gradient(180deg, #18181b 0%, #0d0d0d 100%);
    border: 1px solid #452d01;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s, border-color 0.3s;
    position: relative;
    overflow: hidden;
}
.feature-card:hover { transform: translateY(-4px); border-color: #edb404; }
.feature-card .icon-box {
    width: 64px; height: 64px;
    background: rgba(237,180,4,0.08);
    border: 2px solid rgba(237,180,4,0.15);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: #edb404;
    transition: all 0.3s;
}
.feature-card:hover .icon-box {
    background: rgba(237,180,4,0.15);
    border-color: rgba(237,180,4,0.4);
    transform: scale(1.1);
}

/* ---- Stat counter ---- */
.stat-number { font-size: 3rem; font-weight: 900; color: #edb404; line-height: 1; }

/* ---- CTA Section ---- */
.cta-section {
    background: linear-gradient(135deg, #1a1a00 0%, #120402 50%, #1a1a00 100%);
    border-top: 3px solid #edb404;
    border-bottom: 3px solid #edb404;
}

/* ============================================================
   PRICING CARDS
   ============================================================ */
.pricing-card {
    background: linear-gradient(160deg, #18181b 0%, #0d0d0d 100%);
    border: 1px solid #452d01;
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s;
}
.pricing-card:hover { transform: translateY(-4px); }
.pricing-card.featured {
    border-color: #edb404;
    box-shadow: 0 0 40px rgba(237,180,4,0.08);
}
.pricing-card.featured::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #edb404, transparent);
}
.pricing-amount {
    font-size: 3rem;
    font-weight: 900;
    color: #edb404;
    line-height: 1;
}
.pricing-amount .currency { font-size: 1.5rem; vertical-align: top; }
.pricing-amount .period { font-size: 0.875rem; color: #666; font-weight: 400; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #171717; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #edb404; }

/* ============================================================
   GRID PATTERN OVERLAY (for sections)
   ============================================================ */
.grid-pattern {
    background-image:
        linear-gradient(rgba(237,180,4,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(237,180,4,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* ---- Glowing border accent ---- */
.glow-border {
    box-shadow: 0 0 20px rgba(237,180,4,0.05), inset 0 0 20px rgba(237,180,4,0.02);
}

/* ============================================================
   SIDEBAR LAYOUT — Carrier / Cliente
   ============================================================ */
/* The sidebar itself uses Tailwind classes; these are utility overrides */
#app-layout {
    min-height: 100vh;
}

/* ============================================================
   NOTIFICATION CARDS — Dynamic
   ============================================================ */
.notif-card {
    border-radius: 10px;
    padding: 0.875rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    animation: notifSlideIn 0.35s ease both;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}
.notif-card:hover {
    transform: translateX(3px);
}
.notif-unread {
    background: linear-gradient(135deg, #1a1a00 0%, #18181b 100%);
    border-color: rgba(237,180,4,0.25);
    border-left: 3px solid #edb404;
}
.notif-unread:hover {
    border-color: rgba(237,180,4,0.5);
    background: linear-gradient(135deg, #1f1f00 0%, #1e1e1e 100%);
    box-shadow: 0 4px 16px rgba(237,180,4,0.06);
}
.notif-read {
    background: #131313;
    border-color: #222;
    opacity: 0.65;
}
.notif-read:hover {
    opacity: 0.85;
    border-color: #333;
}

/* Notification icon wrapper */
.notif-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    transition: all 0.2s;
}
.notif-icon-active {
    background: rgba(237,180,4,0.12);
    border: 1px solid rgba(237,180,4,0.2);
    color: #edb404;
}
.notif-icon-muted {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    color: #6b7280;
}

/* Animated pulse dot for unread notifications */
.notif-dot-pulse {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #edb404;
    box-shadow: 0 0 0 0 rgba(237,180,4,0.4);
    animation: notifPulse 1.8s ease-in-out infinite;
}
@keyframes notifPulse {
    0%   { box-shadow: 0 0 0 0 rgba(237,180,4,0.5); }
    70%  { box-shadow: 0 0 0 7px rgba(237,180,4,0); }
    100% { box-shadow: 0 0 0 0 rgba(237,180,4,0); }
}

/* Ring pulse for bell icon */
.notif-pulse-ring {
    animation: ringPulse 1.5s ease-in-out infinite;
}
@keyframes ringPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(1.4); }
}

/* Slide-in animation for notification cards */
@keyframes notifSlideIn {
    from { opacity: 0; transform: translateX(-12px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Slow bounce for unread badge count */
@keyframes bounceSlow {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-3px); }
}
.animate-bounce-slow { animation: bounceSlow 1.5s ease-in-out infinite; }

/* line-clamp utility (for older browsers) */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* apps-badge-btn pulse glow on hover */
.apps-badge-btn:hover {
    box-shadow: 0 0 12px rgba(34,197,94,0.2);
}

/* ── Custom scrollbar for scrollable panels ── */
.scrollbar-thin::-webkit-scrollbar { width: 5px; }
.scrollbar-thin::-webkit-scrollbar-track { background: rgba(255,255,255,0.02); border-radius: 10px; }
.scrollbar-thin::-webkit-scrollbar-thumb { background: rgba(237,180,4,0.15); border-radius: 10px; }
.scrollbar-thin::-webkit-scrollbar-thumb:hover { background: rgba(237,180,4,0.3); }
.scrollbar-thin { scrollbar-width: thin; scrollbar-color: rgba(237,180,4,0.15) transparent; }

/* ── Sidebar navigation links ── */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 0.5rem;
    color: #9ca3af;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}
.sidebar-link:hover {
    background: #452d01;
    color: #edb404;
}
.sidebar-link.active {
    background: rgba(237,180,4,0.08);
    color: #edb404;
    border-left: 3px solid #edb404;
}
.sidebar-link i { font-size: 1.1rem; min-width: 1.25rem; text-align: center; }

/* ============================================================
   UI/UX ANIMATION SYSTEM
   ============================================================ */

/* ── Page Loader ── */
.page-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #120402;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.page-loader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(237,180,4,0.15);
    border-top-color: #edb404;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Click Ripple Effect ── */
.ripple-container {
    position: relative;
    overflow: hidden;
}
.ripple-container .ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: rippleAnim 0.5s ease-out;
    background: rgba(237,180,4,0.15);
    pointer-events: none;
}
@keyframes rippleAnim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ── Card Entrance Animation ── */
.card-industrial,
.notif-card,
.load-card-admin,
.sub-card-admin {
    animation: cardSlideUp 0.35s ease-out both;
}
@keyframes cardSlideUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Button Press Effect ── */
.btn-cargo,
.btn-cargo-outline,
.sidebar-link {
    transition: all 0.2s ease;
}
.btn-cargo:active,
.btn-cargo-outline:active {
    transform: scale(0.96);
}
.sidebar-link:active {
    transform: scale(0.97);
    background: rgba(237,180,4,0.12);
}

/* ── Badge & Stat Counter Pulse ── */
.stat-value {
    animation: statPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}
@keyframes statPop {
    from { opacity: 0; transform: scale(0.6); }
    to   { opacity: 1; transform: scale(1); }
}

/* ── Hover Card Glow ── */
.card-industrial {
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}
.card-industrial:hover {
    border-color: rgba(237,180,4,0.2);
    box-shadow: 0 0 20px rgba(237,180,4,0.05);
}

/* ── Notification Slide In ── */
.notif-card {
    animation: notifSlide 0.3s ease-out both;
}
@keyframes notifSlide {
    from {
        opacity: 0;
        transform: translateX(-16px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ── Smooth page scroll ── */
html { scroll-behavior: smooth; }

/* ============================================================
   MOBILE-FIRST COMPACT OPTIMIZATIONS
   ============================================================ */
@media (max-width: 639px) {
    /* Compact card padding on mobile */
    .card-industrial {
        padding: 12px 14px;
    }
    
    /* Smaller route arrows on mobile */
    .route-arrow {
        font-size: 0.9rem !important;
    }
    
    /* Compact buttons on mobile */
    .btn-cargo, .btn-cargo-outline {
        padding: 6px 10px;
        font-size: 0.7rem;
    }
    
    /* Compact notification cards */
    .notif-card {
        padding: 10px 12px;
    }
    
    /* Smaller badges on mobile */
    .badge {
        font-size: 0.65rem;
        padding: 2px 8px;
    }
    
    /* Compact profile card */
    .card-industrial h3 {
        font-size: 0.95rem;
    }
    
    /* Tighter spacing between load cards */
    .space-y-4 > * + * {
        margin-top: 0.75rem;
    }
    
    /* Compact load info meta */
    .flex-wrap.items-center.gap-2 {
        gap: 4px;
    }
}

/* ── Status Dot Animation ── */
.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.status-dot.active {
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34,197,94,0.5);
    animation: dotPulse 2s infinite;
}
.status-dot.expired {
    background: #eab308;
}
.status-dot.cancelled {
    background: #ef4444;
}
@keyframes dotPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ── Focus Ring for Accessibility ── */
.btn-cargo:focus-visible,
.btn-cargo-outline:focus-visible,
.sidebar-link:focus-visible,
.input-cargo:focus-visible {
    outline: 2px solid #edb404;
    outline-offset: 2px;
}

/* ============================================================
   CARRIER DIRECTORY — Cards, Semaphore System, Pagination
   ============================================================ */

/* ── Carrier Card ── */
.carrier-card {
    background: linear-gradient(145deg, #18181b 0%, #151515 100%);
    border: 1px solid #452d01;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s ease;
    animation: carrierCardIn 0.4s ease-out both;
    position: relative;
}
.carrier-card:hover {
    transform: translateY(-3px);
    border-color: rgba(237, 180, 4, 0.25);
    box-shadow: 0 8px 30px rgba(18, 4, 2, 0.4), 0 0 20px rgba(237, 180, 4, 0.05);
}
@keyframes carrierCardIn {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Semaphore Strip (top of card) ── */
.carrier-semaphore-strip {
    height: 4px;
    width: 100%;
    transition: background 0.3s;
}
.semaphore-strip-green {
    background: linear-gradient(90deg, #16a34a, #22c55e, #4ade80);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}
.semaphore-strip-yellow {
    background: linear-gradient(90deg, #ca8a04, #eab308, #facc15);
    box-shadow: 0 2px 8px rgba(234, 179, 8, 0.3);
}
.semaphore-strip-red {
    background: linear-gradient(90deg, #dc2626, #ef4444, #f87171);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}
.semaphore-strip-orange {
    background: linear-gradient(90deg, #c2410c, #f97316, #fb923c);
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}
.semaphore-strip-gray {
    background: #333;
}
.semaphore-strip-neutral {
    background: linear-gradient(90deg, #9ca3af, #ffffff, #9ca3af);
    box-shadow: 0 0px 12px rgba(255, 255, 255, 0.5);
}

/* ── Semaphore Dots ── */
.carrier-semaphore-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.carrier-semaphore-dot-lg {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.semaphore-green {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
    animation: semaphorePulse 2s ease-in-out infinite;
}
.semaphore-yellow {
    background: #eab308;
    box-shadow: 0 0 8px rgba(234, 179, 8, 0.5);
    animation: semaphorePulse 2.5s ease-in-out infinite;
}
.semaphore-red {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
    animation: semaphorePulse 3s ease-in-out infinite;
}
.semaphore-orange {
    background: #f97316;
    box-shadow: 0 0 8px rgba(249, 115, 22, 0.6);
    animation: semaphorePulse 2.2s ease-in-out infinite;
}
@keyframes semaphorePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.5; transform: scale(1.3); }
}

/* ── Carrier Avatar ── */
.carrier-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
    transition: all 0.2s;
}
.carrier-avatar-lg {
    width: 48px;
    height: 48px;
}
.carrier-avatar-verified {
    background: rgba(34, 197, 94, 0.1);
    border: 2px solid rgba(34, 197, 94, 0.25);
    color: #22c55e;
}
.carrier-avatar-pending {
    background: rgba(237, 180, 4, 0.08);
    border: 2px solid rgba(237, 180, 4, 0.15);
    color: #edb404;
}
.carrier-card:hover .carrier-avatar {
    transform: scale(1.08);
}

/* ── Carrier Verification Badges ── */
/* Carrier badge styles now use the global badge-status-* system.
   These aliases are kept for backward compatibility. */
.carrier-badge-verified  { background: rgba(34, 197, 94, 0.12); color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.3); }
.carrier-badge-review    { background: rgba(234, 179, 8, 0.12); color: #eab308; border: 1px solid rgba(234, 179, 8, 0.3); }

/* ── Large Semaphore Badge (Modal) ── */
.carrier-semaphore-badge-lg {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 12px;
    border: 1px solid;
}

/* ── Carrier Info Rows ── */
.carrier-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: #9ca3af;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    transition: background 0.2s;
}
.carrier-info-row:hover {
    background: rgba(237, 180, 4, 0.04);
}
.carrier-info-row i {
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* ── Carrier Card Footer ── */
.carrier-card-footer {
    display: flex;
    border-top: 1px solid #452d01;
    background: rgba(255, 255, 255, 0.015);
}

/* ── Filter Tags ── */
.carrier-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(237, 180, 4, 0.08);
    color: #edb404;
    border: 1px solid rgba(237, 180, 4, 0.2);
    transition: all 0.2s;
}
.carrier-filter-tag button {
    background: none;
    border: none;
    color: rgba(237, 180, 4, 0.5);
    cursor: pointer;
    padding: 0;
    margin-left: 2px;
    transition: color 0.2s;
}
.carrier-filter-tag button:hover {
    color: #edb404;
}

/* ── Pagination Buttons ── */
.carrier-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #333;
    background: #18181b;
    color: #9ca3af;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.carrier-page-btn:hover:not(:disabled) {
    border-color: rgba(237, 180, 4, 0.4);
    background: rgba(237, 180, 4, 0.06);
    color: #edb404;
}
.carrier-page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.carrier-page-active {
    background: rgba(237, 180, 4, 0.12) !important;
    border-color: #edb404 !important;
    color: #edb404 !important;
    box-shadow: 0 0 12px rgba(237, 180, 4, 0.15);
}

/* ── Mobile Optimizations for Carrier Directory ── */
@media (max-width: 639px) {
    .carrier-card {
        border-radius: 10px;
    }
    .carrier-card .p-4 {
        padding: 12px;
    }
    .carrier-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }
    .carrier-page-btn {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }
}

/* ============================================================
   SUBSCRIPTION & BILLING PREMIUM STYLES
   ============================================================ */

/* ── PRO Badge ── */
.badge-pro {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #120402;
    background: linear-gradient(135deg, #edb404, #f5d060, #edb404);
    background-size: 200% 100%;
    border: 1px solid rgba(237,180,4,0.5);
    border-radius: 9999px;
    box-shadow: 0 0 12px rgba(237,180,4,0.25), inset 0 1px 0 rgba(255,255,255,0.2);
    animation: proShimmer 3s ease-in-out infinite;
}

@keyframes proShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ── Glow Border (active plan card) ── */
.glow-border {
    border-color: rgba(237,180,4,0.3) !important;
    box-shadow: 0 0 20px rgba(237,180,4,0.08), inset 0 0 20px rgba(237,180,4,0.03);
}

/* ── Usage Bar ── */
.usage-bar-wrapper {
    padding: 4px 0;
}

.usage-bar-fill {
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Upgrade Prompt ── */
.upgrade-prompt {
    background: linear-gradient(145deg, rgba(237,180,4,0.04), transparent);
    border: 1px dashed rgba(237,180,4,0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.upgrade-prompt:hover {
    border-color: rgba(237,180,4,0.4);
    background: linear-gradient(145deg, rgba(237,180,4,0.08), transparent);
}

/* ── Lock Overlay ── */
.lock-overlay {
    position: relative;
}

.lock-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(18,4,2,0.7);
    backdrop-filter: blur(3px);
    border-radius: inherit;
    z-index: 5;
}

.lock-overlay .lock-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    color: #edb404;
    font-weight: 900;
    font-size: 14px;
}

/* ── Pricing Card Enhancements ── */
.pricing-card.featured {
    border-color: rgba(237,180,4,0.3);
    box-shadow: 0 0 30px rgba(237,180,4,0.08);
}

.pricing-card.featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #edb404, transparent);
}

/* ── Slow Pulse Animation ── */
.animate-pulse-slow {
    animation: pulseSlow 3s ease-in-out infinite;
}

@keyframes pulseSlow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ── Billing Status Dot ── */
.billing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.billing-dot-success { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,0.4); }
.billing-dot-failed  { background: #ef4444; box-shadow: 0 0 6px rgba(239,68,68,0.4); }
.billing-dot-pending { background: #f97316; box-shadow: 0 0 6px rgba(249,115,22,0.4); }

/* ── Admin Load/Sub Cards (used in live-polling sections) ── */
.load-card-admin {
    background: linear-gradient(145deg, #18181b 0%, #151515 100%);
    border: 1px solid #2d2d2d;
    border-left: 3px solid rgba(237,180,4,0.4);
    border-radius: 8px;
    padding: 0.875rem 1rem;
    transition: all 0.2s ease;
    animation: cardSlideUp 0.35s ease-out both;
}
.load-card-admin:hover {
    border-color: rgba(237,180,4,0.3);
    background: linear-gradient(145deg, #1a1a00 0%, #18181b 100%);
    box-shadow: 0 4px 14px rgba(237,180,4,0.05);
    transform: translateX(2px);
}
.sub-card-admin {
    background: linear-gradient(145deg, #18181b 0%, #151515 100%);
    border: 1px solid #2d2d2d;
    border-left: 3px solid rgba(147,51,234,0.4);
    border-radius: 8px;
    padding: 0.875rem 1rem;
    transition: all 0.2s ease;
    animation: cardSlideUp 0.35s ease-out both;
}
.sub-card-admin:hover {
    border-color: rgba(147,51,234,0.3);
    box-shadow: 0 4px 14px rgba(147,51,234,0.04);
    transform: translateX(2px);
}

/* ── Excarga logo image utility ── */
.logo-excarga {
    object-fit: contain;
    display: inline-block;
}

/* ============================================================
   PILOTOS MODULE — Search & Result Styles
   ============================================================ */

/* ── Google-style Search Bar ── */
.pilot-search-wrapper {
    transition: all 0.3s ease;
}

.pilot-search-container {
    display: flex;
    align-items: center;
    background: linear-gradient(145deg, #1e1e1e 0%, #181818 100%);
    border: 2px solid #333;
    border-radius: 9999px;
    padding: 0.5rem 0.5rem 0.5rem 1.25rem;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.pilot-search-container:hover {
    border-color: #555;
    box-shadow: 0 6px 30px rgba(0,0,0,0.4);
}

.pilot-search-focused .pilot-search-container {
    border-color: #edb404;
    box-shadow: 0 6px 30px rgba(237,180,4,0.08), 0 0 0 1px rgba(237,180,4,0.1);
}

.pilot-search-icon {
    color: #666;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: color 0.3s;
}

.pilot-search-focused .pilot-search-icon {
    color: #edb404;
}

.pilot-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    min-width: 0;
}

.pilot-search-input::placeholder {
    color: #555;
    font-weight: 400;
}

.pilot-search-clear {
    color: #666;
    padding: 0.25rem 0.5rem;
    border-radius: 50%;
    transition: all 0.2s;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.pilot-search-clear:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.pilot-search-btn {
    background: #edb404;
    color: #120402;
    font-weight: 700;
    padding: 0.6rem 1.5rem;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s;
    flex-shrink: 0;
}

.pilot-search-btn:hover:not(:disabled) {
    background: #c7a230;
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(237,180,4,0.2);
}

.pilot-search-btn:active {
    transform: scale(0.97);
}

.pilot-search-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Pilot Result Card ── */
.pilot-result-card {
    background: linear-gradient(145deg, #18181b 0%, #121212 100%);
    border: 1px solid #333;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    animation: pilotCardAppear 0.4s ease-out both;
    transition: border-color 0.3s;
}

.pilot-result-card:hover {
    border-color: rgba(237,180,4,0.25);
}

@keyframes pilotCardAppear {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ── Mobile Optimizations for Pilotos ── */
@media (max-width: 639px) {
    .pilot-search-container {
        border-radius: 12px;
        padding: 0.375rem 0.375rem 0.375rem 0.875rem;
    }

    .pilot-search-btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }

    .pilot-search-input {
        font-size: 0.9rem;
    }

    .pilot-result-card {
        border-radius: 10px;
    }
}
