/* =========================================
   1. VARIABLES & SISTEMA DE DISEÑO
   ========================================= */
:root {
    /* --- Paleta de Marca (Orgánica: Verde & Marrón) --- */
    --color-primary: #2e7d32;
    --color-primary-light: #4caf50;
    --color-primary-dark: #1b5e20;

    --color-secondary: #795548;
    --color-secondary-light: #a1887f;
    --color-secondary-dark: #4e342e;

    /* --- Fondos y Superficies --- */
    --color-accent: #e8f5e9;
    --color-surface: #ffffff;
    --color-background: #fdfbf7;
    --color-hover: #f1f8e9;
    --border-color: #e0e0e0;
    --bg-card-edit: #e0e7ff;
    /* Indigo 50-ish */

    /* --- Estados Funcionales --- */
    --color-success: #2e7d32;
    --color-warning: #f9a825;
    --color-danger: #c62828;
    --color-info: #0288d1;

    /* --- Tipografía & Texto --- */
    --font-stack: 'Poppins', system-ui, -apple-system, sans-serif;
    --text-primary: #263238;
    --text-secondary: #546e7a;
    --text-inverse: #ffffff;

    /* --- UI & Espaciado --- */
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --border-radius-pill: 50px;

    /* --- Sombras --- */
    --shadow-soft: 0 4px 12px rgba(46, 125, 50, 0.08);
    --shadow-md: 0 8px 24px rgba(46, 125, 50, 0.12);
    --shadow-hover: 0 15px 35px rgba(46, 125, 50, 0.2);

    /* --- Gradientes --- */
    --gradient-brand: linear-gradient(135deg, var(--color-primary), var(--color-secondary));

    /* --- Transiciones --- */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Modo Oscuro (Premium & Modern) */
/* Modo Oscuro (Misma paleta que Light) */
[data-theme="dark"] {
    /* Brand Colors (Keeping preserved as much as possible, just ensuring contrast) */
    --color-primary: #4caf50;
    /* Slightly lighter green for dark bg */
    --color-primary-light: #81c784;
    --color-primary-dark: #388e3c;
    --color-secondary: #a1887f;
    --color-secondary-light: #d7ccc8;
    --color-secondary-dark: #5d4037;

    /* 1️⃣ Main background */
    --color-background: #1C1C1D;

    /* 2️⃣ Cards (Surface) & 3️⃣ Search bar (Inputs) */
    --color-surface: #252728;

    /* UI States */
    --color-accent: #2C2C2E;
    /* Darker accent */
    --color-hover: #2F3133;
    /* Subtle hover on surface */
    --border-color: #3A3A3B;
    /* Subtle dark border */
    --bg-card-edit: #39393B;

    /* Text (Must be light for Dark Mode) */
    --text-primary: #EAEAEA;
    --text-secondary: #A0A0A0;
    --text-inverse: #1C1C1D;

    /* Functional */
    --color-success: #66bb6a;
    --color-warning: #fbc02d;
    --color-danger: #ef5350;
    --color-info: #29b6f6;

    /* Shadows */
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.6);
    --gradient-brand: linear-gradient(135deg, #1b5e20, #4e342e);
}

/* Dark Mode UI Refinements */
[data-theme="dark"] .form-input,
[data-theme="dark"] .form-select,
[data-theme="dark"] textarea {
    background-color: var(--color-surface);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .form-input:focus,
[data-theme="dark"] textarea:focus {
    border-color: var(--color-primary);
    background-color: var(--color-hover);
}

[data-theme="dark"] .nav-dropdown,
[data-theme="dark"] .submenu {
    background-color: var(--color-surface);
    border-color: var(--border-color);
}

[data-theme="dark"] .dropdown-item:hover {
    background-color: var(--color-hover);
}

/* Ensure smooth transitions for theme switch */
/* Special Offer and News Cards Dark Mode */
[data-theme="dark"] .post-card-offer,
[data-theme="dark"] .post-card-news {
    background-color: #39393B !important;
    border-color: #555 !important;
}

[data-theme="dark"] .post-card-offer h5,
[data-theme="dark"] .post-card-offer .post-price {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .post-card-offer p {
    color: var(--text-secondary) !important;
}

/* Notification Items Dark Mode */
[data-theme="dark"] .notification-item {
    background-color: #39393B !important;
    border-color: #555 !important;
}

[data-theme="dark"] .notification-item span[style*="color: #1f2937"] {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .notification-item span[style*="color: #666"] {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .notification-item span[style*="color: #666"] {
    color: var(--text-secondary) !important;
}

/* Verification Card Dark Mode */
[data-theme="dark"] .verification-card {
    background-color: #39393B !important;
    border-color: #555 !important;
}

[data-theme="dark"] .product-attribute-input {
    background-color: var(--bg-hover) !important;
    color: var(--text-primary) !important;
    border-color: #555 !important;
}

[data-theme="dark"] .product-attribute-wrapper {
    background-color: #39393B !important;
    border-color: #555 !important;
}

/* Field Settings Button */
.btn-field-settings {
    background-color: #f3f4f6;
    /* Gray-100 */
}

.btn-field-settings:hover {
    filter: brightness(0.95);
}

[data-theme="dark"] .btn-field-settings {
    background-color: #39393B !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color);
}

/* Report Reasons Dropdown */
.report-reasons-dropdown {
    background-color: #f9f9f9;
}

[data-theme="dark"] .report-reasons-dropdown {
    background-color: #39393B !important;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

/* Admin Dashboard Cards */
.admin-stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%);
    padding: 25px;
    border: none;
}

[data-theme="dark"] .admin-stat-card {
    background: #39393B !important;
    color: var(--text-primary);
}

/* Light Mode Defaults */
.verification-card,
.product-attribute-wrapper {
    background-color: #f9fafb;
    /* gray-50 equivalent */
}

/* Light Mode Defaults (can be implicit, but explicit helps) */
.post-card-offer {
    background-color: #fff1f2;
    border-color: #fecdd3;
}

.post-card-news {
    background-color: white;
    border-color: var(--border-color);
}

body,
.card,
.navbar,
.nav-dropdown,
.form-input {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .card,
[data-theme="dark"] .content-panel,
[data-theme="dark"] .sidebar {
    color: var(--text-primary);
}

/* =========================================
   2. ESTILOS GENERALES & RESET
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-stack);
    /* outline: none; */
}

body {
    background-color: var(--color-background);
    /* Pattern sutil */
    background-image: radial-gradient(var(--color-primary-light) 0.5px, transparent 0.5px);
    background-size: 24px 24px;
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

/* =========================================
   2.1. BUTTON UTILITIES
   ========================================= */
.btn-primary {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius-pill);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-size: 14px;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 12px 24px;
    border-radius: var(--border-radius-pill);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-size: 14px;
}


/* =========================================
   2.2. FORM UTILITIES
   ========================================= */
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    background-color: white;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
}

.form-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%232e7d32%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 15px top 50%;
    background-size: 12px auto;
}

.filter-group {
    display: flex;
    gap: 15px;
    align-items: center;
    width: 100%;
}

@media(max-width: 768px) {
    .filter-group {
        flex-direction: column;
    }
}

.btn-icon-text {
    background: none;
    border: none;
    color: var(--color-primary);
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}

.btn-icon-text:hover {
    text-decoration: underline;
}

.btn-secondary:hover {
    background-color: var(--color-hover);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

/* =========================================
   3. COMPONENTS: NAVBAR
   ========================================= */
.navbar {
    background: var(--gradient-brand);
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    box-shadow: var(--shadow-md);
    border-bottom-left-radius: var(--border-radius-lg);
    border-bottom-right-radius: var(--border-radius-lg);
    position: relative;
    z-index: 1000;
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-inverse);
    text-decoration: none;
    letter-spacing: 1px;
}

.navbar-brand span {
    color: #ffd54f;
    /* Amarillo dorado */
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--text-inverse);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: var(--border-radius-md);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(5px);
}

.nav-btn:hover,
.nav-btn.active {
    background: var(--color-surface);
    color: var(--color-primary);
    transform: translateY(-3px);
}

.nav-text {
    font-size: 1rem;
    font-weight: 600;
}

/* Dropdowns */
.dropdown-container {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 65px;
    right: 0;
    background-color: var(--color-surface);
    width: 320px;
    border-radius: 15px;
    box-shadow: var(--shadow-soft);
    z-index: 1000;
    overflow: hidden;
    border: 1px solid var(--border-color);
    animation: slideUpFade 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.dropdown-menu.show {
    display: block;
}

/* Nested Submenu Logic */
.has-submenu {
    position: relative;
    /* Context */
}

.submenu {
    display: none;
    position: absolute;
    top: -10px;
    /* Slight offset to align nicely */
    right: 100%;
    /* Move to the LEFT of the parent dropdown */
    margin-right: 15px;
    /* Spacing */
    width: 260px;
    background-color: var(--color-surface);
    border-radius: 16px;
    padding: 15px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    z-index: 102;
    /* Higher than parent */
    animation: fadeIn 0.2s ease;
}

/* Invisible bridge to prevent closing when moving cursor */
.submenu::after {
    content: '';
    position: absolute;
    top: 0;
    right: -30px;
    /* Extend towards the parent */
    width: 40px;
    height: 100%;
    background: transparent;
}

.has-submenu:hover .submenu {
    display: block;
}

.submenu-scroll {
    max-height: 250px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Ensure arrow rotates or changes color on hover if needed */
.has-submenu:hover>i {
    color: var(--color-primary);
}

.dropdown-header {
    padding: 15px 20px;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Headers temáticos (Mapeados a nuevos colores) */
.header-notif {
    background-color: rgba(121, 85, 72, 0.1);
    /* Marrón suave */
    color: var(--color-secondary);
}

.header-registros {
    background-color: rgba(46, 125, 50, 0.1);
    /* Verde suave */
    color: var(--color-primary);
}

.dropdown-content {
    max-height: 350px;
    overflow-y: auto;
}

/* Items Dropdown */
.notif-item {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    padding-left: 35px;
    color: var(--text-primary);
}

.notif-item::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 22px;
    width: 8px;
    height: 8px;
    background-color: var(--color-secondary);
    border-radius: 50%;
}

.notif-title {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.notif-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.registro-item {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.registro-item i {
    color: var(--color-primary);
}

.registro-item:hover {
    background-color: var(--color-hover);
    color: var(--color-primary);
}

/* Menu Perfil */
.profile-header-bg {
    background: var(--gradient-brand);
    padding: 25px 20px;
    text-align: center;
    color: white;
}

.profile-actions a,
.profile-actions .theme-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 25px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: background 0.2s;
    cursor: pointer;
}

.profile-actions a:hover,
.profile-actions .theme-toggle:hover {
    background-color: var(--color-hover);
}

.logout {
    color: var(--color-danger) !important;
}

/* =========================================
   4. COMPONENTS: HEADER & LAYOUT
   ========================================= */
header {
    background: var(--gradient-brand);
    color: #fff;
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 50;
}

/* Auth & Actions */
.top-actions {
    display: flex;
    align-items: center;
}

/* Auth Buttons Container */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 20px;
}

/* Base style for auth links */
/* Base style for auth links/buttons */
.auth-buttons a,
.auth-buttons button {
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.3px;
    font-family: var(--font-stack);
    /* Ensure font matches */
    cursor: pointer;
    /* Ensure pointer for buttons */
}

.btn-login {
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px);
}

.btn-login:hover {
    background-color: #fff;
    color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-register {
    background-color: #fff;
    color: var(--color-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: none;
    /* Reset border for button element */
}

.btn-register:hover {
    transform: translateY(-2px);
    background-color: var(--color-accent);
    color: var(--color-primary-dark);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.logged-in-actions {
    display: none;
    align-items: center;
    gap: 15px;
}

.nav-item {
    position: relative;
    /* Context for absolute dropdown */
    display: flex;
    align-items: center;
}

/* Specificity boost for avatar */
.profile-btn .nav-avatar {
    width: 32px !important;
    height: 32px !important;
    max-width: 32px;
    max-height: 32px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
    border: 2px solid var(--color-primary-light);
    display: block;
    /* Ensure it behaves */
}

/* New Index Nav Items */
/* New Index Nav Items */
.icon-btn {
    background: rgba(255, 255, 255, 0.15);
    /* Glass effect like profile button */
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    /* Slightly smaller for Font Awesome */
    color: #fff;
    transition: all 0.3s ease;
    box-shadow: none;
}

.icon-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Theme Toggle */
.theme-toggle {
    margin-right: 15px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* New Profile Pill Button */
.profile-pill-btn {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 6px 16px 6px 6px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
}

.profile-pill-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.profile-pill-btn .user-name {
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-pill-btn i {
    font-size: 12px;
    opacity: 0.8;
}

/* Dropdown variation for Index */
.nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    margin-top: 10px;
    right: 0;
    width: 280px;
    background: #fff;
    border-radius: 16px;
    padding: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .2);
    z-index: 100;
    animation: fadeIn 0.2s ease;
    text-align: left;
    border: 1px solid var(--border-color);
}

.profile-header-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.profile-header-info .avatar-large {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-primary-light);
}

.profile-header-info .user-details {
    display: flex;
    flex-direction: column;
}

.profile-header-info .user-fullname {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.2;
}

.profile-header-info .user-email {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.nav-dropdown.show {
    display: block;
}

.dropdown-header-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    padding: 10px 0 5px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--color-hover);
    color: var(--color-primary);
}

.logout-btn {
    display: block;
    text-align: center;
    margin-top: 10px;
    padding: 10px;
    color: var(--color-danger);
    font-weight: 600;
    font-size: 13px;
    border-radius: 8px;
    transition: background 0.2s;
}

.logout-btn:hover {
    background: #ffebee;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
}

.btn-back {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Layout Grid */
.profile-container {
    max-width: 1200px;
    margin: 40px auto;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
    padding: 0 20px;
}

/* Sidebar */
.sidebar {
    background: var(--color-surface);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-soft);
    height: fit-content;
    border: 1px solid var(--border-color);
}

.user-preview {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.avatar-small {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-primary);
    margin-bottom: 10px;
}

.sidebar-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 15px;
    background: none;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 5px;
    transition: 0.3s;
}

.sidebar-menu button:hover {
    background: var(--color-hover);
    color: var(--color-primary);
}

.sidebar-menu button.active {
    background: var(--color-accent);
    color: var(--color-primary);
    font-weight: 600;
}

/* Content Panel */
.content-panel {
    background: var(--color-surface);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow-soft);
    min-height: 600px;
    border: 1px solid var(--border-color);
}

h2 {
    color: var(--text-primary);
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

h3 {
    font-size: 16px;
    color: var(--color-primary);
    margin: 25px 0 15px;
    border-left: 4px solid var(--color-primary);
    padding-left: 10px;
}

/* =========================================
   5. MODULE: VENTURES & CARDS
   ========================================= */
.ventures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.card {
    background: var(--color-surface);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
}

/* Specific contrast fix for cards */
[data-theme="dark"] .card {
    background: var(--color-surface);
    border: 1px solid var(--border-color);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-primary-light);
}

.card-banner {
    height: 80px;
    background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
}

.card-logo-wrapper {
    width: 80px;
    height: 80px;
    margin: -40px auto 10px;
    position: relative;
}

.card-logo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-surface);
    /* Matches card bg */
    background: var(--color-surface);
}

.card-body {
    padding: 0 15px 15px;
    text-align: center;
    flex-grow: 1;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.card-cat {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--color-secondary);
    font-weight: 700;
    display: block;
    margin-bottom: 8px;
}

.card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    margin-bottom: 15px;
}

.tag-pill-display {
    background: var(--color-accent);
    color: var(--color-primary-dark);
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

/* Card Footer Actions */
.card-footer {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    background: var(--color-hover);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-group {
    display: flex;
    gap: 8px;
}

.btn-action {
    flex: 1;
    border: none;
    padding: 8px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: var(--transition-fast);
}

.btn-view {
    background: #e0e0e0;
    color: var(--text-secondary);
}

.btn-stats {
    background: var(--color-accent);
    color: var(--color-primary);
}

.btn-edit {
    width: 100%;
    background: var(--color-primary);
    color: white;
    margin-top: 5px;
    border: none;
    padding: 8px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.card-add {
    border: 2px dashed #bcaaa4;
    background: transparent;
    box-shadow: none;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: var(--text-secondary);
    min-height: 380px;
}

.card-add:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-hover);
}

/* Card Image variation for Index */
.card img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    background: var(--color-background);
    padding: 20px;
}

.stars {
    color: #fbc02d;
    /* Amarillo Estrellas */
    font-size: 14px;
}

/* =========================================
   6. MODULE: FORMS & INPUTS
   ========================================= */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group.full-width {
    grid-column: span 2;
}

label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 5px;
    font-weight: 500;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-primary);
    transition: 0.3s;
    background: var(--color-surface);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15);
}

input[readonly] {
    background-color: var(--color-hover);
    color: var(--text-secondary);
}

.actions {
    margin-top: 30px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.btn-save {
    background: var(--color-primary);
    color: white;
    padding: 10px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition-fast);
}

.btn-save:hover {
    background: var(--color-primary-dark);
}

.btn-cancel {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 10px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
}

.btn-cancel:hover {
    background: var(--color-hover);
}

.btn-danger {
    background: #ffebee;
    color: var(--color-danger);
    border: 1px solid #ffcdd2;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

/* Upload areas */
.upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    background: var(--color-hover);
}

.upload-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    cursor: pointer;
    border: 2px solid #ddd;
}

.gallery-upload-container {
    border: 2px dashed var(--border-color);
    padding: 15px;
    border-radius: 12px;
    background: var(--color-hover);
    text-align: center;
}

.gallery-grid-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.gallery-item-preview {
    position: relative;
    width: 100%;
    height: 80px;
}

.gallery-item-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.btn-remove-img {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--color-danger);
    color: white;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* =========================================
   7. MODULE: MODALS
   ========================================= */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(2px);
    animation: fadeIn 0.3s forwards;
}

.modal-content {
    background: var(--color-surface);
    padding: 40px;
    border-radius: 20px;
    width: 450px;
    max-width: 90%;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: slideUpFade 0.3s ease;
}

.close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
}

.social-login {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.social-btn:hover {
    background-color: var(--color-hover);
    transform: translateY(-1px);
}

.social-btn.google {
    color: #757575;
    border-color: #ddd;
}

.social-btn.facebook {
    color: #1565c0;
    border-color: #bbdefb;
    background: #e3f2fd;
}

.modal-divider {
    text-align: center;
    margin: 20px 0;
    color: #888;
    font-size: 12px;
    position: relative;
}

.modal-divider::before,
.modal-divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #eee;
}

.modal-divider::before {
    left: 0;
}

.modal-divider::after {
    right: 0;
}

.modal-content input,
.modal-content select {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    font-size: 14px;
    font-family: inherit;
}

.modal-content .submit {
    width: 100%;
    padding: 12px;
    background: var(--gradient-brand);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
}

.form-row {
    display: flex;
    gap: 10px;
}

.form-row input,
.form-row select {
    width: 100%;
}

/* =========================================
   8. UTILITIES & SPECIFICS
   ========================================= */
/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--color-primary);
}

input:checked+.slider:before {
    transform: translateX(26px);
}

/* Public Profile Specifics */
.profile-header {
    background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
    height: 150px;
    border-radius: 12px 12px 0 0;
    position: relative;
    margin-bottom: 60px;
}

.profile-header .profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    object-fit: cover;
    background: white;
}

.profile-info {
    text-align: center;
}

.hours-card {
    background: var(--color-surface);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow-soft);
    max-width: 500px;
    margin: 30px auto;
    border: 1px solid var(--border-color);
}

.hours-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
    font-size: 14px;
}

/* =========================================
   9. COMPONENTS: SLIDER
   ========================================= */
.hero-slider-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    background: #000;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.slide.active {
    opacity: 1;
}

.slide::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
    padding: 20px;
    max-width: 800px;
}

.hero-content h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 20px;
    font-weight: 300;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

.hero-btn {
    margin-top: 20px;
    padding: 12px 30px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.hero-btn:hover {
    background: var(--color-primary-dark);
    transform: scale(1.05);
}

/* =========================================
   10. COMPONENTS: SEARCH & UTILS
   ========================================= */
.search-bar {
    max-width: 1200px;
    margin: 30px auto;
    background-color: var(--color-surface);
    padding: 20px;
    display: grid;
    grid-template-columns: 2fr 1.2fr 1fr 1fr auto;
    gap: 12px;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.search-bar input,
.search-bar select {
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    font-size: 14px;
}

.search-bar button {
    background: var(--gradient-brand);
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 12px 18px;
    font-weight: 600;
    cursor: pointer;
}

main {
    padding: 40px;
    max-width: 1300px;
    margin: auto;
}

h2.section-title {
    font-size: 30px;
    margin-bottom: 28px;
    text-align: center;
    color: var(--text-primary);
    position: relative;
}

h2.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--color-secondary);
    margin: 10px auto 0;
    border-radius: 2px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}

footer {
    margin-top: 60px;
    padding: 20px;
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--color-hover);
}

/* Animaciones */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .profile-container {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .dropdown-menu {
        width: 280px;
        right: -50px;
    }

    .nav-text {
        display: none;
    }

    .search-bar {
        grid-template-columns: 1fr;
    }

}

/* =========================================
   11. UI COMPONENTS: TOAST & BUTTONS
   ========================================= */

/* Primary Button Standard */
.btn-primary {
    background: var(--gradient-brand);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.3);
    filter: brightness(1.1);
}

.btn-primary:disabled {
    background: #bdbdbd;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--color-surface);
    color: var(--text-primary);
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 5px solid var(--color-primary);
    font-weight: 500;
}

.toast-notification.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-notification.error {
    border-left-color: var(--color-danger);
}

.toast-icon {
    font-size: 20px;
}

@media (max-width: 768px) {
    .toast-notification {
        left: 20px;
        right: 20px;
        bottom: 20px;
    }
}

/* Fix for Venture Card Images on Homepage */
.card-cover-img {
    width: 100%;
    height: 180px;
    object-fit: cover !important;
    background: var(--color-background);
    padding: 0 !important;
}

/* Dropdown Mini Ventures List */
.venture-mini-logo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.dropdown-footer {
    border-top: 1px solid var(--border-color);
    margin-top: 8px;
    padding-top: 8px;
    text-align: center;
}

.dropdown-footer-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    display: block;
    padding: 5px;
    transition: color 0.2s;
}

.dropdown-footer-link:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* =========================================
   HERO CAROUSEL SECTION
   ========================================= */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 60vh;
    /* Viewport relative height */
    min-height: 500px;
    /* Minimum height for content */
    max-height: 650px;
    /* Maximum cap */
    overflow: hidden;
    margin-bottom: 40px;
    background: #000;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: 20px;
    max-width: 900px;
    animation: fadeIn 1s ease;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 25px;
    line-height: 1.1;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    letter-spacing: -1px;
}

.hero-btn {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    padding: 16px 45px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(46, 125, 50, 0.3);
    border: 2px solid transparent;
}

.hero-btn:hover {
    transform: translateY(-5px);
    background: transparent;
    border-color: #fff;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   FAQ SECTION
   ========================================= */
.faq-section {
    padding: 80px 20px;
    background: var(--color-background);
    max-width: 800px;
    margin: 0 auto 60px;
    border-top: 1px solid var(--border-color);
}

.faq-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 50px;
}

.accordion-item {
    background: var(--color-surface);
    border-radius: var(--border-radius-md);
    margin-bottom: 15px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: 0.3s;
}

.accordion-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary-light);
}

.accordion-header {
    width: 100%;
    padding: 25px;
    text-align: left;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.accordion-icon {
    font-size: 1rem;
    transition: transform 0.3s ease;
    color: var(--color-primary);
    background: rgba(46, 125, 50, 0.1);
    padding: 8px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
    background: var(--color-primary);
    color: #fff;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
    background: var(--color-surface);
}

.accordion-body {
    padding: 0 25px 30px;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* =========================================
   ROBUST FOOTER
   ========================================= */
.main-footer {
    background: #111;
    color: #bbb;
    padding: 80px 0 0;
    font-size: 14px;
    margin-top: 80px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    padding-bottom: 60px;
}

.footer-col h4 {
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 25px;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 30px;
    height: 3px;
    background: var(--color-primary);
    border-radius: 2px;
}

.footer-col p {
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #bbb;
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: var(--color-primary);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 18px;
}

.social-btn:hover {
    background: var(--color-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(46, 125, 50, 0.3);
}

.footer-bottom {
    background: #0a0a0a;
    text-align: center;
    padding: 25px 0;
    color: #666;
    border-top: 1px solid #222;
    font-size: 13px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-icon {
    width: 35px;
    height: 35px;
    background: rgba(46, 125, 50, 0.1);
    color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media(max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-carousel {
        height: 60vh;
        min-height: 400px;
    }
}

/* Refactored Search Bar Styles */
.search-bar-wrapper {
    margin-top: -30px;
    position: relative;
    z-index: 10;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    background: var(--color-surface);
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

.search-form-grid {
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
}

.search-input,
.search-select {
    height: 50px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0 15px;
    font-size: 15px;
    color: var(--text-primary);
    background-color: var(--color-surface);
    transition: all 0.2s ease;
    outline: none;
}

.search-input {
    flex: 2;
}

.search-select {
    flex: 1;
    cursor: pointer;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23999%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 15px top 50%;
    background-size: 10px auto;
    padding-right: 30px;
}

.search-input:focus,
.search-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.15);
}

.search-select:disabled {
    background-color: #f8f9fa;
    color: #999;
    cursor: not-allowed;
    border-color: #eee;
}

.search-submit-btn {
    height: 50px;
    padding: 0 25px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-submit-btn:hover {
    background: var(--color-primary-dark);
}

/* Dark Mode Overrides for Admin Actions */
[data-theme="dark"] .btn-action {
    background-color: #39393B !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color);
}

/* Ensure danger buttons keep red text but dark bg */
[data-theme="dark"] .btn-action[style*="color:var(--color-danger)"] {
    background-color: #39393B !important;
    color: #ef4444 !important;
    /* Force red text */
}

.search-submit-btn:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
}

@media (max-width: 900px) {
    .search-form-grid {
        flex-direction: column;
        gap: 10px;
    }

    .search-input,
    .search-select,
    .search-submit-btn {
        width: 100%;
        flex: none;
    }

    .search-bar-wrapper {
        margin: -20px 15px 0 15px;
        border-radius: 12px;
    }
}

/ *     E n d     o f     S t y l e s     * /     
/* Sidebar Styles */
.sidebar {
    background-color: white;
    width: 250px;
    height: 100vh;
    position: sticky;
    top: 70px;
    border-right: 1px solid var(--border-color);
    padding: 20px;
    float: left;
}

[data-theme='dark'] .sidebar {
    background-color: var(--color-surface);
    border-right: 1px solid var(--border-color);
}

.sidebar-menu button {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 12px 15px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 500;
}

[data-theme='dark'] .sidebar-menu button {
    color: var(--text-secondary);
}

[data-theme='dark'] .sidebar-menu button:hover {
    background-color: var(--color-hover);
    color: var(--color-primary);
}

.sidebar-menu a.active button {
    background-color: var(--color-accent);
    color: var(--color-primary);
    font-weight: 600;
}

[data-theme='dark'] .sidebar-menu a.active button {
    background-color: var(--color-accent);
    color: var(--color-primary);
}

/* Hidden Scrollbar (Functional but invisible) */
.modern-scroll {
    overflow-y: auto;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE 10+ */
}

.modern-scroll::-webkit-scrollbar {
    display: none;
    /* Webkit */
    width: 0px;
    background: transparent;
}/* Social Login & reCAPTCHA */
.social-login { margin-top: 20px; text-align: center; }
.divider-text { display: flex; align-items: center; color: #666; margin: 15px 0; font-size: 14px; }
.divider-text::before, .divider-text::after { content: ''; flex: 1; height: 1px; background: #ddd; }
.divider-text::before { margin-right: 10px; }
.divider-text::after { margin-left: 10px; }
.social-buttons { display: flex; gap: 10px; justify-content: center; }
.btn-social { flex: 1; padding: 10px; border-radius: 5px; text-decoration: none; color: white; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 500; font-size: 14px; transition: opacity 0.3s; }
.btn-social:hover { opacity: 0.9; }
.btn-google { background-color: #db4437; }
.btn-facebook { background-color: #4267B2; }
.g-recaptcha { margin-bottom: 15px; display: flex; justify-content: center; }
/ *   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
       M O B I L E   R E S P O N S I V E N E S S   P A T C H   ( S t e p   1 9 4 3 ) 
 
       = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =   * / 
 
 @ m e d i a   s c r e e n   a n d   ( m a x - w i d t h :   7 6 8 p x )   { 
 
 
 
         / *   1 .   R e s e t   G l o b a l   C o n t a i n e r s   * / 
 
         b o d y   { 
 
                 f o n t - s i z e :   1 4 p x ; 
 
                 o v e r f l o w - x :   h i d d e n ; 
 
         } 
 
 
 
         . c o n t a i n e r , 
 
         . p r o f i l e - c o n t a i n e r , 
 
         . v e n t u r e - c a r d - g r i d , 
 
         . v e n t u r e - l a y o u t - g r i d , 
 
         . g a m e - w r a p p e r   { 
 
                 d i s p l a y :   f l e x   ! i m p o r t a n t ; 
 
                 f l e x - d i r e c t i o n :   c o l u m n   ! i m p o r t a n t ; 
 
                 g r i d - t e m p l a t e - c o l u m n s :   1 f r   ! i m p o r t a n t ; 
 
                 w i d t h :   1 0 0 %   ! i m p o r t a n t ; 
 
                 m a x - w i d t h :   1 0 0 %   ! i m p o r t a n t ; 
 
                 p a d d i n g :   1 5 p x   ! i m p o r t a n t ; 
 
                 m a r g i n :   0   ! i m p o r t a n t ; 
 
                 g a p :   2 0 p x   ! i m p o r t a n t ; 
 
                 b o x - s i z i n g :   b o r d e r - b o x ; 
 
         } 
 
 
 
         / *   2 .   S i d e b a r   T r a n s f o r m a t i o n   ( D r a w e r / T a b s )   * / 
 
         . s i d e b a r   { 
 
                 w i d t h :   1 0 0 %   ! i m p o r t a n t ; 
 
                 m i n - w i d t h :   1 0 0 %   ! i m p o r t a n t ; 
 
                 h e i g h t :   a u t o   ! i m p o r t a n t ; 
 
                 m i n - h e i g h t :   a u t o   ! i m p o r t a n t ; 
 
                 o r d e r :   - 1 ; 
 
                 / *   T o p   * / 
 
                 b o r d e r - r i g h t :   n o n e   ! i m p o r t a n t ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   v a r ( - - b o r d e r - c o l o r ) ; 
 
                 p a d d i n g :   1 0 p x   0   ! i m p o r t a n t ; 
 
                 b a c k g r o u n d :   v a r ( - - c o l o r - s u r f a c e ) ; 
 
                 d i s p l a y :   f l e x   ! i m p o r t a n t ; 
 
                 f l e x - d i r e c t i o n :   c o l u m n   ! i m p o r t a n t ; 
 
         } 
 
 
 
         . s i d e b a r   . u s e r - p r e v i e w   { 
 
                 f l e x - d i r e c t i o n :   r o w ; 
 
                 g a p :   1 5 p x ; 
 
                 j u s t i f y - c o n t e n t :   c e n t e r ; 
 
                 m a r g i n - b o t t o m :   1 5 p x ; 
 
                 w i d t h :   1 0 0 % ; 
 
         } 
 
 
 
         . s i d e b a r   . u s e r - p r e v i e w   . a v a t a r - s m a l l   { 
 
                 m a r g i n :   0   ! i m p o r t a n t ; 
 
         } 
 
 
 
         . s i d e b a r - m e n u   { 
 
                 d i s p l a y :   f l e x   ! i m p o r t a n t ; 
 
                 f l e x - d i r e c t i o n :   r o w   ! i m p o r t a n t ; 
 
                 o v e r f l o w - x :   a u t o ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
                 p a d d i n g - b o t t o m :   5 p x ; 
 
                 g a p :   1 0 p x ; 
 
                 w i d t h :   1 0 0 % ; 
 
                 - w e b k i t - o v e r f l o w - s c r o l l i n g :   t o u c h ; 
 
         } 
 
 
 
         . s i d e b a r - m e n u   a   { 
 
                 d i s p l a y :   i n l i n e - b l o c k ; 
 
                 f l e x :   0   0   a u t o ; 
 
         } 
 
 
 
         . s i d e b a r - m e n u   b u t t o n   { 
 
                 w i d t h :   a u t o   ! i m p o r t a n t ; 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 p a d d i n g :   8 p x   1 5 p x ; 
 
         } 
 
 
 
         / *   3 .   N a v b a r   &   H e a d e r   * / 
 
         . n a v b a r   { 
 
                 h e i g h t :   a u t o   ! i m p o r t a n t ; 
 
                 f l e x - d i r e c t i o n :   c o l u m n ; 
 
                 a l i g n - i t e m s :   f l e x - s t a r t ; 
 
                 p a d d i n g :   1 5 p x   ! i m p o r t a n t ; 
 
                 g a p :   1 5 p x ; 
 
         } 
 
 
 
         . n a v b a r - r i g h t   { 
 
                 w i d t h :   1 0 0 % ; 
 
                 j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
         } 
 
 
 
         . a u t h - b u t t o n s   { 
 
                 w i d t h :   1 0 0 % ; 
 
                 m a r g i n :   0 ; 
 
                 j u s t i f y - c o n t e n t :   c e n t e r ; 
 
                 m a r g i n - t o p :   1 0 p x ; 
 
         } 
 
 
 
         / *   4 .   G r i d   S y s t e m   R e s e t s   * / 
 
         d i v [ s t y l e * = " g r i d - t e m p l a t e - c o l u m n s " ]   { 
 
                 d i s p l a y :   f l e x   ! i m p o r t a n t ; 
 
                 f l e x - d i r e c t i o n :   c o l u m n   ! i m p o r t a n t ; 
 
                 g a p :   2 0 p x   ! i m p o r t a n t ; 
 
         } 
 
 
 
         / *   5 .   V e n t u r e   D e t a i l   I m p r o v e m e n t s   * / 
 
         . g a l l e r y - c a r o u s e l   { 
 
                 h e i g h t :   2 5 0 p x   ! i m p o r t a n t ; 
 
         } 
 
 
 
         . l o g o - c o n t a i n e r   { 
 
                 w i d t h :   6 0 p x   ! i m p o r t a n t ; 
 
                 h e i g h t :   6 0 p x   ! i m p o r t a n t ; 
 
         } 
 
 
 
         / *   6 .   T y p o g r a p h y   a d j u s t m e n t s   * / 
 
         h 1   { 
 
                 f o n t - s i z e :   2 4 p x   ! i m p o r t a n t ; 
 
                 l i n e - h e i g h t :   1 . 2 ; 
 
         } 
 
 
 
         h 2   { 
 
                 f o n t - s i z e :   2 0 p x   ! i m p o r t a n t ; 
 
         } 
 
 
 
         h 3   { 
 
                 f o n t - s i z e :   1 8 p x   ! i m p o r t a n t ; 
 
         } 
 
 
 
         / *   7 .   T o u c h   T a r g e t s   &   I n p u t s   * / 
 
         i n p u t , 
 
         s e l e c t , 
 
         b u t t o n , 
 
         . b t n - p r i m a r y   { 
 
                 m i n - h e i g h t :   4 8 p x ; 
 
         } 
 
 
 
         / *   8 .   F i x   T a b l e s   /   O v e r f l o w   * / 
 
         . t a b l e - r e s p o n s i v e , 
 
         t a b l e   { 
 
                 d i s p l a y :   b l o c k ; 
 
                 w i d t h :   1 0 0 % ; 
 
                 o v e r f l o w - x :   a u t o ; 
 
         } 
 
 } 
 
 
/* DESKTOP LAYOUTS (Extracted Step 1987) */
@media (min-width: 769px) {
    .venture-card-grid {
        background: var(--color-surface);
        padding: 30px;
        border-radius: 16px;
        box-shadow: 0 10px 40px -10px rgba(0,0,0,0.05);
        border: 1px solid var(--border-color);
        margin-bottom: 30px;
        display: grid; 
        grid-template-columns: 2fr 1fr; 
        gap: 40px; 
        align-items: start;
    }

    .venture-layout-grid {
        display: grid; 
        grid-template-columns: 2fr 1fr; 
        gap: 40px;
    }
    
    .profile-container {
        max-width: 1200px;
        margin: auto;
        display: flex;
        gap: 20px;
        padding: 20px;
    }
}


/* MOBILE BASE STYLES for Refactored Elements (Step 2021 Correction) */
@media (max-width: 768px) {
    .venture-card-grid {
        background: var(--color-surface);
        padding: 15px;
        border-radius: 12px;
        border: 1px solid var(--border-color);
        margin-bottom: 20px;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    .venture-layout-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    .profile-container {
        display: flex;
        flex-direction: column;
        gap: 20px;
        padding: 10px;
    }
}

/ *   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
       F I N A L   L A Y O U T   F I X   ( S t e p   2 0 2 6 ) 
 
       = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =   * / 
 
 
 
 / *   1 .   S H A R E D   C O S M E T I C S   &   D E S K T O P   D E F A U L T   * / 
 
 . v e n t u r e - c a r d - g r i d   { 
 
         b a c k g r o u n d :   v a r ( - - c o l o r - s u r f a c e ) ; 
 
         p a d d i n g :   3 0 p x ; 
 
         b o r d e r - r a d i u s :   1 6 p x ; 
 
         b o x - s h a d o w :   0   1 0 p x   4 0 p x   - 1 0 p x   r g b a ( 0 ,   0 ,   0 ,   0 . 0 5 ) ; 
 
         b o r d e r :   1 p x   s o l i d   v a r ( - - b o r d e r - c o l o r ) ; 
 
         m a r g i n - b o t t o m :   3 0 p x ; 
 
         d i s p l a y :   g r i d   ! i m p o r t a n t ; 
 
         g r i d - t e m p l a t e - c o l u m n s :   2 f r   1 f r   ! i m p o r t a n t ; 
 
         g a p :   4 0 p x   ! i m p o r t a n t ; 
 
         a l i g n - i t e m s :   s t a r t ; 
 
 } 
 
 
 
 . v e n t u r e - l a y o u t - g r i d   { 
 
         d i s p l a y :   g r i d   ! i m p o r t a n t ; 
 
         g r i d - t e m p l a t e - c o l u m n s :   2 f r   1 f r   ! i m p o r t a n t ; 
 
         g a p :   4 0 p x ; 
 
 } 
 
 
 
 . p r o f i l e - c o n t a i n e r   { 
 
         m a x - w i d t h :   1 2 0 0 p x ; 
 
         m a r g i n :   a u t o ; 
 
         d i s p l a y :   f l e x   ! i m p o r t a n t ; 
 
         f l e x - d i r e c t i o n :   r o w   ! i m p o r t a n t ; 
 
         / *   D e f a u l t   S i d e - b y - S i d e   * / 
 
         g a p :   2 0 p x ; 
 
         p a d d i n g :   2 0 p x ; 
 
 } 
 
 
 
 / *   2 .   M O B I L E   O V E R R I D E S   * / 
 
 @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
 
         . v e n t u r e - c a r d - g r i d   { 
 
                 d i s p l a y :   f l e x   ! i m p o r t a n t ; 
 
                 f l e x - d i r e c t i o n :   c o l u m n   ! i m p o r t a n t ; 
 
                 p a d d i n g :   1 5 p x   ! i m p o r t a n t ; 
 
                 g a p :   2 0 p x   ! i m p o r t a n t ; 
 
         } 
 
 
 
         . v e n t u r e - l a y o u t - g r i d   { 
 
                 d i s p l a y :   f l e x   ! i m p o r t a n t ; 
 
                 f l e x - d i r e c t i o n :   c o l u m n   ! i m p o r t a n t ; 
 
                 g a p :   2 0 p x   ! i m p o r t a n t ; 
 
         } 
 
 
 
         . p r o f i l e - c o n t a i n e r   { 
 
                 d i s p l a y :   f l e x   ! i m p o r t a n t ; 
 
                 f l e x - d i r e c t i o n :   c o l u m n   ! i m p o r t a n t ; 
 
                 p a d d i n g :   1 0 p x   ! i m p o r t a n t ; 
 
         } 
 
 } 
 
 
/* HEADER MOBILE FIX (Step 2077) */
@media (max-width: 1024px) {
    /* Restore Flex Row Layout */
    .navbar {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        height: 60px !important; /* Reduced height */
        padding: 0 12px !important;
        gap: 0 !important;
    }

    /* Prevent Logo Wrapping */
    .logo {
        font-size: 1.2rem !important;
        flex-shrink: 0;
        margin: 0;
    }

    /* Actions Container Shrinking */
    .top-actions {
        width: auto !important;
        margin-top: 0 !important;
        justify-content: flex-end !important;
        flex: 1;
        min-width: 0; /* Allow flex shrinking */
    }

    /* Logged In Items Compact */
    .logged-in-actions {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important; 
        width: 100%;
        justify-content: flex-end;
    }

    /* Shrink Utility Icons */
    .icon-btn {
        width: 30px !important;
        height: 30px !important;
        font-size: 13px !important;
        padding: 0 !important;
        flex-shrink: 0;
    }
    
    .nav-item {
        margin: 0 !important;
    }

    /* Profile Chip Clamping */
    .profile-pill-btn {
        max-width: clamp(100px, 35vw, 150px) !important;
        padding: 4px 8px !important; /* Compact padding */
        gap: 4px !important;
        height: 32px !important;
        flex-shrink: 1 !important; /* Allow shrinking */
        min-width: 0; /* Flex fix */
    }
    
    .profile-pill-btn img {
        width: 20px !important;
        height: 20px !important;
    }
    
    .profile-pill-btn .user-name {
        font-size: 11px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block; /* Required for ellipsis */
        max-width: 100%;
    }
    
    /* Hide Chevron on very small screens if needed, mostly ok */
    .profile-pill-btn i.fa-chevron-down {
        font-size: 8px !important;
    }
}


/* REFACTOR MOBILE HEADER + BOTTOM NAV (Step 2095) */
.bottom-nav { display: none; }

@media (max-width: 1024px) {
    /* 1. Header Cleanup - Hide Icons */
    .icon-btn { display: none !important; }
    
    .navbar {
        padding: 0 15px !important;
        gap: 0 !important;
    }
    
    .logged-in-actions {
        width: auto !important;
        gap: 0 !important;
    }

    /* 2. Avatar Only Button */
    .profile-pill-btn {
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        width: 42px !important;
        height: 42px !important;
        min-width: 0 !important;
    }
    
    .profile-pill-btn img {
        width: 38px !important;
        height: 38px !important;
        border: 2px solid white !important;
        margin: 0 !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }
    
    .profile-pill-btn .user-name, 
    .profile-pill-btn i.fa-chevron-down {
        display: none !important;
    }

    /* 3. Bottom Navigation Bar */
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 60px;
        background: var(--color-surface);
        box-shadow: 0 -2px 15px rgba(0,0,0,0.08);
        z-index: 2000;
        justify-content: space-around;
        align-items: center;
        padding-bottom: env(safe-area-inset-bottom);
        border-top: 1px solid var(--border-color);
    }
    
    .b-nav-item {
        color: var(--text-secondary);
        font-size: 20px;
        padding: 10px;
        background: none;
        border: none;
        cursor: pointer;
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .b-nav-item.active,
    .b-nav-item:hover {
        color: var(--color-primary);
    }

    /* 4. Dropdowns as Bottom Sheets */
    .nav-dropdown {
        width: auto !important;
        position: fixed !important;
        top: auto !important;
        bottom: 70px !important;
        left: 10px !important;
        right: 10px !important;
        border-radius: 16px !important;
        max-height: 60vh !important;
        overflow-y: auto;
        box-shadow: 0 -5px 25px rgba(0,0,0,0.15) !important;
        animation: slideUpSheet 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    @keyframes slideUpSheet {
        from { transform: translateY(100%); opacity: 0; }
        to { transform: translateY(0); opacity: 1; }
    }
    
    /* Body Padding for Nav */
    body { padding-bottom: 70px; }
}


/* RAFFLES PAGE RESPONSIVE (Step 2115) */
.responsive-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    min-height: 60vh;
}

.raffles-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    background: white;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid #eee;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.08); /* shadow-soft var doesn't work inside PHP usually? No, this is CSS file. */
    /* Wait, var(--shadow-soft) WORKS in CSS. But I'm writing CSS to CSS file. */
    box-shadow: var(--shadow-soft);
}

.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

@media (max-width: 768px) {
    .responsive-wrapper {
        margin: 20px auto;
        padding: 0 15px;
    }

    .raffles-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .raffles-header h1 {
        font-size: 2rem !important;
        line-height: 1.2;
    }
    
    .game-grid {
        grid-template-columns: 1fr;
    }
    
    /* Ensure Venture Selector takes full width */
    .raffles-header > div {
        width: 100%;
        min-width: 0 !important;
    }
    
    /* Tabs Layout */
    .btn-tab {
        width: 50%;
        text-align: center;
        padding: 10px 5px !important;
        font-size: 13px !important;
    }
}


/* SUBMENU MOBILE INTERACTION (Step 2135) */
.has-submenu.active .submenu {
    display: block;
    animation: fadeIn 0.2s;
}

.has-submenu.active .fa-chevron-right {
    transform: rotate(90deg);
    transition: transform 0.2s;
}

@media (max-width: 768px) {
    .has-submenu {
        flex-wrap: wrap; 
    }

    .has-submenu.active .submenu {
        position: static !important;
        width: 100% !important;
        box-shadow: none !important;
        border: none !important;
        background: rgba(0,0,0,0.02) !important;
        margin-top: 10px;
        padding: 5px;
        border-radius: 8px !important;
    }
}


/* ADMIN MOBILE IMPROVEMENTS (Step 2148) */
.admin-action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    /* Stack Dashboard Actions */
    .admin-action-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Content Panel Padding Tweaks */
    .content-panel {
        padding: 15px !important;
    }
    
    .content-panel h1 {
        font-size: 1.8rem !important; /* Smaller Header */
    }

    /* Admin Tables */
    table th, table td {
        padding: 12px 10px !important;
        white-space: nowrap; 
        font-size: 12px; 
    }
    
    /* Ensure Filters Stack */
    .filter-group {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .filter-group input, 
    .filter-group select {
        width: 100% !important;
        margin-bottom: 10px;
    }
}


/* ADMIN USERS MOBILE CARDS (Step 2173) */
@media (max-width: 768px) {
    .user-table thead {
        display: none;
    }

    .user-table tbody tr {
        display: flex;
        flex-direction: column;
        background: var(--color-surface);
        margin-bottom: 20px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important;
        border-radius: 16px !important;
        padding: 20px !important;
        border: 1px solid var(--border-color);
    }

    .user-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0 !important;
        border: none;
        width: 100%;
        text-align: right;
    }

    /* Avatar/Name Row */
    .user-table td:first-child {
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 15px !important;
        margin-bottom: 10px;
        justify-content: flex-start;
        width: 100%;
        border-radius: 0 !important; /* Reset specific styling from desktop */
    }

    /* Labels for Context */
    .user-table td:nth-child(2)::before { content: 'Email'; font-weight: 700; font-size: 10px; color: var(--text-secondary); text-transform: uppercase; margin-right: auto; }
    .user-table td:nth-child(3)::before { content: 'Rol'; font-weight: 700; font-size: 10px; color: var(--text-secondary); text-transform: uppercase; margin-right: auto; }
    .user-table td:nth-child(4)::before { content: 'Estado'; font-weight: 700; font-size: 10px; color: var(--text-secondary); text-transform: uppercase; margin-right: auto; }

    /* Actions Row */
    .user-table td:last-child {
        margin-top: 10px;
        padding-top: 15px !important;
        border-top: 1px dashed var(--border-color);
        justify-content: space-between;
        width: 100%;
        border-radius: 0 !important;
    }
    
    .user-table td:last-child .btn-group {
        width: 100%;
        display: flex;
        justify-content: space-between !important;
        gap: 10px;
    }
    
    .user-table .btn-action {
        flex: 1;
        height: 40px; /* Touch friendly */
    }
}


/* ADMIN VENTURES MOBILE CARDS (Step 2186) */
@media (max-width: 768px) {
    .venture-table thead { display: none; }
    .venture-table tbody tr {
        display: flex; flex-direction: column;
        background: var(--color-surface);
        margin-bottom: 20px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important;
        border-radius: 16px !important;
        padding: 20px !important;
        border: 1px solid var(--border-color);
    }
    .venture-table td {
        display: flex; justify-content: space-between; align-items: center;
        padding: 8px 0 !important; width: 100%; border: none;
    }
    
    /* Name Row */
    .venture-table td:first-child {
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 15px !important; margin-bottom: 10px;
        border-radius: 0 !important;
    }
    
    /* Labels */
    .venture-table td:nth-child(2)::before { content: 'Categora'; font-weight: 700; font-size: 10px; color: var(--text-secondary); text-transform: uppercase; }
    .venture-table td:nth-child(3)::before { content: 'Estado'; font-weight: 700; font-size: 10px; color: var(--text-secondary); text-transform: uppercase; }
    .venture-table td:nth-child(4)::before { content: 'Dueo'; font-weight: 700; font-size: 10px; color: var(--text-secondary); text-transform: uppercase; }
    
    /* Actions */
    .venture-table td:last-child {
        margin-top: 10px; padding-top: 15px !important; border-top: 1px dashed var(--border-color);
        border-radius: 0 !important;
    }
    .venture-table td:last-child .btn-group {
        width: 100%; display: flex; justify-content: space-between !important; gap: 8px;
    }
    .venture-table .btn-action { flex: 1; height: 38px; }
}


/* ADMIN REPORTS MOBILE (Step 2199) */
@media (max-width: 768px) {
    .report-item {
        flex-wrap: wrap;
        padding: 15px !important;
    }
    
    .report-item > div:first-child {
        /* Logo resize slightly */
        width: 50px !important;
        height: 50px !important;
    }
    
    .report-item > div:nth-child(3) {
        /* Actions Container drops down */
        width: 100%;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px dashed var(--border-color);
        justify-content: space-between !important;
        display: flex;
        gap: 10px;
    }
    
    /* Improve button touch targets in reports */
    .report-item .btn-secondary, 
    .report-item .btn-primary {
        flex: 1;
        width: 100% !important;
        height: 48px !important; /* Larger touch target */
        margin: 0 !important;
    }
    
    .report-item form { flex: 1; display:flex; }
    .report-item form button { width: 100% !important; height: 48px !important; }
}


/* RECORDS PAGE MOBILE FIX (Step 2281) */
.payment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}
.sale-input-group {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}
.records-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

@media (max-width: 768px) {
    /* 1. Main Layout */
    .records-wrapper {
        display: block !important;
        padding: 0 10px !important;
        margin: 15px auto !important;
    }

    /* 2. New Sale Section */
    .sale-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    .sale-input-group > div {
        width: 100% !important;
    }

    .payment-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* 3. Metrics */
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* 4. Table to Cards */
    .records-table thead {
        display: none;
    }
    .records-table tbody tr {
        display: flex;
        flex-direction: column;
        background: var(--color-surface);
        margin-bottom: 15px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 15px;
    }

    .records-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px dashed var(--border-color);
        width: 100%;
        text-align: right;
        min-height: 35px;
    }

    /* Column Logic - Client */
    .records-table td:nth-child(1) {
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 10px; margin-bottom: 5px;
        font-weight: 700; font-size: 16px; justify-content: flex-start;
        color: var(--text-primary);
    }

    /* Detalle */
    .records-table td:nth-child(2) {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    .records-table td:nth-child(2)::before {
        content: 'Detalle'; font-size: 10px; color: var(--text-secondary); text-transform: uppercase; margin-bottom: 2px; display:block;
    }

    /* Payment Method */
    .records-table td:nth-child(3)::before { content: 'Pago'; font-size: 11px; color: var(--text-secondary); text-transform: uppercase; margin-right: auto; }

    /* Total */
    .records-table td:nth-child(4) {
        font-size: 20px; color: var(--color-primary); font-weight: 800; border-bottom: none;
        padding-top: 10px;
    }
    .records-table td:nth-child(4)::before { content: 'Total'; font-size: 14px; font-weight: normal; color: var(--text-secondary); margin-right: auto; }

    /* Actions */
    .records-table td:last-child {
        border-top: 1px solid var(--border-color);
        margin-top: 5px;
        padding-top: 10px;
        justify-content: flex-end;
    }
}


/* SECURITY PAGE ENHANCEMENTS (Step 2297) */
.password-toggle-group {
    position: relative;
    display: flex;
    align-items: center;
}
.password-toggle-group input {
    width: 100%;
    padding-right: 45px !important;
}
.btn-toggle-pass {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    transition: color 0.2s;
}
.btn-toggle-pass:hover { color: var(--color-primary); }

.security-logs-table {
    width: 100%;
    text-align: left;
    border-collapse: collapse;
}

@media (max-width: 768px) {
    /* Header Stack */
    .profile-header-section {
        flex-direction: column;
        text-align: center;
        gap: 15px !important;
        padding: 25px 15px !important;
    }
    
    /* Logs Table as Cards */
    .security-logs-table thead { display: none; }
    
    .security-logs-table tbody tr {
        display: flex;
        flex-direction: column;
        padding: 15px !important;
        border-bottom: 5px solid var(--bg-body) !important; /* Visual gap */
        background: var(--color-surface);
        gap: 8px;
    }
    
    .security-logs-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 !important;
        border: none;
    }
    
    /* Event */
    .security-logs-table td:nth-child(1) {
        font-weight: 700;
        font-size: 15px !important;
        color: var(--text-primary);
        margin-bottom: 5px;
        order: -1; 
    }
    
    /* IP */
    .security-logs-table td:nth-child(2)::before {
        content: 'IP'; color: var(--text-secondary); font-size: 11px; font-weight:700; margin-right:10px;
    }
    
    /* Date */
    .security-logs-table td:nth-child(3)::before {
        content: 'Fecha'; color: var(--text-secondary); font-size: 11px; font-weight:700; margin-right:10px;
    }
}


/* VENTURE PAGE (Step 2317) */

/* 1. Form Grid System */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}
.form-group {
    margin-bottom: 15px;
    width: 100%;
}

/* 2. Ventures List Grid */
.ventures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* 3. Schedule Rows */
.schedule-row-compact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    background: var(--color-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 10px;
    padding: 12px;
    animation: fadeIn 0.2s;
}

@media (max-width: 768px) {
    /* Stack Form Rows */
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    /* Schedule Row as Vertical Card */
    .schedule-row-compact {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 15px;
    }
    
    .schedule-row-compact > div {
        width: 100% !important;
        flex: none !important;
        display: flex;
        justify-content: space-between;
    }
    
    /* Make Time Inputs Taller */
    .schedule-row-compact input[type='time'] {
        flex: 1;
        height: 42px; 
    }
    
    /* Ventures List */
    .ventures-grid {
        grid-template-columns: 1fr;
    }
    
    /* Action Buttons in List Card (Footer) */
    .venture-card > div:last-child {
        justify-content: space-around !important; /* Spread buttons evenly */
        padding: 15px !important;
    }
    
    .venture-card button, .venture-card a {
        padding: 8px 12px !important; /* Larger hit area */
        font-size: 16px !important;
    }
    
    /* Improve File Upload Areas */
    #preview-logo {
         width: 100px !important; height: 100px !important;
    }
}


/* PROFILE ACTIVITY LIST (Step 2333) */
.activity-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 30px 0;
}
.activity-item {
    background: var(--color-surface);
    padding: 15px;
    margin-bottom: 8px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.activity-item span:first-child {
    font-weight: 500;
}
.activity-item .date {
    color: var(--text-secondary);
    font-size: 11px;
    background: var(--bg-body);
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 10px;
    white-space: nowrap;
}


/* VENTURE STATS RESPONSIVE (Step 2394) */
.stats-header-row {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;
}
.stats-tabs-container {
    background: var(--bg-card); padding: 5px; border-radius: 12px; box-shadow: var(--shadow-sm); display: flex; gap: 5px; border: 1px solid var(--border-color);
}
.stats-kpi-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 40px;
}
.stats-sales-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 40px;
}
.stats-charts-row {
     display: grid; grid-template-columns: 2fr 1fr; gap: 30px;
}

@media (max-width: 768px) {
    /* Stack Header & Tabs */
    .stats-header-row {
        flex-direction: column; align-items: stretch; gap: 15px;
    }
    .stats-tabs-container {
        width: 100%;
        display: flex;
    }
    .stats-tabs-container button {
        flex: 1; /* Equal width tabs for easy clicking */
        justify-content: center;
        padding: 12px !important; /* Larger touch target */
        font-size: 13px !important;
    }
    
    /* Stack Grids */
    .stats-sales-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .stats-charts-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .stats-kpi-grid {
        grid-template-columns: 1fr 1fr; /* 2 cols on mobile for compact stats */
        gap: 15px;
    }
}


/* HOTFIX MOTOROLA (Step 2405) - FORCE MOBILE LAYOUT UP TO 1024px */
@media (max-width: 1024px) {
    /* Stack Header & Tabs */
    .stats-header-row {
        flex-direction: column; align-items: stretch; gap: 15px;
    }
    .stats-tabs-container {
        width: 100%;
        display: flex;
    }
    .stats-tabs-container button {
        flex: 1;
        justify-content: center;
        padding: 12px !important;
        font-size: 13px !important;
    }
    
    /* Stack Grids */
    .stats-sales-grid {
        grid-template-columns: 1fr;
        gap: 15px; /* Use gap to separate */
        display: grid;
    }
    .stats-charts-row {
        grid-template-columns: 1fr;
        gap: 20px;
        display: grid;
    }
    
    .stats-kpi-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        display: grid;
    }
}


/* RAFFLE CARDS (Step 2484) */
.raffles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.raffle-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    animation: fadeIn 0.3s ease;
}
.raffle-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.raffle-header {
    display: flex; justify-content: space-between; align-items: flex-start;
}
.raffle-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin: 0; line-height: 1.3; }
.raffle-venture { font-size: 11px; color: var(--color-primary); font-weight: 700; text-transform: uppercase; margin-top: 5px; letter-spacing: 0.5px; }

.raffle-stats {
    display: flex; gap: 20px; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); padding: 12px 0; margin-top: 5px;
}
.raffle-stat-item {
    font-size: 11px; color: var(--text-secondary); display: flex; flex-direction: column; gap: 2px;
}
.raffle-stat-val { font-weight: 700; color: var(--text-primary); font-size: 15px; }

.raffle-actions {
    display: flex; justify-content: flex-end; gap: 8px; margin-top: auto; padding-top: 5px;
}


/* RAFFLES DARK MODE & FIXES (Step 2495) */
.warning-badge-exp {
    font-size: 11px; color: #b45309; background: #fffbeb; padding: 4px 8px; border-radius: 4px; border: 1px solid #fef3c7; display: inline-flex; align-items: center; gap: 5px; width: fit-content;
}
[data-theme='dark'] .warning-badge-exp {
    background: rgba(245, 158, 11, 0.1); color: #fbbf24; border-color: rgba(245, 158, 11, 0.2);
}

.btn-icon-action {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}
.btn-icon-action:hover {
    background: var(--bg-hover) !important;
    color: var(--color-primary) !important;
}
[data-theme='dark'] .btn-icon-action {
    background: #2a2a2a; 
    border-color: #444;
}

/* Tooltip */
#global-stock-tooltip {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}


/* RAFFLES CREATE & CONFIG MOBILE (Step 2505) */
.game-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 20px !important;
}

@media (max-width: 1024px) {
    /* Modals: Form visible first, then compact preview */
    .game-body {
        flex-direction: column;
    }
    
    /* Compact Preview on Mobile */
    .game-preview {
        height: auto !important;
        min-height: 200px !important;
        max-height: 250px !important;
        order: -1; /* Show Preview at TOP for immediate visual context? Or bottom? */
        /* User usually likes to see what they are config. Let's try TOP but small. */
    }
    /* Let's keep Preview at bottom (default order) so they fill form first. 
       Actually, standard is Preview at Top on mobile so you know what you are editing? 
       No, forms are long. Preview at top pushes form below fold. 
       Let's keep Preview at bottom but make it accessible. 
    */
    /* Better: Preview at bottom. */
    .game-preview {
        order: 2; 
    }
    
    .game-sidebar {
        width: 100% !important;
        padding: 20px 15px !important;
        border-bottom: 2px solid var(--border-color);
        order: 1;
    }
    
    /* Prize Manager Table Scrolling */
    .prize-mgr {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-right: -15px; /* Bleed out */
        padding-right: 15px;
    }
    .prize-table {
        min-width: 100%; /* Allow shrinking but scroll if needed */
        /* Actually, 100% fits mobile if columns are small. */
        /* Name (70%), Stock (20%), Action (10%). */
        /* Input fields might be squashed. */
        min-width: 350px; 
    }
    
    /* Bigger Inputs for Touch */
    .game-sidebar input, 
    .game-sidebar select, 
    .game-sidebar textarea {
        padding: 12px;
        font-size: 16px; /* Prevent IOS zoom */
    }
    
    .btn-game-setup {
        padding: 16px;
        font-size: 14px;
        position: sticky;
        bottom: 0;
        z-index: 10;
        box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
    }
}


/* RAFFLES COLOR PALETTE IMPROVEMENTS (Step 2511) */
.icon-stat-players { color: #7f5af0; margin-right: 4px; font-size: 12px; }
.icon-stat-stock { color: #2cb67d; margin-right: 4px; font-size: 12px; }

/* Refined Action Buttons (Vibrant on Hover) */
.btn-action-view:hover { color: #0ea5e9 !important; border-color: #0ea5e9 !important; background: rgba(14, 165, 233, 0.1) !important; }
.btn-action-copy:hover { color: #64748b !important; border-color: #64748b !important; background: rgba(100, 116, 139, 0.1) !important; }
.btn-action-stats:hover { color: #7f5af0 !important; border-color: #7f5af0 !important; background: rgba(127, 90, 240, 0.1) !important; }
.btn-action-edit:hover { color: #f59e0b !important; border-color: #f59e0b !important; background: rgba(245, 158, 11, 0.1) !important; }
.btn-action-delete:hover { color: #ef4444 !important; border-color: #ef4444 !important; background: rgba(239, 68, 68, 0.1) !important; }

/* Dark Mode Adjustments */
[data-theme='dark'] .icon-stat-players { color: #a78bfa; }
[data-theme='dark'] .icon-stat-stock { color: #4ade80; }

