﻿
.ag-theme-material .ag-ltr .ag-cell-range-single-cell,
.ag-theme-material .ag-ltr .ag-cell-range-single-cell.ag-cell-range-handle,
.ag-theme-material .ag-ltr .ag-cell.ag-context-menu-open,
.ag-theme-material .ag-ltr .ag-has-focus .ag-cell-focus:not(.ag-cell-range-selected),
.ag-theme-material .ag-rtl .ag-cell-range-single-cell,
.ag-theme-material .ag-rtl .ag-cell-range-single-cell.ag-cell-range-handle,
.ag-theme-material .ag-rtl .ag-cell.ag-context-menu-open,
.ag-theme-material .ag-rtl .ag-has-focus .ag-cell-focus:not(.ag-cell-range-selected) {
    border: none !important;
}
.tasks.noTask{
    height:175px;
}

ul.dropdown-menu.dropdown-menu-end.show {
    z-index: 1020;
}

span.badge.bg-soft-info {
    background: #686868;
    padding-bottom: 8px;
}

span.badge.bg-soft-primary {
    background: #686868;
    padding-bottom: 8px;
}


#KanbanModal .btn-close:hover {
    background: #D32F2F;
    text-align: center;
    color: #F5F5F5;
    transition:0.2s all;
}

#KanbanModal .btn-close {
    width: 78px;
    text-align: right;
    background-position: left;
    height: 27px;
    border: 1px solid #9E9E9E;
    opacity: 1;
    padding: 0px 10px 0px 10px;
    background-position-x: 10px;
    margin: -11px 0px 5px;
    transition: 0.2s all;
}

.detail-kv strong {
    padding-right: 10px;
}


#KanbanModal .modal-content{
    border-radius:0px !important
}

.module-modal-record-header {
    margin-top: 15px;
}



.profile-nav {
    margin-right: 5px;
}


.detail-kv span {
    padding-right: 10px;
}

.text-muted {
    color: #a5aeb6 !important;
}

.email-reading-pane{
    border-radius:0px;
}

.email-list-pane {
    border-radius: 0px;
}

.email-folders-pane {
    border-radius: 0px;
}



.kanban-task-link {
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 5px;
}

.btn {
    font-size: 12px !important;
}

.profile-wid-bg::before {

    background: linear-gradient(180deg, rgba(16, 38, 58, 0.98), rgba(25, 54, 77, 0.98)) !important;
}

span.k-list-item-text {
    font-size: 12px;
}
span.k-chip-label {
    font-size: 12px;
}
select#draft-list-editor {
    font-size: 12px;
}


.k-input-md .k-input-inner, .k-picker-md .k-input-inner {
    font-size: 13px;
}

label {
    font-size: 13px;
}

.select2 span {
    font-size: 13px;
}

span.k-button-text {
    font-size: 12px;
}

span.k-dropzone-hint {
    font-size: 12px;
}

.formio-component-file a{
    cursor:pointer !important;
}

.text-end .form-control {
    text-align: left !important;
}
#formContainer .btn-primary{
    margin-top:10px;
}


:root {
    --vz-theme-color: white;
    --vz-theme-header-color: white;
    --vz-theme--nav-color: white;
}

button.k-input-button.k-button.k-button-md.k-button-solid.k-button-solid-base.k-icon-button {
    height: 100% !important;
}




.profile-wid-bg {
    height: 150px !important;
}

.expandable::before {
    content: '⯇';

}

.expandable:hover::before {
    color: #2196f3;
}

.expandable.selected::before {
    content: '⯆' !important;
}

.foldertext:hover {
    text-decoration: underline;
    color: #2196f3;
}
.folderparent {
    margin: 10px;
    display: inline-block;
    width: 110px;
    height: 80px;
    position: relative;
}
.dropdown.foldermenu {
    float: right;
    position: absolute;
    top:0px;
}

.folderviewcontainer {
    width: 100%;
    background: white;
    margin-bottom: 15px;
    border-radius: 15px 0 0 15px;
    min-height: 200px;
    align-content: center;
    max-height: 600px;
    overflow: auto;
    display: inline-block;
    margin-top: 50px;
}

.foldertext.selected {
    text-decoration: underline;
    color: #2196f3 !important;
    font-weight: bold;
    font-size: 105%;
}

.foldertext {
    display: inline-block;
    cursor: pointer;
    max-width: 100px;
    font-size: 12px;
}

.expandable {
    float: right;
    padding-top: 4px;
    color: var(--vz-gray-600);
    cursor: pointer;
    position: absolute;
    right: -15px;
}

.folderul {
    display:none;
}
.folderTreeContainer {
    background: white;
    padding: 10px;
    border-radius: 0px 15px 15px 0px;
    position: relative;
    top: 55px;
}

.folderHeader {
    background: #00afce;
    padding: 5px 10px 5px 0px;
    color: whitesmoke;
    margin: 10px 0px;
    width: 100%;
    top: 0px;
    position: absolute;
}
.folderlist a{
    color:black !important;
}

.folder-icon {
    float: right;
    padding: 5px;
    text-align: center;
    display: grid;
    justify-items: center;
    cursor:pointer;
    margin:10px;
    margin-top:0px;
}

    .folder-icon .icons8-folder {
        width: 50px;
        height: 36px;
        margin: 0;
        float: unset;
    }

    .folderlist li {
        list-style: none !important;
        text-align: right !important;
        display: flow-root;
        width: 100%;
        margin-right: 5px;
        position: relative;
    }

.folderlist ul {
    padding-right: 10px;
}



.lds-dual-ring.hidden {
    display: none;
}

.lds-dual-ring {
    display: inline-block;
    width: 80px;
    height: 80px;
}
/* (b font-size handled by the standardization layer at the end of this file) */
.jobmark {
    position: absolute;
    left: 5px;
    opacity: 0.4;
    top: calc(50% - 20px);
    color: #878dab;
}
.select2-dropdown {
    z-index: var(--z-popup, 100050) !important;
}


    .lds-dual-ring:after {
        content: " ";
        display: block;
        width: 64px;
        height: 64px;
        margin: 5% auto;
        border-radius: 50%;
        border: 6px solid #fff;
        border-color: #fff transparent #fff transparent;
        animation: lds-dual-ring 1.2s linear infinite;
    }

@keyframes lds-dual-ring {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,.8);
    z-index: var(--z-overlay, 100100);
    opacity: 1;
    transition: all 0.5s;
}

.card-table input[type='checkbox'] {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 5px;
    border: 2px solid #9aa7b0;
    display: inline-block;
    vertical-align: middle;
}

    .card-table input[type='checkbox']:checked {
        background: var(--afra-accent);
        border-color: var(--afra-accent);
    }

#scrollbarside li.nav-item {
    background: transparent;
}

.app-menu.navbar-menu {
    top: 70px;
    right: 0px;
    width: 260px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--afra-shadow-sm) !important;
    backdrop-filter: blur(10px);
    border: none;
    padding: 5px;
}
div#scrollbarside {
    height: calc(100vh - 120px);
    overflow: auto;
    display: inline-block;
    position: relative;
    padding: 0;
    width: 100%;
}

/* (button font-size handled by the standardization layer at the end of this file) */


.logo {
    line-height: 40px;
}
.card-circle {
    position: absolute;
    width: 40px;
    height: 23px;
    background: #00afce;
    border-radius: 0px 0px 0px 10px;
    top: 0px;
    right: 0px;
    padding: 2px 0px 10px 5px;
    text-align: center;
    box-shadow: 0 0 3px 0px var(--vz-blue);
}

input.k-input-inner {
    padding: 4px !important;
    font-size: 13px;
}

#navbar-nav .nav-link.menu-link:hover {
    color: #cccccc !important;
    background: rgba(var(--afra-accent-rgb), 0.10);
    border-radius: 14px;
    transition: background 0.15s ease;
    text-decoration: none !important;
}

.tasks-list {
    border-radius: 10px;
    margin: 5px;
    background: #ced4da;
}
span.d-none.d-md-inline-block {
    color: #d4dfe6;
}
#navbar-nav .nav-link.menu-link:hover span {
    color: #cccccc !important;
}
#main-content {
    overflow: hidden;
    border-radius: 10px 10px 0 0;
}

#navbar-nav .nav-link[data-bs-toggle=collapse][aria-expanded=true] {
    color: var(--afra-text) !important;
    background: rgba(var(--afra-accent-rgb), 0.14);
    padding: 0.7rem 0.85rem;
    border-radius: 14px;
    text-decoration: none !important;
}

    #navbar-nav .nav-link[data-bs-toggle=collapse][aria-expanded=true] span {
        color: #cccccc !important;
        text-decoration: none !important;
    }


.btn-primary {
    color: #fff;
    background-color: #45aaf2;
    border-color: #45aaf2;
}
.page-content-modal {
    top: 0px !important;
    margin: 0px !important;
    border-radius: 0px !important;
}

@media (min-width: 768px) {
    .topnav-hamburger{
        display:none;
    }
}

@media (max-width: 767.98px) {
    :is([data-layout=vertical], [data-layout=semibox])[data-sidebar-size=sm-hover-active] .topnav-hamburger {
        display: inline-flex;
        visibility: visible;
    }

    .topnav-hamburger {
        background: rgba(255, 255, 255, 0.88) !important;
        border: 1px solid rgba(35, 48, 56, 0.12) !important;
        border-radius: 14px !important;
        box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    }

    .topnav-hamburger .hamburger-icon span {
        background-color: #25343b !important;
    }
}

li.nav-item {
    margin-top: 5px;
    margin-bottom: 5px;
}


    @media (min-width: 768px) {
        .topbar-user {
        background-color: transparent;
    }
        .navbar-header .user-name-text {
            color: rgb(85,85,85);
        }
        .navbar-header .user-name-sub-text {
            color: rgb(85,85,85) !important;
        }
    .navbar-header .btn-topbar {
        color: rgb(85,85,85) !important;
    }
}


.menu-link span {
    color: var(--afra-text);
}

#page-topbar {
    background:var(--vz-theme-header-color);
    right: 0px;
    border-bottom: 0px;
}

.page-content {
    background: #eaeaea;
    position: relative;
    top: 0;
    padding-top: 0px;
    border-radius: 20px 20px 0 0;
    margin-left: 20px;
    margin-right: 10px;
    padding-bottom: 0;
}
.search-block {
    padding: 10px;
    background: white;
}

.select2-container .select2-selection--single {

    height: 36px !important;

}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    top: 5px !important;
}


#liveAlertPlaceholder {
    position: fixed;
    top: 15px;
    right: 50%;
    z-index: var(--z-toast, 100200);
}

#nav-tabContent .tab-pane {
    padding: 10px;
}

.main-content{
    position:relative;
}

footer{
    right:0px !important;
}

#back-to-top {
    bottom: 10px !important;
    left: 5px;
    padding-left: 20px !important;
    padding-right: 12px !important;
    padding-bottom: 10px;
}

.page-content {
    min-height: 100vh;
    overflow: visible;
    padding-top:10px;
}
.card{
border:    1px solid #efefff;
}

#navbar-nav .nav .nav-item:hover a {
    color: rgb(85,85,85) !important
}

#navbar-nav .navbar-menu .navbar-nav .nav-sm .nav-link:before {
    background-color: rgb(85,85,85) !important;
    content:none;
}

#navbar-nav .menu-dropdown a {
    height: auto;
}

#navbar-nav .nav .nav-item:hover,
#navbar-nav .nav .active {
    background: transparent;
    padding-right: 0;
    margin-right: 0;
    margin-left: 0;
    position: static;
}


    .nav .active a {
        color: #282828 !important
    }




/* "tahoma" is an intentional alias: it hijacks the Tahoma font stack below so
   every element actually renders with the Yekan Persian face. Case-sensitive
   URLs must match the files in css/fonts/ (Yekan.*) for Linux/CDN deploys. */
@font-face {
    font-family: "tahoma";
    font-weight: normal;
    font-display: swap;
    src: url("fonts/Yekan.eot?") format("eot"), url("fonts/Yekan.woff") format("woff"), url("fonts/Yekan.ttf") format("truetype");
}

body * {
    font-family: Tahoma,Calibri;
}

.k-form-error.k-invalid-msg.field-validation-error{
    width:100%
}

.card {
    margin-bottom: 1.5rem;
    -webkit-box-shadow: 0 1px 2px rgba(56,65,74,.15);
    box-shadow: 0 1px 2px rgba(56,65,74,.15);
}

.bg-primary {
    background-color: #53127F !important;
    color: #fff;
}

.k-input-inner {
    font-family: "Tahoma" !important;
}

.k-button.k-button-md.k-rounded-md.k-button-solid.k-button-solid-base.k-upload-button {
    padding:3.2px;
}

.navbar-nav > .nav-item {
    border: none;
    border-radius: 14px;
    overflow: visible;
}

.logo img {
    height: 60px;
}

.side-icon {
    background: var(--afra-accent);
    color: var(--afra-accent);
    height: 36px;
    width: 36px;
    line-height: 36px;
    padding-right: 9px;
    border-radius: 12px;
    margin-left: 10px;
    align-items: baseline;
    text-align: center;
    align-content: space-between;
}

/* Sidebar menu (professional look) */
.navbar-menu .navbar-brand-box {
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px 18px 0 0;
    background: transparent;
}

.navbar-menu #navbar-nav {
    padding: 0.25rem 0;
}

.navbar-menu #navbar-nav > .nav-item {
    margin: 0.2rem 0;
}

.navbar-menu #navbar-nav .nav-link {
    border-radius: 14px;
    padding: 0.7rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 44px;
}

.navbar-menu #navbar-nav .nav-link.menu-link {
    color: var(--afra-text) !important;
    font-weight: 600;
}

.navbar-menu #navbar-nav .nav-link.menu-link:hover {
    background: rgba(var(--afra-accent-rgb), 0.10);
}

.navbar-menu #navbar-nav .nav-link.menu-link.active,
.navbar-menu #navbar-nav .nav-item.active > .menu-link {
    background: rgba(var(--afra-accent-rgb), 0.14);
    box-shadow: inset 0 0 0 1px rgba(var(--afra-accent-rgb), 0.22);
}

.navbar-menu #navbar-nav .menu-dropdown {
    margin-top: 0.25rem;
    margin-right: 0.75rem;
    padding-right: 0.5rem;
    border-right: 1px dashed rgba(var(--afra-accent-rgb), 0.25);
}

    .navbar-menu #navbar-nav .nav-sm .nav-link {
        color: var(--afra-muted) !important;
        font-weight: 500;
        min-height: 40px;
        padding: 0.55rem 0.75rem;
        font-family: 'tahoma';
    }

.navbar-menu #navbar-nav .nav-sm .nav-link:hover {
    background: rgba(15, 23, 42, 0.04);
    color: var(--afra-text) !important;
}

.navbar-menu #navbar-nav .nav-sm .nav-link.active {
    background: rgba(var(--afra-accent-rgb), 0.10);
    color: var(--afra-text) !important;
}

#navbar-nav .navbar-menu .navbar-nav .nav-link {
    padding-right: 0px !important;
    padding-top: 0px !important;
    padding-bottom: 0px !important;
}

    #navbar-nav .navbar-menu .navbar-nav .nav-link svg {
        margin-left: 0 !important;
        color: white !important;
    }


.navbar-menu .navbar-nav .nav-link svg {
    width: 18px !important;
    margin-left: 0 !important;
    padding-top: 6px !important;
}

#navbar-nav .navbar-menu .navbar-nav .nav-sm .nav-link {
    font-family: Tahoma,Calibri;
}
.no-mg td * {
    margin: 0px;
    font-size: 12px;
}

.bg-red {
    background-color: #F44336;
    color: white;
}

.bg-red * {

    color: white !important;
}

.no-mg td {
    padding: 5px !important;
}

h1, h2, h3, h4, h5, h6 {
    font-family: Tahoma,Calibri !important;
}

.k-upload.k-upload-async.k-upload-empty {
    border-radius: 5px !important;
}

.k-dropzone.k-upload-dropzone {
    padding: 0px;
    padding-left: 10px;
    border-radius: 5px;
}

.k-button.k-button-md.k-rounded-md.k-button-solid.k-button-solid-base.k-upload-button {
    border-radius: 0px 3px 3px 0px;
}

.ag-center-cols-viewport {
    background-color: #ccc;
    padding: 5px;
}

.ag-row-selected::before {
    top: -1px !important;
    left: -1px !important;
    right: -1px !important;
    bottom: -1px !important;
    border-radius: 10px !important;
}

.auth-bg-cover{
    background:white !important;
}

.card-header {
    background-color: rgb(0, 175, 206) !important;
}
.card-header {
    border-radius: 12px 12px 0px 0px !important;
}

.card {
    border-radius: 12px;
}

.tasks-wrapper {
    max-height: calc(100vh - 312px) !important;
    min-height: calc(100vh - 329px) !important;
}




.card-header > h5 {
    color: #2c2c2c;
}



.mds-bs-persian-datetime-picker-popover {
    z-index: var(--z-popup, 100050) !important;
}


.flowblock {
    float: right;
    padding: 10px;
    margin: 5px;
    width: 195px;
    text-align: center;
    background: #eee;
    border: 2px solid #5bc0de;
    border-radius: 5px;
    position: relative;
    padding-bottom: 30px;
}

.flowstepname {
    background: #5bc0de;
    width: 100%;
    display: inline-block;
    padding: 5px;
    font-weight: bold;
}

.flowstatus {
    background: aliceblue;
    margin-top: 5px;
    font-size: 10px;
    padding-bottom: 10px;
    border-radius: 0px 0px 10px 10px;
    padding-top: 7px;
    padding-right: 5px;
}

.flowicon {
    width: 40px;
    height: 40px;
    right: 15px;
    padding: 7px;
    top: -20px;
}

.flowheader {
    position: relative;
    padding-right: 60px;
    font-size: 12px;
}

.flowuser {
    padding: 0px 5px;
    font-size: 12px;
    padding-top: 10px;
}

.flowbuttons {
    position: absolute;
    width: 100%;
    right: -7px;
    text-align: center;
    bottom: -14px;
}

.flowbuttonleft {
    width: 50%;
    float: left;
}

.flowbuttonright {
    width: 50%;
    float: right;
}

.flowdisabled {
    opacity: 0.5
}

/*anime*/

html {
    background: var(--afra-bg);
}

body {
    background-color: var(--afra-bg);
}


.area {
  
    width: 100%;
    height: 100vh;
    position: fixed;
}

.circles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

    .circles li {
        position: absolute;
        display: block;
        list-style: none;
        width: 20px;
        height: 20px;
        background: rgb(69 69 69 / 8%);
        animation: animate 25s linear infinite;
        bottom: -150px;
    }

        .circles li:nth-child(1) {
            left: 25%;
            width: 80px;
            height: 80px;
            animation-delay: 0s;
        }


        .circles li:nth-child(2) {
            left: 10%;
            width: 20px;
            height: 20px;
            animation-delay: 2s;
            animation-duration: 120s;
        }

        .circles li:nth-child(3) {
            left: 70%;
            width: 20px;
            height: 20px;
            animation-delay: 4s;
        }

        .circles li:nth-child(4) {
            left: 40%;
            width: 60px;
            height: 60px;
            animation-delay: 0s;
            animation-duration: 90s;
        }

        .circles li:nth-child(5) {
            left: 65%;
            width: 20px;
            height: 20px;
            animation-delay: 0s;
        }

        .circles li:nth-child(6) {
            left: 75%;
            width: 110px;
            height: 110px;
            animation-delay: 3s;
        }

        .circles li:nth-child(7) {
            left: 35%;
            width: 150px;
            height: 150px;
            animation-delay: 150s;
        }

        .circles li:nth-child(8) {
            left: 50%;
            width: 25px;
            height: 25px;
            animation-delay: 15s;
            animation-duration: 120s;
        }

        .circles li:nth-child(9) {
            left: 20%;
            width: 15px;
            height: 15px;
            animation-delay: 2s;
            animation-duration: 80s;
        }

        .circles li:nth-child(10) {
            left: 85%;
            width: 150px;
            height: 150px;
            animation-delay: 0s;
            animation-duration: 100s;
        }



@keyframes animate {

    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
        border-radius: 0;
    }

    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
        border-radius: 50%;
    }
}


.ag-row.ag-row-odd.ag-row-level-0.ag-row-position-absolute {
    padding-top: 0px;
    border: 1px solid #f3f3f9;
    height: 50px !important;
    margin-top: 0px;
    border-radius: 10px;
}

.ag-row.ag-row-even.ag-row-level-0.ag-row-position-absolute {
    padding-top: 0px;
    border: 1px solid #f3f3f9;
    height: 50px !important;
    margin-top: 0px;
    border-radius: 10px;
}


.ag-row-hover::before {
    box-shadow: 0 10px 10px -10px rgba(0,0,0,.5);
    top: -1px !important;
    left: -1px !important;
    right: -1px !important;
    bottom: -1px !important;
    border-radius: 10px !important;
}

.ag-row-selected .ag-cell{
    color:white !important;
}

.ag-row-selected a {
    color: white !important;
}



::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    border-radius: 10px;
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5);
    background: #ccc;
}


.file-manager-menu li a.active {
    color: #181818;
}

.file-manager-menu li a {
    color: #e8e8e8;
}


.file-manager-menu a.active {
    background: white;
    display: inline-block;
    width: 100%;
    padding: 10px;
    border-radius: 0px 10px 10px 0px;
    position: relative;
}


.file-manager-menu a::after, .file-manager-menu a::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    width: 20px;
    height: 50px;
    border-radius: 0 25px;
    z-index: -1;
}

.btn-secondary {
    color: #fff;
    background-color: #fe8264;
    border-color: #fe8264;
    box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.05);
}

.file-manager-menu a::before {
    top: auto;
    bottom: -50px;
    border-radius: 25px 0;
}

.file-manager-menu a.active:after {
    box-shadow: 0 25px 0 0 #fdfff4;
    z-index:2;
}

.file-manager-menu a.active:before {
    box-shadow: 0 -25px 0 0 #fdfff4;
    z-index: 2;
}


.file-manager-menu li .sub-menu li::before {
    color: white !important;
}


.ag-row-selected::before{

}

#navbar-nav a.nav-link {
    color: var(--afra-text) !important;
}

.footer {
    color: white;
    background: #00afce;
}



.waves {
    position: absolute;
    width: 100%;
    height: 15vh;
    margin-bottom: -7px;
    min-height: 25px;
    max-height: 50px;
    bottom: 67px;
    left: 0px;
}

.content {
    position: relative;
    height: 20vh;
    text-align: center;
    background-color: white;
}

/* Animation */

.parallax > use {
    animation: move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite;
}

    .parallax > use:nth-child(1) {
        animation-delay: -2s;
        animation-duration: 7s;
    }

    .parallax > use:nth-child(2) {
        animation-delay: -3s;
        animation-duration: 10s;
    }

    .parallax > use:nth-child(3) {
        animation-delay: -4s;
        animation-duration: 13s;
    }

    .parallax > use:nth-child(4) {
        animation-delay: -5s;
        animation-duration: 20s;
    }

@keyframes move-forever {
    0% {
        transform: translate3d(-90px,0,0);
    }

    100% {
        transform: translate3d(85px,0,0);
    }
}

/* ---------- UI/UX polish layer (global) ---------- */
:root {
    --afra-accent: #00afce;
    --afra-accent-rgb: 0, 175, 206;
    --afra-bg: #425d5f;
    --afra-surface: #ffffff;
    --afra-surface-2: #f8fafc;
    --afra-text: #1f2937;
    --afra-muted: #6b7280;
    --afra-border: rgba(15, 23, 42, 0.12);
    --afra-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
    --afra-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    --afra-radius-sm: 10px;
    --afra-radius: 14px;
    --afra-radius-lg: 18px;
    --afra-focus: 0 0 0 0.2rem rgba(var(--afra-accent-rgb), 0.25);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    color-scheme: light;
}

body {
    background: var(--afra-bg);
    color: var(--afra-text);
}

img,
svg,
video,
canvas {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
}

a:hover {
    text-decoration: underline;
}

/* Keyboard accessibility */
.skip-link {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--afra-surface);
    color: var(--afra-text);
    border: 1px solid var(--afra-border);
    border-radius: var(--afra-radius-sm);
    box-shadow: var(--afra-shadow-sm);
    transform: translateY(-200%);
    transition: transform 120ms ease;
    z-index: 100000;
}

.skip-link:focus {
    transform: translateY(0);
    outline: none;
}

/* Content spacing + layering (keeps animated background non-interactive) */
.page-content .area {
    pointer-events: none;
    user-select: none;
}

.container-fluid.app-container {
    padding: 1rem;
}

.page-content > .container-fluid.app-container {
    padding: 1rem 1rem 0.75rem;
}

@media (max-width: 768px) {
    .container-fluid.app-container {
        padding: 0.85rem;
    }

    .page-content {
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 16px 16px 0 0;
    }

    .page-content > .container-fluid.app-container {
        padding: 0.85rem 0.85rem 0.75rem;
    }
}

/* Reduce motion for background effects */
@media (prefers-reduced-motion: reduce) {
    .circles li {
        animation: none !important;
    }

    .parallax > use {
        animation: none !important;
    }
}

/* ==========================================================================
   Enterprise sidebar — navigation shell, responsive states and utilities
   ========================================================================== */
:root {
    --afra-nav-width: 292px;
    --afra-nav-compact-width: 84px;
    --afra-nav-bg: #0b1728;
    --afra-nav-surface: #111f32;
    --afra-nav-border: rgba(255, 255, 255, 0.075);
    --afra-nav-text: #dbe6f2;
    --afra-nav-muted: #8292a8;
    --afra-nav-accent: #39d1b4;
}

.app-menu.navbar-menu {
    display: flex !important;
    flex-direction: column;
    gap: 0;
    width: var(--afra-nav-width) !important;
    padding: 0 !important;
    overflow: hidden !important;
    color: var(--afra-nav-text);
    background:
        radial-gradient(circle at 95% 4%, rgba(57, 209, 180, 0.11), transparent 25%),
        linear-gradient(180deg, #0d1b2e 0%, var(--afra-nav-bg) 100%) !important;
    border: 1px solid var(--afra-nav-border) !important;
    border-radius: 22px 0 0 22px !important;
    box-shadow: 0 24px 60px rgba(5, 12, 23, 0.27) !important;
    isolation: isolate;
}

.app-menu.navbar-menu::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.018));
}

.afra-sidebar-header {
    display: flex;
    align-items: center;
    min-height: 76px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--afra-nav-border);
    flex: 0 0 auto;
}

.afra-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    color: #fff !important;
    text-decoration: none !important;
}

.afra-sidebar-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    color: #071526;
    font-family: Arial, sans-serif !important;
    font-size: 19px;
    font-weight: 900;
    border-radius: 13px;
    background: linear-gradient(145deg, #62ead0, #2eb99f);
    box-shadow: 0 8px 20px rgba(32, 194, 164, 0.24), inset 0 1px rgba(255,255,255,.45);
}

.afra-sidebar-brand-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.afra-sidebar-brand-copy { flex: 1 1 auto; }
.afra-sidebar-brand-copy strong { font-size: 15px; line-height: 1.4; letter-spacing: .01em; }
.afra-sidebar-brand-copy small { color: var(--afra-nav-muted); font-size: 10.5px; line-height: 1.5; white-space: nowrap; }

.afra-sidebar-compact-btn {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin-right: auto;
    padding: 0;
    color: #9aabc0;
    font-size: 18px;
    background: rgba(255,255,255,.045);
    border: 1px solid var(--afra-nav-border);
    border-radius: 10px;
    transition: color .18s ease, background .18s ease, transform .22s ease;
}

.afra-sidebar-compact-btn:hover,
.afra-sidebar-compact-btn:focus-visible {
    color: #fff;
    background: rgba(255,255,255,.1);
    outline: none;
}

.afra-sidebar-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    height: 42px;
    margin: 14px 14px 8px;
    color: #8293a9;
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
    flex: 0 0 auto;
}

.afra-sidebar-search-wrap:focus-within {
    color: var(--afra-nav-accent);
    background: rgba(255,255,255,.065);
    border-color: rgba(57,209,180,.48);
    box-shadow: 0 0 0 3px rgba(57,209,180,.08);
}

.afra-sidebar-search-wrap > i { margin-right: 12px; font-size: 17px; }
.afra-sidebar-search {
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0 9px;
    color: #f4f8fb;
    font-size: 12px;
    background: transparent;
    border: 0;
    outline: 0;
}
.afra-sidebar-search::placeholder { color: #76879e; opacity: 1; }
.afra-sidebar-search::-webkit-search-cancel-button { display: none; }
.afra-sidebar-search-wrap kbd {
    margin-left: 9px;
    padding: 1px 6px 2px;
    color: #8999ad;
    font: 10px/1.5 Arial, sans-serif !important;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 5px;
    box-shadow: none;
}
.afra-sidebar-search-clear {
    display: none;
    place-items: center;
    width: 27px;
    height: 27px;
    margin-left: 6px;
    padding: 0;
    color: #a9b6c7;
    background: transparent;
    border: 0;
    border-radius: 7px;
}
.afra-sidebar-has-search .afra-sidebar-search-clear { display: grid; }
.afra-sidebar-has-search .afra-sidebar-search-wrap kbd { display: none; }
.afra-sidebar-search-clear:hover { color: #fff; background: rgba(255,255,255,.08); }

.afra-sidebar-scroll {
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.14) transparent;
}
.afra-sidebar-scroll::-webkit-scrollbar { width: 5px; }
.afra-sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 999px; }
.sidebar-shell { display: grid; gap: 8px; padding: 0 12px 16px !important; }
.navbar-menu #navbar-nav { padding: 0 !important; overflow: visible !important; }
.navbar-menu #navbar-nav > .nav-item { margin: 2px 0 !important; }

.navbar-menu #navbar-nav .nav-link {
    min-height: 44px;
    padding: 5px 9px !important;
    gap: 10px;
    color: #aebdd0 !important;
    font-size: 12.5px;
    font-weight: 500;
    border: 1px solid transparent !important;
    border-radius: 12px !important;
    transform: none !important;
}
.navbar-menu #navbar-nav .nav-link:hover {
    color: #f4f8fc !important;
    background: rgba(255,255,255,.055) !important;
    border-color: rgba(255,255,255,.045) !important;
    transform: none !important;
}
.navbar-menu #navbar-nav .nav-link.active,
.navbar-menu #navbar-nav .nav-link.is-navigating,
.navbar-menu #navbar-nav .nav-item.mm-active > .nav-link[data-bs-toggle="collapse"] {
    color: #fff !important;
    font-weight: 700;
    background: linear-gradient(90deg, rgba(57,209,180,.16), rgba(57,209,180,.055)) !important;
    border-color: rgba(57,209,180,.14) !important;
    transform: none !important;
}
.navbar-menu #navbar-nav .nav-link.active::before,
.navbar-menu #navbar-nav .nav-link.is-navigating::before { display: none; }
.navbar-menu #navbar-nav .nav-link[data-bs-toggle="collapse"]::after {
    margin-right: auto;
    color: #66778d;
    font-size: 14px;
}
.navbar-menu #navbar-nav .nav-link[data-bs-toggle="collapse"][aria-expanded="true"]::after { color: var(--afra-nav-accent); }

.side-icon {
    display: grid !important;
    place-items: center;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px;
    margin: 0 !important;
    padding: 0 !important;
    color: #8fa1b8 !important;
    font-size: 17px;
    line-height: 1 !important;
    background: rgba(255,255,255,.045) !important;
    border: 1px solid rgba(255,255,255,.045);
    border-radius: 9px !important;
    box-shadow: none !important;
}
.navbar-menu #navbar-nav .nav-link:hover .side-icon { color: #dfe9f4 !important; background: rgba(255,255,255,.08) !important; }
.navbar-menu #navbar-nav .nav-link.active .side-icon,
.navbar-menu #navbar-nav .nav-item.mm-active > .nav-link .side-icon {
    color: var(--afra-nav-accent) !important;
    background: rgba(57,209,180,.1) !important;
    border-color: rgba(57,209,180,.14);
}
.side-icon i { font-size: inherit !important; line-height: 1 !important; }

.navbar-menu #navbar-nav .menu-dropdown {
    margin: 4px 16px 6px 0 !important;
    padding: 2px 10px 2px 0 !important;
    border-right: 1px solid rgba(126,146,170,.19) !important;
}
.navbar-menu #navbar-nav .nav-sm .nav-link,
.navbar-menu #navbar-nav .menu-dropdown .nav-link {
    min-height: 36px;
    padding: 5px 10px !important;
    color: #8293a8 !important;
    font-size: 11.5px;
    font-weight: 500;
    background: transparent !important;
    border-radius: 9px !important;
}
.navbar-menu #navbar-nav .nav-sm .nav-link:hover,
.navbar-menu #navbar-nav .nav-sm .nav-link.active {
    padding-right: 10px !important;
    color: #ecf3fa !important;
    background: rgba(255,255,255,.045) !important;
}
.navbar-menu #navbar-nav .nav-sm .nav-link.active { color: var(--afra-nav-accent) !important; }
.afra-menu-filter-hidden { display: none !important; }

.afra-sidebar-empty {
    margin: 18px 6px;
    padding: 24px 14px;
    color: #74859a;
    text-align: center;
    background: rgba(255,255,255,.025);
    border: 1px dashed rgba(255,255,255,.08);
    border-radius: 14px;
}
.afra-sidebar-empty[hidden] { display: none; }
.afra-sidebar-empty i { display: block; margin-bottom: 8px; font-size: 24px; color: #66788e; }
.afra-sidebar-empty strong { display: block; margin-bottom: 3px; color: #b7c4d3; font-size: 12px; }
.afra-sidebar-empty span { font-size: 10.5px; }

@media (min-width: 768px) {
    .app-menu.navbar-menu {
        top: 12px !important;
        right: 0 !important;
        bottom: 12px !important;
        height: auto !important;
    }
    .main-content { margin-right: calc(var(--afra-nav-width) + 12px) !important; }
    #page-topbar { right: calc(var(--afra-nav-width) + 12px) !important; width: auto !important; }

    body.afra-sidebar-compact .app-menu.navbar-menu { width: var(--afra-nav-compact-width) !important; }
    body.afra-sidebar-compact .main-content { margin-right: calc(var(--afra-nav-compact-width) + 12px) !important; }
    body.afra-sidebar-compact #page-topbar { right: calc(var(--afra-nav-compact-width) + 12px) !important; }
    body.afra-sidebar-compact .afra-sidebar-brand-copy,
    body.afra-sidebar-compact .afra-sidebar-search-wrap,
    body.afra-sidebar-compact .navbar-menu #navbar-nav .nav-link > span,
    body.afra-sidebar-compact .navbar-menu #navbar-nav .nav-link::after,
    body.afra-sidebar-compact .navbar-menu #navbar-nav .menu-dropdown { display: none !important; }
    body.afra-sidebar-compact .afra-sidebar-header { flex-direction: column; gap: 8px; padding: 12px 10px 9px; }
    body.afra-sidebar-compact .afra-sidebar-compact-btn { margin: 0; transform: rotate(180deg); }
    body.afra-sidebar-compact .sidebar-shell { padding-inline: 10px !important; }
    body.afra-sidebar-compact .navbar-menu #navbar-nav .nav-link { justify-content: center; padding-inline: 5px !important; }
    body.afra-sidebar-compact .side-icon { width: 38px !important; height: 38px !important; }
}

@media (max-width: 767.98px) {
    .app-menu.navbar-menu {
        top: 0 !important;
        bottom: 0 !important;
        width: min(310px, calc(100vw - 36px)) !important;
        height: 100vh !important;
        border-radius: 20px 0 0 20px !important;
    }
    .afra-sidebar-compact-btn { display: none; }
    .afra-sidebar-header { min-height: 70px; }
}

@media (prefers-reduced-motion: reduce) {
    .afra-sidebar-compact-btn,
    .afra-sidebar-search-wrap,
    .app-menu.navbar-menu,
    .main-content,
    #page-topbar { transition: none !important; }
}

/* Cards */
.card {
    border: 1px solid var(--afra-border) !important;
    border-radius: var(--afra-radius-lg) !important;
    box-shadow: var(--afra-shadow-sm);
    overflow: hidden;
}

.card-header {
    background: var(--afra-surface) !important;
    border-bottom: 1px solid var(--afra-border) !important;
}

/* Topbar tweaks */
.topbar-brand-box {
    width: 250px;
    padding-right: 45px;
    padding-top: 5px;
}

.topbar-search-input {
    border-radius: 999px !important;
}

.ux-dropdown-action {
    font-size: 0.875rem !important;
}

/* Auth pages */
.auth-card {
    box-shadow: var(--afra-shadow) !important;
}

.auth-step-panel {
    max-width: 1000px;
    margin: 10vh auto 0;
}

/* Buttons */
.btn {
    border-radius: var(--afra-radius-sm);
    transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease, border-color 120ms ease;
}

.btn:active {
    transform: translateY(0.5px);
}

.btn:focus,
.btn:focus-visible {
    box-shadow: var(--afra-focus) !important;
}

/* Inputs (Bootstrap + Select2 + Kendo) */
.form-control,
.form-select,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple,
.k-input,
.k-textbox,
.k-textarea,
.k-picker,
.k-combobox .k-input-inner,
.k-dropdownlist .k-input-inner {
    border-radius: var(--afra-radius-sm) !important;
}

.form-control:focus,
.form-select:focus,
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: rgba(var(--afra-accent-rgb), 0.55) !important;
    box-shadow: var(--afra-focus) !important;
}

.k-input:focus-within,
.k-picker:focus-within,
.k-combobox:focus-within,
.k-dropdownlist:focus-within {
    box-shadow: var(--afra-focus) !important;
}

/* Tables */
.table {
    background: var(--afra-surface);
}

.table thead th {
    background: var(--afra-surface-2);
}

.table > :not(caption) > * > * {
    border-color: rgba(15, 23, 42, 0.08);
}

/* Toast placement */
#liveAlertPlaceholder {
    left: 50%;
    right: auto !important;
    transform: translateX(-50%);
    width: min(720px, calc(100vw - 2rem));
    padding: 0 0.5rem;
}

/* Small “chat-like” blocks used in AI panel */
.AI-Message {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: var(--afra-shadow-sm);
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: var(--afra-radius);
}

/* Footer waves (keeps existing markup but makes spacing consistent) */
.footer-waves-wrap {
    margin-right: -15px;
    margin-left: -15px;
}

/* Scrollbar (Firefox) */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(15, 23, 42, 0.24) transparent;
}

.list-hub {
    display: grid;
    gap: 18px;
    color: #1f2937;
}

/* When a .list-hub wraps its sections in Bootstrap tabs (e.g. PaymentOrder),
   the active pane must reproduce the hub's vertical rhythm — otherwise the
   toolbar, filters and grid collapse together and lose the standard spacing
   every other list page gets from the .list-hub grid gap. */
.list-hub .tab-content > .tab-pane.active {
    display: grid;
    gap: 18px;
    align-content: start;
}

.list-hub-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    padding: 10px 20px 10px 10px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(15, 139, 141, 0.08) 0%, #ffffff 52%, var(--afra-bg-soft, #f8fbfd) 100%);
    border: 1px solid rgba(15, 139, 141, 0.14);
    align-items: center;
}

.list-hub-kicker {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--afra-accent-2);
    margin-bottom: 8px;
}

.list-hub-hero h2 {
    margin: 0 0 10px;
    font-size: 20px;
    color: #0f172a;
}

.list-hub-hero p {
    margin: 0;
    color: #64748b;
    line-height: 1.9;
    max-width: 760px;
}

.list-hub-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 12px;
    grid-auto-flow: column;
}

.list-hub-stat {
    padding: 16px;
    background: #fff;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.list-hub-stat span {
    display: block;
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
}

.list-hub-stat label {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #64748b;
}

.list-hub-stat.danger span {
    color: #b91c1c;
}

.list-hub-stat.action span {
    color: var(--afra-accent-2);
}

.list-hub-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
}

.list-hub-search {
    position: relative;
}

.list-hub-search i {
    position: absolute;
    top: 50%;
    inset-inline-start: 14px;
    transform: translateY(-50%);
    color: #64748b;
}

.list-hub-search input {
    width: 100%;
    min-height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    padding: 0 42px 0 16px;
}

.list-hub-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.list-hub-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 18px;
    background: #fff;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.list-filter {
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: #f8fafc;
    color: #334155;
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 700;
}

.list-filter.active {
    background: var(--afra-accent-2);
    color: #fff;
    border-color: var(--afra-accent-2);
}

.list-filter strong {
    margin-inline-start: 6px;
    font-size: 11px;
    opacity: 0.8;
}

.list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 14px;
}

/* Row (list) view — toggled via .is-rows on .list-grid */
:is(.list-grid.is-rows, html.afra-list-rows .list-grid) {
    grid-template-columns: 1fr;
    gap: 6px;
}
:is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card {
    grid-template-columns: minmax(180px, 1.5fr) minmax(0, 2.4fr) minmax(0, 1.4fr) auto;
    grid-auto-flow: column;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}
:is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-top {
    align-items: center;
}
:is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-top h3 { font-size: 14px; }
:is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-code { margin-bottom: 2px; font-size: 11px; }
:is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-badge { padding: 4px 8px; font-size: 11px; }
:is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 14px;
    font-size: 12px;
}
:is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-grid label {
    display: inline;
    margin: 0;
    margin-inline-end: 6px;
}
:is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-grid label::after {
    content: ":";
    margin-inline-start: 2px;
}
:is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-grid strong { font-size: 12px; }
:is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-summary { font-size: 12px; gap: 8px; }
:is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-actions { flex-wrap: nowrap; justify-content: flex-end; }
:is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-actions .btn { padding: 4px 10px; font-size: 12px; }
:is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-warning { padding: 6px 10px; font-size: 12px; }
@media (max-width: 991.98px) {
    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card {
        grid-template-columns: 1fr;
        grid-auto-flow: row;
    }
}

/* View-mode toggle button */
.list-view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: #fff;
    color: #475569;
    font-size: 13px;
    cursor: pointer;
}
.list-view-toggle:hover { background: #f1f5f9; }
.list-view-toggle i { font-size: 16px; }

/* Email module visual layer is owned by the inline <style> in Views/Email/EmailList.cshtml.
   Keep only the unread-dot helper here (still used by the toggle JS). */
.email-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--afra-accent-2); margin-left: 6px; vertical-align: middle; }

.list-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.05);
}

.list-card.is-warning {
    border-color: rgba(185, 28, 28, 0.2);
    box-shadow: 0 18px 36px rgba(185, 28, 28, 0.08);
}

.list-card-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
}

.list-user-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.list-user-avatar {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border: 3px solid #fff;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.24), 0 8px 18px rgba(15, 23, 42, 0.12);
}

img[data-user-id],
img[data-afra-user-card] {
    cursor: pointer;
}

img[data-afra-user-card]:focus-visible {
    outline: 3px solid rgba(29, 111, 216, 0.35);
    outline-offset: 3px;
}

.afra-user-card-modal .modal-content {
    border: 0;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.afra-user-card-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px;
    background: linear-gradient(135deg, rgba(29, 111, 216, 0.12), rgba(16, 185, 129, 0.08));
}

.afra-user-card-avatar {
    width: 82px;
    height: 82px;
    flex: 0 0 82px;
    border: 4px solid #fff;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.16);
}

.afra-user-card-name { margin: 0 0 6px; font-size: 20px; color: #0f172a; }
.afra-user-card-position { margin: 0; color: #64748b; font-weight: 700; }
.afra-user-card-status { margin-inline-start: auto; white-space: nowrap; }
.afra-user-card-details { padding: 20px 22px; }
.afra-user-card-details .detail-kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.afra-user-card-details a { color: var(--afra-accent-2); overflow-wrap: anywhere; }

@media (max-width: 575.98px) {
    .afra-user-card-hero { align-items: flex-start; flex-wrap: wrap; }
    .afra-user-card-status { margin-inline-start: 0; }
    .afra-user-card-details .detail-kv { grid-template-columns: 1fr; }
}

.list-card-code {
    font-size: 12px;
    font-weight: 800;
    color: var(--afra-accent-2);
    margin-bottom: 8px;
}

.list-card h3 {
    margin: 0;
    font-size: 17px;
    color: #0f172a;
}

.list-card-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(29, 111, 216, 0.12);
    color: var(--afra-accent-2);
    font-weight: 800;
    font-size:12px;
}

.list-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.list-card-grid label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
}

.list-card-grid strong {
    color: #0f172a;
    font-size: 14px;
}

.list-card-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #64748b;
    font-size: 13px;
}

.list-card-warning {
    padding: 12px 14px;
    border-radius: 14px;
    background: #fef2f2;
    color: #b91c1c;
    font-weight: 700;
}

.list-card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.list-empty {
    padding: 38px;
    border-radius: 18px;
    background: #fff;
    border: 1px dashed rgba(148, 163, 184, 0.34);
    text-align: center;
    color: #64748b;
    font-weight: 700;
    grid-column: 1 / -1;
}

.list-loader {
    padding: 16px;
    color: #64748b;
    text-align: center;
    font-weight: 700;
    grid-column: 1 / -1;
}

.list-scroll-sentinel {
    min-height: 1px;
    grid-column: 1 / -1;
}

@media (max-width: 991px) {
    .list-hub-hero,
    .list-hub-toolbar {
        grid-template-columns: 1fr;
    }
}

/* ---------- 2026 visual refresh ---------- */
:root {
    --afra-accent: #2f7f77;
    --afra-accent-rgb: 47, 127, 119;
    --afra-accent-2: #d99058;
    --afra-bg: #425d5f;
    --afra-bg-soft: #fbf8f3;
    --afra-surface: rgba(255, 252, 247, 0.92);
    --afra-surface-strong: #fffaf2;
    --afra-surface-2: #f6efe5;
    --afra-text: #24343a;
    --afra-text-soft: #52636a;
    --afra-muted: #6f7f86;
    --afra-border: rgba(79, 96, 104, 0.14);
    --afra-shadow-sm: 0 6px 16px rgba(77, 63, 43, 0.06);
    --afra-shadow: 0 18px 46px rgba(77, 63, 43, 0.11);
    --afra-shadow-lg: 0 28px 64px rgba(77, 63, 43, 0.14);
    --afra-radius-sm: 12px;
    --afra-radius: 18px;
    --afra-radius-lg: 24px;
    --afra-focus: 0 0 0 0.24rem rgba(var(--afra-accent-rgb), 0.18);
    --vz-vertical-menu-width: 260px;
}

html {
    background: var(--afra-bg);
}

body {
    background: var(--afra-bg);
    color: var(--afra-text);
}

#layout-wrapper {
    position: relative;
}

#layout-wrapper::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 78% 24%, rgba(217, 144, 88, 0.08), transparent 24%),
        radial-gradient(circle at 18% 78%, rgba(47, 127, 119, 0.08), transparent 28%);
    z-index: 0;
}

.main-content,
#page-topbar,
.app-menu,
.page-content,
.footercontainer {
    position: relative;
    z-index: 1;
}

.main-content {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-content {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
    min-height: 0 !important;
    top: 0 !important;
    padding-bottom: 0 !important;
}

.footercontainer {
    margin-top: auto;
    flex-shrink: 0;
}

.footer-waves-wrap,
.waves {
    display: none !important;
}

#page-topbar {
    background: transparent !important;
    padding: 0;
    right: var(--vz-vertical-menu-width) !important;
    left: 0 !important;
    z-index: 1002;
}

    #page-topbar .layout-width {
        background: #768c8d;
        border: 1px solid rgba(120, 104, 82, 0.12);
        box-shadow: 0 16px 42px rgba(77, 63, 43, 0.09);
        backdrop-filter: blur(16px);
        padding: 5px 5px;
    }

.navbar-header .btn-topbar,
.navbar-header .user-name-text,
.navbar-header .user-name-sub-text,
.navbar-header .btn {
    color: var(--afra-text) !important;
}

.topbar-brand-box {
    width: 220px;
    padding-right: 28px;
}

.topbar-search-form .topbar-search-input {
    min-height: 46px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(120, 104, 82, 0.14);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.7);
    padding-right: 44px;
}

.topbar-search-form .search-widget-icon {
    color: var(--afra-muted);
}

.topbar-inline-history-shell {
    background: rgba(255, 255, 255, 0.48);
    border: 1px solid rgba(120, 104, 82, 0.12);
    border-radius: 999px;
    padding: 6px 8px;
}

.topbar-shortcut-card,
.topbar-history-empty {
    background: rgba(255, 252, 247, 0.92) !important;
    border-color: rgba(120, 104, 82, 0.14) !important;
    box-shadow: 0 4px 12px rgba(77, 63, 43, 0.05);
}

.topbar-shortcut-card:hover {
    background: #fffaf2 !important;
    border-color: rgba(var(--afra-accent-rgb), 0.24) !important;
    text-decoration: none !important;
    transform: translateY(-1px);
}

.app-menu.navbar-menu {
    top: 70px;
    right: 0;
    width: var(--vz-vertical-menu-width);
    background: linear-gradient(180deg, rgba(41, 56, 65, 0.95), rgba(28, 40, 48, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.22) !important;
    border-radius: 24px;
    padding: 10px 8px;
}

.vertical-overlay {
    z-index: 1003 !important;
}

.main-content {
    margin-right: var(--vz-vertical-menu-width);
    padding-top: 0;
/*    padding-bottom: 95px;*/
}

:is([data-layout=vertical], [data-layout=semibox])[data-sidebar-size=sm-hover-active] .main-content,
:is([data-layout=vertical], [data-layout=semibox])[data-sidebar-size=sm-hover] .main-content,
:is([data-layout=vertical], [data-layout=semibox])[data-sidebar-size=sm] .main-content,
:is([data-layout=vertical], [data-layout=semibox])[data-sidebar-size=md] .main-content {
    margin-right: var(--vz-vertical-menu-width) ;
}

:is([data-layout=vertical], [data-layout=semibox])[data-sidebar-size=sm-hover-active] #page-topbar,
:is([data-layout=vertical], [data-layout=semibox])[data-sidebar-size=sm-hover] #page-topbar,
:is([data-layout=vertical], [data-layout=semibox])[data-sidebar-size=sm] #page-topbar,
:is([data-layout=vertical], [data-layout=semibox])[data-sidebar-size=md] #page-topbar {
    right: var(--vz-vertical-menu-width) !important;
    left: 0 !important;
}

.sidebar-background {
    opacity: 0.08;
    border-radius: 24px;
}

.navbar-menu #navbar-nav .nav-link.menu-link {
    color: rgba(243, 247, 249, 0.92) !important;
    border: 1px solid transparent;
}

.navbar-menu #navbar-nav .nav-link.menu-link:hover,
#navbar-nav .nav-link.menu-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.06);
}

.navbar-menu #navbar-nav .nav-link.menu-link.active,
.navbar-menu #navbar-nav .nav-item.active > .menu-link,
#navbar-nav .nav-link[data-bs-toggle=collapse][aria-expanded=true] {
    background: linear-gradient(135deg, rgba(47, 127, 119, 0.28), rgba(217, 144, 88, 0.22)) !important;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.menu-link span,
#navbar-nav a.nav-link {
    color: inherit !important;
}

.navbar-menu #navbar-nav .menu-dropdown {
    border-right: 1px dashed rgba(255, 255, 255, 0.12);
}

.navbar-menu #navbar-nav .nav-sm .nav-link {
    color: rgba(223, 232, 237, 0.78) !important;
    text-decoration: none !important;
}

    .navbar-menu #navbar-nav .nav-sm .nav-link:hover,
    .navbar-menu #navbar-nav .nav-sm .nav-link.active {
        transition: all 0.5s;
        background: rgba(255, 255, 255, 0.06);
        color: #ffffff !important;
        padding-right: 15px !important;
    }

.side-icon {
    background: linear-gradient(135deg, rgba(47, 127, 119, 0.18), rgba(217, 144, 88, 0.2));
    color: #f7fbfc;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.page-content {
    background: var(--afra-bg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
    border-radius: 28px 28px 0 0;
    margin-left: 18px;
    margin-right: 14px;
    padding-top: 78px;
}

.container-fluid.app-container {
    padding-top: 1.1rem;
    flex: 1 0 auto;
}

.card,
.list-card,
.list-hub-filters,
.list-empty,
.folderviewcontainer,
.folderTreeContainer,
.search-block {
    background: var(--afra-surface) !important;
    border: 1px solid rgba(120, 104, 82, 0.12) !important;
    box-shadow: var(--afra-shadow-sm) !important;
}

.card {
    border-radius: 22px !important;
}

.card-header {
    background: linear-gradient(180deg, rgba(255, 250, 242, 0.96), rgba(247, 239, 227, 0.96)) !important;
    color: var(--afra-text) !important;
    border-bottom: 1px solid rgba(120, 104, 82, 0.1) !important;
}

.card-header > h5,
.card-title,
.list-card h3,
.list-hub-hero h2,
h1, h2, h3, h4, h5, h6 {
    color: #22343a !important;
}

.text-muted,
.list-card-summary,
.list-hub-hero p,
.list-card-grid label,
small {
    color: var(--afra-text-soft) !important;
}

.btn-primary,
.bg-primary {
    background: linear-gradient(135deg, #2f7f77, #47948b) !important;
    border-color: #2f7f77 !important;
    color: #fff !important;
}

.btn-secondary {
    background: linear-gradient(135deg, #d99058, #e4a16b) !important;
    border-color: #d99058 !important;
    color: #fff !important;
}

.btn-light,
.btn-soft-primary,
.list-filter {
    background: rgba(255, 250, 242, 0.92) !important;
    border-color: rgba(120, 104, 82, 0.12) !important;
    color: var(--afra-text) !important;
}

.list-filter.active {
    background: linear-gradient(135deg, #2f7f77, #47948b) !important;
    border-color: #2f7f77 !important;
    color: #fff !important;
}

.form-control,
.form-select,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple,
.k-input,
.k-textbox,
.k-textarea,
.k-picker {
    background: rgba(255, 252, 247, 0.92) !important;
    border-color: rgba(120, 104, 82, 0.16) !important;
    color: var(--afra-text) !important;
}

.table,
.ag-center-cols-viewport,
.ag-root-wrapper,
.ag-theme-material {
    background: transparent !important;
}

.table thead th {
    background: rgba(246, 239, 229, 0.85) !important;
}

.ag-row.ag-row-odd.ag-row-level-0.ag-row-position-absolute,
.ag-row.ag-row-even.ag-row-level-0.ag-row-position-absolute {
    background: rgba(255, 252, 247, 0.92);
    border-color: rgba(120, 104, 82, 0.1);
}

.ag-row-hover::before {
    box-shadow: 0 14px 24px rgba(77, 63, 43, 0.08);
}

.footer,
.footercontainer .footer {
    background: linear-gradient(135deg, #2b6660, #355b67) !important;
    color: #eff7f6 !important;
}

.area .circles li {
    background: rgba(47, 127, 119, 0.06);
}

@media (min-width: 768px) {
    #layout-wrapper {
        min-height: 100vh;
    }

    .app-menu.navbar-menu {
        position: fixed !important;
        top: 90px;
        right: 0px;
        bottom: 0px;
        width: var(--vz-vertical-menu-width);
        overflow: hidden;
        border-radius: 10px 0px 0px 0px;
        width: 274px;
    }

    #page-topbar {
        position: fixed !important;
        top: 0;
        right: 0 !important;
        left: 0 !important;
        width: 100%;
    }

    .main-content {
        display: flex;
        flex-direction: column;
        margin-right: calc(var(--vz-vertical-menu-width) + 14px);
        min-height: 100vh;
    }

    .page-content {
        position: relative;
        top: 0;
        margin-right: 0px;
        padding-top: 75px;
        padding-bottom: 0 !important;
        min-height: 100vh;
        padding-right: 0px;
        padding-left: 0px;
        margin-left: 0px;
    }
}

@media (max-width: 1199px) {
    .topbar-inline-history-shell {
        display: none !important;
    }

    .topbar-search-form {
        max-width: 100%;
        min-width: min(320px, 46vw);
    }
}

@media (max-width: 767.98px) {
    #page-topbar {
        right: 0 !important;
    }

    #topnav-hamburger-icon {
        background: rgba(255, 250, 242, 0.96) !important;
        border: 1px solid rgba(34, 52, 58, 0.14) !important;
        border-radius: 14px !important;
        color: #22343a !important;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    }

    #topnav-hamburger-icon:hover,
    #topnav-hamburger-icon:focus,
    #topnav-hamburger-icon:active {
        background: #ffffff !important;
        border-color: rgba(34, 52, 58, 0.22) !important;
        color: #22343a !important;
    }

    #topnav-hamburger-icon .hamburger-icon span {
        background-color: #22343a !important;
        box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
    }

    :is([data-layout=vertical], [data-layout=semibox])[data-sidebar-size=sm-hover-active] #page-topbar,
    :is([data-layout=vertical], [data-layout=semibox])[data-sidebar-size=sm-hover] #page-topbar,
    :is([data-layout=vertical], [data-layout=semibox])[data-sidebar-size=sm] #page-topbar,
    :is([data-layout=vertical], [data-layout=semibox])[data-sidebar-size=md] #page-topbar {
        right: 0 !important;
    }

    #page-topbar .layout-width {
        border-radius: 16px;
        padding: 6px 8px;
        margin: 4px 8px 0;
    }

    .page-content {
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 19px;
        padding-top: 0px;
        padding-bottom: 0 !important;
        min-height: 100vh;
        box-shadow: none;
    }

    .app-menu.navbar-menu {
        top: 0;
        right: 0;
        width: 284px;
        border-radius: 0 24px 24px 0;
        height: 100vh;
        position: fixed;
        max-height: 100vh;
        overflow: auto;
        z-index: 1005;
    }

    .main-content {
        margin-right: 0;
        min-height: 100vh;
    }
}

/* ---------- unified automation theme ---------- */
:root {
    --afra-accent: #0f8b8d;
    --afra-accent-rgb: 15, 139, 141;
    --afra-accent-2: #1d6fd8;
    --afra-highlight: #f0a34a;
    --afra-bg: #edf3f7;
    --afra-bg-soft: #f8fbfd;
    --afra-surface: rgba(255, 255, 255, 0.94);
    --afra-surface-strong: #ffffff;
    --afra-surface-2: #f2f7fb;
    --afra-sidebar-start: #10263a;
    --afra-sidebar-end: #19364d;
    --afra-sidebar-border: rgba(255, 255, 255, 0.08);
    --afra-topbar: rgba(255, 255, 255, 0.86);
    --afra-topbar-border: rgba(22, 48, 66, 0.08);
    --afra-text: #163042;
    --afra-text-soft: #5d7383;
    --afra-muted: #7890a1;
    --afra-border: rgba(22, 48, 66, 0.10);
    --afra-border-strong: rgba(22, 48, 66, 0.16);
    --afra-shadow-sm: 0 10px 24px rgba(16, 38, 58, 0.07);
    --afra-shadow: 0 22px 56px rgba(16, 38, 58, 0.11);
    --afra-shadow-lg: 0 32px 80px rgba(16, 38, 58, 0.14);
    --afra-focus: 0 0 0 0.24rem rgba(var(--afra-accent-rgb), 0.18);
}

html {
    background:
        radial-gradient(circle at 12% 12%, rgba(15, 139, 141, 0.10), transparent 24%),
        radial-gradient(circle at 88% 20%, rgba(29, 111, 216, 0.10), transparent 26%),
        linear-gradient(180deg, #f8fbfd 0%, #edf3f7 48%, #e7eef4 100%);
}

body {
    background: transparent !important;
    color: var(--afra-text) !important;
}

body,
.table,
.dropdown-menu,
.modal-content,
.offcanvas,
.k-window,
.k-dialog,
.k-popup,
.swal2-popup {
    color: var(--afra-text);
}

#layout-wrapper::before {
    background:
        radial-gradient(circle at 82% 18%, rgba(240, 163, 74, 0.10), transparent 20%),
        radial-gradient(circle at 16% 82%, rgba(15, 139, 141, 0.11), transparent 26%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0));
}

#page-topbar {
    background: transparent !important;
}

#page-topbar .layout-width {
    background: var(--afra-topbar) !important;
    border: 1px solid var(--afra-topbar-border) !important;
    box-shadow: var(--afra-shadow) !important;
    backdrop-filter: blur(18px);
}

.navbar-header .btn-topbar,
.navbar-header .btn,
.navbar-header .user-name-text,
.navbar-header .user-name-sub-text,
.header-item {
    color: var(--afra-text) !important;
}

.topbar-search-form .topbar-search-input,
.topbar-inline-history-shell,
.topbar-shortcut-card,
.topbar-history-empty {
    background: rgba(255, 255, 255, 0.78) !important;
    border-color: var(--afra-border) !important;
    color: var(--afra-text) !important;
}

.topbar-shortcut-card:hover {
    border-color: rgba(var(--afra-accent-rgb), 0.22) !important;
    box-shadow: var(--afra-shadow-sm) !important;
}

.app-menu.navbar-menu {
    background: linear-gradient(180deg, rgba(16, 38, 58, 0.98), rgba(25, 54, 77, 0.98)) !important;
    border: 1px solid var(--afra-sidebar-border) !important;
    box-shadow: 0 26px 56px rgba(8, 22, 34, 0.24) !important;
}

.navbar-menu .navbar-brand-box {
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

.navbar-menu #navbar-nav .nav-link.menu-link {
    color: rgba(237, 245, 250, 0.92) !important;
}

.navbar-menu #navbar-nav .nav-link.menu-link:hover,
#navbar-nav .nav-link.menu-link:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
}

.navbar-menu #navbar-nav .nav-link.menu-link.active,
.navbar-menu #navbar-nav .nav-item.active > .menu-link,
#navbar-nav .nav-link[data-bs-toggle=collapse][aria-expanded=true] {
    background: linear-gradient(135deg, rgba(15, 139, 141, 0.34), rgba(29, 111, 216, 0.26)) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 18px rgba(4, 12, 20, 0.18) !important;
}

.navbar-menu #navbar-nav .nav-sm .nav-link,
.navbar-menu #navbar-nav .menu-dropdown .nav-link {
    color: rgba(214, 228, 237, 0.78) !important;
}

.navbar-menu #navbar-nav .nav-sm .nav-link:hover,
.navbar-menu #navbar-nav .nav-sm .nav-link.active {
    background: rgba(255, 255, 255, 0.07) !important;
    color: #ffffff !important;
}

.navbar-menu #navbar-nav .menu-dropdown {
    border-right-color: rgba(255, 255, 255, 0.12) !important;
}

.side-icon {
    background: linear-gradient(135deg, rgba(15, 139, 141, 0.24), rgba(29, 111, 216, 0.22)) !important;
    color: #f4fbff !important;
}

.page-content {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.50), rgba(255, 255, 255, 0.10)),
        transparent !important;
    box-shadow: none !important;
}

.container-fluid.app-container {
    position: relative;
}



.container-fluid.app-container > * {
    position: relative;
    z-index: 1;
}

.card,
.list-card,
.list-hub-filters,
.list-empty,
.folderviewcontainer,
.folderTreeContainer,
.search-block,
.profile-foreground,
.signin-card,
.two-step-card,
.modal-content,
.dropdown-menu,
.k-window-content,
.k-dialog-content,
.k-list-container,
.k-animation-container .k-popup,
.swal2-popup {
    background: var(--afra-surface) !important;
    border: 1px solid var(--afra-border) !important;
    box-shadow: var(--afra-shadow-sm) !important;
}

.card,
.modal-content,
.k-window,
.k-dialog,
.swal2-popup {
    border-radius: var(--afra-radius-lg, 18px) !important;
}

/* Round the header/footer backgrounds to the parent corner instead of
   overflow:hidden, so dropdowns/popovers inside cards are never clipped. */
.card > :first-child,
.modal-content > :first-child,
.k-window > :first-child,
.k-dialog > :first-child {
    border-start-start-radius: inherit;
    border-start-end-radius: inherit;
}

.card > :last-child,
.modal-content > :last-child,
.k-window > :last-child,
.k-dialog > :last-child {
    border-end-start-radius: inherit;
    border-end-end-radius: inherit;
}

.dropdown-menu {
    border-radius: var(--afra-radius-sm, 10px) !important;
    overflow: hidden;
}

.card-header,
.modal-header,
.dropdown-header,
.k-window-titlebar,
.k-dialog-titlebar {
    background: linear-gradient(180deg, rgba(244, 249, 252, 0.98), rgba(236, 244, 249, 0.96)) !important;
    border-bottom: 1px solid var(--afra-border) !important;
    color: var(--afra-text) !important;
}

.modal-dialog:not(.modal-dialog-scrollable) .modal-header .btn-close {
    padding: 0px;
    margin-top: -23px;
}

.card-header,
.modal-header {
    position: relative;
}

.card-header > h5,
.card-title,
.modal-title,
.list-card h3,
.list-hub-hero h2,
h1, h2, h3, h4, h5, h6,
label,
.form-label {
    color: var(--afra-text) !important;
}

.text-muted,
small,
.list-card-summary,
.list-hub-hero p,
.list-card-grid label,
.form-text,
.text-body-secondary {
    color: var(--afra-text-soft) !important;
}

a {
    color: var(--afra-accent-2);
}

a:hover {
    color: var(--afra-accent);
}

.btn,
.k-button {
    border-radius: 14px !important;
    font-weight: 600;
}

.btn-primary,
.bg-primary,
.k-button-solid-primary,
.k-button-solid.k-primary,
.k-selected,
.k-chip-solid-base.k-selected {
    background: linear-gradient(135deg, var(--afra-accent), var(--afra-accent-2)) !important;
    border-color: rgba(var(--afra-accent-rgb), 0.78) !important;
    color: #ffffff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.k-button-solid-primary:hover,
.k-button-solid-primary:focus,
.k-button-solid.k-primary:hover,
.k-button-solid.k-primary:focus {
    filter: saturate(1.08) brightness(0.98);
    box-shadow: 0 14px 26px rgba(var(--afra-accent-rgb), 0.24) !important;
}

.btn-success {
    background: linear-gradient(135deg, #138f77, #0f8b8d) !important;
    border-color: #138f77 !important;
    color: #ffffff !important;
}

.btn-secondary,
.k-button-solid-base {
    background: linear-gradient(135deg, #29a7be, #27a8bf) !important;
    border-color: #40b7d0 !important;
    color: #ffffff !important;
}

/* Flat inner edge only for buttons glued to a Kendo input/picker edge (RTL) */
.k-input .k-button-solid-base,
.k-picker .k-button-solid-base,
.k-upload-button {
    border-radius: 5px 0px 0px 5px !important;
}

.app-search {
    padding: 0px;
}

.btn-outline-secondary,
.btn-light,
.btn-soft-primary,
.list-filter,
.k-button-flat,
.k-button-outline {
    background: rgba(255, 255, 255, 0.72) !important;
    border-color: var(--afra-border) !important;
    color: var(--afra-text) !important;
}

.btn-outline-secondary:hover,
.btn-light:hover,
.btn-soft-primary:hover,
.list-filter:hover,
.k-button-outline:hover,
.k-button-flat:hover {
    background: rgba(15, 139, 141, 0.08) !important;
    border-color: rgba(var(--afra-accent-rgb), 0.22) !important;
    color: var(--afra-text) !important;
}

.list-filter.active {
    background: linear-gradient(135deg, var(--afra-accent), var(--afra-accent-2)) !important;
    border-color: transparent !important;
    color: #ffffff !important;
}

.form-control,
.form-select,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple,
.k-input,
.k-textbox,
.k-textarea,
.k-picker,
.k-input-inner,
.k-multiselect,
.k-combobox,
.k-dropdownlist,
.k-numerictextbox,
.k-timepicker,
.k-datepicker {
    background: rgba(248, 251, 253, 0.98) !important;
    border-color: var(--afra-border) !important;
    color: var(--afra-text) !important;
    box-shadow: none !important;
}

.form-control::placeholder,
.k-input-inner::placeholder,
.select2-search__field::placeholder {
    color: #8aa0af !important;
}

.form-control:focus,
.form-select:focus,
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple,
.k-input:focus-within,
.k-picker:focus-within,
.k-combobox:focus-within,
.k-dropdownlist:focus-within,
.k-multiselect:focus-within,
.k-numerictextbox:focus-within {
    border-color: rgba(var(--afra-accent-rgb), 0.56) !important;
    box-shadow: var(--afra-focus) !important;
}

.select2-dropdown,
.select2-container--default .select2-results > .select2-results__options,
.select2-container--default .select2-selection--single .select2-selection__rendered,
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    color: var(--afra-text) !important;
}

.select2-dropdown,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    border-color: var(--afra-border) !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: rgba(15, 139, 141, 0.10) !important;
    color: var(--afra-text) !important;
}

.k-grid,
.k-table,
.k-treeview,
.k-listview,
.k-panelbar,
.k-calendar,
.k-scheduler,
.k-editor {
    background: transparent !important;
    border-color: var(--afra-border) !important;
}

.k-grid-header,
.k-table-thead,
.k-grid .k-grouping-header,
.k-pager-wrap,
.k-calendar-header,
.k-list-content,
.k-menu-popup {
    background: var(--afra-surface-2) !important;
    border-color: var(--afra-border) !important;
}

.k-table-th,
.k-grid-header .k-header,
.k-column-title,
.k-link,
.k-pager-info,
.k-window-title,
.k-dialog-title {
    color: var(--afra-text) !important;
}

.k-grid td,
.k-grid th,
.k-table-td,
.k-table-th,
.k-list-item,
.k-treeview .k-item {
    border-color: rgba(22, 48, 66, 0.08) !important;
}

.k-hover,
.k-state-hover,
.k-list-item:hover,
.k-treeview .k-item:hover > div,
.k-calendar .k-link:hover {
    background: rgba(15, 139, 141, 0.08) !important;
    color: var(--afra-text) !important;
}

.k-list-item.k-selected,
.k-selected.k-list-item,
.k-calendar .k-selected .k-link,
.k-grid tr.k-selected,
.k-grid tr.k-selected td,
.k-grid .k-selected {
    background: linear-gradient(135deg, rgba(15, 139, 141, 0.18), rgba(29, 111, 216, 0.15)) !important;
    color: var(--afra-text) !important;
}

.ag-root-wrapper,
.ag-header,
.ag-floating-filter,
.ag-paging-panel,
.ag-menu,
.ag-picker-field-wrapper,
.ag-popup {
    background: var(--afra-surface) !important;
    border-color: var(--afra-border) !important;
    color: var(--afra-text) !important;
}

.ag-header,
.ag-floating-filter {
    background: var(--afra-surface-2) !important;
}

.ag-theme-material .ag-row,
.ag-row.ag-row-odd.ag-row-level-0.ag-row-position-absolute,
.ag-row.ag-row-even.ag-row-level-0.ag-row-position-absolute {
    background: rgba(255, 255, 255, 0.92) !important;
    border-color: rgba(22, 48, 66, 0.08) !important;
}

.ag-row-hover::before {
    box-shadow: 0 16px 30px rgba(16, 38, 58, 0.08) !important;
}

.ag-row-selected::before {
    background: linear-gradient(135deg, rgba(15, 139, 141, 0.92), rgba(29, 111, 216, 0.82)) !important;
}

.ag-row-selected .ag-cell,
.ag-row-selected a {
    color: #ffffff !important;
}

.table {
    background: transparent !important;
}

.table thead th,
.table-light th,
.table-light td {
    background: var(--afra-surface-2) !important;
    color: var(--afra-text) !important;
    border-color: var(--afra-border) !important;
}

.table > :not(caption) > * > * {
    border-color: rgba(22, 48, 66, 0.07) !important;
}

.nav-pills .nav-link,
.nav-tabs .nav-link {
    color: var(--afra-text-soft) !important;
    border-radius: 14px !important;
}

.nav-pills .nav-link.active,
.nav-tabs .nav-link.active,
.nav-pills .show > .nav-link {
    background: linear-gradient(135deg, rgba(15, 139, 141, 0.14), rgba(29, 111, 216, 0.12)) !important;
    color: var(--afra-text) !important;
    box-shadow: inset 0 0 0 1px rgba(var(--afra-accent-rgb), 0.16);
}

.alert-info {
    background: rgba(29, 111, 216, 0.10) !important;
    border-color: rgba(29, 111, 216, 0.16) !important;
    color: #214d7d !important;
}

.alert-warning {
    background: rgba(240, 163, 74, 0.14) !important;
    border-color: rgba(240, 163, 74, 0.18) !important;
    color: #855620 !important;
}
.modal-dialog:not(.modal-dialog-scrollable) .modal-header {
    padding-bottom: 5px;
}

.side-icon i {
    padding-top: 6px;
}

.cyan {
    background: #0057e9;
}

.modal-body.kanban-modal-body {
    padding: 5px;
    padding-top: 0px;
}

.alert-danger {
    background: rgb(243 56 56) !important;
    border-color: rgba(210, 66, 66, 0.22) !important;
    color: #ffffff !important;
}

.bg-red {
    background: #d24242 !important;
    border-color: rgba(210, 66, 66, 0.18) !important;
    color: #ffffff !important;
}

.badge,
.badge.bg-success,
.badge.bg-info,
.badge.bg-warning,
.badge.bg-danger {
    border-radius: 999px;
}

.folderHeader,
.flowstepname {
    background: linear-gradient(135deg, var(--afra-accent), var(--afra-accent-2)) !important;
    color: #ffffff !important;
}

.folderTreeContainer,
.folderviewcontainer {
    background: rgba(255, 255, 255, 0.92) !important;
}

.folderlist a,
.foldertext,
.file-manager-menu li a.active,
.file-manager-menu li a {
    color: var(--afra-text) !important;
}

.foldertext.selected,
.foldertext:hover,
.expandable:hover::before {
    color: var(--afra-accent) !important;
}

.file-manager-menu a.active {
    background: linear-gradient(135deg, rgba(15, 139, 141, 0.12), rgba(29, 111, 216, 0.10)) !important;
    box-shadow: inset 0 0 0 1px rgba(var(--afra-accent-rgb), 0.12);
}

.file-manager-menu a.active:after {
    box-shadow: 0 25px 0 0 rgba(255, 255, 255, 0.94) !important;
}

.file-manager-menu a.active:before {
    box-shadow: 0 -25px 0 0 rgba(255, 255, 255, 0.94) !important;
}

.flowblock {
    background: rgba(255, 255, 255, 0.92) !important;
    border-color: rgba(var(--afra-accent-rgb), 0.34) !important;
    border-radius: 18px !important;
    box-shadow: var(--afra-shadow-sm);
}

.flowstatus {
    background: rgba(15, 139, 141, 0.08) !important;
    color: var(--afra-text) !important;
}

.tasks-list {
    background: #dee2e6;
}

.jobmark {
    color: rgba(29, 111, 216, 0.34) !important;
}

.AI-Message {
    background: rgba(255, 255, 255, 0.88) !important;
    border: 1px solid rgba(22, 48, 66, 0.08) !important;
    color: var(--afra-text) !important;
}

#chatToggle {
    box-shadow: 0 14px 28px rgba(16, 38, 58, 0.18) !important;
}

#chatBox {
    border-color: rgba(255, 255, 255, 0.28) !important;
    box-shadow: var(--afra-shadow-lg) !important;
}

.chat-header {
    background: linear-gradient(135deg, #0f8b8d, #1d6fd8) !important;
}

#chatMessages {
    background: linear-gradient(180deg, #f8fbfd 0%, #eef4f8 100%) !important;
}

.chat-footer {
    background: rgba(255, 255, 255, 0.94) !important;
}

#chatInput,
#chatImage {
    border-color: rgba(var(--afra-accent-rgb), 0.18) !important;
}

#chatInput:focus {
    border-color: rgba(var(--afra-accent-rgb), 0.52) !important;
    box-shadow: var(--afra-focus) !important;
}

#voiceBtn {
    background: linear-gradient(135deg, #f0a34a, #d98534) !important;
}

.send-btn {
    background: linear-gradient(135deg, #0f8b8d, #1d6fd8) !important;
}

.signin-shell,
.two-step-shell {
    position: relative;
}

.signin-card,
.two-step-card {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: var(--afra-shadow-lg) !important;
}

.signin-hero,
.two-step-cover {
    background: linear-gradient(160deg, #10263a 0%, #0f8b8d 52%, #1d6fd8 100%) !important;
}

.signin-kicker,
.signin-hero p,
.signin-update-date,
.two-step-cover p {
    color: rgba(236, 247, 252, 0.82) !important;
}

.signin-highlight,
.signin-updates,
.two-step-point {
    background: rgba(255, 255, 255, 0.10) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.signin-form-panel,
.two-step-form,
.signin-footnote {
    background: transparent !important;
}

.signin-form-panel h2,
.two-step-form h5 {
    color: var(--afra-text) !important;
}

.signin-link-btn,
.support-list a {
    color: var(--afra-accent) !important;
}

.signin-form .form-control,
.two-step-form .form-control {
    background: rgba(248, 251, 253, 0.98) !important;
    border-color: var(--afra-border-strong) !important;
}

.signin-form .form-control:focus,
.two-step-form .form-control:focus {
    border-color: rgba(var(--afra-accent-rgb), 0.56) !important;
    box-shadow: var(--afra-focus) !important;
}

.footer,
.footercontainer .footer {
    background: linear-gradient(135deg, #153247, #1a435d) !important;
    color: rgba(240, 248, 252, 0.94) !important;
}

.area .circles li {
    background: rgba(15, 139, 141, 0.08) !important;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(15, 139, 141, 0.56), rgba(29, 111, 216, 0.56));
}

::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 4px rgba(16, 38, 58, 0.08);
    background: rgba(255, 255, 255, 0.32);
}

@media (max-width: 767.98px) {
    .container-fluid.app-container::before {
        border-radius: 20px;
    }

    #page-topbar .layout-width {
        background: rgba(255, 255, 255, 0.92) !important;
    }

    .page-content {
        background: transparent !important;
    }

    .app-menu.navbar-menu {
        border-radius: 0 22px 22px 0 !important;
    }
}

.card-title.text-light {
    color: #ffffff !important;
}

/* ── Smart Filter Panel ─────────────────────────────────────────── */
.smart-filter-panel { display: none; padding: 16px 20px; background: #f8fafc; border-radius: 16px; border: 1px solid rgba(148,163,184,.2); gap: 14px; }
.smart-filter-panel.open { display: grid; }
.smart-filter-row { display: grid; grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); gap: 12px; align-items: end; }
.smart-filter-group > label { display: block; font-size: 12px; font-weight: 700; color: #64748b; margin-bottom: 5px; }
.smart-filter-group input:not([type="checkbox"]):not([type="radio"]), .smart-filter-group select { width: 100%; padding: 8px 11px; border-radius: 10px; border: 1px solid rgba(148,163,184,.3); font-size: 13px; background: #fff; height: 38px; }
.smart-filter-group > label > input[type="checkbox"],
.smart-filter-group > label > input[type="radio"] {
    width: 16px;
    height: 16px;
    margin: 0 0 0 7px;
    padding: 0;
    border-radius: 4px;
    vertical-align: -3px;
    accent-color: var(--afra-accent);
}
.smart-filter-group .input-group { margin-bottom: 0 !important; flex-wrap: nowrap; }
.smart-filter-group .input-group > .form-control { width: 1%; flex: 1 1 auto; }
.smart-filter-group .input-group-text { height: 38px; }
.smart-filter-footer { display: flex; gap: 8px; justify-content: flex-end; padding-top: 4px; }
.btn-filter-toggle.active { background: rgba(29, 111, 216, 0.12) !important; color: var(--afra-accent-2) !important; border-color: rgba(29, 111, 216, 0.35) !important; }
.btn-excel { color: #16a34a; border-color: #16a34a; background: #fff; }

/* ============================================================================
   TYPOGRAPHY & SPACING STANDARDIZATION  (final layer — single source of truth)
   ----------------------------------------------------------------------------
   This block intentionally lives last so it wins the cascade over the older,
   layered theme blocks above. It standardizes the type scale, control sizing,
   and spacing rhythm across the whole app. Colors / brand are NOT touched here.
   When in doubt about a font-size or spacing value, set it HERE, not inline.
   ============================================================================ */
:root {
    --afra-fs-micro: 11px;   /* badges, codes, pill labels */
    --afra-fs-sm: 13px;      /* form labels, controls, secondary text */
    --afra-fs-base: 14px;    /* body copy */
    --afra-fs-md: 15px;      /* list/card titles */
    --afra-fs-lg: 16px;      /* section / card headers (h5) */
    --afra-lh: 1.6;          /* comfortable reading line-height */
    --afra-lh-tight: 1.35;   /* headings */
    --afra-sp-1: 4px;
    --afra-sp-2: 8px;
    --afra-sp-3: 12px;
    --afra-sp-4: 16px;
    --afra-sp-5: 24px;
}

/* --- Base rhythm ---------------------------------------------------------- */
body {
    font-size: var(--afra-fs-base);
    line-height: var(--afra-lh);
}

p {
    font-size: var(--afra-fs-base);
    line-height: var(--afra-lh);
    margin-bottom: var(--afra-sp-3);
}

small, .small {
    font-size: var(--afra-fs-sm);
}

b, strong {
    font-size: inherit !important;   /* replaces the old b{font-size:105%} */
    font-weight: 700;
}

/* --- Heading scale (consistent sizes + weight; tames 800/900) ------------- */
h1, .h1 { font-size: 24px; }
h2, .h2 { font-size: 20px; }
h3, .h3 { font-size: 18px; }
h4, .h4 { font-size: var(--afra-fs-lg); }
h5, .h5 { font-size: var(--afra-fs-lg); }
h6, .h6 { font-size: var(--afra-fs-base); }

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.card-title, .modal-title {
    font-weight: 700;
    line-height: var(--afra-lh-tight);
    margin-bottom: var(--afra-sp-2);
}

.card-header > h5,
.card-header .card-title {
    margin-bottom: 0;
}

/* --- Controls: one type size for buttons / inputs / labels ---------------- */
.btn,
button,
.k-button,
.k-button .k-button-text,
.form-control,
.form-select,
.k-input-inner,
.select2-container .select2-selection__rendered,
.select2 span,
label,
.form-label,
.list-view-toggle {
    font-size: var(--afra-fs-sm) !important;
    line-height: 1.5;
}

.btn,
.k-button {
    padding: 6px 14px;
}

.btn-sm,
.btn-group-sm > .btn {
    padding: 4px 10px;
    font-size: 12px !important;
}

label,
.form-label {
    margin-bottom: var(--afra-sp-1);
    font-weight: 600;
}

/* --- Badges / pills / codes: readable, not cramped ------------------------ */
.badge {
    font-size: var(--afra-fs-micro) !important;
    line-height: 1.4;
    padding: 4px 8px;
    font-weight: 600;
}

.list-filter {
    font-size: 12px !important;
    padding: 7px 13px;
}

.list-hub-kicker,
.list-card-code {
    font-size: 12px;
}

/* --- List-hub cards: align the micro-scale with the global scale ---------- */
.list-hub-hero h2 { font-size: 20px; }
.list-hub-hero p { font-size: var(--afra-fs-base); line-height: var(--afra-lh); }
.list-hub-stat span { font-size: 24px; }
.list-card h3,
.list-card-top h3 { font-size: var(--afra-fs-md); }
.list-card-grid label,
.list-card-grid strong,
.list-card-summary { font-size: 12px; }

/* Row (list) view: a little more vertical breathing room (was cramped) */
:is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card {
    padding: 12px 16px;
}
:is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-top h3 { font-size: var(--afra-fs-sm); }

/* --- Dense tables: de-cramp cell padding ---------------------------------- */
.no-mg td {
    padding: 6px 8px !important;
    line-height: 1.5;
    font-size: var(--afra-fs-sm);
}

.table > :not(caption) > * > * {
    padding-top: var(--afra-sp-2);
    padding-bottom: var(--afra-sp-2);
}
.btn-excel:hover { background: #dcfce7; color: #15803d; border-color: #15803d; }
/* ============================================================================
   ENTERPRISE POLISH LAYER  (final layer — motion, forms, empty states, depth)
   ----------------------------------------------------------------------------
   Shared vocabulary used by ALL modules. RTL-first (logical properties),
   token-driven, and guarded by prefers-reduced-motion. New views should
   compose these classes instead of writing inline styles:
     form pages  : .form-hub > .form-section > .form-grid + .afra-actionbar
     detail pages: .detail-kv
     dashboards  : .afra-widget family
     empty/load  : .afra-empty / .afra-skeleton*
   ============================================================================ */
:root {
    --afra-radius-sm: 10px;
    --afra-radius: 14px;
    --afra-radius-lg: 18px;
    --afra-control-h: 38px; /* one height for every form control in a row */
    --afra-ease: cubic-bezier(0.2, 0.7, 0.3, 1);
    --z-popup: 100050;   /* select2 dropdowns, datepicker popovers */
    --z-overlay: 100100; /* full-screen loading overlay */
    --z-toast: 100200;   /* toasts / alerts — always on top */
}

/* --- Motion primitives ----------------------------------------------------- */
@keyframes afra-page-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

@keyframes afra-shimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}

@keyframes afra-pop-in {
    from { opacity: 0; transform: translateY(10px) scale(0.985); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
    /* Every page eases in once — makes navigation feel deliberate */
    .page-content > .container-fluid {
        animation: afra-page-in 0.28s var(--afra-ease) both;
    }

    /* List-hub cards stagger in (first 12 only; later infinite-scroll
       batches just fade individually with no delay) */
    .list-grid > .list-card { animation: afra-page-in 0.32s var(--afra-ease) both; }
    .list-grid > .list-card:nth-child(1)  { animation-delay: 0.03s; }
    .list-grid > .list-card:nth-child(2)  { animation-delay: 0.06s; }
    .list-grid > .list-card:nth-child(3)  { animation-delay: 0.09s; }
    .list-grid > .list-card:nth-child(4)  { animation-delay: 0.12s; }
    .list-grid > .list-card:nth-child(5)  { animation-delay: 0.15s; }
    .list-grid > .list-card:nth-child(6)  { animation-delay: 0.18s; }
    .list-grid > .list-card:nth-child(7)  { animation-delay: 0.21s; }
    .list-grid > .list-card:nth-child(8)  { animation-delay: 0.24s; }
    .list-grid > .list-card:nth-child(9)  { animation-delay: 0.27s; }
    .list-grid > .list-card:nth-child(10) { animation-delay: 0.30s; }
    .list-grid > .list-card:nth-child(11) { animation-delay: 0.33s; }
    .list-grid > .list-card:nth-child(12) { animation-delay: 0.36s; }

    /* Modal entrance: settle up + scale instead of Bootstrap's drop-down */
    .modal.fade .modal-dialog {
        transform: translateY(14px) scale(0.985);
        transition: transform 0.22s var(--afra-ease);
    }
    .modal.show .modal-dialog { transform: none; }

    .dropdown-menu.show { animation: afra-pop-in 0.16s var(--afra-ease) both; }
}

/* --- Interactive elevation (works with the existing shadow tokens) --------- */
.list-card,
.afra-widget {
    transition: transform 0.18s var(--afra-ease), box-shadow 0.18s var(--afra-ease), border-color 0.18s var(--afra-ease);
}

.list-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--afra-shadow-sm);
    border-color: rgba(var(--afra-accent-rgb), 0.28);
}

/* --- Keyboard focus: visible ring that survives overflow:hidden ------------ */
:focus-visible {
    outline: 2px solid rgba(var(--afra-accent-rgb), 0.6);
    outline-offset: 2px;
}

.list-hub-search input:focus {
    outline: none;
    border-color: rgba(var(--afra-accent-rgb), 0.5);
    box-shadow: var(--afra-focus);
}

/* --- Skeleton loading system ------------------------------------------------
   Drop 3-6 .afra-skeleton-card into a .list-grid (or lines into any box)
   while fetching; remove on data arrival. Replaces spinner-only loading. */
.afra-skeleton {
    background: linear-gradient(90deg, var(--afra-surface-2) 25%, #ffffff 37%, var(--afra-surface-2) 63%);
    background-size: 400% 100%;
    animation: afra-shimmer 1.4s ease infinite;
    border-radius: var(--afra-radius-sm);
}

.afra-skeleton-line {
    height: 12px;
    margin-bottom: 10px;
    background: linear-gradient(90deg, var(--afra-surface-2) 25%, #ffffff 37%, var(--afra-surface-2) 63%);
    background-size: 400% 100%;
    animation: afra-shimmer 1.4s ease infinite;
    border-radius: 6px;
}

.afra-skeleton-line:last-child { margin-bottom: 0; width: 60%; }

.afra-skeleton-card {
    min-height: 150px;
    padding: 18px;
    border: 1px solid var(--afra-border);
    border-radius: var(--afra-radius-lg);
    background: var(--afra-surface-strong);
}

@media (prefers-reduced-motion: reduce) {
    .afra-skeleton, .afra-skeleton-line { animation: none; }
}

/* --- Form-page vocabulary (the missing sibling of .list-hub) ---------------
   <div class="form-hub">
     <div class="form-hub-hero">…kicker/h2/p…</div>
     <div class="form-section">
       <h5 class="form-section-title">…</h5>
       <div class="form-grid">…fields…</div>
     </div>
     <div class="afra-actionbar">…buttons…</div>
   </div>                                                                     */
.form-hub {
    display: grid;
    gap: 18px;
}

.form-hub-hero {
    padding: 20px 24px;
    border-radius: var(--afra-radius-lg);
    background: linear-gradient(135deg, rgba(15, 139, 141, 0.08) 0%, #ffffff 52%, var(--afra-bg-soft) 100%);
    border: 1px solid rgba(15, 139, 141, 0.14);
}

.form-hub-hero h2 { margin: 0 0 6px; font-size: 20px; }
.form-hub-hero p  { margin: 0; color: var(--afra-text-soft) !important; }

.form-section {
    background: var(--afra-surface-strong);
    border: 1px solid var(--afra-border);
    border-radius: var(--afra-radius-lg);
    padding: var(--afra-sp-5);
}

.form-section-title {
    font-size: var(--afra-fs-lg);
    font-weight: 700;
    margin-bottom: var(--afra-sp-4);
    padding-inline-start: var(--afra-sp-3);
    border-bottom: 1px solid #183146;
    padding: 10px;
    display: inline-block;
    background: #30495c;
    color: white !important;
    border-radius: 10px;
    width: 100%;
    text-align: center;
}

.form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--afra-sp-4);
    align-items: start;
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.form-grid .full-row { grid-column: 1 / -1; }

/* Sticky action bar: keeps ثبت/انصراف visible on long forms */
.afra-actionbar {
    margin-top:20px;
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    gap: var(--afra-sp-2);
    justify-content: flex-end;
    align-items: center;
    padding: var(--afra-sp-3) var(--afra-sp-4);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--afra-border);
    border-radius: var(--afra-radius);
    box-shadow: 0 -8px 24px rgba(16, 38, 58, 0.06);
}

/* --- Uniform control height -------------------------------------------------
   The Shared/Custom inputs render as a mix of Kendo widgets and plain
   .form-controls, each with its own default height (the ComboBox in particular
   renders taller than a TextBox, and the date/time inputs were pinned to 32px).
   Pin them all to one height so every field in a form row lines up.          */
/* .k-input-md / .k-picker-md are the size classes on every modern Kendo form
   widget (TextBox, ComboBox, NumericTextBox, DropDownList, Date/TimePicker…),
   so they're the one reliable hook. Exclude the variable-height widgets. */
.k-input-md:not(.k-textarea):not(.k-multiselect),
.k-picker-md,
.custom-field .form-control,
.custom-field .input-group-text {
    height: var(--afra-control-h) !important;
    min-height: var(--afra-control-h) !important;
}

/* The inner <input> must fill the pinned height so the caret button and text
   stay vertically centred (a fixed inner height would fight the flex layout
   and re-introduce the mismatch). */
.k-input-md:not(.k-multiselect) .k-input-inner,
.k-picker-md .k-input-inner {
    height: 100% !important;
    align-self: stretch;
}

/* MultiSelect grows with its chips — only guarantee it starts at the row height. */
.k-multiselect.k-input-md {
    height: auto !important;
    min-height: var(--afra-control-h) !important;
}

/* --- Inline "add new" button ------------------------------------------------
   Pairs with a select/field (e.g. the Client picker's "مشتری جدید" button).
   Replaces the old cramped `btn btn-secondary` + inline padding hacks with a
   square control sized to match the 36px field it sits beside.              */
.btn-inline-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    padding: 0 !important;
    margin-inline-start: 8px;
    border: none !important;
    border-radius: var(--afra-radius-sm) !important;
    color: #fff !important;
    font-size: 20px !important;
    line-height: 1;
    background: linear-gradient(135deg, var(--afra-accent), var(--afra-accent-2)) !important;
    box-shadow: 0 2px 6px rgba(15, 139, 141, 0.28);
    transition: transform 0.15s var(--afra-ease), box-shadow 0.15s var(--afra-ease), filter 0.15s var(--afra-ease);
}

.btn-inline-add .bi { font-size: 20px !important; line-height: 1; }

.btn-inline-add:hover {
    color: #fff !important;
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(15, 139, 141, 0.34);
}

.btn-inline-add:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(15, 139, 141, 0.28);
}

.btn-inline-add:focus-visible {
    outline: none;
    box-shadow: var(--afra-focus), 0 2px 6px rgba(15, 139, 141, 0.28);
}

/* --- Detail-page vocabulary -------------------------------------------------
   Key/value grid for record screens — stops the improvised .no-mg tables.  */
.detail-kv {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--afra-sp-4) var(--afra-sp-4);
}

    .detail-kv > div {
        display: flex;
        align-items: center;
        min-width: 0;
    }

    .detail-kv label {
        display: block;
        margin-bottom: 2px;
        font-size: var(--afra-fs-micro);
        font-weight: 600;
        color: #1d384e !important;
        background: hsl(207deg 47% 20% / 10%);
        padding: 4px 8px;
        border-radius: 20px;
        margin-right: 0;
    }

.detail-kv strong {
    font-size: var(--afra-fs-sm);
    font-weight: 700;
    word-break: break-word;
}

.detail-kv span {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* Keep compact list cards at their established density while sharing the
   detail-kv label/value vocabulary used by record pages. */
.list-card-grid.detail-kv {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

:is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-grid.detail-kv {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 14px;
}

/* --- Empty states -----------------------------------------------------------
   <div class="afra-empty"><i class="ri-inbox-2-line"></i><h6>…</h6><p>…</p></div> */
.afra-empty {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 40px 24px;
    text-align: center;
    border: 1px dashed var(--afra-border-strong);
    border-radius: var(--afra-radius-lg);
    background: var(--afra-bg-soft);
}

.afra-empty i {
    font-size: 40px;
    line-height: 1;
    color: rgba(var(--afra-accent-rgb), 0.4);
}

.afra-empty h6 { margin: 0; font-size: var(--afra-fs-md); }
.afra-empty p  { margin: 0; font-size: var(--afra-fs-sm); color: var(--afra-text-soft) !important; }

.afra-empty--error {
    border-color: rgba(210, 66, 66, 0.35);
    background: rgba(210, 66, 66, 0.05);
}

.afra-empty--error i { color: rgba(210, 66, 66, 0.55); }

/* --- Dashboard widget vocabulary --------------------------------------------
   One chrome for the five hand-copied dashboard widgets:
   <div class="card afra-widget">
     <div class="afra-widget-header">
       <span class="afra-widget-icon">…svg/icon…</span>
       <h5>…title…</h5>
       <div class="afra-widget-tools">…filter select…</div>
     </div>
     <div class="afra-widget-body">…rows…</div>
   </div>                                                                     */
.afra-widget-header {
    display: flex;
    align-items: center;
    gap: var(--afra-sp-3);
    padding: 14px 18px;
    background: var(--afra-surface-strong) !important;
    border-bottom: 1px solid var(--afra-border);
}

.afra-widget-header h5 {
    flex: 1;
    margin: 0;
    font-size: var(--afra-fs-md);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.afra-widget-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(15, 139, 141, 0.14), rgba(29, 111, 216, 0.12));
    color: var(--afra-accent);
    font-size: 18px;
}

.afra-widget-tools {
    display: flex;
    align-items: center;
    gap: var(--afra-sp-2);
}

.afra-widget-body {
    max-height: 360px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.afra-widget-row {
    display: flex;
    align-items: center;
    gap: var(--afra-sp-3);
    padding: 10px 18px;
    border-bottom: 1px solid var(--afra-border);
    transition: background 0.15s ease;
}

.afra-widget-row:last-child { border-bottom: 0; }

.afra-widget-row.is-clickable { cursor: pointer; }
.afra-widget-row.is-clickable:hover { background: var(--afra-surface-2); }

.afra-widget-row.is-read { opacity: 0.55; }

.afra-widget-date {
    flex: 0 0 auto;
    font-size: var(--afra-fs-micro);
    color: var(--afra-text-soft);
    white-space: nowrap;
}

/* --- Toast vocabulary (used by AfraUx.toast / #liveAlertPlaceholder) ------- */
@keyframes afra-toast-in {
    from { opacity: 0; transform: translateY(-10px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}

.afra-toast,
#liveAlertPlaceholder .alert {
    border-inline-start: 3px solid var(--afra-accent);
    border-radius: var(--afra-radius-sm);
    box-shadow: var(--afra-shadow-sm);
    animation: afra-toast-in 0.25s var(--afra-ease) both;
}

#liveAlertPlaceholder .alert-danger  { border-inline-start-color: #d24242; }
#liveAlertPlaceholder .alert-warning { border-inline-start-color: var(--afra-highlight); }
#liveAlertPlaceholder .alert-info    { border-inline-start-color: var(--afra-accent-2); }

@media (prefers-reduced-motion: reduce) {
    .afra-toast, #liveAlertPlaceholder .alert { animation: none; }
}

/* --- Post-rollout additions requested by module implementations ------------ */
/* Status tones for list-card badges (markup already emits tone-*) */
.list-card-badge.tone-ok      { background: rgba(19, 143, 119, 0.14); color: #0e6e5c; }
.list-card-badge.tone-warning { background: rgba(240, 163, 74, 0.16); color: #855620; }
.list-card-badge.tone-danger  { background: rgba(210, 66, 66, 0.14);  color: #8c2f2f; }

/* Premium hub row layout ----------------------------------------------------
   List mode has four stable zones: identity, metadata, summary and actions.
   Explicit placement avoids the compressed auto-flow row that mixed labels,
   values, statuses and buttons into one visual line. Card mode is unchanged. */
@media (min-width: 992px) {
    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) {
        gap: 10px;
    }

    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card {
        position: relative;
        grid-auto-flow: row;
        grid-template-columns: minmax(230px, 1fr) minmax(0, 1.65fr);
        grid-template-rows: auto auto auto;
        align-items: stretch;
        gap: 12px 20px;
        min-width: 0;
        padding: 16px 18px;
        overflow: hidden;
        border: 1px solid rgba(100, 116, 139, .18);
        border-radius: 14px;
        background: var(--afra-surface, #fff);
        box-shadow: 0 5px 16px rgba(15, 23, 42, .045);
        transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
    }

    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card::before {
        content: "";
        position: absolute;
        inset-block: 14px;
        inset-inline-start: 0;
        width: 3px;
        border-radius: 0 4px 4px 0;
    /*    background: var(--afra-accent);*/
        opacity: .78;
    }

    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card:hover,
    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card:focus-within {
        z-index: 1;
        transform: translateY(-1px);
        border-color: rgba(var(--afra-accent-rgb), .36);
        box-shadow: 0 11px 28px rgba(15, 23, 42, .085);
    }

    /* Identity: number/title first, status beneath it. */
    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-top {
        grid-column: 1;
        grid-row: 1;
        display: flex;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 9px;
        min-width: 0;
        padding-inline-end: 18px;
        border-inline-end: 1px solid rgba(148, 163, 184, .18);
    }

    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-top > div {
        min-width: 0;
        flex: 1 1 auto;
    }

    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-code {
        margin: 0 0 5px;
        color: var(--afra-accent-2);
        font-size: 12px;
        font-weight: 850;
        line-height: 1.5;
    }

    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-code small {
        margin-inline-start: 5px;
        font-weight: 650;
    }

    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-top h3 {
        display: -webkit-box;
        overflow: hidden;
        margin: 0;
        color: var(--afra-text, #172326);
        font-size: 14px;
        font-weight: 850;
        line-height: 1.6;
        overflow-wrap: anywhere;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-badge {
        flex: 0 0 auto;
        min-height: 27px;
        padding: 5px 9px;
        font-size: 12px;
        line-height: 1.35;
        white-space: nowrap;
    }

    /* Metadata: calm label/value columns instead of many competing pills. */
    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-grid,
    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-grid.detail-kv {
        grid-column: 2;
        grid-row: 1;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        align-items: start;
        gap: 0;
        min-width: 0;
        padding: 1px 0;
    }

    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-grid > div,
    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-grid.detail-kv > div {
        display: block;
        min-width: 0;
        padding: 3px 14px;
        border-inline-start: 1px solid rgba(148, 163, 184, .16);
    }

    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-grid > div:first-child {
        padding-inline-start: 0;
        border-inline-start: 0;
    }

    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-grid label,
    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-grid.detail-kv label {
        display: block;
        width: auto;
        margin: 0 0 4px;
        padding: 0;
        border-radius: 0;
        background: transparent;
        color: var(--afra-text-soft, #64748b) !important;
        font-size: 11px;
        font-weight: 700;
        line-height: 1.4;
    }

    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-grid label::after {
        content: none;
    }

    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-grid strong,
    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-grid.detail-kv strong {
        color: var(--afra-text, #172326);
        font-size: 12px;
        font-weight: 800;
        line-height: 1.55;
        overflow-wrap: anywhere;
    }

    /* Summary reads as secondary chips and stays visually quieter. */
    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-summary {
        grid-column: 1 / -1;
        grid-row: 2;
        display: flex;
        align-items: center;
        gap: 7px;
        min-width: 0;
        padding-top: 10px;
        border-top: 1px solid rgba(148, 163, 184, .14);
        color: var(--afra-text-soft, #64748b);
        font-size: 12px;
    }

    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-summary > span {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        max-width: 100%;
        min-height: 27px;
        padding: 4px 9px;
        border-radius: 999px;
        background: rgba(148, 163, 184, .09);
        line-height: 1.35;
        overflow-wrap: anywhere;
    }

    /* Razor conditionals can leave whitespace in an otherwise empty summary. */
    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-summary:not(:has(> *)) {
        display: none;
    }

    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-summary i {
        color: currentColor;
        font-size: 14px;
    }

    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-warning {
        grid-column: 1 / -1;
        padding: 8px 11px;
        border-radius: 9px;
        font-size: 11px;
    }

    /* Actions form a predictable footer; primary action is visually dominant. */
    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-actions {
        grid-column: 1 / -1;
        grid-row: 3;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 7px;
        min-width: 0;
        padding-top: 2px;
    }

    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-actions .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 34px;
        padding: 6px 12px;
        border-radius: 9px;
        font-size: 12px;
        font-weight: 750;
        line-height: 1.2;
        white-space: nowrap;
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-grid,
    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-grid.detail-kv {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 10px;
    }
}

@media (min-width: 1400px) {
    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card {
        grid-template-columns: minmax(240px, 1.05fr) minmax(420px, 2fr) minmax(230px, auto);
        grid-template-rows: auto auto;
        gap: 10px 22px;
        padding: 16px 20px;
    }

    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-top {
        grid-column: 1;
        grid-row: 1 / span 2;
        align-content: flex-start;
        flex-direction: column;
    }

    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-grid,
    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-grid.detail-kv {
        grid-column: 2;
        grid-row: 1;
    }

    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-summary {
        grid-column: 2;
        grid-row: 2;
        padding-top: 8px;
    }

    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-actions {
        grid-column: 3;
        grid-row: 1 / span 2;
        display: grid;
        grid-template-columns: repeat(2, minmax(88px, 1fr));
        align-content: center;
        align-items: stretch;
        padding: 0 20px 0 0;
        border-inline-start: 1px solid rgba(148, 163, 184, .18);
    }

    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-actions .btn:first-child {
        grid-column: 1 / -1;
    }

    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-actions:has(> .btn:nth-child(4)) {
        grid-template-columns: repeat(3, minmax(68px, 1fr));
    }

    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-actions > .btn:nth-child(2):last-child {
        grid-column: 1 / -1;
    }

    :is(.list-grid.is-rows, html.afra-list-rows .list-grid) .list-card-warning {
        grid-column: 1 / -1;
    }
}

/* Viewport-height widget body for the main dashboard widget */
.afra-widget-body--tall { max-height: calc(100vh - 225px); }

/* Compact empty state for sidebars / modal bodies */
.afra-empty--sm { padding: 20px 14px; gap: 4px; }
.afra-empty--sm i { font-size: 26px; }

/* Generic hover lift for interactive cards outside .list-card */
.card-hover-lift { transition: transform 0.18s var(--afra-ease), box-shadow 0.18s var(--afra-ease); }
.card-hover-lift:hover { transform: translateY(-2px); box-shadow: var(--afra-shadow-sm); }

/* Fixed centered toast placement (procurement pages use this pattern) */
.afra-toast--fixed {
    position: fixed;
    top: 80px;
    inset-inline-start: 50%;
    transform: translateX(50%);
    z-index: var(--z-toast);
    min-width: 260px;
    max-width: min(560px, calc(100vw - 2rem));
}

/* Full-width item inside a detail grid (mirrors .form-grid .full-row) */
.detail-kv .full-row { grid-column: 1 / -1; }

/* --- Activity timeline (تعاملات) — shared by client & project pages -------- */
.timeline-hub .list-hub-filters { flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.timeline-body { min-height: 120px; }
.timeline-body .list-loader { padding: 24px; text-align: center; color: #64748b; }

.afra-timeline { list-style: none; margin: 0; padding: 4px 6px 0 0; position: relative; }
.afra-timeline::before { content: ""; position: absolute; right: 19px; top: 8px; bottom: 8px; width: 2px; background: #e6edf3; }
.afra-timeline .tl-item { position: relative; display: flex; gap: 12px; padding: 0 0 16px; }
.afra-timeline .tl-dot { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; z-index: 1; box-shadow: 0 0 0 4px #fff; background: #94a3b8; }
.afra-timeline .tl-card { flex: 1 1 auto; background: #fff; border: 1px solid #e6edf3; border-radius: 12px; padding: 10px 14px; box-shadow: 0 1px 2px rgba(16,32,45,.04); }
.afra-timeline .tl-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.afra-timeline .tl-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; color: #163042; }
.afra-timeline .tl-title a { color: #1d6fd8; text-decoration: none; }
.afra-timeline .tl-title a:hover { text-decoration: underline; }
.afra-timeline .tl-title .badge { font-size: 11px; font-weight: 600; }
.afra-timeline .tl-when { flex: 0 0 auto; text-align: left; color: #64748b; font-size: 12px; white-space: nowrap; }
.afra-timeline .tl-when .tl-time { display: inline-block; margin-inline-start: 6px; color: #94a3b8; }
.afra-timeline .tl-body { margin-top: 6px; color: #4a5b6b; font-size: 13px; line-height: 1.7; word-break: break-word; }
.afra-timeline .tl-actor { margin-top: 6px; color: #8493a0; font-size: 12px; }

.afra-timeline .tl-dot[data-kind="comment"] { background: #0f8b8d; }
.afra-timeline .tl-dot[data-kind="task"] { background: #1d6fd8; }
.afra-timeline .tl-dot[data-kind="project"] { background: #2563eb; }
.afra-timeline .tl-dot[data-kind="kanban"] { background: #7c3aed; }
.afra-timeline .tl-dot[data-kind="letter"] { background: #6366f1; }
.afra-timeline .tl-dot[data-kind="meeting"] { background: #8b5cf6; }
.afra-timeline .tl-dot[data-kind="preinvoice"] { background: #d97706; }
.afra-timeline .tl-dot[data-kind="paymentorder"] { background: #e11d48; }
.afra-timeline .tl-dot[data-kind="contract"] { background: #0d9488; }
.afra-timeline .tl-dot[data-kind="guarantee"] { background: #16a34a; }
.afra-timeline .tl-dot[data-kind="email"] { background: #0891b2; }

/* --- Sidebar navigation polish -------------------------------------------- */
.app-menu.navbar-menu {
    transition: box-shadow 0.22s var(--afra-ease), background-color 0.22s var(--afra-ease);
}

.app-menu.navbar-menu::after {
    content: "";
    position: absolute;
    top: 0;
    right: 18px;
    left: 18px;
    height: 2px;
    border-radius: 999px;
    pointer-events: none;
    opacity: 0;
    transform: scaleX(0.18);
    transform-origin: right center;
    background: linear-gradient(90deg, rgba(15, 139, 141, 0.15), rgba(29, 111, 216, 0.95), rgba(255, 255, 255, 0.55));
}

body.afra-sidebar-navigating .app-menu.navbar-menu::after {
    animation: afra-sidebar-progress 0.9s ease-in-out infinite;
}

.navbar-menu #navbar-nav {
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.app-menu.navbar-menu:not(.afra-sidebar-ready) #navbar-nav {
    opacity: 0.96;
}

.app-menu.navbar-menu.afra-sidebar-positioning #navbar-nav {
    visibility: hidden;
}

.app-menu.navbar-menu.afra-sidebar-positioned #navbar-nav {
    visibility: visible;
}

.app-menu.navbar-menu,
.app-menu.navbar-menu #scrollbar,
.app-menu.navbar-menu #navbar-nav,
.app-menu.navbar-menu .simplebar-content-wrapper,
.app-menu.navbar-menu .simplebar-mask,
.app-menu.navbar-menu .simplebar-offset,
.app-menu.navbar-menu .menu-dropdown {
    max-width: 100%;
    overflow-x: hidden !important;
}

.app-menu.navbar-menu .simplebar-content {
    max-width: 100%;
}

.navbar-menu #navbar-nav .nav-link,
.navbar-menu #navbar-nav .nav-link span {
    min-width: 0;
    max-width: 100%;
}

.navbar-menu #navbar-nav .nav-link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.navbar-menu #navbar-nav .nav-link {
    position: relative;
    overflow: hidden;
    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease !important;
}

.navbar-menu #navbar-nav .nav-link:hover {
    transform: translateX(-2px);
}

.navbar-menu #navbar-nav .nav-link.active,
.navbar-menu #navbar-nav .nav-link.is-navigating,
#navbar-nav .nav-link[data-bs-toggle=collapse][aria-expanded=true] {
    transform: translateX(-2px);
}

.navbar-menu #navbar-nav .nav-item.mm-active > .nav-link[data-bs-toggle="collapse"] {
    cursor: default;
}

.navbar-menu #navbar-nav .nav-sm .nav-link,
.navbar-menu #navbar-nav .menu-dropdown .nav-link,
.navbar-menu #navbar-nav .nav-sm .nav-link:hover,
.navbar-menu #navbar-nav .nav-sm .nav-link.active {
    padding-right: 0.75rem !important;
}

.navbar-menu #navbar-nav .nav-link.active::before,
.navbar-menu #navbar-nav .nav-link.is-navigating::before {
    content: "";
    position: absolute;
    inset-block: 9px;
    right: 0;
    width: 3px;
    border-radius: 999px 0 0 999px;
    background: #31c7b7;
    box-shadow: 0 0 14px rgba(49, 199, 183, 0.45);
}

.navbar-menu #navbar-nav .nav-link.is-navigating::after {
    content: "";
    position: absolute;
    left: 14px;
    top: 50%;
    width: 13px;
    height: 13px;
    margin-top: -6.5px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.32);
    border-top-color: #ffffff;
    animation: afra-sidebar-spin 0.7s linear infinite;
}

body.afra-sidebar-navigating .page-content {
    transition: opacity 0.18s ease, transform 0.18s ease;
    opacity: 0.985;
}

@keyframes afra-sidebar-progress {
    0% {
        opacity: 0.35;
        transform: scaleX(0.18);
    }
    50% {
        opacity: 1;
        transform: scaleX(1);
    }
    100% {
        opacity: 0.35;
        transform: scaleX(0.18);
    }
}

@keyframes afra-sidebar-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-menu.navbar-menu,
    .app-menu.navbar-menu::after,
    .navbar-menu #navbar-nav,
    .navbar-menu #navbar-nav .nav-link,
    body.afra-sidebar-navigating .page-content {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}
