:root {
    --primary: #e11d48; /* Merah Crimson sesuai logo */
    --primary-dark: #be123c;
    --primary-light: #ffe4e6;
    --secondary: #64748b;
    --dark: #1e293b;
    --light: #f8fafc;
    --white: #ffffff;
    --danger: #ef4444;
    --success: #22c55e;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: #f1f5f9;
    color: var(--dark);
    line-height: 1.5;
    overflow-x: auto;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    min-width: 0;
    padding: 20px;
    padding-bottom: 120px; /* Ditambah agar tidak tertutup bottom nav di mobile */
    transition: all 0.3s;
    scroll-behavior: smooth;
}

/* Typography */
h1, h2, h3 { color: var(--dark); font-weight: 700; }
a { text-decoration: none; color: inherit; }

/* Components */
.card {
    background: var(--white);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    border: 1px solid rgba(0,0,0,0.05);
}

.btn {
    padding: 10px 20px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { border: 2px solid var(--primary); color: var(--primary); background: transparent; }
.btn-danger { background: var(--danger); color: white; }

/* Login Page */
.login-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 20px;
}

.login-card {
    background: white;
    width: 100%;
    max-width: 400px;
    padding: 40px;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
}

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; font-size: 0.9rem; }
.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    outline: none;
    transition: border 0.2s;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }

/* Sidebar (Desktop) */
.sidebar {
    width: 260px;
    background: var(--white);
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 1200;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1150;
}

.sidebar-header { padding: 30px 20px; text-align: center; }
.sidebar-header img { width: 60px; margin-bottom: 10px; }
.sidebar-menu { flex: 1; padding: 10px; list-style: none; }
.sidebar-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 4px;
    font-weight: 500;
    color: var(--secondary);
}
.sidebar-item.active a { background: var(--primary-light); color: var(--primary-dark); }
.sidebar-item a:hover { background: #f8fafc; }

/* Bottom Nav (Mobile) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    border-top: 1px solid #e2e8f0;
    z-index: 1000;
    box-shadow: 0 -4px 6px -1px rgb(0 0 0 / 0.05);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.7rem;
    color: var(--secondary);
    gap: 4px;
}
.nav-item.active { color: var(--primary); }
.nav-item i { font-size: 1.2rem; }

/* Products Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
    cursor: pointer;
}
.product-card:active { transform: scale(0.95); }
.product-img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.product-info { padding: 12px; }
.product-name { font-weight: 600; font-size: 0.9rem; margin-bottom: 4px; }
.product-price { color: var(--primary-dark); font-weight: 700; font-size: 1rem; }

/* Badge */
.badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        display: flex;
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: min(86vw, 300px);
        transform: translateX(-105%);
        transition: transform 0.25s ease;
        box-shadow: var(--shadow-lg);
    }
    body.sidebar-open .sidebar {
        transform: translateX(0);
    }
    body.sidebar-open .sidebar-overlay {
        display: block;
    }
    body.sidebar-open { overflow: hidden; }
    .main-content { padding: 15px; padding-bottom: 100px; }
}

@media (min-width: 769px) {
    .bottom-nav { display: none; }
}
