/**
 * Dashboard Template CSS
 * Modern, clean design with soft pastel colors
 */

:root {
    --sidebar-width: 280px;
    --header-height: 70px;
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    
    /* Pastel Colors */
    --pastel-pink: #fce7f3;
    --pastel-blue: #dbeafe;
    --pastel-green: #d1fae5;
    --pastel-yellow: #fef3c7;
    --pastel-purple: #ede9fe;
    
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-sidebar: #ffffff;
    
    /* Text Colors */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Sidebar Styles */
.dashboard-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--bg-sidebar);
    border-right: 1px solid #e5e7eb;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    padding: 24px;
    transition: all 0.3s ease;
}

.dashboard-sidebar::-webkit-scrollbar {
    width: 6px;
}

.dashboard-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.dashboard-sidebar::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.dashboard-sidebar::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Sidebar Logo */
.sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 0;
}

.sidebar-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
}

.sidebar-logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

/* Create New Card */
.create-new-card {
    background: linear-gradient(135deg, #fce7f3 0%, #f9a8d4 100%);
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.create-new-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.create-new-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    opacity: 0.5;
}

.create-new-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.create-new-card-decoration {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 80px;
    height: 80px;
    opacity: 0.3;
}

/* Navigation Menu */
.sidebar-nav {
    list-style: none;
}

.sidebar-nav-item {
    margin-bottom: 4px;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 5px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 14px;
    margin-left: -10px;
    
}

.sidebar-nav-link:hover {
    background-color: var(--pastel-pink);
    color: var(--text-primary);
}

.sidebar-nav-link.active {
    background-color: var(--pastel-purple);
    color: var(--primary-color);
}

.sidebar-nav-link-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-nav-arrow {
    width: 16px;
    height: 16px;
    opacity: 0.5;
    transition: transform 0.2s ease;
}

.sidebar-nav-link:hover .sidebar-nav-arrow {
    opacity: 1;
    transform: translateX(2px);
}

/* Section Dividers */
.sidebar-section {
    margin-top: 24px;
    margin-bottom: 24px;
}

.sidebar-section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 16px;
    margin-bottom: 8px;
}

/* Main Content Area */
.dashboard-main {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 0;
    transition: all 0.3s ease;
}

/* Dashboard Header/Navbar */
.dashboard-header {
    position: sticky;
    top: 0;
    background-color: var(--bg-primary);
    border-bottom: 1px solid #e5e7eb;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.dashboard-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}

.dashboard-header-left {
    flex: 1;
}

.dashboard-header-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.dashboard-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dashboard-user-menu {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dashboard-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    background-color: #f9fafb;
}

.dashboard-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.dashboard-user-details {
    display: flex;
    flex-direction: column;
}

.dashboard-user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.dashboard-user-email {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.2;
}

.dashboard-user-actions {
    display: flex;
    align-items: center;
}

.dashboard-logout-btn {
    padding: 10px 16px;
    background-color: #fee2e2;
    color: #991b1b;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-logout-btn:hover {
    background-color: #fecaca;
}

/* Content wrapper after header */
.dashboard-content-wrapper {
    padding: 24px;
}

/* Dashboard Cards */
.dashboard-card {
    background-color: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    height: 100%;
}

.dashboard-card:hover {
    box-shadow: var(--shadow-md);
}

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

.dashboard-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.dashboard-card-body {
    position: relative;
}

/* Welcome Card */
.welcome-card {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    border-radius: var(--radius-xl);
    padding: 32px;
    position: relative;
    overflow: hidden;
    min-height: 220px;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
    border-radius: 50%;
}

.welcome-card-content {
    position: relative;
    z-index: 1;
}

.welcome-card-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.welcome-card-location {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 12px;
}

.welcome-card-illustration {
    position: absolute;
    right: 20px;
    bottom: -10px;
    width: 180px;
    height: 180px;
    opacity: 0.8;
}

/* Inbox Card */
.inbox-card {
    background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
    border-radius: var(--radius-xl);
    padding: 24px;
    position: relative;
    overflow: hidden;
    min-height: 220px;
}

.inbox-card-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.inbox-card-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.inbox-card-illustration {
    position: absolute;
    right: 20px;
    bottom: -10px;
    width: 140px;
    height: 140px;
    opacity: 0.7;
}

/* Chart Cards */
.chart-card {
    background-color: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.chart-container {
    position: relative;
    height: 250px;
    margin-top: 16px;
}

.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.chart-legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    flex-shrink: 0;
}

.chart-legend-label {
    color: var(--text-primary);
    font-weight: 500;
}

/* Sales Card */
.sales-card {
    background-color: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.sales-card-amount {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.sales-card-range {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.sales-card-chart {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sales-mini-chart {
    width: 80px;
    height: 80px;
}

/* Monthly Sales Card with Gauge */
.monthly-sales-gauge {
    width: 100px;
    height: 60px;
    position: relative;
}

.gauge-chart {
    width: 100%;
    height: 100%;
}

/* Grid System */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.dashboard-col-6 {
    grid-column: span 6;
}

.dashboard-col-4 {
    grid-column: span 4;
}

.dashboard-col-3 {
    grid-column: span 3;
}

/* Stats Cards */
.stats-card {
    background-color: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 20px;
    border-left: 4px solid var(--primary-color);
}

.stats-card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stats-card-label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Table Styles */
.dashboard-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.dashboard-table thead {
    background-color: var(--bg-secondary);
}

.dashboard-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dashboard-table td {
    padding: 16px;
    border-top: 1px solid #e5e7eb;
    font-size: 14px;
}

.dashboard-table tbody tr:hover {
    background-color: var(--bg-secondary);
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background-color: var(--pastel-green);
    color: #065f46;
}

.badge-warning {
    background-color: var(--pastel-yellow);
    color: #92400e;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background-color: var(--pastel-blue);
    color: #1e40af;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .dashboard-col-6 {
        grid-column: span 12;
    }
    
    .dashboard-col-4 {
        grid-column: span 6;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 0;
    }
    
    .dashboard-sidebar {
        transform: translateX(-100%);
    }
    
    .dashboard-sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .dashboard-main {
        margin-left: 0;
        padding: 16px;
    }
    
    .dashboard-col-4 {
        grid-column: span 12;
    }
    
    .dashboard-col-3 {
        grid-column: span 12;
    }
}

/* Mobile Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1001;
    background-color: var(--bg-primary);
    border: none;
    border-radius: var(--radius-md);
    padding: 12px;
    box-shadow: var(--shadow-md);
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
}

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

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 8px !important; }
.mb-2 { margin-bottom: 16px !important; }
.mb-3 { margin-bottom: 24px !important; }
.mb-4 { margin-bottom: 32px !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px !important; }
.mt-2 { margin-top: 16px !important; }
.mt-3 { margin-top: 24px !important; }
.mt-4 { margin-top: 32px !important; }

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

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Form Styles */
.form-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 14px;
}

.form-control,
.form-select {
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--danger-color);
}

.invalid-feedback {
    display: block;
    color: var(--danger-color);
    font-size: 12px;
    margin-top: 4px;
}

.btn {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-outline-secondary {
    border: 2px solid #d1d5db;
    color: var(--text-secondary);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: #d1d5db;
    color: var(--text-primary);
}

.btn-outline-warning {
    border: 2px solid var(--warning-color);
    color: var(--warning-color);
    background: transparent;
}

.btn-outline-warning:hover {
    background: var(--warning-color);
    color: white;
}

.btn-outline-danger {
    border: 2px solid var(--danger-color);
    color: var(--danger-color);
    background: transparent;
}

.btn-outline-danger:hover {
    background: var(--danger-color);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}
