:root { --primary: #27ae60; --dark: #2c3e50; --danger: #e74c3c; --warn: #f1c40f; }
body { font-family: sans-serif; background: #f4f7f6; margin: 0; }
nav { background: var(--dark); color: white; padding: 1rem 2rem; display: flex; justify-content: space-between; }
.container { max-width: 1000px; margin: 2rem auto; padding: 0 1rem; }
.small { max-width: 500px; }
.card { background: white; padding: 1.5rem; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); margin-bottom: 1rem; }
.grid { display: grid; grid-template-columns: 1fr 2fr; gap: 1rem; margin-bottom: 1rem; }

input { width: 100%; padding: 10px; margin: 10px 0; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box; }
button { width: 100%; padding: 12px; background: var(--primary); border: none; color: white; border-radius: 4px; cursor: pointer; }

/* Status Badges */
.badge { padding: 1rem; border-radius: 4px; text-align: center; font-weight: bold; margin-bottom: 1rem; }
.verified_immutable { background: #d4edda; color: #155724; }
.compromised { background: #f8d7da; color: #721c24; border: 2px solid var(--danger); }
.development_mode { background: #fff3cd; color: #856404; }

/* Toggle Switch */
.switch { position: relative; display: inline-block; width: 40px; height: 20px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 20px; }
input:checked + .slider { background-color: var(--warn); }
.slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px; background: white; transition: .4s; border-radius: 50%; }
input:checked + .slider:before { transform: translateX(20px); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid #eee; }
.hash { font-family: monospace; color: #999; font-size: 0.8rem; }
.pos-theme { background: #dfe6e9; }
.pos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pos-grid button { 
    height: 100px; background: white; color: var(--dark); border: 2px solid #ccc; 
    font-size: 1.1rem; cursor: pointer; border-radius: 8px;
}
.pos-grid button:hover { border-color: var(--primary); background: #f0fff0; }
.btn-checkout { background: var(--dark); margin-top: 20px; font-size: 1.2rem; }
#cartItems { list-style: none; padding: 0; }
#cartItems li { padding: 10px 0; border-bottom: 1px solid #eee; }
.row-sale { border-left: 4px solid #3498db; } /* Blue for retail sales */
.row-trade { border-left: 4px solid #27ae60; } /* Green for bulk trades */
/* Layout Fixes */
.main-content-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.chart-wrapper { height: 350px; position: relative; }

.table-scroll {
    max-height: 400px;
    overflow-y: auto;
}

/* Tag Colors */
.type-tag {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: bold;
    text-transform: uppercase;
}
.tag-retail { background: #e3f2fd; color: #1976d2; border: 1px solid #bbdefb; }
.tag-bulk { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.tag-system { background: #f5f5f5; color: #616161; }

/* Stat Card Icon Backgrounds */
.stat-card { position: relative; overflow: hidden; }
.icon-bg {
    position: absolute;
    right: -10px;
    bottom: -10px;
    font-size: 5rem;
    opacity: 0.05;
}

/* Badge States */
.badge.verified_immutable { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.badge.compromised { background: #f8d7da; color: #721c24; border: 2px solid #dc3545; animation: pulse 2s infinite; }
.badge.development_mode { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Scrollbar Styling */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 10px; }