@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }
/*switch*/
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    margin-left: 10px;
}

.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: 0.3s;
    border-radius: 26px;
}

.slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #e74c3c; /* أحمر = محظور */
}

input:checked + .slider::before {
    transform: translateX(24px);
}

/* Trend indicators */

/* Performance Analytics - Modern Professional Design */

:root {
    /* Modern Color Palette */
    --primary-900: #1e1b4b;
    --primary-800: #312e81;
    --primary-700: #3730a3;
    --primary-600: #4f46e5;
    --primary-500: #6366f1;
    --primary-400: #818cf8;
    --primary-300: #a5b4fc;
    --primary-200: #c7d2fe;
    --primary-100: #e0e7ff;
    --primary-50: #eef2ff;
    
    /* Secondary Colors */
    --secondary-600: #0891b2;
    --secondary-500: #06b6d4;
    --secondary-400: #22d3ee;
    --secondary-300: #67e8f9;
    --secondary-200: #a5f3fc;
    --secondary-100: #cffafe;
    
    /* Success Colors */
    --success-600: #059669;
    --success-500: #10b981;
    --success-400: #34d399;
    --success-300: #6ee7b7;
    --success-200: #a7f3d0;
    --success-100: #d1fae5;
    
    /* Warning Colors */
    --warning-600: #d97706;
    --warning-500: #f59e0b;
    --warning-400: #fbbf24;
    --warning-300: #fcd34d;
    --warning-200: #fde68a;
    --warning-100: #fef3c7;
    
    /* Neutral Colors */
    --neutral-900: #0f172a;
    --neutral-800: #1e293b;
    --neutral-700: #334155;
    --neutral-600: #475569;
    --neutral-500: #64748b;
    --neutral-400: #94a3b8;
    --neutral-300: #cbd5e1;
    --neutral-200: #e2e8f0;
    --neutral-100: #f1f5f9;
    --neutral-50: #f8fafc;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-400) 100%);
    --gradient-success: linear-gradient(135deg, var(--success-600) 0%, var(--success-400) 100%);
    --gradient-warning: linear-gradient(135deg, var(--warning-600) 0%, var(--warning-400) 100%);
    --gradient-info: linear-gradient(135deg, var(--secondary-600) 0%, var(--secondary-400) 100%);
    
    /* Shadows */
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}
/* ===== Header Controls ===== */
.header-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* ===== Control Group ===== */
.control-group {
    background: linear-gradient(145deg, #1b69d6ff, #516ca8ff);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* ===== Label ===== */
.control-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #9ca3af;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.control-label i {
    color: #38bdf8;
}

/* ===== Inputs Container ===== */
.control-inputs {
    display: flex;
    gap: 10px;
}

/* ===== Select Container ===== */
.select-container {
    position: relative;
}

/* ===== Select ===== */
.period-select {
    appearance: none;
    min-width: 120px;
    padding: 10px 36px 10px 14px;
    background: rgba(17, 24, 39, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: #f9fafb;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
}

.period-select:hover {
    border-color: rgba(56, 189, 248, 0.5);
}

.period-select:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

/* ===== Dropdown Icon ===== */
.select-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #9ca3af;
    pointer-events: none;
}

/* ===== Refresh Button ===== */
.refresh-control {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(145deg, #0f172a, #020617);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #38bdf8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: all 0.25s ease;
}

.refresh-control:hover {
    background: linear-gradient(145deg, #020617, #020617);
    color: #7dd3fc;
    transform: translateY(-1px);
}

.refresh-control:active {
    transform: scale(0.96);
}

/* ===== Loading Animation ===== */
.spin-animation {
    animation: spin 1s linear infinite;
}

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

/* Base Styles */
.performance-analytics {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--neutral-50) 0%, var(--neutral-100) 50%, var(--neutral-50) 100%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    direction: rtl;
    padding-bottom: 3rem;
}

/* Header Section */
.analytics-header {
    background: linear-gradient(135deg, var(--primary-900) 0%, var(--primary-700) 100%);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.analytics-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-logo {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.brand-logo:hover {
    transform: rotate(15deg) scale(1.05);
    background: rgba(255, 255, 255, 0.15);
}

.brand-content h1 {
    color: white;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.brand-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    margin: 0.375rem 0 0;
    font-weight: 400;
}

.select-container {
    position: relative;
    min-width: 120px;
}

.period-select {
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    padding: 0.625rem 2.5rem 0.625rem 1rem;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.period-select:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.period-select:focus {
    outline: none;
    border-color: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.period-select option {
    background: var(--neutral-800);
    color: var(--neutral-100);
    padding: 0.5rem;
}

.select-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    pointer-events: none;
    font-size: 0.875rem;
}

.refresh-control {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
    border: none;
    border-radius: var(--radius-lg);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.refresh-control:hover {
    transform: rotate(45deg) scale(1.05);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-500), var(--primary-300));
}

.spin-animation {
    animation: spin 1s linear infinite;
}

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

/* Loading State */
.analytics-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

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

.loading-wave {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.wave-bar {
    width: 6px;
    height: 40px;
    background: linear-gradient(180deg, var(--primary-600), var(--primary-400));
    border-radius: var(--radius-full);
    animation: wave 1.2s ease-in-out infinite;
}

.wave-bar:nth-child(1) { animation-delay: -0.4s; }
.wave-bar:nth-child(2) { animation-delay: -0.3s; }
.wave-bar:nth-child(3) { animation-delay: -0.2s; }
.wave-bar:nth-child(4) { animation-delay: -0.1s; }
.wave-bar:nth-child(5) { animation-delay: 0s; }

@keyframes wave {
    0%, 100% { transform: scaleY(0.5); }
    50% { transform: scaleY(1); }
}

.loading-text {
    color: var(--neutral-600);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

/* Empty State */
.analytics-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 2rem;
}

.empty-container {
    text-align: center;
    max-width: 500px;
}

.empty-visual {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 2rem;
}

.visual-circle {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-100), var(--primary-50));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: var(--primary-500);
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 2;
}

.visual-waves {
    position: absolute;
    inset: -20px;
}

.wave {
    position: absolute;
    inset: 0;
    border: 2px solid var(--primary-200);
    border-radius: 50%;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.wave:nth-child(2) { animation-delay: 0.5s; }
.wave:nth-child(3) { animation-delay: 1s; }

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.1); }
}

.empty-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin: 0 0 1rem;
    line-height: 1.2;
}

.empty-content p {
    color: var(--neutral-600);
    font-size: 1rem;
    line-height: 1.5;
    margin: 0 0 2rem;
}

.empty-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.empty-action {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
    color: white;
    border: none;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
}

.empty-action:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-500), var(--primary-300));
}

/* Performance Overview */
.overview-section {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

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

.header-main h2 {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--neutral-900);
    margin: 0 0 0.5rem;
    letter-spacing: -0.025em;
}

.header-main p {
    color: var(--neutral-600);
    font-size: 1rem;
    margin: 0;
    font-weight: 400;
}

.header-score {
    display: flex;
    align-items: center;
}

/* ======= container الرئيسي ======= */
.score-display {
    display: grid;
    grid-template-columns: clamp(80px, 15%, 120px) 1fr; 
    gap: 2rem;
    align-items: center;
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    width: 100%;           
    max-width: 800px;      
    box-sizing: border-box;
}

.score-circle {
    width: 100%;           
    aspect-ratio: 1 / 1;  
    position: relative;
}

.circle-progress {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        #6366f1 0% calc(min(var(--progress), 100) * 1%),
        #e5e7eb calc(min(var(--progress), 100) * 1%) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.progress-overlay {
    position: absolute;
    inset: 8px;
    background: white;
    border-radius: 50%;
}

.score-value {
    position: relative;
    font-size: clamp(1.25rem, 1.5vw, 1.5rem); 
    font-weight: 350;
}

.score-trends {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start; 
}

.score-trend {
    display: inline-flex;     
    align-items: center;
    gap: 0.5rem;
    padding: clamp(0.3rem, 0.8vw, 0.6rem) clamp(0.5rem, 1vw, 1rem);
    border-radius: 999px;
    font-size: clamp(0.75rem, 1.5vw, 0.9rem); /* نقصنا الشوية */
    font-weight: 600;
    white-space: nowrap;
    max-width: 100%; /* دي مهمة */
    box-sizing: border-box; /* علشان البادنج مايخارجش */
}


.score-trend.down {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.score-trend.neutral {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}


/* ======= أيقونة ======= */
.trend-icon {
    font-size: clamp(0.6rem, 1vw, 0.9rem);
}

.trend-value {
    font-weight: 300;
}

.trend-text {
    opacity: 0.8;
}
.trend-text.highlight {
    background-color: #fde68a;
    color: #92400e;
    padding: 0 0.25rem;
    border-radius: 3px;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.metric-item {
    position: relative;
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--neutral-200);
    transition: all var(--transition-normal);
}

.metric-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-2xl);
    border-color: var(--neutral-300);
}

.metric-backdrop {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.backdrop-wave {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.6) 50%, 
        transparent 100%);
    animation: shimmer 2s linear infinite;
}

.sales-metric .backdrop-wave {
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--primary-400) 50%, 
        transparent 100%);
}

.visits-metric .backdrop-wave {
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--secondary-400) 50%, 
        transparent 100%);
}

.customers-metric .backdrop-wave {
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--success-400) 50%, 
        transparent 100%);
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.metric-content {
    position: relative;
    z-index: 1;
    padding: 1.75rem;
}

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

.metric-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.sales-icon {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.visits-icon {
    background: linear-gradient(135deg, var(--secondary-600), var(--secondary-400));
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.customers-icon {
    background: linear-gradient(135deg, var(--success-600), var(--success-400));
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.metric-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-status.success {
    background: linear-gradient(135deg, var(--success-100), var(--success-50));
    color: var(--success-600);
    border: 1px solid var(--success-200);
}

.metric-status.warning {
    background: linear-gradient(135deg, var(--warning-100), var(--warning-50));
    color: var(--warning-600);
    border: 1px solid var(--warning-200);
}

.metric-status.danger {
    background: linear-gradient(135deg, #fee2e2, #fef2f2);
    color: #dc2626;
    border: 1px solid #fecaca;
}

.status-text {
    font-weight: 700;
}

.status-icon {
    font-size: 0.625rem;
}

.metric-body {
    margin-bottom: 1.5rem;
}

.metric-values {
    margin-bottom: 0.75rem;
}

.current-value {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.value-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--neutral-900);
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    letter-spacing: -0.025em;
    line-height: 1;
}

.value-unit {
    font-size: 1rem;
    color: var(--neutral-600);
    font-weight: 500;
}

.target-value {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.target-label {
    color: var(--neutral-600);
    font-weight: 400;
}

.target-number {
    color: var(--neutral-700);
    font-weight: 600;
    font-family: 'SF Mono', 'Roboto Mono', monospace;
}

.metric-title {
    color: var(--neutral-700);
    font-size: 1rem;
    font-weight: 600;
}

.metric-footer {
    border-top: 1px solid var(--neutral-200);
    padding-top: 1.5rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.progress-text {
    color: var(--neutral-600);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.progress-value {
    font-size: 1rem;
    font-weight: 700;
    font-family: 'SF Mono', 'Roboto Mono', monospace;
}

.sales-metric .progress-value { color: var(--primary-600); }
.visits-metric .progress-value { color: var(--secondary-600); }
.customers-metric .progress-value { color: var(--success-600); }

.progress-track {
    height: 8px;
    background: var(--neutral-200);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    position: relative;
    transition: width 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sales-metric .progress-fill {
    background: linear-gradient(90deg, var(--primary-600), var(--primary-400));
}

.visits-metric .progress-fill {
    background: linear-gradient(90deg, var(--secondary-600), var(--secondary-400));
}

.customers-metric .progress-fill {
    background: linear-gradient(90deg, var(--success-600), var(--success-400));
}

.fill-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.4) 0%, 
        rgba(255, 255, 255, 0) 50%, 
        rgba(255, 255, 255, 0.4) 100%);
    animation: shimmer 2s linear infinite;
    border-radius: var(--radius-full);
}

/* Analytics Section */
.analytics-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto 3rem;
    padding: 0 2rem;
}

@media (max-width: 1200px) {
    .analytics-section {
        grid-template-columns: 1fr;
    }
}

/* Chart Section */
.analytics-chart {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--neutral-200);
    overflow: hidden;
}

.chart-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--neutral-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chart-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.title-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-100), var(--primary-50));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--primary-600);
}

.title-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin: 0 0 0.25rem;
}

.title-content p {
    color: var(--neutral-600);
    font-size: 0.875rem;
    margin: 0;
    font-weight: 400;
}

.chart-legend {
    display: flex;
    gap: 1.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.sales-dot {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

.visits-dot {
    background: linear-gradient(135deg, var(--success-600), var(--success-400));
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.1);
}

.legend-text {
    color: var(--neutral-700);
    font-size: 0.875rem;
    font-weight: 500;
}

.chart-body {
    padding: 1.5rem;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-empty {
    text-align: center;
    color: var(--neutral-500);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.chart-empty p {
    font-size: 0.875rem;
    margin: 0;
    font-weight: 400;
}

/* Insights Section */
.insights-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.insights-header {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--neutral-200);
}

.insights-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.insights-header h3 i {
    color: var(--warning-500);
}

.insights-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.insights-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.insight-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: all var(--transition-fast);
    border: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-sm);
}

.insight-card:hover {
    transform: translateX(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--neutral-300);
}

.sales-insight {
    border-left: 4px solid var(--primary-600);
}

.visits-insight {
    border-left: 4px solid var(--success-600);
}

.performance-insight {
    border-left: 4px solid var(--warning-600);
}

.insight-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.sales-insight .insight-icon {
    background: linear-gradient(135deg, var(--primary-100), var(--primary-50));
    color: var(--primary-600);
}

.visits-insight .insight-icon {
    background: linear-gradient(135deg, var(--success-100), var(--success-50));
    color: var(--success-600);
}

.performance-insight .insight-icon {
    background: linear-gradient(135deg, var(--warning-100), var(--warning-50));
    color: var(--warning-600);
}

.insight-details h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--neutral-900);
    margin: 0 0 0.25rem;
    line-height: 1.3;
}

.insight-details p {
    font-size: 0.75rem;
    color: var(--neutral-600);
    margin: 0;
    line-height: 1.4;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    transition: all var(--transition-fast);
    border: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-sm);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--neutral-300);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    flex-shrink: 0;
}

.primary-stat {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.2);
}

.success-stat {
    background: linear-gradient(135deg, var(--success-600), var(--success-400));
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.2);
}

.trend-stat {
    background: linear-gradient(135deg, var(--secondary-600), var(--secondary-400));
    box-shadow: 0 4px 8px rgba(6, 182, 212, 0.2);
}

.time-stat {
    background: linear-gradient(135deg, var(--warning-600), var(--warning-400));
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.2);
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--neutral-900);
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    line-height: 1;
    direction: ltr;
    text-align: left;
    align-items: left;
    margin-bottom: 0.25rem;
}

.stat-label {
    display: flex;
    align-items: center;   
    justify-content: center; 
    font-size: 0.75rem;
    color: var(--neutral-600);
    font-weight: 500;
    text-transform: uppercase;
    margin-top: 20px;
    letter-spacing: 0.05em;
}
.stat-label.highlight-yellow {
    align-items: center;   
    justify-content: center; 
    background-color: #fde68a;
    color: #92400e;
    padding: 0 0.25rem;         
    border-radius: 3px;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    white-space: nowrap;       
}
.stat-label.highlight-green{
    white-space: nowrap;
    align-items: center;   
    justify-content: center; 
    background-color: #bbf7d0;
    color: #166534;
    padding: 0 0.25rem;
    border-radius: 3px;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.stat-label.highlight-red{
    white-space: nowrap;
    align-items: center;   
    justify-content: center; 
    background-color: #fecaca;
    color: #991b1b;
    padding: 0 0.25rem;
    border-radius: 3px;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
/* Actions Section */
.actions-section {
    max-width: 1400px;
    margin: 0 auto 3rem;
    padding: 0 2rem;
}

.actions-header {
    margin-bottom: 1.5rem;
}

.actions-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin: 0 0 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.actions-header p {
    color: var(--neutral-600);
    font-size: 0.875rem;
    margin: 0;
    font-weight: 400;
}

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

.action-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-normal);
    border: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.action-card:hover {
    transform: translateX(-8px);
    box-shadow: var(--shadow-2xl);
    border-color: var(--neutral-300);
}

.action-card:hover::before {
    opacity: 1;
}

.primary-action {
    border-right: 4px solid var(--primary-600);
}

.primary-action::before {
    background: linear-gradient(180deg, var(--primary-600), var(--primary-400));
}

.success-action {
    border-right: 4px solid var(--success-600);
}

.success-action::before {
    background: linear-gradient(180deg, var(--success-600), var(--success-400));
}

.info-action {
    border-right: 4px solid var(--secondary-600);
}

.info-action::before {
    background: linear-gradient(180deg, var(--secondary-600), var(--secondary-400));
}

.warning-action {
    border-right: 4px solid var(--warning-600);
}

.warning-action::before {
    background: linear-gradient(180deg, var(--warning-600), var(--warning-400));
}

.action-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
    transition: all var(--transition-normal);
}

.action-card:hover .action-icon {
    transform: scale(1.1) rotate(5deg);
}

.primary-action .action-icon {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.success-action .action-icon {
    background: linear-gradient(135deg, var(--success-600), var(--success-400));
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.info-action .action-icon {
    background: linear-gradient(135deg, var(--secondary-600), var(--secondary-400));
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.warning-action .action-icon {
    background: linear-gradient(135deg, var(--warning-600), var(--warning-400));
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.action-content {
    flex: 1;
}

.action-content h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin: 0 0 0.25rem;
    line-height: 1.2;
}

.action-content p {
    font-size: 0.75rem;
    color: var(--neutral-600);
    margin: 0;
    line-height: 1.4;
}

.action-arrow {
    color: var(--neutral-400);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.action-card:hover .action-arrow {
    color: var(--primary-600);
    transform: translateX(-4px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .header-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .score-display {
        width: 100%;
        justify-content: space-between;
    }
    
    .metrics-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .overview-section,
    .analytics-section,
    .actions-section {
        padding: 0 1rem;
    }
    
    .header-container {
        padding: 1rem;
    }
    
    .control-inputs {
        flex-direction: column;
        width: 100%;
    }
    
    .select-container {
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .brand-content h1 {
        font-size: 1.5rem;
    }
    
    .header-main h2 {
        font-size: 1.5rem;
    }
    
    .score-display {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .value-number {
        font-size: 2rem;
    }
}
