/* Compliance 231 - Stylesheet locale (no CDN) */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: #1f2937;
  background: #f9fafb;
  line-height: 1.5;
  min-height: 100vh;
}
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 600; }
p { margin: 0 0 0.5rem 0; }
a { color: #1F4E78; text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }
table { border-collapse: collapse; width: 100%; }
pre { font-family: 'Courier New', monospace; }
hr { border: 0; border-top: 1px solid #e5e7eb; margin: 0.5rem 0; }

/* ============= BRAND COLORS ============= */
:root {
  --brand: #1F4E78;
  --brand-50: #eff6ff;
  --brand-100: #dbeafe;
  --brand-500: #1F4E78;
  --brand-600: #1a4266;
  --brand-700: #153655;
  --brand-800: #102a44;
}

/* ============= LAYOUT ============= */
.min-h-screen { min-height: 100vh; }
.h-full { height: 100%; }
.w-full { width: 100%; }
.w-10 { width: 2.5rem; }
.w-16 { width: 4rem; }
.w-40 { width: 10rem; }
.w-64 { width: 16rem; }
.h-2 { height: 0.5rem; }
.h-10 { height: 2.5rem; }
.h-16 { height: 4rem; }
.max-w-md { max-width: 28rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-\[1400px\] { max-width: 1400px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.my-8 { margin-top: 2rem; margin-bottom: 2rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-0\.5 { margin-bottom: 0.125rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-4 { margin-left: 1rem; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }

.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-12 { padding: 3rem; }
.p-0 { padding: 0; }
.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.pb-4 { padding-bottom: 1rem; }
.pt-4 { padding-top: 1rem; }
.pl-4 { padding-left: 1rem; }

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.block { display: block; }
.inline-block { display: inline-block; }
.hidden { display: none; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid-cols-6 { grid-template-columns: repeat(6, 1fr); }
.grid-cols-7 { grid-template-columns: repeat(7, 1fr); }
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
  .md\:grid-cols-6 { grid-template-columns: repeat(6, 1fr); }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
}

.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }

.fixed { position: fixed; }
.absolute { position: absolute; }
.relative { position: relative; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-4 { top: 1rem; }
.right-4 { right: 1rem; }
.z-50 { z-index: 50; }
.z-\[60\] { z-index: 60; }

.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.overflow-x-auto { overflow-x: auto; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.whitespace-pre-wrap { white-space: pre-wrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============= TYPOGRAPHY ============= */
.text-xs { font-size: 12px; }
.text-sm { font-size: 13px; }
.text-base { font-size: 14px; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 18px; }
.text-2xl { font-size: 22px; }
.text-3xl { font-size: 28px; }
.text-5xl { font-size: 40px; }
.leading-none { line-height: 1; }
.font-mono { font-family: 'Courier New', Consolas, Monaco, monospace; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.italic { font-style: italic; }
.underline { text-decoration: underline; }

/* ============= COLORS ============= */
.text-white { color: #ffffff; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.text-brand-500 { color: var(--brand-500); }
.text-brand-700 { color: var(--brand-700); }
.text-blue-600 { color: #2563eb; }
.text-blue-800 { color: #1e40af; }
.text-green-600 { color: #16a34a; }
.text-red-500 { color: #ef4444; }
.text-red-600 { color: #dc2626; }
.text-yellow-600 { color: #ca8a04; }
.text-yellow-800 { color: #854d0e; }
.text-amber-600 { color: #d97706; }

.bg-white { background-color: #ffffff; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-200 { background-color: #e5e7eb; }
.bg-gray-700 { background-color: #374151; }
.bg-brand-500 { background-color: var(--brand-500); }
.bg-brand-600 { background-color: var(--brand-600); }
.bg-brand-50 { background-color: var(--brand-50); }
.bg-blue-50 { background-color: #eff6ff; }
.bg-blue-100 { background-color: #dbeafe; }
.bg-blue-600 { background-color: #2563eb; }
.bg-green-600 { background-color: #16a34a; }
.bg-red-50 { background-color: #fef2f2; }
.bg-red-100 { background-color: #fee2e2; }
.bg-red-500 { background-color: #ef4444; }
.bg-red-600 { background-color: #dc2626; }
.bg-yellow-50 { background-color: #fefce8; }
.bg-yellow-100 { background-color: #fef9c3; }
.bg-yellow-600 { background-color: #ca8a04; }
.bg-black\/40 { background-color: rgba(0,0,0,0.4); }

/* ============= BORDERS ============= */
.border { border: 1px solid #e5e7eb; }
.border-t { border-top: 1px solid #e5e7eb; }
.border-b { border-bottom: 1px solid #f3f4f6; }
.border-l-4 { border-left-width: 4px; border-left-style: solid; }
.border-r { border-right: 1px solid #e5e7eb; }
.border-gray-100 { border-color: #f3f4f6; }
.border-gray-200 { border-color: #e5e7eb; }
.border-gray-300 { border-color: #d1d5db; }
.border-blue-200 { border-color: #bfdbfe; }
.border-red-300 { border-color: #fca5a5; }
.border-yellow-200 { border-color: #fef08a; }
.border-l-brand-500 { border-left-color: var(--brand-500); }
.border-b-2 { border-bottom: 2px solid transparent; }
.border-brand-500 { border-color: var(--brand-500); }

.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }

/* ============= SHADOWS ============= */
.shadow-sm { box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.shadow-lg { box-shadow: 0 10px 15px rgba(0,0,0,0.1); }
.shadow-xl { box-shadow: 0 20px 25px rgba(0,0,0,0.1); }

/* ============= HOVERS ============= */
.hover\:bg-gray-50:hover { background-color: #f9fafb; }
.hover\:bg-gray-100:hover { background-color: #f3f4f6; }
.hover\:bg-gray-200:hover { background-color: #e5e7eb; }
.hover\:bg-brand-50:hover { background-color: var(--brand-50); }
.hover\:bg-brand-100:hover { background-color: var(--brand-100); }
.hover\:bg-brand-600:hover { background-color: var(--brand-600); }
.hover\:bg-red-50:hover { background-color: #fef2f2; }
.hover\:bg-red-600:hover { background-color: #dc2626; }
.hover\:text-brand-500:hover { color: var(--brand-500); }
.hover\:text-white:hover { color: #ffffff; }
.hover\:text-gray-700:hover { color: #374151; }
.hover\:underline:hover { text-decoration: underline; }

.cursor-pointer { cursor: pointer; }
.opacity-70 { opacity: 0.7; }

.transition { transition: all 0.15s ease; }
.outline-none:focus { outline: none; }

.focus\:ring-2:focus { box-shadow: 0 0 0 2px rgba(31,78,120,0.3); }
.focus\:border-brand-500:focus { border-color: var(--brand-500); }

/* ============= COMPONENT: FORM ============= */
.form-input {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background: #fff;
  transition: all 0.15s ease;
  outline: none;
  font-size: 14px;
}
.form-input:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 2px rgba(31,78,120,0.25);
}
.form-input[readonly] { background: #f3f4f6; }

/* ============= COMPONENT: BUTTON ============= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.25;
}
.btn-primary { background: var(--brand-500); color: #fff; }
.btn-primary:hover { background: var(--brand-600); text-decoration: none; color: #fff; }
.btn-secondary { background: #f3f4f6; color: #374151; }
.btn-secondary:hover { background: #e5e7eb; text-decoration: none; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; text-decoration: none; color: #fff; }
.btn-ghost {
  color: var(--brand-500);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 12px;
  transition: background 0.15s ease;
}
.btn-ghost:hover { background: var(--brand-50); text-decoration: none; }

/* ============= COMPONENT: CARD ============= */
.card {
  background: #fff;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  padding: 1.25rem;
}

/* ============= COMPONENT: NAV ============= */
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  border-radius: 0.375rem;
  font-size: 13px;
  color: #374151;
  text-decoration: none;
  transition: all 0.15s ease;
  width: 100%;
  text-align: left;
}
.nav-link:hover { background: var(--brand-50); color: var(--brand-500); text-decoration: none; }
.nav-link.active { background: var(--brand-500); color: #fff; }
.nav-link.active:hover { background: var(--brand-600); color: #fff; }

/* ============= COMPONENT: BADGE ============= */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.badge-yellow { background: #fef9c3; color: #854d0e; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-gray { background: #f3f4f6; color: #374151; }

/* ============= COMPONENT: DATA TABLE ============= */
.data-table { width: 100%; font-size: 13px; }
.data-table th {
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--brand-500);
  color: #fff;
}
.data-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #f3f4f6;
}
.data-table tr:hover td { background: #f9fafb; }

/* ============= COMPONENT: MODAL ============= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 50;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
}
.modal-backdrop > div {
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 20px 25px rgba(0,0,0,0.15);
  width: 100%;
  max-width: 42rem;
  margin: 2rem 0;
}

/* ============= COMPONENT: CALENDAR ============= */
.calendar-day {
  border: 1px solid #e5e7eb;
  padding: 0.5rem;
  min-height: 80px;
  font-size: 11px;
  position: relative;
  background: #fff;
}
.calendar-day .evt {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--brand-50);
  color: var(--brand-700);
  border-radius: 0.25rem;
  padding: 0.125rem 0.25rem;
  margin-bottom: 0.125rem;
  cursor: pointer;
  font-size: 10px;
}
.calendar-day .evt:hover { background: var(--brand-100); }
.calendar-day.today { background: #fefce8; }
.calendar-day.other-month { background: #f9fafb; color: #9ca3af; }

/* ============= SPIN ============= */
.spin { animation: spin 0.6s linear infinite; border: 4px solid var(--brand-500); border-top-color: transparent; border-radius: 50%; width: 2.5rem; height: 2.5rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.border-4 { border-width: 4px; }
.border-brand-500 { border-color: var(--brand-500); }
.border-t-transparent { border-top-color: transparent; }
