/* ==========================================================================
   Bulut ERP & Finans - Pure Tailwind CSS Enterprise Design System
   Standard: Modern Light SaaS Theme (TailAdmin / Tremor / Flowbite)
   Zero Bootstrap CSS dependency.
   ========================================================================== */

:root {
    --erp-primary: #4f46e5;
    --erp-primary-hover: #4338ca;
    --erp-sidebar-bg: #ffffff;
    --erp-sidebar-border: #e2e8f0;
    --erp-sidebar-text: #475569;
    --erp-sidebar-hover: #f8fafc;
    --erp-sidebar-active: #eef2ff;
    --erp-sidebar-active-text: #4338ca;
    --erp-body-bg: #f8fafc;
    --erp-card-bg: #ffffff;
    --erp-card-border: #e2e8f0;
}

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

body {
    background-color: var(--erp-body-bg);
    color: #0f172a;
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.875rem;
    letter-spacing: -0.01em;
    overflow-x: hidden;
    margin: 0;
}

/* Custom Sleek Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ==========================================================================
   Sidebar (Modern Enterprise Light Theme)
   ========================================================================== */
.erp-sidebar {
    width: 268px;
    background-color: var(--erp-sidebar-bg);
    color: var(--erp-sidebar-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--erp-sidebar-border);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1030;
    flex-shrink: 0;
}

.erp-sidebar .brand {
    padding: 1.15rem 1.25rem;
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    letter-spacing: -0.025em;
    text-decoration: none;
}

.erp-sidebar .brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.erp-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 0.75rem;
}

.erp-sidebar-nav .nav-section {
    padding: 0.85rem 0.65rem 0.35rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
}

.erp-sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0.55rem 0.75rem;
    margin-bottom: 0.15rem;
    color: #475569;
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 0.75rem;
    border: 1px solid transparent;
    transition: all 0.15s ease-in-out;
}

.erp-sidebar-nav .nav-link:hover {
    color: #0f172a;
    background-color: #f1f5f9;
}

.erp-sidebar-nav .nav-link.active {
    color: #4338ca;
    background-color: #eef2ff;
    border-color: #c7d2fe;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(79, 70, 229, 0.05);
}

.erp-sidebar-nav .nav-link .icon {
    margin-right: 0.65rem;
    font-size: 1.05rem;
    width: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ==========================================================================
   Main Layout & Sticky Navbar
   ========================================================================== */
.erp-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
    background-color: var(--erp-body-bg);
}

.erp-navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 40;
}

/* Impersonation Banner */
.impersonation-banner {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    padding: 0.55rem 1rem;
    font-weight: 600;
    text-align: center;
    font-size: 0.85rem;
    letter-spacing: 0.01em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

/* ==========================================================================
   Responsive Grid & Flex Engine (Zero-Bootstrap Pure Tailwind System)
   ========================================================================== */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.75rem;
    margin-left: -0.75rem;
}

.row > * {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
    box-sizing: border-box;
}

/* Gutter Modifiers */
.g-0 { margin-right: 0; margin-left: 0; }
.g-0 > * { padding-right: 0; padding-left: 0; }

.g-1 { margin-right: -0.25rem; margin-left: -0.25rem; margin-top: -0.25rem; }
.g-1 > * { padding-right: 0.25rem; padding-left: 0.25rem; padding-top: 0.25rem; }

.g-2 { margin-right: -0.5rem; margin-left: -0.5rem; margin-top: -0.5rem; }
.g-2 > * { padding-right: 0.5rem; padding-left: 0.5rem; padding-top: 0.5rem; }

.g-3 { margin-right: -0.75rem; margin-left: -0.75rem; margin-top: -0.75rem; }
.g-3 > * { padding-right: 0.75rem; padding-left: 0.75rem; padding-top: 0.75rem; }

.g-4 { margin-right: -1rem; margin-left: -1rem; margin-top: -1rem; }
.g-4 > * { padding-right: 1rem; padding-left: 1rem; padding-top: 1rem; }

.g-5 { margin-right: -1.5rem; margin-left: -1.5rem; margin-top: -1.5rem; }
.g-5 > * { padding-right: 1.5rem; padding-left: 1.5rem; padding-top: 1.5rem; }

/* Standard Column Widths */
.col-1  { flex: 0 0 auto; width: 8.33333333%; }
.col-2  { flex: 0 0 auto; width: 16.66666667%; }
.col-3  { flex: 0 0 auto; width: 25%; }
.col-4  { flex: 0 0 auto; width: 33.33333333%; }
.col-5  { flex: 0 0 auto; width: 41.66666667%; }
.col-6  { flex: 0 0 auto; width: 50%; }
.col-7  { flex: 0 0 auto; width: 58.33333333%; }
.col-8  { flex: 0 0 auto; width: 66.66666667%; }
.col-9  { flex: 0 0 auto; width: 75%; }
.col-10 { flex: 0 0 auto; width: 83.33333333%; }
.col-11 { flex: 0 0 auto; width: 91.66666667%; }
.col-12 { flex: 0 0 auto; width: 100%; }
.col    { flex: 1 0 0%; }
.col-auto { flex: 0 0 auto; width: auto; }

/* Small devices (sm >= 640px) */
@media (min-width: 640px) {
    .col-sm-1  { flex: 0 0 auto; width: 8.33333333%; }
    .col-sm-2  { flex: 0 0 auto; width: 16.66666667%; }
    .col-sm-3  { flex: 0 0 auto; width: 25%; }
    .col-sm-4  { flex: 0 0 auto; width: 33.33333333%; }
    .col-sm-5  { flex: 0 0 auto; width: 41.66666667%; }
    .col-sm-6  { flex: 0 0 auto; width: 50%; }
    .col-sm-7  { flex: 0 0 auto; width: 58.33333333%; }
    .col-sm-8  { flex: 0 0 auto; width: 66.66666667%; }
    .col-sm-9  { flex: 0 0 auto; width: 75%; }
    .col-sm-10 { flex: 0 0 auto; width: 83.33333333%; }
    .col-sm-11 { flex: 0 0 auto; width: 91.66666667%; }
    .col-sm-12 { flex: 0 0 auto; width: 100%; }
    .col-sm    { flex: 1 0 0%; }
}

/* Medium devices (md >= 768px) */
@media (min-width: 768px) {
    .col-md-1  { flex: 0 0 auto; width: 8.33333333%; }
    .col-md-2  { flex: 0 0 auto; width: 16.66666667%; }
    .col-md-3  { flex: 0 0 auto; width: 25%; }
    .col-md-4  { flex: 0 0 auto; width: 33.33333333%; }
    .col-md-5  { flex: 0 0 auto; width: 41.66666667%; }
    .col-md-6  { flex: 0 0 auto; width: 50%; }
    .col-md-7  { flex: 0 0 auto; width: 58.33333333%; }
    .col-md-8  { flex: 0 0 auto; width: 66.66666667%; }
    .col-md-9  { flex: 0 0 auto; width: 75%; }
    .col-md-10 { flex: 0 0 auto; width: 83.33333333%; }
    .col-md-11 { flex: 0 0 auto; width: 91.66666667%; }
    .col-md-12 { flex: 0 0 auto; width: 100%; }
    .col-md    { flex: 1 0 0%; }
}

/* Large devices (lg >= 1024px) */
@media (min-width: 1024px) {
    .col-lg-1  { flex: 0 0 auto; width: 8.33333333%; }
    .col-lg-2  { flex: 0 0 auto; width: 16.66666667%; }
    .col-lg-3  { flex: 0 0 auto; width: 25%; }
    .col-lg-4  { flex: 0 0 auto; width: 33.33333333%; }
    .col-lg-5  { flex: 0 0 auto; width: 41.66666667%; }
    .col-lg-6  { flex: 0 0 auto; width: 50%; }
    .col-lg-7  { flex: 0 0 auto; width: 58.33333333%; }
    .col-lg-8  { flex: 0 0 auto; width: 66.66666667%; }
    .col-lg-9  { flex: 0 0 auto; width: 75%; }
    .col-lg-10 { flex: 0 0 auto; width: 83.33333333%; }
    .col-lg-11 { flex: 0 0 auto; width: 91.66666667%; }
    .col-lg-12 { flex: 0 0 auto; width: 100%; }
    .col-lg    { flex: 1 0 0%; }
}

/* Extra large devices (xl >= 1280px) */
@media (min-width: 1280px) {
    .col-xl-1  { flex: 0 0 auto; width: 8.33333333%; }
    .col-xl-2  { flex: 0 0 auto; width: 16.66666667%; }
    .col-xl-3  { flex: 0 0 auto; width: 25%; }
    .col-xl-4  { flex: 0 0 auto; width: 33.33333333%; }
    .col-xl-5  { flex: 0 0 auto; width: 41.66666667%; }
    .col-xl-6  { flex: 0 0 auto; width: 50%; }
    .col-xl-7  { flex: 0 0 auto; width: 58.33333333%; }
    .col-xl-8  { flex: 0 0 auto; width: 66.66666667%; }
    .col-xl-9  { flex: 0 0 auto; width: 75%; }
    .col-xl-10 { flex: 0 0 auto; width: 83.33333333%; }
    .col-xl-11 { flex: 0 0 auto; width: 91.66666667%; }
    .col-xl-12 { flex: 0 0 auto; width: 100%; }
    .col-xl    { flex: 1 0 0%; }
}

/* ==========================================================================
   Modern Tailwind Enterprise Cards & Stat Boxes
   ========================================================================== */

/* Modern Cards */
.card {
    background-color: var(--erp-card-bg);
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.03), 0 1px 2px -1px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease-in-out;
    position: relative;
    overflow: hidden;
}
.card:hover {
    box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.04);
}
.card-header {
    background-color: transparent;
    border-bottom: 1px solid #f1f5f9;
    padding: 1.1rem 1.25rem;
    font-weight: 700;
    color: #0f172a;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-body {
    padding: 1.25rem;
}
.card-footer {
    padding: 0.875rem 1.25rem;
    border-top: 1px solid #f1f5f9;
    background-color: #f8fafc;
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
}
.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

/* Metric / KPI Cards */
.tw-stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.03);
}
.tw-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.05);
    border-color: #cbd5e1;
}
.tw-icon-badge {
    width: 44px;
    height: 44px;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* ==========================================================================
   Buttons & Actions
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-weight: 600;
    font-size: 0.8125rem;
    padding: 0.5rem 0.95rem;
    border-radius: 0.75rem;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    line-height: 1.25;
    user-select: none;
}
.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 0.55rem;
}
.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    border-radius: 0.85rem;
}

.btn-primary {
    background-color: #4f46e5;
    color: #ffffff;
    box-shadow: 0 1px 2px 0 rgba(79, 70, 229, 0.25);
}
.btn-primary:hover {
    background-color: #4338ca;
    color: #ffffff;
}

.btn-secondary {
    background-color: #f8fafc;
    color: #334155;
    border-color: #cbd5e1;
}
.btn-secondary:hover {
    background-color: #e2e8f0;
    color: #0f172a;
}

.btn-light {
    background-color: #ffffff;
    color: #334155;
    border-color: #e2e8f0;
}
.btn-light:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

.btn-dark {
    background-color: #0f172a;
    color: #ffffff;
}
.btn-dark:hover {
    background-color: #1e293b;
    color: #ffffff;
}

.btn-success {
    background-color: #10b981;
    color: #ffffff;
}
.btn-success:hover {
    background-color: #059669;
    color: #ffffff;
}

.btn-danger {
    background-color: #ef4444;
    color: #ffffff;
}
.btn-danger:hover {
    background-color: #dc2626;
    color: #ffffff;
}

.btn-warning {
    background-color: #f59e0b;
    color: #ffffff;
}
.btn-warning:hover {
    background-color: #d97706;
    color: #ffffff;
}

.btn-outline-secondary {
    background-color: transparent;
    border-color: #cbd5e1;
    color: #475569;
}
.btn-outline-secondary:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

.btn-outline-primary {
    background-color: transparent;
    border-color: #6366f1;
    color: #4f46e5;
}
.btn-outline-primary:hover {
    background-color: #eef2ff;
    color: #4338ca;
}

.btn-outline-danger {
    background-color: transparent;
    border-color: #fca5a5;
    color: #dc2626;
}
.btn-outline-danger:hover {
    background-color: #fef2f2;
    color: #b91c1c;
}

.btn-outline-success {
    background-color: transparent;
    border-color: #86efac;
    color: #059669;
}
.btn-outline-success:hover {
    background-color: #f0fdf4;
    color: #047857;
}

/* Button Groups */
.btn-group {
    display: inline-flex;
    vertical-align: middle;
    border-radius: 0.75rem;
    overflow: hidden;
}
.btn-group .btn {
    border-radius: 0;
    margin-left: -1px;
}
.btn-group .btn:first-child {
    border-top-left-radius: 0.75rem;
    border-bottom-left-radius: 0.75rem;
    margin-left: 0;
}
.btn-group .btn:last-child {
    border-top-right-radius: 0.75rem;
    border-bottom-right-radius: 0.75rem;
}
.btn-group-sm .btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
}
.btn-group-sm {
    border-radius: 0.55rem;
}
.btn-group-sm .btn:first-child {
    border-top-left-radius: 0.55rem;
    border-bottom-left-radius: 0.55rem;
}
.btn-group-sm .btn:last-child {
    border-top-right-radius: 0.55rem;
    border-bottom-right-radius: 0.55rem;
}

/* ==========================================================================
   Forms & Inputs
   ========================================================================== */
.form-control, .form-select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    padding: 0.525rem 0.85rem;
    font-size: 0.875rem;
    background-color: #ffffff;
    color: #0f172a;
    transition: all 0.15s ease;
    outline: none;
    line-height: 1.25;
}
.form-control:focus, .form-select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.form-control-sm, .form-select-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.8125rem;
    border-radius: 0.55rem;
}
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 14px 10px;
    padding-right: 2.25rem;
}
.form-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.35rem;
    display: block;
}
.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.form-check-input {
    border-radius: 0.375rem;
    border: 1px solid #cbd5e1;
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
    accent-color: #4f46e5;
}

/* Input Groups */
.input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}
.input-group .form-control, .input-group .form-select {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}
.input-group-text {
    display: flex;
    align-items: center;
    padding: 0.525rem 0.85rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25;
    color: #64748b;
    text-align: center;
    white-space: nowrap;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
}
.input-group > :not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: -1px;
}
.input-group > :not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.input-group-sm > .form-control,
.input-group-sm > .input-group-text {
    padding: 0.35rem 0.65rem;
    font-size: 0.8125rem;
}
.input-group-sm > :first-child {
    border-top-left-radius: 0.55rem;
    border-bottom-left-radius: 0.55rem;
}
.input-group-sm > :last-child {
    border-top-right-radius: 0.55rem;
    border-bottom-right-radius: 0.55rem;
}

/* ==========================================================================
   Data Tables
   ========================================================================== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0.875rem;
}
.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.table th, .table thead th, .table-light th {
    background-color: #f8fafc;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}
.table td, .table tbody td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.8125rem;
    color: #1e293b;
    vertical-align: middle;
}
.table-hover tbody tr:hover {
    background-color: #f8fafc;
}
.table-striped tbody tr:nth-of-type(odd) {
    background-color: #fafbfc;
}
.table-bordered td, .table-bordered th {
    border: 1px solid #f1f5f9;
}
.table-sm td, .table-sm th {
    padding: 0.45rem 0.65rem;
    font-size: 0.75rem;
}

/* ==========================================================================
   Badges (Modern Enterprise Subtle Pills)
   ========================================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.22rem 0.55rem;
    border-radius: 0.5rem;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
    border: 1px solid transparent;
}
.bg-primary, .bg-primary-subtle { background-color: #eef2ff; color: #4338ca; border-color: #c7d2fe; }
.bg-success, .bg-success-subtle { background-color: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.bg-danger,  .bg-danger-subtle  { background-color: #fff1f2; color: #9f1239; border-color: #fecdd3; }
.bg-warning, .bg-warning-subtle { background-color: #fffbeb; color: #92400e; border-color: #fde68a; }
.bg-info,    .bg-info-subtle    { background-color: #f0f9ff; color: #075985; border-color: #bae6fd; }
.bg-secondary, .bg-secondary-subtle { background-color: #f8fafc; color: #475569; border-color: #e2e8f0; }
.bg-light    { background-color: #ffffff; color: #475569; border-color: #e2e8f0; }
.bg-dark     { background-color: #0f172a; color: #ffffff; }

/* Text Color Classes */
.text-primary   { color: #4f46e5 !important; }
.text-success   { color: #059669 !important; }
.text-danger    { color: #dc2626 !important; }
.text-warning   { color: #d97706 !important; }
.text-info      { color: #0284c7 !important; }
.text-dark      { color: #0f172a !important; }
.text-muted     { color: #64748b !important; }
.text-secondary { color: #475569 !important; }
.text-white     { color: #ffffff !important; }

/* Font Weights & Sizing */
.fw-bold        { font-weight: 700 !important; }
.fw-semibold    { font-weight: 600 !important; }
.fw-medium      { font-weight: 500 !important; }
.fw-normal      { font-weight: 400 !important; }
.small          { font-size: 0.75rem !important; }

/* Alignment */
.text-center    { text-align: center !important; }
.text-end       { text-align: right !important; }
.text-start     { text-align: left !important; }
.align-middle   { vertical-align: middle !important; }

/* ==========================================================================
   Alerts & Notifications
   ========================================================================== */
.alert {
    padding: 0.85rem 1.15rem;
    border-radius: 0.875rem;
    font-size: 0.8125rem;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.alert-info    { background-color: #f0f9ff; border-color: #bae6fd; color: #0369a1; }
.alert-success { background-color: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.alert-warning { background-color: #fffbeb; border-color: #fde68a; color: #b45309; }
.alert-danger  { background-color: #fef2f2; border-color: #fecaca; color: #b91c1c; }

/* ==========================================================================
   Dropdowns & Modals (Pure Tailwind JS Engine Compatible)
   ========================================================================== */
.dropdown {
    position: relative;
    display: inline-block;
}
.dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
    min-width: 13rem;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.875rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    padding: 0.35rem;
    z-index: 50;
    display: none;
}
.dropdown-menu.show {
    display: block !important;
}
.dropdown-menu-start {
    left: 0;
    right: auto;
}
.dropdown-menu-end {
    right: 0;
    left: auto;
}
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #334155;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.1s;
    cursor: pointer;
    border: none;
    background: transparent;
    text-align: left;
}
.dropdown-item:hover, .dropdown-item.active {
    background-color: #f1f5f9;
    color: #0f172a;
}
.dropdown-header {
    padding: 0.4rem 0.75rem 0.25rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 0.05em;
}
.dropdown-divider {
    height: 1px;
    margin: 0.35rem 0;
    background-color: #f1f5f9;
    border: none;
}

/* Modals */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background-color: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.modal.show, .modal.flex {
    display: flex !important;
}
.modal-dialog {
    width: 100%;
    max-width: 34rem;
    margin: auto;
}
.modal-dialog.modal-lg {
    max-width: 50rem;
}
.modal-dialog.modal-xl {
    max-width: 66rem;
}
.modal-content {
    background-color: #ffffff;
    border-radius: 1.15rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.modal-header {
    padding: 1.15rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    color: #0f172a;
}
.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(85vh - 130px);
}
.modal-footer {
    padding: 0.95rem 1.5rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    background-color: #f8fafc;
}
.btn-close {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.25rem;
    color: #94a3b8;
    line-height: 1;
    padding: 0.25rem;
    transition: color 0.15s;
}
.btn-close:hover {
    color: #0f172a;
}
.btn-close::after {
    content: "×";
    font-size: 1.5rem;
    line-height: 1;
}

/* ==========================================================================
   Spacers & Utility Bridges (Bootstrap 5 to Pure Tailwind)
   ========================================================================== */
.d-flex         { display: flex !important; }
.d-inline-flex  { display: inline-flex !important; }
.d-none         { display: none !important; }
.d-block        { display: block !important; }

.flex-column    { flex-direction: column !important; }
.flex-row       { flex-direction: row !important; }
.flex-wrap      { flex-wrap: wrap !important; }

.align-items-center     { align-items: center !important; }
.align-items-start      { align-items: flex-start !important; }
.align-items-end        { align-items: flex-end !important; }
.align-items-stretch    { align-items: stretch !important; }

.justify-content-between{ justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-end    { justify-content: flex-end !important; }
.justify-content-start  { justify-content: flex-start !important; }

.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 0.75rem !important; }
.gap-4 { gap: 1rem !important; }

.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 0.75rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mb-5 { margin-bottom: 1.5rem !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 0.75rem !important; }
.mt-4 { margin-top: 1rem !important; }

.me-1 { margin-right: 0.25rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.me-3 { margin-right: 0.75rem !important; }

.ms-1 { margin-left: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.ms-3 { margin-left: 0.75rem !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 0.75rem !important; }
.p-4 { padding: 1rem !important; }

.py-1 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-3 { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }
.py-4 { padding-top: 1rem !important; padding-bottom: 1rem !important; }

.px-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
.px-3 { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
.px-4 { padding-left: 1rem !important; padding-right: 1rem !important; }

.border-0 { border: none !important; }
.rounded-circle { border-radius: 9999px !important; }
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important; }
.text-decoration-none { text-decoration: none !important; }

/* Collapse */
.collapse:not(.show) {
    display: none !important;
}
.collapse.show {
    display: block !important;
}

/* Nav Tabs */
.nav-tabs {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid #e2e8f0;
    gap: 0.5rem;
    list-style: none;
    padding-left: 0;
    margin-bottom: 1rem;
}
.nav-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    border-bottom: 2px solid transparent;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
    background: transparent;
    border-top: none;
    border-left: none;
    border-right: none;
}
.nav-tabs .nav-link:hover {
    color: #0f172a;
    border-bottom-color: #cbd5e1;
}
.nav-tabs .nav-link.active {
    color: #4f46e5;
    border-bottom-color: #4f46e5;
}
.tab-content > .tab-pane:not(.show):not(.active) {
    display: none !important;
}
.tab-content > .tab-pane.active,
.tab-content > .tab-pane.show {
    display: block !important;
}

