/* Professional Danone Sales App - Mobile First */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #00A3E0;
    --primary-dark: #0077C8;
    --secondary: #00D4AA;
    --accent: #FFB800;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --dark: #1E293B;
    --gray: #64748B;
    --light-gray: #F1F5F9;
    --border: #E2E8F0;
    --white: #FFFFFF;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--light-gray);
    color: var(--dark);
    line-height: 1.5;
    padding-bottom: 80px;
}

/* TOP HEADER */
.top-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 16px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.top-header .brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.brand-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--primary);
    font-size: 1.2em;
}

.brand-text h1 {
    font-size: 1.1em;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.brand-text p {
    font-size: 0.75em;
    opacity: 0.9;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.btn-header {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-download { background: var(--secondary); color: white; }
.btn-dummy { background: rgba(255,255,255,0.2); color: white; border: 1px solid rgba(255,255,255,0.3); }

.page-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.title-left h2 {
    font-size: 1.2em;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.title-left p {
    font-size: 0.85em;
    opacity: 0.9;
    margin-top: 2px;
}

.location-badge {
    background: rgba(255,255,255,0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* TAB NAVIGATION */
.tab-nav {
    background: white;
    padding: 12px 20px;
    display: flex;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 90px;
    z-index: 90;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: var(--light-gray);
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9em;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active {
    background: var(--primary);
    color: white;
}

.tab-btn .badge {
    background: rgba(0,0,0,0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.85em;
    margin-left: 6px;
}

.tab-btn.active .badge {
    background: rgba(255,255,255,0.3);
}

/* PRODUCT LIST */
.product-list {
    padding: 16px 20px;
}

.product-card {
    background: white;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 16px;
}

.product-image {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75em;
    font-weight: 700;
    color: white;
}

.badge-fast { background: var(--primary); }
.badge-top { background: var(--accent); }
.badge-keluarga { background: var(--secondary); }

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.product-code {
    font-size: 0.75em;
    color: var(--gray);
}

.product-name {
    font-weight: 700;
    font-size: 1em;
    color: var(--dark);
    margin-bottom: 2px;
}

.product-desc {
    font-size: 0.85em;
    color: var(--gray);
}

.product-price {
    font-weight: 800;
    font-size: 1.1em;
    color: var(--dark);
}

.product-price span {
    font-weight: 500;
    font-size: 0.85em;
    color: var(--gray);
}

.discount-info {
    background: #FFFBEB;
    border: 1px solid var(--warning);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85em;
    color: var(--warning);
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.stock-info {
    font-size: 0.9em;
    color: var(--success);
    font-weight: 600;
}

.btn-order {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9em;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s;
}

.btn-order:active { transform: scale(0.95); }

/* BOTTOM NAVIGATION */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--gray);
    font-size: 0.75em;
    font-weight: 500;
    padding: 4px 0;
    gap: 4px;
}

.nav-item i { font-size: 1.4em; }
.nav-item.active { color: var(--primary); font-weight: 600; }
.nav-item small { font-size: 0.85em; opacity: 0.8; }

/* LOGIN PAGE */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.login-card {
    background: white;
    border-radius: 24px;
    padding: 40px 24px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.login-header { text-align: center; margin-bottom: 32px; }
.login-logo { max-width: 120px; margin: 0 auto 16px; }
.login-header h1 { font-size: 1.5em; font-weight: 700; color: var(--primary-dark); margin-bottom: 4px; }
.login-header p { color: var(--gray); font-size: 0.9em; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 0.9em; }
.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1em;
    transition: all 0.3s;
}
.form-control:focus { outline: none; border-color: var(--primary); }

.btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-primary { background: var(--primary); color: white; }

.alert {
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert-error { background: #FEF2F2; color: var(--danger); border: 1px solid #FECACA; }

/* Responsive */
@media (min-width: 768px) {
    .product-list { max-width: 800px; margin: 0 auto; }
    .bottom-nav { max-width: 800px; left: 50%; transform: translateX(-50%); border-radius: 20px 20px 0 0; }
}