/* ===================================
   DEMO PAGE STYLES - MOBILE FIRST
   =================================== */

/* Demo Header */
.demo-header {
    min-height: 40vh;
    padding-top: 120px;
}

/* Demo Selector Section */
.demo-selector-section {
    padding: 60px 0;
    background: var(--bg-secondary);
}

.demo-selector-section .section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.5rem;
}

/* Demo Cards Grid - Mobile First */
.demo-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.demo-card {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    min-height: 80px;
}

.demo-card:hover,
.demo-card:active {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 10px 40px rgba(37, 99, 235, 0.15);
}

.demo-card.active {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(139, 92, 246, 0.05));
}

.demo-card-icon {
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.demo-card h3 {
    font-size: 1.1rem;
    margin: 0;
    color: var(--text-primary);
    text-align: left;
}

.demo-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 4px 0 0 0;
    text-align: left;
}

.demo-card-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-size: 0.65rem;
    padding: 4px 8px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
}

.demo-card-content {
    flex: 1;
}

/* Demo Viewer Section */
.demo-viewer-section {
    padding: 40px 0 80px;
    display: none;
    background: var(--bg-secondary);
}

.demo-viewer-section.active {
    display: block;
}

/* Demo Viewer Header - Mobile */
.demo-viewer-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    padding: 0 8px;
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
}

.btn-back:hover,
.btn-back:active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.demo-info {
    text-align: center;
}

.demo-info h2 {
    font-size: 1.3rem;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.demo-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.btn-demo-cta {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
    font-size: 1rem;
}

/* Demo Window */
.demo-window {
    background: var(--bg-primary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
}

.demo-window-header {
    background: linear-gradient(135deg, #2d2d2d, #1a1a1a);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.window-controls {
    display: flex;
    gap: 6px;
}

.window-controls .control {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.control.red { background: #ff5f56; }
.control.yellow { background: #ffbd2e; }
.control.green { background: #27ca3f; }

.window-url {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #aaa;
    font-size: 0.75rem;
    overflow: hidden;
}

.window-url i {
    color: #27ca3f;
    font-size: 0.65rem;
}

.window-url span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.window-actions {
    display: flex;
    gap: 8px;
}

.btn-fullscreen {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-fullscreen:hover,
.btn-fullscreen:active {
    background: var(--primary);
}

/* Demo Content Container */
.demo-content {
    min-height: 400px;
    max-height: 70vh;
    overflow: auto;
    background: #f8fafc;
    -webkit-overflow-scrolling: touch;
}

/* ===================================
   SIMULATED APP UI - MOBILE FIRST
   =================================== */

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

/* Mobile Navigation Bar */
.app-mobile-nav {
    display: flex;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 8px 12px;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.app-mobile-nav::-webkit-scrollbar {
    display: none;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 16px;
    border-radius: 10px;
    background: #f1f5f9;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: fit-content;
    font-size: 0.75rem;
    color: #64748b;
}

.mobile-nav-item i {
    font-size: 1.1rem;
}

.mobile-nav-item.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.mobile-nav-item:active {
    transform: scale(0.95);
}

/* App Header */
.app-header {
    background: white;
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-header h1 {
    font-size: 1.2rem;
    color: #1e293b;
    margin: 0;
}

.app-header-actions {
    display: flex;
    gap: 8px;
}

.app-btn {
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.app-btn:active {
    transform: scale(0.95);
}

.app-btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.app-btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

/* App Main Content */
.app-main {
    padding: 16px;
    flex: 1;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-card-icon {
    transform: scale(1.1);
}

.stat-card-icon.blue { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #2563eb; }
.stat-card-icon.green { background: linear-gradient(135deg, #dcfce7, #bbf7d0); color: #16a34a; }
.stat-card-icon.purple { background: linear-gradient(135deg, #f3e8ff, #e9d5ff); color: #9333ea; }
.stat-card-icon.orange { background: linear-gradient(135deg, #ffedd5, #fed7aa); color: #ea580c; }
.stat-card-icon.red { background: linear-gradient(135deg, #fee2e2, #fecaca); color: #dc2626; }

.stat-card h3 {
    font-size: 1.4rem;
    color: #1e293b;
    margin: 0 0 4px 0;
}

.stat-card p {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0;
}

/* Data Cards (Mobile-friendly alternative to tables) */
.data-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.data-card {
    background: white;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid var(--primary);
    position: relative;
}

.data-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(139, 92, 246, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.data-card:hover {
    transform: translateX(6px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15);
}

.data-card:hover::after {
    opacity: 1;
}

.data-card:active {
    transform: scale(0.98) translateX(6px);
}

.data-card.completed {
    opacity: 0.7;
    border-left-color: #16a34a;
}

.data-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.data-card-title {
    font-weight: 600;
    color: #1e293b;
    font-size: 1rem;
}

.data-card-badge {
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
}

.badge-success { background: #dcfce7; color: #16a34a; }
.badge-warning { background: #fef3c7; color: #d97706; }
.badge-info { background: #dbeafe; color: #2563eb; }
.badge-danger { background: #fee2e2; color: #dc2626; }

.data-card-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
    color: #64748b;
}

.data-card-info span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.data-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    font-size: 0.8rem;
}

.data-card-amount {
    font-weight: 700;
    color: #1e293b;
    font-size: 1.1rem;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 1rem;
    color: #1e293b;
    margin: 0;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.quick-action {
    background: white;
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.quick-action:active {
    border-color: var(--primary);
    transform: scale(0.95);
}

.quick-action i {
    font-size: 1.5rem;
    margin-bottom: 8px;
    display: block;
}

.quick-action span {
    font-size: 0.85rem;
    color: #1e293b;
    font-weight: 500;
}

.quick-action.blue i { color: #2563eb; }
.quick-action.green i { color: #16a34a; }
.quick-action.purple i { color: #9333ea; }
.quick-action.orange i { color: #ea580c; }

/* Progress Bars */
.progress-item {
    background: white;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
}

.progress-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.progress-label {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
}

.progress-value {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.95rem;
}

.progress-bar {
    height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-fill.bg-danger {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

/* Alert/Notification Cards */
.alert-card {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-left: 4px solid #f59e0b;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    animation: alertPulse 2s ease-in-out infinite;
}

@keyframes alertPulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2); }
    50% { box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35); }
}

.alert-card i {
    color: #f59e0b;
    font-size: 1.4rem;
    animation: alertBounce 1s ease-in-out infinite;
}

@keyframes alertBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.alert-card p {
    margin: 0;
    font-size: 0.9rem;
    color: #92400e;
    font-weight: 500;
}

.alert-card.danger {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border-left-color: #ef4444;
}

.alert-card.danger i {
    color: #ef4444;
}

/* Demo Features Section */
.demo-features {
    margin-top: 40px;
    padding: 0 8px;
}

.demo-features h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
}

.demo-features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-primary);
    padding: 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.feature-item i {
    color: var(--primary);
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.feature-item span {
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* Fullscreen Mode */
.demo-window.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
}

.demo-window.fullscreen .demo-content {
    max-height: calc(100vh - 50px);
    min-height: calc(100vh - 50px);
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1e293b;
    color: white;
    padding: 16px 28px;
    border-radius: 14px;
    font-size: 0.95rem;
    z-index: 10001;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    box-shadow: 0 10px 40px rgba(22, 163, 74, 0.4);
}

.toast.info {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 10px 40px rgba(37, 99, 235, 0.4);
}

.toast.warning {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    box-shadow: 0 10px 40px rgba(245, 158, 11, 0.4);
}

.toast i {
    font-size: 1.2rem;
}

/* CTA Section */
.cta-section {
    padding: 60px 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.cta-content {
    text-align: center;
    color: white;
}

.cta-content h2 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.cta-content p {
    opacity: 0.9;
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 300px;
    margin: 0 auto;
}

.cta-buttons .btn {
    width: 100%;
    justify-content: center;
}

.cta-buttons .btn-primary {
    background: white;
    color: var(--primary);
}

.cta-buttons .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Invoice Preview (Facturation) */
.invoice-preview {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-top: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}

.invoice-logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.invoice-info {
    text-align: right;
    font-size: 0.8rem;
    color: #64748b;
}

.invoice-table {
    width: 100%;
    font-size: 0.8rem;
}

.invoice-table th {
    text-align: left;
    padding: 8px 4px;
    border-bottom: 1px solid #e2e8f0;
    color: #64748b;
    font-weight: 500;
}

.invoice-table td {
    padding: 8px 4px;
    border-bottom: 1px solid #f1f5f9;
}

.invoice-total {
    text-align: right;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid #e2e8f0;
}

.invoice-total-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 0.85rem;
}

.invoice-total-line.total {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1e293b;
    margin-top: 8px;
}

/* Stock specific */
.stock-movement {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: white;
    border-radius: 12px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.stock-movement:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: #cbd5e1;
}

.stock-movement-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.stock-movement:hover .stock-movement-icon {
    transform: scale(1.1);
}

.stock-movement-icon.in {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #16a34a;
}

.stock-movement-icon.out {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #dc2626;
}

.stock-movement-details {
    flex: 1;
}

.stock-movement-details strong {
    display: block;
    font-size: 0.9rem;
    color: #1e293b;
    margin-bottom: 2px;
}

.stock-movement-details span {
    font-size: 0.75rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stock-movement-details span i {
    font-size: 0.65rem;
    opacity: 0.7;
}

.stock-movement-qty {
    font-weight: 700;
    font-size: 1rem;
    padding: 6px 12px;
    border-radius: 8px;
    min-width: 60px;
    text-align: center;
}

.stock-movement-qty.in { 
    color: #16a34a; 
    background: rgba(22, 163, 74, 0.1);
}

.stock-movement-qty.out { 
    color: #dc2626; 
    background: rgba(220, 38, 38, 0.1);
}

/* Stock level bar animation */
.stock-level-bar > div {
    position: relative;
    overflow: hidden;
}

.stock-level-bar > div::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}

/* ===================================
   MODALS & FORMS
   =================================== */
.demo-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

.demo-modal {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25), 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: modalSlideIn 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.demo-modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, #f8fafc, white);
    flex-shrink: 0;
}

.demo-modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    color: #1e293b;
    font-weight: 600;
}

.btn-close-modal {
    background: #f1f5f9;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 1rem;
    padding: 8px;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-close-modal:hover {
    background: #fee2e2;
    color: #dc2626;
    transform: rotate(90deg);
}

.demo-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.demo-form-group {
    margin-bottom: 18px;
}

.demo-form-group:last-child {
    margin-bottom: 0;
}

.demo-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.875rem;
    color: #374151;
    font-weight: 600;
}

.demo-form-input,
.demo-form-select,
.demo-form-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #1e293b;
    transition: all 0.2s ease;
    font-family: inherit;
    background: #f8fafc;
}

.demo-form-textarea {
    resize: vertical;
    min-height: 100px;
}

.demo-form-input:hover,
.demo-form-select:hover,
.demo-form-textarea:hover {
    border-color: #cbd5e1;
    background: white;
}

.demo-form-input:focus,
.demo-form-select:focus,
.demo-form-textarea:focus {
    outline: none;
    border-color: var(--primary, #3b82f6);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    background: white;
}

.demo-form-input::placeholder {
    color: #9ca3af;
}

.demo-modal-footer {
    padding: 18px 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #f8fafc;
    flex-shrink: 0;
}

.demo-modal-footer .app-btn {
    min-width: 110px;
    padding: 10px 20px;
    font-weight: 600;
}

.demo-modal-footer .app-btn-secondary {
    background: white;
    border: 2px solid #e2e8f0;
    color: #475569;
}

.demo-modal-footer .app-btn-secondary:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.demo-modal-footer .app-btn-primary {
    background: linear-gradient(135deg, var(--primary, #3b82f6), #2563eb);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.demo-modal-footer .app-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes modalSlideIn {
    from { 
        transform: translateY(-30px) scale(0.95); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0) scale(1); 
        opacity: 1; 
    }
}

@keyframes modalSlideOut {
    from { 
        transform: translateY(0) scale(1); 
        opacity: 1; 
    }
    to { 
        transform: translateY(-20px) scale(0.95); 
        opacity: 0; 
    }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ===================================
   TABLET STYLES (min-width: 600px)
   =================================== */
@media (min-width: 600px) {
    .demo-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 24px;
    }

    .demo-card {
        flex-direction: column;
        text-align: center;
        padding: 32px 24px;
        min-height: auto;
    }

    .demo-card h3,
    .demo-card p {
        text-align: center;
    }

    .demo-card-icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .demo-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .demo-viewer-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .btn-back {
        width: auto;
    }

    .btn-demo-cta {
        width: auto;
    }

    .cta-buttons {
        flex-direction: row;
        max-width: 500px;
    }
}

/* ===================================
   DESKTOP STYLES (min-width: 1024px)
   =================================== */
@media (min-width: 1024px) {
    .demo-selector-section {
        padding: 80px 0;
    }

    .demo-selector-section .section-title {
        font-size: 2rem;
    }

    .demo-cards {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }

    .demo-card {
        padding: 40px 24px;
    }

    .demo-card:hover {
        transform: translateY(-8px);
    }

    .demo-card-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }

    .demo-card h3 {
        font-size: 1.2rem;
    }

    .demo-content {
        min-height: 500px;
        max-height: 600px;
    }

    .demo-features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .cta-content h2 {
        font-size: 2rem;
    }

    .app-container {
        flex-direction: row;
    }

    /* Desktop Sidebar */
    .app-sidebar {
        width: 220px;
        min-width: 220px;
        background: #1e293b;
        padding: 20px 0;
        display: block;
    }

    .app-mobile-nav {
        display: none;
    }

    .sidebar-brand {
        padding: 0 20px 20px;
        border-bottom: 1px solid #334155;
        margin-bottom: 16px;
    }

    .sidebar-brand h2 {
        color: white;
        font-size: 1.1rem;
        margin: 0;
    }

    .sidebar-nav {
        padding: 0 12px;
    }

    .sidebar-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        border-radius: 8px;
        color: #94a3b8;
        cursor: pointer;
        transition: all 0.2s ease;
        margin-bottom: 4px;
        background: none;
        border: none;
        width: 100%;
        font-size: 0.9rem;
        text-align: left;
    }

    .sidebar-item:hover,
    .sidebar-item.active {
        background: rgba(255, 255, 255, 0.1);
        color: white;
    }

    .sidebar-item.active {
        background: linear-gradient(90deg, var(--primary), transparent);
    }

    .app-main-content {
        flex: 1;
        display: flex;
        flex-direction: column;
    }
}

/* ===================================
   HIDE SECTIONS BASED ON STATE
   =================================== */
.demo-selector-section.hidden {
    display: none;
}

/* Touch feedback */
@media (hover: none) {
    .demo-card:hover {
        transform: none;
    }

    .demo-card:active {
        transform: scale(0.98);
    }

    .quick-action:hover {
        border-color: transparent;
    }
}

/* ===================================
   KANBAN BOARD STYLES
   =================================== */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 8px 0;
}

@media (min-width: 768px) {
    .kanban-board {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
}

.kanban-column {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 12px;
    min-height: 200px;
}

.kanban-header {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    text-align: center;
}

.kanban-header.negotiation { background: #dbeafe; color: #2563eb; }
.kanban-header.qualification { background: #fef3c7; color: #d97706; }
.kanban-header.proposal { background: #f3e8ff; color: #9333ea; }
.kanban-header.closed { background: #dcfce7; color: #16a34a; }

.kanban-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kanban-card {
    background: white;
    padding: 14px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: grab;
    transition: all 0.3s ease;
    border-left: 3px solid var(--primary);
}

.kanban-card:hover {
    transform: translateY(-3px) rotate(1deg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.kanban-card:active {
    cursor: grabbing;
}

.kanban-card-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1e293b;
    margin-bottom: 6px;
}

.kanban-card-client {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 8px;
}

.kanban-card-value {
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary);
}

.kanban-card-prob {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 6px;
}

/* ===================================
   SEARCH INPUT
   =================================== */
.search-input {
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    width: 180px;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    width: 220px;
}

.search-input::placeholder {
    color: #94a3b8;
}

/* ===================================
   CHARTS CONTAINER
   =================================== */
.dashboard-charts {
    margin-bottom: 24px;
}

.chart-container {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    height: 280px;
    position: relative;
}

.chart-container canvas {
    max-height: 240px !important;
}

/* ===================================
   DETAIL VIEW STYLES
   =================================== */
.detail-view {
    padding: 8px 0;
}

.detail-row {
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
    color: #475569;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row strong {
    color: #1e293b;
    margin-right: 8px;
}

.detail-row a {
    color: var(--primary);
    text-decoration: none;
}

.detail-row a:hover {
    text-decoration: underline;
}

/* ===================================
   LOADING ANIMATION
   =================================== */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.loading-spinner::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===================================
   EMPTY STATE
   =================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.9rem;
}

/* ===================================
   QUICK ACTIONS IMPROVEMENTS
   =================================== */
.quick-action {
    background: white;
    border-radius: 16px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.quick-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
}

.quick-action:hover::before {
    left: 100%;
}

.quick-action:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.2);
}

.quick-action:active {
    transform: scale(0.95);
}

.quick-action i {
    font-size: 1.8rem;
    margin-bottom: 10px;
    display: block;
    transition: transform 0.3s ease;
}

.quick-action:hover i {
    transform: scale(1.2);
}

.quick-action span {
    font-size: 0.9rem;
    color: #1e293b;
    font-weight: 600;
}

/* ===================================
   REPORT CONTAINER
   =================================== */
.report-container {
    background: white;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.report-container p {
    color: #64748b;
    font-size: 1rem;
}

/* ===================================
   RESPONSIVE CHART GRIDS
   =================================== */
@media (max-width: 768px) {
    .dashboard-charts[style*="grid-template-columns: 2fr 1fr"],
    .dashboard-charts[style*="grid-template-columns: 1fr 1fr"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }
    
    .chart-container {
        height: 220px;
    }
    
    .chart-container canvas {
        max-height: 180px !important;
    }
    
    .quick-actions {
        grid-template-columns: 1fr !important;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
    
    .chart-container {
        height: 200px;
        padding: 16px;
    }
}

/* ===================================
   ADDITIONAL ENHANCEMENTS
   =================================== */
.data-card-amount {
    font-weight: 700;
    color: #1e293b;
    font-size: 1rem;
}

.badge-info {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
}

.badge-purple {
    background: #f3e8ff !important;
    color: #7c3aed !important;
}

/* Alert card variants */
.alert-card.success {
    border-color: #16a34a;
    background: rgba(22, 163, 74, 0.08);
}

.alert-card.success i {
    color: #16a34a;
}

.alert-card.warning {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.08);
}

.alert-card.danger {
    border-color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
}

.alert-card.danger i {
    color: #dc2626;
}

/* Pipeline visualization */
.pipeline-stats {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.pipeline-stats span {
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 20px;
    background: #f1f5f9;
    color: #64748b;
    font-weight: 500;
}

/* Probability bar colors */
.progress-fill.high {
    background: linear-gradient(90deg, #16a34a, #22c55e);
}

.progress-fill.medium {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.progress-fill.low {
    background: linear-gradient(90deg, #dc2626, #ef4444);
}