/**
 * Theme-only app. This file does not restore the old SaaS/Bootstrap skin.
 * It maps leftover Bootstrap class names (still in Blade/JS) onto the compiled theme tokens.
 */

.d-none,
.hidden { display: none !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-grid { display: grid !important; }

@media (min-width: 576px) {
    .d-sm-flex { display: flex !important; }
    .d-sm-inline { display: inline !important; }
    .d-sm-none { display: none !important; }
}
@media (min-width: 768px) {
    .d-md-flex { display: flex !important; }
    .d-md-none { display: none !important; }
    .d-md-block { display: block !important; }
}
@media (min-width: 992px) {
    .d-lg-flex { display: flex !important; }
    .d-lg-block { display: block !important; }
    .d-lg-inline { display: inline !important; }
    .d-lg-none { display: none !important; }
}

.collapse:not(.show) { display: none !important; visibility: visible !important; }
.collapse.show,
.collapsing { visibility: visible !important; }

.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }
.m-0 { margin: 0 !important; }
.p-0 { padding: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-0 { margin-top: 0 !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 0.75rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 0.75rem !important; }
.mt-4 { margin-top: 1rem !important; }
.me-2 { margin-inline-end: 0.5rem !important; }
.ms-2 { margin-inline-start: 0.5rem !important; }
.p-4 { padding: 1rem !important; }
.px-6 { padding-inline: 1.5rem !important; }
.pt-6 { padding-top: 1.5rem !important; }
.pb-4 { padding-bottom: 1rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 0.75rem !important; }

.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-end { justify-content: flex-end !important; }
.align-items-center { align-items: center !important; }
.align-items-end { align-items: flex-end !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-column { flex-direction: column !important; }
.text-center { text-align: center !important; }
.text-start, .text-left { text-align: start !important; }
.text-end, .text-right { text-align: end !important; }
.float-end { float: right !important; }
.overflow-hidden { overflow: hidden !important; }
.overflow-auto { overflow: auto !important; }

.text-danger { color: var(--color-danger, #b91c1c) !important; }
.text-muted { color: var(--color-default, #667085) !important; }
.text-white { color: #fff !important; }
.text-success { color: var(--color-success, #059669) !important; }
.fw-bold { font-weight: 700 !important; }
.fw-semibold { font-weight: 600 !important; }

.container-fluid { width: 100%; }
.table-responsive { overflow-x: auto; width: 100%; }

.row {
    display: flex;
    flex-wrap: wrap;
    margin-inline: -0.5rem;
}
.row > [class*="col-"],
.row > .col {
    padding-inline: 0.5rem;
    max-width: 100%;
    box-sizing: border-box;
}
.col, .col-12 { flex: 0 0 100%; width: 100%; }
.col-6 { flex: 0 0 50%; width: 50%; }
.col-4 { flex: 0 0 33.333%; width: 33.333%; }
.col-3 { flex: 0 0 25%; width: 25%; }
.col-8 { flex: 0 0 66.666%; width: 66.666%; }
.col-9 { flex: 0 0 75%; width: 75%; }
.col-2 { flex: 0 0 16.666%; width: 16.666%; }

@media (min-width: 576px) {
    .col-sm-6 { flex: 0 0 50%; width: 50%; }
    .col-sm-4 { flex: 0 0 33.333%; width: 33.333%; }
    .col-sm-12 { flex: 0 0 100%; width: 100%; }
}
@media (min-width: 768px) {
    .col-md-1 { flex: 0 0 8.333%; width: 8.333%; }
    .col-md-2 { flex: 0 0 16.666%; width: 16.666%; }
    .col-md-3 { flex: 0 0 25%; width: 25%; }
    .col-md-4 { flex: 0 0 33.333%; width: 33.333%; }
    .col-md-5 { flex: 0 0 41.666%; width: 41.666%; }
    .col-md-6 { flex: 0 0 50%; width: 50%; }
    .col-md-7 { flex: 0 0 58.333%; width: 58.333%; }
    .col-md-8 { flex: 0 0 66.666%; width: 66.666%; }
    .col-md-9 { flex: 0 0 75%; width: 75%; }
    .col-md-10 { flex: 0 0 83.333%; width: 83.333%; }
    .col-md-12 { flex: 0 0 100%; width: 100%; }
}
@media (min-width: 992px) {
    .col-lg-2 { flex: 0 0 16.666%; width: 16.666%; }
    .col-lg-3 { flex: 0 0 25%; width: 25%; }
    .col-lg-4 { flex: 0 0 33.333%; width: 33.333%; }
    .col-lg-6 { flex: 0 0 50%; width: 50%; }
    .col-lg-8 { flex: 0 0 66.666%; width: 66.666%; }
    .col-lg-9 { flex: 0 0 75%; width: 75%; }
    .col-lg-12 { flex: 0 0 100%; width: 100%; }
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-dark, #1e293b);
    margin-bottom: 0.35rem;
}
.form-control,
.form-select,
select.form-control,
textarea.form-control,
.form-input {
    display: block;
    width: 100%;
    height: 38px;
    padding: 0.4rem 0.75rem;
    font-size: 0.875rem;
    color: var(--color-title, #1e293b);
    background: var(--color-white, #fff);
    border: 1px solid var(--color-border-color, #e5e7eb);
    border-radius: 0.375rem;
}
textarea.form-control,
.form-textarea {
    height: auto;
    min-height: 80px;
}
.form-control:focus,
.form-select:focus,
.form-input:focus {
    outline: none;
    border-color: var(--color-primary, #0f766e);
    box-shadow: 0 0 0 1px var(--color-primary, #0f766e);
}
.form-check {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.form-check-input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--color-primary, #0f766e);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    min-height: 32px;
    border-radius: var(--radius-md, 0.375rem);
    border: 1px solid var(--color-border-color, #e5e7eb);
    background: var(--color-white, #fff);
    color: var(--color-title, #1e293b);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    box-sizing: border-box;
    transition: all 0.2s ease;
}
.btn-sm,
.btn-small,
.btn-lg {
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 500;
    min-height: 32px;
}
.btn-primary,
.cs-btn-add,
button.btn-blue,
button.btn-fursa-form-submit {
    background: var(--color-primary, #0f766e) !important;
    border-color: var(--color-primary, #0f766e) !important;
    color: var(--saas-primary-text, #fff) !important;
}
.btn-primary:hover,
.cs-btn-add:hover,
button.btn-blue:hover,
button.btn-fursa-form-submit:hover {
    background: var(--color-primary-hover, #0c6760) !important;
    border-color: var(--color-primary-hover, #0c6760) !important;
    color: var(--saas-primary-text, #fff) !important;
}
.btn-secondary,
.btn-outline-secondary,
.btn-outline-primary,
.btn-outline-success,
.btn-outline-info,
.btn-outline-warning,
.btn-outline-dark,
.btn-light,
.btn-default,
.btn-info,
.btn-warning {
    background: var(--color-white, #fff);
    border-color: var(--color-border-color, #e5e7eb);
    color: var(--color-title, #1e293b);
}
.btn-danger,
.btn-outline-danger { background: var(--color-danger, #b91c1c) !important; border-color: var(--color-danger, #b91c1c) !important; color: #fff !important; }
.btn-success { background: var(--color-dark, #1e293b) !important; border-color: var(--color-dark, #1e293b) !important; color: #fff !important; }
.btn-dark { background: var(--color-dark, #1e293b) !important; border-color: var(--color-dark, #1e293b) !important; color: #fff !important; }
.btn-link { background: none; border: 0; color: var(--color-primary, #0f766e); padding: 0; }

.table,
table.dataTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}
.table th,
.table td,
table.dataTable th,
table.dataTable td {
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid var(--color-border-color, #e5e7eb);
    vertical-align: middle;
    text-align: start;
}
.table thead th,
table.dataTable thead th {
    background: var(--color-light, #f8fafc);
    color: var(--color-dark, #1e293b);
    font-weight: 600;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
    overflow: auto;
}
.modal.show,
.modal.in { display: block; }
.modal-dialog {
    position: relative;
    width: auto;
    margin: 1.75rem auto;
    max-width: 32rem;
}
.modal-dialog.modal-lg { max-width: 50rem; }
.modal-dialog.modal-xl { max-width: 72rem; }
.modal-content {
    background: var(--color-white, #fff);
    border: 1px solid var(--color-border-color, #e5e7eb);
    border-radius: 0.375rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}
.modal-header,
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-color: var(--color-border-color, #e5e7eb);
}
.modal-header { border-bottom: 1px solid var(--color-border-color, #e5e7eb); }
.modal-footer { border-top: 1px solid var(--color-border-color, #e5e7eb); justify-content: flex-end; }
.modal-body { padding: 1rem; }
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10040;
    background: #000;
    opacity: 0.45;
}
.btn-close {
    width: 1.5rem;
    height: 1.5rem;
    border: 0;
    background: transparent;
    cursor: pointer;
    opacity: 0.6;
}

.dropdown-menu {
    position: absolute;
    z-index: 10055;
    display: none;
    min-width: 10rem;
    padding: 0.4rem;
    background: var(--color-white, #fff);
    border: 1px solid var(--color-border-color, #e5e7eb);
    border-radius: 0.375rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.dropdown-menu.show { display: block; }
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.65rem;
    border-radius: 0.3rem;
    color: var(--color-title, #1e293b);
    text-decoration: none;
    font-size: 0.8125rem;
}
.dropdown-item:hover { background: var(--color-light, #f8fafc); }

.nav-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    border-bottom: 1px solid var(--color-border-color, #e5e7eb);
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}
.nav-tabs .nav-link {
    padding: 0.5rem 0.85rem;
    border: 0;
    background: none;
    color: var(--color-default, #667085);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
}
.nav-tabs .nav-link.active {
    color: var(--color-dark, #1e293b);
    border-bottom: 2px solid var(--color-primary, #0f766e);
}
.tab-content > .tab-pane { display: none; }
.tab-content > .active { display: block; }

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    list-style: none;
    padding: 0;
    margin: 0;
}
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    border: 1px solid var(--color-border-color, #e5e7eb);
    border-radius: 0.375rem;
    color: var(--color-title, #1e293b);
    text-decoration: none;
    font-size: 0.8125rem;
    background: var(--color-white, #fff);
}
.page-item.active .page-link {
    background: var(--color-primary, #0f766e);
    border-color: var(--color-primary, #0f766e);
    color: #fff;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    border: 1px solid var(--color-border-color, #e5e7eb);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}
.alert-danger { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.alert-success { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.alert-warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.45rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
}

.LoaderSec {
    position: fixed;
    inset: 0;
    background: color-mix(in srgb, var(--color-primary, #0f766e) 55%, transparent);
    z-index: 99999999999;
}
.LoaderSec .loader {
    width: 55px;
    height: 55px;
    border: 6px solid #fff;
    border-bottom-color: var(--color-primary, #0f766e);
    border-radius: 50%;
    display: inline-block;
    animation: theme-loader-spin 1s linear infinite;
    position: fixed;
    top: 50%;
    left: 50%;
    margin: -27px 0 0 -27px;
}
@keyframes theme-loader-spin { to { transform: rotate(360deg); } }

.swal2-container { z-index: 10100 !important; }
.select2-container--open { z-index: 10060 !important; }
.datepicker, .ui-datepicker { z-index: 10070 !important; }

.select2-container { width: 100% !important; }
.select2-container--classic .select2-selection--single,
.select2-container--default .select2-selection--single {
    height: 38px !important;
    border: 1px solid var(--color-border-color, #e5e7eb) !important;
    border-radius: 0.375rem !important;
    background: var(--color-white, #fff) !important;
}
.select2-container--classic .select2-selection--single .select2-selection__rendered,
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px !important;
    padding-left: 12px !important;
    color: var(--color-title, #1e293b) !important;
}
.select2-dropdown {
    border-color: var(--color-border-color, #e5e7eb) !important;
    background: var(--color-white, #fff) !important;
}

.dt-toolbar-top,
.dt-toolbar-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0;
}

.cs-card,
.page-wrapper .bg-light.p-4.rounded,
.page-wrapper .bg-white.rounded-xl {
    background: var(--color-white, #fff);
    border: 1px solid var(--color-border-color, #e5e7eb);
    border-radius: 0.375rem;
}

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--color-white, #fff);
    border: 1px solid var(--color-border-color, #e5e7eb);
    border-radius: var(--radius-md, 0.375rem);
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--color-white, #fff);
    border-bottom: 1px solid var(--color-border-color, #e5e7eb);
    border-radius: var(--radius-md, 0.375rem) var(--radius-md, 0.375rem) 0 0;
}
.card-header h6 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-gray-900, #111827);
}
.card-body {
    padding: 1rem;
    flex: 1 1 auto;
}
.card-footer {
    padding: 0.85rem 1rem;
    border-top: 1px solid var(--color-border-color, #e5e7eb);
}
.row.g-3 {
    row-gap: 0.75rem;
}
.input-group {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
}
.input-group > .form-control,
.input-group > .form-input,
.input-group > .form-select {
    flex: 1 1 0;
    width: 1%;
    min-width: 0;
}
.input-group-text {
    display: inline-flex;
    align-items: center;
    padding: 0 0.6rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-default, #667085);
    background: var(--color-light, #f8fafc);
    border: 1px solid var(--color-border-color, #e5e7eb);
    white-space: nowrap;
}
.accordion-item {
    border: 1px solid var(--color-border-color, #e5e7eb);
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
    overflow: hidden;
    background: var(--color-white, #fff);
}
.accordion-button {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0.7rem 1rem;
    background: var(--color-light, #f8fafc);
    border: 0;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--color-gray-900, #111827);
    text-align: left;
    cursor: pointer;
}
.accordion-body { padding: 0.85rem 1rem 1rem; }
.form-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}
.p-3 { padding: 0.75rem !important; }
.py-5 { padding-block: 3rem !important; }
.flex-grow-1 { flex-grow: 1 !important; }
.small, small { font-size: 0.8125rem; }
.bg-light { background: var(--color-light, #f8fafc) !important; }
.badge.bg-success { background: var(--color-success, #059669) !important; color: #fff !important; }
.badge.bg-danger { background: var(--color-danger, #b91c1c) !important; color: #fff !important; }
.workflow-save-bar {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    background: var(--color-white, #fff);
    border: 1px solid var(--color-border-color, #e5e7eb);
    border-radius: var(--radius-md, 0.375rem);
}
.section-item.active {
    background-color: var(--color-primary, #0f766e) !important;
    border-color: var(--color-primary, #0f766e) !important;
    color: var(--saas-primary-text, #fff) !important;
}
.cs-card-header,
.cs-list-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.cs-card-title,
.cs-list-page-header h1,
.cs-list-page-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-gray-900, #2f3a4b);
    margin: 0;
}
.cs-card-subtitle,
.cs-list-page-header .lead {
    font-size: 0.875rem;
    color: var(--color-default, #667085);
    margin: 0.15rem 0 0;
}

label.error { color: var(--color-danger, #b91c1c); font-size: 0.75rem; }

.theme-header-clock {
    display: none;
    align-items: center;
    gap: 0.4rem;
    font-size: 12px;
    color: var(--color-default, #667085);
    white-space: nowrap;
    padding: 0 0.65rem;
    height: 32px;
    border: 1px solid var(--color-border-color, #e5e7eb);
    border-radius: 0.375rem;
    background: var(--color-white, #fff);
}
@media (min-width: 768px) {
    .theme-header-clock { display: inline-flex; }
}
.theme-user-initials {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary, #0f766e);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}
.theme-page-title {
    font-size: 0.925rem;
    font-weight: 600;
    color: var(--color-title, #1e293b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: min(42vw, 360px);
}
.navbar-header .logo img,
.sidebar .sidebar-logo img {
    max-height: 32px;
    width: auto;
    object-fit: contain;
}
.sidebar-menu i.bi,
.sidebar-menu i.ph-duotone {
    font-size: 18px;
    line-height: 1;
}

.numberCircle {
    display: inline-block;
    color: #fff;
    text-align: center;
    line-height: 0;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    min-width: 38px;
    min-height: 38px;
}
.numberCircle span {
    display: inline-block;
    padding-top: 50%;
    padding-bottom: 50%;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] .modal-content,
[data-theme="dark"] .dropdown-menu,
[data-theme="dark"] .cs-card,
[data-theme="dark"] .btn:not(.btn-primary):not(.btn-danger):not(.btn-success):not(.btn-dark),
[data-theme="dark"] .select2-container--classic .select2-selection--single,
[data-theme="dark"] .theme-header-clock {
    background: var(--color-white) !important;
    color: var(--color-title);
    border-color: var(--color-border-color) !important;
}
[data-theme="dark"] .table thead th,
[data-theme="dark"] table.dataTable thead th {
    background: var(--color-light) !important;
    color: var(--color-title);
}
