/* =============================================
   CALCULADORA DE IMPRESIÓN 3D - MICTLÁN TEAM
   Estilos completos basados en main.css
   ============================================= */

/* ==================== BASE ==================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --gold: #FFB800;
    --gold-dark: #CC9200;
    --red: #D32F2F;
    --red-dark: #B71C1C;
    --purple: #7B1FA2;
    --bg-dark: #0D0D0D;
    --bg-darker: #050505;
    --bg-card: #1A1A1A;
    --text-primary: #FFFFFF;
    --text-secondary: #B0B0B0;
    --text-muted: #707070;
    --success: #4CAF50;
    --warning: #FF9800;
    --error: #F44336;

    /* Colores adicionales para botones */
    --purple-btn: #9333ea;
    --gold-btn: #f59e0b;
    --green-btn: #10b981;
    --blue-btn: #3b82f6;
    --orange-btn: #f97316;
    --teal-btn: #14b8a6;
    --indigo-btn: #6366f1;
    --pink-btn: #ec4899;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background Grid Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(90deg, rgba(255, 184, 0, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(255, 184, 0, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    opacity: 0.5;
}

/* ==================== DASHBOARD ==================== */

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 5%;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid rgba(255, 184, 0, 0.2);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.dashboard-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--red), var(--purple));
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.brand-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 900;
    background: linear-gradient(135deg, var(--gold), var(--red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.brand-subtitle {
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    color: var(--text-secondary);
    font-weight: 300;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

/* Dashboard Controls */
.dashboard-controls {
    margin-bottom: 2rem;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.control-group input,
.control-group select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 184, 0, 0.2);
    border-radius: 8px;
    padding: 0.8rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
}

.control-group input:focus,
.control-group select:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(255, 184, 0, 0.05);
    box-shadow: 0 0 0 3px rgba(255, 184, 0, 0.1);
}

/* Action Buttons Grid */
.action-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.2rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: white;
    position: relative;
    overflow: hidden;
}

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

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

.action-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.btn-icon {
    font-size: 2rem;
}

.btn-purple { background: linear-gradient(135deg, var(--purple-btn), #7c3aed); }
.btn-gold { background: linear-gradient(135deg, var(--gold-btn), #d97706); }
.btn-green { background: linear-gradient(135deg, var(--green-btn), #059669); }
.btn-blue { background: linear-gradient(135deg, var(--blue-btn), #2563eb); }
.btn-red { background: linear-gradient(135deg, var(--red), var(--red-dark)); }
.btn-orange { background: linear-gradient(135deg, var(--orange-btn), #ea580c); }
.btn-teal { background: linear-gradient(135deg, var(--teal-btn), #0d9488); }
.btn-indigo { background: linear-gradient(135deg, var(--indigo-btn), #4f46e5); }
.btn-pink { background: linear-gradient(135deg, var(--pink-btn), #db2777); }

/* Resumen Compacto de Métricas */
.metrics-compact {
    margin-bottom: 2rem;
}

.compact-card {
    background: linear-gradient(135deg, rgba(255, 184, 0, 0.08), rgba(211, 47, 47, 0.08));
    border: 1px solid rgba(255, 184, 0, 0.3);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    transition: all 0.3s ease;
}

.compact-card:hover {
    border-color: var(--gold);
    box-shadow: 0 5px 20px rgba(255, 184, 0, 0.15);
}

.compact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
}

.compact-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 8px rgba(255, 184, 0, 0.5));
}

.compact-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.compact-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.compact-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--gold);
    text-shadow: 0 0 10px rgba(255, 184, 0, 0.3);
}

.compact-divider {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, rgba(255, 184, 0, 0.3), transparent);
}

/* Sección de Métricas Detalladas */
.dashboard-detailed {
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 184, 0, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.metric-card:hover {
    border-color: var(--gold);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 184, 0, 0.2);
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.metric-header h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--gold);
}

.metric-icon {
    font-size: 1.8rem;
}

.metric-content {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255, 184, 0, 0.1);
}

.metric-item:last-child {
    border-bottom: none;
}

.metric-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.metric-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold);
}

/* KPIs Advanced */
.kpis-advanced {
    margin-bottom: 2rem;
}

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

.kpi-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 184, 0, 0.2);
    border-radius: 10px;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.kpi-card:hover {
    border-color: var(--gold);
    transform: translateY(-3px);
}

.kpi-icon {
    font-size: 2rem;
}

.kpi-content {
    flex: 1;
}

.kpi-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold);
}

/* Charts Section */
.charts-section {
    margin-bottom: 2rem;
}

.chart-container {
    background: var(--bg-card);
    border: 1px solid rgba(255, 184, 0, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
}

.chart-container h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    color: var(--gold);
    margin-bottom: 1rem;
}

.chart-container canvas {
    max-height: 300px;
}

/* Objetivos Section */
.objetivos-section {
    margin-bottom: 2rem;
}

.objetivo-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 184, 0, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
}

.objetivo-card h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    color: var(--gold);
    margin-bottom: 1rem;
}

.objetivo-progress {
    margin-bottom: 1rem;
}

.progress-bar-container {
    width: 100%;
    height: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 184, 0, 0.2);
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--red));
    border-radius: 15px;
    transition: width 0.6s ease;
}

.objetivo-stats {
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: var(--gold);
    font-weight: 700;
}

.objetivo-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

/* Calculator CTA */
.calculator-cta {
    text-align: center;
    margin: 3rem 0;
}

/* ==================== CALCULATOR SECTION ==================== */

.calculator-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 5%;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 184, 0, 0.1);
    border: 1px solid var(--gold);
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 1rem;
    letter-spacing: 1.5px;
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    background: linear-gradient(135deg, #FFFFFF 0%, var(--gold) 50%, var(--red) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    animation: textShimmer 3s ease-in-out infinite;
}

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

.section-description {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Calculator Form */
.calculator-form {
    background: var(--bg-card);
    border: 1px solid rgba(255, 184, 0, 0.2);
    border-radius: 20px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

.calculator-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--red), var(--purple));
}

.form-section {
    margin-bottom: 2.5rem;
}

.form-section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.section-icon {
    font-size: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

input[type="text"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="email"],
input[type="date"],
textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 184, 0, 0.2);
    border-radius: 8px;
    padding: 0.8rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
    outline: none;
}

/* Input tipo date con iconos personalizados */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.7) sepia(1) saturate(5) hue-rotate(10deg);
    cursor: pointer;
}

/* Select con estilos separados */
select {
    background: rgba(26, 26, 26, 0.9);
    border: 1px solid rgba(255, 184, 0, 0.2);
    border-radius: 8px;
    padding: 0.8rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
    outline: none;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--gold);
    background: rgba(255, 184, 0, 0.05);
    box-shadow: 0 0 0 3px rgba(255, 184, 0, 0.1);
}

/* Flecha personalizada y cursor para select */
select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23FFB800' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    padding-right: 2.5rem;
}

/* Estilos para opciones de select */
select option {
    background-color: #1A1A1A !important;
    color: #FFFFFF !important;
    padding: 0.5rem;
    font-weight: 400;
}

select option:hover {
    background-color: rgba(255, 184, 0, 0.2) !important;
    color: var(--gold) !important;
}

select option:checked,
select option:focus {
    background: linear-gradient(135deg, rgba(255, 184, 0, 0.3), rgba(211, 47, 47, 0.2)) !important;
    color: var(--gold) !important;
    font-weight: 600;
}

/* Firefox específico */
@-moz-document url-prefix() {
    select option {
        background-color: #1A1A1A;
        color: white;
    }

    select option:checked {
        background-color: #2A2A2A;
        color: #FFB800;
    }
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* Servicios Adicionales Container */
.servicios-adicionales-container {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 184, 0, 0.1);
    border-radius: 10px;
}

.servicios-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.servicios-header h4 {
    font-family: 'Orbitron', sans-serif;
    color: var(--gold);
    font-size: 1rem;
}

.servicios-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.servicio-item {
    display: grid;
    grid-template-columns: 1fr 150px auto;
    gap: 0.8rem;
    align-items: center;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 184, 0, 0.1);
    border-radius: 8px;
}

.servicio-item input {
    padding: 0.6rem;
}

.servicio-item button {
    padding: 0.6rem;
    background: var(--red);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.servicio-item button:hover {
    background: var(--red-dark);
    transform: scale(1.05);
}

/* Buttons */
.btn {
    padding: 0.9rem 2rem;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    position: relative;
    overflow: hidden;
}

.btn span {
    font-size: 1.2rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--bg-darker);
    box-shadow: 0 4px 20px rgba(255, 184, 0, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 35px rgba(255, 184, 0, 0.6);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--gold);
    color: var(--gold);
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--gold);
    transition: width 0.4s ease;
    z-index: -1;
}

.btn-secondary:hover {
    color: var(--bg-darker);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 184, 0, 0.4);
}

.btn-secondary:hover::before {
    width: 100%;
}

.btn-sm {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
}

.btn-large {
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* ==================== RESULTS ==================== */

.results-container {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid rgba(255, 184, 0, 0.2);
    border-radius: 16px;
}

.results-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 1.5rem;
    text-align: center;
}

.results-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.result-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 184, 0, 0.2);
    border-radius: 10px;
    padding: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.result-item:hover {
    border-color: var(--gold);
    transform: translateY(-3px);
}

.result-item.highlight {
    background: linear-gradient(135deg, rgba(255, 184, 0, 0.1), rgba(211, 47, 47, 0.1));
    border: 2px solid var(--gold);
}

.result-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.result-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gold), var(--red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* ==================== MODALS ==================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid rgba(255, 184, 0, 0.3);
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.4s ease;
}

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

.modal-content.modal-large {
    max-width: 1000px;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 184, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: var(--gold);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: var(--red);
    transform: rotate(90deg);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
    position: relative;
}

/* Scroll suave en modales */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 184, 0, 0.5);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 184, 0, 0.7);
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 184, 0, 0.2);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.modal-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* History Modal Specific */
.history-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 184, 0, 0.1);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.3rem;
}

.stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold);
}

.history-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.history-controls input[type="search"] {
    width: 100%;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 184, 0, 0.2);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--gold);
    color: var(--bg-darker);
    border-color: var(--gold);
}

.comparador-list,
.history-list,
.filamentos-list,
.inventario-list,
.clientes-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.comparador-list::-webkit-scrollbar,
.history-list::-webkit-scrollbar,
.filamentos-list::-webkit-scrollbar,
.inventario-list::-webkit-scrollbar,
.clientes-list::-webkit-scrollbar {
    width: 6px;
}

.comparador-list::-webkit-scrollbar-track,
.history-list::-webkit-scrollbar-track,
.filamentos-list::-webkit-scrollbar-track,
.inventario-list::-webkit-scrollbar-track,
.clientes-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.comparador-list::-webkit-scrollbar-thumb,
.history-list::-webkit-scrollbar-thumb,
.filamentos-list::-webkit-scrollbar-thumb,
.inventario-list::-webkit-scrollbar-thumb,
.clientes-list::-webkit-scrollbar-thumb {
    background: rgba(255, 184, 0, 0.4);
    border-radius: 3px;
}

.comparador-list::-webkit-scrollbar-thumb:hover,
.history-list::-webkit-scrollbar-thumb:hover,
.filamentos-list::-webkit-scrollbar-thumb:hover,
.inventario-list::-webkit-scrollbar-thumb:hover,
.clientes-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 184, 0, 0.6);
}

.history-item,
.cliente-item,
.filamento-item,
.inventario-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 184, 0, 0.2);
    border-radius: 10px;
    padding: 1.2rem;
    transition: all 0.3s ease;
}

.history-item:hover,
.cliente-item:hover,
.filamento-item:hover,
.inventario-item:hover {
    border-color: var(--gold);
    transform: translateX(5px);
}

/* ==================== DOCUMENT (Print/Download) ==================== */

.document-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    padding: 2rem;
    overflow-y: auto;
}

.document-content {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: 12px;
    color: #333;
}

.document-actions {
    max-width: 800px;
    margin: 2rem auto;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.no-print {
    /* Hidden when printing */
}

@media print {
    body * {
        visibility: hidden;
    }
    .document-content,
    .document-content * {
        visibility: visible;
    }
    .document-content {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
    }
    .no-print {
        display: none !important;
    }
}

/* ==================== LOADING OVERLAY ==================== */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 184, 0, 0.2);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay p {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

/* ==================== NOTIFICATIONS ==================== */

.notifications-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
}

.notification {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    font-weight: 600;
    animation: slideInRight 0.4s ease;
}

@keyframes slideInRight {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.notification.success {
    background: var(--success);
    color: white;
}

.notification.error {
    background: var(--error);
    color: white;
}

.notification.info {
    background: var(--blue-btn);
    color: white;
}

/* ==================== FOOTER ==================== */

.footer {
    background: var(--bg-darker);
    padding: 2.5rem 5%;
    border-top: 1px solid rgba(255, 184, 0, 0.1);
    text-align: center;
    margin-top: 5rem;
}

.footer-tagline {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    color: var(--gold);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ==================== ANIMATIONS ==================== */

.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

.scale-in:nth-child(1) { transition-delay: 0s; }
.scale-in:nth-child(2) { transition-delay: 0.1s; }
.scale-in:nth-child(3) { transition-delay: 0.15s; }
.scale-in:nth-child(4) { transition-delay: 0.2s; }
.scale-in:nth-child(5) { transition-delay: 0.25s; }
.scale-in:nth-child(6) { transition-delay: 0.3s; }
.scale-in:nth-child(7) { transition-delay: 0.35s; }
.scale-in:nth-child(8) { transition-delay: 0.4s; }
.scale-in:nth-child(9) { transition-delay: 0.45s; }

/* ==================== RESPONSIVE ==================== */

@media (max-width: 1024px) {
    .action-buttons-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-container,
    .calculator-section {
        padding: 2rem 3%;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .action-buttons-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .compact-card {
        flex-direction: column;
        gap: 0.5rem;
    }

    .compact-divider {
        width: 80%;
        height: 1px;
        background: linear-gradient(to right, transparent, rgba(255, 184, 0, 0.3), transparent);
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .results-content {
        grid-template-columns: 1fr;
    }

    .modal {
        padding: 1rem;
    }

    .modal-content {
        max-height: 95vh;
    }

    .notifications-container {
        right: 1rem;
        left: 1rem;
        max-width: none;
    }

    .document-container {
        padding: 1rem;
    }

    .document-content {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .action-buttons-grid {
        grid-template-columns: 1fr;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .form-actions {
        flex-direction: column;
    }

    .modal-body {
        padding: 1rem;
    }

    .history-controls {
        flex-direction: column;
    }

    .filter-buttons {
        flex-direction: column;
    }

    .filter-btn {
        width: 100%;
    }
}

/* ==================== SCROLLBAR ==================== */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gold), var(--red));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--gold-dark), var(--red-dark));
}

/* ==================== MODALES CON PESTAÑAS ==================== */

.modal-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0 1.5rem;
    border-bottom: 2px solid rgba(255, 184, 0, 0.2);
    background: rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 10;
    flex-shrink: 0;
}

.modal-tab {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    position: relative;
    top: 2px;
}

.modal-tab:hover {
    color: var(--gold);
    background: rgba(255, 184, 0, 0.1);
}

.modal-tab.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
    background: rgba(255, 184, 0, 0.15);
}

.tab-content {
    animation: fadeIn 0.3s ease;
}

.tab-content:not(.active) {
    display: none !important;
}

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

/* ==================== BOTONES UNIFICADOS ==================== */

.btn-badge {
    display: block;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.3rem;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.action-btn:hover .btn-badge {
    color: rgba(255, 255, 255, 0.9);
}

/* ==================== INVENTARIO ==================== */

.inventory-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 184, 0, 0.2);
}

.inventory-header .btn {
    margin: 0;
}

/* ==================== CLIENTES - ESTADÍSTICAS ==================== */

.stat-card-small {
    background: linear-gradient(135deg, rgba(255, 184, 0, 0.1), rgba(211, 47, 47, 0.05));
    border: 1px solid rgba(255, 184, 0, 0.3);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}

.stat-card-small .stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-small .stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gold);
    font-family: 'Orbitron', sans-serif;
}

.cliente-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-vip {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
}

.badge-recurrente {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.badge-nuevo {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
}

.badge-inactivo {
    background: linear-gradient(135deg, #9E9E9E, #757575);
    color: white;
}
