/* ==========================================================================
   LORA theme (2026-08-26) — Paylora palette: coral #FE4A49, teal #2AB7CA,
   yellow #FED766, grays #E6E6EA / #F4F4F8. Coral sidebar, pill buttons and
   chips, big rounded borderless cards.
   Implements the Bootstrap class vocabulary
   the views already use, plus the app shell (sidebar/header), in TailAdmin's
   design language. bootstrap.bundle.js still drives modals/tabs/dropdowns —
   only the styling layer changed.
   ========================================================================== */

:root {
    /* Lora palette: coral / teal / yellow / soft grays */
    --ta-coral: #FE4A49;
    --ta-coral-dark: #e13a39;
    --ta-coral-soft: #ffecec;
    --ta-teal: #2AB7CA;
    --ta-teal-dark: #2296a6;
    --ta-teal-soft: #e3f6f8;
    --ta-yellow: #FED766;
    --ta-yellow-dark: #8a6d00;
    --ta-yellow-soft: #fff6d9;
    --ta-ink: #1c1c1e;
    --ta-gray-25: #fcfcfd;
    --ta-gray-50: #F4F4F8;
    --ta-gray-100: #ecechf;
    --ta-gray-100: #ececf1;
    --ta-gray-200: #E6E6EA;
    --ta-gray-300: #d4d4dc;
    --ta-gray-400: #9a9aa5;
    --ta-gray-500: #6e6e78;
    --ta-gray-600: #55555e;
    --ta-gray-700: #3c3c43;
    --ta-gray-800: #26262b;
    --ta-gray-900: #1c1c1e;
    /* semantic mappings keep the scaffold working */
    --ta-brand-25: #fff5f5;
    --ta-brand-50: var(--ta-coral-soft);
    --ta-brand-100: #ffd9d9;
    --ta-brand-400: #ff7a79;
    --ta-brand-500: var(--ta-teal);
    --ta-brand-600: var(--ta-teal-dark);
    --ta-success-50: var(--ta-teal-soft);
    --ta-success-500: var(--ta-teal);
    --ta-success-600: var(--ta-teal-dark);
    --ta-warning-50: var(--ta-yellow-soft);
    --ta-warning-500: var(--ta-yellow);
    --ta-error-50: var(--ta-coral-soft);
    --ta-error-500: var(--ta-coral);
    --ta-error-600: var(--ta-coral-dark);
    --ta-radius: 12px;
    --ta-radius-lg: 20px;
    --ta-shadow-xs: 0 2px 6px 0 rgba(28, 28, 30, 0.04);
    --ta-shadow-sm: 0 6px 18px 0 rgba(28, 28, 30, 0.07);
    --ta-sidebar-w: 284px;
    --ta-font: 'DM Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ------------------------------------------------------------- base */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--ta-font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--ta-gray-700);
    background: var(--ta-gray-50);
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { margin: 0 0 .5rem; color: var(--ta-gray-800); font-weight: 600; line-height: 1.3; }
h4 { font-size: 20px; }
h5 { font-size: 17px; }
h6 { font-size: 14px; }
p { margin: 0 0 .75rem; }
a { color: var(--ta-brand-500); text-decoration: none; }
a:hover { color: var(--ta-brand-600); }
img { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--ta-gray-200); margin: 16px 0; }
label { display: inline-block; }
::placeholder { color: var(--ta-gray-400); }

/* ------------------------------------------------------------ shell */
.page-wrapper { display: flex; min-height: 100vh; }
.left-sidebar {
    width: var(--ta-sidebar-w);
    min-width: var(--ta-sidebar-w);
    background: var(--ta-coral);
    border-right: 0;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    z-index: 1040;
    overflow-y: auto;
    padding: 0 16px 24px;
    transition: transform .2s ease;
}
.body-wrapper { flex: 1; margin-left: var(--ta-sidebar-w); min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.body-wrapper-inner { padding: 24px; flex: 1; }
.container-fluid { width: 100%; }
@media (max-width: 1199px) {
    .left-sidebar { transform: translateX(-100%); }
    body.show-sidebar .left-sidebar { transform: translateX(0); box-shadow: 0 20px 40px rgba(16,24,40,.2); }
    .body-wrapper { margin-left: 0; }
}

.brand-logo { padding: 36px 10px 28px; }
.brand-logo .text-dark, .brand-logo .text-primary { color: #fff !important; }
.brand-logo .fw-bolder { letter-spacing: .01em; }
.brand-logo .fs-5 { font-size: 24px !important; }
.close-btn { cursor: pointer; color: rgba(255,255,255,.8); }
@media (min-width: 1200px) { .close-btn { display: none !important; } }

/* sidebar nav */
.sidebar-nav ul { list-style: none; margin: 0; padding: 0; }
.nav-small-cap {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .08em; color: rgba(255, 255, 255, .55);
    padding: 20px 10px 8px;
}
.nav-small-cap-icon { display: none; }
.sidebar-item { margin-bottom: 2px; }
.sidebar-link {
    display: flex; align-items: center; gap: 13px;
    padding: 12px 16px;
    border-radius: 999px;
    color: rgba(255, 255, 255, .92);
    font-weight: 500; font-size: 16.5px;
    transition: background .15s, color .15s;
}
.sidebar-link:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.sidebar-link.active, .sidebar-item.selected > .sidebar-link {
    background: #fff; color: var(--ta-coral); font-weight: 700;
}
.sidebar-link iconify-icon, .sidebar-link .ti { font-size: 24px !important; flex-shrink: 0; }

/* top header */
.app-header {
    position: sticky; top: 0; z-index: 1030;
    background: #fff;
    border-bottom: 0;
    box-shadow: 0 1px 0 var(--ta-gray-200);
}
.app-header .navbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; min-height: 64px; }
.navbar-nav { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; gap: 8px; }
.navbar-collapse { display: flex; flex: 1; }
.app-header .nav-link { color: var(--ta-gray-500); padding: 8px 12px; border-radius: 12px; display: inline-flex; }
.app-header .nav-link:hover { background: var(--ta-gray-100); color: var(--ta-gray-800); }

/* ------------------------------------------------------------- grid */
.row { display: flex; flex-wrap: wrap; margin-left: -10px; margin-right: -10px; }
.row > * { padding-left: 10px; padding-right: 10px; width: 100%; min-width: 0; }
.g-2 { row-gap: 8px; margin-left: -4px; margin-right: -4px; }
.g-2 > * { padding-left: 4px; padding-right: 4px; }
.g-3 { row-gap: 12px; margin-left: -6px; margin-right: -6px; }
.g-3 > * { padding-left: 6px; padding-right: 6px; }
.col-12 { flex: 0 0 auto; width: 100%; }
.col-2 { flex: 0 0 auto; width: 16.6667%; }
.col-3 { flex: 0 0 auto; width: 25%; }
.col-4 { flex: 0 0 auto; width: 33.3333%; }
.col-5 { flex: 0 0 auto; width: 41.6667%; }
.col-6 { flex: 0 0 auto; width: 50%; }
.col-8 { flex: 0 0 auto; width: 66.6667%; }
@media (min-width: 768px) {
    .col-md-2 { flex: 0 0 auto; width: 16.6667%; }
    .col-md-3 { flex: 0 0 auto; width: 25%; }
    .col-md-4 { flex: 0 0 auto; width: 33.3333%; }
    .col-md-5 { flex: 0 0 auto; width: 41.6667%; }
    .col-md-6 { flex: 0 0 auto; width: 50%; }
    .col-md-7 { flex: 0 0 auto; width: 58.3333%; }
    .col-md-8 { flex: 0 0 auto; width: 66.6667%; }
}
@media (min-width: 992px) {
    .col-lg-4 { flex: 0 0 auto; width: 33.3333%; }
    .col-lg-6 { flex: 0 0 auto; width: 50%; }
}
@media (min-width: 1400px) {
    .col-xxl-3 { flex: 0 0 auto; width: 25%; }
}

/* -------------------------------------------------------------- card */
.card {
    background: #fff;
    border: 0;
    border-radius: var(--ta-radius-lg);
    box-shadow: var(--ta-shadow-xs);
    margin-bottom: 24px;
}
.card-body { padding: 24px; }
.card-title { font-size: 17px; font-weight: 600; color: var(--ta-gray-800); }
.card-subtitle { font-size: 13px; color: var(--ta-gray-500); }

/* ----------------------------------------------------------- buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    font-family: inherit; font-size: 14px; font-weight: 500;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
    line-height: 1.4;
    white-space: nowrap;
}
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-primary { background: var(--ta-teal); color: #fff; box-shadow: var(--ta-shadow-xs); }
.btn-primary:hover { background: var(--ta-teal-dark); color: #fff; }
.btn-success { background: var(--ta-teal); color: #fff; }
.btn-success:hover { background: var(--ta-teal-dark); color: #fff; }
.btn-warning { background: var(--ta-yellow); color: var(--ta-ink); }
.btn-warning:hover { background: #f7c94a; color: var(--ta-ink); }
.btn-danger { background: var(--ta-coral); color: #fff; }
.btn-danger:hover { background: var(--ta-coral-dark); color: #fff; }
.btn-dark { background: var(--ta-gray-800); color: #fff; }
.btn-dark:hover { background: var(--ta-gray-900); color: #fff; }
.btn-light {
    background: #fff; color: var(--ta-gray-600);
    border-color: var(--ta-gray-300); box-shadow: var(--ta-shadow-xs);
}
.btn-light:hover { background: var(--ta-gray-50); color: var(--ta-gray-800); }
.btn-outline-primary { background: #fff; color: var(--ta-teal); border-color: var(--ta-teal); }
.btn-outline-primary:hover { background: var(--ta-teal-soft); }
.btn-outline-secondary { background: #fff; color: var(--ta-gray-600); border-color: var(--ta-gray-300); }
.btn-outline-secondary:hover { background: var(--ta-gray-100); }
.btn-outline-warning { background: #fff; color: var(--ta-yellow-dark); border-color: var(--ta-yellow); }
.btn-outline-warning:hover { background: var(--ta-yellow-soft); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-close {
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23667085'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
    border: 0; width: 1em; height: 1em; padding: .25em; opacity: .6; cursor: pointer;
}
.btn-close:hover { opacity: 1; }

/* ------------------------------------------------------------- forms */
.form-label { font-size: 13px; font-weight: 500; color: var(--ta-gray-700); margin-bottom: 6px; }
.form-control, .form-select {
    display: block; width: 100%;
    font-family: inherit; font-size: 14px; color: var(--ta-gray-800);
    background: #fff;
    border: 1.5px solid var(--ta-gray-200);
    border-radius: 12px;
    padding: 9px 14px;
    box-shadow: none;
    transition: border-color .15s, box-shadow .15s;
    appearance: none;
}
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23667085'%3e%3cpath d='M4.646 5.646a.5.5 0 0 1 .708 0L8 8.293l2.646-2.647a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    background-repeat: no-repeat; background-position: right 12px center; background-size: 14px;
    padding-right: 34px;
}
.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--ta-teal);
    box-shadow: 0 0 0 3px rgba(42, 183, 202, .15);
}
input[type="file"].form-control { padding: 7px 12px; }
input[type="file"].form-control::file-selector-button {
    border: 0; background: var(--ta-gray-100); color: var(--ta-gray-700);
    padding: 4px 12px; margin-right: 12px; border-radius: 6px; cursor: pointer; font-family: inherit;
}
.form-check { display: flex; align-items: center; gap: 8px; }
.form-check-input {
    width: 16px; height: 16px; accent-color: var(--ta-brand-500);
    border: 1px solid var(--ta-gray-300); border-radius: 4px;
}
.form-check-label { font-size: 14px; color: var(--ta-gray-700); }
.input-group { display: flex; width: 100%; }
.input-group .form-control { border-top-right-radius: 0; border-bottom-right-radius: 0; flex: 1; }
.input-group .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group-sm .form-control { padding: 5px 10px; font-size: 13px; }
.input-group-sm .btn { padding: 5px 12px; font-size: 13px; }

/* ------------------------------------------------------------- table */
.table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 8px; }
.table th {
    text-align: left; font-size: 12px; font-weight: 500;
    text-transform: uppercase; letter-spacing: .02em;
    color: var(--ta-gray-500);
    padding: 12px; border-bottom: 1px solid var(--ta-gray-200);
    white-space: nowrap;
}
.table td {
    padding: 12px; color: var(--ta-gray-600);
    border-bottom: 1px solid var(--ta-gray-100);
    vertical-align: middle;
}
.table-sm th, .table-sm td { padding: 8px 10px; }
.table tbody tr:hover { background: var(--ta-gray-25); }
.table-striped tbody tr:nth-child(odd) { background: var(--ta-gray-50); }
.table-success, .table tr.table-success td { background: var(--ta-success-50); }
.table-responsive { overflow-x: auto; }
.align-middle td, .align-middle th { vertical-align: middle; }

/* DataTables v2 chrome */
.dt-container .dt-length, .dt-container .dt-search { margin-bottom: 12px; font-size: 13px; color: var(--ta-gray-500); }
.dt-container select.dt-input, .dt-container input.dt-input {
    border: 1px solid var(--ta-gray-300); border-radius: 6px; padding: 5px 8px;
    font-family: inherit; font-size: 13px; color: var(--ta-gray-700); background: #fff; margin: 0 6px;
}
.dt-container .dt-info { font-size: 13px; color: var(--ta-gray-400); padding-top: 12px; }
.dt-container .dt-paging { padding-top: 8px; }
.dt-paging .dt-paging-button {
    border: 1.5px solid var(--ta-gray-200); background: #fff; color: var(--ta-gray-600);
    padding: 5px 12px; margin-left: 4px; border-radius: 999px; cursor: pointer; font-size: 13px;
}
.dt-paging .dt-paging-button.current { background: var(--ta-ink); color: #fff; border-color: var(--ta-ink); }
.dt-paging .dt-paging-button.disabled { opacity: .4; cursor: default; }
.dt-paging .dt-paging-button:hover:not(.disabled):not(.current) { background: var(--ta-gray-100); }
table.dataTable thead th { background: transparent; }
/* legacy bootstrap-style pagination markup */
.pagination { display: flex; list-style: none; gap: 4px; padding: 0; margin: 8px 0 0; }
.page-link {
    border: 1.5px solid var(--ta-gray-200); background: #fff; color: var(--ta-gray-600);
    padding: 5px 12px; border-radius: 999px; font-size: 13px; display: block;
}
.page-item.active .page-link { background: var(--ta-ink); color: #fff; border-color: var(--ta-ink); }
.page-item.disabled .page-link { opacity: .4; }

/* -------------------------------------------------------------- tabs */
.nav { display: flex; list-style: none; padding: 0; margin: 0; }
.nav-tabs { border-bottom: 0; gap: 8px; }
.nav-tabs .nav-link {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 16px; font-size: 13.5px; font-weight: 600;
    color: var(--ta-gray-600);
    border: 1.5px solid var(--ta-gray-200); border-radius: 999px;
    background: #fff; cursor: pointer;
}
.nav-tabs .nav-link:hover { border-color: var(--ta-gray-400); color: var(--ta-ink); }
.nav-tabs .nav-link.active {
    color: #fff;
    border-color: var(--ta-ink);
    background: var(--ta-ink);
}
.nav-tabs .nav-link .badge { font-size: 11px; }
.tab-content > .tab-pane { display: none; }
.tab-content > .tab-pane.active { display: block; }
.tab-content { padding-top: 16px; }

/* ------------------------------------------------------------- badge */
.badge {
    display: inline-flex; align-items: center;
    font-size: 12px; font-weight: 500;
    padding: 3px 10px; border-radius: 999px;
    line-height: 1.5;
}
.badge.bg-success { background: var(--ta-teal-soft) !important; color: var(--ta-teal-dark) !important; }
.badge.bg-warning { background: var(--ta-yellow-soft) !important; color: var(--ta-yellow-dark) !important; }
.badge.bg-danger { background: var(--ta-coral-soft) !important; color: var(--ta-coral-dark) !important; }
.badge.bg-primary { background: var(--ta-teal) !important; color: #fff !important; }
.badge.bg-secondary { background: var(--ta-gray-100) !important; color: var(--ta-gray-600) !important; }
.badge.bg-light { background: var(--ta-gray-100) !important; color: var(--ta-gray-700) !important; }

/* ------------------------------------------------------------- modal */
.modal {
    display: none;
    position: fixed; inset: 0; z-index: 1055;
    overflow-x: hidden; overflow-y: auto;
    outline: 0;
}
.modal-dialog {
    max-width: 520px; margin: 40px auto;
    position: relative; width: auto;
    padding: 0 12px;
}
.modal-lg { max-width: 800px; }
.modal-xl { max-width: 1140px; }
.modal-content {
    background: #fff; border-radius: 24px;
    border: 0; box-shadow: 0 24px 48px rgba(28, 28, 30, .18);
    display: flex; flex-direction: column; width: 100%;
    position: relative;
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px 0;
    border-bottom: 0;
}
.modal-title { font-size: 17px; font-weight: 600; color: var(--ta-gray-800); margin: 0; }
.modal-body { padding: 20px 24px; }
.modal-footer {
    display: flex; align-items: center; justify-content: flex-end; gap: 8px;
    padding: 0 24px 20px;
    border-top: 0;
}
.modal-backdrop { position: fixed; inset: 0; z-index: 1050; background: var(--ta-gray-900); }
.modal-backdrop.fade { opacity: 0; transition: opacity .15s linear; }
.modal-backdrop.show, .modal-backdrop.fade.show { opacity: .55; }
.modal.fade .modal-dialog { transform: translateY(-16px); transition: transform .2s ease-out; }
.modal.show .modal-dialog { transform: none; }
.fade { transition: opacity .15s linear; }
.fade:not(.show) { opacity: 0; }
.fade.show { opacity: 1; }

/* ---------------------------------------------------------- dropdown */
.dropdown { position: relative; }
.dropdown-menu {
    display: none; position: absolute; z-index: 1060;
    min-width: 200px; background: #fff;
    border: 1px solid var(--ta-gray-200); border-radius: 12px;
    box-shadow: var(--ta-shadow-sm);
    padding: 8px; margin-top: 6px;
    list-style: none;
}
.dropdown-menu.show { display: block; }
.dropdown-menu-end { right: 0; left: auto; }
.dropdown-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px; border-radius: 8px;
    color: var(--ta-gray-700); font-size: 14px;
    white-space: nowrap; background: none; border: 0; width: 100%; cursor: pointer;
}
.dropdown-item:hover { background: var(--ta-gray-100); color: var(--ta-gray-900); }
.dropdown-header { padding: 8px 10px; font-size: 12px; color: var(--ta-gray-400); text-transform: uppercase; }

/* ------------------------------------------------------------- alert */
.alert { border-radius: 12px; padding: 12px 16px; font-size: 14px; border: 1px solid transparent; margin-bottom: 16px; }
.alert-info { background: var(--ta-brand-25); border-color: var(--ta-brand-100); color: var(--ta-gray-700); }
.alert-danger { background: var(--ta-error-50); border-color: #fecdca; color: var(--ta-error-600); }

/* ---------------------------------------------------------- progress */
.progress { background: var(--ta-gray-100); border-radius: 999px; overflow: hidden; height: 8px; }
.progress-bar { height: 100%; border-radius: 999px; transition: width .3s; background: var(--ta-teal); }
.progress-bar.bg-success { background: var(--ta-teal); }
.progress-bar.bg-warning { background: var(--ta-yellow); }
.progress-bar.bg-danger { background: var(--ta-coral); }

/* --------------------------------------------------------- utilities */
.d-flex { display: flex !important; }
.d-block { display: block !important; }
.d-none { display: none !important; }
@media (min-width: 768px) { .d-md-block { display: block !important; } }
@media (min-width: 992px) { .d-lg-block { display: block !important; } }
@media (max-width: 1199px) { .d-xl-none { display: block !important; } }
@media (min-width: 1200px) { .d-xl-none { display: none !important; } }
.flex-column { flex-direction: column !important; }
.flex-row { flex-direction: row !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-grow-1 { flex-grow: 1 !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; }
.align-items-start { align-items: flex-start !important; }
.gap-2 { gap: 8px !important; }
.gap-3 { gap: 12px !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 4px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 16px !important; }
.mb-4 { margin-bottom: 24px !important; }
.mt-1 { margin-top: 4px !important; }
.mt-2 { margin-top: 8px !important; }
.mt-3 { margin-top: 16px !important; }
.mt-4 { margin-top: 24px !important; }
.ms-2 { margin-left: 8px !important; }
.ms-3 { margin-left: 16px !important; }
.ms-auto { margin-left: auto !important; }
.me-1 { margin-right: 4px !important; }
.me-3 { margin-right: 16px !important; }
.p-3 { padding: 16px !important; }
.px-0 { padding-left: 0 !important; padding-right: 0 !important; }
.px-3 { padding-left: 16px !important; padding-right: 16px !important; }
.py-2 { padding-top: 8px !important; padding-bottom: 8px !important; }
.py-3 { padding-top: 16px !important; padding-bottom: 16px !important; }
.py-4 { padding-top: 24px !important; padding-bottom: 24px !important; }
.py-8 { padding-top: 12px !important; padding-bottom: 12px !important; }
.ps-4 { padding-left: 24px !important; }
.w-100 { width: 100% !important; }
.w-auto { width: auto !important; }
.h-100 { height: 100% !important; }
.min-vh-100 { min-height: 100vh !important; }
.text-center { text-align: center !important; }
.text-end { text-align: right !important; }
.text-start { text-align: left !important; }
.text-muted { color: var(--ta-gray-400) !important; }
.text-primary { color: var(--ta-brand-500) !important; }
.text-success { color: var(--ta-success-500) !important; }
.text-danger { color: var(--ta-error-500) !important; }
.text-warning { color: var(--ta-warning-500) !important; }
.text-dark { color: var(--ta-gray-800) !important; }
.text-nowrap { white-space: nowrap !important; }
.text-uppercase { text-transform: uppercase !important; letter-spacing: .03em; }
.text-decoration-none { text-decoration: none !important; }
.fw-medium { font-weight: 500 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }
.fw-bolder { font-weight: 800 !important; }
.fs-3 { font-size: 13px !important; }
.fs-4 { font-size: 14px !important; }
.fs-5 { font-size: 16px !important; }
.fs-6 { font-size: 18px !important; }
.small, small { font-size: 12.5px; }
.border { border: 1px solid var(--ta-gray-200) !important; }
.border-bottom { border-bottom: 1px solid var(--ta-gray-200) !important; }
.rounded { border-radius: var(--ta-radius) !important; }
.rounded-2 { border-radius: var(--ta-radius) !important; }
.rounded-circle { border-radius: 50% !important; }
.bg-white { background: #fff !important; }
.overflow-hidden { overflow: hidden !important; }
.position-relative { position: relative !important; }
.grow { flex-grow: 1; }

/* impersonation banner keeps its bootstrap look */
.impersonation-banner { background: var(--ta-warning-50); color: #b54708; }

/* ----------------------------------------------- third-party fixes */
/* Select2 sizing to match inputs */
.select2-container--bootstrap-5 .select2-selection,
.select2-container .select2-selection--single {
    min-height: 40px; border: 1px solid var(--ta-gray-300) !important;
    border-radius: var(--ta-radius) !important; font-size: 14px;
}
.select2-container--bootstrap-5 .select2-selection--single { padding: 8px 12px; }
.select2-dropdown { border: 1px solid var(--ta-gray-200) !important; border-radius: 10px !important; box-shadow: var(--ta-shadow-sm); }
.select2-container--bootstrap-5 .select2-results__option--highlighted { background: var(--ta-brand-500) !important; }
/* login page gradient */
.radial-gradient {
    background: radial-gradient(circle at 20% 10%, var(--ta-coral-soft) 0%, var(--ta-gray-50) 45%),
                radial-gradient(circle at 85% 85%, var(--ta-teal-soft) 0%, var(--ta-gray-50) 40%);
}
/* impersonation + misc palette touches */
.sidebar-link .ti, .sidebar-link iconify-icon { color: inherit; }
.app-header .nav-link:hover { background: var(--ta-gray-50); }

/* ---------------------------------------------- bootstrap collapse (nav) */
.collapse:not(.show) { display: none; }
.collapsing { height: 0; overflow: hidden; transition: height .2s ease; }

/* --------------------------------------------- sidebar category cards */
.nav-card {
    background: rgba(255, 255, 255, .13);
    border-radius: 18px;
    padding: 6px;
    margin: 12px 0;
    list-style: none;
}
.nav-card-header {
    display: flex; align-items: center; gap: 11px;
    padding: 11px 12px;
    border-radius: 14px;
    color: #fff;
    font-weight: 700; font-size: 13px;
    text-transform: uppercase; letter-spacing: .06em;
    cursor: pointer;
}
.nav-card-header iconify-icon { font-size: 20px; flex-shrink: 0; }
.nav-card-header:hover { color: #fff; background: rgba(255, 255, 255, .10); }
.nav-card-caret { margin-left: auto; transition: transform .2s ease; font-size: 16px; }
.nav-card-header.collapsed .nav-card-caret { transform: rotate(-90deg); }
.nav-card-menu { list-style: none; margin: 0; padding: 2px; }
.nav-card-menu .sidebar-link { padding: 9px 12px; font-size: 15.5px; }
.nav-card-menu .sidebar-link iconify-icon, .nav-card-menu .sidebar-link .ti { font-size: 21px !important; }

/* --------------------------------------------------------------- chat */
.chat-contact { color: var(--ta-gray-700); padding: 10px 12px; border-radius: 14px; }
.chat-contact:hover { background: var(--ta-gray-50); }
.chat-contact-active { background: var(--ta-teal-soft); }
.chat-avatar {
    width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 13px;
}
.chat-bubble {
    background: var(--ta-gray-100); color: var(--ta-gray-800);
    padding: 8px 14px; border-radius: 16px 16px 16px 4px;
    font-size: 14px; word-break: break-word; white-space: pre-line;
}
.chat-bubble-mine {
    background: var(--ta-teal); color: #fff;
    border-radius: 16px 16px 4px 16px;
}

/* ---------------------------------------------------- org bubble chart */
.org-dept {
    border: 2.5px solid; border-radius: 50%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 28px; position: relative;
}
.org-dept-label {
    position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
    padding: 4px 16px; border-radius: 999px;
    font-weight: 700; font-size: 13px; white-space: nowrap;
    box-shadow: var(--ta-shadow-xs);
}
.org-dept-members {
    display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center;
}
.org-bubble {
    width: 74px; height: 74px; border-radius: 50%;
    display: inline-flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 1px;
    color: #fff; box-shadow: var(--ta-shadow-sm);
    border: 3px solid rgba(255, 255, 255, .75);
    cursor: default; transition: transform .15s ease;
}
.org-bubble:hover { transform: scale(1.12); z-index: 2; }
.org-bubble-initials { font-size: 15px; font-weight: 800; line-height: 1; }
.org-bubble-name {
    font-size: 10px; font-weight: 600; max-width: 62px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    color: rgba(255, 255, 255, .9);
}
/* yellow bubbles need dark text */
.org-bubble[style*="#FED766"] { color: var(--ta-ink); }
.org-bubble[style*="#FED766"] .org-bubble-name { color: rgba(28, 28, 30, .7); }

/* colored stat cards */
.text-white { color: #fff !important; }
.stat-card a:hover { opacity: .85; }

/* audit diff modal: long values wrap, JSON scrolls in place */
#diff-body td { word-break: break-word; vertical-align: top; }
.diff-text { white-space: pre-wrap; }
.diff-json {
    white-space: pre-wrap; word-break: break-word;
    max-height: 220px; overflow-y: auto;
    background: var(--ta-gray-50); border: 1px solid var(--ta-gray-200);
    border-radius: 8px; padding: 8px 10px; margin: 0;
    font-size: 12px; line-height: 1.5;
}

/* topbar action icons: coral like the sidebar, and bigger */
.app-header .nav-link { color: var(--ta-coral); }
.app-header .nav-link iconify-icon { font-size: 26px !important; }
.app-header .nav-link:hover { background: var(--ta-coral-soft); color: var(--ta-coral-dark); }

/* announcement rich text bodies */
.ann-body p { margin-bottom: 6px; }
.ann-body ul, .ann-body ol { padding-left: 20px; margin-bottom: 6px; }

/* ------------------------------------------------ summernote editor */
.note-editor.note-frame {
    border: 1.5px solid var(--ta-gray-200) !important;
    border-radius: 12px; overflow: hidden;
}
.note-editor .note-toolbar {
    background: var(--ta-gray-50);
    padding: 6px 8px !important;
    display: flex; flex-wrap: wrap; gap: 4px;
    border-bottom: 1px solid var(--ta-gray-200);
}
.note-editor .note-btn-group { display: inline-flex; margin: 0 !important; }
.note-editor .note-btn {
    border-radius: 8px !important;
    padding: 4px 10px !important;
    font-size: 13px !important;
    border: 1px solid var(--ta-gray-200) !important;
    background: #fff !important;
    box-shadow: none !important;
    color: var(--ta-gray-700) !important;
}
.note-editor .note-btn:hover { background: var(--ta-gray-100) !important; }
.note-editor .note-btn.active { background: var(--ta-teal-soft) !important; border-color: var(--ta-teal) !important; }
.note-editor .note-editable { min-height: 150px; max-height: 320px; background: #fff; }
.note-editor .note-dropdown-menu { border-radius: 12px; box-shadow: var(--ta-shadow-sm); border: 1px solid var(--ta-gray-200); }
.note-modal .modal-content { border-radius: 20px; }

/* images inside announcement bodies stay in bounds */
.ann-body img { max-width: 100%; border-radius: 10px; }
.swal2-html-container img { max-width: 100%; border-radius: 10px; }

/* ------------------------------------------------------------ calendar */
.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.cal-dow > div { text-align: center; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ta-gray-500); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-cell {
    min-height: 96px; background: var(--ta-gray-50);
    border-radius: 12px; padding: 6px 8px; cursor: pointer;
    transition: background .15s, box-shadow .15s;
    overflow: hidden;
}
.cal-cell:hover { background: var(--ta-teal-soft); box-shadow: var(--ta-shadow-xs); }
.cal-empty { background: transparent; cursor: default; }
.cal-empty:hover { background: transparent; box-shadow: none; }
.cal-today { outline: 2px solid var(--ta-teal); background: #fff; }
.cal-daynum { font-weight: 700; font-size: 13px; color: var(--ta-gray-700); margin-bottom: 3px; }
.cal-today .cal-daynum { color: var(--ta-teal-dark); }
.cal-chip {
    color: #fff; font-size: 10.5px; font-weight: 600;
    border-radius: 6px; padding: 1px 6px; margin-bottom: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-more { font-size: 10px; color: var(--ta-gray-500); font-weight: 600; }

/* --------------------------------------------------- department tree */
.dept-node {
    display: flex; align-items: center; gap: 7px;
    padding: 7px 10px; border-radius: 10px; cursor: pointer;
    font-size: 14px; color: var(--ta-gray-700);
}
.dept-node:hover { background: var(--ta-gray-50); }
.dept-active { background: var(--ta-teal-soft); font-weight: 600; color: var(--ta-teal-dark); }
.dept-caret { width: 18px; flex-shrink: 0; text-align: center; color: var(--ta-gray-500); }
.dept-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dept-count {
    background: var(--ta-gray-100); color: var(--ta-gray-600);
    border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 8px;
}
.dept-active .dept-count { background: var(--ta-teal); color: #fff; }
.dept-actions { display: none; gap: 4px; }
.dept-node:hover .dept-actions { display: inline-flex; }
.dept-actions a { color: var(--ta-gray-500); }
.dept-actions a:hover { color: var(--ta-teal-dark); }
.dept-actions a.text-danger:hover { color: var(--ta-coral-dark); }

/* ------------------------------------------- workspace tabs (SOOA-style) */
body.embed .left-sidebar, body.embed .app-header { display: none !important; }
body.embed .body-wrapper { margin-left: 0; }
body.embed .body-wrapper-inner { padding: 16px 20px; }

.ws-tabs-wrap {
    display: flex; align-items: stretch;
    background: #fff;
    box-shadow: 0 1px 0 var(--ta-gray-200);
    position: sticky; top: 64px; z-index: 1020;
}
.ws-scroll {
    flex-shrink: 0; width: 30px; border: 0; background: #fff;
    color: var(--ta-gray-600); cursor: pointer; padding: 0;
    display: none;
}
.ws-scroll:hover { color: var(--ta-ink); background: var(--ta-gray-100); }
.ws-tabs {
    flex: 1; min-width: 0;
    display: flex; align-items: center; gap: 6px;
    flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain;
    padding: 8px 16px;
    scrollbar-width: thin;
}
.ws-tabs::-webkit-scrollbar { height: 5px; }
.ws-tabs::-webkit-scrollbar-thumb { background: var(--ta-gray-300); border-radius: 999px; }
.ws-tab { flex-shrink: 0; }
.ws-tab {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 5px 8px 5px 14px; border-radius: 999px;
    border: 1.5px solid var(--ta-gray-200); background: #fff;
    font-size: 13px; font-weight: 600; color: var(--ta-gray-600);
    cursor: pointer; user-select: none; white-space: nowrap;
}
.ws-tab:hover { border-color: var(--ta-gray-400); }
.ws-tab.active { background: var(--ta-ink); border-color: var(--ta-ink); color: #fff; }
.ws-tab .ws-close {
    width: 16px; height: 16px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; opacity: .65;
}
.ws-tab .ws-close:hover { opacity: 1; background: rgba(255,255,255,.25); }
.ws-tab:not(.active) .ws-close:hover { background: var(--ta-gray-100); }
.ws-frame {
    width: 100%; border: 0; display: none;
    height: calc(100vh - 64px - 46px);
}
.ws-frame.active { display: block; }

/* chat header icon buttons */
.chat-hbtn { padding: 5px 9px !important; }
.chat-hbtn .ti { font-size: 17px; }

/* ------------------------------------------- announcement popup */
.ann-overlay {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(17, 24, 39, .45);
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center; padding: 20px;
    opacity: 0; transition: opacity .22s ease;
}
.ann-overlay.show { opacity: 1; }
.ann-modal {
    width: 100%; max-width: 540px; background: #fff; border-radius: 20px;
    overflow: hidden; box-shadow: 0 24px 64px rgba(17, 24, 39, .28);
    transform: translateY(14px) scale(.97); transition: transform .24s cubic-bezier(.2, .9, .3, 1.2);
}
.ann-overlay.show .ann-modal { transform: translateY(0) scale(1); }
.ann-head {
    background: linear-gradient(135deg, #FE4A49 0%, #e6403f 70%, #d63938 100%);
    color: #fff; padding: 22px 26px 18px; position: relative;
}
.ann-head .ann-icon {
    width: 44px; height: 44px; border-radius: 14px; background: rgba(255, 255, 255, .18);
    display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 12px;
}
.ann-head .ann-chip {
    position: absolute; top: 20px; right: 56px;
    background: rgba(255, 255, 255, .2); border-radius: 999px;
    font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
    padding: 4px 12px;
}
.ann-head .ann-x {
    position: absolute; top: 16px; right: 16px; width: 30px; height: 30px;
    border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff;
    font-size: 15px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.ann-head .ann-x:hover { background: rgba(255, 255, 255, .3); }
.ann-head .ann-title { font-size: 20px; font-weight: 700; line-height: 1.3; margin: 0; color: #fff; }
.ann-body { padding: 22px 26px; max-height: 46vh; overflow-y: auto; color: var(--ta-gray-600); font-size: 14px; line-height: 1.65; }
.ann-body img { max-width: 100%; height: auto; border-radius: 10px; }
.ann-body p:last-child { margin-bottom: 0; }
.ann-when {
    display: inline-flex; align-items: center; gap: 7px; margin-top: 14px;
    background: var(--ta-gray-100); border-radius: 999px; padding: 6px 14px;
    font-size: 13px; font-weight: 600; color: var(--ta-ink);
}
.ann-foot {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 26px 20px; border-top: 1px solid var(--ta-gray-200);
}
.ann-foot .ann-count { font-size: 12px; color: var(--ta-gray-400); font-weight: 600; }
.ann-foot .ann-ok {
    border: 0; border-radius: 999px; background: var(--ta-teal); color: #fff;
    font-weight: 700; font-size: 14px; padding: 10px 28px; cursor: pointer;
    transition: background .15s ease;
}
.ann-foot .ann-ok:hover { background: var(--ta-teal-dark, #2398a8); }

/* ------------------------------------------- sidebar + chat preview badges */
.sidebar-link .nav-badge, .nav-card-header .nav-badge {
    margin-left: auto; background: #fff; color: #FE4A49;
    font-size: 11px; font-weight: 800; line-height: 1;
    border-radius: 999px; padding: 4px 8px; min-width: 22px; text-align: center;
}
.sidebar-link .nav-badge { margin-right: 2px; }
.nav-card-header .nav-badge { margin-right: 8px; }
.nav-card-menu .sidebar-link { display: flex; align-items: center; }
.chat-preview-row { text-decoration: none; }
.chat-preview-row:hover { background: var(--ta-gray-100); }
.chat-preview-avatar {
    width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
    background: var(--ta-teal); color: #fff; font-size: 13px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
}
.chat-preview-avatar.chat-preview-general { background: #FE4A49; }

/* ------------------------------------------- task progress timeline */
#tv-thread .tl-item {
    position: relative; padding: 0 0 16px 22px;
}
#tv-thread .tl-item::before {
    content: ''; position: absolute; left: 4px; top: 4px; bottom: -4px;
    width: 2px; background: var(--ta-gray-200);
}
#tv-thread .tl-item.tl-last::before { display: none; }
#tv-thread .tl-dot {
    position: absolute; left: 0; top: 3px; width: 10px; height: 10px;
    border-radius: 50%; background: var(--ta-teal); border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--ta-teal-soft);
}
#tv-thread .tl-body { font-size: 13.5px; line-height: 1.5; }

/* ------------------------------------------- tab count badge */
.nav-tabs .nav-link .nav-count {
    display: inline-block; min-width: 20px; padding: 1px 7px; margin-left: 4px;
    font-size: 11px; font-weight: 700; line-height: 1.5; text-align: center;
    border-radius: 999px; background: var(--ta-gray-200); color: var(--ta-gray-700);
    vertical-align: middle;
}
.nav-tabs .nav-link.active .nav-count { background: rgba(255,255,255,.25); color: #fff; }
