/*
 * sippin' milk | rakion -- auth website
 *
 * Same DESIGN.md reading as the control panel: dark control surface with
 * light-on-dark buttons and warm light borders on #201d1d.
 */

:root {
  --dark: #201d1d;
  --surface: #302c2c;
  --light: #fdfcfc;
  --gray: #9a9898;
  --outline: #646262;
  --border: rgba(253, 252, 252, .12);
  --input-bg: #f1eeee;

  --accent: #007aff;
  --danger: #ff3b30;
  --success: #30d158;
  --warning: #ff9f0a;

  --mono: "Berkeley Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo,
          Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --bar-height: 72px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--dark);
  color: var(--light);
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

h1, p { margin: 0; }

a { color: var(--light); }
a:hover { color: var(--gray); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --- top bar --- */

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--dark);
  border-bottom: 1px solid var(--border);
}

.bar-inner {
  display: flex;
  align-items: center;
  max-width: 1200px;
  min-height: var(--bar-height);
  margin: 0 auto;
  padding: 8px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.brand-logo {
  height: 48px;
  width: auto;
  flex: none;
}

.brand-sep, .brand-sub { color: var(--gray); font-weight: 500; }

/* --- layout --- */

.layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 16px 48px;
}

.layout.wide { max-width: 1100px; }

/* --- cards --- */

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

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.card-name { font-weight: 700; }

.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 32px 16px;
}

.hero-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.5;
}

.note { color: var(--gray); }

.flash {
  padding: 12px 16px;
  border: 1px solid var(--outline);
  border-left: 3px solid var(--success);
  border-radius: 4px;
  background: var(--surface);
  font-size: .875rem;
}

/* --- account rows --- */

.rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.key { color: var(--gray); }

/* --- table --- */

/* Wide tables scroll inside the card instead of spilling past its border. */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  font-size: .875rem;
}

th, td {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
}

th { color: var(--gray); font-weight: 500; }

td form { margin: 0; }

.mono { font-size: .8125rem; }

/* --- pager --- */

.pager {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  color: var(--gray);
  font-size: .875rem;
}

/* --- button + field --- */

.btn {
  display: inline-block;
  background: var(--light);
  color: var(--dark);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  padding: 4px 20px;
  border: 1px solid var(--light);
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: background 120ms, border-color 120ms;
}

.btn:hover { background: var(--gray); border-color: var(--gray); color: var(--dark); }
.btn:active { background: var(--outline); border-color: var(--outline); }

.btn-quiet {
  background: transparent;
  color: var(--light);
  border-color: var(--outline);
}

.btn-quiet:hover { background: transparent; border-color: var(--light); color: var(--light); }

.btn-big { padding: 8px 24px; }

.field {
  min-width: 0;
  background: var(--input-bg);
  color: var(--dark);
  font-family: inherit;
  font-size: 1rem;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.card-body .field { flex: 1; }
