/* ========================= */
/* ROOT VARIABLES */
/* ========================= */
:root {
  --primary: #4f46e5;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;

  --radius: 12px;
  --space: 16px;
}

/* ========================= */
/* RESET & BASE */
/* ========================= */
* {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

/* ========================= */
/* LAYOUT */
/* ========================= */
.app {
  max-width: 420px;
  margin: auto;
  padding: var(--space);
}

/* ========================= */
/* TYPOGRAPHY */
/* ========================= */
h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}

h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

p {
  margin: 0;
  font-size: 14px;
  color: #475569;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
}

small {
  display: block;
  margin-bottom: var(--space);
  font-size: 12px;
  color: #64748b;
}

/* ========================= */
/* HEADER */
/* ========================= */
.header {
  text-align: center;
  margin-bottom: var(--space);
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.logo-badge {
  padding: 6px 10px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;

  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 8px;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
}

/* ========================= */
/* DASHBOARD / CARD */
/* ========================= */
.summary {
  display: flex;
  gap: var(--space);
}

.card {
  flex: 1;
  margin-bottom: var(--space);
  padding: var(--space);

  background: var(--card);
  border-radius: var(--radius);
}

.empty-state {
  padding: 16px 0;
  text-align: center;
  font-size: 14px;
  color: #94a3b8;
}

/* ========================= */
/* BUTTONS */
/* ========================= */
button {
  cursor: pointer;
}

.btn-primary,
.btn-secondary {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius);
}

.btn-primary {
  background: var(--primary);
  border: none;
  color: #fff;

  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.btn-secondary {
  background: transparent;
  border: 1px solid #cbd5e1;
  color: #475569;

  font-size: 14px;
  font-weight: 500;
}

#openForm {
  margin-bottom: var(--space);
}

/* ========================= */
/* FORM */
/* ========================= */
input,
select {
  width: 100%;
  padding: 12px;
  margin-bottom: var(--space);

  font-size: 15px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius);
}

input::placeholder {
  color: #94a3b8;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: var(--space);
}

.form-actions button {
  flex: 1;
}

/* ========================= */
/* HISTORY FILTER */
/* ========================= */
.history-filter {
  display: flex;
  gap: 12px;
  margin-bottom: var(--space);
}

.history-filter input,
.history-filter button {
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
}

.history-filter button {
  width: auto;
  white-space: nowrap;
}

/* ========================= */
/* TRANSACTION LIST */
/* ========================= */
.history-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.history-icon {
  display: flex;
  color: #64748b;
}

#history {
  list-style: none;
  padding: 0;
  margin: 0;
}

#history li {
  display: flex;
  flex-direction: column;
  gap: 4px;

  padding: 14px;
  margin-bottom: 12px;

  background: var(--card);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
}

/* ========================= */
/* TRANSACTION ITEM */
/* ========================= */
.transaction-provider {
  display: flex;
  align-items: center;
  gap: 6px;

  font-size: 14px;
  font-weight: 600;
  color: #334155;
}

.provider-icon {
  display: flex;
  align-items: center;
  color: #64748b;
}

.transaction-amount {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary);
}

.transaction-date {
  display: flex;
  align-items: center;
  gap: 4px;

  font-size: 12px;
  color: #64748b;
}

.date-icon {
  display: flex;
}

/* ========================= */
/* UTILITIES */
/* ========================= */
.hidden {
  display: none;
}
