@font-face {
  font-family: 'Carlito';
  src: url('/fonts/Carlito-Regular.ttf') format('truetype');
  font-weight: 400;
}
@font-face {
  font-family: 'Carlito';
  src: url('/fonts/Carlito-Bold.ttf') format('truetype');
  font-weight: 700;
}

/* ── Tokens ──────────────────────────────────────────────────────────────── */
:root {
  --navy:    #050d50;
  --blue:    #004489;
  --accent:  #3399CC;
  --cyan:    #66CCFF;
  --orange:  #F7AA14;
  --text:    #323E48;
  --bg:      #f4f6f8;
  --white:   #ffffff;
  --border:  #e0e0e0;
  --shadow:  0 2px 10px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 24px rgba(0,0,0,0.13);
  --radius:  6px;
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Carlito', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-size: 16px;
}

/* ── Homepage card ───────────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  border-top: 4px solid var(--accent);
  padding: 48px 40px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow);
}
.logo { font-size: 48px; margin-bottom: 16px; }
h1 { font-size: 32px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.tagline { font-size: 15px; color: var(--accent); letter-spacing: 0.02em; margin-bottom: 36px; }

.features {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.feature { font-size: 13px; color: var(--text); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.feature span { font-size: 28px; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  background: var(--orange);
  color: var(--navy);
  font-family: 'Carlito', sans-serif;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 28px;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid var(--orange);
  transition: background 0.2s, border-color 0.2s;
}
.btn:hover { background: #e69b00; border-color: #e69b00; }

.logout-btn {
  background: transparent;
  border: 2px solid var(--blue);
  color: var(--blue);
  font-family: 'Carlito', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}
.logout-btn:hover { background: rgba(0,68,137,0.08); }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer {
  margin-top: 24px;
  font-size: 12px;
  color: #9aaab8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 480px;
  width: 100%;
}
.footer img { width: 28px; height: 28px; border-radius: var(--radius); object-fit: cover; }

/* ── Modal overlay ───────────────────────────────────────────────────────── */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5,13,80,0.5);
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}
.overlay.open { display: flex; }

/* ── Modal card ──────────────────────────────────────────────────────────── */
.modal {
  background: var(--white);
  border-radius: var(--radius);
  border-top: 4px solid var(--accent);
  padding: 36px 32px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(5,13,80,0.18);
  position: relative;
}
.modal-close {
  position: absolute;
  top: 16px; right: 20px;
  background: none;
  border: none;
  font-size: 20px;
  color: #9aaab8;
  cursor: pointer;
}
.modal-close:hover { color: var(--navy); }
.modal h2 { font-size: 20px; font-weight: 700; margin-bottom: 20px; text-align: center; }
.modal-title { font-size: 20px; font-weight: 700; color: var(--navy); margin-bottom: 20px; text-align: center; }
.switch-link { text-align: center; font-size: 13px; color: #9aaab8; margin-top: 4px; }
.switch-link a { color: var(--accent); cursor: pointer; text-decoration: none; font-weight: 600; }
.switch-link a:hover { color: var(--blue); }

/* ── Form ────────────────────────────────────────────────────────────────── */
.form { display: flex; flex-direction: column; gap: 12px; }
.form input, .form select {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 14px;
  font-size: 15px;
  font-family: 'Carlito', sans-serif;
  color: var(--text);
  background: #fafafa;
  outline: none;
  transition: border-color 0.2s;
}
.form input:focus, .form select:focus { border-color: var(--accent); }
.form select { background: #fafafa; }
.form .btn { width: 100%; text-align: center; margin-top: 4px; }
.form-error { font-size: 13px; color: #cc3333; text-align: center; min-height: 18px; }
.captcha { display: flex; align-items: center; gap: 10px; }
.captcha label { font-size: 14px; color: var(--text); white-space: nowrap; }
.captcha input { flex: 1; }
.register-only { display: none; }

/* ── Trips page ──────────────────────────────────────────────────────────── */
#trips-page { width: 100%; max-width: 480px; }
.trips-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.trips-header h2 { font-size: 22px; font-weight: 700; color: var(--navy); }

/* ── Trip / Expense cards ────────────────────────────────────────────────── */
.trip-card {
  background: var(--white);
  border-radius: var(--radius);
  border-top: 4px solid var(--accent);
  padding: 18px 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.trip-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.trip-card .trip-name { font-weight: 700; font-size: 16px; color: var(--navy); margin-bottom: 4px; }
.trip-card .trip-meta { font-size: 12px; color: #9aaab8; }

.empty-trips {
  background: var(--white);
  border-radius: var(--radius);
  border-top: 4px solid var(--accent);
  padding: 40px 24px;
  text-align: center;
  box-shadow: var(--shadow);
}
.empty-trips .icon { font-size: 36px; margin-bottom: 12px; }
.empty-trips p { color: #9aaab8; font-size: 14px; }
