:root {
  --bg: #0f0e0d;
  --text: #f1ede8;
  --muted: #cfc7bd;
  --card: #1a1715;
  --accent: #d4a373; /* coffee caramel */
  --accent-2: #8c5a3b;
  --border: #2a2623;
}

:root.light {
  --bg: #fffaf5;
  --text: #1e1b18;
  --muted: #4a443d;
  --card: #ffffff;
  --accent: #8c5a3b;
  --accent-2: #d4a373;
  --border: #eee3d7;
}

/* === Base Styles === */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: min(1100px, 92%); margin: 0 auto; }

/* === Header === */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); }
.logo { font-size: 24px; }
.nav { margin-left: auto; display: flex; gap: 14px; flex-wrap: wrap; }
.nav a { color: var(--text); opacity: .9; font-size: 14px; }
.nav a:hover { opacity: 1; }
.theme-toggle {
  margin-left: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
}

/* === Dashboard === */
.dashboard-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  padding: 24px;
  min-height: 70vh;
}

.dashboard-box {
  background: #111;
  border: 1px solid #d6aa74;
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 950px;
  box-shadow: 0 0 15px rgba(214, 170, 116, 0.15);
}

.dashboard-icon {
  font-size: 42px;
  color: #d6aa74;
  margin-bottom: 8px;
}

.dashboard-box h1,
.dashboard-box h2 {
  margin-bottom: 16px;
  font-weight: 700;
  color: var(--text);
}

.backup-info p { margin: 4px 0; }

.backup-status {
  background: rgba(34,197,94,0.1);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 8px;
}

/* === Buttons (Unified Gold Style) === */
.btn-modern,
.btn-main,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  background: linear-gradient(135deg, #c59d5f, #d2a679);
  color: #111 !important;
  box-shadow: 0 0 12px rgba(197, 157, 95, 0.35);
  text-decoration: none;
  transition: all 0.25s ease;
}

.btn-modern:hover,
.btn-main:hover,
.btn-outline:hover {
  background: linear-gradient(135deg, #e3b86b, #f1d28b);
  box-shadow: 0 0 20px rgba(197, 157, 95, 0.55);
  transform: translateY(-2px);
  color: #111 !important;
}

/* 🧁 Light Mode */
:root.light .btn-modern,
:root.light .btn-main,
:root.light .btn-outline {
  background: linear-gradient(135deg, #c59d5f, #d2a679);
  color: #111 !important;
  box-shadow: 0 0 10px rgba(197, 157, 95, 0.25);
}
:root.light .btn-modern:hover,
:root.light .btn-main:hover,
:root.light .btn-outline:hover {
  background: linear-gradient(135deg, #e3b86b, #f1d28b);
  box-shadow: 0 0 20px rgba(197, 157, 95, 0.5);
}

/* ❌ Delete Button */
.btn-danger {
  background: #b91c1c;
  color: #fff !important;
  border: none;
  box-shadow: 0 0 10px rgba(185, 28, 28, 0.3);
}
.btn-danger:hover {
  background: #dc2626;
  box-shadow: 0 0 20px rgba(185, 28, 28, 0.5);
  transform: scale(1.05);
}

/* Button Group */
.dashboard-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 15px;
}

/* === Posts Section === */
.posts-section {
  background: #111;
  border: 1px solid #d6aa74;
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 950px;
  box-shadow: 0 0 15px rgba(214, 170, 116, 0.15);
}

.posts-section h2 {
  font-size: 24px;
  margin-bottom: 15px;
  color: var(--text);
}

.post-table-wrapper { overflow-x: auto; }

.post-table {
  width: 100%;
  border-collapse: collapse;
}

.post-table th,
.post-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
  max-width: 300px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.action-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
}

/* === Confirmation Popup === */
.confirm-box {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.confirm-content {
  background: #222;
  color: #fff;
  padding: 25px;
  border-radius: 10px;
  text-align: center;
  max-width: 320px;
}

.confirm-buttons {
  display: flex;
  justify-content: space-around;
  margin-top: 15px;
}

/* === Responsive === */
@media (max-width: 768px) {
  .dashboard-actions {
    flex-direction: column;
  }
  .action-buttons {
    flex-direction: column;
    gap: 8px;
  }
  .btn-modern {
    width: 100%;
  }
  .post-table th,
  .post-table td {
    padding: 8px;
    font-size: 14px;
  }
}

/* === Footer === */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 20px 0;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}
