@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap");

:root {
  --primary: #0f766e;
  --primary-dark: #0b5c56;
  --gold: #c9971c;
  --income: #15803d;
  --expense: #b91c1c;
  --bg: #faf7f0;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e7e2d6;
  --radius-card: 16px;
  --radius-control: 12px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Cairo", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
}

.container { max-width: 560px; margin-inline: auto; padding: 16px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 16px;
}

/* Forms */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  font: inherit;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}
.field input.invalid { border-color: var(--expense); }
.field-error { color: var(--expense); font-size: 0.875rem; margin-top: 4px; min-height: 1.2em; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: var(--radius-control);
  cursor: pointer;
  color: #fff;
  background: var(--primary);
  transition: background 0.15s, opacity 0.15s;
}
.btn:hover { background: var(--primary-dark); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Form-level error box */
.alert-error {
  background: #fef2f2;
  color: var(--expense);
  border: 1px solid #fecaca;
  border-radius: var(--radius-control);
  padding: 10px 12px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}
.hidden { display: none !important; }
