/* Import premium typography from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --font-primary: 'Outfit', sans-serif;
    --sidebar-width: 260px;
    --transition-speed: 0.3s;
    
    /* Harmonious Light Mode HSL Palette */
    --bg-app: #f4f6fc;
    --bg-card: rgba(255, 255, 255, 0.85);
    --border-color: rgba(224, 230, 245, 0.8);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --primary-color: #4f46e5;
    --primary-gradient: linear-gradient(135deg, #4f46e5, #6366f1);
    --secondary-color: #0ea5e9;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] {
    /* Harmony Dark Mode HSL Palette */
    --bg-app: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --border-color: rgba(51, 65, 85, 0.5);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-app);
    color: var(--text-primary);
    margin: 0;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    overflow-x: hidden;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Layout Architecture */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.app-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem 1rem;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: width var(--transition-speed);
    z-index: 100;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
    padding-left: 0.5rem;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-link-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-speed);
}

.nav-link-item:hover, .nav-link-item.active {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.nav-link-item i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

/* Main Content Workspace */
.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    transition: margin-left var(--transition-speed);
}

/* Navigation Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 16px;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 90;
}

/* Dynamic Switches & Dropdowns */
.business-picker select {
    border: 1px solid var(--border-color);
    background: var(--bg-app);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 0.5rem 1.5rem 0.5rem 1rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

/* Micro-animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse-hover:hover {
    animation: pulse 1s infinite;
}

/* High Speed POS Screen specific CSS */
.pos-container {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 1.5rem;
    height: calc(100vh - 180px);
}

.pos-cart-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.pos-table-scroll {
    overflow-y: auto;
    flex: 1;
    max-height: calc(100vh - 380px);
}

/* Utility Badges */
.badge-premium {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
    border-radius: 8px;
    font-weight: 600;
}

.theme-toggle-btn {
    border: none;
    background: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Premium Header Dropdown Styles */
.dropdown-menu-premium {
    position: absolute !important;
    right: 0 !important;
    top: 100% !important;
    margin-top: 0.75rem !important;
    z-index: 1100 !important;
    width: 320px;
    background: var(--bg-card) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
    padding: 1.25rem !important;
    transform: translateY(10px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: block !important;
}

.dropdown-menu-premium.show {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

.status-dot-pulse {
    width: 10px;
    height: 10px;
    background-color: var(--accent-success);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: statusPulse 1.8s infinite;
}

@keyframes statusPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.user-badge-gradient {
    background: linear-gradient(135deg, #4f46e5, #0ea5e9);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.35em 0.85em;
    border-radius: 20px;
}

.dropdown-item-premium {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem !important;
    border-radius: 12px;
    color: var(--text-secondary) !important;
    font-weight: 500;
    transition: all 0.25s ease;
}

.dropdown-item-premium:hover {
    background: var(--primary-gradient) !important;
    color: #ffffff !important;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.dropdown-item-premium i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}