* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(58, 134, 255, 0.2), transparent 30%),
    linear-gradient(135deg, #080b12, #111827);
  color: #f9fafb;
}

.app {
  width: min(100%, 480px);
  margin: 0 auto;
  padding: 24px 16px;
}

.hero-card,
.history-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  padding: 22px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(18px);
}

.top-label {
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #a7f3d0;
  font-size: 12px;
  margin-bottom: 18px;
}

h1 {
  font-size: 32px;
  letter-spacing: -1px;
  margin-bottom: 8px;
}

.subtitle {
  color: #9ca3af;
  line-height: 1.5;
  margin-bottom: 22px;
}

.balance-card {
  background: linear-gradient(135deg, #111827, #1f2937);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 20px;
  margin-bottom: 18px;
}

.balance-card span,
.mini-card span {
  display: block;
  color: #9ca3af;
  font-size: 13px;
  margin-bottom: 8px;
}

.balance-card h2 {
  font-size: 36px;
  letter-spacing: -1px;
}

.today-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.mini-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 14px;
}

.mini-card strong {
  font-size: 18px;
}

.action-buttons {
  display: grid;
  gap: 10px;
}

.btn {
  border: none;
  border-radius: 18px;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  color: #ffffff;
}

.income {
  background: #16a34a;
}

.expense {
  background: #dc2626;
}

.sales {
  background: #2563eb;
}

.history-card {
  margin-top: 16px;
}

.history-card h3 {
  margin-bottom: 14px;
}

.empty-state {
  color: #9ca3af;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  padding: 16px;
  text-align: center;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 16px;
  z-index: 10;
}

.hidden {
  display: none !important;
}

.modal-card {
  width: min(100%, 480px);
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px 28px 20px 20px;
  padding: 22px;
  box-shadow: 0 -20px 80px rgba(0, 0, 0, 0.45);
  animation: slideUp 0.2s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.close-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: #d1d5db;
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border-radius: 16px;
  padding: 14px;
  font-size: 15px;
  outline: none;
}

.form-group textarea {
  min-height: 90px;
  resize: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: rgba(167, 243, 208, 0.7);
}

.helper-text {
  color: #9ca3af;
  font-size: 12px;
  margin-top: 8px;
}

.save-btn {
  width: 100%;
  border: none;
  border-radius: 18px;
  padding: 14px;
  background: #f9fafb;
  color: #111827;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.transaction-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  margin-bottom: 10px;
}

.transaction-info span {
  display: block;
  font-size: 13px;
  color: #9ca3af;
  margin-top: 4px;
}

.transaction-amount {
  font-weight: 800;
  white-space: nowrap;
}

.plus {
  color: #86efac;
}

.minus {
  color: #fca5a5;
}
.transaction-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.delete-transaction-btn {
  border: none;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #d1d5db;
  font-size: 12px;
  cursor: pointer;
}

.delete-transaction-btn:hover {
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
}
.history-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.history-top h3 {
  margin-bottom: 0;
}

.filter-tabs {
  display: flex;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.filter-tab {
  border: none;
  border-radius: 999px;
  padding: 7px 10px;
  background: transparent;
  color: #9ca3af;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.filter-tab.active {
  background: #f9fafb;
  color: #111827;
}

.transaction-date {
  display: block;
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}
.month-card {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 16px;
  margin-bottom: 18px;
}

.month-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.month-header span {
  color: #9ca3af;
  font-size: 13px;
}

.month-header strong {
  font-size: 13px;
  color: #a7f3d0;
}

.month-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  color: #d1d5db;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.month-row span {
  font-size: 14px;
  color: #9ca3af;
}

.month-row strong {
  font-size: 15px;
}

.month-row.total strong {
  color: #a7f3d0;
}
.danger-zone {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: center;
}

.clear-data-btn {
  border: none;
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.clear-data-btn:hover {
  background: rgba(239, 68, 68, 0.22);
  color: #fecaca;
}
.danger-zone {
  gap: 10px;
  flex-wrap: wrap;
}

.export-data-btn {
  border: none;
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.export-data-btn:hover {
  background: rgba(34, 197, 94, 0.22);
  color: #bbf7d0;
}
.auth-screen {
  min-height: 100vh;
  width: min(100%, 480px);
  margin: 0 auto;
  padding: 24px 16px;
  display: flex;
  align-items: center;
}

.auth-card {
  width: 100%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  padding: 22px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(18px);
}

.auth-message {
  min-height: 20px;
  margin-top: 12px;
  color: #fca5a5;
  font-size: 13px;
  text-align: center;
}

.logout-btn {
  float: right;
  border: none;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #d1d5db;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}
.dashboard-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.dashboard-top .top-label {
  margin-bottom: 8px;
}

.user-email {
  color: #6b7280;
  font-size: 12px;
  word-break: break-all;
}

.sync-status {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -6px 0 18px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.1);
  color: #86efac;
  font-size: 12px;
  font-weight: 700;
}

.sync-status span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.9);
}

.app-footer {
  padding: 18px 0 4px;
  color: #6b7280;
  font-size: 12px;
  text-align: center;
}

.logout-btn {
  float: none;
  flex-shrink: 0;
}
