/* =========================================================

   ========================================================= */

:root {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-2: #ffffff;
    --text: #404040;
    --muted: #4373a3;
    --border: #e5e7eb;
    --borderfocus: #42BDCB;
    --borderfocuslight:#dbf0db;
    --borderwhite: #ffffff;
    --titled: #4373a3;

    --primary: #4373a3;
    --primarylight:#edf2f8;
    --primary-600: #65cb43;
    --primary-600light: #fbe9ea;
    --primary-100: #fff1e6;
    --modal:#768238;
   --btndefault: #e15155;
   --btndefaultlight:#fbe9ea;
   --btndefaulthover:#a47864;
   --btnactive:#42BDCB;
   --navbar:#42BDCB;
   
    --danger: #e15155;
    --success: #65cb43;
    --warning: #f59e0b;

    /* Radius scale */
    --radius-xs: 1px;
    --radius-sm: 0px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 1px;
    --radius-pill: 999px;
    --radius-circle: 9999px;

    /* Semantic radius aliases */
    --radius: var(--radius-sm);
    --radius-btn: var(--radius-xs);
    --radius-input: var(--radius-xs);
    --radius-panel: var(--radius-sm);
    --radius-modal: var(--radius-lg);
    --radius-dropdown: var(--radius-lg);
    --radius-tag: var(--radius-pill);

    --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
    --font-size: 13px;
    --font-size-small: 11px;
    --font-weight-small: 500;
    --font-weight-normal: 600;
    --line-height: 1.35;

    --shadow: 0 10px 24px rgba(0,0,0,.08);
    --shadow-sm: 0 6px 16px rgba(0,0,0,.08);
    --focus: 0 0 0 3px rgba(67, 163, 139,.25);

    --sidebar-w: 220px;
    --topbar-h: 50px;
    --pad: 7px;
    --control-h: 25px;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: var(--font-size);
    line-height: var(--line-height);
}

a {
    color: inherit;
    text-decoration: none;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.text-muted {
    color: var(--text);
}

.hidden {
    display: none !important;
}

/* =========================================================
   Layout
   ========================================================= */
.app {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    min-height: 100vh;
    transition: grid-template-columns .25s ease;
}

.lc-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: auto;
    border-right: 1px solid var(--border);
    background: var(--surface);
    padding: 12px;
    transition: width .25s ease;
}

.main {
    min-width: 0;
}

.content {
    padding: var(--pad);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 720px) {
    .app {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        height: auto;
    }
}

/* =========================================================
   Brand
   ========================================================= */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: var(--radius);
   background: var(--surface);
    border: 1px solid var(--surface);
    margin-bottom: 10px;
}

.brand-badge {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-xl);
    display: grid;
    place-items: center;
    background: var(--primary);
    color: #fff;
    font-weight: 900;
    box-shadow: var(--shadow-sm);
}

.brand-title {
    font-weight: 900;
}

.brand-subtitle {
    font-size: 12px;
    color: var(--muted);
}

/* =========================================================
   Top Navbar
   ========================================================= */
.navbar {
    min-height: var(--topbar-h);
    height: var(--topbar-h);
    margin: 0;
    border: 0;
    border-bottom: 1px solid var(--navbar);
    background: var(--navbar);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--pad);
    position: sticky;
    top: 0;
    z-index: 20;
}

.navbar .navbar-brand {
    font-weight: 600;
    font-size: 13px;
    padding: 0;
    height: auto;
    line-height: 1.5;
    margin-right: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color:#ffffff;
}

.navbar .nav {
    list-style: none;
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.navbar .nav > li {
    position: relative;
}

.navbar .nav > li > a {
    display: inline-flex;
    align-items: center;
    height: var(--topbar-h);
    padding: 0 10px;
    border-radius: var(--radius-btn);
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
}

.navbar .nav > li > a:hover {
    background: var(--surface-2);
    color: var(--text);
}

/* Dropdown menu */
.dropdown-menu {
    position: absolute;
    top: calc(var(--topbar-h) - 2px);
    left: 0;
    min-width: 200px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    padding: 6px;
    display: none;
    z-index: 50;
}

.open > .dropdown-menu {
    display: block;
}

.dropdown-menu > li {
    list-style: none;
}

.dropdown-menu > li > a {
    display: block;
    padding: 8px 10px;
    border-radius: var(--radius-lg);
    color: var(--text);
    font-weight: 600;
}

.dropdown-menu > li > a:hover {
    background: var(--surface-2);
}

/* =========================================================
   Sidebar menu
   ========================================================= */
.menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    color: var(--text);
    font-weight: 600;
}

.menu a:hover {
    background: var(--surface-2);
    border-color: var(--borderwhite);
}

.menu .active > a {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--surface);
}

.menu small {
    font-weight: 700;
    color: var(--muted);
}

.submenu {
    list-style: none;
    padding: 6px 0 10px 34px;
    margin: 0;
}

.submenu a {
    font-weight: 500;
    color: var(--muted);
    padding: 8px 10px;
}

.submenu a:hover {
    color: var(--text);
}
.submenu .active > a {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--surface);
}

/* Collapse helper */
.collapse {
    display: none;
}

.collapse.in {
    display: block;
}

.collapsing {
    position: relative;
    height: 0;
    overflow: hidden;
    transition: height .35s ease;
}

/* =========================================================
   Grid
   ========================================================= */
.row {
    margin-left: -8px;
    margin-right: -8px;
}

.row:before,
.row:after {
    content: " ";
    display: table;
}

.row:after {
    clear: both;
}

[class*="col-"] {
    padding-left: 5px;
    padding-right: 5px;
    min-height: 1px;
    float: left;
}

.col-xs-12 { width: 100%; }
.col-xs-6 { width: 50%; }
.col-xs-4 { width: 33.3333%; }
.col-xs-3 { width: 25%; }

@media (min-width: 992px) {
    .col-md-12 { width: 100%; }
    .col-md-8  { width: 66.6667%; }
    .col-md-6  { width: 50%; }
    .col-md-4  { width: 33.3333%; }
    .col-md-3  { width: 25%; }
}

@media (max-width: 720px) {
    [class*="col-"] {
        width: 100% !important;
        float: none;
    }
}

/* =========================================================
   Panels
   ========================================================= */
.panel {
    border: 1px solid var(--borderwhite);
    border-radius: var(--radius-panel);
    background: var(--surface);
    overflow: hidden;
    margin-bottom: 16px;
}

.panel-heading {
    padding: 5px 7px;
    border-bottom: 1px solid var(--borderwhite);
    background: linear-gradient(180deg, #fff, var(--surface-2));
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--titled);
}

.table-responsive {
    padding: 14px;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
    height: var(--control-h);
    padding: 0 12px;
    border-radius: var(--radius-btn);
    border: 1px solid var(--primary);
    background: var(--primary);
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    user-select: none;
    color: #ffffff;
    
}

.btn:focus {
    outline: none;
    
}

.btn:hover {
        background: var(--btndefaulthover);
    color: #ffffff;
    border: 1px solid var(--btndefaulthover);
}

.btn-primary {
    background: var(--btndefault);
    border: 1px solid var(--btndefault);
    color: #fff;
    
}

.btn-primary:hover {
    background: var(--primary-600);
    border: 1px solid var(--primary-600);
}

.btn-default {
    background: var(--primary);
   color:#ffffff;
   border:1px solid var(--primary);
}
.btn-default:hover{
    background: var(--btndefaulthover);
   color:#ffffff;
   border:1px solid var(--btndefaulthover);
   
}
.btn-link {
    border: 1px solid transparent;
    background: transparent;
    color: var(--primary-600);
    
}

.btn-link:hover {
    background: transparent;
    text-decoration: underline;
}

.btn.is-active,
.btn[aria-pressed="true"] {
    background: var(--btnactive);
    border: 1px solid var(--btnactive);
    color: #ffffff;
}

.btn:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 1;
    border: 1px solid #f3f4f6;
}

/* =========================================================
   Forms
   ========================================================= */
form {
    margin: 5px;
}

.has-right-border {
   border-right: 1px solid var(--border);
}

.form-group {
    margin-bottom: 5px;
}

input.error,
select.error,
textarea.error {
    border-color: #43a38b;
}

label,
.control-label {
    display: block;
    margin-bottom: 6px;
   font-weight: var(--font-weight-small);
    font-size: var(--font-size-small);
}

.help-block {
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted);
}

.help-block.error { color: var(--danger); }
.help-block.success { color: var(--success); }
.help-block.warning { color: var(--warning); }

.form-control {
    width: 100%;
    height: var(--control-h);
    padding: 0 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-input);
    background: #fff;
    color: var(--text);
    font-size: 12px;
    transition: .15s ease;
}

.form-control:focus {
    outline: none;
    
    border-color: var(--borderfocus);
}

.form-control::placeholder {
    color: #9ca3af;
}

.form-control:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 1;
}

.form-control[readonly] {
    background: #f9fafb;
}

textarea.form-control {
    height: auto;
    min-height: 90px;
    padding: 10px 12px;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 34px;
    background:#ffffff;
    
}
select.form-control:focus{
background: var(--primary-600light);
    color: var(--primary-600);
    
}    

    
    
input[type="date"].form-control,
input[type="time"].form-control,
input[type="datetime-local"].form-control {
    appearance: none;
    -webkit-appearance: none;
    min-height: var(--control-h);
    line-height: normal;
    padding-right: 10px;
}

.has-success .form-control { border-color: var(--success); }
.has-warning .form-control { border-color: var(--warning); }
.has-error .form-control { border-color: var(--danger); }

.has-success .help-block { color: var(--success); }
.has-warning .help-block { color: var(--warning); }
.has-error .help-block { color: var(--danger); }

.checkbox,
.radio,
.choice {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    cursor: pointer;
    color: var(--text);
    user-select: none;
}

.checkbox input,
.radio input,
.choice input[type="checkbox"],
.choice input[type="radio"],
input[type="checkbox" ]{
    margin: 0;
    width: 13px;
    height: 13px;
    accent-color: var(--primary);
    cursor: pointer;
    
}

.choice-group {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px 16px;
    align-items: baseline;
}

.choice-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 14px;
}

.form-control-static {
    min-height: var(--control-h);
    display: flex;
    align-items: center;
    color: var(--text);
    font-weight: 600;
    padding: 0 2px;
}

.form-control.input-sm,
.btn.btn-sm {
    height: 30px;
    font-size: 12px;
    padding: 0 10px;
}

.form-control.input-lg,
.btn.btn-lg {
   
}

.form-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.form-inline .form-group {
    margin-bottom: 0;
}

.form-horizontal .form-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.form-horizontal .control-label {
    width: 160px;
    text-align: right;
    margin-bottom: 0;
}

.form-horizontal .form-control-wrapper {
    flex: 1;
}

/* Extended form layout */
.form-section-title {
    font-weight: 500;
    font-size: 12px;
    margin-bottom: 5px;
    color: var(--text);
}

.form-section-title {
    font-weight: 500;
    font-size: 12px;
    margin-bottom: 12px;
    color: var(--titled);
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.form-col {
    flex: 1 1 220px;
    min-width: 220px;
}

/* Input groups */
.input-group {
    display: flex;
    width: 100%;
    align-items: stretch;
}

.input-group-addon {
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--border);
    background: #f9fafb;
    color: var(--muted);
    font-weight: 700;
    white-space: nowrap;
}

.input-group .input-group-addon:first-child {
    border-right: 0;
    border-radius: var(--radius-input) 0 0 var(--radius-input);
}

.input-group .form-control:not(:first-child):not(:last-child) {
    border-radius: 0;
}

.input-group .form-control:first-child:not(:last-child) {
    border-radius: var(--radius-input) 0 0 var(--radius-input);
}

.input-group .form-control:last-child:not(:first-child) {
    border-radius: 0 var(--radius-input) var(--radius-input) 0;
}

.input-group .input-group-addon:last-child {
    border-left: 0;
    border-radius: 0 var(--radius-input) var(--radius-input) 0;
}

.input-group-btn .btn {
    border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
}

/* Button groups */

.btn {
    height: var(--control-h);
    padding: 0 12px;
    border-radius: var(--radius-btn);
    border: 1px solid var(--primary);
    background: var(--primary);
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    user-select: none;
    color: #ffffff;
}

.btn-group {
    display: inline-flex;
    vertical-align: middle;
}

.btn-group .btn {
    border-radius: 0;
    margin-left: -1px;
}

.btn-group .btn:first-child {
    margin-left: 0;
    border-top-left-radius: var(--radius-btn);
    border-bottom-left-radius: var(--radius-btn);
}

.btn-group .btn:last-child {
    border-top-right-radius: var(--radius-btn);
    border-bottom-right-radius: var(--radius-btn);
}

fieldset {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px 14px;
    margin: 0 0 16px 0;
    min-width: 0;
}

legend {
    font-size: 13px;
    font-weight: 900;
    padding: 0 6px;
    color: var(--text);
}

label.error {
    color: red !important;
}

/* =========================================================
   Custom modal
   ========================================================= */
.x-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
}

.x-modal.is-open {
    display: block;
}

.x-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.x-modal-dialog {
    position: relative;
    width: 640px;
    max-width: calc(100% - 30px);
    margin: 48px auto;
    z-index: 1;
}

.x-modal-content {
    background: #fff;
    border-radius: var(--radius-sm);
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
    overflow: hidden;
}

.x-modal-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--navbar);
}

.x-modal-header .close {
    background: transparent;
    border: 0;
    font-size: 13px;
    font-weight: 500;
    color: #ffffff;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.x-modal-header .close:hover {
    color: #111827;
}

.x-modal-body {
    padding: 18px;
}

.x-modal-footer {
    padding: 14px 18px;
    border-top: 1px solid #ffffff;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.x-modal-title {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    flex: 1;
    color:#ffffff;
}

body.modal-open {
    overflow: hidden;
}

/* =========================================================
   Story view
   ========================================================= */
.story {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 12px;
}

@media (max-width: 900px) {
    .story {
        grid-template-columns: 1fr;
    }
}

.story-list {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    overflow: hidden;
}

.story-item {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}

.story-item:hover {
    background: var(--surface-2);
}

.story-item.active {
    background: var(--primarylight);
    border-left: 4px solid var(--primary);
    padding-left: 8px;
}

.story-item-title {
    font-weight: 600;
}

.story-item-meta {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
}

.story-detail {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    overflow: hidden;
}

.story-detail-head {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--primary);
    color:#ffffff;
   
}

.story-detail-title {
    font-weight: 600;
}

.story-detail-body {
    padding: 14px;
}

.story-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-tag);
    background: #fff;
    font-weight: 800;
    font-size: 12px;
    color: var(--muted);
}

.tag.primary {
   background: var(--btndefault);
    border-color: var(--btndefault);
    color: #ffffff;
}

.timeline {
    margin-top: 14px;
    padding-left: 0;
    list-style: none;
}

.timeline li {
    position: relative;
    padding: 10px 10px 10px 26px;
    border-bottom: 1px dashed var(--border);
}

.timeline li:last-child {
    border-bottom: 0;
}

.timeline li:before {
    content: "";
    position: absolute;
    left: 10px;
    top: 16px;
    width: 8px;
    height: 8px;
    border-radius: var(--radius-circle);
    background: var(--btndefault);
}

.timeline-title {
    font-weight: 900;
    font-size: 13px;
}

.timeline-meta {
    font-size: 12px;
    color: var(--muted);
    margin-top: 3px;
}
    .story-content,
.story-detail,
.story-detail-body,
#loadInfo {
    overflow: visible !important;
}
.panel,
.panel-body,
.story-content,
.story-detail-body,
#loadInfo {
    overflow: visible !important;
}

/* =========================================================
   Sidebar collapse mode
   ========================================================= */
body.sidebar-collapsed .app {
    grid-template-columns: 70px 1fr;
}

body.sidebar-collapsed .brand-title,
body.sidebar-collapsed .brand-subtitle,
body.sidebar-collapsed .menu span,
body.sidebar-collapsed .menu small {
    display: none;
}

body.sidebar-collapsed .menu a {
    justify-content: center;
    padding: 12px 6px;
}

body.sidebar-collapsed .menu a span.text-muted {
    display: none;
}

body.sidebar-collapsed .submenu {
    display: none !important;
}

body.sidebar-collapsed .brand {
    justify-content: center;
}

/* =========================================================
   Table Lite
   ========================================================= */
.tl {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
}

.tl-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 7px;
   
    background: linear-gradient(180deg, #fff, var(--surface-2));
}

.tl-toolbar .left,
.tl-toolbar .right {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.tl-label {
    font-weight: 600;
    font-size: 12px;
    color: var(--muted);
}

.tl-input,
.tl-select {
    height: var(--control-h);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 0 10px;
    background: #fff;
    color: var(--text);
}

.tl-input:focus,
.tl-select:focus {
    outline: none;
    border-color: var(--borderfocus);
    box-shadow: none;
}

.tl-table {
    width: 100%;
    border-collapse: collapse;
}

.tl-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    text-align: left;
    font-weight: 700;
    font-size: 12px;
    color: var(--muted);
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    background: #fff;
    user-select: none;
    cursor: pointer;
    white-space: nowrap;
}

.tl-table thead th:hover {
    background: var(--surface-2);
}

.tl-sort {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tl-sort .caret {
    font-size: 11px;
    color: var(--muted);
}

.tl-table tbody td {
    padding: 6px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    vertical-align: top;
}

.tl-table tbody tr:nth-child(even) td {
    background: var(--primarylight);
}

.tl-table tbody tr:hover td {
    background: var(--btndefaultlight);
}

.tl-empty {
    padding: 18px 12px;
    color: var(--muted);
}

.tl-footer {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: #fff;
}

.tl-pager {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.tl-btn {
    height: var(--control-h);
    padding: 0 10px;
    border: 1px solid var(--primary);
    border-radius: var(--radius-xl);
    background: #ffffff;
    cursor: pointer;
    font-weight: var(--font-weight-small);
    font-size: var(--font-size-small);
    color:var(--primary);
}

.tl-btn:hover {
    background: #ffffff;
}

.tl-btn:disabled {
    opacity: .75;
    cursor: not-allowed;
}

.tl-page {
    min-width: 44px;
    text-align: center;
    font-weight: var(--font-weight-small);
    font-size: var(--font-size-small);
    color: var(--primary);
}

.tl-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    background: #fff;
    font-weight: 900;
    font-size: 12px;
    color: var(--muted);
}

.tl-pill.primary {
    border-color: rgba(224,122,47,.35);
    background: rgba(224,122,47,.10);
    color: var(--primary-600);
}

.tl-scroll {
    max-height: 520px;
    overflow: auto;
    border-top: 1px solid var(--border);
}

.tl-colmenu {
    position: relative;
}

.tl-colpanel {
    position: absolute;
    right: 0;
    top: calc(var(--control-h) + 8px);
    width: 240px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 10px;
    display: none;
    z-index: 30;
}

.tl-colpanel.open {
    display: block;
}

.tl-colitem {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 4px;
    border-radius: var(--radius-lg);
}

.tl-colitem:hover {
    background: var(--surface-2);
}

/* =========================================================
   Login layout
   ========================================================= */
.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: linear-gradient(180deg, var(--primarylight), #fff 35%);
}

.login-card {
    width: min(420px, 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.login-head {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, #fff, var(--surface-2));
    display: flex;
    align-items: center;
    gap: 10px;
    flex-direction:column;
}

.login-body {
    padding: 16px;
}

.login-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

/* =========================================================
   Custom datepicker v2
   ========================================================= */
.dp {
    position: relative;
}

.dp-popup {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 120;
    width: 250px;
}

.dp-popup.hidden {
    display: none;
}

.dp-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.dp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: var(--primary);
    border-bottom: 1px solid var(--border);
    
}

.dp-selects {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.dp-select {
    height: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    font-size: var(--font-size-small);
    font-weight: var(--font-weight-normal);
    padding: 0 8px;
    max-width: 120px;
}

.dp-select:focus {
    outline: none;
    
    border-color: var(--primary);
}

.dp-nav {
    width: 30px;
    height: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    cursor: pointer;
    font-size: var(--font-size-small);
    font-weight: var(--font-weight-normal);
    line-height: 1;
}

.dp-nav:hover:not(:disabled) {
    background: var(--surface-2);
}

.dp-nav:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.dp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 6px 6px 0;
}

.dp-weekday {
    text-align: center;
    font-size: 11px;
    font-weight: 900;
    color: var(--muted);
    padding: 6px 0;
}

.dp-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    padding: 6px;
}

.dp-day {
    height: 20px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    cursor: pointer;
    font-size: var(--font-size-small);
    font-weight: var(--font-weight-normal);
}

.dp-day:hover:not(:disabled) {
    background: var(--btndefault);
    border-color: var(--btndefault);
    color: var(--surface);
}

.dp-day.is-muted {
    color: #b2b8c2;
}

.dp-day.is-today {
    border-color: var(--surface);
    color: var(--btndefault);
    background-color: var(--surface);
    font-weight: var(--font-weight-normal);
}

.dp-day.is-selected {
    background: var(--primary-600);
    border-color: var(--primary-600);
    color: var(--surface);
}

.dp-day.is-disabled,
.dp-day:disabled {
    color: #c5cad3;
    background: #f9fafb;
    cursor: not-allowed;
    opacity: .75;
}

.dp-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px 12px;
    border-top: 1px solid var(--border);
    background: #fff;
    gap: 8px;
}

.dp-footer-btn {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
   font-size: var(--font-size-small);
    font-weight: var(--font-weight-normal);
    cursor: pointer;
}

.dp-footer-btn:hover:not(:disabled) {
    background: var(--surface-2);
}

.dp-footer-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.dp-today {
   background: var(--btndefault);
    border-color: var(--btndefault);
    color: var(--surface);
}
.dp-today:hover:not(:disabled) {
    background: var(--primary-600);
    border-color: var(--primary-600);
    color: var(--surface);
}
/* =========================================================
   Select Lite v2
   ========================================================= */
.sl {
    position: relative;
    width: 100%;
}

.sl-control {
    width: 100%;
    min-height: var(--control-h);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    padding: 4px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    text-align: left;
    font-size: 12px;
}

.sl-control:focus {
    outline: none;
    
    border-color: var(--borderfocus);
}

.sl-value-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
   
}

.sl-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sl-value.is-placeholder {
    color: #9ca3af;
}

.sl-pills {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.sl-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: var(--radius-pill);
    background: rgba(224,122,47,.10);
    border: 1px solid rgba(224,122,47,.25);
    color: var(--primary-600);
    font-size: 12px;
    font-weight: 800;
    max-width: 100%;
}

.sl-pill-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sl-pill-remove {
    cursor: pointer;
    font-weight: 900;
    line-height: 1;
}

.sl-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.sl-clear {
    width: 18px;
    height: 18px;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-weight: 900;
    cursor: pointer;
}

.sl-clear:hover {
    background: var(--surface-2);
    color: var(--text);
}

.sl-arrow {
    color: var(--muted);
    font-size: 12px;
}

.sl-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    
    z-index: 9999;
    overflow: hidden;
}

.sl-dropdown.hidden {
    display: none;
}

.sl-search-wrap {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 10px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, #fff, var(--surface-2));
}

.sl-search {
    width: 100%;
    height: var(--control-h);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    padding: 0 10px;
    font-size: 12px;
}

.sl-search:focus {
    outline: none;
    
    border-color: var(--primarylight);
}

.sl-list {
    max-height: min(320px, 40vh);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px;
    scroll-behavior: smooth;
}

.sl-group {
    padding: 8px 10px 4px;
    font-size: 11px;
    font-weight: 900;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.sl-option {
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 12px;
    
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sl-option:hover,
.sl-option.is-highlighted {
    background: var(--primary-600light);
}

.sl-option.is-selected {
    background: var(--primary-600light);
    color: var(--btndefault);
}

.sl-option.is-disabled {
    color: #b6bcc6;
    cursor: not-allowed;
}

.sl-option.hidden {
    display: none;
}

.sl-check {
    width: 16px;
    text-align: center;
    font-weight: 900;
    color: var(--primary-600);
    flex-shrink: 0;
}

.sl-option-label {
    min-width: 0;
    
}

.sl.is-open .sl-control {
    
    border-color: var(--primarylight);
}
.text-success {
    color: var(--success);
}
.text-danger {
    color: var(--danger);
}
.text-warning {
    color: var(--warning);
}