/* CONFIG */
    input::-webkit-outer-spin-button,
    input::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    input[type=number] {
        -moz-appearance: textfield;
    }

    .nice-select {
        padding-left: 10px !important;
    }

    .universal-button {
        border: none;
        outline: none;
        background-color: #3F51B5;
        padding: 8px 16px;
        border-radius: 8px;
        color: #FFFFFF !important;
        text-decoration: none;
    }
    .universal-button.hollow {
        background-color: transparent;
        color: black !important;
        border: 1px solid #3F51B5;
    }
    .universal-button.green {
        padding: 0;
        width: 42px;
        height: 42px;
        background-color: #3abc3f;
    }
    .universal-button.red {
        padding: 0;
        width: 42px;
        height: 42px;
        background-color: #FF5252;
    }
    .universal-button.disabled {
        opacity: .3;
    }

    .page-title h1 {font-size: 18px;}
    .crumbs a {
        text-decoration: none;
        color: #2196F380;
    }
    .crumbs span.disabled {color: #BDBDBD;}

    .page-content-wrapper {
        min-height: 450px;
        margin-top: 24px;
        padding: 24px;
        border-radius: 12px;
        box-shadow: 0 4px 16px #00000012;
    }
    .page-content-wrapper.dynamic-height {
        min-height: unset;
    }

    .page-filters-select-wrapper {
        display: flex;
        flex-direction: column;
    }
    .filter-title {
        color: #808080;
        font-size: 10px;
        font-weight: 500;
    }
    .page-filters-checkbox-wrapper {
        display: flex;
        align-items: center;
        justify-content: center;
    }


    /* ig = Input Group */
        .ig-wrapper {
            margin-bottom: 19px;
        }

        .ig-title {
            font-size: 10px;
            font-weight: bold;
            color: #808080;
        }

        .ig-input {
            border: none;
            border-bottom: 1px solid #0000001A;
            outline: none;
            transition: border-color .3s;
        }

        .ig-input:focus {
            border-color: #0F75BC;
        }
    /* ig = Input Group */

    .form-title {padding-bottom: 25px;}
    .form-title h1 {
        font-size: 18px;
    }

    .neo-table-list-header h3 {
        font-size: 16px;
    }

    .neo-table {margin-top: 30px;}
    .neo-table-row span {
        font-size: 12px;
    }
    .neo-table-headers span {
        color: #808080;
        font-weight: bold;
    }
    .neo-table-row {
        height: 100% !important;
        min-height: 48px;
        border-bottom: 1px solid #0000001A;
    }

    .table-search {
        height: 40px;
        position: relative;
        border-radius: 4px;
        border: none;
        box-shadow: 0 2px 10px #0000001F;
        margin-right: 12px;
        padding: 0 12px 0 42px;
    }
    .search-icon {
        position: absolute;
        top: 46%;
        left: 15px;
        transform: translateY(-50%);
        z-index: 5;
    }

    button.context-button {
        position: relative;
        border: none;
        outline: none;
        background-color: transparent;
    }
    button.context-button::after {
        position: relative;
        left: 0;
        bottom: 0;
        content: '\2807';
        font-size: 25px;
    }

    /* Archived cycle — a frozen copy, distinct from the rolling snapshots. */
    .bk-tag-archive { background: #E3E8FF; color: #2A3A8F; }

    /* Whole-round cycle control on the centre's form list. */
    .cycle-bar {
        display: flex; align-items: center; justify-content: space-between;
        gap: 18px; flex-wrap: wrap;
        padding: 14px 20px; margin-bottom: 16px;
        background: #fff; border: 1px solid #ECEEF4; border-radius: 12px;
    }
    .cycle-state strong { display: block; font-size: 14px; color: #2A3A8F; }
    .cycle-state span   { font-size: 12px; color: #7A8194; }
    .cycle-actions { display: flex; gap: 10px; flex-wrap: wrap; }
    .cycle-actions form { margin: 0; }

    /* Shown on a locked form the centre is editing through impersonation. */
    .lock-override-note {
        margin: 12px 0;
        padding: 10px 14px;
        border-radius: 8px;
        border: 1px solid #F2C200;
        background-color: #FFF8E1;
        color: #6B5200;
        font-size: 13px;
        line-height: 1.45;
    }

    /* Impersonation banner — sticky so it stays visible however far the page is
       scrolled, and in a colour nothing else in the app uses. */
    .impersonation-banner {
        position: sticky;
        top: 0;
        z-index: 1080;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 18px;
        flex-wrap: wrap;
        padding: 9px 16px;
        background-color: #B3261E;
        color: #FFFFFF;
        font-size: 13px;
        line-height: 1.4;
    }
    .impersonation-banner a {
        background-color: #FFFFFF;
        color: #B3261E;
        padding: 4px 12px;
        border-radius: 6px;
        text-decoration: none;
        font-weight: 600;
        white-space: nowrap;
    }
    .impersonation-banner a:hover { background-color: #FFE9E7; color: #8C1D18; }

    /* The banner takes vertical space, so the full-height panes must give it back
       or the sidebar and content overflow the viewport. */
    body:has(.impersonation-banner) #app { height: calc(100vh - 38px) !important; }
    body:has(.impersonation-banner) .sidebar { height: calc(100vh - 38px); }

    #context-menu {
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 10px 10px;
        position: absolute;
        left: 0;
        top: 0;
        width: 180px;
        border-radius: 5px;
        box-shadow: 0 0 6px #0000005b;
        background-color: #fff;
        transform: translateX(-100%);
    }
    #context-menu a,
    #context-menu button {
        border: none;
        outline: none;
        background: transparent;
        text-align: left;
        color: var(--bs-gray);
        text-decoration: none;
        padding: 0 6px;
    }
    #context-menu a:hover,
    #context-menu button:hover {
        color: var(--bs-primary);
    }

    .side-window-wrapper {
        display: none;
        position: fixed;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        z-index: 10;
    }
    .side-window-wrapper.activating {display: initial;}

    .side-window-wrapper .blurer {
        width: 100%;
        height: 100%;
        backdrop-filter: blur(0);
        transition: backdrop-filter .5s;
    }
    .side-window-wrapper.active .blurer {
        backdrop-filter: blur(8px);
    }

    .side-window {
        width: 30%;
        height: 100%;
        position: absolute;
        right: 0;
        top: 0;
        background-color: #FFFFFF;
        z-index: 20;
        transform: translateX(100%);
        transition: transform .7s;
    }
    .side-window-wrapper.active .side-window {transform: translateX(0);}

    .side-window .input-wrapper {
        margin-top: 66px;
    }
    .side-window .slider-body {
        overflow-y: scroll;
    }

    .required-star {
        font-weight: bold;
        color: #FF5252;
    }

    .stregi-breadcrumbs a {
        text-decoration: none;
        color: #2196F380;
        font-size: 12px;
    }
    .stregi-breadcrumbs li {font-size: 12px;}
    .stregi-breadcrumbs .breadcrumb-item+.breadcrumb-item::before {color: #BDBDBD;}
    .stregi-breadcrumbs .breadcrumb-item.active {color: #BDBDBD;}
/* CONFIG */


.small-text {font-size: 10px;}

.form-shadowed-border-left {
    box-shadow: 0 0 6px #00000029;
}
.form-title-border-bottom {
    border-bottom: 1px solid #0000001A;
}

.login-link {
    font-weight: bold;
    color: #3F51B5;
    text-decoration: none;
    font-size: 10px;
}

.login-button {margin-top: 56px;}

/* SIDEBAR - HEADER */
    /*
     * The navigation labels are long Georgian strings — "მუნიციპალიტეტის
     * წარმომადგენელი" is 30 characters — and the sidebar is a col-2, which is
     * about 227px at 1366px wide. At the old 60px rows and inherited body font
     * those labels ran straight out of the column. Everything below is sized so
     * the longest label fits: smaller type, tighter rows, and wrapping to a
     * second line rather than overflowing.
     */
    :root {
        --sb-indigo: #3F51B5;
        --sb-indigo-soft: #EEF0FA;
        --sb-text: #4A4F5A;
        --sb-text-muted: #7A8194;
        --sb-hover: #F4F5F9;
        --sb-rule: #ECEEF4;
    }

    .sidebar-wrapper {
        border-right: 1px solid var(--sb-rule);
        background-color: #FFFFFF;
        /* col-2 is only ~170px on a 1024px screen, which is not enough for a
           14-character Georgian word like "დაწესებულებები" at any readable size.
           Hold a floor and let the content column take the remainder. */
        min-width: 196px;
    }

    .content-wrapper {
        flex: 1 1 0;
        width: auto;
        max-width: none;
        min-width: 0;
    }

    .sidebar {
        height: 100vh;
        padding-bottom: 16px;
        overflow-y: auto;
        overflow-x: hidden;
        /* Thin scrollbar, only when the menu is actually taller than the viewport. */
        scrollbar-width: thin;
        scrollbar-color: #D6D9E4 transparent;
    }
    .sidebar::-webkit-scrollbar {width: 6px;}
    .sidebar::-webkit-scrollbar-thumb {background: #D6D9E4; border-radius: 3px;}
    .sidebar::-webkit-scrollbar-track {background: transparent;}

    /* The logo carried mt-5 plus a 45px margin — ~85px of dead space above the
       first link. Overridden here so the markup does not have to change. */
    .sidebar > .logo {
        margin-top: 24px !important;
        margin-bottom: 22px;
        padding: 0 18px;
    }

    .links {
        gap: 2px;
        padding: 0 6px;
    }

    /* ---- top level ---- */
    .link-group {
        min-height: 0;
        background-color: transparent;
        padding: 0;
        border-radius: 10px;
        position: relative;
    }

    .link-group a,
    .link-dropdown {
        color: var(--sb-text);
        text-decoration: none;
        font-size: 12px;
        font-weight: 500;
        line-height: 1.34;
    }

    .link-no-dropdown,
    .link-dropdown {
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 40px;
        padding: 7px 9px;
        border: none;
        background-color: transparent;
        border-radius: 10px;
        text-align: left;
        transition: background-color .15s ease, color .15s ease;
        /* Without this a flex item refuses to shrink below its longest word, so
           the label pushed the chevron out of the row and the two overlapped. */
        min-width: 0;
    }

    .link-no-dropdown:hover,
    .link-dropdown:hover {
        background-color: var(--sb-hover);
        color: var(--sb-indigo);
    }

    /* The icon sits in an <i> wrapper; keep it from stretching or shrinking so
       every label starts on the same vertical line. The source SVGs are 20-24px
       at natural size, which is why they never lined up before. */
    .link-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 20px;
        width: 20px;
        height: 20px;
    }

    .sidebar-icon {
        width: 18px;
        height: 18px;
        object-fit: contain;
        margin-right: 0;
    }

    .link-no-dropdown > span,
    .link-dropdown span {
        margin-left: 8px;
        white-space: normal;
        /* break-word, not anywhere: wrap at spaces first and only split a word
           when it genuinely cannot fit. "anywhere" was chopping
           დაწესებულ|ებები and თვითშეფასე|ბის mid-word on every narrow screen. */
        overflow-wrap: break-word;
        word-break: normal;
        hyphens: none;
        min-width: 0;
        flex: 1 1 auto;
    }

    .link-group.active > .link-no-dropdown,
    .link-group.active > .link-dropdown,
    .link-group.active > a {
        background-color: var(--sb-indigo-soft);
        color: var(--sb-indigo);
        font-weight: 600;
    }

    /* Accent bar on the active item. */
    .link-group.active::before {
        content: "";
        position: absolute;
        left: -10px;
        top: 50%;
        transform: translateY(-50%);
        width: 3px;
        height: 20px;
        border-radius: 0 3px 3px 0;
        background-color: var(--sb-indigo);
    }
    /* A group whose submenu is open is a container, not the current page — the
       bar belongs on the selected child instead. */
    .link-group.active:has(.collapse)::before {display: none;}

    .link-dropdown > .d-flex {
        width: 100%;
        align-items: center;
        min-width: 0;
    }

    .sidebar-dropdown-icon {
        margin-left: auto;
        width: 12px;
        height: 12px;
        /* Never let the label steal the chevron's space — that was the overlap. */
        flex: 0 0 12px;
        opacity: .5;
        transition: transform .2s ease;
    }
    /* Bootstrap keeps aria-expanded in sync, so the chevron follows the panel. */
    .link-dropdown[aria-expanded="true"] .sidebar-dropdown-icon {
        transform: rotate(180deg);
        opacity: .85;
    }

    /* ---- submenu ---- */
    .link-group .collapsing,
    .link-group .show {
        display: flex;
    }

    .link-group .collapse,
    .link-group .collapsing {
        /* Guide line that ties the children to their parent. */
        margin: 2px 0 4px 21px;
        padding-left: 11px;
        border-left: 1px solid var(--sb-rule);
    }

    .dropdown-link {
        min-height: 30px;
        padding: 5px 8px;
        margin-bottom: 1px;
        border-radius: 8px;
        color: var(--sb-text-muted);
        font-size: 11.5px;
        line-height: 1.32;
        transition: background-color .15s ease, color .15s ease;
        min-width: 0;
    }

    .dropdown-link span {
        white-space: normal;
        overflow-wrap: break-word;
        word-break: normal;
        hyphens: none;
        min-width: 0;
    }

    .dropdown-link:hover {
        background-color: var(--sb-hover);
        color: var(--sb-indigo);
    }

    .dropdown-link.active {
        background-color: var(--sb-indigo-soft);
        color: var(--sb-indigo);
        font-weight: 600;
    }

    /* Narrow laptops: one more step down so the longest single words —
       დაწესებულებები (14 chars) and თვითშეფასების — still fit on one line
       rather than being split. */
    @media (max-width: 1400px) {
        .link-group a, .link-dropdown {font-size: 11.5px;}
        .dropdown-link {font-size: 11px;}
        .link-no-dropdown, .link-dropdown {padding: 7px 8px;}
        .link-icon {flex: 0 0 18px; width: 18px; height: 18px;}
        .sidebar-icon {width: 16px; height: 16px;}
        .link-no-dropdown > span, .link-dropdown span {margin-left: 7px;}
    }


    .content-wrapper {
        padding: 28px 24px;
        margin: 0 !important;
    }

    .dashboard-title h1 {font-size: 24px;}

    .user-avatar {
        min-width: 44px;
        min-height: 44px;
        overflow: hidden;
        border-radius: 50%;
        border: 1px solid #2196F3;
        margin: 0 4px 0 24px;
    }
    .user-avatar img {
        width: 44px;
    }

    #profile-context-dropdown {
        display: none;
        flex-direction: column;
        justify-content: center;
        padding: 10px 20px;
        border-radius: 3px;
        position: absolute;
        right: 0px;
        bottom: -10px;
        box-shadow: 0 0 6px #0000005b;
        background-color: #fff;
        transform: translateY(100%);
        z-index: 100;
    }

    #profile-context-dropdown * {
        font-size: 13px;
    }
    #profile-context-dropdown i {
        margin-right: 12px;
    }
    #profile-context-dropdown a:hover {
        background-color: #f8f9fa;
    }
/* SIDEBAR - HEADER */

/* HOMEPAGE */
    .homepage-tabs {margin-top: 66px;}

    .homepage-tabs .tab {
        min-height: 80px;
        padding: 16px;
        border-radius: 12px;
        margin-right: 7px;
        box-shadow: 0 4px 16px #00000014;
        transition: background-color .3s;
    }

    .homepage-tabs .tab:hover {background-color: rgba(63,81,181,.3);}

    .tab-icon {
        width: 48px;
        height: 48px;
        border-radius: 12px;
        margin-right: 12px;
    }
    .tab-icon.first {background-color: #3F51B5;}
    .tab-icon.second {background-color: #FB8C00;}
    .tab-icon.third {background-color: #4CAF50;}
    .tab-icon.fourth {background-color: #FF5252;}

    .tab-icon img {
        width: 24px;
        height: 24px;
    }

    .homepage-tabs .data-counter {
        color: #424242;
        font-weight: bold;
        font-size: 24px;
    }

    .homepage-tabs .data-title {
        color: #424242;
        font-size: 12px;
    }
/* HOMEPAGE */

/* FORM FILL */
/* FORM FILL */