/* MAHAKAL KRIPA - Custom Styles */

:root {
    --mk-primary: #8B0000;
    --mk-primary-dark: #5c0000;
    --mk-accent: #D4AF37;
    --mk-sidebar-width: 260px;
    --mk-bg: #f4f6f9;
}

body {
    background-color: var(--mk-bg);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
}

/* Login page */
.login-page {
    background: linear-gradient(135deg, #8B0000 0%, #1a0000 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    max-width: 420px;
    width: 100%;
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--mk-primary);
    letter-spacing: 1px;
}

.login-logo span {
    color: var(--mk-accent);
}

/* Admin Sidebar */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: var(--mk-sidebar-width);
    background: linear-gradient(180deg, #1a0000 0%, #3d0000 100%);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 1040;
    transition: transform 0.3s ease;
}

.admin-sidebar .brand {
    padding: 1.25rem 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: var(--mk-accent);
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.85);
    padding: 0.75rem 1.5rem;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-left-color: var(--mk-accent);
}

.admin-sidebar .nav-link i {
    width: 24px;
    margin-right: 8px;
}

.admin-content {
    margin-left: var(--mk-sidebar-width);
    flex: 1;
    min-width: 0;
}

.admin-topbar {
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1020;
}

/* Shopkeeper mobile nav */
.shop-navbar {
    background: linear-gradient(90deg, #8B0000, #5c0000);
}

.shop-navbar .navbar-brand {
    color: var(--mk-accent) !important;
    font-weight: 700;
}

/* Cards & tables */
.stat-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.product-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: 100%;
    transition: box-shadow 0.2s;
}

.product-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.product-card .card-img-top {
    height: 140px;
    object-fit: contain;
    background: #f8f9fa;
    padding: 10px;
}

.qty-input {
    width: 70px;
    text-align: center;
}

/* Cart badge */
.cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    font-size: 0.7rem;
}

/* Print styles */
@media print {
    .no-print, .admin-sidebar, .admin-topbar, .shop-navbar, .btn, nav, footer {
        display: none !important;
    }
    .admin-content, .container, .container-fluid {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    body {
        background: #fff;
    }
    .print-only {
        display: block !important;
    }
    .order-print-sheet {
        font-size: 12pt;
    }
}

.print-only {
    display: none;
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Toast container */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
}

/* Mobile sidebar toggle */
.sidebar-toggle {
    display: none;
}

@media (max-width: 991.98px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    .admin-sidebar.show {
        transform: translateX(0);
    }
    .admin-content {
        margin-left: 0;
    }
    .sidebar-toggle {
        display: inline-flex;
    }
}

/* Brand filter chips */
.brand-chip {
    cursor: pointer;
    border-radius: 50px;
    padding: 0.35rem 1rem;
    font-size: 0.875rem;
    border: 1px solid #dee2e6;
    background: #fff;
    transition: all 0.2s;
}

.brand-chip.active, .brand-chip:hover {
    background: var(--mk-primary);
    color: #fff;
    border-color: var(--mk-primary);
}

/* Form improvements */
.form-label {
    font-weight: 500;
    font-size: 0.9rem;
}

.table th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #6c757d;
}

/* WhatsApp button */
.btn-whatsapp {
    background-color: #25D366;
    border-color: #25D366;
    color: #fff;
}
.btn-whatsapp:hover {
    background-color: #1da851;
    border-color: #1da851;
    color: #fff;
}
