/* Animal-island design tokens.
 *
 * Extracted from the reference console (mix.nps.eighth.space): an Element Plus
 * theme override plus the component shapes that carry it. The look is flat
 * colour blocks with solid-drop shadows, so there are no gradients, no glass
 * and no blur anywhere in this file. */

:root {
  /* Primary: mint. Light is hover, dark is the solid shadow / active edge. */
  --el-color-primary: #19c8b9;
  --el-color-primary-light-3: #3dd4c6;
  --el-color-primary-light-5: #6ee0d6;
  --el-color-primary-light-7: #a6ece6;
  --el-color-primary-light-8: #c4f2ee;
  --el-color-primary-light-9: #e3f9f7;
  --el-color-primary-dark-2: #0c968d;

  /* Text is warm brown; pure black is never used. */
  --el-text-color-primary: #794f27;
  --el-text-color-regular: #725d42;
  --el-text-color-secondary: #3d3428;
  --el-text-color-placeholder: #a89a86;

  /* Paper-cream surfaces. */
  --el-bg-color: #f7f3df;
  --el-bg-color-overlay: #fffdf0;
  --el-bg-color-page: #efe9d3;

  --el-border-color: #d8cfae;
  --el-border-color-light: #e5dcc0;
  --el-border-radius-base: 10px;

  --island-shadow-hard: 0 5px 0 var(--el-color-primary-dark-2);
  --island-shadow-soft: 0 3px 8px #3d34281a;
  --island-border: 2px solid var(--el-color-primary);

  --island-font: Nunito, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--island-font);
  color: var(--el-text-color-regular);
  background: var(--el-bg-color);
  transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1),
    background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

[v-cloak] {
  display: none;
}

/* ---------------------------------------------------------------- shell */

/* Login gate. Full-bleed cream field with one card, matching the console's
   paper palette rather than introducing a second visual language. */
.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background: var(--el-bg-color-page);
}

.login-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 360px;
  padding: 26px;
  background: var(--el-bg-color-overlay);
  border: 2px solid var(--el-border-color-light);
  border-radius: 18px;
  box-shadow: var(--island-shadow-soft);
}

.login-card .brand {
  padding: 0 0 4px;
}

.agent-card {
  max-width: 860px;
}

.login-card .btn {
  max-width: none;
  margin-top: 4px;
}

.login-error {
  padding: 9px 12px;
  border-radius: 10px;
  border: 2px solid #f56c6c;
  background: #fdecec;
  color: #c04545;
  font-size: 13px;
  font-weight: 700;
}

.shell {
  display: grid;
  grid-template-columns: 232px 1fr;
  height: 100%;
  overflow: hidden;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 14px;
  background: var(--el-bg-color-overlay);
  border-right: 2px solid var(--el-border-color-light);
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 18px;
  font-weight: 900;
  font-size: 17px;
  color: var(--el-text-color-primary);
  letter-spacing: 0;
}

.brand-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--el-color-primary);
  box-shadow: 0 3px 0 var(--el-color-primary-dark-2);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 50px;
  border: 2px solid transparent;
  color: var(--el-text-color-regular);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  background: none;
  text-align: left;
  width: 100%;
  font-family: inherit;
}

.nav-item:hover {
  background: var(--el-color-primary-light-9);
  color: var(--el-text-color-primary);
}

.nav-item.active {
  background: var(--el-color-primary);
  border-color: var(--el-color-primary);
  color: #fffdf0;
  box-shadow: 0 3px 0 var(--el-color-primary-dark-2);
}

.nav-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.sidebar-foot {
  margin-top: auto;
  padding: 12px 10px 0;
  font-size: 12px;
  color: var(--el-text-color-placeholder);
  line-height: 1.7;
  border-top: 1px solid var(--el-border-color-light);
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  background: var(--el-bg-color-overlay);
  border-bottom: 2px solid var(--el-border-color-light);
  flex: 0 0 auto;
}

.topbar h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  color: var(--el-text-color-primary);
}

.topbar .spacer {
  flex: 1;
}

.content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 22px 32px;
}

/* ---------------------------------------------------------------- blocks */

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

/* Repeated stat tile: an individual item, not a page section. */
.tile {
  background: var(--el-bg-color-overlay);
  border: 2px solid var(--el-border-color-light);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: var(--island-shadow-soft);
}

.tile-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--el-text-color-placeholder);
  letter-spacing: 0;
}

.tile-value {
  margin-top: 6px;
  font-size: 26px;
  font-weight: 900;
  color: var(--el-text-color-primary);
  font-variant-numeric: tabular-nums;
}

.panel {
  background: var(--el-bg-color-overlay);
  border: 2px solid var(--el-border-color-light);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.panel-head h2 {
  margin: 0;
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 900;
  color: var(--el-text-color-primary);
}

.panel-head .spacer {
  flex: 1;
}

.hint {
  font-size: 12px;
  color: var(--el-text-color-placeholder);
}

/* ---------------------------------------------------------------- table */

table.grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.account-grid {
  min-width: 900px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.bulk-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.select-cell {
  width: 34px;
  min-width: 34px;
}

.select-cell input {
  width: 16px;
  height: 16px;
  accent-color: var(--el-color-primary);
}

table.grid th {
  text-align: left;
  font-weight: 800;
  color: var(--el-text-color-primary);
  padding: 8px 10px;
  border-bottom: 2px solid var(--el-border-color-light);
  white-space: nowrap;
}

table.grid td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--el-border-color-light);
  color: var(--el-text-color-regular);
  vertical-align: middle;
}

table.grid tbody tr:hover td {
  background: var(--el-color-primary-light-9);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.json-box {
  max-height: 420px;
  overflow: auto;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--el-border-color-light);
  border-radius: 10px;
  background: #fffdf7;
  color: var(--el-text-color-regular);
  font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Notes are free text and can be long; clamp the column so one essay does not
   push the action buttons off screen. */
.note-cell {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty {
  padding: 26px 10px;
  text-align: center;
  color: var(--el-text-color-placeholder);
  font-size: 13px;
}

/* ---------------------------------------------------------------- pills */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  border: 2px solid transparent;
}

.pill-ok {
  background: var(--el-color-primary-light-9);
  border-color: var(--el-color-primary);
  color: var(--el-color-primary-dark-2);
}

.pill-warn {
  background: #fdf3d8;
  border-color: #e6a23c;
  color: #9a6b12;
}

.pill-off {
  background: #f0ece0;
  border-color: #d8cfae;
  color: var(--el-text-color-placeholder);
}

.pill-bad {
  background: #fdecec;
  border-color: #f56c6c;
  color: #c04545;
}

/* ---------------------------------------------------------------- form */

.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.field label {
  font-size: 12px;
  font-weight: 800;
  color: var(--el-text-color-primary);
}

input,
select,
textarea {
  width: 100%;
  font-family: inherit;
  font-size: 13px;
  color: var(--el-text-color-regular);
  background: #fffdf7;
  border: 2px solid var(--el-border-color);
  border-radius: 10px;
  padding: 8px 10px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--el-color-primary);
}

/* ---------------------------------------------------------------- button */

button.btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 9px 16px;
  border-radius: 50px;
  border: 2px solid var(--el-color-primary);
  background: var(--el-color-primary);
  color: #fffdf0;
  box-shadow: var(--island-shadow-hard);
  cursor: pointer;
}

/* Buttons living in a form grid fill their cell, but only up to a sane width
   so a wide column does not turn a command into a banner. Topbar/toolbar
   buttons keep their intrinsic width. */
.field > button.btn {
  width: 100%;
  max-width: 240px;
}

button.btn:hover:not(:disabled) {
  background: var(--el-color-primary-light-3);
  border-color: var(--el-color-primary-light-3);
}

button.btn:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--el-color-primary-dark-2);
}

button.btn:disabled {
  opacity: 0.5;
  box-shadow: none;
  cursor: not-allowed;
}

button.btn.ghost {
  background: transparent;
  color: var(--el-color-primary-dark-2);
  box-shadow: none;
}

button.btn.ghost:hover:not(:disabled) {
  background: var(--el-color-primary-light-9);
}

/* Row actions: several small commands sit in one cell, so they wrap instead of
   stretching the column. */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 190px;
}

button.btn.sm {
  padding: 5px 12px;
  font-size: 12px;
  box-shadow: none;
  border-width: 1.5px;
}

.actions button.btn {
  white-space: nowrap;
}

button.btn.sm:active:not(:disabled) {
  transform: none;
}

button.btn.danger {
  border-color: #f56c6c;
  color: #c04545;
}

button.btn.danger:hover:not(:disabled) {
  background: #fdecec;
}

/* Checkbox row used inside a form field. */
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--el-text-color-regular);
  padding: 9px 0;
}

.check input {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  accent-color: var(--el-color-primary);
}

/* ---------------------------------------------------------------- slots */

.slots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.slot {
  min-width: 62px;
  padding: 5px 0;
  text-align: center;
  border-radius: 10px;
  border: 2px solid var(--el-color-primary);
  background: var(--el-color-primary-light-9);
  color: var(--el-color-primary-dark-2);
  font-weight: 800;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  background: var(--el-text-color-primary);
  color: #fffdf0;
  padding: 10px 18px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 12px #3d342840;
  z-index: 40;
  max-width: min(560px, 88vw);
}

.toast.err {
  background: #c04545;
}

/* Responsive: the sidebar collapses to a strip so tables keep their width. */
@media (max-width: 860px) {
  .shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 10px;
    border-right: none;
    border-bottom: 2px solid var(--el-border-color-light);
    overflow-x: auto;
  }

  .brand {
    padding: 0 8px 0 4px;
    font-size: 15px;
  }

  .nav-item {
    width: auto;
    padding: 8px 12px;
  }

  .sidebar-foot {
    display: none;
  }

  .content {
    padding: 14px;
  }
}
