.admin-body {
  min-width: 1200px;
  background: #f5f7fb;
  color: #172033;
}

.admin-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,122,69,0.22), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(74,125,255,0.24), transparent 30%),
    linear-gradient(135deg, #101828 0%, #1d2939 100%);
}

.admin-login-card {
  width: 420px;
  padding: 34px;
  border-radius: 24px;
  background: rgba(255,255,255,0.98);
  box-shadow: 0 28px 80px rgba(0,0,0,0.28);
}

.admin-login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.admin-login-logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #ff7a45, #e8490f);
  font-size: 20px;
  font-weight: 900;
}

.admin-login-brand h1 {
  font-size: 24px;
  font-weight: 900;
  color: #101828;
}

.admin-login-brand p {
  margin-top: 5px;
  font-size: 13px;
  color: #667085;
}

.admin-login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-login-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-login-form label span {
  font-size: 14px;
  font-weight: 700;
  color: #344054;
}

.admin-login-form input {
  height: 46px;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  padding: 0 14px;
  background: #fff;
  color: #101828;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.admin-login-form input:focus {
  border-color: #ff7a45;
  box-shadow: 0 0 0 4px rgba(255,122,69,0.14);
}

.admin-login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.admin-remember {
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
  color: #667085;
}

.admin-remember input {
  width: 15px;
  height: 15px;
}

.admin-login-options a {
  color: #e8490f;
  font-weight: 700;
}

.admin-login-btn {
  height: 48px;
  margin-top: 4px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #ff6b35, #e8490f);
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(232,73,15,0.28);
}

.admin-login-tip {
  margin-top: 18px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 13px;
  text-align: center;
}

.admin-shell {
  display: none;
}

.admin-body.is-authed .admin-login-page {
  display: none;
}

.admin-body.is-authed .admin-shell {
  display: flex;
}

.admin-shell {
  min-height: 100vh;
}

.admin-sidebar {
  width: 248px;
  padding: 24px 18px;
  background: #101828;
  color: #fff;
  display: flex;
  flex-direction: column;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 26px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.admin-brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ff7a45, #e8490f);
  font-weight: 800;
}

.admin-brand-title {
  font-size: 18px;
  font-weight: 800;
}

.admin-brand-subtitle {
  margin-top: 3px;
  font-size: 12px;
  color: #98a2b3;
}

.admin-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 22px;
}

.admin-menu-item {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  text-align: left;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s;
}

.admin-menu-item:hover,
.admin-menu-item.active {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.admin-back-link {
  margin-top: auto;
  padding: 12px 14px;
  border-radius: 12px;
  color: #f97316;
  background: rgba(249,115,22,0.12);
  font-size: 14px;
  text-align: center;
}

.admin-main {
  flex: 1;
  padding: 24px;
  overflow: auto;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.admin-header h1 {
  font-size: 28px;
  font-weight: 800;
  color: #101828;
}

.admin-header p {
  margin-top: 6px;
  font-size: 14px;
  color: #667085;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-user-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(16,24,40,0.06);
}

.admin-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #4a7dff;
  font-weight: 700;
}

.admin-user-name {
  font-size: 14px;
  font-weight: 700;
}

.admin-user-role {
  margin-top: 2px;
  font-size: 12px;
  color: #98a2b3;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.admin-stat-card,
.admin-panel {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(16,24,40,0.06);
}

.admin-stat-card {
  padding: 20px;
}

.stat-label {
  display: block;
  margin-bottom: 12px;
  font-size: 14px;
  color: #667085;
}

.admin-stat-card strong {
  display: block;
  font-size: 30px;
  line-height: 1;
  color: #101828;
}

.admin-stat-card small {
  display: block;
  margin-top: 12px;
  color: #16a34a;
}

.admin-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
}

.admin-panel {
  padding: 20px;
}

.admin-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 44px;
  margin-bottom: 16px;
}

.admin-panel-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  line-height: 44px;
}

.admin-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-toolbar input,
.admin-toolbar select {
  height: 40px;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  background: #fff;
  padding: 0 12px;
  color: #344054;
}

.admin-toolbar input {
  flex: 1;
}

.admin-primary-btn,
.admin-ghost-btn {
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

.admin-primary-btn {
  color: #fff;
  background: linear-gradient(135deg, #ff6b35, #e8490f);
}

#admin-create-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 128px;
  width: 128px;
  min-width: 128px;
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff7a45 0%, #f04438 48%, #d92d20 100%);
  box-shadow: 0 10px 24px rgba(240, 68, 56, .24), inset 0 1px 0 rgba(255, 255, 255, .28);
  letter-spacing: .2px;
  white-space: nowrap;
}

#admin-create-btn::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-right: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .22);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

#admin-create-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(240, 68, 56, .32), inset 0 1px 0 rgba(255, 255, 255, .32);
}

#admin-create-btn:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(240, 68, 56, .24), inset 0 2px 4px rgba(145, 32, 24, .18);
}

#admin-create-btn:focus-visible {
  outline: 3px solid rgba(255, 122, 69, .28);
  outline-offset: 3px;
}

#admin-create-btn[style*="display: none"] {
  display: none !important;
}

.admin-ghost-btn {
  color: #344054;
  background: #fff;
  border: 1px solid #e4e7ec;
}

.admin-table-wrap {
  overflow: hidden;
  border: 1px solid #eef2f6;
  border-radius: 14px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th,
.admin-table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid #eef2f6;
}

.admin-table th {
  color: #667085;
  background: #f8fafc;
  font-weight: 700;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.status-pill {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-success {
  color: #067647;
  background: #dcfae6;
}

.status-pending {
  color: #b54708;
  background: #fef0c7;
}

.status-failed {
  color: #b42318;
  background: #fee4e2;
}

.table-action {
  color: #4a7dff;
  font-weight: 700;
  cursor: pointer;
  margin-right: 10px;
}

.table-action.danger {
  color: #e5484d;
}

.table-empty {
  padding: 32px !important;
  text-align: center !important;
  color: #98a2b3;
}

.admin-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  color: #667085;
  font-size: 14px;
}

.admin-pager > div {
  display: flex;
  gap: 8px;
}

.admin-pager button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.admin-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16,24,40,0.55);
}

.admin-modal {
  width: 760px;
  max-height: 88vh;
  overflow: auto;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(16,24,40,0.28);
}

.admin-modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: #fff;
  border-bottom: 1px solid #eef2f6;
}

.admin-modal-head h3 {
  font-size: 20px;
  font-weight: 800;
}

.admin-modal-head button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f2f4f7;
  color: #667085;
  font-size: 22px;
}

.admin-user-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 24px;
}

.admin-user-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-user-form label span {
  color: #344054;
  font-size: 14px;
  font-weight: 700;
}

.admin-user-form input,
.admin-user-form select {
  height: 42px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  color: #101828;
}

.admin-modal-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 8px;
}

.todo-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.todo-item {
  padding: 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #eef2f6;
}

.todo-title {
  font-weight: 800;
  color: #101828;
}

.todo-desc {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: #667085;
}

@media (max-width: 1280px) {
  .admin-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .admin-panel-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  #admin-create-btn {
    flex-basis: auto;
    width: 100%;
  }
}
