body {
    font-family: system-ui, sans-serif;
    background: #f9f9f9;
    margin: 0;
    padding: 0;
}

.top-bar, .sidebar {
    background: #fff;
    border-bottom: 1px solid #eee;
}

.card {
    background: white;
    margin-top: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.sidebar a {
    display: block;
    padding: 0.75rem 1rem;
    color: #565656;
    text-decoration: none;
}

.sidebar a:hover {
    background-color: #f0f0f0;
}

h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

/* ========== Form Elements ========== */
.readonly-select {
    pointer-events: none;
    background: #eee;
    color: #666;
}

/* ========== Layout Helpers ========== */
.card {
    margin: 0;
    overflow-y: auto !important;
    /*min-height: calc(100vh - 5.2rem);*/
}

.min-height-by-content {
    min-height: 8rem;
}

.oee-chart {
    height: 400px;
}

/* ========== Buttons & Badges ========== */
.button {
    margin: 0.5rem 0.5rem 0.5rem 0 !important;
}

.badge {
    border-radius: 0.3rem;
    font-size: 0.7rem;
}

/* ========== Table Styles ========== */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th, td {
    padding: 0.6rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

/* ========== Breakdown (History & Active) ========== */
.breakdown-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.breakdown-item {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
    margin: 1rem 0;
    border-radius: 0.3rem;
}

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

.breakdown-item .info {
    flex: 1 1 50%;
    min-width: 200px;
}

.breakdown-item .info .desc {
    color: #555;
    font-size: 0.8rem;
    margin-top: 0.2rem;
}

.breakdown-item .times {
    text-align: right;
    font-size: 0.8rem;
    color: #333;
    min-width: 100px;
}

.breakdown-item .duration {
    display: block;
    color: #888;
    margin-top: 0.2rem;
}

.breakdown-item .actions {
    margin-left: 1rem;
}

/* ========== Status Indicators ========== */
.status-icon {
    font-size: 1.4rem;
    margin-left: 0.5rem;
}

.status-true {
    color: #3adb76;
}

.status-false {
    color: #ec5840;
}

/* ========== Flash & Logs ========== */
.flash-message {
    transition: opacity 0.5s ease-out;
}

.flash-message.hide {
    opacity: 0;
}

.log-panel {
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 0.5rem;
    max-height: 70vh;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.9rem;
    border: 1px solid #ddd;
}

.log-entry {
    border-bottom: 1px solid #e1e1e1;
    padding: 0.5rem 0;
}

.log-timestamp {
    color: #999;
    margin-right: 1em;
    white-space: nowrap;
}

.log-level {
    font-weight: bold;
    text-transform: uppercase;
    margin-right: 1em;
}

.log-level-verification {
    color: #0c0c27 !important
}

.log-level-pass {
    color: #5ab84b !important
}

.log-level-info {
    color: #2196F3;
}

.log-level-warning {
    color: #ff9800;
}

.log-level-error {
    color: #d9534f;
}

.log-level-debug {
    color: #666;
}

.log-level-critical {
    color: #e91e63;
}

.log-level-verification-bg {
    background: rgba(61, 61, 175, 0.2) !important
}

.log-level-pass-bg {
    background: rgba(90, 184, 75, 0.1) !important;
}

.log-level-info-bg {
    background: rgba(33, 150, 243, 0.1) !important;
}

.log-level-warning-bg {
    background: rgba(255, 152, 0, 0.1) !important;
}

.log-level-alert-bg {
    background: rgba(255, 152, 0, 0.1) !important;
}

.log-level-error-bg {
    background: rgba(217, 83, 79, 0.1) !important;
}

.log-level-debug-bg {
    background: rgba(102, 102, 102, 0.1) !important;
}

.log-level-critical-bg {
    background: rgba(233, 30, 99, 0.1) !important;
}

.log-level-emergency-bg {
    background: rgba(255, 0, 29, 0.35) !important;
}

/* ========== Dropdown ========== */
.menu li.dropdown {
    position: relative;
}

.menu li.dropdown ul {
    display: none;
    position: absolute;
    right: -1rem;
    top: 100%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    padding: 0;
    margin: 0;
    list-style: none;
    z-index: 1000;
}

.menu li.dropdown:hover > ul {
    display: block;
}

.menu li.dropdown ul li a {
    display: block;
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
}

.menu li.dropdown ul li a:hover {
    background: #eee;
}

.menu li.dropdown > a::after {
    /*content: " ▼";*/
    font-size: 0.6em;
    margin-left: 4px;
}

/* ========== Summary Cards ========== */
.summary-cards .card {
    border-radius: 12px;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.summary-cards .success {
    background: #28a745;
}

.summary-cards .primary {
    background: #007bff;
}

.summary-cards .warning {
    background: #ffc107;
    color: #333;
}

.summary-cards .alert {
    background: #dc3545;
}

.top-bar ul {
    background: transparent;
}

a.button {
    padding: 0.6rem 1rem !important;
    margin: 1rem 0 !important;
}

.switch-toggle-wrapper {
    display: flex;
    margin-bottom: 1rem;
    justify-content: space-between;
    align-items: center;

    .switch {
        margin-bottom: 0;
    }
}

.custom-checkbox {
    display: flex;
    justify-content: space-between;
    align-content: center;
    align-items: baseline;
    flex-wrap: wrap;
}

.custom-checkbox label:nth-child(odd) {
    background-color: #000;
}

.min-height-vh-4 {
    min-height: calc(100vh / 4);
}

.max-height-vh-10 {
    max-height: calc(100vh / 2);
}

.chart-canvas {
    height: 300px;
}

.element {
    display: flex;
    position: relative;
    align-items: center;
}

/*.tool-code-input input {*/
/*    margin: 0;*/
/*}*/

.element button {
    margin: 0 !important;
    position: absolute;
    right: 0.1rem;
    top: 0.15rem !important;
}

.max-height-50vh {
    max-height: calc((100vh - 100px) / 2);
}

.image_codes {
    padding-left: 0 !important;
}

.padding-left-1 {
    padding-left: 1rem !important;
}

.logo {
    width: 100%;
    max-width: 70rem;
    height: 12rem;
    box-sizing: border-box;
}

.cover-page {
    background-color: #1d2144;
}

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


.calendar-contain {
    position: relative;
    left: 0;
    right: 0;
    border-radius: 0;
    width: 100%;
    overflow: hidden;
    /*max-width: 1020px;*/
    min-width: 450px;
    margin: 1rem auto;
    color: #040605;
}

@media screen and (min-width: 55em) {
    .calendar-contain {
        margin: auto;
        top: 5%;
    }
}

.title-bar {
    position: relative;
    width: 100%;
    display: table;
    text-align: right;
    background: #ffffff;
    padding: 0.5rem;
    margin-bottom: 0;
}

.title-bar:after {
    display: table;
    clear: both;
}

.title-bar__burger {
    display: block;
    position: relative;
    float: left;
    overflow: hidden;
    margin: 0;
    padding: 0;
    width: 38px;
    height: 30px;
    font-size: 0;
    text-indent: -9999px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-shadow: none;
    border-radius: none;
    border: none;
    cursor: pointer;
    background: none;
}

.title-bar__burger:focus {
    outline: none;
}

.burger__lines {
    display: block;
    position: absolute;
    width: 18px;
    top: 15px;
    left: 0;
    right: 0;
    margin: auto;
    height: 1px;
    /*background: #040605;*/
}

.burger__lines:before, .burger__lines:after {
    position: absolute;
    display: block;
    left: 0;
    width: 100%;
    height: 1px;
    /*background-color: #040605;*/
    content: "";
}

.burger__lines:before {
    top: -5px;
}

.burger__lines:after {
    bottom: -5px;
}

.title-bar__year {
    display: block;
    position: relative;
    float: left;
    font-size: 1rem;
    line-height: 30px;
    width: 43%;
    padding: 0 0.5rem;
    text-align: left;
}

@media screen and (min-width: 55em) {
    .title-bar__year {
        width: 27%;
    }
}

.title-bar__month {
    position: relative;
    float: left;
    font-size: 1rem;
    line-height: 30px;
    width: 22%;
    padding: 0 0.5rem;
    text-align: left;
}

@media screen and (min-width: 55em) {
    .title-bar__month {
        width: 12%;
    }
}

.title-bar__month:after {
    content: "";
    display: inline;
    position: absolute;
    width: 10px;
    height: 10px;
    right: 0;
    top: 5px;
    margin: auto;
    border-top: 1px solid black;
    border-right: 1px solid black;
    transform: rotate(135deg);
}

.title-bar__minimize,
.title-bar__maximize,
.title-bar__close {
    position: relative;
    float: left;
    width: 34px;
    height: 34px;
}

.title-bar__minimize:before, .title-bar__minimize:after,
.title-bar__maximize:before,
.title-bar__maximize:after,
.title-bar__close:before,
.title-bar__close:after {
    top: 30%;
    right: 30%;
    bottom: 30%;
    left: 30%;
    content: " ";
    position: absolute;
    /*border-color: #8e8e8e;*/
    border-style: solid;
    border-width: 0 0 2px 0;
}

.title-bar .title-bar__controls {
    display: inline-block;
    vertical-align: top;
    position: relative;
    float: right;
    width: auto;
}

.title-bar .title-bar__controls:before, .title-bar .title-bar__controls:after {
    content: none;
}

.title-bar .title-bar__minimize:before {
    border-bottom-width: 2px;
}

.title-bar .title-bar__maximize:before {
    border-width: 1px 1px 2px 1px;
}

.title-bar .title-bar__close:before,
.title-bar .title-bar__close:after {
    bottom: 50%;
    top: 49.9%;
}

.title-bar .title-bar__close:before {
    transform: rotate(45deg);
}

.title-bar .title-bar__close:after {
    transform: rotate(-45deg);
}

.calendar__sidebar {
    width: 100%;
    margin: 0 auto;
    float: none;
    /*background: linear-gradient(120deg, #eff3f3, #e1e7e8);*/
    padding-bottom: 0.7rem;
}

@media screen and (min-width: 55em) {
    .calendar__sidebar {
        position: absolute;
        height: 100%;
        width: 30%;
        float: left;
        margin-bottom: 0;
    }
}

.calendar__sidebar .content {
    padding: 2rem 1.5rem 2rem 4rem;
    color: #040605;
}

.sidebar__nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 0.9rem;
    padding: 0.7rem 1rem;
    background-color: #ffffff;
}

.sidebar__nav-item {
    display: inline-block;
    width: 22px;
    margin-right: 23px;
    padding: 0;
    opacity: 0.8;
}

.sidebar__list {
    list-style: none;
    margin: 0;
    padding-left: 1rem;
    padding-right: 1rem;
}

.sidebar__list-item {
    margin: 1.2rem 0;
    /*color: #2d4338;*/
    font-weight: 100;
    font-size: 1rem;
}

.list-item__time {
    display: inline-block;
    width: 60px;
}

@media screen and (min-width: 55em) {
    .list-item__time {
        margin-right: 2rem;
    }
}

.sidebar__list-item--complete {
    color: rgba(4, 6, 5, 0.3);
}

.sidebar__list-item--complete .list-item__time {
    color: rgba(4, 6, 5, 0.3);
}

.sidebar__heading {
    font-size: 2.2rem;
    font-weight: bold;
    padding-left: 1rem;
    padding-right: 1rem;
    margin-bottom: 3rem;
    margin-top: 1rem;
}

.sidebar__heading span {
    float: right;
    font-weight: 300;
}

.calendar__heading-highlight {
    color: #2d444a;
    font-weight: 900;
}

.calendar__days {
    cursor: pointer;
    display: flex;
    flex-flow: column wrap;
    align-items: stretch;
    width: 100%;
    float: none;
    min-height: 580px;
    height: 100%;
    font-size: 12px;
    padding: 0.8rem 0 1rem 1rem;
    background: #ffffff;
}

@media screen and (min-width: 55em) {
    .calendar__days {
        width: 70%;
        float: right;
    }
}

.calendar__top-bar {
    display: flex;
    flex: 32px 0 0;
}

.top-bar__days {
    width: 100%;
    padding: 0 5px;
    color: #2d4338;
    font-weight: 100;
    -webkit-font-smoothing: subpixel-antialiased;
    font-size: 1rem;
}

.calendar__week {
    display: flex;
    flex: 1 1 0;
}

.calendar__day {
    display: flex;
    flex-flow: column wrap;
    justify-content: space-between;
    width: 100%;
    padding: 1.9rem 0.2rem 0.2rem;
}

.calendar__date {
    color: #040605;
    font-size: 1.7rem;
    font-weight: 600;
    line-height: 0.7;
}

@media screen and (min-width: 55em) {
    .calendar__date {
        font-size: 2.3rem;
    }
}

.calendar__week .inactive .calendar__date,
.calendar__week .inactive .task-count {
    color: #c6c6c6;
}

.calendar__week .today .calendar__date {
    color: #fd588a;
}

.calendar__task {
    color: #040605;
    display: flex;
    font-size: 0.8rem;
}

@media screen and (min-width: 55em) {
    .calendar__task {
        font-size: 1rem;
    }
}

.calendar__task.calendar__task--today {
    color: #fd588a;
}

.sidebar__item {
    list-style: none;
    margin: 0.25rem 0;
}

.sidebar__link {
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    text-decoration: none;
    background: #f8f9fa;
    color: #333;
    transition: background 0.2s ease, transform 0.1s ease;
}

.sidebar__link:hover {
    background: #e9ecef;
    transform: translateX(2px);
}

/* Title: machine name left, type right */
.sidebar__title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.sidebar__machine {
    color: #555;
}

.sidebar__type {
    font-size: 0.85rem;
    color: #888;
    text-transform: uppercase;
}

/* Body with description */
.sidebar__body {
    margin-top: 0;
}

.sidebar__desc {
    font-size: 0.9rem;
    color: #444;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}


.dropdown .menu li {
    margin-left: 0 !important;
}

.w-100p {
    min-width: 200px;
}

.center {
    text-align: center;
}

.legend {
    text-align: center;
}

.legend div {
    padding: 0 1rem;
}

.turbo-progress-bar {
    height: 10px;
    background-color: #3adb76;
}

small.error {
    color: #dc3545;
}

.legend-box {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    margin-right: 8px;
}

.legend-container {
    font-family: "Segoe UI", sans-serif;
    font-size: 14px;
    color: #333;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.pl-1 {
    padding-left: 0.5rem;
}


.permission-group {
    margin-bottom: 1.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 0.5rem;
}

.checkbox-row {
    display: flex;
    flex-wrap: wrap; /* переносить на наступний рядок при браку місця */
    gap: 1rem; /* відстань між чекбоксами */
}

.roles-checkbox-group {
    justify-content: space-between;
}

.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 0.25rem; /* відстань між чекбоксом і текстом */
    white-space: nowrap;
}

.custom-file {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 400px;
}

.custom-file input[type="file"] {
    display: none; /* приховуємо стандартний інпут */
}

.custom-file-label {
    display: inline-block;
    padding: 10px 16px;
    background-color: #007bff;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
}

.file-name {
    margin-left: 12px;
    color: #555;
    font-size: 0.9rem;
    font-weight: 500;
}

.height-5-row {
    height: 20rem !important;
}
