@font-face {
  font-family: "Roboto";
  src: url("./fonts/Roboto-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Roboto";
  src: url("./fonts/Roboto-500.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Roboto";
  src: url("./fonts/Roboto-700.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f4efe6;
  --panel: #fffaf3;
  --panel-strong: #fffdf8;
  --line: #d8c8b0;
  --ink: #1f2a37;
  --muted: #6c7a84;
  --accent: #0f766e;
  --accent-soft: #d8f3ef;
  --danger: #c2410c;
  --danger-soft: #ffedd5;
  --shadow: 0 24px 50px rgba(31, 42, 55, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Roboto", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.14), transparent 30%),
    radial-gradient(circle at bottom right, rgba(194, 65, 12, 0.1), transparent 28%),
    var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  min-height: 100vh;
  display: flex;
}

.sidebar {
  width: 280px;
  padding: 28px 24px;
  background: rgba(255, 253, 248, 0.82);
  border-right: 1px solid rgba(216, 200, 176, 0.85);
  backdrop-filter: blur(20px);
}

.brand h1,
.page-head h2,
.card h3,
.auth-card h2 {
  margin: 0;
  font-family: "Roboto", "Trebuchet MS", sans-serif;
  font-weight: 700;
}

.brand p,
.muted,
.label,
.eyebrow {
  color: var(--muted);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  font-weight: 700;
}

.brand p span {
  font-size: 14px;
}

.nav {
  display: grid;
  gap: 10px;
  margin: 32px 0;
}

.nav-link,
.vault-item {
  border: 1px solid transparent;
  border-radius: 18px;
  padding: 14px 16px;
  transition: 0.2s ease;
}

.nav-link.active,
.nav-link:hover,
.vault-item.active,
.vault-item:hover {
  border-color: rgba(15, 118, 110, 0.24);
  background: rgba(216, 243, 239, 0.7);
}

.logout-form {
  margin-top: auto;
}

.wide {
  width: 100%;
}

.content {
  flex: 1;
  padding: 32px;
}

.content.standalone {
  display: grid;
  place-items: center;
}

.auth-card,
.card {
  background: rgba(255, 250, 243, 0.88);
  border: 1px solid rgba(216, 200, 176, 0.9);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.auth-card {
  width: min(100%, 480px);
  padding: 32px;
}

.page-head,
.card-head,
.split,
.workspace,
.stats-grid {
  display: grid;
  gap: 20px;
}

.page-head,
.card {
  margin-bottom: 24px;
}

.page-head {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stat-card strong {
  font-size: 28px;
  margin-top: 8px;
}

.split {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.split.wide {
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
}

.workspace {
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: start;
}

.rail,
.stack {
  display: grid;
  gap: 14px;
}

.grow {
  min-width: 0;
}

.narrow {
  align-self: start;
}

.card,
.inset {
  padding: 24px;
}

.inset {
  background: var(--panel-strong);
  border-radius: 22px;
  border: 1px solid rgba(216, 200, 176, 0.75);
}

.divider {
  height: 1px;
  background: rgba(216, 200, 176, 0.85);
}

label span {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
}

input,
textarea,
select,
button {
  font: inherit;
}

input,
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

textarea {
  resize: vertical;
}

button,
.primary-link,
.ghost,
.text-link,
.danger-link {
  border: 0;
  cursor: pointer;
}

button,
.primary-link,
.ghost {
  padding: 12px 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.primary,
.primary-link {
  background: var(--accent);
  color: white;
}

.ghost {
  background: rgba(216, 243, 239, 0.7);
  color: var(--accent);
}

.text-link {
  color: var(--accent);
  font-weight: 700;
  background: transparent;
  padding: 0;
}

.danger-link {
  color: var(--danger);
  background: transparent;
  padding: 0;
  font-weight: 700;
}

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

.checkbox input {
  width: auto;
}

.flash {
  margin-bottom: 20px;
  padding: 14px 18px;
  border-radius: 18px;
  font-weight: 600;
}

.flash.error {
  background: var(--danger-soft);
  color: var(--danger);
}

.flash.success {
  background: var(--accent-soft);
  color: var(--accent);
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(216, 200, 176, 0.7);
  text-align: left;
  vertical-align: top;
}

th {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.actions,
.inline-actions,
.member-item {
  display: flex;
  gap: 12px;
  align-items: center;
}

.inline-actions {
  flex-wrap: wrap;
}

.vault-list,
.log-list,
.member-list {
  display: grid;
  gap: 12px;
}

.vault-item strong,
.member-item strong {
  display: block;
}

.vault-item span,
.log-item span,
.member-item span {
  color: var(--muted);
  font-size: 14px;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
}

code {
  background: #f2ebe1;
  padding: 4px 8px;
  border-radius: 10px;
  white-space: pre-wrap;
}

@media (max-width: 980px) {
  .shell,
  .workspace,
  .split.wide,
  .page-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .sidebar {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid rgba(216, 200, 176, 0.85);
  }

  .content {
    padding: 20px;
  }
}
