* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: #f1f5f9;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, sans-serif;
  margin: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.app-container {
  max-width: 500px;
  width: 100%;
  height: 100vh;
  background: white;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* FIXED: Changed from .reimbursement to .categories */
.categories {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.category-card {
  background: #f8fafc;
  border-radius: 20px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #e2e8f0;
  transition: all 0.2s;
  cursor: pointer;
}

.category-card.reimbursement {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.category-name {
  font-weight: 600;
  font-size: 16px;
  color: #1e293b;
  flex: 1;
}

.category-value {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  min-width: 80px;
  text-align: right;
  margin: 0 12px;
}

.category-card.reimbursement .category-value {
  color: #059669;
}

.cat-btn {
  background: #3b82f6;
  border: none;
  padding: 8px 20px;
  border-radius: 40px;
  font-weight: 600;
  font-size: 14px;
  color: white;
  cursor: pointer;
  transition: all 0.1s;
  white-space: nowrap;
}

.cat-btn:active {
  transform: scale(0.95);
  background: #2563eb;
}

.cat-btn.reimbursement-btn {
  background: #059669;
}

.cat-btn.reimbursement-btn:active {
  background: #047857;
}

.running-total {
  background: #fef9e3;
  margin: 0 16px 16px;
  padding: 16px 20px;
  border-radius: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 16px;
  color: #92400e;
  flex-shrink: 0;
}

.total-value {
  font-size: 24px;
  font-weight: 800;
}

/* Admin Button Area */
.admin-container {
  text-align: center;
  padding-bottom: 16px;
  flex-shrink: 0;
}

.admin-btn {
  background: none;
  border: none;
  color: #64748b;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 16px;
  transition: color 0.2s;
}

.admin-btn:active {
  color: #0f172a;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.modal {
  background: white;
  border-radius: 32px;
  width: 90%;
  max-width: 380px;
  padding: 28px 24px;
  text-align: center;
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #1e293b;
}

.modal-subtitle {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 20px;
}

.modal-input {
  width: 100%;
  padding: 16px;
  font-size: 24px;
  text-align: center;
  border: 2px solid #e2e8f0;
  border-radius: 60px;
  margin-bottom: 20px;
  font-weight: 600;
  outline: none;
  background: #f8fafc;
}

.modal-input:focus {
  border-color: #3b82f6;
  background: white;
}

.modal-input::placeholder {
  color: #cbd5e1;
  font-size: 18px;
}

.date-picker-input {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  text-align: center;
  border: 2px solid #e2e8f0;
  border-radius: 60px;
  margin-bottom: 20px;
  outline: none;
  background: #f8fafc;
  cursor: pointer;
}

.date-picker-input:focus {
  border-color: #3b82f6;
  background: white;
}

.modal-buttons {
  display: flex;
  gap: 12px;
}

.modal-btn {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 60px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
}

.modal-btn-primary { background: #3b82f6; color: white; }
.modal-btn-danger { background: #dc2626; color: white; }
.modal-btn-secondary { background: #f1f5f9; color: #475569; }

.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: white;
  padding: 10px 20px;
  border-radius: 60px;
  font-size: 14px;
  z-index: 10001;
  white-space: nowrap;
}

/* ADMIN MODAL SPECIFIC STYLES (To remove inline styles from JS) */
.admin-menu {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.admin-menu-row {
  display: flex;
  gap: 12px;
}

.admin-menu .modal-btn {
  padding: 16px;
  font-size: 15px;
  width: 100%;
}

.admin-menu-row .modal-btn {
  flex: 1;
}

@media (max-width: 480px) {
  .category-name { font-size: 14px; }
  .category-value { font-size: 16px; min-width: 65px; margin: 0 8px; }
  .cat-btn { padding: 6px 14px; font-size: 12px; }
  .modal-input { font-size: 20px; padding: 14px; }
}