* {
    box-sizing: border-box;
}

.card {
    background-color: transparent !important;
}

html, body {
    min-height: 100%;
}

html {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

html::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* действует во время перетаскивания и инерции */
html.is-dragging {
    scroll-behavior: auto !important; /* отключаем smooth, если он задан на сайте */
}

html.is-dragging body {
    user-select: none;
    -webkit-user-select: none;
}

html.is-dragging,
html.is-dragging * {
    cursor: grabbing !important;
}

body {
    margin: 0;
    /*cursor: pointer;*/
    display: grid;
    place-items: center;
    font-family: Arial, sans-serif;
    color: #fff !important;
    background: radial-gradient(ellipse at 50% 20%, #283e80, transparent 55%),
    linear-gradient(135deg, #080f2d, #182c5c, #351e60);


}

main {
    text-align: center;
    padding: 20px;
}

h1 {
    font-size: clamp(30px, 6vw, 48px);
    margin: 0 0 24px;
}

.container-kiosk {
    max-width: 777px;
    margin: 0 auto;
    padding: 18px;
}

.temperature-frame {
    width: 100%;
    height: 108px;
    border: 0;
    display: block;
}

.kiosk-monitor {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 10px;
    background: #212529;
    color: #dee2e6;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
}

.kiosk-monitor strong {
    color: #fff;
    font-weight: 600;
}

.kiosk-monitor .status-on {
    color: #20c997;
}

.kiosk-monitor .status-off {
    color: #adb5bd;
}

.back-button {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 1050;
    min-width: 112px;
}


.forward-button {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1050;
    min-width: 112px;
}

.kiosk-card {
    border: 0;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .07);
    background-color: #0d2342;
}

.temp-value {
    font-size: 1.6rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.temp-label {
    color: #6c757d;
    font-size: .85rem;
}

.form-control, .btn {
    min-height: 48px;
    font-size: 1.05rem;
}

.page-title {
    font-weight: 700;
    margin: 12px 0 20px;
}

.action-row {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 22px;
}

#connection-state {
    font-size: .8rem;
    text-align: center;
}

/**********/

.hardware-status {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 8px 12px;
}

.hardware-status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.hardware-status-item > span {
    width: 100px;
}

.status-on {
    color: #198754;
}

.status-off {
    color: #dc3545;
}

#temp-light {
    white-space: nowrap;
}

.img-inline {
    display: block;
    margin: 20px auto; /* центрирование + отступы сверху/снизу */
    max-width: 100%; /* не вылезает за контейнер */
    border-radius: 12px; /* скругление углов */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4); /* мягкая тень */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}


/* Отключаем системное выделение текста при перетаскивании */
body.tablet-mode {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    /*cursor: grab;*/
}

body.tablet-mode.is-dragging {
    /*cursor: grabbing;*/
}

/* Тестовый контент для проверки скролла */
.content {
    height: 3000px;
    background: linear-gradient(180deg, #f0f4f8 0%, #d9e2ec 50%, #bcccdc 100%);
    padding: 40px;
    font-family: sans-serif;
}

.form-check-input {
    transform: scale(3);
    transform-origin: left center;
}

.form-check-label {
    margin-left: 25px;
}

.form-label {
    color: #d0d0d0;
    font-size: 1.15rem;
    margin-bottom: 8px;
    font-weight: 400;
}

.form-select {
    background-color: #444444;
    color: #f0a030;
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 1.1rem;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23f0a030' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    width: stretch;
}

.form-select:focus {
    background-color: #444444;
    color: #f0a030;
    border-color: #f0a030;
    box-shadow: 0 0 0 0.2rem rgba(240, 160, 48, 0.25);
}

.form-select option {
    background-color: #444444;
    color: #f0a030;
}