:root {
  --bg: #f3f5f4;
  --panel: #ffffff;
  --panel-soft: #eef3f0;
  --text: #10231e;
  --muted: #5d6f68;
  --line: #d8e1dc;
  --brand: #0a7f6f;
  --brand-strong: #075d52;
  --accent: #c98c2c;
  --danger: #aa3a3a;
  --shadow: 0 18px 45px rgba(16, 35, 30, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(10, 127, 111, 0.08), transparent 24%), linear-gradient(180deg, #f7f9f8 0%, var(--bg) 100%);
  color: var(--text);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

a {
  color: var(--brand-strong);
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, #0e201c 0%, #15312a 100%);
  color: #f4fbf8;
  padding: 32px 22px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand-lockup {
  display: grid;
  gap: 8px;
}

.brand-name {
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 700;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--accent);
}

.nav-stack {
  display: grid;
  gap: 10px;
}

.nav-link {
  color: rgba(255, 255, 255, 0.82);
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.nav-link.active,
.nav-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.sidebar-meta {
  margin-top: auto;
  padding: 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.meta-row span {
  color: rgba(255, 255, 255, 0.68);
}

.content {
  padding: 28px;
  display: grid;
  gap: 22px;
}

.page-hero,
.page-head,
.panel,
.stat-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(216, 225, 220, 0.9);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.page-hero,
.page-head,
.panel {
  padding: 24px;
}

.page-hero h1,
.page-head h1 {
  margin-bottom: 10px;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.page-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

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

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  padding: 22px;
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 10px;
}

.stat-card strong {
  font-size: 2rem;
}

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

.form-stack {
  display: grid;
  gap: 16px;
}

.inline-form,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

label span,
.detail-list dt {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

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

textarea {
  resize: vertical;
}

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

.checkbox-row input {
  width: auto;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 14px;
  border: 0;
  cursor: pointer;
}

.button-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-strong) 100%);
  color: #ffffff;
}

.button-secondary {
  background: var(--panel-soft);
  color: var(--text);
}

.button-ghost {
  background: transparent;
  color: var(--brand-strong);
  padding: 0;
}

.table-wrap {
  overflow-x: auto;
}

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

th,
td {
  text-align: left;
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

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

.detail-list {
  display: grid;
  gap: 12px;
}

.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.detail-list dd,
.detail-list dt {
  margin: 0;
}

.activity-list {
  display: grid;
  gap: 14px;
}

.activity-item {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcfb;
  display: grid;
  gap: 6px;
}

.alert {
  padding: 14px 16px;
  border-radius: 16px;
}

.alert-success {
  background: #e8f7f1;
  color: #145948;
}

.alert-danger {
  background: #fbe9e9;
  color: #7a2323;
}

.alert-info {
  background: #ebf4f8;
  color: #214e66;
}

.empty-state {
  color: var(--muted);
  padding: 16px 0;
}

.narrow-panel {
  max-width: 640px;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: stretch;
}

.login-copy,
.login-card .panel {
  padding: 30px;
}

.login-copy {
  background: linear-gradient(160deg, #12342d 0%, #0a7f6f 100%);
  color: #ffffff;
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.login-copy p {
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.05rem;
  line-height: 1.6;
}

@media (max-width: 1100px) {
  .app-shell,
  .login-card,
  .stats-grid,
  .grid-two {
    grid-template-columns: 1fr;
  }

  .sidebar {
    padding-bottom: 18px;
  }

  .content {
    padding: 18px;
  }
}
