:root {
  --primary: #ffdd00;
  --dark: #272525;
  --dark-soft: #4b4846;
  --text-muted: #6b6866;
  --border: #e7e3df;
  --radius-sm: 10px;
  --radius-md: 16px;
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

body {
  margin: 0;
  font-family: var(--font-family);
  background-color: #F8FAFC;
  color: #272525;
}

* {
  box-sizing: border-box;
}

.admin-login-box {
  max-width: 430px;
  margin: 10vh auto;
  padding: 38px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(30, 24, 15, 0.1);
  text-align: center;
}

.form-group {
  margin: 16px 0;
  text-align: left;
}

.form-label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 700;
  color: #333;
}

.form-input, .form-textarea, select.form-input {
  width: 100%;
  border: 1px solid #d9d4ce;
  border-radius: 9px;
  padding: 12px;
  font: inherit;
  font-size: 14px;
  background: #fff;
  box-sizing: border-box;
}

.form-input:focus, .form-textarea:focus, select.form-input:focus {
  outline: none;
  border-color: #945B00;
  box-shadow: 0 0 0 3px rgba(255, 221, 0, 0.25);
}

.btn-support-submit {
  background: var(--primary);
  border: 0;
  border-radius: 9px;
  padding: 13px 18px;
  font-weight: 800;
  font: inherit;
  cursor: pointer;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.1s ease, filter 0.1s ease;
}

.btn-support-submit:hover {
  filter: brightness(0.96);
  transform: translateY(-1px);
}

.admin-header {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  background: #fff;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-logo, .nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.nav-btn {
  border-radius: 999px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-secondary {
  background: #FAF8F0;
  color: #272525;
}

.btn-dark {
  background: #272525;
  color: #fff;
}

.admin-layout {
  display: grid;
  grid-template-columns: 215px 1fr;
  gap: 34px;
  padding-top: 35px;
}

.admin-sidebar {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-nav-item {
  background: transparent;
  border: 0;
  text-align: left;
  padding: 11px 14px;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: #4b4846;
  transition: background 0.15s ease;
}

.admin-nav-item:hover {
  background: #f1ede8;
}

.admin-nav-item.active {
  background: #fff0a0;
  font-weight: 800;
  color: #272525;
}

.pane-title {
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 4px 0;
}

.pane-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 20px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 20px;
}

.stat-card, .post-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
}

.stat-card-title {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.stat-card-value {
  font-size: 22px;
  font-weight: 800;
  margin-top: 6px;
  color: #272525;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.data-table th, .data-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.data-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
}

.admin-pane {
  padding-bottom: 60px;
}

.status-badge {
  padding: 4px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  display: inline-block;
}

.status-success {
  background: #dff5e4;
  color: #17692b;
}

.status-pending {
  background: #fff2cf;
  color: #885a00;
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  backdrop-filter: blur(3px);
}

.modal-backdrop.active {
  display: flex;
}

.modal-dialog {
  background: #fff;
  border-radius: 18px;
  max-width: 620px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 30px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  position: relative;
  animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #64748b;
  line-height: 1;
}

.badge-status-active {
  background: #def7ec;
  color: #03543f;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
  display: inline-block;
}

.badge-status-suspended {
  background: #fee2e2;
  color: #991b1b;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
  display: inline-block;
}

.badge-role-admin {
  background: #dbeafe;
  color: #1e40af;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
  display: inline-block;
}

.badge-role-creator {
  background: #fef3c7;
  color: #92400e;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
  display: inline-block;
}

.btn-action {
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 7px;
  border: 1px solid #d9d4ce;
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: #272525;
}

.btn-action:hover {
  background: #f8fafc;
}

.btn-action-primary {
  background: #0045b4;
  color: #fff;
  border-color: #0045b4;
}

.btn-action-primary:hover {
  background: #003487;
}

.btn-action-warning {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.btn-action-warning:hover {
  background: #fef3c7;
}

.btn-action-danger {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.btn-action-danger:hover {
  background: #fee2e2;
}

.impersonate-bar {
  background: #fef3c7;
  border-bottom: 1px solid #f59e0b;
  padding: 10px 24px;
  font-size: 13.5px;
  color: #92400e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 900;
}

.toast-msg {
  display: none;
  position: fixed;
  z-index: 10000;
  right: 20px;
  bottom: 20px;
  max-width: 380px;
  padding: 12px 18px;
  border-radius: 10px;
  background: #262626;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  font-size: 13.5px;
  font-weight: 600;
}

.toast-msg.show {
  display: flex;
  gap: 8px;
  align-items: center;
  animation: toastIn 0.2s ease-out;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media(max-width: 750px) {
  .container { padding: 0 16px; }
  .admin-header { padding: 10px 0; }
  .nav-content { flex-wrap: wrap; align-items: center; gap: 8px; }
  .brand-logo { min-width: 0; gap: 7px; font-size: 13px; line-height: 1.3; }
  .brand-logo { flex: 1 1 100%; }
  .brand-logo > span:nth-child(2) { min-width: 0; }
  .brand-logo > span:nth-child(3) { flex: 0 0 auto; font-size: 9px !important; padding: 3px 6px !important; }
  .nav-links { flex: 1 1 100%; justify-content: flex-end; gap: 5px; }
  .nav-btn { min-height: 34px; padding: 7px 9px; font-size: 11px; white-space: nowrap; }
  .admin-layout { grid-template-columns: 1fr; gap: 20px; padding-top: 20px; }
  .admin-content-pane, .admin-pane { min-width: 0; }
  .admin-sidebar { flex-direction: row; overflow-x: auto; gap: 7px; margin: 0 -16px; padding: 0 16px 5px; scrollbar-width: thin; }
  .admin-nav-item { flex: 0 0 auto; padding: 9px 11px; font-size: 12px; white-space: nowrap; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .admin-login-box { margin: 6vh 20px; }
  .pane-title { font-size: 22px; line-height: 1.2; }
  .pane-subtitle { line-height: 1.5; }
  .data-table { min-width: 640px; }
  .modal-backdrop { padding: 12px; }
  .modal-dialog { max-height: calc(100vh - 24px); padding: 24px 18px; }
  .toast-msg { right: 12px; bottom: 12px; max-width: calc(100vw - 24px); }
}
