:root {
  --green-900: #0e2419;
  --green-800: #14352a;
  --gold-500: #c7a25a;
  --paper: #f6f4ee;
  --line: rgba(20, 53, 42, .14);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, system-ui, Segoe UI, sans-serif; background: var(--paper); color: #102018; }
a { color: var(--green-800); text-decoration: none; font-weight: 700; }
.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 250px;
  max-height: 100vh;
  overflow-y: auto;
  background: var(--green-900);
  color: white;
  padding: 24px;
}
.admin-brand { font-family: Georgia, serif; color: var(--gold-500); font-size: 1.35rem; margin-bottom: 28px; }
.admin-sidebar nav { display: grid; gap: 8px; }
.admin-sidebar a { color: #dce8e1; padding: 10px 12px; border-radius: 6px; }
.admin-sidebar a:hover { background: rgba(255,255,255,.08); color: var(--gold-500); }
.admin-main { margin-left: 250px; padding: 32px; max-width: 1260px; }
h1 { color: var(--green-800); margin: 0 0 24px; }
.flash { background: #e8f0eb; border-left: 4px solid var(--green-800); padding: 14px 16px; margin-bottom: 18px; }
.flash.error { background: #fbecec; border-left-color: #7a2020; color: #7a2020; }
.toolbar { display: flex; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.button, button { background: var(--gold-500); border: 0; color: var(--green-900); border-radius: 4px; padding: 10px 14px; cursor: pointer; font-weight: 800; }
.button.secondary { background: white; border: 1px solid var(--line); }
.button.small, button.small { padding: 7px 10px; font-size: .82rem; }
button.danger { background: #7a2020; color: white; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.admin-dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.metric, .panel, table { background: white; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 18px 42px -36px rgba(0,0,0,.45); }
.metric { padding: 20px; }
.metric b { display: block; font-size: 2rem; color: var(--green-800); }
.panel { padding: 20px; margin-bottom: 18px; }
table { width: 100%; border-collapse: collapse; overflow: hidden; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #edf1ed; color: var(--green-800); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; }
tr:last-child td { border-bottom: 0; }
label { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: #68786f; font-weight: 800; margin: 14px 0 6px; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 4px; padding: 11px 12px; font: inherit; background: white; }
textarea { min-height: 140px; resize: vertical; font-family: ui-monospace, Consolas, monospace; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.lang-panel { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 18px; }
.muted { color: #68786f; font-size: .9rem; }
.panel h2 { margin: 4px 0 8px; color: var(--green-800); }
.panel-divider { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  text-transform: none;
  letter-spacing: 0;
  color: #102018;
  font-size: .95rem;
  margin: 14px 0 4px;
}
.check-row input { width: auto; }
.status { display: inline-block; padding: 4px 8px; border-radius: 999px; background: #edf1ed; font-size: .8rem; }
.message-preview { color: #34463b; font-size: .92rem; line-height: 1.45; }
.table-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 210px; }
.table-actions form { margin: 0; }
.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 24px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(14, 36, 25, .58); }
.modal-panel {
  position: relative;
  width: min(780px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  background: white;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 30px 90px -36px rgba(0,0,0,.65);
  padding: 22px;
}
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.modal-head h2 { margin: 0 0 4px; color: var(--green-800); }
.modal-head p { margin: 0; }
.inquiry-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.inquiry-detail-grid div { border: 1px solid var(--line); border-radius: 6px; padding: 10px; background: #f8faf8; }
.inquiry-detail-grid strong { display: block; color: var(--green-800); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.inquiry-detail-grid span { color: #34463b; }
.message-box { border: 1px solid var(--line); border-radius: 6px; padding: 14px; background: #fffdf8; line-height: 1.65; white-space: normal; }
.inquiry-motors { display: grid; gap: 8px; margin-top: 10px; }
.inquiry-motor {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8faf8;
  padding: 8px;
}
.inquiry-motor strong { display: block; color: var(--green-800); margin-bottom: 4px; }
.inquiry-motor span {
  display: inline-block;
  margin: 0 8px 4px 0;
  color: #34463b;
  font-size: .86rem;
}
@media (max-width: 860px) {
  .admin-sidebar { position: static; width: auto; }
  .admin-main { margin-left: 0; padding: 20px; }
  .grid, .admin-dashboard-grid, .form-grid, .inquiry-detail-grid { grid-template-columns: 1fr; }
  .modal { padding: 12px; }
}
