:root{
    /* Kolory — łatwe do zmiany w jednym miejscu */
    --bg-dark: #1a1a1a;
    --bg-mid: #2a2a2a;
    --surface: #2d2d2d;
    --accent: #4a9eff;
    --text: #ffffff;
    --muted: rgba(255,255,255,0.06);
    --success: #018718;
    --danger: #ff6b6b;
    --warning: #ffd43b;

    /* Cienie i przejścia zoptymalizowane dla wydajności */
    --soft-shadow: 0 4px 12px rgba(0,0,0,0.12);
    --very-soft-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Bez animacji */
*{
    color: var(--text);
    box-sizing: border-box;
}

/* Lżejsze tła i cienie dla głównych kontenerów — mniej gradientów */
.info table, table, nav, form {
    background: var(--surface);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: var(--very-soft-shadow);
}

/* Animacje wyłączone */

/* Zmniejsz intensywne efekty, które są kosztowne na mobilkach */
* { backface-visibility: hidden; }
nav, main, form { will-change: auto; }

/* Uproszczone tła dla elementów przyspieszające rendering */
body{ background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-mid) 100%); }

/* Mobile overrides — usuń heavy efekty i gradienty */
@media (pointer: coarse) or (max-width: 940px) {
    nav, main > *, form, table { background: var(--surface); box-shadow: var(--very-soft-shadow); border-radius: 10px; }
    /* Usuń backdrop-filter na mobilkach — często drogi */
    nav, main, form, .dropdown-list { backdrop-filter: none !important; }
    tr:hover { box-shadow: none !important; }
}

body{
    display: flex;
    width: 100%;
    height: 100dvh;
    margin: 0px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
}

nav{
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #2a2a2a 0%, #1f1f1f 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    gap: 8px;
    padding: 20px 0px;
    width: min-content;
    backdrop-filter: blur(10px);
}

main{
    display: flex;
    flex-direction: row;
    flex: 1;
    max-height: 100dvh;
    overflow: auto;
    padding: 30px;
    gap: 20px;
    flex-wrap: wrap;
    align-content: flex-start;
    background: linear-gradient(135deg, #1e1e1e 0%, #2a2a2a 100%);
}

.info table, table {
    background: linear-gradient(145deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    padding: 20px;
    gap: 12px;
    border-radius: 16px;
    max-height: unset;
    height: fit-content;
    width: unset;
    min-width: none;
    backdrop-filter: blur(10px);
}

form{
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    padding: 24px;
    gap: 16px;
    background: linear-gradient(145deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

table{
    border-collapse: collapse;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

td, th, table{
    padding: 0px;
    text-wrap: nowrap;
}

th{
    padding: 8px 6px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    /* background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%); */
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.9);
}

td{
    padding: 6px 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
    transition: background-color 0.2s ease;
}

td:hover {
    background: rgba(255, 255, 255, 0.05);
}

td:last-child{
    border-right: none;
}

th:last-child{
    border-right: none;
}

table span{
    padding: 4px 6px;
}

table button, table input, table .button{
    width: 100%;
    margin-left: unset;
    margin-right: unset;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 6px;
}

textarea{
    background: linear-gradient(145deg, #2a2a2a 0%, #1e1e1e 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    width: 100%;
    height: 100%;
    display: flex;
    padding: 8px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

textarea:focus {
    border-color: #4a9eff;
    box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.2);
    outline: none;
}

td:has(textarea){
    padding: 0px;
    min-width: 150px;
}

.row{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.column{
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.center{
    display: flex;
    flex: 1;
    justify-content: center;
    align-items: center;
}

input:not([type="checkbox"]), button, select, option, .button{
    padding: 8px 12px;
    background: linear-gradient(145deg, #2a2a2a 0%, #1e1e1e 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-wrap: nowrap;
    border-radius: 8px;
    flex: 1;
    max-width: 100%;
    font-family: inherit;
    font-size: 14px;
}

button, .button{
    min-width: unset;
    width: unset;
    cursor: pointer;
    font-weight: 500;
    background: linear-gradient(135deg, #3d4f5c 0%, #2a3a47 100%);
    color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

button:hover, .button:hover{
    background: linear-gradient(135deg, #4a5d6a 0%, #345058 100%);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.25);
}

button:active, .button:active{
    background: linear-gradient(135deg, #2f3f4c 0%, #1f2d3a 100%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

input:hover, select:hover, input.numpad_usage{
    border-color: rgba(255, 255, 255, 0.2);
    background: linear-gradient(145deg, #333333 0%, #272727 100%);
}

input:focus, select:focus{
    outline: none;
    border-color: #4a9eff;
    background: linear-gradient(145deg, #333333 0%, #272727 100%);
    box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.2);
}

a{
    display: flex;
    flex-direction: row;
    align-items: center;
    text-decoration: none;
    padding: 12px 20px;
    gap: 12px;
    position: relative;
    z-index: 1;
    border-radius: 8px;
    margin: 2px 8px;
    white-space: nowrap;
}

a:hover{
    text-decoration: none;
    background: rgba(255, 255, 255, 0.05);
}

label{
    text-wrap: nowrap;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

span{
    text-wrap: nowrap;
}

.active{
    background: linear-gradient(135deg, #4a9eff 0%, #357abd 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
}

.active:hover{
    background: linear-gradient(135deg, #5ba8ff 0%, #4085c4 100%);
}

.active::before{
    background: none;
    position: unset;
    content: unset;
    inset: unset;
    z-index: unset;
    border-radius: unset;
}

.line{
    display: flex;
    flex: 1;
    min-height: 1px;
    max-height: 1px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
    margin: 8px 0;
}

.error{
    height: 20px;
    color: #ff6b6b;
    font-size: 12px;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(255, 107, 107, 0.3);
}

.flash-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.flash {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: var(--very-soft-shadow);
    background: linear-gradient(145deg, #2a2a2a 0%, #1e1e1e 100%);
}

.flash-message {
    white-space: normal;
}

.flash-close {
    background: transparent;
    border: none;
    box-shadow: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0 4px;
    color: inherit;
    flex: 0;
}

.flash-close:hover,
.flash-close:active {
    background: transparent;
    box-shadow: none;
}

.flash-success {
    border-color: rgba(81, 207, 102, 0.5);
    background: linear-gradient(135deg, rgba(81, 207, 102, 0.2) 0%, rgba(64, 192, 87, 0.18) 100%);
}

.flash-error {
    border-color: rgba(255, 107, 107, 0.55);
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.2) 0%, rgba(250, 82, 82, 0.18) 100%);
}

.flash-warning {
    border-color: rgba(255, 212, 59, 0.5);
    background: linear-gradient(135deg, rgba(255, 212, 59, 0.2) 0%, rgba(250, 176, 5, 0.16) 100%);
}

.user_icon{
    display: flex;
    background-image: url(resources/user_icon.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    height: 40px;
    aspect-ratio: 1/1;
    border-radius: 50%;
}

.user_icon:hover {
    border-color: #4a9eff;
    box-shadow: 0 0 12px rgba(74, 158, 255, 0.3);
}

.group{
    display: flex;
    flex-direction: column;
    margin: 4px 8px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.group > label{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 12px 16px;
    background: #2f3947;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.9);
}

.group > label:hover {
    background: #3a4758;
}

.group-list-wrapper{
    display: grid;
    grid-template-rows: 0fr;
}

.group-list{
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
}

.group-list > a{
    padding-left: 24px;
    margin: 1px 4px;
    font-size: 13px;
}

.menu-info {
  
    padding: 8px 24px;
    background: #357abd;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    font-size: 13px;
    margin: 1px 4px;
    z-index: 1;
    font-weight: 500;
}

.arrow{
    display: flex;
    height: 12px;
    width: 12px;
    background-color: rgba(255, 255, 255, 0.7);
    clip-path: polygon(78% 17%, 40% 50%, 77% 82%, 60% 100%, 0 50%, 60% 0);
}

.group > input[type="checkbox"]:checked ~ .group-list-wrapper{
    grid-template-rows: 1fr;
}

.group > input[type="checkbox"]:checked ~ label .arrow{
    background-color: #4a9eff;
}

/* Chrome, Safari, Edge, Opera */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
/* input[type="number"] {
  -moz-appearance: textfield;
} */

#numpad{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 16px;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#numpad button {
    aspect-ratio: 1;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, #404040 0%, #2a2a2a 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

#numpad button:hover {
    background: linear-gradient(135deg, #4a9eff 0%, #357abd 100%);
    border-color: rgba(74, 158, 255, 0.3);
}

#widths{
    max-height: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    min-width: min-content;
    gap: 12px;
    column-gap: 45px;
    flex: 1;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#widths .column{
    max-height: 100%;
    height: 100%;
    min-width: min-content;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    grid-template-rows: repeat(auto-fill, 45px);
    gap: 12px;
    column-gap: 45px;
    flex: 1;
    padding: 16px;
}

#widths span{
    min-width: 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

#widths button{
    min-width: 40px;
    flex: unset;
    border-radius: 6px;
    font-weight: 600;
}

#widths .row{
    flex-wrap: nowrap;
    position: relative;
    z-index: 0;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

#widths input{
    width: 100%;
    min-width: 50px;
    background: transparent;
    border: none;
    border-radius: 4px;
}

#widths input:focus {
    background: rgba(255, 255, 255, 0.05);
}

#widths .row.last-added::before{
    position: absolute;
    content: '';
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.2) 0%, rgba(74, 158, 255, 0.1) 100%);
    inset: -2px;
    z-index: -1;
    border-radius: 10px;
    border: 1px solid rgba(74, 158, 255, 0.3);
}

.length-group{
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.length-label{
    padding: 16px 16px 8px 16px;
    text-align: center;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    background: #2f3947;
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body:not([data-contrast="normal"]) .length-label {
    background: #e9eef7 !important;
    color: #0b1220 !important;
    border-bottom-color: #9aa4b7 !important;
}

.package-switcher {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.package-switcher-title {
    font-size: 13px;
    color: var(--text);
    opacity: 0.85;
    padding: 0 2px;
}

.package-switcher-list {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 8px;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: 172px;
    padding-bottom: 0;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.package-switcher-tab {
    flex: 0 0 calc((100% - 24px) / 4);
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1200px) {
    .package-switcher-tab {
        flex-basis: calc((100% - 16px) / 3);
    }
}

@media (max-width: 900px) {
    .package-switcher-tab {
        flex-basis: calc((100% - 8px) / 2);
    }
}

@media (max-width: 560px) {
    .package-switcher-tab {
        flex-basis: 100%;
    }
}

.package-switcher-tab.is-active,
.package-switcher-tab.is-active:hover,
.package-switcher-tab.is-active:active {
    background: linear-gradient(135deg, #4a9eff 0%, #357abd 100%);
    border-color: rgba(74, 158, 255, 0.5);
    color: #ffffff;
    opacity: 1;
}

.package-switcher-tab:disabled {
    cursor: default;
}

#package_edit_form{
    background-color: transparent;
    padding: 0px;
    border: none;
    box-shadow: none;
}

#package_edit_layout{
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(280px, 30vw, 340px);
    align-items: start;
    gap: 16px;
    width: 100%;
    min-width: 0;
}

#package_edit_layout #package_edit_form{
    flex: 1 1 auto;
    min-width: 0;
}

#package_edit_layout #widths .column{
    display: flex;
    flex-direction: column;
    grid-template-columns: 1fr;
    grid-template-rows: none;
    gap: 12px;
}

#package_edit_layout #add_new_deska{
    width: clamp(280px, 30vw, 340px);
    min-width: 0;
    max-width: 100%;
    align-self: flex-start;
    position: sticky;
    top: 12px;
}

#package_edit_layout #add_new_deska .package-switcher-list{
    max-height: 220px;
}

#package_edit_layout #add_new_deska #numpad button,
#package_edit_layout #add_new_deska .package-switcher-tab {
    min-height: 48px;
}

.info{
    background: linear-gradient(145deg, #3a3a3a 0%, #2a2a2a 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.manage-users .row{
    flex-wrap: nowrap;
}

.manage-users .group-list label{
    padding: 9px 0px;
}

.manage-users .row input{
    width: min-content;
    margin-left: 9px;
}

.manage-users table.sortable th:last-child,
.manage-users table.sortable td:last-child{
    width: 1%;
    white-space: nowrap;
    text-align: center;
}

.manage-users table .icon-btn{
    width: 30px;
    height: 30px;
    min-width: 30px;
    padding: 0;
    margin: 0 2px;
    border-radius: 6px;
}

.manage-users table .icon-btn .material-symbols-outlined{
    font-size: 18px;
}

body.modal-open{
    overflow: hidden !important;
}

.modal-backdrop{
    position: fixed !important;
    inset: 0 !important;
    z-index: 30000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 18px !important;
    background: rgba(11, 18, 32, 0.42) !important;
    backdrop-filter: blur(2px);
}

.modal-backdrop[hidden]{
    display: none !important;
}

.modal-card{
    width: min(960px, 96vw) !important;
    max-height: calc(100dvh - 36px) !important;
    overflow: auto !important;
    border-radius: 12px !important;
    border: 2px solid var(--border) !important;
    background: var(--surface) !important;
    color: var(--text) !important;
    box-shadow: 0 18px 40px rgba(11, 18, 32, 0.28) !important;
    padding: 16px !important;
}

.modal-header{
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    background: inherit;
    border-bottom: 1px solid var(--border);
}

.modal-card form{
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

#package-edit-modal form{
    display: grid !important;
    grid-template-columns: repeat(2, minmax(230px, 1fr));
    gap: 12px !important;
}

#package-edit-modal form > .column{
    gap: 6px !important;
}

#package-edit-modal form > .row,
#package-edit-modal #package-edit-length-mixed-wrap,
#package-edit-modal #package-edit-length-input-wrap{
    grid-column: span 1;
}

#package-edit-modal form > .row{
    grid-column: 1 / -1;
    justify-content: flex-end;
    margin-top: 6px;
}

@media (max-width: 840px){
    #package-edit-modal form{
        grid-template-columns: 1fr;
    }
}

body[data-contrast="normal"] .modal-backdrop{
    background: rgba(6, 8, 12, 0.68) !important;
}

body[data-contrast="normal"] .modal-card{
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    background: linear-gradient(145deg, #2d2d2d 0%, #1a1a1a 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55) !important;
}

body[data-contrast="normal"] .modal-header{
    border-bottom-color: rgba(255, 255, 255, 0.12) !important;
}

.pakiety-tabela th:last-child,
.pakiety-tabela td:last-child{
    width: 1%;
    white-space: nowrap;
    text-align: center;
}

.pakiety-tabela .icon-btn{
    width: 30px;
    height: 30px;
    min-width: 30px;
    padding: 0;
    margin: 0 2px;
    border-radius: 6px;
}

.pakiety-tabela .icon-btn .material-symbols-outlined{
    font-size: 18px;
}

.sales-table .icon-btn{
    width: 30px;
    height: 30px;
    min-width: 30px;
    flex: 0 0 30px;
    padding: 0;
    margin: 0 2px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.sales-table .icon-btn .material-symbols-outlined{
    font-size: 18px;
}

.sales-table th:last-child,
.sales-table td:last-child{
    width: 1%;
    white-space: nowrap;
    text-align: center;
}

.searchable-select {
    position: relative;
    width: 100%;
}

.searchable-select input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    background: linear-gradient(145deg, #2a2a2a 0%, #1e1e1e 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.searchable-select input[type="text"]:focus {
    outline: none;
    border-color: #4a9eff;
    box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.2);
    background: linear-gradient(145deg, #333333 0%, #272727 100%);
}

.dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(145deg, #2a2a2a 0%, #1e1e1e 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
    font-size: 14px;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #4a9eff;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item.selected {
    background: linear-gradient(135deg, #4a9eff 0%, #357abd 100%);
    color: white;
}

.dropdown-item.keyboard-selected {
    background: rgba(74, 158, 255, 0.2);
    border-left: 3px solid #4a9eff;
    color: #4a9eff;
}

/* Styles for readonly elements */
.myreadonly, input[readonly], select[disabled] {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%) !important;
    color: rgba(255, 255, 255, 0.6) !important;
    cursor: not-allowed !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
}

.myreadonly:hover, input[readonly]:hover, select[disabled]:hover {
    border-color: rgba(255, 255, 255, 0.05) !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%) !important;
}

/* Status indicators */
.status-sold {
    color: #ff6b6b !important;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(255, 107, 107, 0.3);
}

.status-available {
    color: #51cf66 !important;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(81, 207, 102, 0.3);
}

.status-reserved {
    color: #ffd43b !important;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(255, 212, 59, 0.3);
}

/* Enhanced table rows */
tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

tr:hover {
    background: rgba(74, 158, 255, 0.1) !important;
}

tr.recently-added-row td {
    background: rgba(81, 207, 102, 0.18) !important;
    border-top-color: rgba(81, 207, 102, 0.35) !important;
}

tr.recently-added-row:hover td {
    background: rgba(81, 207, 102, 0.26) !important;
}

/* Form improvements */
h2, h3, h4 {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    margin: 16px 0 0 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

h2 {
    font-size: 24px;
    border-bottom: 2px solid rgba(74, 158, 255, 0.3);
    padding-bottom: 8px;
}

h3 {
    font-size: 18px;
    color: #4a9eff;
}

/* Checkbox styling */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #4a9eff;
    cursor: pointer;
}

/* Select styling */
select {
    background: linear-gradient(145deg, #2a2a2a 0%, #1e1e1e 100%), url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: 0 0, right 12px center;
    background-repeat: no-repeat, no-repeat;
    background-size: auto, 16px;
    padding-right: 10px;
    color-scheme: dark; /* Wymusza ciemny motyw dla opcji */
    transition: border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Tylko transition dla border i background, bez arrow */
}

/* Option styling - ograniczone wsparcie przeglądarek */
option {
    background: #2a2a2a !important;
    color: #ffffff !important;
    padding: 8px 12px;
    border: none;
}

option:hover, option:focus {
    background: #4a9eff !important;
    color: white !important;
}

option:checked {
    background: #4a9eff !important;
    color: white !important;
    font-weight: 600;
}

/* Alternatywne podejście dla Webkit przeglądarek */
select::-webkit-scrollbar {
    width: 8px;
}

select::-webkit-scrollbar-track {
    background: #2a2a2a;
}

select::-webkit-scrollbar-thumb {
    background: #4a9eff;
    border-radius: 4px;
}


/* Animacje wyłączone - Enhanced animations removed */

/* Improved focus states */
*:focus-visible {
    outline: 2px solid #4a9eff;
    outline-offset: 2px;
}

/* Enhanced dropdown - bez animacji */
.dropdown-list {
    opacity: 1;
}

/* Loading states - bez animacji */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #4a9eff;
    border-radius: 50%;
}

/* Improved tooltips - bez animacji */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
}

/* Improved notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    animation: slideInRight 0.4s ease-out;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.notification.success {
    background: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
}

.notification.error {
    background: linear-gradient(135deg, #ff6b6b 0%, #fa5252 100%);
}

.notification.warning {
    background: linear-gradient(135deg, #ffd43b 0%, #fab005 100%);
    color: #000;
}

/* Firefox scrollbar styling */
html {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.05);
}


@media (pointer: coarse) or (max-width: 940px) {
    body{
        flex-direction: column;
    }

    .login-form{
        align-self: flex-start;
        margin-top: 30px;
    }

    main{
        padding: 0px;
        flex-wrap: nowrap;
    }

    nav{
        position: absolute;
        height: 64px;
        max-height: 100dvh;
        overflow: hidden;
        padding: 0px;
        width: 100%;
        z-index: 100;
        background: linear-gradient(180deg, #2a2a2a 0%, #1f1f1f 100%);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    }

    nav .row{
        justify-content: end;
        flex-direction: row-reverse;
        margin-bottom: -15px;
        gap: 0px;
        position: sticky;
        top: 0px;
        z-index: 101;
    }

    .menubtn{
        display: flex;
        position: relative;
        width: 64px;
        z-index: 102;
        height: 64px;
        align-items: center;
        border-radius: 12px;
        padding-left: 20px;
        background: linear-gradient(135deg, #4a9eff 0%, #357abd 100%);
    }

    .menuicon{
        position: absolute;
        transform: rotate(0deg);
        clip-path: polygon(0 0, 0 40%, 0 60%, 0 100%, 100% 100%, 100% 61%, 100% 60%, 100% 40%, 100% 40%, 100% 0);
        color: white;
        font-size: 24px;
    }

    .closeicon{
        opacity: 0;
        transform: rotate(45deg);
        clip-path: polygon(100% 0, 100% 0, 100% 0, 0 100%, 0 100%, 0 100%);
        color: white;
        font-size: 24px;
    }

    #navchbx:checked ~ label .menuicon{
        transform: rotate(45deg);
        clip-path: polygon(0% 0, 0% 40%, 0% 60%, 0% 100%, 0% 100%, 0% 60%, 100% 60%, 100% 40%, 0% 40%, 0% 0);
    }

    #navchbx:checked ~ label .closeicon{
        opacity: 1;
        transform: rotate(90deg);
        clip-path: polygon(0 0, 100% 0, 100% 100%, 100% 100%, 0 100%, 0 0);
    }

    @keyframes enableScroll {
        to {
            overflow: auto;
        }
    }

    #navchbx:checked ~ nav{
        height: 100%;
        animation: enableScroll 0s linear 0.4s forwards;
    }

    #package_edit_form{
        max-height: 100%;
        height: 100%;
        overflow: hidden;
    }

    /* Mobile table improvements */
    table {
        font-size: 12px;
    }
    
    td, th {
        padding: 8px 4px;
    }
    
    .searchable-select input[type="text"] {
        padding: 10px 12px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    button, .button {
        padding: 12px 16px;
        font-size: 16px;
        min-height: 44px; /* Better touch targets */
    }

    /* Mobile-friendly numpad adjustments */
    #numpad{
        grid-template-columns: repeat(4, 1fr) !important; /* 4 kolumny na węższych ekranach */
        gap: 8px !important; /* mniejsze odstępy */
        padding: 8px !important; /* mniejsze paddingi */
        border-radius: 10px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    #numpad button{
        font-size: 15px !important;
        padding: 8px !important;
        min-height: 44px !important; /* lepszy target dotykowy */
        aspect-ratio: auto !important;
        white-space: nowrap !important;
    }

    /* Jeżeli istnieją specjalne przyciski szerokie, pozwól im zajmować 2 kolumny */
    #numpad .wide{
        grid-column: span 2 !important;
    }

    /* Jeśli numpad jest wewnątrz kontenera, upewnij się, że nie rozszerza go poza ekran */
    #numpad, #numpad * {
        max-width: 100% !important;
    }

    /* Wyczyść marginesy/paddingi w rodzicu numpada, jeśli powodują overflow */
    .numpad-wrapper{
        padding: 8px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    /* Dodatkowo zmniejsz padding formularzy na mobilkach (jeśli nadal za dużo miejsca) */
    form{
        padding: 12px !important;
    }

    .column{
        padding: 0px !important;
        padding-top: 8px !important;
    }

    .package-switcher-title {
        font-size: 14px;
    }

    .package-switcher-tab {
        min-height: 44px;
        font-size: 14px;
        padding: 10px 14px;
    }

    #package_edit_layout{
        grid-template-columns: minmax(0, 1fr) minmax(240px, 34vw);
        overflow: hidden;
    }

    #package_edit_layout #package_edit_form{
        min-width: 0;
    }

    #package_edit_layout #add_new_deska{
        width: 100%;
        min-width: 0;
        max-width: 100%;
        top: 8px;
    }

    #package_edit_layout #add_new_deska #numpad{
        gap: 10px !important;
    }

    #package_edit_layout #add_new_deska #numpad button,
    #package_edit_layout #add_new_deska .package-switcher-tab {
        min-height: 50px;
    }

    #package_edit_layout #add_new_deska .package-switcher-list{
        max-height: min(34dvh, 240px);
    }
}

@media (max-width: 700px) {
    #package_edit_layout{
        grid-template-columns: minmax(0, 1fr) minmax(220px, 42vw);
        gap: 12px;
    }

    #package_edit_layout #add_new_deska .package-switcher-list{
        max-height: min(30dvh, 200px);
    }
}

@media ((pointer: coarse) or (max-width: 940px)) and (orientation: portrait){
    main{
        flex-direction: column;
    }

    main > *{
        width: 100%;
    }
}

@media ((pointer: coarse) or (max-width: 940px)) and (orientation: landscape){
    main{
        flex-direction: row;
    }

    main > *{
        flex: 1;
        width: unset;
    }

    form{
        min-width: unset;
    }
}

/* Enhanced print styles */
@media print {
    body, main, .column, .row, table, th, td, textarea, input, select, button, .details {
        background: #fff !important;
        color: #000 !important;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        text-shadow: none !important;
    }
    
    * {
        color: #000 !important;
        background: #fff !important;
        text-shadow: none !important;
        border-radius: 0 !important;
        border-color: #ddd !important;
    }
    
    /* Hide interactive elements */
    a, button, .button, nav, .error, .user_icon, .menubtn, .menuicon, .closeicon, 
    .group, .group-list-wrapper, .group-list, .arrow, .active, .line, .center,
    .dropdown-list, .searchable-select input[type="text"]::after {
        display: none !important;
    }
    
    /* Clean form styling */
    form {
        background: #fff !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        page-break-inside: avoid;
    }
    
    /* Professional table styling */
    th, td {
        border: 1px solid #333 !important;
        padding: 8px !important;
        font-size: 12px !important;
    }
    
    th {
        background: #f5f5f5 !important;
        font-weight: bold !important;
        text-align: center !important;
    }
    
    table {
        background: #fff !important;
        color: #000 !important;
        border: 2px solid #333 !important;
        width: 100% !important;
        border-collapse: collapse !important;
        page-break-inside: avoid;
        margin-bottom: 20px !important;
    }
    
    /* Input styling for printed forms */
    textarea, input, select {
        background: #fff !important;
        color: #000 !important;
        border: 1px solid #333 !important;
        padding: 4px !important;
    }
    
    /* Headers */
    h2, h3, h4, label {
        color: #000 !important;
        background: #fff !important;
        text-shadow: none !important;
        font-weight: bold !important;
        margin-bottom: 10px !important;
    }
    
    h2 {
        border-bottom: 2px solid #333 !important;
        padding-bottom: 5px !important;
        font-size: 18px !important;
    }
    
    h3 {
        font-size: 16px !important;
    }
    
    /* Package details styling */
    .details, .opis-pakietu {
        background: #fff !important;
        color: #000 !important;
        border: 1px solid #333 !important;
        padding: 10px !important;
        margin: 10px 0 !important;
    }
    
    /* Page settings */
    @page {
        size: A4;
        margin: 15mm;
        background: #fff;
    }
    
    /* Prevent page breaks in important sections */
    .row, .column {
        page-break-inside: avoid;
    }
    
    /* Show URLs for important links */
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 10px;
        color: #666;
    }
}

/* Full sun high-contrast override */
:root {
    --bg-dark: #f4f6fa;
    --bg-mid: #eef2f8;
    --surface: #ffffff;
    --accent: #0048b3;
    --text: #0b1220;
    --muted: #e6ebf2;
    --success: #0f6f2b;
    --danger: #a01919;
    --warning: #8a5a00;
    --border: #8a94a6;
    --surface-light: #f2f5fa;
}

* {
    text-shadow: none !important;
}

body,
main {
    background: #f4f6fa !important;
    color: #0b1220 !important;
}

nav,
form,
.info table,
table,
.details,
.opis-pakietu,
.group-list,
.dropdown-list {
    background: #ffffff !important;
    border: 2px solid #8a94a6 !important;
    box-shadow: 0 1px 2px rgba(11, 18, 32, 0.06) !important;
}

a,
label,
th,
td,
span,
p,
h2,
h3,
h4 {
    color: #0b1220 !important;
}

a:hover {
    background: #dbe7ff !important;
}

.active,
a.active,
.dropdown-item.selected,
.dropdown-item.keyboard-selected {
    background: #0048b3 !important;
    color: #ffffff !important;
    border-left-color: #003a91 !important;
}

th {
    background: #e9eef7 !important;
    border-color: #9aa4b7 !important;
}

td {
    background: #ffffff !important;
    border-top: 1px solid #c1c9d6 !important;
    border-right: 1px solid #c1c9d6 !important;
}

tr:nth-child(even) td {
    background: #f6f8fc !important;
}

tr:hover td,
td:hover {
    background: #eaf1ff !important;
}

input:not([type="checkbox"]),
select,
option,
textarea,
button,
.button {
    background: #ffffff !important;
    color: #0b1220 !important;
    border: 2px solid #6b7485 !important;
}

input:hover,
select:hover,
textarea:hover,
button:hover,
.button:hover,
input.numpad_usage {
    background: #f2f6ff !important;
    border-color: #495466 !important;
}

input:focus,
select:focus,
textarea:focus {
    background: #ffffff !important;
    border-color: #0048b3 !important;
    box-shadow: 0 0 0 3px rgba(0, 72, 179, 0.24) !important;
    outline: none !important;
}

button,
.button {
    background: #e7edf6 !important;
    color: #0b1220 !important;
    font-weight: 600;
}

.button-success {
    background: #0f6f2b !important;
    color: #ffffff !important;
    border-color: #0b4f1f !important;
}

.button-danger {
    background: #a01919 !important;
    color: #ffffff !important;
    border-color: #760f0f !important;
}

.error,
.status-sold {
    color: #a01919 !important;
}

.status-available {
    color: #0f6f2b !important;
}

.status-reserved {
    color: #8a5a00 !important;
}

.flash {
    background: #ffffff !important;
    border: 2px solid #8a94a6 !important;
}

.flash-success {
    background: #e9f7ee !important;
    border-color: #0f6f2b !important;
}

.flash-error {
    background: #fdecec !important;
    border-color: #a01919 !important;
}

.flash-warning {
    background: #fff6dd !important;
    border-color: #8a5a00 !important;
}

.myreadonly,
input[readonly],
select[disabled] {
    background: #edf1f6 !important;
    color: #3b4453 !important;
    border-color: #9aa4b7 !important;
}

.contrast-toggle-btn {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 10050;
    padding: 10px 14px;
    border-radius: 999px;
    border: 2px solid #0048b3;
    background: #ffffff;
    color: #0b1220;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(11, 18, 32, 0.2);
}

.contrast-toggle-icon {
    font-size: 16px;
    line-height: 1;
}

.contrast-toggle-btn:hover {
    background: #eaf1ff;
    border-color: #003a91;
}

.contrast-toggle-btn.is-in-nav {
    position: static;
    right: auto;
    bottom: auto;
    margin: 2px 8px 2px 0;
    padding: 10px 12px;
    box-shadow: none;
    min-height: 44px;
}

body[data-contrast="normal"] {
    --bg-dark: #1a1a1a;
    --bg-mid: #2a2a2a;
    --surface: #2d2d2d;
    --accent: #4a9eff;
    --text: #ffffff;
    --muted: rgba(255,255,255,0.06);
    --success: #018718;
    --danger: #ff6b6b;
    --warning: #ffd43b;
}

body[data-contrast="normal"],
body[data-contrast="normal"] main {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
    color: #ffffff !important;
}

body[data-contrast="normal"] nav,
body[data-contrast="normal"] form,
body[data-contrast="normal"] .info table,
body[data-contrast="normal"] table,
body[data-contrast="normal"] .details,
body[data-contrast="normal"] .opis-pakietu,
body[data-contrast="normal"] .group-list,
body[data-contrast="normal"] .dropdown-list {
    background: linear-gradient(145deg, #2d2d2d 0%, #1a1a1a 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
}

body[data-contrast="normal"] a,
body[data-contrast="normal"] label,
body[data-contrast="normal"] th,
body[data-contrast="normal"] td,
body[data-contrast="normal"] span,
body[data-contrast="normal"] p,
body[data-contrast="normal"] h2,
body[data-contrast="normal"] h3,
body[data-contrast="normal"] h4 {
    color: #ffffff !important;
}

body[data-contrast="normal"] a:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

body[data-contrast="normal"] .active,
body[data-contrast="normal"] a.active,
body[data-contrast="normal"] .dropdown-item.selected,
body[data-contrast="normal"] .dropdown-item.keyboard-selected {
    background: linear-gradient(135deg, #4a9eff 0%, #357abd 100%) !important;
    color: #ffffff !important;
}

body[data-contrast="normal"] th {
    background: transparent !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body[data-contrast="normal"] td {
    background: rgba(255, 255, 255, 0.02) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
}

body[data-contrast="normal"] tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.02) !important;
}

body[data-contrast="normal"] tr:hover td,
body[data-contrast="normal"] td:hover {
    background: rgba(74, 158, 255, 0.1) !important;
}

body[data-contrast="normal"] input:not([type="checkbox"]),
body[data-contrast="normal"] select,
body[data-contrast="normal"] option,
body[data-contrast="normal"] textarea,
body[data-contrast="normal"] button,
body[data-contrast="normal"] .button {
    background: linear-gradient(145deg, #2a2a2a 0%, #1e1e1e 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body[data-contrast="normal"] input:hover,
body[data-contrast="normal"] select:hover,
body[data-contrast="normal"] textarea:hover,
body[data-contrast="normal"] button:hover,
body[data-contrast="normal"] .button:hover,
body[data-contrast="normal"] input.numpad_usage {
    background: linear-gradient(145deg, #333333 0%, #272727 100%) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

body[data-contrast="normal"] input:focus,
body[data-contrast="normal"] select:focus,
body[data-contrast="normal"] textarea:focus {
    border-color: #4a9eff !important;
    box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.2) !important;
}

body[data-contrast="normal"] .button-success {
    background: linear-gradient(135deg, #2c8f3a 0%, #187426 100%) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

body[data-contrast="normal"] .button-danger {
    background: linear-gradient(135deg, #cc3b3b 0%, #a12929 100%) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

body[data-contrast="normal"] .error,
body[data-contrast="normal"] .status-sold {
    color: #ff6b6b !important;
}

body[data-contrast="normal"] .status-available {
    color: #51cf66 !important;
}

body[data-contrast="normal"] .status-reserved {
    color: #ffd43b !important;
}

body[data-contrast="normal"] .flash {
    background: linear-gradient(145deg, #2a2a2a 0%, #1e1e1e 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

body[data-contrast="normal"] .flash-success {
    background: linear-gradient(135deg, rgba(81, 207, 102, 0.2) 0%, rgba(64, 192, 87, 0.18) 100%) !important;
    border-color: rgba(81, 207, 102, 0.5) !important;
}

body[data-contrast="normal"] .flash-error {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.2) 0%, rgba(250, 82, 82, 0.18) 100%) !important;
    border-color: rgba(255, 107, 107, 0.55) !important;
}

body[data-contrast="normal"] .flash-warning {
    background: linear-gradient(135deg, rgba(255, 212, 59, 0.2) 0%, rgba(250, 176, 5, 0.16) 100%) !important;
    border-color: rgba(255, 212, 59, 0.5) !important;
}

body[data-contrast="normal"] .myreadonly,
body[data-contrast="normal"] input[readonly],
body[data-contrast="normal"] select[disabled] {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%) !important;
    color: rgba(255, 255, 255, 0.6) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
}

nav .group-list a.button,
nav .row > a {
    background: #eef3fb !important;
    color: #0b1220 !important;
    border: 2px solid #8993a6 !important;
    box-shadow: none !important;
    font-weight: 700;
}

nav .group-list a.button:hover,
nav .row > a:hover {
    background: #dfe9fb !important;
    border-color: #5f6b7f !important;
}

nav .group-list a.button.active,
nav .row > a.active {
    background: #0048b3 !important;
    color: #ffffff !important;
    border-color: #003a91 !important;
}

body[data-contrast="normal"] nav .group-list a.button,
body[data-contrast="normal"] nav .row > a {
    background: linear-gradient(135deg, #3d4f5c 0%, #2a3a47 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

body[data-contrast="normal"] nav .group-list a.button:hover,
body[data-contrast="normal"] nav .row > a:hover {
    background: linear-gradient(135deg, #4a5d6a 0%, #345058 100%) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

body[data-contrast="normal"] nav .group-list a.button.active,
body[data-contrast="normal"] nav .row > a.active {
    background: linear-gradient(135deg, #4a9eff 0%, #357abd 100%) !important;
    color: #ffffff !important;
}

nav .group > label.group-title {
    background: linear-gradient(135deg, #2f3947 0%, #1f2a36 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

nav .group > label.group-title:hover {
    background: linear-gradient(135deg, #3a4758 0%, #2a3747 100%) !important;
}

body[data-contrast="normal"] nav .group > label.group-title {
    background: linear-gradient(135deg, #2f3947 0%, #1f2a36 100%) !important;
    color: #ffffff !important;
}

main .group > label.group-title {
    background: #e9eef7 !important;
    color: #0b1220 !important;
    border: 1px solid #9aa4b7 !important;
}

main .group > label.group-title:hover {
    background: #dfe7f5 !important;
}

body[data-contrast="normal"] main .group > label.group-title {
    background: #2f3947 !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

body[data-contrast="normal"] main .group > label.group-title:hover {
    background: #3a4758 !important;
}

@media (pointer: coarse) or (max-width: 940px) {
    .contrast-toggle-btn {
        right: 10px;
        bottom: 10px;
        padding: 9px 12px;
        font-size: 13px;
    }

    .contrast-toggle-btn.is-in-nav {
        width: 44px;
        min-width: 44px;
        padding: 8px;
        justify-content: center;
        gap: 0;
        margin: 0 6px 0 0;
    }

    .contrast-toggle-btn.is-in-nav span:last-child {
        display: none;
    }
}
