@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --bg: #f4e7d0;
  --panel: #fff9ef;
  --border: #d3c3a3;
  --border-dark: #9F937B;
  --text: #1d1b16;
  --muted: #675f52;
  --accent: #f18f01;
  --accent-hover: #7a4220; /* darker warm brown hover color */
}

* {
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Mono', monospace;
  margin: 16px;
  padding-bottom: 36px;
}

a {
  color: var(--text);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

header {
  background: #f9d94c;
  border: 2px solid var(--border);
  border-radius: 6px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

h1 {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  color: #1d1b16; /* dark text for contrast */
}
h1 span {
  font-weight: normal;
}

footer {
  padding: 0 .5em;
}
footer h2 {
  font-weight: normal;
  line-height: 1.5em
}

#auth button {
  background: #fff9ef;
  border: 2px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

#auth button:hover {
  background: var(--accent-hover);
  color: #fff;
}

button {
  font: inherit;
  padding: 8px 14px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

button:hover {
  background: var(--accent-hover);
  color: #fff;
  border-color: var(--accent-hover);
}

button.danger {
  border-color: #c05040;
  color: #c05040;
  background: var(--panel);
}

button.danger:hover {
  background: #c05040;
  color: #fff;
}

.hidden {
  display: none;
}

#toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 10px 0 16px;
}

#status {
  color: var(--muted);
  font-size: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

th, td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

th {
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
  background: #fdf6e9;
}

tr:last-child td {
  border-bottom: none;
}

.emoji {
  width: 1.4em;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

#totals {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

#detailForm {
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  max-width: 720px;
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

input[type=text],
input[type=date],
select,
textarea {
  font: inherit;
  padding: 10px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: #fffef8;
  color: var(--text);
  width: 100%;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
}

textarea {
  resize: vertical;
  min-height: 400px; /* increased from default */
  line-height: 1.5;
}

.row {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
}

#listView table td:nth-child(2) a {
  font-weight: 600;
}

#listView table tr:hover {
  background: #fff5e3;
}

#detailForm button {
  font-weight: 500;
}

/* Scrollbar styling (subtle and warm) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background-color: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--border-dark);
}