/* ============================================================
   Smart Dashboard UMKM Umi Smoothies
   Mobile-First Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    /* Brand Colors - Umi Smoothies */
    --primary: #FF6B35;
    --primary-dark: #E55A2B;
    --primary-light: #FF8F65;
    --primary-bg: #FFF5F0;

    --secondary: #1B4965;
    --secondary-dark: #143A52;
    --secondary-light: #2D6A8F;

    --accent: #4CAF50;
    --accent-light: #E8F5E9;

    --warning: #FF9800;
    --warning-light: #FFF3E0;

    --danger: #F44336;
    --danger-light: #FFEBEE;

    --success: #4CAF50;
    --success-light: #E8F5E9;

    /* Neutral Colors */
    --bg: #F5F7FA;
    --surface: #FFFFFF;
    --surface-hover: #F8F9FA;
    --border: #E8ECF1;
    --border-light: #F0F2F5;

    --text-primary: #1A1D26;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --text-inverse: #FFFFFF;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #FF6B35 0%, #FF8F65 100%);
    --gradient-secondary: linear-gradient(135deg, #1B4965 0%, #2D6A8F 100%);
    --gradient-success: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    --gradient-warning: linear-gradient(135deg, #FF9800 0%, #FFB74D 100%);
    --gradient-danger: linear-gradient(135deg, #F44336 0%, #EF5350 100%);
    --gradient-hero: linear-gradient(135deg, #FF6B35 0%, #E55A2B 50%, #1B4965 100%);

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 10px 10px -5px rgba(0,0,0,0.03);
    --shadow-card: 0 2px 8px rgba(255,107,53,0.08);
    --shadow-float: 0 8px 32px rgba(255,107,53,0.12);

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Spacing */
    --page-padding: 20px;
    --bottom-nav-height: 72px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 400ms;
}

/* ============================================================
   Reset & Base
   ============================================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

input, select, textarea, button {
    font-family: inherit;
    font-size: inherit;
}

/* ============================================================
   Login Page
   ============================================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-hero);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.login-page::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    bottom: -80px;
    left: -80px;
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.login-card {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: 40px 32px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s var(--ease-out);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo .logo-icon {
    width: 72px;
    height: 72px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(255,107,53,0.3);
}

.login-logo .logo-icon span {
    font-size: 32px;
    color: white;
}

.login-logo h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.login-logo p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 4px;
}

.login-form .form-group {
    margin-bottom: 16px;
}

.login-form label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.login-form input[type="email"],
.login-form input[type="password"],
.login-form input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: var(--bg);
    transition: all var(--duration-fast) var(--ease-out);
    outline: none;
}

.login-form input:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(255,107,53,0.1);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(255,107,53,0.3);
    width: 100%;
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(255,107,53,0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8125rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-sm);
}

.btn-danger {
    background: var(--gradient-danger);
    color: white;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.login-footer a {
    color: var(--primary);
    font-weight: 600;
}

/* ============================================================
   Flash Messages
   ============================================================ */
.flash-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 9999;
    animation: slideDown 0.4s var(--ease-out), fadeOut 0.4s var(--ease-out) 3s forwards;
    max-width: 90vw;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.flash-success {
    background: var(--success-light);
    color: #2E7D32;
    border: 1px solid #C8E6C9;
}

.flash-error {
    background: var(--danger-light);
    color: #C62828;
    border: 1px solid #FFCDD2;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes fadeOut {
    to { opacity: 0; pointer-events: none; }
}

/* ============================================================
   App Shell - Mobile Native Layout
   ============================================================ */
.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: var(--bottom-nav-height);
}

/* Header */
.app-header {
    background: var(--surface);
    padding: 16px var(--page-padding);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-light);
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.92);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.header-greeting {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.header-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.header-avatar {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    box-shadow: 0 2px 8px rgba(255,107,53,0.2);
}

/* Page Content */
.page-content {
    flex: 1;
    padding: var(--page-padding);
}

.page-section {
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.section-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text-primary);
}

.section-action {
    font-size: 0.8125rem;
    color: var(--primary);
    font-weight: 600;
}

/* ============================================================
   Cards
   ============================================================ */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all var(--duration-normal) var(--ease-out);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 18px 16px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: all var(--duration-normal) var(--ease-out);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    border-radius: 0 0 0 60px;
    opacity: 0.1;
}

.stat-card.primary::after { background: var(--primary); }
.stat-card.secondary::after { background: var(--secondary); }
.stat-card.success::after { background: var(--success); }
.stat-card.warning::after { background: var(--warning); }

.stat-card .stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 1.25rem;
}

.stat-card.primary .stat-icon {
    background: var(--primary-bg);
    color: var(--primary);
}
.stat-card.secondary .stat-icon {
    background: #E3F2FD;
    color: var(--secondary);
}
.stat-card.success .stat-icon {
    background: var(--success-light);
    color: var(--success);
}
.stat-card.warning .stat-icon {
    background: var(--warning-light);
    color: var(--warning);
}

.stat-card .stat-value {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 2px;
}

.stat-card .stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============================================================
   Bottom Navigation
   ============================================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: var(--surface);
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    transition: all var(--duration-fast) var(--ease-out);
    position: relative;
    min-width: 56px;
    cursor: pointer;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item:not(.active) {
    color: var(--text-muted);
}

.nav-item .nav-icon {
    font-size: 1.375rem;
    line-height: 1;
    transition: transform var(--duration-fast) var(--ease-out);
}

.nav-item.active .nav-icon {
    transform: scale(1.1);
}

.nav-item .nav-label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--primary);
    border-radius: 0 0 3px 3px;
}

.nav-item-add {
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
    box-shadow: 0 4px 16px rgba(255,107,53,0.35);
    margin-top: -24px;
    border: 4px solid white;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.nav-item-add:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255,107,53,0.45);
}

.nav-item-add:active {
    transform: scale(0.95);
}

/* ============================================================
   Charts Area
   ============================================================ */
.chart-container {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--border-light);
    margin-bottom: 16px;
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.chart-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary);
}

.chart-filter {
    display: flex;
    gap: 4px;
    background: var(--bg);
    padding: 3px;
    border-radius: var(--radius-sm);
}

.chart-filter-btn {
    padding: 6px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.chart-filter-btn.active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.chart-wrapper {
    height: 220px;
    position: relative;
}

/* ============================================================
   Transaction List
   ============================================================ */
.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    transition: all var(--duration-fast) var(--ease-out);
    cursor: pointer;
}

.transaction-item:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-card);
}

.transaction-item:active {
    transform: scale(0.98);
}

.transaction-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.transaction-icon.tunai { background: var(--accent-light); color: var(--accent); }
.transaction-icon.qris { background: #E3F2FD; color: #1976D2; }
.transaction-icon.transfer { background: #F3E5F5; color: #7B1FA2; }
.transaction-icon.ewallet { background: #FFF3E0; color: #F57C00; }

.transaction-info {
    flex: 1;
    min-width: 0;
}

.transaction-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.transaction-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.transaction-amount {
    text-align: right;
    flex-shrink: 0;
}

.transaction-total {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary);
}

.transaction-status {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    margin-top: 2px;
    display: inline-block;
}

.transaction-status.selesai {
    background: var(--success-light);
    color: #2E7D32;
}

.transaction-status.dibatalkan {
    background: var(--danger-light);
    color: #C62828;
}

/* ============================================================
   Product Grid
   ============================================================ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.product-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: all var(--duration-normal) var(--ease-out);
    cursor: pointer;
}

.product-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.product-card:active {
    transform: scale(0.98);
}

.product-img {
    width: 100%;
    height: 150px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    position: relative;
}

.product-img .product-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 700;
    color: white;
}

.product-info {
    padding: 10px 10px;
}

.product-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-category {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.product-price {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.9375rem;
    font-weight: 800;
    color: var(--primary);
}

.product-stock {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ============================================================
   POS (Point of Sale) - Transaksi Baru
   ============================================================ */
.pos-layout {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--bottom-nav-height));
}

.pos-products {
    padding: var(--page-padding);
    padding-bottom: 200px;
}

.pos-category-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.pos-category-scroll::-webkit-scrollbar {
    display: none;
}

.pos-category-chip {
    padding: 8px 18px;
    border-radius: var(--radius-full);
    border: 2px solid var(--border);
    background: var(--surface);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.pos-category-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pos-product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.pos-product-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 12px 10px;
    text-align: center;
    border: 2px solid var(--border-light);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.pos-product-card:hover {
    border-color: var(--primary-light);
}

.pos-product-card:active {
    transform: scale(0.95);
    background: var(--primary-bg);
    border-color: var(--primary);
}

.pos-product-card .pos-product-emoji {
    font-size: 1.75rem;
    margin-bottom: 6px;
}

.pos-product-card .pos-product-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 4px;
}

.pos-product-card .pos-product-price {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--primary);
}

/* POS Cart Bar */
.pos-cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 16px var(--page-padding);
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0));
    z-index: 500;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.08);
}

.cart-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.cart-count {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-badge {
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 700;
}

.cart-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.cart-total {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
}

.pos-cart-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.pos-cart-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

.pos-cart-item:last-child {
    border-bottom: none;
}

.pos-cart-item .item-name {
    flex: 1;
    font-size: 0.8125rem;
    font-weight: 500;
}

.pos-cart-item .item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pos-cart-item .qty-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--duration-fast);
}

.pos-cart-item .qty-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pos-cart-item .qty-num {
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.pos-cart-item .item-price {
    font-weight: 600;
    font-size: 0.8125rem;
    min-width: 70px;
    text-align: right;
}

/* ============================================================
   Forms
   ============================================================ */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: var(--surface);
    transition: all var(--duration-fast) var(--ease-out);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255,107,53,0.1);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============================================================
   Tables
   ============================================================ */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.data-table th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    background: var(--bg);
    white-space: nowrap;
}

.data-table td {
    padding: 12px 14px;
    border-top: 1px solid var(--border-light);
    color: var(--text-primary);
}

.data-table tbody tr {
    transition: background var(--duration-fast);
}

.data-table tbody tr:hover {
    background: var(--surface-hover);
}

/* ============================================================
   Badges
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-primary { background: var(--primary-bg); color: var(--primary); }
.badge-success { background: var(--success-light); color: #2E7D32; }
.badge-warning { background: var(--warning-light); color: #E65100; }
.badge-danger { background: var(--danger-light); color: #C62828; }
.badge-info { background: #E3F2FD; color: #1565C0; }

/* ============================================================
   Empty State
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ============================================================
   Search Bar
   ============================================================ */
.search-bar {
    position: relative;
    margin-bottom: 16px;
}

.search-bar input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 2px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.9375rem;
    background: var(--surface);
    outline: none;
    transition: all var(--duration-fast);
}

.search-bar input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255,107,53,0.08);
}

.search-bar .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.125rem;
}

/* ============================================================
   Modal / Overlay
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: none;
    align-items: flex-end;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-overlay.show {
    display: flex;
}

.modal-sheet {
    background: var(--surface);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 24px;
    animation: slideUpSheet 0.4s var(--ease-out);
}

@keyframes slideUpSheet {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-handle {
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 auto 20px;
}

.modal-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 20px;
}

/* ============================================================
   Filter Chips
   ============================================================ */
.filter-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.filter-row::-webkit-scrollbar { display: none; }

.filter-chip {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--border);
    background: var(--surface);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    cursor: pointer;
    transition: all var(--duration-fast);
    text-decoration: none;
}

.filter-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ============================================================
   Report Section
   ============================================================ */
.report-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.summary-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 16px;
    border: 1px solid var(--border-light);
}

.summary-card .summary-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 6px;
}

.summary-card .summary-value {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--text-primary);
}

/* ============================================================
   Utilities
   ============================================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.8125rem; }
.text-xs { font-size: 0.75rem; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 800; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.gap-2 { gap: 8px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }

/* ============================================================
   Loading skeleton
   ============================================================ */
.skeleton {
    background: linear-gradient(90deg, var(--bg) 25%, #E8ECF1 50%, var(--bg) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================================
   Settings Page
   ============================================================ */
.settings-section {
    margin-bottom: 24px;
}

.settings-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
    padding-left: 4px;
}

.settings-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.settings-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background var(--duration-fast);
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item:hover {
    background: var(--surface-hover);
}

.settings-item .settings-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    background: var(--bg);
    color: var(--text-secondary);
}

.settings-item .settings-text {
    flex: 1;
}

.settings-item .settings-text h4 {
    font-size: 0.9375rem;
    font-weight: 600;
}

.settings-item .settings-text p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.settings-item .settings-arrow {
    color: var(--text-muted);
    font-size: 1.125rem;
}

/* ============================================================
   Detail Transaksi
   ============================================================ */
.detail-header {
    background: var(--gradient-primary);
    color: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    text-align: center;
}

.detail-header .detail-code {
    font-size: 0.8125rem;
    opacity: 0.85;
    margin-bottom: 4px;
}

.detail-header .detail-total {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 2rem;
    font-weight: 800;
}

.detail-header .detail-date {
    font-size: 0.8125rem;
    opacity: 0.8;
    margin-top: 4px;
}

.detail-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.detail-info-item {
    padding: 14px;
    background: var(--bg);
    border-radius: var(--radius-md);
}

.detail-info-item .info-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 4px;
}

.detail-info-item .info-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ============================================================
   Animations
   ============================================================ */
.fade-in {
    animation: fadeIn 0.5s var(--ease-out);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-in {
    animation: slideIn 0.4s var(--ease-out);
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Responsive - Tablet & Desktop
   ============================================================ */

/* --- Tablet (768px+) --- */
@media (min-width: 768px) {
    :root {
        --page-padding: 28px;
        --bottom-nav-height: 72px;
    }

    body {
        font-size: 16.5px;
    }

    /* Bottom nav - stay at bottom, wider on tablet */
    .bottom-nav {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        border: 1px solid var(--border-light);
        border-bottom: none;
    }

    .nav-item {
        padding: 10px 16px;
    }

    .nav-item .nav-icon {
        font-size: 1.5rem;
    }

    .nav-item .nav-label {
        font-size: 0.75rem;
    }

    .nav-item-add {
        width: 52px;
        height: 52px;
        font-size: 1.625rem;
    }

    /* App shell - no sidebar padding */
    .app-shell {
        padding-bottom: var(--bottom-nav-height);
        padding-left: 0;
    }

    .app-header {
        padding: 20px var(--page-padding);
    }

    .header-greeting {
        font-size: 0.9375rem;
    }

    .header-title {
        font-size: 1.625rem;
    }

    .header-avatar {
        width: 48px;
        height: 48px;
        font-size: 1rem;
    }

    /* Page content */
    .page-content {
        padding: var(--page-padding);
        max-width: 960px;
        margin: 0 auto;
    }

    .section-title {
        font-size: 1.25rem;
    }

    /* Cards bigger */
    .card {
        padding: 24px;
        border-radius: var(--radius-xl);
    }

    /* Stats grid - 4 columns */
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }

    .stat-card {
        padding: 22px 20px;
    }

    .stat-card .stat-value {
        font-size: 1.5rem;
    }

    /* Product grid - 3 columns */
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .product-img {
        height: 170px;
    }

    .product-info {
        padding: 12px 12px;
    }

    .product-name {
        font-size: 0.875rem;
    }

    .product-price {
        font-size: 1rem;
    }

    /* POS layout - side by side */
    .pos-layout {
        flex-direction: row;
        min-height: calc(100vh - var(--bottom-nav-height));
    }

    .pos-products {
        flex: 1;
        padding-bottom: 24px;
    }

    .pos-product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }

    .pos-product-card {
        padding: 16px 12px;
    }

    .pos-product-card .pos-product-emoji {
        font-size: 2rem;
    }

    .pos-product-card .pos-product-name {
        font-size: 0.8125rem;
    }

    .pos-product-card .pos-product-price {
        font-size: 0.875rem;
    }

    /* POS cart - right panel */
    .pos-cart-bar {
        position: sticky;
        top: 0;
        right: 0;
        bottom: auto;
        left: auto;
        width: 340px;
        max-height: 100vh;
        overflow-y: auto;
        border-top: none;
        border-left: 1px solid var(--border);
        border-radius: 0;
        padding: 24px;
        box-shadow: -4px 0 20px rgba(0,0,0,0.04);
    }

    /* Transaction list */
    .transaction-item {
        padding: 16px 14px;
    }

    .transaction-name {
        font-size: 0.9375rem;
    }

    .transaction-total {
        font-size: 1rem;
    }

    /* Form controls bigger */
    .form-control {
        padding: 14px 18px;
        font-size: 1rem;
    }

    .btn {
        padding: 16px 28px;
        font-size: 1rem;
    }

    /* Modal wider */
    .modal-sheet {
        max-width: 480px;
        margin: 0 auto;
        padding: 28px;
    }

    /* Login wider */
    .login-card {
        max-width: 440px;
        padding: 40px;
    }

    .login-logo h1 {
        font-size: 1.75rem;
    }

    /* Summary cards */
    .summary-card {
        padding: 20px;
    }

    .summary-value {
        font-size: 1.25rem;
    }

    /* Detail page */
    .detail-header {
        padding: 28px;
    }

    .detail-info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    /* Chart area */
    .chart-container {
        padding: 24px;
    }

    /* Scrollbar */
    ::-webkit-scrollbar {
        width: 6px;
    }
}

/* --- Large Tablet / Desktop (1024px+) --- */
@media (min-width: 1024px) {
    :root {
        --page-padding: 36px;
        --bottom-nav-height: 72px;
    }

    body {
        font-size: 17px;
    }

    .bottom-nav {
        max-width: 520px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        border: 1px solid var(--border-light);
        border-bottom: none;
    }

    .nav-item .nav-icon {
        font-size: 1.625rem;
    }

    .nav-item .nav-label {
        font-size: 0.8125rem;
    }

    .page-content {
        max-width: 1100px;
    }

    .section-title {
        font-size: 1.375rem;
    }

    .stats-grid {
        gap: 20px;
    }

    .stat-card .stat-value {
        font-size: 1.625rem;
    }

    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }

    .pos-product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }

    .pos-cart-bar {
        width: 380px;
        padding: 28px;
    }

    .transaction-name {
        font-size: 1rem;
    }

    .transaction-total {
        font-size: 1.125rem;
    }

    .detail-info-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================================
   Scrollbar Styling
   ============================================================ */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================================
   Smart Dashboard Umi Smoothies - Mobile Native UI
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Brand */
    --primary: #FF6B35;
    --primary-dark: #E85A28;
    --primary-light: #FFF0E8;
    --primary-gradient: linear-gradient(135deg, #FF6B35 0%, #FF8F65 100%);
    --primary-gradient-dark: linear-gradient(135deg, #E85A28 0%, #FF6B35 100%);

    --secondary: #1B4965;
    --secondary-light: #E8F4FD;

    --success: #10B981;
    --success-light: #ECFDF5;
    --warning: #F59E0B;
    --warning-light: #FFFBEB;
    --danger: #EF4444;
    --danger-light: #FEF2F2;

    /* Neutral */
    --bg: #F8FAFC;
    --surface: #FFFFFF;
    --surface-2: #F1F5F9;
    --border: #E2E8F0;
    --border-light: #F1F5F9;

    --text-primary: #0F172A;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --shadow-card: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-float: 0 8px 32px rgba(255,107,53,0.2);

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Transition */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   Bottom Navigation
   ============================================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 6px 0 env(safe-area-inset-bottom, 8px);
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255,255,255,0.92);
    box-shadow: 0 -2px 20px rgba(0,0,0,0.05);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 16px;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all 0.2s var(--ease);
    position: relative;
    min-width: 56px;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--primary);
    border-radius: 0 0 4px 4px;
}

.nav-item .material-icons-round {
    font-size: 22px;
    transition: transform 0.2s var(--ease-bounce);
}

.nav-item.active .material-icons-round {
    transform: scale(1.1);
}

/* FAB Button */
.nav-item-add {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    margin-top: -24px;
    box-shadow: var(--shadow-float);
    transition: all 0.2s var(--ease);
    border: 3px solid var(--surface);
}

.nav-item-add:active {
    transform: scale(0.92);
}

.nav-item-add .material-icons-round {
    font-size: 24px;
}

/* ============================================================
   App Layout
   ============================================================ */
.app-shell {
    padding-bottom: 80px;
    min-height: 100vh;
    min-height: 100dvh;
}

.page-content {
    padding: 16px;
    padding-bottom: 100px;
}

.page-section {
    margin-bottom: 24px;
}

/* ============================================================
   Header
   ============================================================ */
.app-header {
    background: var(--surface);
    padding: 16px;
    padding-top: max(16px, env(safe-area-inset-top));
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255,255,255,0.92);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-greeting {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 500;
}

.header-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

/* ============================================================
   Section Headers
   ============================================================ */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.section-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.section-action {
    font-size: 0.8125rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* ============================================================
   Cards
   ============================================================ */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
}

/* Stat Cards */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 16px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-card);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.stat-card.primary::before { background: var(--primary-gradient); }
.stat-card.secondary::before { background: linear-gradient(135deg, #1B4965, #2D6A8F); }
.stat-card.success::before { background: linear-gradient(135deg, #10B981, #34D399); }
.stat-card.warning::before { background: linear-gradient(135deg, #F59E0B, #FBBF24); }

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.stat-icon .material-icons-round { font-size: 20px; }

.stat-card.primary .stat-icon { background: var(--primary-light); color: var(--primary); }
.stat-card.secondary .stat-icon { background: var(--secondary-light); color: var(--secondary); }
.stat-card.success .stat-icon { background: var(--success-light); color: var(--success); }
.stat-card.warning .stat-icon { background: var(--warning-light); color: var(--warning); }

.stat-value {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 4px;
}

/* ============================================================
   Chart Container
   ============================================================ */
.chart-container {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.chart-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary);
}

.chart-wrapper {
    position: relative;
    height: 200px;
}

/* Chart Filter */
.chart-filter {
    display: flex;
    background: var(--surface-2);
    border-radius: var(--radius-full);
    padding: 3px;
}

.chart-filter-btn {
    padding: 4px 10px;
    border: none;
    background: transparent;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.chart-filter-btn.active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* ============================================================
   Transaction List
   ============================================================ */
.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s var(--ease);
}

.transaction-item:active {
    transform: scale(0.98);
    background: var(--surface-2);
}

.transaction-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.transaction-icon .material-icons-round { font-size: 20px; }

.transaction-icon.tunai { background: var(--success-light); color: var(--success); }
.transaction-icon.qris { background: var(--secondary-light); color: var(--secondary); }
.transaction-icon.transfer { background: #F3E8FF; color: #7C3AED; }
.transaction-icon.ewallet { background: var(--warning-light); color: var(--warning); }

.transaction-info { flex: 1; min-width: 0; }

.transaction-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.transaction-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.transaction-amount { text-align: right; flex-shrink: 0; }

.transaction-total {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
}

.transaction-status {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    margin-top: 2px;
}

.transaction-status.selesai { background: var(--success-light); color: var(--success); }
.transaction-status.dibatalkan { background: var(--danger-light); color: var(--danger); }

/* ============================================================
   Product Grid
   ============================================================ */
.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.product-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-card);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s var(--ease);
}

.product-card:active { transform: scale(0.97); }

.product-img {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    position: relative;
}

.product-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.625rem;
    font-weight: 600;
    color: white;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
}

.product-info { padding: 12px; }

.product-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-category {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.product-price {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 8px;
}

.product-stock {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ============================================================
   POS Interface
   ============================================================ */
.pos-layout {
    padding-bottom: 120px;
}

.pos-product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.pos-product-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 12px 8px;
    text-align: center;
    border: 1.5px solid var(--border-light);
    cursor: pointer;
    transition: all 0.15s var(--ease);
}

.pos-product-card:active {
    transform: scale(0.95);
    border-color: var(--primary);
    background: var(--primary-light);
}

.pos-product-emoji {
    font-size: 1.75rem;
    margin-bottom: 4px;
}

.pos-product-name {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pos-product-price {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
}

/* Cart Bar */
.pos-cart-bar {
    position: fixed;
    bottom: 72px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 12px 16px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    z-index: 90;
}

.cart-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.cart-count {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.cart-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.cart-total {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
}

.pos-cart-list {
    max-height: 160px;
    overflow-y: auto;
    margin-bottom: 12px;
    padding-right: 4px;
}

.pos-cart-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

.pos-cart-item:last-child { border-bottom: none; }

.pos-cart-item .item-name {
    flex: 1;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pos-cart-item .item-qty {
    display: flex;
    align-items: center;
    gap: 6px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s var(--ease);
    color: var(--text-secondary);
}

.qty-btn:active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.qty-num {
    font-weight: 700;
    font-size: 0.875rem;
    min-width: 20px;
    text-align: center;
}

.item-price {
    font-weight: 600;
    font-size: 0.8125rem;
    min-width: 65px;
    text-align: right;
    color: var(--text-primary);
}

/* ============================================================
   Category Filter Chips
   ============================================================ */
.pos-category-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 12px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.pos-category-scroll::-webkit-scrollbar { display: none; }

.pos-category-chip {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--border);
    background: var(--surface);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.pos-category-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    border: none;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(255,107,53,0.25);
}

.btn-primary:active {
    box-shadow: 0 2px 6px rgba(255,107,53,0.2);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 1.5px solid var(--border);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8125rem;
}

.btn-block { width: 100%; }

/* ============================================================
   Forms
   ============================================================ */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background: var(--surface);
    transition: all 0.2s var(--ease);
    outline: none;
    -webkit-appearance: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,107,53,0.1);
}

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394A3B8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-hint {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============================================================
   Search
   ============================================================ */
.search-bar {
    position: relative;
    margin-bottom: 12px;
}

.search-bar input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    background: var(--surface);
    outline: none;
    transition: all 0.2s var(--ease);
}

.search-bar input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,107,53,0.08);
}

.search-bar .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--text-muted);
}

/* ============================================================
   Filter Chips
   ============================================================ */
.filter-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0 8px;
    scrollbar-width: none;
}

.filter-row::-webkit-scrollbar { display: none; }

.filter-chip {
    padding: 8px 14px;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--border);
    background: var(--surface);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    text-decoration: none;
}

.filter-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ============================================================
   Badges
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 600;
}

.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger { background: var(--danger-light); color: var(--danger); }

/* ============================================================
   Report Summary
   ============================================================ */
.report-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.summary-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 14px;
    border: 1px solid var(--border-light);
}

.summary-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 4px;
}

.summary-value {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ============================================================
   Detail Page
   ============================================================ */
.detail-header {
    background: var(--primary-gradient);
    color: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    margin-bottom: 16px;
}

.detail-code {
    font-size: 0.8125rem;
    opacity: 0.8;
    margin-bottom: 4px;
}

.detail-total {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
}

.detail-date {
    font-size: 0.8125rem;
    opacity: 0.8;
    margin-top: 4px;
}

.detail-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.detail-info-item {
    padding: 12px;
    background: var(--surface-2);
    border-radius: var(--radius-md);
}

.detail-info-item .info-label {
    font-size: 0.625rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.detail-info-item .info-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ============================================================
   Modal
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    display: none;
    align-items: flex-end;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-overlay.show {
    display: flex;
}

.modal-sheet {
    background: var(--surface);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 24px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0));
    animation: slideUpSheet 0.3s var(--ease);
}

@keyframes slideUpSheet {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-handle {
    width: 36px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 auto 16px;
}

.modal-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.0625rem;
    font-weight: 700;
    margin-bottom: 20px;
}

/* ============================================================
   Flash Messages
   ============================================================ */
.flash-message {
    position: fixed;
    top: 16px;
    left: 16px;
    right: 16px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 300;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideDown 0.3s var(--ease);
    box-shadow: var(--shadow-lg);
}

.flash-success {
    background: var(--success);
    color: white;
}

.flash-error {
    background: var(--danger);
    color: white;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ============================================================
   Empty State
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.empty-state h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.empty-state p {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* ============================================================
   Settings
   ============================================================ */
.settings-section {
    margin-bottom: 24px;
}

.settings-section-title {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}

.settings-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.settings-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background 0.15s var(--ease);
}

.settings-item:last-child { border-bottom: none; }
.settings-item:active { background: var(--surface-2); }

.settings-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    color: var(--text-secondary);
}

.settings-text {
    flex: 1;
}

.settings-text h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.settings-text p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 1px;
}

.settings-arrow {
    color: var(--text-muted);
}

/* ============================================================
   Animations
   ============================================================ */
.slide-in {
    animation: slideIn 0.3s var(--ease);
}

@keyframes slideIn {
    from { transform: translateY(12px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ============================================================
   Scrollbar
   ============================================================ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ============================================================
   Metode Bayar Radio
   ============================================================ */
.metode-option {
    cursor: pointer;
    transition: all 0.15s var(--ease);
}

.metode-option:active {
    transform: scale(0.97);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (min-width: 768px) {
    .page-content {
        max-width: 600px;
        margin: 0 auto;
    }
    .bottom-nav {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
    .pos-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}
