:root {
    --primary: #0070f3; /* Modern Tech Blue */
    --primary-hover: #0051af;
    --secondary: #f0f7ff;
    --bg-color: #ffffff;
    --card-bg: #ffffff;
    --text-color: #111111;
    --text-muted: #666666;
    --success: #0070f3;
    --danger: #ff0000;
    --border: #eaeaea;
    --sidebar-width: 260px;
    --radius: 12px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 32px;
    --spacing-xl: 64px;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

html {
    scroll-behavior: smooth;
}

/* Offset for sticky header when using anchors */
[id] {
    scroll-margin-top: 80px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 80% Layout Constraints */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 90%;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes pulse-blue {
    0% { box-shadow: 0 0 0 0 rgba(0, 112, 243, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(0, 112, 243, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 112, 243, 0); }
}

.animate-fade-in {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Typography */
h1 { font-size: 3.5rem; font-weight: 800; color: var(--primary); letter-spacing: -0.04em; line-height: 1.1; margin-bottom: var(--spacing-md); }
h2 { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: var(--spacing-md); }
h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: var(--spacing-sm); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.95rem;
}

.btn:hover { 
    background: var(--primary-hover);
    transform: translateY(-2px); 
    box-shadow: 0 10px 20px rgba(0, 112, 243, 0.2); 
}

.btn-outline { 
    background: transparent; 
    border: 1px solid var(--border); 
    color: var(--text-color); 
}

.btn-outline:hover { 
    background: var(--secondary); 
    border-color: var(--primary); 
    color: var(--primary); 
}

/* Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--spacing-lg);
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    margin-bottom: 24px; /* Added spacing between cards */
}

.card:hover { 
    border-color: var(--primary); 
    box-shadow: 0 20px 40px rgba(0,0,0,0.05); 
    transform: translateY(-5px);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

/* Navbar */
.nav-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links a.btn {
    color: #fff !important;
}

.nav-links a.btn-outline {
    color: var(--text-color) !important;
}

.nav-links a.btn-outline:hover {
    color: var(--primary) !important;
}

.nav-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
    margin: 0 8px;
}

.nav-links {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Hero Section */
.hero {
    padding: var(--spacing-xl) 0;
    text-align: center;
    background: radial-gradient(circle at top center, #f0f7ff 0%, #ffffff 100%);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

/* Sections */
section {
    padding: var(--spacing-xl) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

/* Sidebar Layout */
.layout-wrapper { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-width);
    background: #fcfcfc;
    border-right: 1px solid var(--border);
    padding: var(--spacing-lg);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar h2 { 
    color: var(--primary); 
    font-size: 1.5rem; 
    margin-bottom: var(--spacing-xl); 
    letter-spacing: -0.04em;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: var(--spacing-xl);
    width: calc(100% - var(--sidebar-width));
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.nav-link:hover, .nav-link.active { 
    background: var(--secondary); 
    color: var(--primary); 
}

.nav-link i { width: 20px; margin-right: 12px; font-size: 1.1rem; }

/* Forms */
.form-group { margin-bottom: var(--spacing-md); }
label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-color); margin-bottom: 6px; }
input, select, textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    background: #fff;
    transition: all 0.2s ease;
}

input:hover, select:hover, textarea:hover {
    border-color: var(--primary);
}

input:focus, select:focus, textarea:focus { 
    outline: none; 
    border-color: var(--primary); 
    box-shadow: 0 0 0 4px rgba(0, 112, 243, 0.1);
}

/* Tables */
table { width: 100%; border-collapse: collapse; margin-top: var(--spacing-md); }
th { text-align: left; padding: 16px; border-bottom: 2px solid var(--border); color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
td { padding: 16px; border-bottom: 1px solid var(--border); font-size: 0.95rem; }

/* Dashboard Cards (Special) */
.stat-card {
    padding: var(--spacing-lg);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin: 8px 0;
}

/* Tech Visuals */
.tech-blob {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 112, 243, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    z-index: -1;
}

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-pending { background: #e6f2ff; color: #0070f3; }
.badge-success { background: #e6fffa; color: #00b8d9; }

/* Mobile Fixes */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); position: absolute; height: auto; bottom: auto; }
    .main-content { margin-left: 0; width: 100%; padding: var(--spacing-md); }
    h1 { font-size: 2.5rem; }
    .nav-links { display: none; }
}

/* Housekeeping Scale (80%) */
.housekeeping-scale {
    zoom: 80%;
    -moz-transform: scale(0.8);
    -moz-transform-origin: top center;
    min-height: 125vh; /* Compensate for the 0.8 scale */
}

.housekeeping-scale .sidebar {
    height: 125vh; /* Full actual viewport height when scaled at 0.8 */
}

/* Order Site Scale (80% but responsive) */
.order-site-scale {
    zoom: 80%;
}

/* Landing Page Scale (80%) */
.landing-scale {
    zoom: 80%;
}

@media (max-width: 768px) {
    .order-site-scale {
        zoom: 100%; /* Back to 100% on small mobile for readability */
    }
}

/* New Order Notification */
.order-badge-red {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ff0000;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(255, 0, 0, 0.3);
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(255, 0, 0, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); }
}

/* Theme Selector Styles */
.theme-box {
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.theme-box.active {
    border-color: var(--primary);
    background: var(--secondary);
}

.theme-box i {
    font-size: 2rem;
    margin-bottom: 12px;
    color: var(--text-muted);
}

.theme-box.active i {
    color: var(--primary);
}

/* Order Site Modernization */
.product-card-modern {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card-modern:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* Category & Cart Footer Styles */
.category-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 24px;
    padding: 0 20px;
    color: var(--text-color);
    letter-spacing: -0.03em;
    border-left: 6px solid var(--primary);
    margin-top: 32px;
}

.cart-footer {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    background: var(--primary); /* Back to blue */
    color: #fff;
    padding: 20px 32px;
    border-radius: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 15px 35px rgba(0, 112, 243, 0.4);
    z-index: 1000;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-empty {
    opacity: 0.7;
    transform: translateX(-50%) translateY(10px); /* Slightly tucked away when empty */
}

.cart-footer:hover {
    transform: translateX(-50%) translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 112, 243, 0.5);
}

@keyframes pulse-blue-soft {
    0% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.05); }
    100% { transform: translateX(-50%) scale(1); }
}

@keyframes successBounce {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.success-check-anim {
    animation: successBounce 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.cart-footer i {
    font-size: 1.2rem;
    margin-right: 12px;
}

.cart-footer span {
    font-weight: 600;
    font-size: 1.05rem;
}

.cart-footer strong {
    font-size: 1.1rem;
    font-weight: 800;
}

.sticky-cat {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    z-index: 100;
    border-bottom: 1px solid var(--border);
    scrollbar-width: none;
}

.sticky-cat::-webkit-scrollbar { display: none; }

.cat-pill {
    padding: 10px 20px;
    background: var(--secondary);
    color: var(--primary);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: all 0.2s;
}

.cat-pill:hover {
    background: var(--primary);
    color: #fff;
}

/* Minimal Theme Overrides */
.theme-minimal .card { border: none; box-shadow: none; border-bottom: 1px solid var(--border); border-radius: 0; }
.theme-minimal .btn { border-radius: 4px; }

/* Classic Theme Overrides */
.theme-classic .card { border-radius: 4px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.theme-classic .btn { border-radius: 4px; background: #333; }

