/* =============================================================================
   CUSTOM.CSS — shadcn/ui structural overrides for default theme
   Loads last, always cache-busted via ?v={{time()}}
   ========================================================================== */

/* 1. FONT FAMILY — Inter with icon font preservation
   ========================================================================== */
body,
.kt-portlet .kt-portlet__head .kt-portlet__head-label .kt-portlet__head-title,
.kt-header__topbar,
.kt-aside-menu,
.kt-subheader,
.btn,
input,
select,
textarea,
.form-control,
.select2-container,
.dataTables_wrapper,
.dropdown-menu,
.modal,
.kt-widget,
.nav-tabs .nav-link,
table,
th,
td,
label,
p,
h1, h2, h3, h4, h5, h6,
.kt-notification,
.alert {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Preserve icon fonts — font-weight required so .btn (500) doesn't override FA solid (900) */
.la { font-family: LineAwesome !important; }
.fa, .fas { font-family: 'Font Awesome 5 Free' !important; font-weight: 900 !important; }
.far { font-family: 'Font Awesome 5 Free' !important; font-weight: 400 !important; }
.fab { font-family: 'Font Awesome 5 Brands' !important; font-weight: 400 !important; }
[class^="flaticon-"], [class*=" flaticon-"] { font-family: Flaticon !important; }
[class^="flaticon2-"], [class*=" flaticon2-"] { font-family: Flaticon2 !important; }
.socicon { font-family: socicon !important; }

/* 2. BORDER RADIUS — 8px cards, 6px small elements
   ========================================================================== */
.kt-portlet,
.modal-content,
.dropdown-menu,
.card {
    border-radius: 8px !important;
}
.kt-portlet .kt-portlet__head:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}
.kt-portlet .kt-portlet__foot:last-child {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}
.btn {
    border-radius: 6px;
}
.form-control,
select.form-control,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple,
.input-group>.form-control,
.input-group>.input-group-prepend>.input-group-text,
.input-group>.input-group-append>.input-group-text {
    border-radius: 6px;
}
.alert {
    border-radius: 6px;
}
.kt-badge,
.badge {
    border-radius: 4px;
}
.nav-tabs .nav-link {
    border-radius: 6px 6px 0 0;
}

/* 3. SHADOWS — Modern multi-layer
   ========================================================================== */
.kt-portlet {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
}
.dropdown-menu {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05) !important;
}
.modal-content {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
}

/* 4. SCROLLBAR — 6px clean scrollbar
   ========================================================================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background-color: #d4d4d8;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background-color: #a1a1aa;
}
/* Dark sidebar scrollbar */
.kt-aside-menu::-webkit-scrollbar-thumb,
.kt-aside::-webkit-scrollbar-thumb {
    background-color: #3f3f46;
}
.kt-aside-menu::-webkit-scrollbar-thumb:hover,
.kt-aside::-webkit-scrollbar-thumb:hover {
    background-color: #52525b;
}

/* 5. FOCUS RING — Brand glow
   ========================================================================== */
.form-control:focus,
.select2-container--default.select2-container--focus .select2-selection,
.btn:focus,
.btn.focus,
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(28, 175, 154, 0.15);
    outline: none;
}

/* 6. FORM CONTROLS — Height 42px, padding 8px 14px
   ========================================================================== */
.form-control {
    height: 40px !important;
    padding: 8px 14px;
    font-size: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea.form-control {
    height: auto;
}
.select2-container--default .select2-selection--single {
    /* height: 42px !important; */
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    /* line-height: 42px; */
    padding-left: 14px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 42px;
}

/* 7. TRANSITIONS — 0.15s ease globally
   ========================================================================== */
a,
.btn,
.nav-link,
.kt-menu__link,
.kt-aside-menu .kt-menu__nav>.kt-menu__item>.kt-menu__link {
    transition: all 0.15s ease;
}

/* 8. DATATABLE HEADER — 12px uppercase, 600 weight
   ========================================================================== */
.dataTable thead th,
table.dataTable thead th {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #71717a;
}

/* 9. BUTTONS — font-weight 500, subtle shadow, hover lift
   ========================================================================== */
.btn {
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.01em;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.15s ease;
}
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.btn-sm {
    border-radius: 5px;
}
/* Label buttons (ghost) should not have shadow */
.btn-label-brand,
.btn-label-success,
.btn-label-danger,
.btn-label-warning,
.btn-label-info,
.btn-label-primary {
    box-shadow: none;
}
.btn-label-brand:hover,
.btn-label-success:hover,
.btn-label-danger:hover,
.btn-label-warning:hover,
.btn-label-info:hover,
.btn-label-primary:hover {
    transform: none;
    box-shadow: none;
}

/* 10. PORTLET REFINEMENTS — 24px padding, 15px/600 title
   ========================================================================== */
.kt-portlet .kt-portlet__head {
    padding: 0 24px;
    min-height: 56px;
}
.kt-portlet .kt-portlet__head .kt-portlet__head-label .kt-portlet__head-title {
    font-size: 15px;
    font-weight: 600;
}
.kt-portlet .kt-portlet__body {
    padding: 24px;
}

/* 11. SIDEBAR — 6px radius on menu items, 8px margin
   ========================================================================== */
.kt-aside-menu .kt-menu__nav>.kt-menu__item>.kt-menu__link {
    border-radius: 6px;
    margin: 2px 8px;
}
.kt-aside-menu .kt-menu__nav>.kt-menu__item.kt-menu__item--active>.kt-menu__link {
    border-radius: 6px;
}
.kt-aside-menu .kt-menu__nav>.kt-menu__item>.kt-menu__submenu .kt-menu__item>.kt-menu__link {
    border-radius: 4px;
    margin: 1px 8px 1px 16px;
}

/* 12. HEADER — border-bottom instead of shadow
   ========================================================================== */
#kt_header {
    border-bottom: 1px solid #e4e4e7;
    box-shadow: none;
}

/* 13. PLACEHOLDER — zinc-400
   ========================================================================== */
::placeholder {
    color: #a1a1aa !important;
    opacity: 1;
}
:-ms-input-placeholder {
    color: #a1a1aa !important;
}
::-ms-input-placeholder {
    color: #a1a1aa !important;
}

/* 14. SELECTION — Brand highlight
   ========================================================================== */
::selection {
    background-color: rgba(28, 175, 154, 0.15);
    color: #18181b;
}

/* 15. MISC — Alert left-border, dropdown hover, active tab indicator
   ========================================================================== */
/* Alert left border accent */
.alert.alert-success {
    border-left: 4px solid #16a34a;
}
.alert.alert-danger,
.alert.alert-solid-danger {
    border-left: 4px solid #ef4444;
}
.alert.alert-warning {
    border-left: 4px solid #d97706;
}
.alert.alert-info {
    border-left: 4px solid #2563eb;
}

/* Dropdown hover */
.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus,
.kt-nav .kt-nav__item:hover>.kt-nav__link {
    background-color: #f4f4f5;
}

/* Active tab indicator */
.nav-tabs .nav-link.active {
    border-bottom: 2px solid #1caf9a;
}

/* Table improvements */
table.dataTable tbody tr:hover {
    background-color: #fafafa !important;
}

/* Subtle input group styling */
.input-group-text {
    background-color: #fafafa;
    border-color: #d4d4d8;
    color: #71717a;
}

/* Hide utility */
.hide {
    display: none;
}
