:root {
  --ink: #19201f;
  --muted: #66716f;
  --paper: #f7f5ef;
  --surface: #ffffff;
  --line: #ded9cf;
  --green: #286855;
  --green-dark: #174638;
  --blue: #315f7d;
  --gold: #b5832e;
  --red: #9d4b3f;
  --shadow: 0 20px 60px rgba(25, 32, 31, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

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

button {
  cursor: pointer;
}

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

.hidden {
  display: none !important;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.mini-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.mini-brand span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: var(--green);
  color: white;
  font-size: 23px;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: clamp(28px, 7vw, 90px);
  align-items: center;
  padding: clamp(24px, 5vw, 72px);
}

.login-copy h1 {
  max-width: 10ch;
  margin: 34px 0 18px;
  font-size: clamp(48px, 7vw, 82px);
  line-height: 0.96;
}

.login-copy p {
  max-width: 58ch;
  color: var(--muted);
  font-size: 18px;
}

.demo-users {
  display: grid;
  gap: 10px;
  max-width: 560px;
  margin-top: 28px;
}

.demo-users button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  padding: 14px;
  text-align: left;
}

.demo-users strong,
.demo-users span {
  display: block;
}

.demo-users span {
  color: var(--muted);
  font-size: 13px;
}

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

.login-card {
  display: grid;
  gap: 16px;
  padding: 24px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink);
  padding: 0 12px;
}

textarea {
  min-height: 112px;
  padding-top: 10px;
  resize: vertical;
}

button,
.button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: white;
  font-weight: 900;
  padding: 0 16px;
}

.secondary {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

.danger {
  background: var(--red);
}

.form-message {
  min-height: 20px;
  margin: 0;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
}

.shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 250px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  gap: 28px;
  padding: 22px;
  background: var(--green-dark);
  color: white;
}

.sidebar .mini-brand span {
  background: #e8c269;
  color: var(--green-dark);
}

.sidebar nav {
  display: grid;
  gap: 8px;
}

.sidebar nav button,
.logout {
  justify-content: flex-start;
  background: rgba(255, 255, 255, 0.09);
  text-align: left;
}

.sidebar nav button.active {
  background: white;
  color: var(--green-dark);
}

.logout {
  margin-top: auto;
}

.workspace {
  min-width: 0;
  padding: clamp(18px, 4vw, 46px);
}

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

.workspace-header h2 {
  margin: 0;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1;
}

.session-pill {
  display: grid;
  min-width: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 12px;
}

.session-pill span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.session-pill strong {
  overflow-wrap: anywhere;
}

.warning {
  margin-bottom: 20px;
  border: 1px solid rgba(181, 131, 46, 0.4);
  border-radius: 8px;
  background: rgba(181, 131, 46, 0.12);
  color: #725018;
  font-weight: 800;
  padding: 12px 14px;
}

.panel-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
  align-items: start;
}

.card {
  padding: clamp(18px, 3vw, 26px);
}

.form-card,
.case-form {
  display: grid;
  gap: 14px;
}

.card h3 {
  margin: 0;
  font-size: 22px;
}

.card h4 {
  margin: 0 0 12px;
}

.card-title {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.table,
.cases,
.logs {
  display: grid;
  gap: 10px;
}

.row,
.case-card,
.log-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  padding: 14px;
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.row strong,
.row span {
  display: block;
}

.row span,
.case-card p,
.log-row span {
  color: var(--muted);
}

.tag {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  background: rgba(40, 104, 85, 0.12);
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  padding: 5px 9px;
}

.tag.warn {
  background: rgba(181, 131, 46, 0.15);
  color: #725018;
}

.tag.bad {
  background: rgba(157, 75, 63, 0.13);
  color: var(--red);
}

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

.social-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf6;
  padding: 16px;
}

.social-row {
  display: grid;
  grid-template-columns: 0.8fr 1.3fr 0.7fr auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
}

.case-card {
  display: grid;
  gap: 12px;
}

.case-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.case-top h4 {
  margin: 0 0 4px;
  font-size: 18px;
}

.case-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.social-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.social-list a,
.social-list span {
  border-radius: 999px;
  background: rgba(49, 95, 125, 0.1);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  padding: 6px 9px;
}

.log-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 12px;
}

.log-row b {
  color: var(--gold);
}

@media (max-width: 920px) {
  .login-screen,
  .shell,
  .panel-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

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

  .form-row,
  .social-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .login-copy h1 {
    font-size: 42px;
  }

  .row,
  .log-row {
    grid-template-columns: 1fr;
  }
}
