/* unvisited link */
a:link {
    color: #3a3a3a;
}

/* visited link */
a:visited {
    color: #2b2b2b;
}

/* mouse over link */
a:hover {
    color: #666666;
}

/* selected link */
a:active {
    color: #444444;
}

.krt-color {
    color: cadetblue;
}

.riskColor {
    color: #bd2130;
}

.krtColor {
    background-color: #85CFEC;
    color: white;
}

.krtFontColor {
    color: #4099ff; !important
}

.blackFontColor {
    color: #444444; !important
}

.whiteFontColor {
    color: #ffffff; !important
}

.serviceColorKfp {
    color: dodgerblue;
}

.serviceColorPfp {
    color: red;
}

.serviceColorFnd {
    color: green;
}

.serviceColorKtl {
    color: orange;
}

.serviceColorBer {
    color: magenta;
}

.serviceColorNot {
    color: gray;
}

.serviceColorMan {
    color: darkcyan;
}

.serviceColorHar {
    color: darkred;
}

.serviceColorZns {
    color: saddlebrown;
}

.serviceColorFns {
    color: darkviolet;
}

.serviceColorFma {
    color: darkblue;
}

.serviceColorKrz {
    color: darkgray;
}

.smaller {
    font-size: 8pt;
}

.rounded-top-25 {
    border-radius: 25px 25px 0 0;
}

.clickable-row {
    cursor: pointer;
}

.clickable {
    cursor: pointer;
}

.avatar {
    border-radius: 30em
}

.avatar-xs {
    width: 20px
}

.avatar-sm {
    width: 30px
}

.avatar-lg {
    width: 72px
}

.th_icon {
    width: 30px;
    text-align: center;
}

.th_short {
    width: 200px;
}

.th_middle {
    width: 360px;
}

.th_icon_md {
    width: 340px;
    text-align: center;
}

.th_date {
    width: 120px;
}

.th_time {
    width: 100px;
    text-align: center;
}

.th_datetime {
    width: 230px;
    text-align: center;
}

.th_datetime_split {
    line-height: 1.2;
}

.th_datetime_date,
.th_datetime_time {
    display: block;
}

.th_datetime_date {
    font-size: 0.88em;
    color: #5f6770;
    letter-spacing: 0.03em;
}

.th_datetime_time {
    margin-top: 0.25rem;
    font-weight: 700;
}

.th_auto {
    width: auto;
}

.table > tbody > tr > td {
    vertical-align: middle;
}

input[type="date"] {
    min-height: 2.5rem;
}

input[type="date"]::-webkit-inner-spin-button,
input[type="date"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#ajaxBusyInactivateAppUser, #ajaxBusyReactivateAppUser,
#ajaxBusyVolumeWeight, #ajaxBusyAddCustBlackList, #ajaxBusyDeleteCustBlackList,
#ajaxBusyEditPriceList, #ajaxBusyCompleteOffer, #ajaxBusySuspendCustBlackList {
    display: block;
    text-align: center;
    width: 100%;
    height: 40px;
    background: url(../../images/ajax-loader.gif) no-repeat center center;
}

.toggle.ios, .toggle-on.ios, .toggle-off.ios {
    border-radius: 20px;
}

.toggle.ios .toggle-handle {
    border-radius: 20px;
}

td.ptg0 {
    background-color: lightcoral;
}

td.ptg1 {
    background-color: lightgreen;
}

td.ptg2 {
    background-color: lightskyblue;
}

td.ptg3 {
    background-color: lightgoldenrodyellow;
}

.bg-dark-light {
    background-color: #495057 !important
}

.bg-blue {
    background-color: rgb(0, 48, 139) !important
}

.btn {
    border-radius: 0.5rem;
}

.btn-size {
    width: 50px !important;
}

.btn-outline-krt {
    color: cadetblue;
    background: transparent none;
    border-color: darkturquoise;
}

.btn-outline-krt.badge-top-right:before {
    content: attr(data-badge);
    border: 1px solid #fff;
    width: auto;
    height: 21px;
    padding: 5px;
    line-height: 12px;
    text-align: center;
    display: block;
    border-radius: 10px;
    background: cadetblue;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    color: #FFF;
    position: absolute;
    left: auto;
    top: -10px;
    right: 5px;
}

.btn-outline-krt:hover {
    color: #fff;
    background-color: cadetblue;
    border-color: darkturquoise !important;
}

.btn-outline-krt.focus, .btn-outline-krt:focus {
    -webkit-box-shadow: 0 0 0 .2rem rgba(133, 207, 236, .5);
    box-shadow: 0 0 0 .2rem rgba(133, 207, 236, .5);
}

.btn-outline-krt.disabled, .btn-outline-krt:disabled {
    color: gray;
    background-color: transparent;
    border-color: gray;
}

.btn-outline-krt:not(:disabled):not(.disabled).active, .btn-outline-krt:not(:disabled):not(.disabled):active,
.show > .btn-outline-krt.dropdown-toggle {
    color: #fff;
    background-color: cadetblue;
    border-color: darkturquoise !important;
}

.btn-outline-krt:not(:disabled):not(.disabled).active:focus,
.btn-outline-krt:not(:disabled):not(.disabled):active:focus,
.show > .btn-outline-krt.dropdown-toggle:focus {
    -webkit-box-shadow: 0 0 0 .2rem rgba(133, 207, 236, .5);
    box-shadow: 0 0 0 .2rem rgba(133, 207, 236, .5)
}

.btn-outline-krt1 {
    color: darkmagenta;
    background: transparent none;
    border-color: darkmagenta;
}

.btn-outline-krt1.badge-top-right:before {
    content: attr(data-badge);
    border: 1px solid #fff;
    width: auto;
    height: 21px;
    padding: 5px;
    line-height: 12px;
    text-align: center;
    display: block;
    border-radius: 10px;
    background: darkred;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    color: #FFF;
    position: absolute;
    left: auto;
    top: -10px;
    right: 5px;
}

.btn-outline-krt1:hover {
    color: #fff;
    background-color: darkmagenta;
    border-color: darkmagenta;
}

.btn-outline-krt1.focus, .btn-outline-krt1:focus {
    -webkit-box-shadow: 0 0 0 .2rem rgba(133, 207, 236, .5);
    box-shadow: 0 0 0 .2rem rgba(133, 207, 236, .5);
}

.btn-outline-krt1.disabled, .btn-outline-krt1:disabled {
    color: gray;
    background-color: transparent;
    border-color: gray;
}

.btn-outline-krt1:not(:disabled):not(.disabled).active, .btn-outline-krt1:not(:disabled):not(.disabled):active,
.show > .btn-outline-krt1.dropdown-toggle {
    color: #fff;
    background-color: darkmagenta;
    border-color: darkmagenta;
}

.btn-outline-krt1:not(:disabled):not(.disabled).active:focus,
.btn-outline-krt1:not(:disabled):not(.disabled):active:focus,
.show > .btn-outline-krt1.dropdown-toggle:focus {
    -webkit-box-shadow: 0 0 0 .2rem rgba(133, 207, 236, .5);
    box-shadow: 0 0 0 .2rem rgba(133, 207, 236, .5)
}

.btn-outline-krt2 {
    color: darkorange;
    background: transparent none;
    border-color: darkorange
}

.btn-outline-krt2.badge-top-right:before {
    content: attr(data-badge);
    border: 1px solid #fff;
    width: auto;
    height: 21px;
    padding: 5px;
    line-height: 12px;
    text-align: center;
    display: block;
    border-radius: 10px;
    background: darkred;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    color: #FFF;
    position: absolute;
    left: auto;
    top: -10px;
    right: 5px;
}

.btn-outline-krt2:hover {
    color: #fff;
    background-color: darkorange;
    border-color: darkorange;
}

.btn-outline-krt2.focus, .btn-outline-krt2:focus {
    -webkit-box-shadow: 0 0 0 .2rem rgba(133, 207, 236, .5);
    box-shadow: 0 0 0 .2rem rgba(133, 207, 236, .5);
}

.btn-outline-krt2.disabled, .btn-outline-krt2:disabled {
    color: gray;
    background-color: transparent;
    border-color: gray;
}

.btn-outline-krt2:not(:disabled):not(.disabled).active, .btn-outline-krt2:not(:disabled):not(.disabled):active,
.show > .btn-outline-krt2.dropdown-toggle {
    color: #fff;
    background-color: darkorange;
    border-color: darkorange;
}

.btn-outline-krt2:not(:disabled):not(.disabled).active:focus,
.btn-outline-krt2:not(:disabled):not(.disabled):active:focus,
.show > .btn-outline-krt2.dropdown-toggle:focus {
    -webkit-box-shadow: 0 0 0 .2rem rgba(133, 207, 236, .5);
    box-shadow: 0 0 0 .2rem rgba(133, 207, 236, .5)
}

.btn-outline-krt3 {
    color: fuchsia;
    background: transparent none;
    border-color: fuchsia
}

.btn-outline-krt3.badge-top-right:before {
    content: attr(data-badge);
    border: 1px solid #fff;
    width: auto;
    height: 21px;
    padding: 5px;
    line-height: 12px;
    text-align: center;
    display: block;
    border-radius: 10px;
    background: darkred;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    color: #FFF;
    position: absolute;
    left: auto;
    top: -10px;
    right: 5px;
}

.btn-outline-krt3:hover {
    color: #fff;
    background-color: fuchsia;
    border-color: fuchsia;
}

.btn-outline-krt3.focus, .btn-outline-krt3:focus {
    -webkit-box-shadow: 0 0 0 .2rem rgba(133, 207, 236, .5);
    box-shadow: 0 0 0 .2rem rgba(133, 207, 236, .5);
}

.btn-outline-krt3.disabled, .btn-outline-krt3:disabled {
    color: gray;
    background-color: transparent;
    border-color: gray;
}

.btn-outline-krt3:not(:disabled):not(.disabled).active, .btn-outline-krt3:not(:disabled):not(.disabled):active,
.show > .btn-outline-krt3.dropdown-toggle {
    color: #fff;
    background-color: fuchsia;
    border-color: fuchsia;
}

.btn-outline-krt3:not(:disabled):not(.disabled).active:focus,
.btn-outline-krt3:not(:disabled):not(.disabled):active:focus,
.show > .btn-outline-krt3.dropdown-toggle:focus {
    -webkit-box-shadow: 0 0 0 .2rem rgba(133, 207, 236, .5);
    box-shadow: 0 0 0 .2rem rgba(133, 207, 236, .5)
}

.btn-outline-krt4 {
    color: brown;
    background: transparent none;
    border-color: brown
}

.btn-outline-krt4.badge-top-right:before {
    content: attr(data-badge);
    border: 1px solid #fff;
    width: auto;
    height: 21px;
    padding: 5px;
    line-height: 12px;
    text-align: center;
    display: block;
    border-radius: 10px;
    background: darkred;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    color: #FFF;
    position: absolute;
    left: auto;
    top: -10px;
    right: 5px;
}

.btn-outline-krt4:hover {
    color: #fff;
    background-color: brown;
    border-color: brown;
}

.btn-outline-krt4.focus, .btn-outline-krt4:focus {
    -webkit-box-shadow: 0 0 0 .2rem rgba(133, 207, 236, .5);
    box-shadow: 0 0 0 .2rem rgba(133, 207, 236, .5);
}

.btn-outline-krt4.disabled, .btn-outline-krt4:disabled {
    color: gray;
    background-color: transparent;
    border-color: gray;
}

.btn-outline-krt4:not(:disabled):not(.disabled).active, .btn-outline-krt4:not(:disabled):not(.disabled):active,
.show > .btn-outline-krt4.dropdown-toggle {
    color: #fff;
    background-color: brown;
    border-color: brown;
}

.btn-outline-krt4:not(:disabled):not(.disabled).active:focus,
.btn-outline-krt4:not(:disabled):not(.disabled):active:focus,
.show > .btn-outline-krt4.dropdown-toggle:focus {
    -webkit-box-shadow: 0 0 0 .2rem rgba(133, 207, 236, .5);
    box-shadow: 0 0 0 .2rem rgba(133, 207, 236, .5)
}

.btn-outline-krt5 {
    color: #00bfa5;
    background: transparent none;
    border-color: #00bfa5;
}

.btn-outline-krt5.badge-top-right:before {
    content: attr(data-badge);
    border: 1px solid #fff;
    width: auto;
    height: 21px;
    padding: 5px;
    line-height: 12px;
    text-align: center;
    display: block;
    border-radius: 10px;
    background: darkred;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    color: #FFF;
    position: absolute;
    left: auto;
    top: -10px;
    right: 5px;
}

.btn-outline-krt5:hover {
    color: #fff;
    background-color: #00bfa5;
    border-color: #00bfa5;
}

.btn-outline-krt5.focus, .btn-outline-krt5:focus {
    -webkit-box-shadow: 0 0 0 .2rem rgba(133, 207, 236, .5);
    box-shadow: 0 0 0 .2rem rgba(133, 207, 236, .5);
}

.btn-outline-krt5.disabled, .btn-outline-krt5:disabled {
    color: gray;
    background-color: transparent;
    border-color: gray;
}

.btn-outline-krt5:not(:disabled):not(.disabled).active, .btn-outline-krt5:not(:disabled):not(.disabled):active,
.show > .btn-outline-krt5.dropdown-toggle {
    color: #fff;
    background-color: #00bfa5;
    border-color: #00bfa5;
}

.btn-outline-krt5:not(:disabled):not(.disabled).active:focus,
.btn-outline-krt5:not(:disabled):not(.disabled):active:focus,
.show > .btn-outline-krt5.dropdown-toggle:focus {
    -webkit-box-shadow: 0 0 0 .2rem rgba(133, 207, 236, .5);
    box-shadow: 0 0 0 .2rem rgba(133, 207, 236, .5)
}

.btn-outline-krt6 {
    color: #dc3545;
    background: transparent none;
    border-color: #dc3545;
}

.btn-outline-krt6.badge-top-right:before {
    content: attr(data-badge);
    border: 1px solid #fff;
    width: auto;
    height: 21px;
    padding: 5px;
    line-height: 12px;
    text-align: center;
    display: block;
    border-radius: 10px;
    background: darkred;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    color: #FFF;
    position: absolute;
    left: auto;
    top: -10px;
    right: 5px;
}

.btn-outline-krt6:hover {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-outline-krt6.focus, .btn-outline-krt6:focus {
    -webkit-box-shadow: 0 0 0 .2rem rgba(133, 207, 236, .5);
    box-shadow: 0 0 0 .2rem rgba(133, 207, 236, .5);
}

.btn-outline-krt6.disabled, .btn-outline-krt6:disabled {
    color: gray;
    background-color: transparent;
    border-color: gray;
}

.btn-outline-krt6:not(:disabled):not(.disabled).active, .btn-outline-krt6:not(:disabled):not(.disabled):active,
.show > .btn-outline-krt6.dropdown-toggle {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-outline-krt6:not(:disabled):not(.disabled).active:focus,
.btn-outline-krt6:not(:disabled):not(.disabled):active:focus,
.show > .btn-outline-krt6.dropdown-toggle:focus {
    -webkit-box-shadow: 0 0 0 .2rem rgba(133, 207, 236, .5);
    box-shadow: 0 0 0 .2rem rgba(133, 207, 236, .5)
}

.btn-success:disabled {
    background: gray;
    color: white;
    border-color: darkgray;
}

.btn-warning:disabled {
    background: gray;
    color: white;
    border-color: darkgray;
}

.btn-danger:disabled {
    background: gray;
    color: white;
    border-color: darkgray;
}

/* Tabs*/
.nav-tabs .nav-item.show .nav-link, .nav-tabs .nav-link.active {
    background-color: transparent;
    border-color: transparent transparent #f3f3f3;
    border-bottom: 4px solid !important;
    color: cadetblue;
}

.nav-tabs .nav-link {
    border: 1px solid transparent;
    border-top-left-radius: .25rem;
    border-top-right-radius: .25rem;
    color: grey;
}

.nav-tabs .nav-link:hover {
    border: 1px solid transparent;
    border-top-left-radius: .25rem;
    border-top-right-radius: .25rem;
    border-bottom: 4px solid !important;
    color: cadetblue;
}

.badge-krt {
    background: darkred;
    color: white;
}

.tooltip-inner {
    z-index: 10000;
    color: black;
    background-color: white;
    border: 1px solid #000;
    box-shadow: 0 0 10px #000;
}

/* ==========================================================
   Dashboard » Einstellungen – UI polish (layout-safe)
   Targets ONLY your settings inputs/buttons by placeholder
   and by the unique button classes you already have.
   ========================================================== */

:root{
    --krt-radius: 14px;
}

.row.my-2 > .col-md-3 > .btn {
    height: 40px;
    line-height: 1;
    padding: .9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--krt-radius);
}

.row.my-2 > .col-md-3 > .btn.btn-md{
    padding-top: 0;
    padding-bottom: 0;
}

.krt-input {
    overflow: hidden;
    background: #fff;
}

.krt-input .form-control,
.krt-input .input-group-text {
    border: 1px solid #d6dde3;
    background: #fff;
    font-size: 1.05rem;
}

.krt-input .input-group-prepend .input-group-text {
    padding: 0 12px;
    background: #f1f3f5;
    color: #5c6670;
    font-size: 1.1rem;
}

.krt-input .form-control {
    font-weight: 600;
    color: #3a3f45;
}

.krt-input .input-group-append .input-group-text {
    border-left: 1px solid #d6dde3;
    background: #f1f3f5;
    color: #5c6670;
    font-weight: 600;
    padding: 0 12px;
}

.krt-input:focus-within {
    box-shadow: 0 0 0 3px rgba(0,123,255,.15);
}

.krt-input .form-control:focus {
    box-shadow: none;
}

.krt-input .form-control::placeholder {
    color: #9aa5b1;
    font-weight: 500;
}

.krt-input-email .krt-domain {
    background: #eef1f4;
    color: #6b747d;
    cursor: not-allowed;
}

.krt-label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #8a8f98;
    text-transform: uppercase;
}

.krt-field-float{
    position: relative;
}

/* Label “schwebt” über dem Input ohne die Höhe zu beeinflussen */
.krt-label-float{
    position: absolute;
    top: -10px;
    left: 14px;
    z-index: 5;

    padding: 0 6px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;

    color: #8a8f98;
    background: #fff; /* falls dein Background anders ist: entsprechend anpassen */
    line-height: 1;
}

/* optional: damit es “eingebettet” wirkt */
.krt-label-float{
    border-radius: 8px;
}

.is-readonly {
    opacity: .85;
    cursor: not-allowed;
}
.is-readonly:focus {
    box-shadow: none !important;
}

.is-toggle-edit {
    color: #0d6efd;
}

.krt-fieldset {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem 1.25rem;
}

.krt-legend {
    font-size: 0.95rem;
    font-weight: 600;
    color: #6c757d;
    width: auto;
}

.krt-toggle:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

@media (max-width: 767.98px) {
    .krt-input .form-control,
    .krt-input .input-group-text {
        font-size: .95rem;
    }
}

.row.my-2 { align-items: center; }
.col-md-9 .krt-input { width: 100%; }
.col-md-3 > .btn {
    width: 100%;
    font-weight: 800;
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .col-md-3 { margin-top: .5rem; }
}

.chart-wrap {
    position: relative;
    width: 100%;
    height: 520px;
    max-width: 520px;
    margin: 0 auto;
}

.chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ===== Page ===== */

.perm-page-header {
    margin-bottom: 1rem;
}

.perm-page-header h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    letter-spacing: -0.02em;
}

.perm-role-select.form-control {
    width: 240px;
    height: 42px;

    border-radius: 0.7rem;
    border: 1px solid #d7dde5;

    font-weight: 700;
}

.perm-role-select.form-control:focus {
    border-color: #b8c2cf;
    box-shadow: 0 0 0 0.15rem rgba(100, 116, 139, 0.08);
}

.perm-accordion-root {
    width: 100%;
}

/* ===== Module / Accordion ===== */

.perm-module.card {
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    margin-bottom: 1rem;
}

.perm-module__header.card-header {
    background: #f8fafc;
    border-bottom: 1px solid #eef2f7;
    padding: 1rem 1.1rem;
    min-height: 68px;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.perm-module__header:hover {
    background: #f3f6f9;
}

.perm-module__trigger.btn-link {
    display: flex;
    align-items: center;
    width: 100%;
    color: #111827;
    text-decoration: none;
}

.perm-module__trigger.btn-link:hover,
.perm-module__trigger.btn-link:focus {
    text-decoration: none;
    color: #111827;
}

.perm-module__title-wrap {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.perm-module__icon {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #eef2f7;
    color: #4b5563;
    font-size: 1rem;
    flex: 0 0 auto;
}

.perm-module__title-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.perm-module__title-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    line-height: 1.2;
}

.perm-module__title-line strong {
    font-size: 1.08rem;
    font-weight: 700;
    color: #1f2937;
}

.perm-module__count {
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 600;
}

.perm-module__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: #eef2f7;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.perm-module__subtitle {
    margin-top: 0.12rem;
    font-size: 0.88rem;
    color: #6b7280;
}

.perm-module__body.card-body {
    padding: 0;
    background: #ffffff;
}

/* ===== Chevron ===== */

.perm-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin-left: 1rem;
    border-radius: 0.6rem;
    color: #6b7280;
    background: transparent;
    transition: background 0.18s ease, color 0.18s ease;
    flex: 0 0 auto;
}

.perm-chevron i {
    font-size: 0.95rem;
    transition: transform 0.2s ease, color 0.18s ease;
}

.perm-module__header:hover .perm-chevron {
    background: #eef2f7;
    color: #374151;
}

.perm-module__trigger[aria-expanded="true"] + .perm-chevron i {
    transform: rotate(90deg);
}

.perm-module__trigger[aria-expanded="true"] + .perm-chevron {
    color: #111827;
    background: #e9eef5;
}

/* ===== Permission rows ===== */

.perm-row {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(620px, 2fr) minmax(250px, auto);
    gap: 1.25rem;
    align-items: center;
    width: 100%;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border-bottom: 1px solid #eef2f7;
    transition: background 0.18s ease, box-shadow 0.18s ease;
}

.perm-row:last-child {
    border-bottom: 0;
}

.perm-row:hover {
    background: #fbfcfe;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.08);
}

.perm-row__col {
    min-width: 0;
}

.perm-row__col--main {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
}

.perm-icon {
    width: 2.15rem;
    height: 2.15rem;
    min-width: 2.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 0.98rem;
    margin-top: 0.1rem;
}

.perm-text {
    min-width: 0;
}

.perm-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.14rem;
    line-height: 1.2;
}

.perm-title-text {
    font-size: 1.02rem;
    font-weight: 700;
    color: #1f2937;
    word-break: break-word;
}

.perm-desc {
    color: #6b7280;
    font-size: 0.94rem;
    line-height: 1.35;
}

.perm-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.45rem;
    border-radius: 0.5rem;
    background: #2f3640;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

/* ===== Meta ===== */

.perm-row__col--meta {
    display: grid;
    grid-template-columns: minmax(320px, 1.5fr) minmax(220px, 1fr);
    gap: 1rem 1.25rem;
    align-content: center;
}

.perm-meta-stack {
    display: grid;
    grid-template-rows: auto auto;
    gap: 0.6rem;
}

.perm-meta {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 0.45rem;
    align-items: center;
    min-width: 0;
}

.perm-meta-k {
    font-size: 0.74rem;
    font-weight: 800;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.perm-meta-v {
    display: inline-block;
    margin: 0;
    min-height: 34px;
    padding: 0.18rem 0.5rem;
    border-radius: 0.55rem;
    background: #f8fafc;
    border: 1px solid #e8edf3;
    color: #d63384;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.perm-meta-v--empty {
    color: transparent;
}

/* ===== Toggles ===== */

.perm-row__col--toggles {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.perm-toggles {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.perm-toggle-item {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.perm-toggle-label {
    font-size: 0.74rem;
    font-weight: 800;
    color: #6b7280;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.perm-toggle--readonly {
    pointer-events: none;
}

/* ===== Nested spacing ===== */

.perm-module__body > div > .perm-module,
.perm-module__body > div > .perm-row {
    margin-left: 0;
}

/* ===== Responsive ===== */

@media (max-width: 1199.98px) {
    .perm-row {
        grid-template-columns: minmax(260px, 1.4fr) minmax(300px, 1fr);
    }

    .perm-row__col--toggles {
        grid-column: 1 / -1;
        justify-content: flex-start;
        padding-top: 0.2rem;
    }

    .perm-toggles {
        justify-content: flex-start;
    }
}

@media (max-width: 767.98px) {
    .perm-page-header h3 {
        font-size: 1.65rem;
    }

    .perm-module__header.card-header {
        padding: 0.9rem 0.95rem;
    }

    .perm-row {
        grid-template-columns: 1fr;
        gap: 0.9rem;
        padding: 0.95rem 1rem;
    }

    .perm-row__col--meta {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .perm-row__col--toggles {
        justify-content: flex-start;
        padding-top: 0;
    }

    .perm-toggles {
        justify-content: flex-start;
        gap: 0.8rem;
    }

    .perm-title-text {
        font-size: 0.98rem;
    }

    .perm-desc {
        font-size: 0.9rem;
    }
}

/* ===== Search ===== */

.perm-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;

    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;

    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;

    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.perm-toolbar__title {
    font-size: 1.7rem;
}

.perm-toolbar__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.perm-page-title {
    margin: 0;
    font-size: 2.1rem;
    line-height: 1.05;
    font-weight: 750;
    color: #1f2937;
    letter-spacing: -0.03em;
}

.perm-page-subtitle {
    margin-top: 0.35rem;
    font-size: 0.95rem;
    color: #6b7280;
}

.perm-toolbar__role,
.perm-toolbar__search {
    min-width: 0;
}

.perm-toolbar__search {
    margin-top: 1rem;
}

.perm-field-label {
    display: inline-block;
    margin-bottom: 0.45rem;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #6b7280;
}

.perm-role-select.form-control,
.perm-search__input.form-control {
    height: 50px;
    border-radius: 0.85rem;
    border: 1px solid #d7dde5;
    background: #fff;
    box-shadow: none;
    color: #374151;
}

.perm-role-select.form-control {
    font-weight: 700;
}

.perm-role-select.form-control:focus,
.perm-search__input.form-control:focus {
    border-color: #b8c2cf;
    box-shadow: 0 0 0 0.15rem rgba(100, 116, 139, 0.08);
}

.perm-search {
    position: relative;
    width: 340px;
}

.perm-search__icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 0.9rem;
}

.perm-search__input {
    height: 42px;
    padding-left: 2.4rem;
    padding-right: 2.4rem;

    border-radius: 0.7rem;
    border: 1px solid #d7dde5;

    font-weight: 500;
}

.perm-search__clear {
    position: absolute;
    right: 0.4rem;
    top: 50%;
    transform: translateY(-50%);

    width: 30px;
    height: 30px;

    border: none;
    background: transparent;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #6b7280;
    border-radius: 6px;
}

.perm-search__clear:hover {
    background: #eef2f7;
}

.perm-search__clear.is-hidden {
    display: none;
}

@media (max-width: 991.98px) {
    .perm-toolbar__head {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .perm-page-title {
        font-size: 1.8rem;
    }

    .perm-search {
        max-width: 100%;
    }
}

@media (max-width: 767.98px) {
    .perm-toolbar {
        padding: 1rem;
    }

    .perm-page-title {
        font-size: 1.55rem;
    }

    .perm-page-subtitle {
        font-size: 0.9rem;
    }

    .perm-role-select.form-control,
    .perm-search__input.form-control {
        height: 46px;
    }
}

.krt-input-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    font-variant-numeric: tabular-nums;
}

.krt-input-mono[readonly] {
    background: #f8fafc;
    cursor: default;
}

.krt-input-mono:focus {
    outline: none;
    box-shadow: none;
}
