/* Fayvad Survey — Tailwind-compatible utilities (no Node build step).
   Regenerate: edit templates, then extend classes here as needed. */

:root {
  --color-primary: #059669;
  --color-primary-dark: #047857;
  --color-primary-light: #d1fae5;
  --color-surface: #f8fafc;
  --color-muted: #64748b;
  --color-border: #e2e8f0;
  --color-danger: #dc2626;
  --color-warning: #d97706;
  --color-info: #0284c7;
}

*, *::before, *::after { box-sizing: border-box; }

html { line-height: 1.5; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #0f172a;
  background: var(--color-surface);
  min-height: 100vh;
}

a { color: var(--color-primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Layout */
.container { width: 100%; max-width: 72rem; margin-left: auto; margin-right: auto; padding-left: 1rem; padding-right: 1rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.min-h-screen { min-height: 100vh; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }
.block { display: block; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

/* Spacing */
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.pt-16 { padding-top: 4rem; }
.pt-20 { padding-top: 5rem; }
.pb-8 { padding-bottom: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.ml-auto { margin-left: auto; }
.mr-2 { margin-right: 0.5rem; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

/* Typography */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.025em; }
.text-white { color: #fff; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #64748b; }
.text-slate-600 { color: #475569; }
.text-slate-700 { color: #334155; }
.text-slate-800 { color: #1e293b; }
.text-slate-900 { color: #0f172a; }
.text-emerald-600 { color: #059669; }
.text-emerald-700 { color: #047857; }
.text-red-600 { color: #dc2626; }
.text-red-700 { color: #b91c1c; }
.text-amber-800 { color: #92400e; }

/* Backgrounds */
.bg-white { background-color: #fff; }
.bg-slate-50 { background-color: #f8fafc; }
.bg-slate-100 { background-color: #f1f5f9; }
.bg-slate-800 { background-color: #1e293b; }
.bg-slate-900 { background-color: #0f172a; }
.bg-emerald-50 { background-color: #ecfdf5; }
.bg-emerald-600 { background-color: #059669; }
.bg-emerald-700 { background-color: #047857; }
.bg-red-50 { background-color: #fef2f2; }
.bg-red-600 { background-color: #dc2626; }
.bg-amber-50 { background-color: #fffbeb; }
.bg-amber-100 { background-color: #fef3c7; }
.bg-sky-50 { background-color: #f0f9ff; }

/* Borders & radius */
.border { border-width: 1px; border-style: solid; border-color: var(--color-border); }
.border-b { border-bottom: 1px solid var(--color-border); }
.border-t { border-top: 1px solid var(--color-border); }
.border-slate-200 { border-color: #e2e8f0; }
.border-slate-300 { border-color: #cbd5e1; }
.border-emerald-600 { border-color: #059669; }
.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-full { border-radius: 9999px; }
.shadow { box-shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04); }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.w-full { width: 100%; }
.w-64 { width: 16rem; }
.w-8 { width: 2rem; }
.h-8 { height: 2rem; }
.h-10 { height: 2.5rem; }
.h-16 { height: 4rem; }
.h-36 { height: 9rem; }
.w-36 { width: 9rem; }
.fixed { position: fixed; }
.absolute { position: absolute; }
.relative { position: relative; }
.inset-0 { inset: 0; }
.top-0 { top: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.z-10 { z-index: 10; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

/* Grid */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:flex { display: flex; }
  .md\:hidden { display: none; }
  .md\:block { display: block; }
  .md\:pl-64 { padding-left: 16rem; }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Forms */
.form-input,
.form-select,
.form-textarea,
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="file"], select, textarea {
  display: block;
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  background: #fff;
  color: #0f172a;
}
.form-input:focus, .form-select:focus, input:focus, select:focus, textarea:focus {
  outline: 2px solid #059669;
  outline-offset: 0;
  border-color: #059669;
}
.form-checkbox {
  width: 1rem; height: 1rem; accent-color: #059669;
}
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
  margin-bottom: 0.25rem;
}
.form-error { font-size: 0.875rem; color: #dc2626; margin-top: 0.25rem; }
.form-help { font-size: 0.875rem; color: #64748b; margin-top: 0.25rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.375rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: #059669; color: #fff; }
.btn-primary:hover { background: #047857; }
.btn-secondary { background: #fff; color: #334155; border-color: #cbd5e1; }
.btn-secondary:hover { background: #f8fafc; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-warning { background: #d97706; color: #fff; }
.btn-warning:hover { background: #b45309; }
.btn-ghost { background: transparent; color: #475569; }
.btn-ghost:hover { background: #f1f5f9; }
.btn-sm { padding: 0.25rem 0.625rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.75rem 1.25rem; font-size: 1rem; }
.btn-block { display: flex; width: 100%; }

/* Alerts */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  margin: 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.alert-success, .alert-info { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert-danger, .alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-close {
  background: none; border: none; font-size: 1.25rem; line-height: 1;
  cursor: pointer; color: inherit; opacity: 0.7; padding: 0;
}
.alert-close:hover { opacity: 1; }

/* Navbar */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: #fff; border-bottom: 1px solid #e2e8f0;
  height: 4rem;
}
.site-header-inner {
  max-width: 80rem; margin: 0 auto; padding: 0 1rem;
  height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.site-brand {
  display: flex; align-items: center; gap: 0.75rem;
  font-weight: 700; font-size: 1.125rem; color: #0f172a; text-decoration: none;
}
.site-brand:hover { text-decoration: none; color: #047857; }
.site-nav { display: none; align-items: center; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
@media (min-width: 768px) { .site-nav { display: flex; } }
.site-nav a {
  padding: 0.5rem 0.75rem; border-radius: 0.375rem;
  color: #475569; font-size: 0.875rem; font-weight: 500; text-decoration: none;
}
.site-nav a:hover, .site-nav a.active { background: #ecfdf5; color: #047857; text-decoration: none; }

/* Sidebar */
.app-sidebar {
  position: fixed; top: 4rem; left: 0; bottom: 0; width: 16rem;
  background: #0f172a; color: #cbd5e1; overflow-y: auto; z-index: 40;
  transform: translateX(-100%); transition: transform .2s ease;
}
.app-sidebar.open { transform: translateX(0); }
@media (min-width: 768px) { .app-sidebar { transform: translateX(0); } }
.app-sidebar-nav { list-style: none; margin: 0; padding: 1rem 0.75rem; }
.app-sidebar-nav > li { margin-bottom: 0.25rem; }
.app-sidebar-link {
  display: block; padding: 0.5rem 0.75rem; border-radius: 0.375rem;
  color: #cbd5e1; font-size: 0.875rem; text-decoration: none;
}
.app-sidebar-link:hover, .app-sidebar-link.active {
  background: #1e293b; color: #fff; text-decoration: none;
}
.app-sidebar-group-btn {
  display: flex; width: 100%; align-items: center; justify-content: space-between;
  padding: 0.5rem 0.75rem; border-radius: 0.375rem; border: none;
  background: transparent; color: #e2e8f0; font-size: 0.875rem; font-weight: 600;
  cursor: pointer; text-align: left;
}
.app-sidebar-group-btn:hover { background: #1e293b; }
.app-sidebar-sub { list-style: none; margin: 0.25rem 0 0.5rem 0; padding: 0 0 0 0.5rem; }

/* Main content area with sidebar */
.app-main { padding-top: 4rem; min-height: 100vh; }
@media (min-width: 768px) { .app-main.with-sidebar { padding-left: 16rem; } }

/* Hero */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #064e3b 100%);
  color: #fff; padding: 5rem 0 4rem; margin-top: 0;
}
.hero h1 { font-size: 2.5rem; font-weight: 700; margin: 0 0 1rem; }
.hero p { font-size: 1.125rem; color: #d1fae5; max-width: 36rem; margin-bottom: 1.5rem; }

/* Cards */
.card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 0.75rem;
  padding: 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.card h2, .card h3 { margin-top: 0; color: #0f172a; }
.card p { color: #475569; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid #e2e8f0; border-radius: 0.5rem; background: #fff; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.data-table th {
  background: #059669; color: #fff; text-align: left;
  padding: 0.75rem 1rem; font-weight: 600;
}
.data-table td { padding: 0.75rem 1rem; border-top: 1px solid #e2e8f0; vertical-align: middle; }
.data-table tbody tr:nth-child(even) { background: #f8fafc; }
.data-table tbody tr:hover { background: #ecfdf5; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5);
  z-index: 60; display: none; align-items: center; justify-content: center; padding: 1rem;
}
.modal-backdrop.open { display: flex; }
.modal-panel {
  background: #fff; border-radius: 0.75rem; width: 100%; max-width: 32rem;
  max-height: 90vh; overflow-y: auto; box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem; border-bottom: 1px solid #e2e8f0;
}
.modal-body { padding: 1.25rem; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 0.5rem;
  padding: 1rem 1.25rem; border-top: 1px solid #e2e8f0;
}

/* Pagination */
.pagination { display: flex; list-style: none; padding: 0; margin: 1.5rem 0; justify-content: center; gap: 0.25rem; flex-wrap: wrap; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.25rem; height: 2.25rem; padding: 0 0.5rem;
  border: 1px solid #e2e8f0; border-radius: 0.375rem; font-size: 0.875rem;
  text-decoration: none; color: #334155; background: #fff;
}
.pagination a:hover { background: #ecfdf5; border-color: #059669; color: #047857; text-decoration: none; }
.pagination .active span { background: #059669; color: #fff; border-color: #059669; }
.pagination .disabled span { color: #94a3b8; background: #f8fafc; }

/* Profile */
.avatar { border-radius: 9999px; object-fit: cover; border: 3px solid #d1fae5; }
.profile-list { list-style: none; padding: 0; margin: 0; border: 1px solid #e2e8f0; border-radius: 0.5rem; overflow: hidden; }
.profile-list li { padding: 0.75rem 1rem; border-bottom: 1px solid #e2e8f0; display: flex; justify-content: space-between; gap: 1rem; }
.profile-list li:last-child { border-bottom: none; }

/* Auth layout */
.auth-shell {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 2rem 1rem; background: linear-gradient(180deg, #ecfdf5 0%, #f8fafc 100%);
}

/* Footer */
.site-footer {
  border-top: 1px solid #e2e8f0; background: #fff; padding: 1.5rem 0; margin-top: auto;
  color: #64748b; font-size: 0.875rem;
}

/* Dropdown (Alpine) */
.dropdown-menu {
  position: absolute; right: 0; top: 100%; margin-top: 0.25rem;
  min-width: 10rem; background: #fff; border: 1px solid #e2e8f0;
  border-radius: 0.5rem; box-shadow: 0 10px 15px -3px rgba(0,0,0,.1);
  padding: 0.25rem; z-index: 50;
}
.dropdown-menu a {
  display: block; padding: 0.5rem 0.75rem; border-radius: 0.25rem;
  color: #334155; font-size: 0.875rem; text-decoration: none;
}
.dropdown-menu a:hover { background: #f1f5f9; text-decoration: none; }

.text-primary-600 { color: var(--color-primary); }
.h-full { height: 100%; }
.pt-2 { padding-top: 0.5rem; }
.pb-1 { padding-bottom: 0.25rem; }

/* Badges */
.badge {
  display: inline-block; padding: 0.125rem 0.5rem; border-radius: 9999px;
  font-size: 0.75rem; font-weight: 600; line-height: 1.25;
}
.badge-success { background: #d1fae5; color: #047857; }
.badge-muted { background: #f1f5f9; color: #64748b; }

[x-cloak] { display: none !important; }
