:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --primary: #0f172a;
  --border: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --error: #dc2626;
  --success: #16a34a;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, sans-serif; }
body { background-color: var(--bg); color: var(--text-main); -webkit-tap-highlight-color: transparent; }

.login-screen { display: flex; align-items: center; justify-content: center; height: 100vh; padding: 20px; }
.login-card { background: var(--surface); padding: 32px 24px; border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); width: 100%; max-width: 400px; text-align: center; }
.login-card h1 { margin-bottom: 8px; font-size: 1.5rem; }
.login-card p { color: var(--text-muted); margin-bottom: 24px; }
.login-card input { width: 100%; padding: 16px; font-size: 1.5rem; text-align: center; letter-spacing: 0.5em; border: 2px solid var(--border); border-radius: 8px; margin-bottom: 16px; }
.login-card input:focus { border-color: var(--primary); outline: none; }
.error-text { color: var(--error); margin-top: 12px; font-size: 0.875rem; font-weight: 600; }

header { background: var(--surface); padding: 16px; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.header-content { display: flex; justify-content: space-between; align-items: center; max-width: 600px; margin: 0 auto; }
.status-indicator { font-size: 0.75rem; font-weight: 700; padding: 4px 8px; border-radius: 99px; }
.status-indicator.online { background: #dcfce7; color: var(--success); }
.status-indicator.offline { background: #fef08a; color: #a16207; }

main { max-width: 600px; margin: 0 auto; padding: 16px; }
.view { animation: fadeIn 0.2s ease-in; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

button { 
  -webkit-appearance: none; 
  appearance: none; 
  width: 100%; 
  padding: 16px; 
  font-size: 1rem; 
  font-weight: 600; 
  border: none; 
  border-radius: 8px; 
  cursor: pointer; 
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-primary { background-color: #000000 !important; color: #ffffff !important; }
.btn-secondary { background: transparent !important; color: #000000 !important; border: 1px solid #000000 !important; margin-top: 12px; }
.btn-text { color: #2563eb !important; padding: 8px 0; background: none; border: none; width: auto; font-weight: 600; }
.fab-button { position: fixed; bottom: 24px; right: 24px; width: auto; padding: 16px 24px; border-radius: 99px; box-shadow: 0 4px 12px rgba(0,0,0,0.3); z-index: 100; }

.dashboard-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.stat-card { background: var(--surface); padding: 16px; border-radius: 8px; border: 1px solid var(--border); display: flex; flex-direction: column; }
.stat-label { font-size: 0.875rem; color: var(--text-muted); }
.stat-value { font-size: 1.5rem; font-weight: 700; margin-top: 4px; }

.card { background: var(--surface); padding: 16px; border-radius: 8px; border: 1px solid var(--border); margin-bottom: 16px; }
.form-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }

label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 6px; margin-top: 12px; }
label:first-child { margin-top: 0; }
input { width: 100%; padding: 16px; border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; background: var(--bg); }
input:focus { outline: 2px solid var(--primary); background: var(--surface); }

.photo-gallery { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 12px; }
.photo-thumbnail { position: relative; flex-shrink: 0; width: 80px; height: 100px; border-radius: 8px; border: 1px solid var(--border); overflow: hidden; background: #000; }
.photo-thumbnail img { width: 100%; height: 100%; object-fit: cover; opacity: 0.9; }
.remove-photo { position: absolute; top: 4px; right: 4px; background: rgba(220, 38, 38, 0.9); color: white; border: none; border-radius: 50%; width: 24px; height: 24px; font-size: 16px; display: flex; align-items: center; justify-content: center; padding: 0; line-height: 1; }
.text-center { text-align: center; }
.mt-2 { margin-top: 12px; }

.entries-section h3 { margin-bottom: 12px; }
.entry-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.entry-inputs { flex: 1; display: flex; gap: 8px; align-items: center; background: var(--surface); padding: 4px; border: 1px solid var(--border); border-radius: 8px; }
.entry-charge { font-weight: 600; font-family: monospace; padding-right: 8px; min-width: 80px; text-align: right; }
.btn-danger-icon { color: var(--error); font-size: 1.5rem; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: none; border: none; }

.total-section { background: var(--primary); color: white; padding: 16px; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; font-size: 1.25rem; margin-top: 24px; margin-bottom: 40px; }
.total-amount { font-family: monospace; }