/* ============================================================
   Dr. Abukar — Admin panel styles
   Pairs with files/styles.css tokens + Tailwind CDN.
   ============================================================ */

.admin-body { background: #f5f6f8; min-height: 100vh; }

/* ---------- sidebar ---------- */
.adm-shell { display: flex; min-height: 100vh; }
.adm-sidebar {
  position: fixed; top: 0; left: 0; height: 100vh; width: 264px; z-index: 50;
  background: var(--c-navy-dark); color: rgba(255,255,255,0.7);
  display: flex; flex-direction: column; transform: translateX(-100%);
  transition: transform .3s ease;
}
.adm-sidebar.is-open { transform: translateX(0); }
@media (min-width: 1024px) { .adm-sidebar { transform: none; position: sticky; } }
.adm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.adm-brand { height: 68px; display: flex; align-items: center; gap: 12px; padding: 0 22px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.adm-navgroup { padding: 18px 12px; flex: 1; overflow-y: auto; }
.adm-navlabel { padding: 0 12px; margin-bottom: 8px; font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,0.32); }
.adm-link { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 9px; font-size: 14.5px; font-weight: 500; color: rgba(255,255,255,0.65); transition: all .18s ease; margin-bottom: 2px; cursor: pointer; }
.adm-link:hover { color: #fff; background: rgba(255,255,255,0.05); }
.adm-link.is-active { color: #fff; background: rgba(255,255,255,0.10); }
.adm-link.is-active .adm-ic { color: var(--c-gold); }
.adm-ic { display: inline-flex; }
.adm-badge { margin-left: auto; background: var(--c-gold); color: var(--c-navy-dark); font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; min-width: 20px; text-align: center; }
.adm-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,0.08); }

/* ---------- topbar ---------- */
.adm-topbar { position: sticky; top: 0; z-index: 30; height: 68px; background: #fff; border-bottom: 1px solid rgba(22,36,61,0.08); display: flex; align-items: center; justify-content: space-between; padding: 0 20px; }
@media (min-width: 1024px) { .adm-topbar { padding: 0 32px; } }
.adm-iconbtn { width: 40px; height: 40px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; color: var(--c-navy); transition: background .18s ease; cursor: pointer; }
.adm-iconbtn:hover { background: #f5f6f8; }
.adm-search { width: 200px; padding: 8px 12px 8px 36px; border-radius: 9px; background: #f5f6f8; border: 1px solid rgba(22,36,61,0.1); font-size: 14px; color: var(--c-navy); outline: none; }
.adm-search:focus { border-color: rgba(22,36,61,0.3); }

.adm-content { padding: 22px 20px; }
@media (min-width: 1024px) { .adm-content { padding: 32px; } }
/* allow grid/flex children to shrink below content size (prevents mobile overflow) */
.adm-content [class*="grid"] { min-width: 0; }
.adm-content [class*="grid"] > * { min-width: 0; }

/* ---------- cards / tables ---------- */
.adm-card { background: #fff; border: 1px solid rgba(22,36,61,0.08); border-radius: var(--radius-card); box-shadow: 0 1px 2px rgba(22,36,61,0.05), 0 4px 14px -8px rgba(22,36,61,0.14); }
.adm-table { width: 100%; text-align: left; border-collapse: collapse; min-width: 640px; }
.adm-table thead tr { border-bottom: 1px solid rgba(22,36,61,0.08); background: rgba(245,246,248,0.6); }
.adm-table th { padding: 13px 20px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #5a6677; }
.adm-table td { padding: 14px 20px; border-bottom: 1px solid rgba(22,36,61,0.06); }
.adm-table tbody tr:last-child td { border-bottom: none; }
.adm-table tbody tr { transition: background .15s ease; }
.adm-table tbody tr:hover { background: rgba(245,246,248,0.7); }
.adm-rowbtn { width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: #5a6677; transition: all .15s ease; cursor: pointer; }
.adm-rowbtn:hover { background: #f5f6f8; color: var(--c-navy); }
.adm-rowbtn.danger:hover { background: #fef2f2; color: #dc2626; }

/* ---------- drawer ---------- */
.adm-drawer-wrap { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.adm-drawer-wrap.is-open { pointer-events: auto; }
.adm-drawer-scrim { position: absolute; inset: 0; background: rgba(14,24,39,0.4); opacity: 0; transition: opacity .3s ease; }
.adm-drawer-wrap.is-open .adm-drawer-scrim { opacity: 1; }
.adm-drawer { position: absolute; right: 0; top: 0; height: 100%; width: 100%; max-width: 460px; background: #f5f6f8; box-shadow: -10px 0 40px -12px rgba(14,24,39,0.4); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .3s ease; }
.adm-drawer-wrap.is-open .adm-drawer { transform: translateX(0); }
.adm-drawer-head { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid rgba(22,36,61,0.08); background: #fff; flex-shrink: 0; }
.adm-drawer-body { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.adm-drawer-foot { padding: 18px 20px; border-top: 1px solid rgba(22,36,61,0.08); background: #fff; display: flex; gap: 12px; flex-shrink: 0; }

/* ---------- form fields ---------- */
.adm-label { display: block; font-size: 14px; font-weight: 500; color: var(--c-navy); margin-bottom: 6px; }
.adm-input { width: 100%; padding: 10px 14px; border-radius: 11px; background: #fff; border: 1px solid rgba(22,36,61,0.12); font-size: 15px; color: var(--c-navy); outline: none; font-family: inherit; transition: border-color .18s ease; }
.adm-input:focus { border-color: rgba(22,36,61,0.4); }
textarea.adm-input { resize: none; }
.adm-select { appearance: none; background-image: none; cursor: pointer; }
.adm-dropzone { border: 2px dashed rgba(22,36,61,0.15); border-radius: 12px; padding: 26px; text-align: center; cursor: pointer; transition: border-color .18s ease; background: #fff; }
.adm-dropzone:hover { border-color: rgba(22,36,61,0.32); }

/* ---------- misc ---------- */
.adm-scrim-m { display: none; }
@media (max-width: 1023px) { .adm-scrim-m.is-open { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(14,24,39,0.45); } }
.adm-chartbar { width: 100%; border-radius: 8px 8px 0 0; background: linear-gradient(to top, var(--c-navy), var(--c-navy-soft)); position: relative; }

/* ---------- toast ---------- */
.adm-toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 80; display: flex; flex-direction: column; gap: 10px; }
.adm-toast { display: flex; align-items: center; gap: 12px; background: var(--c-navy-dark); color: #fff; padding: 13px 18px 13px 13px; border-radius: 12px; font-size: 14.5px; font-weight: 500; box-shadow: 0 10px 30px -8px rgba(14,24,39,0.5); transform: translateX(120%); opacity: 0; transition: transform .3s cubic-bezier(.22,.61,.36,1), opacity .3s ease; max-width: 340px; }
.adm-toast.show { transform: none; opacity: 1; }
.adm-toast-ic { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--c-navy-dark); flex-shrink: 0; }

/* ---------- confirm dialog ---------- */
.adm-confirm-wrap { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 20px; }
.adm-confirm-scrim { position: absolute; inset: 0; background: rgba(14,24,39,0.45); opacity: 0; transition: opacity .25s ease; }
.adm-confirm-wrap.show .adm-confirm-scrim { opacity: 1; }
.adm-confirm { position: relative; background: #fff; border-radius: 16px; padding: 28px; width: 100%; max-width: 380px; text-align: center; box-shadow: 0 24px 60px -18px rgba(14,24,39,0.5); transform: scale(.94); opacity: 0; transition: transform .25s cubic-bezier(.22,.61,.36,1), opacity .25s ease; }
.adm-confirm-wrap.show .adm-confirm { transform: none; opacity: 1; }
.adm-confirm-ic { width: 52px; height: 52px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: rgba(224,182,74,0.15); color: var(--c-gold-dark); }
.adm-formmodal { max-width: 440px; text-align: left; }

/* ---------- toolbar search ---------- */
.adm-tbsearch { position: relative; width: 100%; max-width: 280px; }
@media (max-width: 640px) { .adm-tbsearch { max-width: none; } }
.adm-tbsearch input { width: 100%; padding: 9px 14px 9px 38px; border-radius: 999px; background: #fff; border: 1px solid rgba(22,36,61,0.12); font-size: 14.5px; color: var(--c-navy); outline: none; transition: border-color .18s ease; font-family: inherit; }
.adm-tbsearch input:focus { border-color: rgba(22,36,61,0.4); }
.adm-tbsearch .adm-tbsearch-ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #5a6677; pointer-events: none; }
.adm-tbsearch .adm-tbsearch-clear { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: #5a6677; cursor: pointer; display: none; width: 22px; height: 22px; border-radius: 999px; align-items: center; justify-content: center; }
.adm-tbsearch.has-val .adm-tbsearch-clear { display: inline-flex; }
.adm-tbsearch .adm-tbsearch-clear:hover { background: #f5f6f8; color: var(--c-navy); }
.adm-empty { padding: 48px 20px; text-align: center; color: #5a6677; }
.adm-empty-ic { width: 52px; height: 52px; border-radius: 14px; background: rgba(22,36,61,0.05); color: rgba(22,36,61,0.35); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }
