/* style.css - Mobile First Design */
:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --dark: #1f2937;
    --light: #f9fafb;
    --gray: #6b7280;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f3f4f6;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    padding-bottom: 70px;
    color: var(--dark);
}

/* Custom Scroll */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: #e5e7eb;
    border-radius: 2px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 2px;
}

/* Header */
.app-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: 20px 16px;
    border-radius: 0 0 24px 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
}

.app-header h1 {
    font-size: 24px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-header h5 {
    font-size: 18px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Cards */
.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.stat-card:active {
    transform: scale(0.98);
}

.stat-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 22px;
    font-weight: bold;
    margin: 4px 0;
}

.stat-label {
    color: var(--gray);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Item Card */
.item-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.item-card:active {
    background: var(--light);
    transform: scale(0.99);
}

.item-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
    background: #f0f0f0;
}

.item-info {
    flex: 1;
}

.item-name {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 14px;
}

.item-price {
    font-size: 11px;
    color: var(--gray);
}

.item-stock {
    text-align: right;
}

.stock-value {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary);
}

.stock-label {
    font-size: 10px;
    color: var(--gray);
}

.item-actions {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.btn-icon {
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 8px;
}

/* Search Bar */
.search-bar {
    background: var(--white);
    border-radius: 30px;
    padding: 10px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-sm);
}

.search-bar i {
    color: var(--gray);
}

.search-bar input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 14px;
    background: transparent;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    border-top: 1px solid #e5e7eb;
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--gray);
    font-size: 11px;
    transition: all 0.2s;
    flex: 1;
    text-align: center;
}

.nav-item i {
    font-size: 22px;
    margin-bottom: 4px;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item:active {
    transform: scale(0.95);
}

/* FAB (Floating Action Button) */
.fab {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    width: 56px;
    height: 56px;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: all 0.3s;
    z-index: 1000;
    text-decoration: none;
}

.fab:active {
    transform: scale(0.95);
}

.fab i {
    font-size: 24px;
}

/* Transaction Card */
.transaction-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
}

.transaction-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.transaction-info {
    flex: 1;
}

.transaction-title {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 14px;
}

.transaction-meta {
    font-size: 10px;
    color: var(--gray);
}

.transaction-amount {
    text-align: right;
}

.transaction-price {
    font-weight: bold;
    margin-bottom: 4px;
    font-size: 14px;
}

/* Profit/Loss Card */
.profit-card {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: var(--radius);
    padding: 16px;
    color: var(--white);
    margin-bottom: 16px;
}

.loss-card {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-radius: var(--radius);
    padding: 16px;
    color: var(--white);
    margin-bottom: 16px;
}

.summary-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.summary-card h3 {
    font-size: 20px;
    margin-top: 8px;
    margin-bottom: 0;
}

.summary-card small {
    font-size: 10px;
    color: var(--gray);
}

/* Badge */
.badge-profit {
    background: #10b981;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.badge-loss {
    background: #ef4444;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

/* Alert */
.alert-custom {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 12px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 12px;
}

/* Form */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    display: block;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Button */
.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-secondary {
    background: var(--gray);
    color: white;
}

/* Safe area for notches */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .bottom-nav {
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }
    body {
        padding-bottom: calc(70px + env(safe-area-inset-bottom));
    }
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Divider */
.divider {
    height: 1px;
    background: #e5e7eb;
    margin: 16px 0;
}
/* Tambahan di style.css untuk server selector */
.server-selector {
    background: rgba(255,255,255,0.2);
    border-radius: 30px;
    padding: 5px 12px;
    color: white;
    border: none;
    font-size: 13px;
    cursor: pointer;
    outline: none;
}

.server-selector option {
    background: #667eea;
    color: white;
}

/* Dark option for better visibility */
select.server-selector {
    background-color: rgba(255,255,255,0.2);
}

/* Active nav item */
.nav-item.active {
    color: #667eea;
    font-weight: 500;
}