@tailwind utilities;
@layer utilities {
 .field{display:block;width:100%;min-width:0;border:1px solid #cbd5e1;background:white;border-radius:12px;padding:11px 13px;color:#0f172a;font-size:14px;line-height:1.5;outline:none;transition:border-color .15s,box-shadow .15s}
 .field:focus{border-color:#059669;box-shadow:0 0 0 3px #10b98123}
 .primary{display:inline-flex;justify-content:center;align-items:center;gap:8px;border:1px solid #047857;background:#047857;color:white;font-size:13px;font-weight:750;border-radius:11px;padding:11px 17px;cursor:pointer;transition:background .15s}
 .primary:hover{background:#065f46}.primary:disabled,.secondary:disabled{opacity:.45;cursor:not-allowed}
 .secondary{display:inline-flex;justify-content:center;align-items:center;gap:6px;border:1px solid #cbd5e1;background:#fff;color:#334155;font-size:12px;font-weight:750;border-radius:10px;padding:10px 14px;cursor:pointer}
 .secondary:hover{background:#f1f5f9}
 .panel{background:#fff;border:1px solid #e2e8f0;border-radius:19px;box-shadow:0 5px 24px #0f172a05}
 .eyebrow{color:#059669;font-size:11px;letter-spacing:.16em;text-transform:uppercase;font-weight:800}
 .page-title{font-size:clamp(27px,3.4vw,37px);letter-spacing:-.04em;line-height:1.2;font-weight:850;margin-top:8px}
 .section-title{font-size:17px;letter-spacing:-.025em;font-weight:800}
 .subtitle{margin-top:7px;color:#64748b;font-size:14px;line-height:1.6}
 .th{padding:15px 20px;font-size:10px;letter-spacing:.09em;text-transform:uppercase;font-weight:800;color:#64748b}
 .td{padding:15px 20px;font-size:13px;vertical-align:middle}
 .label{font-weight:700;font-size:13px;color:#334155}
 .status-green,.status-amber,.status-red{display:inline-flex;align-items:center;border-radius:999px;padding:6px 10px;font-size:11px;font-weight:800;text-transform:capitalize;white-space:nowrap}
 .status-green{background:#dcfce7;color:#166534}.status-amber{background:#fef3c7;color:#92400e}.status-red{background:#fee2e2;color:#991b1b}
}


/* V16: white sidebar, natural-height admin and no clipped content. */
.admin-shell { min-height: 100vh; min-height: 100dvh; height: auto !important; overflow: visible !important; background: #f8fafc; }
.admin-shell .admin-layout { min-height: 100vh; min-height: 100dvh; height: auto !important; overflow: visible !important; align-items: stretch; }
.admin-shell .admin-content { min-width: 0; min-height: 100vh; min-height: 100dvh; height: auto !important; overflow: visible !important; }
.admin-shell .admin-main { min-height: calc(100vh - 74px); min-height: calc(100dvh - 74px); height: auto !important; max-height: none !important; overflow: visible !important; padding-bottom: 48px; }
.admin-shell .admin-sidebar { background: #fff !important; color: #172b25 !important; border-right: 1px solid #e2e8f0; box-shadow: 2px 0 18px rgba(12,44,31,.035); }
.admin-shell .admin-nav-item { width: 100%; color: #475569; border: 1px solid transparent; background: transparent; line-height: 1.45; text-align: left; }
.admin-shell .admin-nav-item:hover { color: #065f46; background: #f1f5f3; }
.admin-shell .admin-nav-item[aria-current="page"] { color: #065f46; background: #e8f5ed; border-color: #bce5ce; }
.admin-shell .admin-nav-item[aria-current="page"] .admin-nav-icon { background: #d1fae5; color: #065f46; }
.admin-shell .admin-nav-icon { flex: 0 0 28px; }
.admin-shell .admin-main .panel { height: auto; max-height: none; }
.admin-shell .admin-main .field { margin-bottom: 0; min-height: 44px; }
.admin-shell .admin-main textarea.field { min-height: 112px; resize: vertical; }
.admin-shell .admin-main iframe { max-width: 100%; }
.admin-shell .admin-content > header { min-height: 74px; height: auto; }
@media (min-width:1024px) {
 .admin-shell .admin-sidebar { position: relative !important; inset: auto !important; transform: none !important; flex: 0 0 256px; align-self: stretch; min-height: 100vh; min-height: 100dvh; }
}
@media (max-width:1023px) {
 .admin-shell .admin-sidebar { height: 100dvh; overflow-y: auto; overscroll-behavior: contain; }
 .admin-shell .admin-content { width: 100%; }
}

/* V17: Root cause fix. Public wizard's global overflow:hidden!important on
   html/body/#app prevented the entire /admin document from scrolling. */
@media (min-width: 901px) {
  html.admin-page,
  html.admin-page body,
  html.admin-page body #app {
    height: auto !important;
    max-height: none !important;
    min-height: 100% !important;
    overflow-x: clip !important;
    overflow-y: visible !important;
  }
}
html.admin-page { overflow-y: auto !important; scroll-behavior: auto; }
html.admin-page body { overflow-y: visible !important; }
html.admin-page body #app { overflow-y: visible !important; }
html.admin-page .admin-shell,
html.admin-page .admin-layout,
html.admin-page .admin-content,
html.admin-page .admin-main {
  height: auto !important;
  max-height: none !important;
  overflow-y: visible !important;
}
html.admin-page .admin-layout { align-items: stretch; }
/* Long tables retain horizontal scrolling, not a vertical clip. */
html.admin-page .admin-main .tw-overflow-x-auto { overflow-x: auto; }
