:root {
  --seed-accent: #C49100;
  --seed-accent-light: rgba(196,145,0,0.08);
  --seed-accent-10: rgba(196,145,0,0.13);
}

body {
  background: var(--scaffold-bg);
}

.appbar {
  padding: 6px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--border-color);
  gap: 2px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.appbar-title {
  font-size: 15px;
  font-weight: 700;
}

.appbar-user {
  font-size: 12px;
  color: var(--text-secondary);
  margin-right: 4px;
}

.appbar-action,
.tab-btn {
  width: 36px;
  height: 36px;
  color: var(--text-secondary);
  border-radius: 8px;
}

.appbar-action:hover,
.appbar-action.active,
.tab-btn:hover,
.tab-btn.active {
  background: var(--seed-10);
  color: var(--seed);
}

.appbar-action .material-icons-outlined,
.tab-btn .material-icons-outlined {
  font-size: 20px;
}

.page-body {
  padding: 24px 20px;
  max-width: 1280px;
  margin: 0 auto;
}

.card {
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 18px;
}

.card-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 14px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(46,125,50,0.10);
  border-radius: 16px;
  background: var(--white);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}

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

th {
  background: linear-gradient(180deg, #f8fcf8 0%, #eef6ee 100%);
  font-weight: 700;
  text-align: left;
  padding: 13px 14px;
  white-space: nowrap;
  border-bottom: 1px solid rgba(46,125,50,0.14);
  color: #43604a;
  cursor: pointer;
  user-select: none;
  position: relative;
  letter-spacing: 0.01em;
}

th:hover {
  background: linear-gradient(180deg, #f1f8f1 0%, #e8f2e8 100%);
}

th .sort-icon {
  font-size: 13px;
  vertical-align: middle;
  color: var(--seed);
}

th .resize-handle {
  position: absolute;
  top: 0;
  right: 0;
  width: 5px;
  height: 100%;
  cursor: col-resize;
  background: transparent;
  z-index: 1;
}

th .resize-handle:hover,
th .resize-handle.active {
  background: var(--seed);
  opacity: .35;
}

td {
  padding: 11px 14px;
  border-bottom: 1px solid #f1f4f1;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #243626;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: linear-gradient(90deg, rgba(46,125,50,0.05) 0%, rgba(46,125,50,0.02) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04);
}

.badge-pending {
  background: #FFF8E1;
  color: #F57F17;
}

.badge-approved {
  background: #E8F5E9;
  color: #2E7D32;
}

.badge-deleted {
  background: #FAFAFA;
  color: #9E9E9E;
}

.badge-rejected {
  background: #FFEBEE;
  color: #C62828;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(46,125,50,0.04);
  cursor: pointer;
  border-radius: 10px;
  color: var(--text-secondary);
  transition: background .12s, color .12s, transform .12s;
}

.action-btn .material-icons-outlined {
  font-size: 18px;
}

.action-btn:hover {
  background: var(--seed-10);
  color: var(--seed);
  transform: translateY(-1px);
}

.action-btn.danger:hover {
  background: #FFEBEE;
  color: #C62828;
}

.action-btn:disabled {
  opacity: .4;
  pointer-events: none;
}

.snackbar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  min-width: 320px;
  max-width: 90vw;
  padding: 14px 24px;
  border-radius: 12px;
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  z-index: 3000;
  text-align: center;
  transition: transform .3s ease;
  pointer-events: none;
}

.snackbar.visible {
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.snackbar.success {
  background: var(--seed);
}

.snackbar.error {
  background: var(--error);
}

.empty-state {
  padding: 28px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

.modal-overlay,
.confirm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay {
  z-index: 2000;
}

.confirm-overlay {
  z-index: 2100;
}

.modal-overlay.active,
.confirm-overlay.active {
  display: flex;
}

.modal-box,
.confirm-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 40px rgba(0,0,0,.18);
}

.modal-box {
  padding: 28px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
}

.confirm-box {
  padding: 24px 24px 20px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
}

.modal-title,
.confirm-box h3 {
  font-weight: 700;
}

.modal-title {
  font-size: 18px;
  margin-bottom: 18px;
}

.confirm-box h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

.modal-actions,
.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.modal-actions {
  margin-top: 20px;
}

.fields-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.field-half {
  width: 100%;
}

@media (min-width: 520px) {
  .field-half {
    width: calc(50% - 7px);
  }
}
