/* SFMS — static CSS (no npm/Vite required) */

@import url('https://fonts.bunny.net/css?family=instrument-sans:400,500,600,700');

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

:root {
    --font-sans: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
    --sidebar-bg: #0F172A;
    --accent-primary: #6366F1;
    --accent-sky: #38BDF8;
    --bg-page: #F0F4FF;
    --bg-card: #FFFFFF;
    --border: #E2E8F4;
    --text-dark: #0F172A;
    --text-muted: #94A3B8;
    --success: #22C55E;
    --error: #F43F5E;
    --warning: #F59E0B;
    --neutral: #F1F5F9;
}

html, body { margin: 0; padding: 0; }

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    background: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Layout utilities ── */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.inline { display: inline; }
.grid { display: grid; }
.hidden { display: none; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1 1 0%; }
.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; }
.min-h-screen { min-height: 100vh; }
.min-w-0 { min-width: 0; }
.w-full { width: 100%; }
.w-8 { width: 2rem; }
.w-9 { width: 2.25rem; }
.w-10 { width: 2.5rem; }
.w-14 { width: 3.5rem; }
.h-8 { height: 2rem; }
.h-9 { height: 2.25rem; }
.h-10 { height: 2.5rem; }
.h-14 { height: 3.5rem; }
.max-w-md { max-width: 28rem; }
.max-w-3xl { max-width: 48rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.pt-2 { padding-top: 0.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.25rem; }
.ml-auto { margin-left: auto; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.text-center { text-align: center; }
.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-\[10px\] { font-size: 10px; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.leading-tight { line-height: 1.25; }
.text-white { color: #fff; }
.text-muted { color: var(--text-muted); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }
.rounded-2xl { border-radius: 1rem; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-white\/10 { border-color: rgba(255, 255, 255, 0.1); }
.border-gray-300 { border-color: #D1D5DB; }
.bg-white { background-color: #fff; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.opacity-60 { opacity: 0.6; }
.cursor-pointer { cursor: pointer; }
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.max-w-\[140px\] { max-width: 140px; }

@media (min-width: 640px) {
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, 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\:col-span-2 { grid-column: span 2 / span 2; }
}
@media (min-width: 1024px) {
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
    .xl\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25rem;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.75rem; }
.btn-icon {
    width: 2rem;
    height: 2rem;
    padding: 0;
    gap: 0;
}
.btn-icon i { font-size: 1rem; line-height: 1; }
.btn-primary { background: var(--accent-primary); color: #fff; }
.btn-primary:hover { background: #4F46E5; }
.btn-outline { background: transparent; color: var(--accent-primary); border-color: var(--accent-primary); }
.btn-outline:hover { background: #EEF2FF; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #16A34A; }
.btn-danger { background: var(--error); color: #fff; }
.btn-danger:hover { background: #E11D48; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #D97706; }
.btn-sky { background: var(--accent-sky); color: #fff; }
.btn-sky:hover { background: #0EA5E9; }
.btn-neutral { background: var(--neutral); color: var(--text-dark); border-color: var(--border); }
.btn-neutral:hover { background: #E2E8F0; }

/* ── Cards ── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

/* ── Badges ── */
.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.125rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
}
.badge-success { background: #DCFCE7; color: #166534; }
.badge-error { background: #FFE4E6; color: #BE123C; }
.badge-warning { background: #FEF3C7; color: #B45309; }

/* ── Forms ── */
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}
.form-input, .form-select {
    width: 100%;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    background: #fff;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus, .form-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.form-error { color: var(--error); font-size: 0.875rem; margin-top: 0.25rem; }

/* ── Sidebar ── */
.sidebar {
    background: var(--sidebar-bg);
    min-height: 100vh;
    width: 16rem;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 0.5rem;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    color: #94A3B8;
    text-decoration: none;
    transition: background-color 0.15s, color 0.15s;
}
.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}
.sidebar-link.active {
    background: rgba(56, 189, 248, 0.15);
    color: var(--accent-sky);
}
.sidebar-link.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Alerts ── */
.alert {
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}
.alert-success { background: #DCFCE7; color: #166534; border: 1px solid #BBF7D0; }
.alert-error { background: #FFE4E6; color: #BE123C; border: 1px solid #FECDD3; }

/* ── DataTables ── */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    background: #fff;
    width: auto;
    display: inline-block;
}
table.dataTable thead th {
    border-bottom: 1px solid var(--border) !important;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
table.dataTable tbody td {
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    font-size: 0.875rem;
}
table.dataTable.no-footer { border-bottom: none; }
