/* CSS Custom Properties */
:root {
    /* Colores principales más vibrantes */
    --primary-orange: #FF8C42;
    --hover-orange: #FF7A2B;
    --accent-orange: #FFA366;
    --dark-orange: #E67A35;
    
    /* Reemplazar grises por tonos más cálidos */
    --warm-gray: #2A2A2A;
    --light-warm: #363636;
    --card-warm: #1F1F1F;
    --border-warm: #404040;
    
    /* Gradientes para dinamismo */
    --gradient-card: linear-gradient(135deg, #1F1F1F 0%, #2A2A2A 100%);
    --gradient-orange: linear-gradient(135deg, #FF8C42 0%, #FFA366 100%);
    --gradient-dark: linear-gradient(135deg, #0F0F0F 0%, #1F1F1F 100%);
}

/* Reemplazar estas variables en tu main.css */
:root {
    --card-bg: var(--gradient-card);
    --secondary-gray: #AAA; /* Más claro que el gris actual */
    --border-color: var(--border-warm);
    --input-bg: var(--warm-gray);
    
    /* Sombras más dramáticas */
    --shadow-dark: rgba(0, 0, 0, 0.3);
    --shadow-orange: rgba(255, 140, 66, 0.2);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background: var(--bg-black);
    color: var(--text-white);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 2rem;
    color: var(--primary-orange);
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1em;
}

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

a:hover {
    color: var(--hover-orange);
}

/* Buttons */
.btn-primary {
    background: var(--primary-orange);
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 44px;
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--hover-orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-dark);
}

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

.btn-primary:disabled {
    background: var(--secondary-gray);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-orange);
    border-radius: 8px;
    padding: 10px 22px;
    color: var(--primary-orange);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 44px;
    text-decoration: none;
}

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

.btn-danger {
    background: var(--error-red);
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 44px;
}

.btn-danger:hover {
    background: #D32F2F;
    transform: translateY(-2px);
}

/* Input Fields */
.input-field {
    background: var(--input-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-white);
    font-size: 1rem;
    width: 100%;
    transition: border-color 0.3s ease;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.1);
}

.input-field::placeholder {
    color: var(--secondary-gray);
}

.input-field:disabled,
.input-field[readonly] {
    background: var(--card-bg);
    border-color: var(--secondary-gray);
    cursor: not-allowed;
}

/* Header */
.header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-logo {
    height: 40px;
    width: auto;
}

.back-btn {
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: var(--border-color);
    color: var(--primary-orange);
}

/* Language Toggle */
.language-toggle {
    display: flex;
    background: var(--border-color);
    border-radius: 20px;
    padding: 2px;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-white);
    padding: 6px 12px;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.lang-btn.active,
.lang-btn:hover {
    background: var(--primary-orange);
    color: white;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
    margin: 10px 0;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--primary-orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-dark);
}

/* Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    background: var(--bg-black);
    border-top: 1px solid var(--border-color);
    padding: 10px 0;
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    color: var(--secondary-gray);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 60px;
}

.nav-item i {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.nav-item span {
    font-size: 0.75rem;
    font-weight: 500;
}

.nav-item.active,
.nav-item:hover {
    color: var(--primary-orange);
    background: rgba(255, 140, 66, 0.1);
}

.admin-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    background: var(--bg-black);
    border-top: 1px solid var(--border-color);
    padding: 10px 0;
    z-index: 1000;
}

.admin-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    color: var(--secondary-gray);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 60px;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 80px 0 100px 0; /* Top padding para compensar header fijo */
}

/* Dashboard Header sin conflicto */
.dashboard-header {
    background: var(--gradient-dark);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border-warm);
    position: relative;
    overflow: hidden;
}

/* Loading Spinner */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-small {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--secondary-gray);
}

.empty-state i {
    font-size: 4rem;
    color: var(--border-color);
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: var(--text-white);
    margin-bottom: 0.5rem;
}

/* Form Styles */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-white);
}

.input-group.readonly {
    opacity: 0.7;
}

.readonly-note {
    font-size: 0.8rem;
    color: var(--secondary-gray);
    margin-top: 0.25rem;
}

.input-help {
    font-size: 0.85rem;
    color: var(--secondary-gray);
    margin-top: 0.25rem;
}

/* Form Sections */
.form-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.form-section h3 {
    color: var(--primary-orange);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.dashboard-header {
    background: var(--gradient-dark);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-warm);
    position: relative;
    overflow: hidden;
}

.dashboard-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(255, 140, 66, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.dashboard-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.business-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.business-avatar {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    border: 3px solid var(--primary-orange);
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.3);
}

.business-details h1 {
    color: var(--text-white);
    margin: 0 0 8px 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.business-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--success-green);
    font-size: 0.9rem;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success-green);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}


.quick-actions {
    background: var(--card-warm);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border-warm);
    margin-bottom: 30px;
}

.quick-actions h3 {
    color: var(--text-white);
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 600;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.action-card {
    background: var(--gradient-card);
    border: 2px solid var(--border-warm);
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: var(--text-white);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 140, 66, 0.1), transparent);
    transition: left 0.5s ease;
}

.action-card:hover {
    border-color: var(--primary-orange);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 140, 66, 0.2);
}

.action-card:hover::before {
    left: 100%;
}

.action-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--gradient-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.3);
}

.action-title {
    font-weight: 600;
    margin: 0;
}

.action-description {
    font-size: 0.9rem;
    color: #AAA;
    margin: 0;
}

/* Stats Grid */
/* Cards de estadísticas mejoradas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--gradient-card);
    border-radius: 16px;
    padding: 24px;
    border: 2px solid var(--border-warm);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-orange);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-orange);
    box-shadow: 0 10px 30px rgba(255, 140, 66, 0.2);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--gradient-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.3);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 8px;
    background: var(--gradient-orange);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-white);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 12px;
}

.stat-change {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 600;
}

.stat-change.positive {
    color: var(--success-green);
}

.stat-change.negative {
    color: var(--error-red);
}

.stat-period {
    color: #888;
    font-size: 0.8rem;
    margin-left: 4px;
}

/* Stats Section */
.stats-section {
    margin-bottom: 30px;
}

.stats-section h2 {
    color: var(--text-white);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-left: 4px;
}

/* Stats Grid con animaciones */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--gradient-card);
    border-radius: 16px;
    padding: 24px;
    border: 2px solid var(--border-warm);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    opacity: 0;
    animation: slideInUp 0.6s ease forwards;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Search Bar */
.search-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.search-bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-bar i {
    position: absolute;
    left: 16px;
    color: var(--secondary-gray);
    z-index: 1;
}

.search-bar input {
    padding-left: 48px;
    flex: 1;
}

.search-filters {
    margin-top: 12px;
    display: flex;
    gap: 12px;
}

.search-filters select {
    background: var(--input-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text-white);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .header-content {
        padding: 0 16px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn-primary,
    .form-actions .btn-secondary,
    .form-actions .btn-danger {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .header-content {
        padding: 0 12px;
    }
    
    .main-content {
        padding: 16px 0 100px 0;
    }
    
    .form-section {
        padding: 16px;
    }
    
    .stat-card {
        padding: 16px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

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

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

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus styles for keyboard navigation */
.btn-primary:focus,
.btn-secondary:focus,
.btn-danger:focus,
.input-field:focus,
.nav-item:focus {
    outline: 2px solid var(--primary-orange);
    outline-offset: 2px;
}
