/* deposits-ui — visual language of the original Interac Clients app
   (light shadcn-style: near-white page, white cards, black pill tabs). */

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: #18181b;
  background: #f4f4f5;
}

.page { max-width: 1280px; margin: 0 auto; padding: 24px 24px 64px; }

/* top bar */
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.brand { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.userbox { display: flex; align-items: center; gap: 10px; }
.username { color: #71717a; }

/* tabs: black pill */
.tabs { display: inline-flex; background: #f4f4f5; border-radius: 999px; padding: 4px; gap: 4px; margin-bottom: 20px; }
.tab {
  padding: 7px 18px; border-radius: 999px; text-decoration: none;
  color: #71717a; font-weight: 500; font-size: 13px;
}
.tab:hover { color: #18181b; }
.tab.active { background: #18181b; color: #fff; }

/* cards */
.card {
  background: #fff; border: 1px solid #e4e4e7; border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04); margin-bottom: 20px;
}
.form-card { padding: 20px; }
.form-card h2 { margin: 0 0 16px; font-size: 15px; font-weight: 600; }
.table-card { padding: 16px 16px 8px; }

/* forms */
.client-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 16px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 500; color: #3f3f46; }
input, select {
  height: 36px; padding: 0 10px; border: 1px solid #e4e4e7; border-radius: 8px;
  background: #fff; font-size: 14px; color: #18181b; width: 100%;
}
input:focus, select:focus { outline: none; border-color: #a1a1aa; box-shadow: 0 0 0 3px rgba(113,113,122,0.15); }
.secret-input { position: relative; }
.secret-input .eye-toggle { position: absolute; right: 2px; top: 2px; height: 32px; }
.form-actions { grid-column: 1 / -1; display: flex; gap: 10px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 16px; border-radius: 8px; border: 1px solid transparent;
  font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none;
  background: transparent; color: inherit; line-height: 1;
}
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn-primary { background: #18181b; color: #fff; }
.btn-primary:hover { background: #27272a; }
.btn-outline { border-color: #e4e4e7; background: #fff; }
.btn-outline:hover { background: #f4f4f5; }
.btn-ghost { background: transparent; color: #71717a; }
.btn-ghost:hover { background: #f4f4f5; color: #18181b; }
.btn-ghost.danger:hover { color: #dc2626; background: #fef2f2; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: 0.45; pointer-events: none; }

/* flash */
.flash { border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; font-size: 13.5px; border: 1px solid; }
.flash-ok { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.flash-err { background: #fef2f2; color: #991b1b; border-color: #fecaca; }

/* toolbar */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar input[type="search"] { max-width: 340px; }
.tx-toolbar { padding: 4px 4px 12px; border-bottom: 1px solid #f4f4f5; }
.switch { display: inline-flex; align-items: center; gap: 7px; color: #3f3f46; font-size: 13.5px; white-space: nowrap; }
.switch input { width: 15px; height: 15px; }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th {
  text-align: left; font-size: 12px; font-weight: 500; color: #71717a;
  padding: 10px 12px; border-bottom: 1px solid #e4e4e7;
}
th a { color: inherit; text-decoration: none; }
th a:hover { color: #18181b; }
td { padding: 10px 12px; border-bottom: 1px solid #f4f4f5; vertical-align: middle; }
tbody tr:hover { background: #fafafa; }
td.memo { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.empty { text-align: center; color: #a1a1aa; padding: 28px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.muted { color: #71717a; }
.actions { display: flex; gap: 4px; align-items: center; }
.inline { display: inline-flex; }
.secret-mask { letter-spacing: 1px; }

/* badges */
.badge { display: inline-block; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 500; }
.badge-ok { background: #dcfce7; color: #166534; }
.badge-err { background: #fee2e2; color: #991b1b; }

/* pagination */
.pagination {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 12px 4px; font-size: 13px; color: #71717a;
}
.rows-per-page { display: flex; align-items: center; gap: 8px; }
.rows-per-page select { width: 64px; height: 30px; }
.page-buttons { display: flex; gap: 4px; }
.range-info { margin-left: auto; }

/* assign dropdown in transactions */
.assign-form { display: flex; gap: 6px; align-items: center; }
.assign-form select { width: 240px; height: 30px; font-size: 12.5px; }

/* login */
.login-bg { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card {
  background: #fff; border: 1px solid #e4e4e7; border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06); padding: 32px; width: 360px;
}
.login-card h1 { margin: 0 0 4px; font-size: 18px; }
.login-card p { margin: 0 0 18px; }
.login-card label { display: block; font-size: 12.5px; font-weight: 500; color: #3f3f46; margin: 14px 0 6px; }
.login-card .btn { margin-top: 22px; }
.login-card .flash { margin-bottom: 4px; }
