﻿/* ===================================================================
   FLG Distributor Portal - Modern Design System
   Consolidated styles for all portal pages
   =================================================================== */

/* ===================================================================
   CSS Variables & Root Styles
   =================================================================== */
:root {
    /* Color Palette */
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-bg: #f8f9fa;
    
    /* Gradients */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent-coral: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-blue: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --accent-purple: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    --accent-green: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --accent-yellow: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    
    /* Spacing & Sizing */
    --border-radius: 0.75rem;
    --box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    --box-shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
    --box-shadow-lg: 0 4px 20px rgba(0,0,0,0.1);
    --box-shadow-lg-hover: 0 8px 30px rgba(0,0,0,0.15);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================================================
   Global Container Styles
   =================================================================== */
.dashboard-container,
.products-container,
.sales-container,
.payout-container,
.settings-container,
.api-container,
.reports-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

/* ===================================================================
   Header Card Component
   =================================================================== */
.header-card {
    background: var(--primary-gradient);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--box-shadow);
    color: white;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    background: white;
    padding: 0.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.logo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.welcome-text {
    font-size: 0.875rem;
    opacity: 0.9;
    margin: 0;
    font-weight: 400;
}

.distributor-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.btn-logout {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.3);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    text-decoration: none;
}

/* ===================================================================
   Page Header Styles
   =================================================================== */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.page-subtitle {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    justify-content: center;
}

/* ===================================================================
   Chart Card Component
   =================================================================== */
.chart-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.chart-card:hover {
    box-shadow: var(--box-shadow-hover);
}

.chart-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-subtitle {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
    text-align: left;
}

/* ===================================================================
   Stats Cards
   =================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    border-radius: var(--border-radius);
    padding: 2rem;
    color: white;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.1);
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--box-shadow-hover);
    text-decoration: none;
    color: white;
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card-coral {
    background: var(--accent-coral);
}

.stat-card-blue {
    background: var(--accent-blue);
}

.stat-card-purple {
    background: var(--accent-purple);
}

.stat-card-green {
    background: var(--accent-green);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stat-description {
    font-size: 0.9rem;
    opacity: 0.95;
    margin: 0;
}

/* ===================================================================
   Action Buttons Grid
   =================================================================== */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.action-btn {
    background: white;
    color: #495057;
    padding: 1.25rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
    border: 2px solid transparent;
    text-align: center;
    display: block;
}

.action-btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--box-shadow-hover);
    border-color: #667eea;
    color: #667eea;
    text-decoration: none;
}

/* ===================================================================
   Controls Card
   =================================================================== */
.controls-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--box-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.controls-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.controls-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.controls-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-badge {
    background: var(--primary-gradient);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-label {
    font-weight: 600;
    color: #495057;
    white-space: nowrap;
}

/* ===================================================================
   Grid Card
   =================================================================== */
.grid-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--box-shadow);
    overflow-x: auto;
}

.grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.grid-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
    margin: 0;
}

.grid-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

.stat-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===================================================================
   Form Controls
   =================================================================== */
.form-select {
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    font-size: 0.95rem;
    transition: var(--transition);
    min-width: 120px;
}

.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 0.75rem;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.form-floating {
    margin-bottom: 1.25rem;
}

.form-floating > .form-control {
    border: 2px solid #e9ecef;
    border-radius: 0.75rem;
    padding: 1rem 0.75rem;
    height: calc(3.5rem + 2px);
    transition: var(--transition);
}

.form-floating > .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.form-floating > label {
    padding: 1rem 0.75rem;
    color: #6c757d;
}

.form-check {
    margin-bottom: 1.5rem;
    padding-left: 1.75rem;
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
    border: 2px solid #dee2e6;
    border-radius: 0.35rem;
    transition: var(--transition);
}

.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.form-check-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.form-check-label {
    color: #495057;
    font-weight: 500;
    margin-left: 0.5rem;
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.95rem;
}

.help-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

/* ===================================================================
   Buttons
   =================================================================== */
.btn-primary {
    background: var(--primary-gradient);
    border: none;
    border-radius: 0.5rem;
    color: white;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-export {
    background: white;
    border: 2px solid #198754;
    border-radius: 0.5rem;
    padding: 0.4rem 1rem;
    transition: var(--transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-export:hover {
    background: #198754;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25,135,84,0.3);
}

.btn-export img {
    filter: brightness(0) saturate(100%) invert(42%) sepia(93%) saturate(500%) hue-rotate(95deg);
    transition: var(--transition);
}

.btn-export:hover img {
    filter: brightness(0) invert(1);
}

.btn-save {
    background: var(--primary-gradient);
    border: none;
    border-radius: 0.5rem;
    color: white;
    font-weight: 600;
    padding: 0.875rem 2rem;
    width: 100%;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-sync {
    background: var(--accent-blue);
    border: none;
    border-radius: 0.5rem;
    color: white;
    font-weight: 600;
    padding: 0.875rem 2rem;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
    margin-top: 1rem;
}

.btn-sync:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
    color: white;
}

.btn-sync::before {
    content: '🔄 ';
    margin-right: 0.5rem;
}

.btn-login {
    background: var(--primary-gradient);
    border: none;
    border-radius: 0.75rem;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.875rem;
    width: 100%;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    margin-bottom: 1.25rem;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-login:active {
    transform: translateY(0);
}

/* ===================================================================
   Settings Page Specific
   =================================================================== */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.settings-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.settings-card:hover {
    box-shadow: var(--box-shadow-hover);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.card-title::before {
    font-size: 1.5rem;
}

.card-title.profile::before {
    content: '👤';
}

.card-title.branding::before {
    content: '🎨';
}

.card-title.integration::before {
    content: '🔌';
}

.form-group {
    margin-bottom: 1.5rem;
}

.logo-preview {
    margin-bottom: 1rem;
    text-align: center;
}

.logo-preview img {
    max-width: 150px;
    max-height: 150px;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 3px solid #e9ecef;
}

.file-upload-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.file-upload-wrapper input[type=file] {
    font-size: 100px;
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    cursor: pointer;
}

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    color: #495057;
}

.file-upload-label:hover {
    background: #e9ecef;
    border-color: #667eea;
    color: #667eea;
}

.file-upload-label::before {
    content: '📁';
    font-size: 1.5rem;
}

.status-message {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    font-weight: 500;
    text-align: center;
}

.status-success {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.status-error {
    background: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

/* ===================================================================
   API Documentation Styles
   =================================================================== */
.alert-info-custom {
    background: var(--accent-blue);
    border: none;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    color: white;
    box-shadow: var(--box-shadow);
}

.alert-info-custom .fw-normal {
    font-weight: 600;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.alert-info-custom code {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    display: inline-block;
}

.nav-pills {
    background: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.nav-pills .nav-link {
    border-radius: 0.5rem;
    color: #495057;
    font-weight: 500;
    transition: var(--transition);
}

.nav-pills .nav-link:hover {
    background: #f8f9fa;
    color: #667eea;
}

section {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--box-shadow);
}

section h2 {
    color: #495057;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e9ecef;
}

section h3 {
    color: #667eea;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.card {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    box-shadow: none;
    transition: var(--transition);
}

.card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.card-header {
    background: var(--primary-gradient);
    color: white;
    font-weight: 600;
    border-bottom: none;
    border-radius: calc(var(--border-radius) - 2px) calc(var(--border-radius) - 2px) 0 0 !important;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: #f8f9fa;
    color: #495057;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.table code {
    background: #f8f9fa;
    color: #667eea;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.9rem;
}

pre {
    background: #f8f9fa !important;
    border: 2px solid #e9ecef !important;
    border-radius: 0.5rem !important;
    padding: 1rem !important;
    overflow-x: auto;
}

pre code {
    background: none;
    color: #495057;
    font-size: 0.9rem;
}

details {
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
}

details summary {
    cursor: pointer;
    font-weight: 600;
    color: #667eea;
    user-select: none;
}

details summary:hover {
    color: #764ba2;
}

/* ===================================================================
   Reports Page Specific
   =================================================================== */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.report-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    text-decoration: none;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.report-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    transition: var(--transition);
}

.report-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--box-shadow-hover);
    text-decoration: none;
}

.report-card-items::before {
    background: var(--accent-coral);
}

.report-card-sales::before {
    background: var(--accent-blue);
}

.report-card-restock::before {
    background: var(--accent-green);
}

.report-card-payout::before {
    background: var(--accent-yellow);
}

.report-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-align: center;
}

.report-card-items .report-icon::before {
    content: '📦';
}

.report-card-sales .report-icon::before {
    content: '💰';
}

.report-card-restock .report-icon::before {
    content: '🔄';
}

.report-card-payout .report-icon::before {
    content: '💳';
}

.report-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #495057;
    margin-bottom: 0.75rem;
    text-align: center;
}

.report-description {
    color: #6c757d;
    margin-bottom: 1.5rem;
    text-align: center;
    flex-grow: 1;
}

.report-btn {
    background: var(--primary-gradient);
    border: none;
    border-radius: 0.5rem;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    text-align: center;
    transition: var(--transition);
    text-decoration: none;
    display: block;
}

.report-btn:hover {
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    text-decoration: none;
}

.report-card-items:hover {
    border-color: #f5576c;
}

.report-card-sales:hover {
    border-color: #00f2fe;
}

.report-card-restock:hover {
    border-color: #38f9d7;
}

.report-card-payout:hover {
    border-color: #fee140;
}

.info-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--box-shadow);
}

.info-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-title::before {
    content: '💡';
    font-size: 1.5rem;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.info-list li:last-child {
    border-bottom: none;
}

.info-list li::before {
    content: '✓';
    color: #198754;
    font-weight: 700;
    font-size: 1.25rem;
}

/* ===================================================================
   Login Page Specific
   =================================================================== */
body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.login-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    transition: var(--transition);
    animation: fadeInUp 0.5s ease-out;
}

.login-card:hover {
    box-shadow: var(--box-shadow-lg-hover);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 0;
}

.forgot-password-link {
    text-align: center;
    display: block;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem;
}

.forgot-password-link:hover {
    color: #764ba2;
    text-decoration: none;
}

.alert {
    border-radius: 0.75rem;
    border: none;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
}

.alert-info {
    background: var(--accent-blue);
    color: white;
}

/* ===================================================================
   Loading Overlay
   =================================================================== */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255,255,255,0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.loading-spinner {
    width: 4rem;
    height: 4rem;
    border: 0.4rem solid #e9ecef;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    margin-top: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #667eea;
}

/* ===================================================================
   Animations
   =================================================================== */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================================================
   Trend Indicators
   =================================================================== */
.trend-up {
    color: #198754;
    font-size: 0.875rem;
}

.trend-up::before {
    content: '↗ ';
}

.trend-down {
    color: #dc3545;
    font-size: 0.875rem;
}

.trend-down::before {
    content: '↘ ';
}

.trend-neutral {
    color: #6c757d;
    font-size: 0.875rem;
}

.trend-neutral::before {
    content: '→ ';
}

/* ===================================================================
   Responsive Design - Mobile
   =================================================================== */
@media (max-width: 768px) {
    .dashboard-container,
    .products-container,
    .sales-container,
    .payout-container,
    .settings-container,
    .api-container,
    .reports-container {
        padding: 0.75rem;
    }

    .header-card {
        padding: 1rem;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .user-info {
        width: 100%;
    }

    .btn-logout {
        width: 100%;
        text-align: center;
    }

    .page-title {
        font-size: 1.75rem;
    }

    .chart-card {
        padding: 1rem;
    }

    .chart-title {
        font-size: 1.25rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card {
        padding: 1.5rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .action-grid {
        grid-template-columns: 1fr;
    }

    .logo-wrapper {
        width: 48px;
        height: 48px;
    }

    .distributor-name {
        font-size: 1.1rem;
    }

    .controls-card {
        padding: 1rem;
        flex-direction: column;
        align-items: stretch;
    }

    .controls-left,
    .controls-right {
        width: 100%;
        justify-content: space-between;
    }

    .filter-group {
        width: 100%;
    }

    .form-select {
        flex: 1;
    }

    .grid-card {
        padding: 0.5rem;
    }

    .grid-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .grid-stats {
        width: 100%;
        justify-content: space-around;
    }

    .settings-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .settings-card {
        padding: 1.5rem;
    }

    .login-card {
        padding: 2rem 1.5rem;
    }

    .login-title {
        font-size: 1.75rem;
    }

    .login-logo {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }

    .nav-pills {
        padding: 0.75rem;
    }

    pre {
        font-size: 0.8rem;
    }

    section {
        padding: 1.5rem;
    }

    .reports-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .report-card {
        padding: 1.5rem;
    }

    .info-section {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .page-title {
        font-size: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-title {
        font-size: 1.1rem;
    }

    .chart-title {
        font-size: 1.1rem;
    }

    .RadGrid {
        font-size: 0.875rem;
    }

    .info-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .btn-sync {
        width: 100%;
    }

    .form-floating > .form-control {
        font-size: 1rem;
    }

    .btn-login {
        font-size: 1rem;
    }
}