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

/* Подключение фирменного шрифта логотипа */
@font-face {
    font-family: 'DuvallC';
    src: url('../font/DuvallC/DuvallC.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body {
    display: flex;
    flex-direction: column;
}

main.container {
    flex: 1;
}

/* Шрифт логотипа */
.logo-font {
    font-family: 'DuvallC', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0.03em;
    color: #51bb68;
    color: #51bb5a;
}
footer{
    margin-top: 5rem;
}
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: -10px;
    /* gutter: 10px; */

}

.calendar-cell:not(.calendar-cell--header):not(.calendar-cell--empty) {
    /* outline: 1px solid #f8f9fa;
    outline: 1px solid #21252980;
    outline: 1px solid #dee2e6;
    outline-offset: 0px; */
    padding: 0.5rem;
    /* border-radius: 0.5rem; */
}
.calendar-cell--day{
    background-color: var(--bs-light-bg-subtle) !important;
    position: relative;
    z-index: 1;
}
.calendar-cell--day::after {
    content: "";
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border: 1px solid var(--bs-secondary-border-subtle) !important;
    z-index: 10;
    pointer-events: none;
}
.calendar-cell--profile{
    outline: none !important;
}
.calendar-date {
    font-size: 1.2rem;
}
.calendar-date--profile {
    font-size: 0.9rem;
    line-height: 0.9rem;
}

/* от 768 */
@media (min-width: 768px) {
    .calendar-date {
        font-size: 1.5rem;
    }
    .calendar-date--profile {
        font-size: 1.2rem;
    }
}

.input-group.three-col-grid,
.three-col-grid {
    align-items: start;
    width: 33.33333333%;
}

.input-group.two-col-grid,
.two-col-grid {
    align-items: start;
    width: 50%;
}

/* жесткое скрытие элемента */
.set-not-visible{
    display: none !important;
}


.header-item:hover,
.header-item:active, 
.header-item:focus{
    opacity: 20 !important;
    background-color: var(--bs-secondary-bg-subtle) !important;
    /* background-color: rgba(221, 190, 249, 0.5) !important; */

}

.header-item.active{
    background-color: rgba(81, 187, 90, 0.4) !important;
    color: var(--bs-primary-text-emphasis) !important;
    font-weight: 700 !important;
    border-color: var(--bs-primary-border-subtle) !important;
    border: none;
}

.header-item{
    border: none !important;
    border-radius: 0 !important;
}
.header-item-start{
    border-top-left-radius: 1rem !important;
    border-bottom-left-radius: 1rem !important;
}
.header-item-end{
    border-top-right-radius: 1rem !important;
    border-bottom-right-radius: 1rem !important;
}

/* до 991 */
@media(max-width:991px){
    .input-group.three-col-grid,
    .three-col-grid {
        width: 50%;
    }
    .header-item{
        border-radius: 1rem !important;
    }
}

/* .vertical-text {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
    min-height: auto;
    margin: 0 auto;
} */
.vertical-text {
    writing-mode: initial;
    transform: rotate(0deg);
    margin: 0 auto;
}

/* цвет смены, если она была предзагружена но не выбрана */
.shift-active-initial{
    background-color: var(--bs-warning-bg-subtle) !important;
    background-color: rgba(13, 110, 253, 0.05) !important;
    background-color: rgba(220, 53, 69, 0.1) !important;
    position: relative;
    z-index: 1;
}
.shift-active-initial::after {
    content: "";
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border: 1px solid var(--bs-primary-border-subtle) !important;
    z-index: 10;
    pointer-events: none;
}

/* цвет ячейки смены выбранной вручную */
.shift-check {
    background-color: var(--bs-success-bg-subtle) !important;
    position: relative;
    z-index: 1;
}
/* Псевдоэлемент для перекрытия границ соседних ячеек */
.shift-check::after {
    content: "";
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border: 1px solid var(--bs-primary-border-subtle) !important;
    z-index: 10;
    pointer-events: none;
}
/* цвет смены, если она была предзагружена и выбрана */
.shift-active-initial.shift-check {
    background-color: var(--bs-primary-bg-subtle) !important;
}

.schedule-table {
    border-collapse: separate !important;
    border-spacing: 0.5px !important;
}
table.schedule-table:not(caption) td:not(:last-child),
table.schedule-table:not(caption) th:not(:last-child) {
    border-right-width: var(--bs-border-width) !important;
}

.schedule-table-head {
    position: sticky;
    top: 0;
    z-index: 101;
}

.schedule-table-wrapper {
    overflow-x: none;
    overflow-y: visible;
    position: relative;
}
.schedule-table-scroll {
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: visible;
}

/* применяется для разрешение экрана до 767px */
@media(max-width: 767px){
    .input-group.three-col-grid,
    .input-group.two-col-grid,
    .three-col-grid,
    .two-col-grid {
        width: 100%;
    }

    .vertical-text {
        writing-mode: vertical-rl;
        transform: rotate(180deg);
        min-height: 100px;
    }
}

.shift-master-select {
    min-width: 100px;
}

.dropdown-toggle.three-dots-vertical::before {
    display: none !important
}

.bg-yellow-badge {
    border: 1px solid #ffc107 !important;
    background-color: rgba(255, 193, 7, 0.2);
    color: #9c7500;
}


.bg-red-badge {
    border: 1px solid #dc3545 !important;
    background-color: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}


.bg-green-badge {
    border: 1px solid #198754 !important;
    background-color: rgba(25, 135, 84, 0.2);
    color: #198754;
}


/* цветная карточка */
.card-bg-colored{
    background-color: #fff;
    border-radius: 10px;
    border: none;
    box-shadow: 0 0.46875rem 2.1875rem rgba(90,97,105,0.1), 0 0.9375rem 1.40625rem rgba(90,97,105,0.1), 0 0.25rem 0.53125rem rgba(90,97,105,0.12), 0 0.125rem 0.1875rem rgba(90,97,105,0.1);
}
.l-bg-cherry {
    background: linear-gradient(to right, #493240, #f09) !important;
    color: #fff;
}

.l-bg-blue-dark {
    background: linear-gradient(to right, #373b44, #4286f4) !important;
    color: #fff;
}

.l-bg-green-dark {
    background: linear-gradient(to right, #0a504a, #38ef7d) !important;
    color: #fff;
}

.l-bg-orange-dark {
    background: linear-gradient(to right, #a86008, #ffba56) !important;
    color: #fff;
}

.card .card-action .card-icon-large .fa {
    font-size: 5rem;
}

.card .card-action .card-icon {
    text-align: center;
    line-height: 50px;
    margin-left: 0;
    color: #000;
    position: absolute;
    right: 1rem;
    top: 20px;
    opacity: 0.1;
}

/* цвета для полосок progress */
.l-bg-cyan {
    background: linear-gradient(135deg, #289cf5, #84c0ec) !important;
    color: #fff;
}

.l-bg-green {
    background: linear-gradient(135deg, #23bdb8 0%, #43e794 100%) !important;
    color: #fff;
}

.l-bg-orange {
    background: linear-gradient(to right, #f9900e, #ffba56) !important;
    color: #fff;
}

.l-bg-cyan {
    background: linear-gradient(135deg, #289cf5, #84c0ec) !important;
    color: #fff;
}

.card-text{
    color: #fff;
    opacity: 0.5;
}

/* .sunday-row, */
.sunday-row > td.shift-item {
    /* background-color: rgba(214, 51, 132, 0.1); */
    border-bottom: 5px solid rgba(214, 51, 132, 0.3) !important;
}

/* .shift-item{
    cursor: pointer;
} */

.sunday-row > td.shift-date {
    /* background-color: rgba(214, 51, 132, 0.1); */
    background-color: rgba(214, 51, 132, 0.3) !important;
}


/* Рейтинг 1 место - золото */
.rating-item-1 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.12) 0%, rgba(255, 193, 7, 0.06) 50%, transparent 100%);
    border-left: 4px solid #ffd700;
}

/* Рейтинг 2 место - серебро */
.rating-item-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.12) 0%, rgba(158, 158, 158, 0.06) 50%, transparent 100%);
    border-left: 4px solid #c0c0c0;
}

/* Рейтинг 3 место - бронза */
.rating-item-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.12) 0%, rgba(184, 115, 51, 0.06) 50%, transparent 100%);
    border-left: 4px solid #cd7f32;
}

.text-gold {
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}
.text-silver {
    /* color: #9b9b9b;
    color: white; */
    color: #9e9e9e;
    text-shadow: 0 2px 4px rgba(158, 158, 158, 0.3);
}
.text-cooper {
    /* color: #8a4e32;
    color: white; */
    color: #cd7f32;
    text-shadow: 0 2px 4px rgba(205, 127, 50, 0.3);
}

/* Градиентные фоны для рейтинга услуг */
/* .rating-item-1 {
    background: linear-gradient(to right, rgba(255, 217, 0, 0.411) 30%, rgba(255, 217, 0, 0.233), transparent) !important;
    border-left: 3px solid #ffd700;
}

.rating-item-2 {
    background: linear-gradient(to right, rgba(192, 192, 192, 0.74) 30%, rgba(192, 192, 192, 0.212), transparent) !important;
    border-left: 3px solid #c0c0c0;
}

.rating-item-3 {
    background: linear-gradient(to right, rgba(205, 128, 50, 0.795) 30%, rgba(205, 128, 50, 0.24), transparent) !important;
    border-left: 3px solid #cd7f32;
} */

.text-firm {
    color: #ddbef9 !important;
}
.text-firm-emphasis {
    color: #6e5981 !important;
}

/* Цвет для счетчика в рейтинге услуг - сочетается с медальной палитрой */
.text-rating-count {
    color: #2c3e50 !important;
}

/* Masonry layout для главной страницы */
.masonry-container {
    column-count: 2;
    column-gap: 1rem;
    column-fill: balance;
}

.masonry-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 1rem;
    break-inside: avoid;
    page-break-inside: avoid;
}

/* Принудительный разрыв колонки перед виджетом "Топ-3", чтобы он всегда был вторым */
.masonry-item-order-2 {
    break-before: column;
    -webkit-column-break-before: always;
    page-break-before: always;
}

/* На мобильных устройствах - одна колонка */
@media (max-width: 767px) {
    .masonry-container {
        column-count: 1;
    }
    
    .masonry-item-order-2 {
        break-before: auto;
        -webkit-column-break-before: auto;
        page-break-before: auto;
    }
}

/* Виджет соотношения клиентов по полу (VS формат) */
.gender-vs-container {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    /* min-height: 180px; */
    position: relative;
}

.gender-vs-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
}

.gender-vs-item:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
}

.gender-vs-male {
    background: linear-gradient(135deg, #4c678f 0%, #0d6dfd 100%);
}

.gender-vs-female {
    background: linear-gradient(135deg, #eb2e41 0%, #863c43 100%);
}

.gender-vs-content {
    text-align: center;
    z-index: 1;
    position: relative;
}

.gender-vs-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    /* margin-bottom: 0.1rem; */
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.gender-vs-percent {
    font-size: 2.5rem;
    line-height: 1.2;
    /* margin-bottom: 0.5rem; */
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.gender-vs-count {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.gender-vs-divider {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    pointer-events: none;
}

.gender-vs-text {
    font-size: 3rem;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 
        0 0 10px rgba(0, 0, 0, 0.5),
        0 2px 8px rgba(0, 0, 0, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.3);
    letter-spacing: 4px;
    font-style: italic;
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

/* Горизонтальный список мастеров со скроллом */
.masters-horizontal-list {
    min-width: max-content;
}

.masters-horizontal-list::-webkit-scrollbar {
    height: 6px;
}

.master-card-horizontal {
    min-width: 100px;
    width: auto;
}

.master-card-stats {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
/* Зеленое свечение для сумм выручки */
.revenue-glow {
    text-shadow: 
        0 0 10px rgba(25, 135, 84, 0.15),
        0 0 20px rgba(25, 135, 84, 0.15),
        0 0 30px rgba(25, 135, 84, 0.15),
        0 2px 4px rgba(25, 135, 84, 0.15);
}

.master-card-revenue.revenue-glow {
    text-shadow: 
        0 0 8px rgba(25, 135, 84, 0.15),
        0 0 15px rgba(25, 135, 84, 0.15),
        0 0 20px rgba(25, 135, 84, 0.15),
        0 1px 3px rgba(25, 135, 84, 0.15);
}

/* Адаптивность для мобильных */
@media (max-width: 576px) {

    .gender-vs-percent {
        font-size: 2rem;
    }
    
    .gender-vs-text {
        font-size: 2rem;
        letter-spacing: 2px;
    }
    
    .gender-vs-label {
        font-size: 0.7rem;
        letter-spacing: 1px;
    }
    
    .gender-vs-count {
        font-size: 0.75rem;
    }
    
}

/* Адаптивность для мобильных */
@media (max-width: 992px) {

    .gender-vs-text {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }
    
}

/* Fullscreen Schedule Modal Styles */
.fullscreen-schedule-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: 100%;
}

.fullscreen-schedule-table-wrapper {
    display: inline-block;
    min-width: 100%;
}

.fullscreen-schedule-table {
    width: auto;
    min-width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

.fullscreen-schedule-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bs-body-bg);
}

.fullscreen-day-header {
    width: 50px;
    min-width: 50px;
    max-width: 50px;
    padding: 0.5rem 0.25rem !important;
    text-align: center;
    font-weight: 600;
    background: var(--bs-body-tertiary-bg) !important;
    border: 1px solid var(--bs-border-color) !important;
    font-size: 0.7rem;
}

.fullscreen-master-header {
    padding: 0.5rem 0.15rem !important;
    text-align: center;
    font-weight: 600;
    border: 1px solid var(--bs-border-color) !important;
    font-size: 0.65rem;
}

.fullscreen-master-header.master-admin {
    background: var(--bs-danger-bg-subtle) !important;
    color: var(--bs-danger-text-emphasis);
}

.fullscreen-master-name {
    display: inline-block;
    transform: rotate(0deg) !important;
    /* white-space: nowrap; */
    writing-mode: horizontal-tb;
    text-align: center;
    margin: 0 auto;
    min-height: auto !important;
}

.fullscreen-day-cell {
    width: auto;
    /* min-width: 50px; */
    max-width: 50px;
    padding: 0.1rem 0.1rem !important;
    text-align: center;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color) !important;
    vertical-align: middle;
}

.fullscreen-day-number {
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1.2;

}

.fullscreen-day-weekday {
    font-size: 0.65rem;
    color: var(--bs-secondary);
    line-height: 1;
    margin-top: 0.125rem;
}

.fullscreen-shift-cell {
    padding: 0.25rem !important;
    text-align: center;
    border: 1px solid var(--bs-border-color) !important;
    background: var(--bs-body-bg);
    min-width: 30px;
    max-width: 30px;
    width: 30px;
    vertical-align: middle;
}

.fullscreen-shift-cell.fullscreen-shift-active {
    background: rgba(139, 178, 238, 0.4);
    position: relative;
}
.fullscreen-shift-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bs-success);
}

.fullscreen-shift-active.fullscreen-shift-admin .fullscreen-shift-indicator {
    background: var(--bs-danger);
}

.fullscreen-sunday .fullscreen-day-cell {
    /* background: var(--bs-warning-bg-subtle); */
    background-color: rgba(214, 51, 132, 0.3) !important;
}
.fullscreen-sunday .fullscreen-shift-cell{
    border-bottom: 2px solid rgba(214, 51, 132, 0.3) !important;
}

/* Адаптивность для мобильных */
@media (max-width: 576px) {
    .fullscreen-schedule-table {
        font-size: 0.65rem;
    }
    
    .fullscreen-day-header,
    .fullscreen-day-cell {
        padding: 0.2rem 0.15rem !important;
    }
    
    .fullscreen-master-header,
    .fullscreen-shift-cell {
        padding: 0.5rem 0.15rem !important;
    }
    
    .fullscreen-day-number {
        font-size: 0.75rem;
    }
    
    .fullscreen-day-weekday {
        font-size: 0.6rem;
    }
    
    .fullscreen-master-name {
        font-size: 0.6rem;
    }
}
