:root {
  --bg: #f4f2ed;
  --panel: #ffffff;
  --ink: #1d1d1f;
  --muted: #6f6f76;
  --accent: #cc7a00;
  --accent-2: #0d6b5c;
  --border: #e4e2dd;
  --shadow: 0 12px 30px rgba(25, 25, 25, 0.08);
  --radius: 16px;
  --font: "Plus Jakarta Sans", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(135deg, #f6efe2 0%, #f0f3f7 55%, #e8f0ec 100%);
  color: var(--ink);
  font-family: var(--font);
}

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

.sidebar {
  background: #121213;
  color: #f8f6f1;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

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

.brand-badge {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #f2c84b;
  color: #1f1600;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.brand-title {
  font-weight: 700;
  letter-spacing: 0.4px;
}

.brand-sub {
  font-size: 12px;
  color: #c8c7c2;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-section {
  margin-top: 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #c8c7c2;
}

.nav-item {
  background: transparent;
  border: 1px solid transparent;
  color: inherit;
  padding: 10px 12px;
  text-align: left;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
}

.nav-item:hover {
  border-color: rgba(248, 246, 241, 0.2);
}

.nav-item.is-active {
  background: #f2c84b;
  color: #1f1600;
}

.sidebar-foot {
  margin-top: auto;
}

.note {
  background: rgba(248, 246, 241, 0.08);
  padding: 12px;
  border-radius: 12px;
  font-size: 12px;
  color: #d2d0ca;
}

.main {
  padding: 28px 32px 40px;
}

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

.page-header h1 {
  margin: 0 0 6px;
  font-size: 28px;
}

.page-header p {
  margin: 0;
  color: var(--muted);
}

.filters {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.filters label {
  font-size: 12px;
  display: grid;
  gap: 6px;
}

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

input,
select,
textarea {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.content-section {
  display: none;
  margin-top: 28px;
  gap: 22px;
}

.content-section.is-active {
  display: grid;
}

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

.card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.card-label {
  color: var(--muted);
  font-size: 13px;
}

.card-value {
  font-size: 24px;
  font-weight: 700;
  margin-top: 10px;
}

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

.panel {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.panel h3 {
  margin-top: 0;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

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

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

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

thead th {
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 1;
}

tbody tr:hover {
  background: #f7f2e8;
}

th[data-sort] {
  cursor: pointer;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.form-grid .span-2 {
  grid-column: span 2;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.btn-small {
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 12px;
}

.table-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.table-footer {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.right-panel {
  padding: 28px 24px;
  background: #faf8f4;
  border-left: 1px solid var(--border);
}

.budget-list {
  display: grid;
  gap: 10px;
}

.budget-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f7f2e8;
}

.budget-item strong {
  display: block;
  margin-bottom: 6px;
}

.summary-inline {
  display: flex;
  gap: 14px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 80px 1fr;
  }

  .right-panel {
    display: none;
  }

  .sidebar {
    padding: 20px 12px;
  }

  .brand-sub,
  .brand-title {
    display: none;
  }

  .nav-item {
    font-size: 12px;
  }
}

@media (max-width: 720px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    flex-direction: row;
    overflow-x: auto;
    position: sticky;
    top: 0;
    z-index: 10;
  }

  .nav {
    flex-direction: row;
    gap: 6px;
  }

  .nav-section {
    display: none;
  }

  .main {
    padding: 20px;
  }
}
