:root {
    /* Color Palette */
    --bg-dark: #0f1319;
    --card-bg: #1a1e24;
    --card-bg-light: #242930;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    
    --color-green: #22c55e;
    --color-green-light: rgba(34, 197, 94, 0.15);
    
    --color-blue: #3b82f6;
    --color-blue-light: rgba(59, 130, 246, 0.15);
    
    --color-red: #ef4444;
    --color-red-light: rgba(239, 68, 68, 0.15);
    
    --color-orange: #f97316;
    
    --border-color: #2e3640;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #000;
    display: flex;
    justify-content: center;
    color: var(--text-primary);
}

/* App Container Simulating Mobile Device */
.app-container {
    width: 100%;
    max-width: 414px; /* Mobile width */
    height: 100vh;
    background-color: var(--bg-dark);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: var(--bg-dark);
    z-index: 10;
}
.header-left { display: flex; align-items: center; gap: 12px; }
.logo-circle {
    width: 40px; height: 40px;
    background-color: #ffffff;
    color: var(--color-blue);
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-size: 20px; font-weight: bold;
}
.brand-info h1 { font-size: 16px; font-weight: 600; }
.brand-info p { font-size: 12px; color: var(--text-secondary); }
.header-right { font-size: 20px; color: var(--text-secondary); }

/* Main Content Area */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px;
    padding-bottom: 20px;
}
.main-content::-webkit-scrollbar { display: none; } /* Hide scrollbar */

/* Utility Classes */
.text-green { color: var(--color-green); }
.text-blue { color: var(--color-blue); }
.text-red { color: var(--color-red); }
.text-orange { color: var(--color-orange); }
.text-muted { color: var(--text-secondary); }
.text-light { color: var(--text-primary); }
.text-xs { font-size: 11px; }
.text-sm { font-size: 13px; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Grid Layouts */
.grid-3-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 12px 8px;
    border: 1px solid var(--border-color);
}
.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.stat-card-horizontal {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 12px;
}

/* Icons */
.icon-box {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex; justify-content: center; align-items: center;
    font-size: 14px;
}
.icon-green { color: var(--color-green); border: 1px solid var(--color-green); }
.icon-blue { color: var(--color-blue); border: 1px solid var(--color-blue); }
.icon-red { color: var(--color-red); border: 1px solid var(--color-red); }

.icon-blue-solid { background-color: var(--color-blue); color: white; }
.icon-orange-solid { background-color: var(--color-orange); color: white; }
.icon-red-solid { background-color: var(--color-red); color: white; }

.icon-green-outline { color: var(--color-green); background-color: var(--color-green-light); }
.icon-red-outline { color: var(--color-red); background-color: var(--color-red-light); }

.icon-green-bg { background-color: var(--color-green-light); color: var(--color-green); border-radius: 50%; }
.icon-red-bg { background-color: var(--color-red-light); color: var(--color-red); border-radius: 50%; }
.icon-dark-bg { background-color: var(--card-bg-light); color: var(--text-primary); border-radius: 50%; }

/* Transaction Section */
.section-header {
    display: flex; justify-content: space-between; align-items: center;
    margin: 20px 0 10px 0;
}
.section-header h2 { font-size: 14px; font-weight: 600; }
.section-header a { text-decoration: none; }

.transaction-list {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 10px 15px;
}
.transaction-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}
.transaction-item:last-child { border-bottom: none; }
.trans-left { display: flex; align-items: center; gap: 12px; }
.trans-left h4 { font-size: 14px; font-weight: 500; }

/* Table Section */
.data-table-section { margin-top: 15px; }
.table-container {
    display: flex;
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
}
.table-tabs {
    display: flex;
    flex-direction: column;
    background-color: #15191e;
    border-right: 1px solid var(--border-color);
}
.tab {
    padding: 20px 10px;
    background: none; border: none; color: var(--text-secondary);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    cursor: pointer;
    font-size: 12px;
}
.tab.active {
    background-color: var(--color-green-light);
    color: var(--color-green);
    border-left: 2px solid var(--color-green);
}
.table-wrapper { flex: 1; padding: 10px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { text-align: left; color: var(--text-primary); padding-bottom: 10px; font-weight: 500;}
td { padding: 8px 0; color: var(--text-secondary); border-bottom: 1px solid rgba(255,255,255,0.05); }
tfoot td { padding-top: 15px; font-weight: 600; border-bottom: none; }

/* FAB */
.fab {
    position: absolute;
    bottom: 80px; right: 20px;
    width: 56px; height: 56px;
    background-color: var(--color-blue); color: white;
    border: none; border-radius: 50%;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    cursor: pointer; z-index: 20;
}

/* Bottom Nav */
.bottom-nav {
    position: absolute;
    bottom: 0; width: 100%; height: 65px;
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    display: flex; justify-content: space-around; align-items: center;
    z-index: 10;
}
.nav-item {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    text-decoration: none; color: var(--text-secondary); font-size: 10px;
}
.nav-item i { font-size: 18px; }
.nav-item.active { color: var(--color-blue); }

/* Modal / Bottom Sheet */
.modal-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 50;
    display: flex; align-items: flex-end;
    opacity: 0; visibility: hidden;
    transition: all 0.3s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.bottom-sheet {
    width: 100%; height: 80%;
    background-color: var(--card-bg);
    border-radius: 20px 20px 0 0;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    display: flex; flex-direction: column; gap: 15px;
}
.modal-overlay.active .bottom-sheet { transform: translateY(0); }

.sheet-header { display: flex; justify-content: space-between; align-items: center; }
.close-btn {
    background-color: var(--card-bg-light); color: var(--text-secondary);
    border: none; width: 30px; height: 30px; border-radius: 50%;
    cursor: pointer;
}

.search-bar {
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px; padding: 10px 15px;
    display: flex; align-items: center; gap: 10px; color: var(--text-secondary);
}
.search-bar input {
    background: none; border: none; color: white; width: 100%; outline: none;
}

.action-buttons { display: flex; gap: 10px; }
.action-buttons button {
    flex: 1; padding: 12px; border-radius: 8px; border: none;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    color: white; cursor: pointer; text-align: left;
}
.btn-cash-in { background-color: var(--color-green-light); border: 1px solid var(--color-green) !important; color: var(--color-green) !important; }
.btn-cash-out { background-color: var(--color-red-light); border: 1px solid var(--color-red) !important; color: var(--color-red) !important; }

.product-list-section { flex: 1; overflow-y: auto; margin-top: 10px;}
.product-list-section h4 { font-size: 14px; margin-bottom: 10px; }
.modal-product-list { display: flex; flex-direction: column; gap: 10px; }
.modal-product-item {
    display: flex; align-items: center; gap: 12px;
    background-color: var(--bg-dark); padding: 12px; border-radius: 8px;
}
.prod-num {
    width: 25px; height: 25px; background-color: var(--card-bg-light);
    border-radius: 50%; display: flex; justify-content: center; align-items: center;
    font-size: 12px; color: var(--text-secondary);
}
.prod-details { flex: 1; }
.custom-checkbox { width: 20px; height: 20px; accent-color: var(--color-blue); }

:root {
    /* Color Palette */
    --bg-dark: #0f1319;
    --card-bg: #1a1e24;
    --card-bg-light: #242930;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    
    --color-green: #22c55e;
    --color-green-light: rgba(34, 197, 94, 0.15);
    
    --color-blue: #3b82f6;
    --color-blue-light: rgba(59, 130, 246, 0.15);
    
    --color-red: #ef4444;
    --color-red-light: rgba(239, 68, 68, 0.15);
    
    --color-orange: #f97316;
    --border-color: #2e3640;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }

body { background-color: #000; display: flex; justify-content: center; color: var(--text-primary); }

.app-container {
    width: 100%; max-width: 414px; height: 100vh;
    background-color: var(--bg-dark); position: relative;
    overflow: hidden; display: flex; flex-direction: column;
}

/* Header & Main Area */
.app-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; background-color: var(--bg-dark); z-index: 10; }
.header-left { display: flex; align-items: center; gap: 12px; }
.logo-circle { width: 40px; height: 40px; background-color: #ffffff; color: var(--color-blue); border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 20px; font-weight: bold; }
.brand-info h1 { font-size: 16px; font-weight: 600; }
.brand-info p { font-size: 12px; color: var(--text-secondary); }
.header-right { font-size: 20px; color: var(--text-secondary); }

.main-content { flex: 1; overflow-y: auto; padding: 0 16px; padding-bottom: 20px; }
.main-content::-webkit-scrollbar { display: none; }

/* Utilities */
.text-green { color: var(--color-green); }
.text-blue { color: var(--color-blue); }
.text-red { color: var(--color-red); }
.text-orange { color: var(--color-orange); }
.text-muted { color: var(--text-secondary); }
.text-light { color: var(--text-primary); }
.text-xs { font-size: 11px; }
.text-sm { font-size: 13px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.d-none { display: none !important; }

/* Grids & Cards */
.grid-3-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 15px; }
.card { background-color: var(--card-bg); border-radius: 12px; padding: 12px 8px; border: 1px solid var(--border-color); }
.stat-card { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.stat-card-horizontal { display: flex; flex-direction: column; align-items: flex-start; padding: 12px; }

/* Icons */
.icon-box { width: 32px; height: 32px; border-radius: 8px; display: flex; justify-content: center; align-items: center; font-size: 14px; }
.icon-green { color: var(--color-green); border: 1px solid var(--color-green); }
.icon-blue { color: var(--color-blue); border: 1px solid var(--color-blue); }
.icon-red { color: var(--color-red); border: 1px solid var(--color-red); }
.icon-blue-solid { background-color: var(--color-blue); color: white; }
.icon-orange-solid { background-color: var(--color-orange); color: white; }
.icon-red-solid { background-color: var(--color-red); color: white; }
.icon-green-outline { color: var(--color-green); background-color: var(--color-green-light); }
.icon-red-outline { color: var(--color-red); background-color: var(--color-red-light); }
.icon-green-bg { background-color: var(--color-green-light); color: var(--color-green); border-radius: 50%; }
.icon-red-bg { background-color: var(--color-red-light); color: var(--color-red); border-radius: 50%; }
.icon-dark-bg { background-color: var(--card-bg-light); color: var(--text-primary); border-radius: 50%; }

/* Transaction Section */
.section-header { display: flex; justify-content: space-between; align-items: center; margin: 20px 0 10px 0; }
.section-header h2 { font-size: 14px; font-weight: 600; }
.section-header a { text-decoration: none; }
.transaction-list { background-color: var(--card-bg); border-radius: 12px; padding: 10px 15px; }
.transaction-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border-color); }
.transaction-item:last-child { border-bottom: none; }
.trans-left { display: flex; align-items: center; gap: 12px; }
.trans-left h4 { font-size: 14px; font-weight: 500; }

/* Table Section */
.data-table-section { margin-top: 15px; }
.table-container { display: flex; background-color: var(--card-bg); border-radius: 12px; overflow: hidden; }
.table-tabs { display: flex; flex-direction: column; background-color: #15191e; border-right: 1px solid var(--border-color); }
.tab { padding: 20px 10px; background: none; border: none; color: var(--text-secondary); writing-mode: vertical-rl; transform: rotate(180deg); cursor: pointer; font-size: 12px; }
.tab.active { background-color: var(--color-green-light); color: var(--color-green); border-left: 2px solid var(--color-green); }
.table-wrapper { flex: 1; padding: 10px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { text-align: left; color: var(--text-primary); padding-bottom: 10px; font-weight: 500;}
td { padding: 8px 0; color: var(--text-secondary); border-bottom: 1px solid rgba(255,255,255,0.05); }
tfoot td { padding-top: 15px; font-weight: 600; border-bottom: none; }

/* Navigation & FAB */
.fab { position: absolute; bottom: 80px; right: 20px; width: 56px; height: 56px; background-color: var(--color-blue); color: white; border: none; border-radius: 50%; font-size: 24px; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4); cursor: pointer; z-index: 20; }
.bottom-nav { position: absolute; bottom: 0; width: 100%; height: 65px; background-color: var(--card-bg); border-top: 1px solid var(--border-color); display: flex; justify-content: space-around; align-items: center; z-index: 10; }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--text-secondary); font-size: 10px; }
.nav-item i { font-size: 18px; }
.nav-item.active { color: var(--color-blue); }

/* Bottom Sheet Modal */
.modal-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.7); z-index: 50; display: flex; align-items: flex-end; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.bottom-sheet { width: 100%; height: 90%; background-color: var(--card-bg); border-radius: 20px 20px 0 0; padding: 20px; transform: translateY(100%); transition: transform 0.3s ease; display: flex; flex-direction: column; }
.modal-overlay.active .bottom-sheet { transform: translateY(0); }

/* Modal Views */
.modal-view { display: flex; flex-direction: column; gap: 15px; height: 100%; }
.sheet-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.header-with-back { display: flex; align-items: center; gap: 15px; }
.back-btn { background: none; border: none; color: var(--text-primary); font-size: 18px; cursor: pointer; }
.close-btn { background-color: var(--card-bg-light); color: var(--text-secondary); border: none; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; }

/* View 1: Elements */
.search-bar { background-color: var(--bg-dark); border: 1px solid var(--border-color); border-radius: 8px; padding: 10px 15px; display: flex; align-items: center; gap: 10px; color: var(--text-secondary); }
.search-bar input { background: none; border: none; color: white; width: 100%; outline: none; }
.action-buttons { display: flex; gap: 10px; }
.action-buttons button { flex: 1; padding: 12px; border-radius: 8px; border: none; display: flex; align-items: center; justify-content: center; gap: 10px; color: white; cursor: pointer; text-align: left; }
.btn-cash-in { background-color: var(--color-green-light); border: 1px solid var(--color-green) !important; color: var(--color-green) !important; }
.btn-cash-out { background-color: var(--color-red-light); border: 1px solid var(--color-red) !important; color: var(--color-red) !important; }
.product-list-section { flex: 1; overflow-y: auto; margin-top: 10px;}
.product-list-section h4 { font-size: 14px; margin-bottom: 10px; }
.modal-product-list { display: flex; flex-direction: column; gap: 10px; }
.modal-product-item { display: flex; align-items: center; gap: 12px; background-color: var(--bg-dark); padding: 12px; border-radius: 8px; }
.prod-num { width: 25px; height: 25px; background-color: var(--card-bg-light); border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 12px; color: var(--text-secondary); }
.prod-details { flex: 1; }
.custom-checkbox { width: 20px; height: 20px; accent-color: var(--color-blue); }

/* View 2 & 3: Cash In/Out Forms */
.form-scrollable { overflow-y: auto; padding-bottom: 20px; }
.form-scrollable::-webkit-scrollbar { display: none; }

.source-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.source-btn { background-color: var(--bg-dark); border: 1px solid var(--border-color); border-radius: 8px; padding: 15px 5px; color: var(--text-secondary); display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; font-size: 12px; transition: 0.2s; }
.source-btn i { font-size: 18px; }
.source-btn.active-green { border-color: var(--color-green); color: var(--color-green); background-color: var(--color-green-light); }
.source-btn.active-red { border-color: var(--color-red); color: var(--color-red); background-color: var(--color-red-light); }

.form-section { margin-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.input-group { background-color: var(--bg-dark); border: 1px solid var(--border-color); border-radius: 8px; padding: 10px 14px; }
.input-group label { font-size: 11px; color: var(--text-secondary); display: block; margin-bottom: 4px; }
.input-wrapper { display: flex; align-items: center; gap: 10px; color: var(--text-secondary); }
.input-wrapper input { background: none; border: none; color: var(--text-primary); width: 100%; outline: none; font-size: 14px; padding: 4px 0; }
.input-wrapper input::placeholder { color: #555; }

.submit-btn { width: 100%; padding: 16px; border-radius: 8px; border: none; color: white; font-size: 15px; font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; margin-top: 15px; }
.green-solid-btn { background-color: rgba(21, 94, 43, 0.6); border: 1px solid var(--color-green); color: #4ade80; }
.red-solid-btn { background-color: rgba(127, 29, 29, 0.6); border: 1px solid var(--color-red); color: #f87171; }