* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #faf8f2;
    color: #333;
    line-height: 1.5;
    min-height: 100vh;
    font-size: 14px;
    font-weight: 500;
}

.container {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    min-height: 100vh;
}

.header {
    text-align: center;
    padding: 20px 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 20px;
    position: relative;
}

.header h1 {
    font-size: 16px;
    color: #2c3e50;
    font-weight: 800;
}

.header .subtitle {
    font-size: 14px;
    color: #7f8c8d;
    margin-top: 5px;
    font-weight: 500;
}

.login-link {
    position: absolute;
    top: 20px;
    right: 0;
    color: #a87a6a;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.login-link:hover {
    color: #986a5a;
    text-decoration: underline;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: #a87a6a;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
    width: 100%;
    text-align: center;
}

.btn:hover {
    background: #986a5a;
}

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

.btn-secondary {
    background: #9a8a7a;
}

.btn-secondary:hover {
    background: #8a7a6a;
}

.btn-success {
    background: #7a9a7a;
}

.btn-success:hover {
    background: #6a8a6a;
}

.btn-danger {
    background: #a86a6a;
}

.btn-danger:hover {
    background: #985a5a;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: border-color 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: #a87a6a;
}

.alert {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.alert-info {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.card {
    background: #f5f0e8;
    border: 2px solid #d8d0c4;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.search-box {
    position: relative;
    margin-bottom: 15px;
}

.search-box input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 16px;
}

.search-box input:focus {
    outline: none;
    border-color: #a87a6a;
}

.search-box::before {
    content: '🔍';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
}

.filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.filter-btn {
    padding: 8px 16px;
    background: #ebe8dc;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.filter-btn.active {
    background: #ebe8dc;
    color: #333;
    border: 2px solid #b8b0a4;
}

.filter-btn:hover {
    background: #e0dcd0;
}

.filter-btn.active:hover {
    background: #986a5a;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f5f0e8;
    border: 2px solid #d8d0c4;
    border-radius: 6px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.list-item:hover {
    background: #ebe8dc;
    border-color: #d0c8bc;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.list-item:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.list-item .info {
    flex: 1;
}

.list-item .name {
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

.list-item .detail {
    font-size: 14px;
    color: #7f8c8d;
}

.list-item .value {
    font-weight: 600;
    color: #7a9a7a;
}

.add-saldo-btn {
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.product-btn {
    padding: 20px 10px;
    background: #f5f0e8;
    border: 2px solid #d8d0c4;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.product-btn:hover {
    border-color: #a87a6a;
    background: #ebe8dc;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.product-btn.selected {
    border-color: #a87a6a;
    background: #f0e8dc;
    box-shadow: 0 2px 4px rgba(168,122,106,0.15);
}

.product-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.product-btn .name {
    font-weight: 500;
    margin-bottom: 5px;
}

.product-btn .price {
    color: #7a9a7a;
    font-weight: 600;
}

.product-btn .qty {
    margin-top: 5px;
    font-size: 14px;
    color: #a87a6a;
    font-weight: 500;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 8px;
}

.cart-item .name {
    flex: 1;
    font-weight: 500;
}

.cart-item .qty {
    margin: 0 10px;
    font-weight: 600;
}

.cart-item .price {
    color: #7a9a7a;
    font-weight: 600;
}

.cart-item .remove {
    background: #a86a6a;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.total-section {
    background: #4a3d32;
    color: white;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.total-section .label {
    font-size: 14px;
    opacity: 0.8;
    font-weight: 500;
}

.total-section .value {
    font-size: 16px;
    font-weight: 800;
    margin-top: 5px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 4px;
    padding: 24px;
    max-width: 400px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 20px;
    color: #2c3e50;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-actions .btn {
    flex: 1;
}

.balance-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #7a9a7a;
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.balance-badge.low {
    background: #a86a6a;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
}

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

.actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.actions .btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 14px;
}

.tab-nav {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 20px;
}

.tab-nav button {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    color: #7f8c8d;
    transition: color 0.2s;
}

.tab-nav button.active {
    color: #a87a6a;
    border-bottom: 2px solid #a87a6a;
    margin-bottom: -2px;
}

.tab-nav button:hover {
    color: #2c3e50;
}

.success-animation {
    text-align: center;
    padding: 40px 20px;
}

.success-animation .icon {
    font-size: 16px;
    margin-bottom: 20px;
}

.success-animation h2 {
    color: #7a9a7a;
    margin-bottom: 10px;
}

.success-animation .balance {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-top: 20px;
}
