/* =============================================
   FLORUNISA.PK - Business Management System
   Complete Responsive Stylesheet with Modern UI
   ============================================= */

/* === CSS Variables === */
:root {
    --primary-color: #e91e63;
    --primary-dark: #c2185b;
    --primary-light: #f8bbd9;
    --secondary-color: #2c3e50;
    --accent-color: #ff9800;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --danger-color: #f44336;
    --info-color: #2196f3;
    --light-bg: #f8f9fa;
    --dark-bg: #1a1a2e;
    --text-dark: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.16);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
    --sidebar-width: 280px;
}

/* === Reset & Base === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

ul {
    list-style: none;
}

/* === Container === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 15px;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 15px;
    color: var(--text-light);
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    font-family: inherit;
}

.btn i {
    font-size: 16px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #1a252f;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #388e3c;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #d32f2f;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-info {
    background: var(--info-color);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-sm);
}

.btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* === Header / Navigation === */
.header {
    background: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    gap: 20px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span {
    color: var(--secondary-color);
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-menu a {
    font-weight: 500;
    color: var(--text-dark);
    padding: 8px 0;
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-menu a i {
    font-size: 14px;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-icon {
    position: relative;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    transition: var(--transition);
}

.cart-icon:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--primary-color);
    color: white;
    font-size: 10px;
    font-weight: 600;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-dark);
    padding: 8px;
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1100;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100vh;
    background: white;
    z-index: 1200;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.mobile-nav.active {
    left: 0;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
}

.mobile-nav-menu {
    padding: 20px;
}

.mobile-nav-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dark);
    font-weight: 500;
}

.mobile-nav-menu a:hover,
.mobile-nav-menu a.active {
    color: var(--primary-color);
}

.mobile-nav-menu a i {
    font-size: 18px;
    width: 24px;
}

/* === Hero Section === */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="80" r="3" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="60" r="1.5" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: 100px 100px;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    max-width: 600px;
    margin: 0 auto 30px;
}

/* === Cards === */
.card {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--light-bg);
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.card-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.card-price .original {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 8px;
}

/* === Product Grid === */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 40px 0;
}

/* === Category Cards === */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    padding: 40px 0;
}

.category-card {
    position: relative;
    height: 200px;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-card:hover img {
    transform: scale(1.1);
}

.category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.category-overlay h3 {
    color: white;
    margin: 0;
}

/* === Product Detail === */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    padding: 50px 0;
}

.product-gallery img {
    width: 100%;
    border-radius: var(--radius-md);
}

.product-info h1 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.product-category {
    color: var(--text-muted);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-price-lg {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 20px 0;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
}

.quantity-selector button {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: var(--radius-sm);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-selector button:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.quantity-selector input {
    width: 60px;
    height: 44px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 16px;
}

/* === Checkout === */
.checkout-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    padding: 40px 0;
}

.checkout-form {
    background: white;
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.order-summary {
    background: white;
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group label i {
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* === Order Summary === */
.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-total {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid var(--border-color);
}

/* ====================================
   ADMIN LAYOUT - RESPONSIVE SIDEBAR
   ==================================== */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Admin Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--dark-bg) 0%, #16213e 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 25px 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo i {
    font-size: 28px;
}

.sidebar-logo span {
    color: white;
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    position: absolute;
    right: 15px;
    top: 20px;
}

.sidebar-menu {
    padding: 20px 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 25px;
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255,255,255,0.1);
    color: white;
    border-left-color: var(--primary-color);
}

.sidebar-menu a i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.sidebar-menu a span {
    font-weight: 500;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 15px 20px;
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

/* Admin Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 30px;
    background: var(--light-bg);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* Admin Top Bar */
.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.admin-topbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sidebar-toggle {
    display: none;
    background: white;
    border: 1px solid var(--border-color);
    font-size: 20px;
    cursor: pointer;
    color: var(--text-dark);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.sidebar-toggle:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-title h1 {
    margin: 0 0 5px 0;
    font-size: 1.75rem;
}

.page-title p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}

.admin-topbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.date-display {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 14px;
}

/* === Dashboard Stats === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-card.clickable {
    cursor: pointer;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    flex-shrink: 0;
}

.stat-icon i {
    font-size: 24px;
}

.stat-icon.primary { background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)); }
.stat-icon.success { background: linear-gradient(135deg, var(--success-color), #388e3c); }
.stat-icon.warning { background: linear-gradient(135deg, var(--warning-color), #f57c00); }
.stat-icon.danger { background: linear-gradient(135deg, var(--danger-color), #d32f2f); }
.stat-icon.info { background: linear-gradient(135deg, var(--info-color), #1976d2); }

.stat-info h3 {
    font-size: 1.75rem;
    margin-bottom: 5px;
}

.stat-info p {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
}

/* Gradient Stat Cards */
.stat-card.gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.stat-card.gradient-success {
    background: linear-gradient(135deg, var(--success-color), #388e3c);
    color: white;
}

.stat-card.gradient-primary .stat-icon,
.stat-card.gradient-success .stat-icon {
    background: rgba(255,255,255,0.2);
}

.stat-card.gradient-primary .stat-info p,
.stat-card.gradient-success .stat-info p {
    color: rgba(255,255,255,0.85);
}

.stat-card.gradient-primary .stat-info h3,
.stat-card.gradient-success .stat-info h3 {
    color: white;
}

/* ====================================
   DATA TABLES - PROPER STYLING
   ==================================== */
.data-table {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 15px;
}

.table-header h2 {
    margin: 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-header h2 i {
    color: var(--primary-color);
}

.table-count {
    color: var(--text-muted);
    font-size: 14px;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

th, td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

th {
    background: var(--light-bg);
    font-weight: 600;
    color: var(--text-dark);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

th i {
    margin-right: 6px;
    color: var(--text-muted);
}

tbody tr {
    transition: var(--transition);
}

tbody tr:hover {
    background: rgba(233, 30, 99, 0.03);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Table Cell Variants */
.td-product {
    display: flex;
    align-items: center;
    gap: 12px;
}

.td-product img {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--light-bg);
}

.td-product-info {
    min-width: 0;
}

.td-product-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.td-product-id {
    font-size: 12px;
    color: var(--text-muted);
}

.td-price {
    font-weight: 600;
    color: var(--text-dark);
}

.td-price.profit {
    color: var(--success-color);
}

.td-price.loss {
    color: var(--danger-color);
}

.td-stock {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stock-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.stock-indicator.high { background: var(--success-color); }
.stock-indicator.medium { background: var(--warning-color); }
.stock-indicator.low { background: var(--danger-color); }

.td-actions {
    display: flex;
    gap: 8px;
}

.td-actions .btn {
    padding: 8px 12px;
    font-size: 12px;
}

/* Empty State */
.table-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.table-empty i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.table-empty p {
    margin: 0;
}

/* === Status Badges === */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge i {
    font-size: 12px;
}

.badge-pending { 
    background: #fff3e0; 
    color: #e65100; 
}

.badge-shipped { 
    background: #e3f2fd; 
    color: #1565c0; 
}

.badge-delivered { 
    background: #e8f5e9; 
    color: #2e7d32; 
}

.badge-returned { 
    background: #ffebee; 
    color: #c62828; 
}

.badge-success { 
    background: #e8f5e9; 
    color: #2e7d32; 
}

.badge-warning { 
    background: #fff3e0; 
    color: #e65100; 
}

.badge-danger { 
    background: #ffebee; 
    color: #c62828; 
}

.badge-info { 
    background: #e3f2fd; 
    color: #1565c0; 
}

/* === Modal === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-lg {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h3 i {
    color: var(--primary-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 5px;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--danger-color);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 15px 25px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* === Charts Container === */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-top: 30px;
}

.chart-card {
    background: white;
    padding: 25px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.chart-card h3 {
    margin-bottom: 20px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-card h3 i {
    color: var(--primary-color);
}

/* Simple Bar Chart */
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 200px;
    padding: 20px 0;
}

.bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.bar {
    width: 100%;
    max-width: 40px;
    background: linear-gradient(to top, var(--primary-color), var(--primary-light));
    border-radius: 4px 4px 0 0;
    margin-top: auto;
    transition: height 0.5s ease;
}

.bar-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
    text-align: center;
}

/* === Profit Breakdown === */
.profit-breakdown {
    background: white;
    padding: 25px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-item i {
    margin-right: 10px;
}

.breakdown-item.positive { color: var(--success-color); }
.breakdown-item.negative { color: var(--danger-color); }
.breakdown-item.total {
    font-weight: 700;
    font-size: 1.1rem;
    border-top: 2px solid var(--border-color);
    margin-top: 10px;
    padding-top: 15px;
}

/* === Footer === */
.footer {
    background: var(--dark-bg);
    color: rgba(255,255,255,0.7);
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-col h4 i {
    color: var(--primary-color);
}

.footer-col a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    color: rgba(255,255,255,0.6);
}

.footer-col a i {
    width: 16px;
}

.footer-col a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* === Alerts === */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert i {
    font-size: 20px;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.alert-warning {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc80;
}

.alert-info {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
}

/* === Info Box === */
.info-box {
    padding: 25px;
    background: #e3f2fd;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--info-color);
    margin-top: 30px;
}

.info-box h4 {
    color: var(--info-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-box ul {
    margin-top: 10px;
    padding-left: 20px;
}

.info-box li {
    list-style: disc;
    margin-bottom: 5px;
    color: var(--text-light);
}

/* === Page Header === */
.page-header {
    padding: 40px 0;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: 50px 50px;
}

.page-header-content {
    position: relative;
    z-index: 1;
}

.page-header h1 {
    margin-bottom: 10px;
}

.page-header p {
    color: rgba(255,255,255,0.8);
    margin: 0;
}

/* === Search & Filter === */
.search-filter {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 14px 15px 14px 50px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.search-box i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
}

.filter-select {
    padding: 14px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    min-width: 180px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    background: white;
    transition: var(--transition);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* === Summary Stats Grid === */
.summary-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.summary-stat-card {
    background: white;
    padding: 20px;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.summary-stat-card h3 {
    margin-bottom: 5px;
    font-size: 1.5rem;
}

.summary-stat-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}

.summary-stat-card.primary h3 { color: var(--primary-color); }
.summary-stat-card.info h3 { color: var(--info-color); }
.summary-stat-card.warning h3 { color: var(--warning-color); }
.summary-stat-card.success h3 { color: var(--success-color); }

/* === Utility Classes === */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-success { color: var(--success-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-info { color: var(--info-color) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-primary { color: var(--primary-color) !important; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.p-20 { padding: 20px; }
.fw-bold { font-weight: 600; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }

/* === Loading Spinner === */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 15px;
    z-index: 9999;
}

/* ====================================
   RESPONSIVE BREAKPOINTS
   ==================================== */

/* Large Tablets & Small Laptops */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .summary-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets */
@media (max-width: 992px) {
    /* Admin Sidebar - Hidden by default on tablets */
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar-close {
        display: block;
    }
    
    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .checkout-container,
    .product-detail {
        grid-template-columns: 1fr;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .order-summary {
        position: static;
    }
}

/* Mobile Landscape & Small Tablets */
@media (max-width: 768px) {
    /* Website Navigation */
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .navbar {
        padding: 12px 0;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    /* Hero */
    .hero {
        padding: 50px 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px 15px;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
    }
    
    .stat-info h3 {
        font-size: 1.4rem;
    }
    
    /* Forms */
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Tables */
    table {
        min-width: 600px;
    }
    
    th, td {
        padding: 12px 15px;
        font-size: 13px;
    }
    
    /* Page Header */
    .page-header {
        padding: 30px 0;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    /* Admin Topbar */
    .admin-topbar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .admin-topbar-right {
        width: 100%;
        justify-content: flex-end;
    }
    
    /* Summary Stats */
    .summary-stats {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    /* Search Filter */
    .search-filter {
        flex-direction: column;
    }
    
    .search-box {
        min-width: 100%;
    }
    
    .filter-select {
        width: 100%;
    }
    
    /* Categories */
    .categories-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Mobile Portrait */
@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    .main-content {
        padding: 20px 15px;
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-icon {
        width: 55px;
        height: 55px;
    }
    
    /* Products */
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Categories */
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    /* Summary Stats */
    .summary-stats {
        grid-template-columns: 1fr;
    }
    
    /* Buttons */
    .btn-responsive {
        padding: 12px 20px;
        width: 100%;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .td-actions {
        flex-direction: column;
    }
    
    .td-actions .btn {
        width: 100%;
    }
    
    /* Modal */
    .modal {
        margin: 15px;
        max-height: calc(100vh - 30px);
    }
    
    .modal-body {
        padding: 20px;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    /* Hero */
    .hero h1 {
        font-size: 1.75rem;
    }
    
    /* Product Price */
    .product-price-lg {
        font-size: 2rem;
    }
    
    /* Typography */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    /* Table Actions Dropdown */
    .td-product-name {
        max-width: 120px;
    }
}

/* Extra Small Devices */
@media (max-width: 360px) {
    .logo {
        font-size: 1.3rem;
    }
    
    .stat-info h3 {
        font-size: 1.2rem;
    }
    
    .btn {
        font-size: 13px;
        padding: 10px 16px;
    }
}

/* === Order Details Modal Styles === */
.order-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.order-info-card {
    background: var(--light-bg);
    border-radius: var(--radius-md);
    padding: 15px;
}

.order-info-card h4 {
    font-size: 0.95rem;
    color: var(--primary-color);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-info-card p {
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.order-info-card p i {
    color: var(--text-muted);
    margin-right: 5px;
}

.order-items-table {
    margin-bottom: 0;
}

.order-items-table tfoot td {
    font-weight: 600;
    border-top: 2px solid var(--border-color);
}

@media (max-width: 576px) {
    .order-info-grid {
        grid-template-columns: 1fr;
    }
}

/* === Customer Info Styles === */
.td-customer {
    display: flex;
    flex-direction: column;
}

.td-customer-name {
    font-weight: 600;
    color: var(--text-dark);
}

.td-customer-email {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* === Stock Indicator Styles === */
.td-stock {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stock-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.stock-indicator.high {
    background: var(--success-color);
}

.stock-indicator.medium {
    background: var(--warning-color);
}

.stock-indicator.low {
    background: var(--danger-color);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* === Price & Profit Styles === */
.td-price {
    font-weight: 600;
    white-space: nowrap;
}

.td-price.profit {
    color: var(--success-color);
}

/* === Product Cell Styles === */
.td-product {
    display: flex;
    align-items: center;
    gap: 12px;
}

.td-product img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.td-product-info {
    min-width: 0;
}

.td-product-name {
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.td-product-id {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* === Summary Statistics Cards === */
.summary-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.summary-stat-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-color);
}

.summary-stat-card.primary {
    border-color: var(--primary-color);
}

.summary-stat-card.success {
    border-color: var(--success-color);
}

.summary-stat-card.info {
    border-color: var(--info-color);
}

.summary-stat-card.warning {
    border-color: var(--warning-color);
}

.summary-stat-card h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.summary-stat-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.summary-stat-card p i {
    color: inherit;
}

@media (max-width: 992px) {
    .summary-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .summary-stats {
        grid-template-columns: 1fr;
    }
    
    .summary-stat-card h3 {
        font-size: 1.25rem;
    }
}

/* === Print Styles === */
@media print {
    .sidebar,
    .nav-actions,
    .btn,
    .sidebar-toggle,
    .mobile-menu-toggle,
    .search-filter {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    
    .stat-card,
    .data-table {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    body {
        background: white;
    }
}
