/* ============================================
   INMAVEN - BLACK & WHITE BRAND IDENTITY
   ============================================
   
   Color Palette:
   - Primary Black: #111111
   - Near Black: #1a1a1a
   - Dark Gray: #333333
   - Medium Gray: #666666
   - Light Gray: #e8e8e8
   - Off-White: #f5f5f5
   - White: #ffffff
   - Danger Red: #c00000
   ============================================ */

/* --------------------------------------------
   BASE STYLES & RESETS
   -------------------------------------------- */
.ck-editor__editable,
textarea {
    min-height: 150px;
}

.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%;
}

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

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

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

.select2-results__option {
    padding-left: 0px;
    padding-right: 0px;
}

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

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

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

/* --------------------------------------------
   1. SIDEBAR NAVIGATION - BLACK THEME
   -------------------------------------------- */
.c-sidebar {
    background-color: #111111 !important;
}

.c-sidebar .c-sidebar-brand {
    background-color: #000000 !important;
    border-bottom: 1px solid #333333;
}

.c-sidebar .c-sidebar-brand-full,
.c-sidebar .c-sidebar-brand-full:hover {
    color: #ffffff !important;
    text-decoration: none;
}

.c-sidebar .c-sidebar-nav-link,
.c-sidebar .c-sidebar-nav-dropdown-toggle {
    color: rgba(255, 255, 255, 0.8) !important;
    transition: all 0.15s ease-in-out;
}

.c-sidebar .c-sidebar-nav-link:hover,
.c-sidebar .c-sidebar-nav-dropdown-toggle:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.c-sidebar .c-sidebar-nav-link.c-active,
.c-sidebar .c-sidebar-nav-dropdown.c-show .c-sidebar-nav-dropdown-toggle {
    color: #111111 !important;
    background-color: #ffffff !important;
}

.c-sidebar .c-sidebar-nav-link.c-active .c-sidebar-nav-icon,
.c-sidebar .c-sidebar-nav-dropdown.c-show .c-sidebar-nav-dropdown-toggle .c-sidebar-nav-icon {
    color: #111111 !important;
}

.c-sidebar .c-sidebar-nav-icon {
    color: rgba(255, 255, 255, 0.6) !important;
}

.c-sidebar .c-sidebar-nav-link:hover .c-sidebar-nav-icon,
.c-sidebar .c-sidebar-nav-dropdown-toggle:hover .c-sidebar-nav-icon {
    color: #ffffff !important;
}

/* Keep icon dark when hovering over active items (white background) */
.c-sidebar .c-sidebar-nav-link.c-active:hover .c-sidebar-nav-icon,
.c-sidebar .c-sidebar-nav-dropdown.c-show .c-sidebar-nav-dropdown-toggle:hover .c-sidebar-nav-icon {
    color: #111111 !important;
}

/* Hide dropdown items by default */
.c-sidebar .c-sidebar-nav-dropdown-items {
    background-color: #0a0a0a !important;
    display: none;
}

/* Show dropdown items when parent has c-show class */
.c-sidebar .c-sidebar-nav-dropdown.c-show .c-sidebar-nav-dropdown-items {
    display: block;
}

.c-sidebar .c-sidebar-nav-dropdown-items .c-sidebar-nav-link {
    padding-left: 3.5rem;
}

.c-sidebar .c-sidebar-nav-dropdown-items .c-sidebar-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.c-sidebar .c-sidebar-nav-dropdown-items .c-sidebar-nav-link.c-active {
    background-color: #ffffff !important;
    color: #111111 !important;
}

/* Keep icon dark when hovering over active dropdown items */
.c-sidebar .c-sidebar-nav-dropdown-items .c-sidebar-nav-link.c-active:hover {
    color: #111111 !important;
}

.c-sidebar .c-sidebar-nav-dropdown-items .c-sidebar-nav-link.c-active:hover .c-sidebar-nav-icon {
    color: #111111 !important;
}

/* Sidebar search field */
.c-sidebar .searchable-field {
    background-color: #1a1a1a !important;
    border: 1px solid #333333 !important;
    color: #ffffff !important;
}

.c-sidebar .searchable-field:focus {
    border-color: #666666 !important;
    box-shadow: none !important;
}

.c-sidebar .select2-container--default .select2-selection--single {
    background-color: #1a1a1a !important;
    border-color: #333333 !important;
}

.c-sidebar .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #ffffff !important;
}

.c-sidebar .c-sidebar-minimizer {
    background-color: #000000 !important;
    border-top: 1px solid #333333;
}

.c-sidebar .c-sidebar-minimizer:hover {
    background-color: #1a1a1a !important;
}

/* Sidebar nav item cursor */
.sidebar .nav-item,
.c-sidebar .c-sidebar-nav-item {
    cursor: pointer;
}

/* --------------------------------------------
   2. HEADER BAR - WHITE THEME
   -------------------------------------------- */
.c-header {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e8e8e8 !important;
}

.c-header .c-header-toggler,
.c-header .c-header-nav-link {
    color: #111111 !important;
}

.c-header .c-header-toggler:hover,
.c-header .c-header-nav-link:hover {
    color: #333333 !important;
}

.c-header .c-header-brand {
    color: #111111 !important;
    font-weight: 600;
}

.c-header .dropdown-menu {
    border: 1px solid #e8e8e8;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.c-header .dropdown-item:hover {
    background-color: #f5f5f5;
}

/* Notification badge */
.c-header .badge-warning {
    background-color: #111111 !important;
    color: #ffffff !important;
}

/* --------------------------------------------
   3. CARD STYLING - BLACK HEADER
   -------------------------------------------- */
.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: box-shadow 0.2s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.12);
}

.card-header {
    background: #1a1a1a !important;
    color: #ffffff !important;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.025em;
    border-bottom: none;
    padding: 1rem 1.5rem;
    position: relative;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1.5rem;
    right: 1.5rem;
    height: 3px;
    background: #ffffff;
    border-radius: 3px 3px 0 0;
}

.card-body {
    padding: 1.5rem;
    background-color: #ffffff;
}

/* --------------------------------------------
   4. BUTTONS - BLACK & WHITE THEME
   -------------------------------------------- */

/* Primary Button - Black */
.btn-primary {
    background-color: #111111 !important;
    border-color: #111111 !important;
    color: #ffffff !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #333333 !important;
    border-color: #333333 !important;
    color: #ffffff !important;
}

.btn-primary:focus {
    box-shadow: 0 0 0 0.2rem rgba(17, 17, 17, 0.3) !important;
}

.btn-primary:active,
.btn-primary.active {
    background-color: #000000 !important;
    border-color: #000000 !important;
}

/* Success Button - Black */
.btn-success {
    background-color: #111111 !important;
    border-color: #111111 !important;
    color: #ffffff !important;
}

.btn-success:hover,
.btn-success:focus {
    background-color: #333333 !important;
    border-color: #333333 !important;
    color: #ffffff !important;
}

.btn-success:focus {
    box-shadow: 0 0 0 0.2rem rgba(17, 17, 17, 0.3) !important;
}

/* Info Button - Gray Outline */
.btn-info {
    background-color: #ffffff !important;
    border: 2px solid #666666 !important;
    color: #666666 !important;
}

.btn-info:hover,
.btn-info:focus {
    background-color: #666666 !important;
    border-color: #666666 !important;
    color: #ffffff !important;
}

.btn-info:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 102, 102, 0.3) !important;
}

/* Danger Button - Dark Red */
.btn-danger {
    background-color: #c00000 !important;
    border-color: #c00000 !important;
    color: #ffffff !important;
}

.btn-danger:hover,
.btn-danger:focus {
    background-color: #990000 !important;
    border-color: #990000 !important;
    color: #ffffff !important;
}

.btn-danger:focus {
    box-shadow: 0 0 0 0.2rem rgba(192, 0, 0, 0.3) !important;
}

/* Default Button - White with Black Border */
.btn-default {
    background-color: #ffffff !important;
    border: 1px solid #333333 !important;
    color: #333333 !important;
}

.btn-default:hover,
.btn-default:focus {
    background-color: #f5f5f5 !important;
    border-color: #111111 !important;
    color: #111111 !important;
}

.btn-default:focus {
    box-shadow: 0 0 0 0.2rem rgba(17, 17, 17, 0.15) !important;
}

/* Secondary Button */
.btn-secondary {
    background-color: #666666 !important;
    border-color: #666666 !important;
    color: #ffffff !important;
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: #555555 !important;
    border-color: #555555 !important;
}

/* Warning Button - Dark Gray */
.btn-warning {
    background-color: #333333 !important;
    border-color: #333333 !important;
    color: #ffffff !important;
}

.btn-warning:hover,
.btn-warning:focus {
    background-color: #222222 !important;
    border-color: #222222 !important;
    color: #ffffff !important;
}

/* Link Button */
.btn-link {
    color: #111111 !important;
    text-decoration: none;
}

.btn-link:hover {
    color: #333333 !important;
    text-decoration: underline;
}

/* Small Buttons */
.btn-group-xs > .btn,
.btn-xs {
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.4;
    border-radius: 0.375rem;
    transition: all 0.15s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* XS View button */
.btn-xs.btn-primary {
    background-color: #111111 !important;
    border-color: #111111 !important;
    color: #ffffff !important;
}

.btn-xs.btn-primary:hover {
    background-color: #333333 !important;
    border-color: #333333 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* XS Edit button */
.btn-xs.btn-info {
    background-color: #ffffff !important;
    border: 1px solid #666666 !important;
    color: #666666 !important;
}

.btn-xs.btn-info:hover {
    background-color: #666666 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(102, 102, 102, 0.3);
}

/* XS Delete button */
.btn-xs.btn-danger {
    background-color: #c00000 !important;
    border-color: #c00000 !important;
    color: #ffffff !important;
}

.btn-xs.btn-danger:hover {
    background-color: #990000 !important;
    border-color: #990000 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(192, 0, 0, 0.3);
}

/* --------------------------------------------
   5. DATATABLES - BLACK & WHITE THEME
   -------------------------------------------- */
.dataTables_wrapper {
    padding-top: 0.5rem;
    scroll-behavior: smooth;
}

.dataTables_length,
.dataTables_filter,
.dt-buttons {
    margin-bottom: 1rem;
    margin-top: 0;
}

.dt-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    align-items: center;
}

.dt-buttons .btn {
    margin-left: 0;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.5rem 0.875rem;
    transition: all 0.15s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

/* Selection buttons in DataTables */
.dt-buttons .btn-primary {
    background-color: #111111 !important;
    border-color: #111111 !important;
    color: #ffffff !important;
}

.dt-buttons .btn-primary:hover {
    background-color: #333333 !important;
    border-color: #333333 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Delete button in DataTables */
.dt-buttons .btn-danger {
    background-color: #c00000 !important;
    border-color: #c00000 !important;
    color: #ffffff !important;
}

.dt-buttons .btn-danger:hover {
    background-color: #990000 !important;
    border-color: #990000 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(192, 0, 0, 0.3);
}

/* Export buttons (default style) */
.dt-buttons .btn-default {
    background-color: #ffffff !important;
    border: 1px solid #333333 !important;
    color: #333333 !important;
}

.dt-buttons .btn-default:hover {
    background-color: #f5f5f5 !important;
    border-color: #111111 !important;
    color: #111111 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* DataTables length select */
.dataTables_length select {
    border: 1px solid #cccccc;
    border-radius: 0.5rem;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.875rem;
    background-color: #ffffff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.dataTables_length select:focus {
    border-color: #111111;
    box-shadow: 0 0 0 0.2rem rgba(17, 17, 17, 0.15);
    outline: none;
}

/* DataTables global search */
.dataTables_filter input {
    border: 1px solid #cccccc;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    margin-left: 0.5rem;
}

.dataTables_filter input:focus {
    border-color: #111111;
    box-shadow: 0 0 0 0.2rem rgba(17, 17, 17, 0.15);
    outline: none;
}

/* Column filter inputs */
.datatable thead tr:nth-child(2) td {
    padding: 0.5rem 0.5rem 1rem 0.5rem;
    background-color: #f5f5f5;
    border-top: none;
}

.datatable thead input.search,
.datatable thead select.search {
    border: 1px solid #cccccc;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    width: 100%;
    font-size: 0.8125rem;
    background-color: #ffffff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    color: #333333;
}

.datatable thead input.search::placeholder {
    color: #999999;
    font-style: italic;
}

.datatable thead input.search:focus,
.datatable thead select.search:focus {
    border-color: #111111;
    box-shadow: 0 0 0 0.2rem rgba(17, 17, 17, 0.15);
    outline: none;
    background-color: #ffffff;
}

.datatable thead select.search {
    cursor: pointer;
    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='%23333333' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 0.75rem;
    padding-right: 2rem;
}

/* Table structure */
.table.datatable {
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0 !important;
}

/* Table headers */
table.dataTable thead th {
    background-color: #f5f5f5;
    border-bottom: 2px solid #333333;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #333333;
    padding: 0.875rem 0.75rem;
    white-space: nowrap;
    vertical-align: middle;
}

table.dataTable thead th:first-child {
    border-radius: 0.5rem 0 0 0;
}

table.dataTable thead th:last-child {
    border-radius: 0 0.5rem 0 0;
}

/* Sorting indicators */
table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc {
    background-image: none;
    position: relative;
    cursor: pointer;
}

table.dataTable thead .sorting::after,
table.dataTable thead .sorting_asc::after,
table.dataTable thead .sorting_desc::after {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.625rem;
    color: #999999;
}

table.dataTable thead .sorting::after {
    content: "\f0dc";
}

table.dataTable thead .sorting_asc::after {
    content: "\f0de";
    color: #111111;
}

table.dataTable thead .sorting_desc::after {
    content: "\f0dd";
    color: #111111;
}

/* Table body */
table.dataTable tbody td {
    padding: 0.875rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #e8e8e8;
    font-size: 0.875rem;
    color: #333333;
}

table.dataTable tbody tr {
    transition: background-color 0.15s ease-in-out;
}

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

table.dataTable tbody tr.selected {
    background-color: #e8e8e8 !important;
}

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

/* Striped rows */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: #fafafa;
}

.table-striped tbody tr:nth-of-type(odd):hover {
    background-color: #f5f5f5 !important;
}

/* Remove borders for cleaner look */
.table-bordered {
    border: none;
}

.table-bordered td,
.table-bordered th {
    border: none;
    border-bottom: 1px solid #e8e8e8;
}

/* Checkbox column */
table.dataTable tbody td.select-checkbox {
    position: relative;
    cursor: pointer;
}

table.dataTable tbody td.select-checkbox::before {
    content: '';
    display: block;
    width: 18px;
    height: 18px;
    border: 2px solid #cccccc;
    border-radius: 0.25rem;
    background-color: #ffffff;
    transition: all 0.15s ease-in-out;
    margin: 0 auto;
}

table.dataTable tbody tr.selected td.select-checkbox::before {
    border-color: #111111;
    background-color: #111111;
}

table.dataTable tbody td.select-checkbox::after {
    content: '\f00c';
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 0.625rem;
    color: #ffffff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.15s ease-in-out;
}

table.dataTable tbody tr.selected td.select-checkbox::after {
    opacity: 1;
}

/* Actions column */
table.dataTable tbody td:last-child {
    white-space: nowrap;
}

table.dataTable tbody td:last-child .btn-xs {
    margin-right: 0.25rem;
}

table.dataTable tbody td:last-child .btn-xs:last-child,
table.dataTable tbody td:last-child form:last-child .btn-xs {
    margin-right: 0;
}

/* Inline delete form */
table.dataTable tbody td:last-child form {
    display: inline-block;
    margin: 0;
}

/* Table links */
table.dataTable tbody td a:not(.btn) {
    color: #111111;
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

table.dataTable tbody td a:not(.btn):hover {
    color: #333333;
    text-decoration: underline;
}

/* --------------------------------------------
   6. "ADD NEW" BUTTON STYLING
   -------------------------------------------- */
.container-fluid > .row:first-child .btn-success,
.c-main .row:first-child .btn-success {
    border-radius: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #111111 !important;
    border-color: #111111 !important;
}

.container-fluid > .row:first-child .btn-success:hover,
.c-main .row:first-child .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    background-color: #333333 !important;
    border-color: #333333 !important;
}

.container-fluid > .row:first-child .btn-success::before,
.c-main .row:first-child .btn-success::before {
    content: '\f067';
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 0.75rem;
}

/* --------------------------------------------
   7. PAGINATION STYLING
   -------------------------------------------- */
.dataTables_paginate {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e8e8e8;
}

.dataTables_paginate .paginate_button {
    border-radius: 0.5rem !important;
    margin: 0 0.125rem;
    padding: 0.5rem 0.875rem !important;
    font-size: 0.8125rem;
    font-weight: 500;
    border: 1px solid #cccccc !important;
    background: #ffffff !important;
    color: #333333 !important;
    transition: all 0.15s ease-in-out;
}

.dataTables_paginate .paginate_button:hover {
    background: #f5f5f5 !important;
    border-color: #111111 !important;
    color: #111111 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dataTables_paginate .paginate_button.current {
    background: #111111 !important;
    border-color: #111111 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.dataTables_paginate .paginate_button.current:hover {
    background: #333333 !important;
    border-color: #333333 !important;
    color: #ffffff !important;
}

.dataTables_paginate .paginate_button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dataTables_paginate .paginate_button.disabled:hover {
    background: #ffffff !important;
    border-color: #cccccc !important;
    color: #333333 !important;
    box-shadow: none;
}

/* Info text styling */
.dataTables_info {
    font-size: 0.8125rem;
    color: #666666;
    padding-top: 1rem;
}

/* --------------------------------------------
   8. FORM ELEMENTS
   -------------------------------------------- */
.form-control:focus {
    border-color: #111111;
    box-shadow: 0 0 0 0.2rem rgba(17, 17, 17, 0.15);
}

.form-control {
    border-color: #cccccc;
    color: #333333;
}

.form-control::placeholder {
    color: #999999;
}

/* Select2 styling */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    border-color: #cccccc !important;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--multiple {
    border-color: #111111 !important;
    box-shadow: 0 0 0 0.2rem rgba(17, 17, 17, 0.15);
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #111111 !important;
    color: #ffffff !important;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #f5f5f5 !important;
    color: #333333 !important;
}

.select2-dropdown {
    border-color: #cccccc !important;
}

/* Custom checkbox and radio */
.custom-control-input:checked ~ .custom-control-label::before {
    background-color: #111111;
    border-color: #111111;
}

.custom-control-input:focus ~ .custom-control-label::before {
    box-shadow: 0 0 0 0.2rem rgba(17, 17, 17, 0.15);
}

/* Labels */
label {
    color: #333333;
    font-weight: 500;
}

.help-block {
    color: #666666;
    font-size: 0.875rem;
}

/* Searchable field styling */
.searchable-title {
    font-weight: bold;
    color: #111111;
}

.searchable-fields {
    padding-left: 5px;
    color: #666666;
}

.searchable-link {
    padding: 0 5px 0 5px;
}

.searchable-link:hover {
    cursor: pointer;
    background: #f5f5f5;
}

/* --------------------------------------------
   9. BADGES & ALERTS
   -------------------------------------------- */
.badge {
    font-weight: 500;
    padding: 0.375rem 0.625rem;
    border-radius: 0.375rem;
}

.badge-primary,
.badge-info {
    background-color: #111111 !important;
    color: #ffffff !important;
}

.badge-success {
    background-color: #333333 !important;
    color: #ffffff !important;
}

.badge-warning {
    background-color: #666666 !important;
    color: #ffffff !important;
}

.badge-danger {
    background-color: #c00000 !important;
    color: #ffffff !important;
}

.badge-secondary {
    background-color: #999999 !important;
    color: #ffffff !important;
}

/* Alerts */
.alert {
    border-radius: 0.5rem;
    border: none;
}

.alert-success {
    background-color: #f5f5f5 !important;
    border-left: 4px solid #111111 !important;
    color: #333333 !important;
}

.alert-info {
    background-color: #f5f5f5 !important;
    border-left: 4px solid #666666 !important;
    color: #333333 !important;
}

.alert-warning {
    background-color: #f5f5f5 !important;
    border-left: 4px solid #333333 !important;
    color: #333333 !important;
}

.alert-danger {
    background-color: #fff5f5 !important;
    border-left: 4px solid #c00000 !important;
    color: #333333 !important;
}

.card-body .alert {
    border-radius: 0.5rem;
}

/* --------------------------------------------
   10. TABS
   -------------------------------------------- */
.nav-tabs {
    border-bottom: 2px solid #e8e8e8;
}

.nav-tabs .nav-link {
    color: #666666;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 0.75rem 1rem;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

.nav-tabs .nav-link:hover {
    color: #333333;
    border-color: transparent;
    background-color: transparent;
}

.nav-tabs .nav-link.active {
    color: #111111;
    border-color: transparent;
    border-bottom-color: #111111;
    background-color: transparent;
}

/* --------------------------------------------
   11. LOADING/PROCESSING STATE
   -------------------------------------------- */
.dataTables_processing {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%);
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 1rem 2rem !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    font-size: 0.875rem;
    font-weight: 500;
    color: #333333;
    z-index: 100;
    border: none !important;
}

.dataTables_processing::before {
    content: '';
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #111111;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
    margin-right: 0.75rem;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Empty table message */
.dataTables_empty {
    padding: 2rem !important;
    text-align: center;
    color: #666666;
    font-style: italic;
}

/* --------------------------------------------
   12. LOGIN PAGE
   -------------------------------------------- */
.login-page .card {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.login-page h1 {
    color: #111111;
    font-weight: 700;
}

.login-page .text-muted {
    color: #666666 !important;
}

.login-page .btn-primary {
    background-color: #111111 !important;
    border-color: #111111 !important;
}

.login-page .btn-primary:hover {
    background-color: #333333 !important;
    border-color: #333333 !important;
}

.login-page .btn-link {
    color: #111111 !important;
}

.login-page .input-group-text {
    background-color: #f5f5f5;
    border-color: #cccccc;
    color: #333333;
}

.login-page .form-control:focus {
    border-color: #111111;
    box-shadow: 0 0 0 0.2rem rgba(17, 17, 17, 0.15);
}

/* --------------------------------------------
   13. DROPZONE
   -------------------------------------------- */
.dropzone {
    border: 2px dashed #cccccc;
    border-radius: 0.5rem;
    background: #fafafa;
    transition: all 0.15s ease-in-out;
}

.dropzone:hover {
    border-color: #111111;
    background: #f5f5f5;
}

.dropzone .dz-message {
    color: #666666;
}

.dropzone .dz-preview .dz-progress .dz-upload {
    background: #111111;
}

/* --------------------------------------------
   14. SCROLLBAR STYLING
   -------------------------------------------- */
.dataTables_scrollBody::-webkit-scrollbar {
    height: 8px;
}

.dataTables_scrollBody::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 4px;
}

.dataTables_scrollBody::-webkit-scrollbar-thumb {
    background: #cccccc;
    border-radius: 4px;
}

.dataTables_scrollBody::-webkit-scrollbar-thumb:hover {
    background: #999999;
}

/* --------------------------------------------
   15. FOCUS VISIBLE FOR ACCESSIBILITY
   -------------------------------------------- */
.btn:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid #111111;
    outline-offset: 2px;
}

/* --------------------------------------------
   16. RESPONSIVE IMPROVEMENTS
   -------------------------------------------- */
@media (max-width: 992px) {
    .card-body {
        padding: 1rem;
    }

    .dt-buttons {
        justify-content: flex-start;
        margin-bottom: 1rem;
    }

    .dt-buttons .btn {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
    }

    .dataTables_length,
    .dataTables_filter {
        text-align: left !important;
        margin-bottom: 0.75rem;
    }

    .dataTables_filter {
        float: none !important;
    }

    .dataTables_filter input {
        width: 100%;
        margin-left: 0;
        margin-top: 0.5rem;
    }

    table.dataTable thead th {
        font-size: 0.6875rem;
        padding: 0.625rem 0.5rem;
    }

    table.dataTable tbody td {
        font-size: 0.8125rem;
        padding: 0.625rem 0.5rem;
    }

    .btn-xs {
        padding: 0.25rem 0.5rem;
        font-size: 0.6875rem;
    }

    .dataTables_paginate .paginate_button {
        padding: 0.375rem 0.625rem !important;
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .card-header {
        padding: 0.875rem 1rem;
        font-size: 0.9375rem;
    }

    .card-header::after {
        left: 1rem;
        right: 1rem;
    }

    .container-fluid > .row:first-child .btn-success,
    .c-main .row:first-child .btn-success {
        width: 100%;
        justify-content: center;
        margin-bottom: 1rem;
    }

    .dt-buttons {
        width: 100%;
    }

    .dt-buttons .btn {
        flex: 1 1 calc(50% - 0.375rem);
        justify-content: center;
        min-width: 0;
    }

    .dataTables_info,
    .dataTables_paginate {
        text-align: center !important;
        float: none !important;
    }

    .dataTables_paginate {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem;
    }
}

/* --------------------------------------------
   17. CALENDAR
   -------------------------------------------- */
.fc .fc-button-primary {
    background-color: #111111 !important;
    border-color: #111111 !important;
}

.fc .fc-button-primary:hover {
    background-color: #333333 !important;
    border-color: #333333 !important;
}

.fc .fc-button-primary:disabled {
    background-color: #666666 !important;
    border-color: #666666 !important;
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
    background-color: #000000 !important;
    border-color: #000000 !important;
}

.fc .fc-daygrid-day.fc-day-today {
    background-color: #f5f5f5 !important;
}

.fc-event {
    background-color: #111111 !important;
    border-color: #111111 !important;
}

/* --------------------------------------------
   18. MISCELLANEOUS
   -------------------------------------------- */

/* Page title */
.c-main h1,
.c-main h2,
.c-main h3 {
    color: #111111;
}

/* Breadcrumb */
.breadcrumb {
    background-color: #f5f5f5;
}

.breadcrumb-item a {
    color: #111111;
}

.breadcrumb-item.active {
    color: #666666;
}

/* Modal */
.modal-header {
    background-color: #1a1a1a;
    color: #ffffff;
}

.modal-header .close {
    color: #ffffff;
}

/* Progress bar */
.progress-bar {
    background-color: #111111;
}

/* Table in show pages */
.table th {
    color: #333333;
    font-weight: 600;
    background-color: #f5f5f5;
}

/* CKEditor */
.ck.ck-editor__editable:focus {
    border-color: #111111 !important;
    box-shadow: 0 0 0 0.2rem rgba(17, 17, 17, 0.15) !important;
}

/* DateTime Picker */
.bootstrap-datetimepicker-widget table td.active,
.bootstrap-datetimepicker-widget table td.active:hover {
    background-color: #111111 !important;
}

.bootstrap-datetimepicker-widget table td.today::before {
    border-bottom-color: #111111 !important;
}

/* --------------------------------------------
   19. FILE SECTION CARDS (Offerta Show Pages)
   -------------------------------------------- */

/* Override white text for card headers with bg-white */
.file-section-card .card-header.bg-white {
    background-color: #ffffff !important;
    color: #333333 !important;
    border-bottom: 1px solid #e8e8e8;
}

.file-section-card .card-header.bg-white::after {
    display: none;
}

.file-section-card .card-header.bg-white h5 {
    color: #111111 !important;
    font-weight: 600;
    margin-bottom: 0;
}

.file-section-card .card-header.bg-white small {
    color: #666666 !important;
}

/* Collapse toggle hover state */
.file-section-card .card-header .collapse-toggle {
    transition: all 0.2s ease-in-out;
    padding: 0.5rem;
    margin: -0.5rem;
    border-radius: 0.5rem;
}

.file-section-card .card-header .collapse-toggle:hover {
    background-color: #f5f5f5;
}

.file-section-card .card-header .collapse-toggle:hover h5 {
    color: #000000 !important;
}

/* Section icons */
.section-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.section-icon.bg-primary-soft {
    background-color: rgba(17, 17, 17, 0.1);
}

.section-icon.bg-info-soft {
    background-color: rgba(102, 102, 102, 0.1);
}

.section-icon.bg-success-soft {
    background-color: rgba(40, 167, 69, 0.1);
}

/* Collapse icon rotation */
.file-section-card .collapse-icon {
    transition: transform 0.3s ease;
    color: #666666;
}

.file-section-card .collapse.show + .card-body ~ .collapse-icon,
.file-section-card [aria-expanded="true"] .collapse-icon,
.file-section-card .card-header:has(+ .collapse.show) .collapse-icon {
    transform: rotate(180deg);
}

/* Ensure badges have proper colors */
.file-section-card .badge-primary {
    background-color: #111111 !important;
}

.file-section-card .badge-info {
    background-color: #666666 !important;
}

.file-section-card .badge-success {
    background-color: #28a745 !important;
}

/* --------------------------------------------
   20. MESSAGGIO CARD STYLING
   -------------------------------------------- */

.messaggio-card {
    border-radius: 0.75rem;
    overflow: hidden;
}

.messaggio-card .card-header.bg-white {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%) !important;
    color: #333333 !important;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e8e8e8;
}

.messaggio-card .card-header.bg-white::after {
    display: none;
}

.messaggio-card .card-header h6 {
    color: #666666 !important;
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0;
}

.messaggio-card .card-header h6 i {
    color: #111111;
}

.messaggio-card .card-body {
    background-color: #fafafa;
    padding: 1.25rem;
}

.messaggio-card .card-body p {
    color: #333333;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* --------------------------------------------
   21. ROUNDED SIDEBAR MENU
   -------------------------------------------- */

/* Add padding to sidebar nav for rounded items spacing */
.c-sidebar .c-sidebar-nav {
    padding: 0.5rem;
}

/* Rounded nav links */
.c-sidebar .c-sidebar-nav-link,
.c-sidebar .c-sidebar-nav-dropdown-toggle {
    border-radius: 0.5rem !important;
    margin: 0.125rem 0;
}

/* Active state with rounded corners */
.c-sidebar .c-sidebar-nav-link.c-active,
.c-sidebar .c-sidebar-nav-dropdown.c-show .c-sidebar-nav-dropdown-toggle {
    border-radius: 0.5rem !important;
}

/* Rounded dropdown container - hidden by default */
.c-sidebar .c-sidebar-nav-dropdown-items {
    display: none;
    border-radius: 0.5rem !important;
    margin: 0.25rem 0 0.25rem 0.5rem;
    padding: 0.25rem;
    overflow: hidden;
}

/* Show dropdown items when parent has c-show class */
.c-sidebar .c-sidebar-nav-dropdown.c-show .c-sidebar-nav-dropdown-items {
    display: block;
}

/* Rounded dropdown items */
.c-sidebar .c-sidebar-nav-dropdown-items .c-sidebar-nav-link {
    border-radius: 0.375rem !important;
    margin: 0.125rem 0;
    padding-left: 3rem;
}

/* Hover state refinement */
.c-sidebar .c-sidebar-nav-link:hover,
.c-sidebar .c-sidebar-nav-dropdown-toggle:hover {
    border-radius: 0.5rem !important;
}

/* Active dropdown item */
.c-sidebar .c-sidebar-nav-dropdown-items .c-sidebar-nav-link.c-active {
    border-radius: 0.375rem !important;
}

/* Sidebar brand rounded */
.c-sidebar .c-sidebar-brand {
    border-radius: 0 0 0.75rem 0.75rem;
    margin-bottom: 0.5rem;
}

/* Sidebar minimizer rounded */
.c-sidebar .c-sidebar-minimizer {
    border-radius: 0.5rem 0.5rem 0 0;
    margin: 0.5rem;
    margin-bottom: 0;
}

/* Searchable field in sidebar */
.c-sidebar .c-sidebar-nav > li:first-child {
    padding: 0.25rem;
}

.c-sidebar .searchable-field {
    border-radius: 0.5rem !important;
}

/* --------------------------------------------
   22. FILE DOWNLOAD CELLS (Index DataTables)
   -------------------------------------------- */

.file-download-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.file-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
}

.file-count-badge.empty {
    background-color: #f5f5f5;
    color: #999999;
}

.file-count-badge.has-files {
    background-color: #111111;
    color: #ffffff;
}

.file-count-badge.has-files.success {
    background-color: #28a745;
}

.file-count-badge i {
    font-size: 0.75rem;
}

.file-download-btn {
    width: 32px;
    height: 32px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    transition: all 0.2s ease;
}

.file-download-btn:hover {
    transform: scale(1.1);
}

.file-download-btn i {
    font-size: 0.75rem;
}

/* ============================================
   CATALOGO PUBBLICO STYLES
   ============================================ */

/* Public Page Base Styles */
.public-page-container {
    max-width: 1600px;
    margin: 0 auto;
}

/* Catalog Filters */
.catalog-filters {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.catalog-filters .filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.catalog-filters .filter-item {
    flex: 1;
    min-width: 180px;
}

.catalog-filters .filter-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

/* Catalog Cards */
.catalog-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.catalog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.catalog-card-header {
    background: linear-gradient(135deg, #111111 0%, #333333 100%);
    color: #fff;
    padding: 1.25rem;
}

.catalog-card-body {
    padding: 1.25rem;
    flex: 1;
}

.catalog-card-footer {
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

/* Catalog Tags */
.catalog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.catalog-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
}

.catalog-tag-brand { background: #e3f2fd; color: #1565c0; }
.catalog-tag-stagione { background: #fff3e0; color: #ef6c00; }
.catalog-tag-categoria { background: #e8f5e9; color: #2e7d32; }
.catalog-tag-genere { background: #f3e5f5; color: #7b1fa2; }
.catalog-tag-livello { background: #ffebee; color: #c62828; }
.catalog-tag-tipo { background: #e0f7fa; color: #00838f; }
.catalog-tag-tipologia { background: #eceff1; color: #455a64; }

/* Download Button Styles */
.btn-catalog-download {
    background: #111111;
    color: #fff;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-catalog-download:hover {
    background: #333333;
    color: #fff;
    transform: translateY(-1px);
}

.btn-catalog-download:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading Animation */
@keyframes catalogPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.catalog-loading {
    animation: catalogPulse 1.5s infinite;
}

/* Empty State */
.catalog-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.catalog-empty-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    color: #bbb;
}

/* Responsive Grid */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 576px) {
    .catalog-grid {
        grid-template-columns: 1fr;
    }
    
    .catalog-filters .filter-item {
        min-width: 100%;
    }
}
