:root {
  --gold: #c9962b;
  --gold-d: #9e7419;
  --gold-soft: #fbf3df;
  --bg: #faf8f4;
  --card: #ffffff;
  --text: #2a2622;
  --muted: #8b857c;
  --line: #ebe6dc;
  --green: #2f9e6b;  --green-soft: #e5f5ed;
  --red: #d64545;    --red-soft: #fdeded;
  --amber: #d99a1e;  --amber-soft: #fdf2da;
  --blue: #3b7fd0;   --blue-soft: #e7f0fb;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 12px rgba(0,0,0,.03);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: Inter, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.mt { margin-top: 16px; }

/* Layout */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; top: 0; bottom: 0; left: 0; width: 240px;
  background: #fff; border-right: 1px solid var(--line);
  padding: 18px 12px; display: flex; flex-direction: column;
  overflow-y: auto; z-index: 50; transition: transform .25s;
}
.brand {
  font-family: Georgia, serif; font-size: 22px; text-align: center;
  color: var(--gold-d); padding: 4px 0 22px;
}
.brand span { color: var(--text); }
.nav-title {
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); padding: 16px 12px 6px;
}
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px; color: #4b463f;
}
.nav-link:hover { background: #f6f3ee; }
.nav-link.active { background: var(--gold-soft); color: var(--gold-d); font-weight: 600; }
.sidebar-footer { margin-top: auto; padding-top: 16px; }

.main { margin-left: 240px; flex: 1; padding: 22px 32px 40px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.topbar-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.bell { font-size: 18px; cursor: pointer; }
.user-chip {
  display: flex; align-items: center; gap: 8px; background: #fff;
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px 5px 5px; font-weight: 500;
}
.user-chip::before {
  content: ""; width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #e8c77a);
}
.menu-btn { display: none; }
.backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 40; }

/* Page head & cards */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-family: Georgia, serif; font-size: 32px; font-weight: 500; }
.eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px;
}
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h2 { font-size: 16px; font-weight: 600; }

.grid { display: grid; gap: 16px; }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.g-2 { grid-template-columns: 1.6fr 1fr; }

/* Stat */
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-icon {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--gold-soft); font-size: 18px; margin-bottom: 8px;
}
.stat-value { font-size: 26px; font-weight: 700; }
.stat-label { color: var(--muted); }
.stat-sub { font-size: 12px; color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font-weight: 500; transition: background .15s;
}
.btn:hover { background: #f6f3ee; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-d); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-danger { color: var(--red); }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-block { width: 100%; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 500; border: 1px solid var(--line); background: #fff; white-space: nowrap;
}
.badge.green { background: var(--green-soft); color: var(--green); border-color: transparent; }
.badge.red   { background: var(--red-soft);   color: var(--red);   border-color: transparent; }
.badge.amber { background: var(--amber-soft); color: #b77a0c;     border-color: transparent; }
.badge.blue  { background: var(--blue-soft);  color: var(--blue);  border-color: transparent; }

/* Progress */
.progress { height: 8px; background: #f3efe7; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--gold); border-radius: inherit; transition: width .4s; }
.progress.green > span { background: var(--green); }
.progress.red > span { background: var(--red); }
.bar-block + .bar-block { margin-top: 18px; }
.bar-top { display: flex; justify-content: space-between; margin-bottom: 8px; }
.bar-top b { font-weight: 600; }

/* Form controls */
.input, .select {
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; outline: none; min-width: 0;
}
.input:focus, .select:focus { border-color: var(--gold); }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font-size: 13px;
}
.tab.active { background: var(--text); color: #fff; border-color: var(--text); }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.toolbar-left { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 500; padding: 10px; border-bottom: 1px solid var(--line); }
td { padding: 12px 10px; border-bottom: 1px solid #f3efe7; }
.empty { text-align: center; color: var(--muted); padding: 30px; }

/* Task row */
.task-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 4px;
  border-bottom: 1px solid #f3efe7;
}
.task-row:last-child { border-bottom: none; }
.task-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--gold); cursor: pointer; }
.task-main { flex: 1; min-width: 0; }
.task-title { font-weight: 500; }
.task-sub { font-size: 12px; color: var(--muted); }

/* Modal */
.modal {
  position: fixed; inset: 0; background: rgba(30,25,20,.35);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 16px;
}
.modal.open { display: flex; }
.modal-box {
  background: #fff; border-radius: var(--radius); padding: 24px;
  width: 100%; max-width: 480px; box-shadow: 0 20px 50px rgba(0,0,0,.15);
}
.modal-box h3 { font-size: 18px; margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.form-grid .full { grid-column: 1 / -1; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* Toast */
.toast-wrap { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast {
  background: var(--text); color: #fff; padding: 10px 16px; border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,.15); animation: fadeIn .2s ease;
}
.toast.error { background: var(--red); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Dashboard extras */
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.mini { background: #faf7f1; border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.mini b { font-size: 20px; }
.mini span { font-size: 12px; color: var(--muted); }

.alert-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border-radius: 10px; margin-top: 10px;
  background: var(--red-soft); color: var(--red); border: 1px solid #f7d0d0;
}
.alert-item.amber { background: var(--amber-soft); color: #9a6a10; border-color: #f2e0b5; }

.wedding {
  display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 12px;
  background: #faf7f1; margin-bottom: 12px;
}
.wedding-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: #fff; font-size: 20px; border: 1px solid var(--line);
}
.wedding-info { flex: 1; }
.wedding-info b { display: block; font-weight: 600; }

.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.quick {
  padding: 14px; border-radius: 12px; border: 1px dashed #d8cfbf;
  text-align: center; font-weight: 500; background: #fff;
}
.quick:hover { border-color: var(--gold); background: var(--gold-soft); color: var(--gold-d); }

/* Guests extras */
.avatar {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--gold-soft); color: var(--gold-d); font-weight: 600; margin-right: 10px; vertical-align: middle;
}
.guest-name { display: inline-flex; align-items: center; font-weight: 500; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
td.actions { width: 110px; }
.status-select {
  padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; font-size: 13px; cursor: pointer;
}

/* Responsive */
@media (max-width: 1100px) {
  .g-4 { grid-template-columns: repeat(2, 1fr); }
  .g-2 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; padding: 16px; }
  .menu-btn { display: inline-flex; }
}
@media (max-width: 560px) {
  .g-4 { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .page-head h1 { font-size: 26px; }
}