/* ============================================
   Teams Crossing Mind — Custom CSS
   Brand: #4297B2 (blue), #ADB039 (olive-gold), #BA3D26 (rust), #222A35 (navy)
   ============================================ */

.c-app, :root {
    --primary: #4297B2;
    --secondary: #ced2d8;
    --success: #2eb85c;
    --info: #39f;
    --warning: #ADB039;
    --danger: #BA3D26;
    --light: #ebedef;
    --dark: #222A35;
}

/* --- Buttons --- */
.btn-primary, .btn-success {
    color: #fff;
    background-color: #4297B2;
    border-color: #4297B2;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}
.btn-primary:hover, .btn-success:hover {
    color: #fff;
    background-color: #367a94;
    border-color: #367a94;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(66, 151, 178, 0.3);
}
.btn-primary:focus, .btn-success:focus {
    box-shadow: 0 0 0 0.2rem rgba(66, 151, 178, 0.35);
}

/* --- Sidebar --- */
.c-sidebar .c-sidebar-brand, .c-sidebar .c-sidebar-header {
    background: white;
}

.c-sidebar {
    background-color: #222A35;
    border-color: #222A35;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
}

.nav-item:hover {
    background-color: #222A35;
    border-color: #222A35;
}

.c-sidebar-nav-item a:hover {
    background-color: #4297B2;
    border-color: #4297B2;
}

@media (hover: hover), (-ms-high-contrast:none) {
.c-sidebar .c-sidebar-nav-dropdown-toggle:hover, .c-sidebar .c-sidebar-nav-link:hover {
    color: #fff;
    background: #4297B2;
}}

.c-sidebar .c-sidebar-nav-link.c-active,
.c-sidebar .c-sidebar-nav-dropdown-toggle.c-active {
    background: rgba(66, 151, 178, 0.2);
    color: #fff;
    border-left: 3px solid #4297B2;
}

/* --- Typography --- */
body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #222A35;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: #222A35;
}

/* --- Cards --- */
.card {
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* --- Header --- */
.c-header {
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-family: 'Roboto', sans-serif;
}

/* --- Editor & Forms --- */
.ck-editor__editable,
textarea {
    min-height: 150px;
}

.form-control:focus {
    border-color: #4297B2;
    box-shadow: 0 0 0 0.15rem rgba(66, 151, 178, 0.2);
}

/* --- DataTables --- */
.datatable {
    width: 100% !important;
}

table.dataTable tbody td.select-checkbox::before,
table.dataTable tbody td.select-checkbox::after,
table.dataTable tbody th.select-checkbox::before,
table.dataTable tbody th.select-checkbox::after {
    top: 50%;
}

.dataTables_length,
.dataTables_filter,
.dt-buttons {
    margin-bottom: 0.333em;
    margin-top: .2rem;
}

.dataTables_filter {
    margin-right: .2rem;
}

.dt-buttons .btn {
    margin-left: 0.333em;
    border-radius: 6px;
}

.table.datatable {
    box-sizing: border-box;
    border-collapse: collapse;
}

table.dataTable thead th {
    border-bottom: 2px solid #e5e7eb;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: #6b7280;
}

.dataTables_wrapper.no-footer .dataTables_scrollBody {
    border-bottom: 1px solid #e5e7eb;
}

table.dataTable tbody tr:hover {
    background-color: #eef7fb !important;
}

/* --- Select2 --- */
.select2 {
    max-width: 100%;
    width: 100% !important;
}

.select2-selection__rendered {
    padding-bottom: 5px !important;
}

.select2-container--default .select2-selection--single:focus,
.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #4297B2;
    box-shadow: 0 0 0 0.15rem rgba(66, 151, 178, 0.2);
}

/* --- Validation --- */
.has-error .invalid-feedback {
    display: block !important;
}

.btn-info,
.badge-info {
    color: white;
}

table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc {
    background-image: none;
}

.sidebar .nav-item {
    cursor: pointer;
}

/* --- Default button --- */
.btn-default {
    color: #374151;
    background-color: #f3f4f6;
    border-color: #e5e7eb;
    border-radius: 6px;
}

.btn-default.focus,
.btn-default:focus {
    box-shadow: 0 0 0 .2rem rgba(209, 213, 215, .5);
}

.btn-default:hover {
    color: #1f2937;
    background-color: #e5e7eb;
    border-color: #d1d5db;
}

/* --- Small buttons --- */
.btn-group-xs > .btn,
.btn-xs {
    padding: 1px 5px;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 4px;
}

/* --- Search styling --- */
.searchable-title {
    font-weight: bold;
}
.searchable-fields {
    padding-left:5px;
}
.searchable-link {
    padding:0 5px 0 5px;
    border-radius: 4px;
}
.searchable-link:hover {
    cursor: pointer;
    background: #eef7fb;
}
.select2-results__option {
    padding-left: 0px;
    padding-right: 0px;
}

.form-group .required::after {
    content: " *";
    color: #BA3D26;
}

.form-check.is-invalid ~ .invalid-feedback {
    display: block;
}

.c-sidebar-brand .c-sidebar-brand-full:hover {
    color: inherit;
}

.custom-select.form-control-sm {
    padding: 0.25rem 1.5rem;
}

/* --- Alert styling --- */
.alert {
    border-radius: 8px;
    border: none;
}

.alert-success {
    background-color: #ecfdf5;
    color: #065f46;
}

.alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
}

.alert-info {
    background-color: #eef7fb;
    color: #2f6479;
}

/* --- Badge improvements --- */
.badge {
    border-radius: 9999px;
    font-weight: 500;
    padding: 0.25em 0.65em;
}

.badge-warning {
    background-color: #ADB039;
    color: white;
}

.badge-danger {
    background-color: #BA3D26;
}

.badge-primary {
    background-color: #4297B2;
}

/* --- Page content area --- */
.c-body {
    background-color: #F8FAFC;
}

.c-main {
    padding-top: 1.5rem;
}
