/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    /* Default / User Theme (Modern Blue & Indigo) */
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --primary-subtle: rgba(59, 130, 246, 0.15);
    --secondary-color: #6366f1;
    --secondary-hover: #4f46e5;
    
    --success-color: #10b981;
    --success-hover: #059669;
    --success-subtle: rgba(16, 185, 129, 0.2);
    
    --danger-color: #f43f5e;
    --danger-hover: #e11d48;
    --danger-subtle: rgba(244, 63, 94, 0.2);
    
    --warning-color: #f59e0b;
    --warning-hover: #d97706;
    --warning-subtle: rgba(245, 158, 11, 0.2);
    
    --info-color: #06b6d4;
    --info-hover: #0891b2;
    --info-subtle: rgba(6, 182, 212, 0.2);
    
    --dark-blue: #0f172a;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    
    --light-bg: #f8fafc;
    --glass-bg: rgba(255, 255, 255, 0.85);
    
    --sidebar-bg: #1e293b;
    --sidebar-accent: #334155;
    
    --grad-primary: linear-gradient(135deg, #3b82f6, #6366f1);
    --grad-success: linear-gradient(135deg, #10b981, #059669);
    --grad-warning: linear-gradient(135deg, #f59e0b, #d97706);
    --grad-danger: linear-gradient(135deg, #f43f5e, #e11d48);
}

/* Theme Admin (Deep Blue & Slate) */
.theme-admin {
    --primary-color: #1e293b;
    --primary-hover: #0f172a;
    --primary-subtle: rgba(30, 41, 59, 0.1);
    --secondary-color: #334155;
    --grad-primary: linear-gradient(135deg, #1e293b, #334155);
    --sidebar-bg: #0f172a;
    --sidebar-accent: #1e293b;
    --light-bg: #f1f5f9;
}

/* Theme Agent (Teal & Emerald) */
.theme-agent {
    --primary-color: #0d9488;
    --primary-hover: #0f766e;
    --primary-subtle: rgba(13, 148, 136, 0.15);
    --secondary-color: #10b981;
    --grad-primary: linear-gradient(135deg, #0d9488, #10b981);
    --sidebar-bg: #134e4a;
    --sidebar-accent: #115e59;
    --light-bg: #f0fdfa;
}


body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--light-bg);
    color: #1e293b;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.3s ease;
}

/* Role-specific Body background treatments */
.theme-admin::before, .theme-agent::before, .theme-user::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    opacity: 0.03;
    pointer-events: none;
}

.theme-admin::before {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M54.627 0l.83.83L40 15.458 25.458 0.915l0.915-.915L40 13.627 54.627 0zm-29.254 0l.83.83L10 15.458-4.542 0.915l0.915-.915L10 13.627 25.373 0h.001z' fill='%231e293b' fill-opacity='1' fill-rule='evenodd'/%3E%3C/svg%3E");
}

.theme-agent::before {
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 20.5V18H0v-2h20v-2.5L23.5 17 20 20.5zM0 7h20V4.5L23.5 7 20 9.5V7H0zm0 26h20v2.5L23.5 33 20 30.5V33H0z' fill='%230d9488' fill-opacity='1' fill-rule='evenodd'/%3E%3C/svg%3E");
}

.theme-user::before {
    background-image: url("data:image/svg+xml,%3Csvg width='52' height='26' viewBox='0 0 52 26' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%233b82f6' fill-opacity='1'%3E%3Cpath d='M10 10c0-2.21-1.79-4-4-4-2.21 0-4 1.79-4 4s1.79 4 4 4c2.21 0 4-1.79 4-4zm2 0c0 3.314-2.686 6-6 6s-6-2.686-6-6 2.686-6 6-6 6 2.686 6 6zm25.535 8.071c-1.562-1.562-4.095-1.562-5.657 0-1.562 1.562-1.562 4.095 0 5.657 1.562 1.562 4.095 1.562 5.657 0 1.562-1.562 1.562-4.095 0-5.657zm1.414-1.414c2.343 2.344 2.343 6.142 0 8.485-2.344 2.343-6.142 2.343-8.485 0-2.343-2.344-2.343-6.142 0-8.485 2.344-2.343 6.142-2.343 8.485 0zM50.828 2c-1.171-1.171-3.071-1.171-4.242 0-1.172 1.171-1.172 3.071 0 4.242 1.171 1.172 3.071 1.172 4.242 0 1.172-1.171 1.172-3.071 0-4.242zm1.414-1.414c2.344 2.343 2.344 6.142 0 8.485-2.343 2.344-6.142 2.343-8.485 0-2.343-2.344-2.343-6.142 0-8.485 2.344-2.343 6.142-2.343 8.485 0zM17.404 20c-1.172-1.171-3.071-1.171-4.242 0-1.172 1.171-1.172 3.071 0 4.242 1.171 1.172 3.071 1.172 4.242 0 1.172-1.171 1.172-3.071 0-4.242zm1.414-1.414c2.344 2.343 2.344 6.142 0 8.485-2.343 2.344-6.142 2.343-8.485 0-2.343-2.344-2.343-6.142 0-8.485 2.344-2.343 6.142-2.343 8.485 0zM37 6c0-2.21-1.79-4-4-4-2.21 0-4 1.79-4 4s1.79 4 4 4c2.21 0 4-1.79 4-4zm2 0c0 3.314-2.686 6-6 6s-6-2.686-6-6 2.686-6 6-6 6 2.686 6 6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.container.py-4 {
    flex: 1;
}


/* Glassmorphism Navbar */
.navbar {
    background-color: var(--glass-bg) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding: 1rem 0;
}

.navbar-brand img {
    height: 56px;
    width: auto;
    margin-right: 15px;
    object-fit: contain;
}

.btn i {
    font-size: 1.1em;
    vertical-align: middle;
}



.premium-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-premium);
}

.btn-premium {
    background: var(--grad-primary);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px var(--primary-subtle);
}

.btn-premium:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px var(--primary-subtle);
    color: white;
}

.form-control, .form-select {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-subtle);
}

/* Vibrant Text Colors for Stat Cards */
.text-vibrant-primary { color: #dbeafe !important; } /* Soft Blue tint */
.text-vibrant-success { color: #d1fae5 !important; } /* Soft Green tint */
.text-vibrant-warning { color: #fef3c7 !important; } /* Soft Gold tint */
.text-vibrant-danger { color: #fee2e2 !important; } /* Soft Red tint */

.badge {
    padding: 0.6em 1.2em;
    font-weight: 600;
    border-radius: 50px;
    letter-spacing: 0.01em;
}


.badge-subtle-success { background: var(--success-subtle); color: var(--success-color); border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-subtle-danger { background: var(--danger-subtle); color: var(--danger-color); border: 1px solid rgba(239, 68, 68, 0.2); }
.badge-subtle-warning { background: var(--warning-subtle); color: var(--warning-color); border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-subtle-primary { background: var(--primary-subtle); color: var(--primary-color); border: 1px solid rgba(37, 99, 235, 0.2); }
.badge-subtle-info { background: var(--info-subtle); color: var(--info-color); border: 1px solid rgba(14, 165, 233, 0.2); }
.badge-subtle-secondary { background: var(--gray-100); color: var(--secondary-color); border: 1px solid var(--gray-200); }

.alert-danger {
    background-color: var(--danger-subtle);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
    border-radius: 12px;
}

.alert-warning {
    background-color: var(--warning-subtle);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: var(--warning-color);
    border-radius: 12px;
}

.tracking-widest {
    letter-spacing: 0.05em;
}

.stat-icon-wrap {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Hero Section */
.hero-text {
    background: linear-gradient(to right, #2563eb, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Table Enhancements */
.table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--secondary-color);
    border-bottom: 1px solid #f1f5f9;
}

.table tbody td {
    border-bottom: 1px solid #f8fafc;
}

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

.admin-sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    color: white;
    transition: all 0.3s ease;
    z-index: 1000;
    height: 100vh;
    position: sticky;
    top: 0;
}

/* Sidebar Scrollbar Styling (Optional but recommended for premium feel) */
.admin-sidebar .nav::-webkit-scrollbar,
.agent-sidebar .nav::-webkit-scrollbar {
    width: 6px;
}
.admin-sidebar .nav::-webkit-scrollbar-track,
.agent-sidebar .nav::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}
.admin-sidebar .nav::-webkit-scrollbar-thumb,
.agent-sidebar .nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}
.admin-sidebar .nav::-webkit-scrollbar-thumb:hover,
.agent-sidebar .nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.admin-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.6);
    padding: 14px 25px;
    border-radius: 0;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.admin-sidebar .nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.admin-sidebar .nav-link.active {
    color: white;
    background: var(--sidebar-accent);
    border-left: 3px solid var(--primary-color);
}

.admin-main {
    flex: 1;
    background: var(--light-bg);
    overflow-y: auto;
}

.admin-top-bar {
    background: white;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Agent Sidebar Layout */
.agent-wrapper {
    display: flex;
    min-height: 100vh;
}

.agent-sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    color: white;
    transition: all 0.3s ease;
    z-index: 1000;
    height: 100vh;
    position: sticky;
    top: 0;
}

.agent-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.6);
    padding: 12px 25px;
    border-radius: 12px;
    margin: 4px 15px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.agent-sidebar .nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.agent-sidebar .nav-link.active {
    color: white;
    background: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.agent-main {
    flex: 1;
    background: #fdfdfd;
    overflow-y: auto;
}

.agent-top-bar {
    background: white;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    border-bottom: 1px solid var(--gray-100);
}

.agent-stat-card {
    border: none;
    border-radius: 24px;
    background: white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    overflow: hidden;
}

.agent-order-card {
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.agent-order-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(13, 148, 136, 0.1);
    border-color: var(--agent-primary-subtle);
}


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

.container, .admin-main {
    animation: fadeIn 0.5s ease-out;
}

/* Transition Hover Utility */
.transition-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.transition-hover:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
    transform: translateY(-5px);
    box-shadow: var(--shadow-premium) !important;
}

.transition-hover:hover i {
    color: white !important;
}

/* POS Specific Styles */
.pos-product-list {
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    padding-right: 10px;
}

/* Custom Scrollbar */
.pos-product-list::-webkit-scrollbar, 
.pos-cart-list::-webkit-scrollbar {
    width: 6px;
}
.pos-product-list::-webkit-scrollbar-track,
.pos-cart-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.pos-product-list::-webkit-scrollbar-thumb,
.pos-cart-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
.pos-product-list::-webkit-scrollbar-thumb:hover,
.pos-cart-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.pos-card {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent !important;
}

.pos-card:hover {
    border-color: var(--primary-color) !important;
    transform: translateY(-3px);
}

.pos-cart-list {
    max-height: calc(100vh - 480px);
    overflow-y: auto;
    scrollbar-width: thin;
}

.btn-qty {
    width: 28px;
    height: 28px;
    padding: 0;
    line-height: 1;
    border-radius: 8px !important;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    background: white;
}

.btn-qty:hover {
    background: var(--light-bg);
}

.cart-table td {
    padding: 12px 0;
}

.sticky-sale-card {
    top: 85px;
    max-height: calc(100vh - 100px);
}
