:root {
  color-scheme: light;
  --bg: #f7f9fb;
  --surface: #ffffff;
  --surface-muted: #f4f6f8;
  --text: #131619;
  --text-soft: #3f4754;
  --muted: #6e7681;
  --line: #dfe3e8;
  --line-strong: #c9d0d8;
  --zoom-blue: #0b5cff;
  --zoom-blue-hover: #0a53e4;
  --zoom-blue-active: #0847c5;
  --zoom-blue-soft: #e7f0ff;
  --success: #1f8f4d;
  --danger: #d93025;
  --shadow-soft: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-card: 0 10px 28px rgba(16, 24, 40, 0.08);
  font-family:
    "Almaden Sans", "Helvetica Neue", Helvetica, Arial, ui-sans-serif,
    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition:
    background 120ms ease,
    border-color 120ms ease,
    color 120ms ease,
    box-shadow 120ms ease;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

a {
  color: var(--zoom-blue);
}

h1,
h2,
p {
  margin: 0;
}

h1,
h2 {
  color: var(--text);
  font-weight: 600;
}

h1 {
  font-size: 24px;
  line-height: 1.25;
}

h2 {
  font-size: 18px;
  line-height: 1.3;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 88px 24px 32px;
  background: var(--bg);
}

.login-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  min-height: 64px;
  border-bottom: 1px solid var(--line);
  padding: 0 32px;
  background: var(--surface);
  z-index: 10;
}

.login-panel {
  width: min(420px, 100%);
  padding: 40px 40px 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.login-brand .brand-mark {
  width: 52px;
  height: 52px;
}

.login-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: var(--zoom-blue);
  color: #ffffff;
}

.brand-mark svg {
  width: 62%;
  height: 62%;
}

.brand-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.brand-text span {
  color: var(--zoom-blue);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  background: var(--bg);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  border-right: 1px solid var(--line);
  padding: 22px 16px;
  background: var(--surface);
}

.side-nav {
  display: grid;
  gap: 4px;
}

.side-nav-item {
  position: relative;
  min-height: 40px;
  display: flex;
  align-items: center;
  border-radius: 8px;
  padding: 0 14px 0 34px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.side-nav-item::before {
  content: "";
  position: absolute;
  left: 14px;
  width: 8px;
  height: 8px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.7;
}

.side-nav-item:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.side-nav-active,
.side-nav-active:hover {
  background: var(--zoom-blue-soft);
  color: var(--zoom-blue);
  font-weight: 700;
}

.side-nav-active::before {
  border-color: var(--zoom-blue);
  background: var(--zoom-blue);
  opacity: 1;
}

.app-main {
  min-width: 0;
  padding: 28px 32px 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.page-eyebrow {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-pill,
.user-pill {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
}

.status-pill {
  gap: 7px;
  border-color: #c7ebd7;
  color: var(--success);
}

.status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 20px;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 20px 24px;
}

.panel-header p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.panel-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.panel-body {
  padding: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.field {
  display: grid;
  gap: 8px;
}

.field-spaced {
  margin-top: 16px;
}

.field-full {
  grid-column: 1 / -1;
}

label,
.field-label {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="number"] {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 9px 12px;
  background: #ffffff;
  color: var(--text);
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease;
}

input:hover {
  border-color: #aeb8c4;
}

input:focus {
  border-color: var(--zoom-blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(11, 92, 255, 0.16);
}

.actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.button-primary {
  background: var(--zoom-blue);
  color: #ffffff;
  padding: 0 22px;
}

.button-primary:hover {
  background: var(--zoom-blue-hover);
  box-shadow: 0 4px 10px rgba(11, 92, 255, 0.2);
}

.button-primary:active {
  background: var(--zoom-blue-active);
}

.button-secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--text-soft);
  padding: 0 16px;
}

.button-secondary:hover {
  border-color: var(--zoom-blue);
  color: var(--zoom-blue);
}

.button-wide {
  width: 100%;
  margin-top: 22px;
  min-height: 44px;
  font-size: 15px;
}

.message {
  margin-top: 16px;
  border-radius: 8px;
  padding: 11px 12px;
  font-size: 13px;
  font-weight: 600;
}

.message-error {
  border: 1px solid #f3c5c0;
  background: #fff1f0;
  color: var(--danger);
}

.message-info {
  border: 1px solid #c7ebd7;
  background: #f0fff6;
  color: var(--success);
}

.result-panel-shell {
  position: sticky;
  top: 28px;
}

.result-empty {
  display: grid;
  min-height: 220px;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}

.result-list {
  display: grid;
  gap: 16px;
}

.result-item {
  display: grid;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.result-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

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

.result-value code,
.result-value a {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

code {
  border-radius: 6px;
  background: var(--zoom-blue-soft);
  padding: 3px 7px;
  color: var(--zoom-blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.copy-button {
  min-width: 58px;
  min-height: 30px;
  flex: 0 0 auto;
  border-color: var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 12px;
  padding: 0 10px;
}

.copy-button:hover {
  border-color: var(--zoom-blue);
  color: var(--zoom-blue);
}

.loading {
  display: grid;
  min-height: 100vh;
  place-items: center;
  color: var(--muted);
}

@media (max-width: 900px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    gap: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 16px;
  }

  .side-nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .side-nav-item {
    min-width: max-content;
  }

  .app-main {
    padding: 20px 16px 36px;
  }

  .topbar,
  .content-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .content-grid {
    display: grid;
  }

  .result-panel-shell {
    position: static;
  }

  .toolbar,
  .actions {
    width: 100%;
  }

  .toolbar {
    flex-wrap: wrap;
  }

  .actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .toolbar button,
  .actions button {
    flex: 1;
  }
}

@media (max-width: 520px) {
  .login-shell {
    padding: 88px 16px 24px;
  }

  .login-topbar {
    padding: 0 18px;
  }

  .login-panel,
  .panel-body,
  .panel-header {
    padding: 20px;
  }

  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .result-value {
    align-items: stretch;
    flex-direction: column;
  }
}
