:root {
  --ink: #181815;
  --paper: #f4efe6;
  --card-bg: #fffdf9;
  --gold: #b99b68;
  --gold-dark: #977b4d;
  --muted: #756f64;
  --line: #ded7c8;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Manrope', Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

header {
  height: 78px;
  background: #11120f;
  color: #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5.4%;
  border-bottom: 1px solid #ffffff1a;
}

header a {
  color: #c8b18a;
  font-size: 13px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: .05em;
  transition: color .2s;
}

header a:hover {
  color: #fff;
}

header div {
  display: flex;
  flex-direction: column;
  text-align: center;
  letter-spacing: .15em;
}

header b {
  font: 600 20px var(--serif);
  color: #f5eee3;
}

header small {
  font-size: 9px;
  color: var(--gold);
  letter-spacing: .18em;
  margin-top: 3px;
}

.admin-badge {
  font-size: 10px;
  letter-spacing: .15em;
  color: #11120f;
  background: var(--gold);
  padding: 5px 10px;
  border-radius: 2px;
  font-weight: 700;
}

.logout-btn {
  background: transparent;
  border: 1px solid #444;
  color: #ccc;
  padding: 6px 12px;
  font-size: 11px;
  cursor: pointer;
  letter-spacing: .08em;
}

main {
  max-width: 1200px;
  margin: 45px auto 80px;
  padding: 0 25px;
}

.notice, .panel {
  background: var(--card-bg);
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: 0 15px 40px rgba(23, 23, 20, 0.04);
}

.notice {
  max-width: 720px;
  margin: 50px auto;
}

.notice-icon {
  font-size: 32px;
  color: var(--gold);
  margin-bottom: 12px;
}

.notice h1 {
  font: 500 36px var(--serif);
  margin: 0 0 18px;
}

.notice p {
  font-size: 15px;
  color: #555047;
  line-height: 1.8;
}

.notice ol {
  padding-left: 20px;
  color: #555047;
  line-height: 2;
  margin: 20px 0;
}

.notice code {
  background: #ede6d8;
  padding: 2px 7px;
  font-family: monospace;
  font-size: 13px;
  border-radius: 2px;
}

.notice-footer {
  border-top: 1px solid var(--line);
  padding-top: 15px;
  font-size: 13px;
  color: #888;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: .2em;
  font-weight: 700;
  color: var(--gold-dark);
  text-transform: uppercase;
  margin: 0 0 8px;
}

.panel h1, .dash-head h1 {
  font: 500 clamp(36px, 4vw, 46px) var(--serif);
  margin: 0 0 10px;
  color: #171714;
}

.panel-sub {
  font-size: 14px;
  color: #726b60;
  margin: 0 0 24px;
}

.panel h2 {
  font: 500 26px var(--serif);
  margin: 0 0 18px;
}

.panel form {
  display: grid;
  gap: 18px;
}

.panel label {
  display: grid;
  gap: 7px;
  font-size: 11px;
  letter-spacing: .1em;
  font-weight: 700;
  text-transform: uppercase;
  color: #635d52;
}

.panel input, .panel select, .panel textarea {
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: #fff;
  font: 14px var(--sans);
  color: #1f1e1b;
  border-radius: 2px;
  outline: none;
  transition: border-color .2s;
}

.panel input:focus, .panel select:focus, .panel textarea:focus {
  border-color: var(--gold);
}

.panel button, .dash-head button, .btn-primary {
  border: 0;
  background: #171714;
  color: #f3efe6;
  padding: 14px 22px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .25s ease;
  border-radius: 2px;
}

.panel button:hover, .btn-primary:hover {
  background: var(--gold);
  color: #11120f;
}

.secondary {
  background: transparent !important;
  color: #171714 !important;
  border: 1px solid #b3a998 !important;
}

.secondary:hover {
  background: #eae3d5 !important;
  border-color: #171714 !important;
}

.btn-sm {
  padding: 7px 14px !important;
  font-size: 11px !important;
}

.error {
  color: #b52e24;
  font-size: 13px;
  margin: 8px 0;
}

.status {
  font-size: 13px;
  color: #3b7433;
  margin: 8px 0;
  font-weight: 600;
}

.dash-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 15px;
}

.signed-in-as {
  font-size: 12px;
  color: #797266;
  margin: 5px 0 0;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}

.tab {
  border: 0;
  background: none;
  padding: 12px 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #7c7569;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all .2s;
}

.tab:hover {
  color: #171714;
}

.tab.active {
  color: #171714;
  border-bottom-color: var(--gold);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 28px;
}

.admin-list {
  display: grid;
  gap: 16px;
}

.admin-item {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 18px;
  border-radius: 2px;
  position: relative;
  transition: box-shadow .2s;
}

.admin-item:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.05);
}

.admin-item img {
  width: 100px;
  height: 80px;
  object-fit: cover;
  border-radius: 2px;
  background: #ddd;
}

.admin-item-content {
  flex: 1;
}

.admin-item-content b {
  font: 600 18px var(--serif);
  color: #171714;
  display: block;
}

.admin-item-content small {
  display: block;
  color: #8c8273;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin: 3px 0 8px;
}

.admin-item-content p {
  font-size: 13px;
  color: #555047;
  margin: 5px 0 10px;
  line-height: 1.6;
}

.admin-item-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.btn-delete {
  padding: 6px 12px;
  background: #8b342e;
  color: #fff;
  border: 0;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.btn-delete:hover {
  background: #64201c;
}

.btn-edit {
  padding: 6px 12px;
  background: #ede6d8;
  color: #171714;
  border: 1px solid #cfc5b3;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.btn-edit:hover {
  background: var(--gold);
}

.btn-wa {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #25d366;
  color: #fff;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  border-radius: 2px;
  letter-spacing: .06em;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-radius: 2px;
}

.status-badge-new { background: #e8d08c; color: #5a400a; }
.status-badge-contacted { background: #cce5ff; color: #004085; }
.status-badge-in_progress { background: #d4edda; color: #155724; }
.status-badge-closed { background: #e2e3e5; color: #383d41; }
.status-badge-archived { background: #f8d7da; color: #721c24; }

/* Modal Styling */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(17, 18, 15, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-box {
  background: #fffdfa;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  border: 1px solid var(--line);
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
  border-radius: 2px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 15px;
  margin-bottom: 22px;
}

.modal-header h2 {
  margin: 0;
  font: 500 28px var(--serif);
}

.modal-close {
  background: none;
  border: 0;
  font-size: 22px;
  cursor: pointer;
  color: #777;
}

.empty {
  font-size: 14px;
  color: #8c8273;
  padding: 25px 0;
  text-align: center;
}

@media (max-width: 850px) {
  .split { grid-template-columns: 1fr; }
  .admin-item { flex-direction: column; }
  .admin-item img { width: 100%; height: 160px; }
  .admin-item-actions { flex-direction: row; align-items: center; width: 100%; justify-content: flex-end; }
  header { padding: 0 4%; }
  .admin-badge { display: none; }
}
