:root {
    --primary: #F5A623;
    --primary-hover: #D78A17;
    --primary-gradient: linear-gradient(135deg, #FFC15E 0%, #F5A623 100%);
    --secondary: #1E2B4D;

    /* Apple-Style Deep Premium Colors */
    --bg-dark: #070B19;
    --bg-card: #0F1629;
    --text-light: #F8FAFC;
    --text-muted: #94A3B8;

    /* Borders and States */
    --border: rgba(255, 255, 255, 0.08);
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --info: #3B82F6;

    /* Elegant Shadows & Glass */
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 20px rgba(245, 166, 35, 0.3);
    --glass-bg: rgba(15, 22, 41, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    /* Soft mesh gradient background effect */
    background-image: radial-gradient(circle at 15% 50%, rgba(245, 166, 35, 0.03), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(59, 130, 246, 0.03), transparent 25%);
    -webkit-font-smoothing: antialiased;
}

/* Typography Enhancements */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: -0.02em;
}

.text-primary {
    color: var(--primary);
    background: var(--primary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Accessibility Focus States & Touch Actions */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(245, 166, 35, 0.4);
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-hover);
    text-shadow: 0 0 8px rgba(245, 166, 35, 0.4);
}

/* Utilities */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 5%;
}

.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 10px;
}

.mb-2 {
    margin-bottom: 20px;
}

.mb-3 {
    margin-bottom: 30px;
}

.mb-4 {
    margin-bottom: 40px;
}

.mt-2 {
    margin-top: 20px;
}

.mt-4 {
    margin-top: 40px;
}

.show-on-mobile {
    display: none !important;
}

/* Premium Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: none;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.01em;
}

.btn:active:not(:disabled) {
    transform: scale(0.96);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
}

.btn-primary {
    background: var(--primary-gradient);
    color: #0A0A0A;
    box-shadow: 0 4px 15px rgba(245, 166, 35, 0.2);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 166, 35, 0.4);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover:not(:disabled) {
    background: var(--primary-gradient);
    color: #0A0A0A;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(245, 166, 35, 0.3);
}

/* Custom Back Button Styling */
.btn-back {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.btn-back:hover:not(:disabled) {
    background: linear-gradient(45deg, #ffd700, #ff8c00);
    color: #121212;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    transform: translateX(-3px);
    /* pequeña animación hacia atrás */
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Form Interactivity */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-control {
    width: 100%;
    padding: 15px 18px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-light);
    font-size: 1rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2), 0 0 15px rgba(255, 215, 0, 0.2);
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.checkbox-item:hover {
    opacity: 0.8;
}

/* Navigation - Glassmorphism */
.navbar {
    padding: 15px 0;
    background: rgba(7, 11, 25, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    letter-spacing: -0.03em;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
}

.logo span {
    background: var(--primary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-wrapper {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
    animation: fade-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Modern Card Displays */
.card {
    background: linear-gradient(145deg, var(--bg-card) 0%, #0A0F1D 100%);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-soft);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(245, 166, 35, 0.4);
}

/* Grids */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.materials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    background: rgba(0, 0, 0, 0.1);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

/* Apple-Style Glass Models */
.glass-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
    /* Subtle lighting */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border-radius: 20px !important;
}

.glass-card:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%) !important;
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* Feature List Alignment */
.glass-card ul li {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
}

.glass-card ul li i {
    width: 20px !important;
    text-align: center !important;
    margin-top: 3px !important;
    flex-shrink: 0 !important;
}

.plan-recommended {
    transform: scale(1);
    border: 1px solid var(--primary) !important;
    box-shadow: 0 0 40px rgba(245, 166, 35, 0.15);
    z-index: 10;
    position: relative;
    overflow: hidden;
}

.plan-recommended::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: skewX(-20deg);
    animation: shine 6s infinite;
}

.plan-recommended:hover {
    transform: scale(1.02) translateY(-5px);
    border-color: var(--primary-hover) !important;
    box-shadow: 0 15px 50px rgba(245, 166, 35, 0.35);
}

/* Photo Upload Responsive Styles */
.responsive-photo-upload {
    width: 80px;
    height: 80px;
    border: 1px dashed rgba(255, 215, 0, 0.4);
    border-radius: 10px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.responsive-photo-upload:hover {
    border-color: var(--primary);
}

.responsive-photo-upload .icon-large {
    font-size: 1.5rem;
    color: rgba(255, 215, 0, 0.8);
    margin-bottom: 4px;
    display: block;
}

.responsive-photo-upload .icon-small {
    display: none;
}

.responsive-photo-upload .text-desktop {
    font-size: 0.6rem;
    color: var(--text-muted);
    display: block;
}

.responsive-photo-upload .text-mobile {
    display: none;
}

/* Desktop Hero Title (Same 3-line style as mobile but scaled) */
.hero-mobile-break {
    display: block !important;
    font-size: 6.5rem !important;
    font-weight: 900 !important;
    margin-top: 5px !important;
    color: var(--primary) !important;
    line-height: 1.1 !important;
}

.hero-line-1 {
    font-size: 3.8rem !important;
    white-space: nowrap !important;
    letter-spacing: -1px !important;
    margin-bottom: 5px !important;
}

.hero-line-2 {
    font-size: 4.2rem !important;
    white-space: nowrap !important;
    letter-spacing: -1px !important;
    color: #FFF !important;
}

/* Desktop Pain-Power Title */
.pain-power-title {
    font-size: 4.5rem !important;
    line-height: 1.1 !important;
}

.pain-power-title span {
    font-size: 2.6rem !important;
    margin-top: 5px !important;
    display: block !important;
}

@media (max-width: 768px) {

    /* Grillas a columna única con hueco comprimido */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .materials-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Reajuste de Márgenes y Espacios */
    .container {
        padding: 0 12px;
    }

    .main-wrapper {
        margin-top: 60px;
    }

    /* Escala de Tipografías Móviles */
    body {
        font-size: 0.95rem;
    }

    h1 {
        line-height: 1.25;
        margin-bottom: 15px;
    }

    .hero-mobile-break {
        display: block !important;
        font-size: 12.6vw !important;
        font-weight: 900 !important;
        margin-top: 5px !important;
        color: var(--primary) !important;
    }

    .hero-line-1 {
        font-size: 8.2vw !important;
        white-space: normal !important;
        margin-bottom: 5px !important;
    }

    .hero-line-2 {
        font-size: 8.8vw !important;
        white-space: nowrap !important;
        color: #FFF !important;
    }

    h2 {
        font-size: 1.8rem !important;
        margin-bottom: 12px !important;
        line-height: 1.25 !important;
    }

    h3 {
        font-size: 1.3rem !important;
        line-height: 1.3 !important;
    }

    h4 {
        font-size: 1.15rem !important;
    }

    .stat-number {
        font-size: 2.2rem !important;
    }

    .partner-logo-text {
        font-size: 1.5rem !important;
    }

    .hero p {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
        padding: 0 15px !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        margin-bottom: 20px !important;
        text-align: center !important;
        text-wrap: wrap !important;
    }

    /* Ajustes Caja de Lanzamiento Móvil */
    .miami-sticker {
        top: -2px !important;
        right: -15px !important;
        transform: rotate(4deg) scale(0.65) !important;
        z-index: 20 !important;
    }

    .launch-banner-container {
        padding: 20px 15px !important;
        border-radius: 12px !important;
    }

    .launch-banner-container h3 {
        font-size: 1.5rem !important;
        margin-bottom: 12px !important;
        text-align: center;
    }

    .launch-banner-container ul {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
    }

    .launch-banner-container ul li {
        margin-bottom: 10px !important;
    }

    .launch-banner-container .urgency-box {
        padding: 20px 15px !important;
        min-width: 100% !important;
    }

    .launch-banner-container h4 {
        font-size: 1.25rem !important;
        margin-bottom: 10px !important;
    }

    .launch-banner-container p {
        font-size: 0.9rem !important;
        margin-bottom: 15px !important;
    }

    .launch-banner-container button {
        padding: 12px !important;
        font-size: 1rem !important;
    }

    .pain-power-header {
        margin-top: -30px !important;
    }

    .pain-power-title {
        white-space: normal !important;
        font-size: 9.4vw !important;
        line-height: 1.15 !important;
        padding: 0 10px;
    }

    .pain-power-title span {
        font-size: 5.3vw !important;
        margin-top: 5px;
        white-space: nowrap !important;
    }

    .pain-power-desc {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
        padding: 0 20px !important;
        text-align: center !important;
        text-align-last: center !important;
    }

    /* Reducir espacio entre el Hero y la primera tarjeta */
    .hero+.container {
        padding-top: 20px !important;
    }

    /* Ajustes en Formularios y Botones */
    .form-control {
        padding: 10px 14px;
        font-size: 0.95rem;
    }

    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    /* Formularios de Registro Header */
    .registration-header {
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center;
        gap: 20px;
    }

    .registration-header-left {
        flex-direction: column !important;
        text-align: center;
    }

    .registration-header-left h2 {
        text-align: center !important;
    }

    /* Formularios de Registro Photo Upload */
    .responsive-photo-upload {
        width: auto !important;
        height: auto !important;
        flex-direction: column !important;
        gap: 4px !important;
        padding: 5px !important;
        border-radius: 0 !important;
        border: none !important;
        background: transparent !important;
        color: var(--primary) !important;
        font-size: 0.85rem !important;
        margin-top: 0 !important;
    }

    .responsive-photo-upload:hover {
        background: transparent !important;
        opacity: 0.8;
    }

    .responsive-photo-upload .icon-large {
        display: none !important;
    }

    .responsive-photo-upload .icon-small {
        display: none !important;
    }

    .responsive-photo-upload .text-desktop {
        display: none !important;
    }

    .responsive-photo-upload .text-mobile {
        font-weight: normal !important;
        display: block !important;
        color: var(--text-muted) !important;
        text-decoration: underline;
        text-decoration-color: rgba(255, 215, 0, 0.3);
        text-underline-offset: 3px;
    }

    .responsive-photo-upload .text-mobile span {
        display: none !important;
        /* Hide (Opcional) to make it cleaner, or keep it */
    }

    /* Utilidades móviles */
    .hide-on-mobile {
        display: none !important;
    }

    .show-on-mobile {
        display: inline-flex !important;
    }

    /* Ajustes en Tarjetas y Membresías */
    .plan-recommended {
        transform: scale(1);
    }

    .plan-recommended:hover {
        transform: translateY(-3px);
    }

    .card,
    .glass-card {
        padding: 18px 15px;
        border-radius: 12px;
    }

    /* Componentes Flotantes y Modales */
    .custom-modal {
        width: 95%;
        max-width: 100%;
        padding: 25px 20px;
        max-height: 85vh;
        overflow-y: auto;
        overflow-x: hidden;
        border-radius: 16px;
    }

    /* Tablas Resposivas. Reducir cell padding */
    .table-responsive th,
    .table-responsive td {
        padding: 10px 8px !important;
        font-size: 0.85rem;
    }

    .table-responsive {
        margin-bottom: 10px;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    /* Reordenar testimonios en móvil: Nombre arriba, luego estrellas, luego texto */
    .testimonial-card {
        display: flex !important;
        flex-direction: column !important;
        position: relative;
    }

    .testimonial-author {
        order: -1;
        padding-top: 0 !important;
        border-top: none !important;
        padding-bottom: 15px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
        margin-bottom: 15px !important;
        padding-right: 80px !important;
        /* Espacio para las estrellas */
    }

    .testimonial-stars {
        position: absolute;
        top: 28px;
        /* Alineado verticalmente con el nombre/avatar */
        right: 20px;
        margin-bottom: 0 !important;
    }

    .testimonial-text {
        order: 2;
        margin-bottom: 0 !important;
    }

    /* Fallback para tablas sin resposive wrapper */

    /* Panel Superior e Inferior */
    .hero {
        padding: 60px 0 10px !important;
    }

    .footer {
        padding: 40px 0 20px !important;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .footer-links {
        justify-content: center;
        margin-top: 15px;
    }

    /* Tarjetas de Métricas Horizontales CEO */
    .ceo-metrics-container .metric-card {
        min-width: 140px !important;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {

    /* Ajuste Extra Fino para dispositivos muy pequeños */
    body {
        font-size: 0.9rem;
    }

    #toast-container {
        right: 10px;
        left: 10px;
        bottom: 15px;
    }

    .custom-toast {
        min-width: 100%;
        max-width: 100%;
        padding: 12px 15px;
        font-size: 0.85rem;
    }

    /* Estructurar botones para movil ultra pequeño */
    .btn {
        width: 100%;
        margin-bottom: 8px;
        justify-content: center;
    }

    .btn i {
        margin-right: 8px;
    }

    /* Forzar flex-direction: column en grupos de botones horizontales */
    div[style*="display: flex"][style*="gap:"]>.btn {
        flex: 1 1 100%;
    }

    .navbar .container {
        padding: 0 10px;
    }

    .logo {
        font-size: 1.2rem;
    }

    .card,
    .glass-card {
        padding: 15px 12px;
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes shine {
    0% {
        left: -100%;
    }

    20% {
        left: 200%;
    }

    100% {
        left: 200%;
    }
}

/* Custom Toasts Premium System */
#toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.custom-toast {
    background: rgba(15, 22, 41, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    color: #fff;
    padding: 16px 24px;
    border-radius: 14px;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 16px;
    transform: translateX(120%) scale(0.9);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
}

.custom-toast.show {
    transform: translateX(0) scale(1);
    opacity: 1;
}

.toast-icon {
    font-size: 1.6rem;
}

.toast-success i {
    color: var(--success);
}

.toast-error i {
    color: var(--danger);
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.toast-info i {
    color: var(--info);
}

.toast-warning i {
    color: var(--warning);
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

/* Custom Modal Prompts */
#custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

#custom-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.custom-modal {
    background: rgba(15, 22, 41, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 35px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    transform: scale(0.95) translateY(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#custom-modal-overlay.show .custom-modal {
    transform: scale(1) translateY(0);
}

/* Notification Bell Animation */
@keyframes ring {

    0%,
    100% {
        transform: rotate(0);
    }

    10% {
        transform: rotate(20deg) scale(1.1);
    }

    20% {
        transform: rotate(-15deg) scale(1.1);
    }

    30% {
        transform: rotate(10deg) scale(1.1);
    }

    40% {
        transform: rotate(-5deg) scale(1.1);
    }

    50% {
        transform: rotate(0) scale(1);
    }
}

.bell-ringing {
    animation: ring 2.5s ease infinite;
    color: var(--primary);
    text-shadow: 0 0 15px rgba(245, 166, 35, 0.5);
}

/* Admin CEO Sidebar Mobile Fixes */
/* Admin CEO Sidebar Mobile Fixes */
.admin-sidebar {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), width 0.3s ease;
}

.ceo-sidebar-toggle {
    display: none !important;
}

@media (max-width: 768px) {
    .admin-sidebar {
        position: fixed !important;
        left: 0;
        top: 60px !important;
        bottom: 0;
        height: calc(100vh - 60px);
        height: calc(100dvh - 60px);
        z-index: 991 !important;
        background: rgba(10, 15, 25, 0.98) !important;
        backdrop-filter: blur(20px);
        transform: translateX(-100%);
        border-right: 1px solid var(--border);
        box-shadow: none !important;
    }

    .admin-sidebar.active {
        transform: translateX(0);
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.8) !important;
    }
}

/* Responsive Tables & Mobile Fixes */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 15px;
    border-radius: 8px;
}

.table-responsive table {
    width: 100%;
    min-width: 600px;
}

@media (max-width: 480px) {
    .btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

/* Global Responsive App Layout For Portals */
.app-layout {
    display: flex;
    min-height: calc(100vh - 80px);
    background: var(--bg-dark);
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    width: 100%;
}

.app-sidebar {
    width: 280px;
    background: rgba(0, 0, 0, 0.3);
    border-right: 1px solid var(--border);
    padding: 25px 20px 40px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
    z-index: 990;
}

.app-main-content {
    flex-grow: 1;
    padding: 30px;
    position: relative;
    min-height: calc(100vh - 80px);
    width: 100%;
    padding-bottom: 60px;
}

/* Force full width on core internal panes */
.worker-content-pane,
.contractor-content-pane,
.supply-content-pane,
.app-main-content .container,
.app-main-content>div[id^="pane-"] {
    max-width: 100% !important;
}

.mobile-sidebar-toggle {
    display: none;
}

.mobile-sidebar-overlay {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 990;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}



@media (max-width: 768px) {
    .app-layout {
        display: block;
        /* Disable flex row */
    }

    .app-sidebar {
        position: fixed !important;
        left: 0;
        top: 60px !important;
        bottom: 0;
        height: calc(100vh - 60px);
        height: calc(100dvh - 60px);
        overflow-y: auto;
        /* Required for internal scrolling on mobile */
        background: rgba(10, 15, 25, 0.98) !important;
        backdrop-filter: blur(20px);
        transform: translateX(-100%);
        z-index: 991 !important;
        box-shadow: none !important;
    }

    .app-sidebar.active {
        transform: translateX(0);
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.8) !important;
    }

    .mobile-sidebar-toggle {
        display: inline-flex !important;
    }

    .app-main-content {
        padding: 20px 15px;
    }

    .navbar .container {
        padding: 0 15px;
    }

    /* Job Market Aesthetic Mobile Overrides */
    .job-market-card {
        padding: 22px 20px !important;
        border-radius: 20px !important;
    }

    .job-market-flex {
        flex-direction: column;
        gap: 20px !important;
    }

    .job-market-info {
        min-width: 100% !important;
    }

    .job-market-title h4 {
        font-size: 1.25rem !important;
        margin-bottom: 5px !important;
    }

    .job-market-actions {
        flex-direction: column-reverse !important;
        align-items: stretch !important;
        margin-top: 15px;
        width: 100%;
        gap: 15px !important;
    }

    .job-market-date {
        width: 100% !important;
        margin-bottom: 0 !important;
        font-size: 0.75rem !important;
        text-align: center;
        justify-content: center;
        opacity: 0.7;
    }

    .job-market-buttons {
        display: flex;
        width: 100%;
        gap: 12px;
    }

    .job-market-buttons .btn {
        flex: 1;
        padding: 14px !important;
        font-size: 0.9rem !important;
        border-radius: 14px !important;
        justify-content: center;
        max-width: none !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    }

    .job-market-badges {
        flex-wrap: wrap;
        gap: 8px !important;
        margin-top: 5px !important;
    }

    .job-market-badges span {
        font-size: 0.75rem !important;
        padding: 6px 12px !important;
        border-radius: 12px !important;
    }

    .job-market-meta {
        gap: 15px !important;
        font-size: 0.85rem !important;
        flex-wrap: wrap;
        margin-top: 5px !important;
    }

    .job-market-desc {
        padding: 18px !important;
        border-radius: 16px !important;
        background: rgba(0, 0, 0, 0.3) !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
    }

    .job-market-desc p {
        font-size: 0.9rem !important;
        line-height: 1.6 !important;
    }
}

/* Chat Module Responsive Layout */
.chat-responsive-container {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.chat-list-pane {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px;
    transition: all 0.3s ease;
}

.chat-active-pane {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s ease;
}

.mobile-chat-back-btn {
    display: none !important;
}

.mobile-chat-exit-btn {
    display: none !important;
}

@media (max-width: 768px) {
    .chat-close-btn {
        display: none !important;
    }

    .mobile-chat-exit-btn {
        display: flex !important;
    }

    .chat-main-wrapper.chat-mobile-active .global-chat-header {
        display: none !important;
    }

    .chat-list-pane {
        width: 100% !important;
        border-right: none !important;
    }

    .chat-active-pane {
        position: absolute !important;
        top: 0;
        left: 0;
        width: 100% !important;
        height: 100% !important;
        background: var(--bg-dark);
        transform: translateX(100%);
        z-index: 10;
    }

    .chat-responsive-container.chat-mobile-active .chat-list-pane {
        transform: translateX(-100%);
        opacity: 0;
        pointer-events: none;
    }

    .chat-responsive-container.chat-mobile-active .chat-active-pane {
        transform: translateX(0);
    }

    .mobile-chat-back-btn {
        display: inline-flex !important;
        margin-right: 10px;
    }
}

/* --- MOBILE SPECIFIC TESTIMONIALS STYLES --- */
@media (max-width: 768px) {
    .testimonial-card-main {
        padding: 30px 15px !important;
    }

    .testimonial-main-title {
        font-size: 1.5rem !important;
        padding-bottom: 15px !important;
        margin-bottom: 20px !important;
    }

    .testimonial-row {
        padding: 20px 15px !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 15px !important;
    }

    .testimonial-content {
        text-align: center !important;
    }

    .testimonial-header {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
    }

    .testimonial-quote {
        font-size: 3rem !important;
        top: -15px !important;
        right: 50% !important;
        transform: translateX(50%) rotate(-5deg) !important;
        opacity: 0.5 !important;
    }
}