* {
    font-family: "Montserrat", sans-serif;
    margin: 0;
    padding: 0;
}

body {
    background:#041529;
}

.bg_sidebar {
    background: #182337;
    width: 325px;
    padding: 30px;
    color: #ffffff;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;

    display: flex;
    flex-direction: column;

    overflow-y: auto; /* <──── Вот это важно */
}

.logo {
    font-weight: 500;
    max-width: 150px;
    width: 100%;
    color: #fff;
    padding-bottom: 59px;
}

.role-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1a2334;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.role-name {
    color: #fff;
    font-size: 15px;
}

.role-delete {
    cursor: pointer;
    font-size: 18px;
    color: #C16363;
    transition: 0.2s;
}

.role-delete:hover {
    color: #ff6b6b;
}


.role-item {
    margin-bottom: 19px;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding-left: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
}

#saveRoleBtn {
    background: transparent;
    border: none;
    margin-left: 5px;
    position: absolute;
    right: 9px;
    top: 7px;
    border: 0;
    cursor: pointer;
}

#roleName {
    background: transparent;
    border: none;
    border-bottom: 1px solid #2f394d;
    padding: 10px;
    border-radius: 0px;
    position: relative;
    width: 100%;
    color: #fff;
}

.role-icon {
    padding-right: 12px;
}

.align-items-center {
    align-items: center;
}

#rolePopup {
    margin-bottom: 34px;
    position: relative;
    align-items: center;
}

.button_block {
    margin-bottom: 34px;
    padding-left: 10px;
}

#roleName:focus {
    outline: none;
    box-shadow: none;
}

#roleName:focus {
    outline: none;
    box-shadow: none;
    border-color: transparent; /* если нужно */
}



#saveRoleBtn svg {
    width: 19px;
}

.logout-item {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    cursor: pointer;

}

.layout {
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden; /* контент не прокручивает всю страницу */
}

/* -------- Сайдбар -------- */

.sidebar {
    background: #182337;
    width: 225px;
    padding: 30px;
    display: flex;
    flex-direction: column;
}

/* области внутри */

.sidebar-header {
    margin-bottom: 20px;
}

.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    padding-right: 6px;
}

.content {
    flex: 1;
    padding: 20px;
    overflow-y: auto; /* чтоб календарь прокручивался */
    background: #041529;
}

.logout-item svg {
    padding-right: 17px;
    width: 21px;
}

.logout-item span {
    font-weight: 500;
    font-size: 16px;
    color: #fff;
}

.add_button {
    background: transparent;
    border: none;
    font-weight: 500;
    font-size: 16px;
    color: #fafafa;
    margin: 0;
    padding: 0;
    cursor: pointer;
    padding-left: 12px;
}

.d-flex {
    display: flex;
}

.roles {
    font-weight: 500;
    font-size: 16px;
    color: #fafafa;
}

.calendar-wrapper {
    color: #fff;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.calendar-title {
    font-size: 22px;
    font-weight: 600;
}

.calendar-week-switch {
    display: flex;
    align-items: center;
    gap: 14px;
}

.calendar-week-switch button {
    background: #182337;
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    font-size: 22px;
    width: 35px;
    height: 35px;
    border-radius: 5px;
    cursor: pointer;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-top: 20px;
    width: 100%;
    background: #182337;
    border-radius: 10px;
}

.calendar-day {
    background: #182337;
    border-radius: 10px;
    padding: 3px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.day-header-block {
    margin-bottom: 12px;
    text-align: left;
}

.day-header {
    font-size: 15px;
    color: #ffffff;
    opacity: 0.7;
}

.day-number {
    font-size: 18px;
    margin-bottom: 6px;
    opacity: 1;
    color: #ffffff;
}

.day-cells-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.day-cell {
    width: 100%;
    height: 80px;
    border-radius: 5px;
    background: #182337;
    border: 1px solid #20314d;
    cursor: pointer;
    transition: 0.2s;
}

.day-cell:hover {
    background: #1f2f49;
}

.active-role {
    background: #38b4bb;
    border-radius: 5px;
    transition: 0.5s ease;
}

.calendar-days-header {
    display: flex;
    justify-content: space-around;
}

.task-popup {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
}

.task-popup-window {
    background: #182337;
    padding: 20px;
    border-radius: 8px;
    width: 300px;
}

.task-popup-window h3 {
    color: white;
    margin-bottom: 10px;
}

.task-popup-window input {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 6px;
    margin-bottom: 15px;
}

.task-popup-window button {
    width: 48%;
    padding: 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

#saveTaskBtn {
    background: #38b4bb;
    color: white;
}

#closeTaskBtn {
    background: transparent;
    color: white;
}

.task-item {
    background: #3483fa;
    color: #fff;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 12px;
    margin: 2px 0;
}

.drawer-delete {
    margin-top: 12px;
    background: #d9534f;
    color: white;
    border: none;
    padding: 12px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
}

.drawer-delete:hover {
    background: #c9302c;
}

.task-label {
    font-size: 12px;
    color: white;
    padding: 3px 6px;
    border-radius: 4px;
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
/*    pointer-events: none;*/
}

.day-cell {
    position: relative;
}

/* Боковая панель */
.task-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 350px;
    height: 100vh;
    background: #1a2533;
    padding: 20px;
    box-shadow: -4px 0 14px rgba(0,0,0,0.5);
    transition: right .35s ease;
    z-index: 99999;
    display: flex;
    flex-direction: column;
}

/* Когда открыта */
.task-drawer.open {
    right: 0;
}

/* Header */
.task-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.task-drawer-header h3 {
    color: #fff;
}

.drawer-close {
    background: none;
    border: none;
    font-size: 28px;
    color: white;
    cursor: pointer;
}

/* Body */
.task-drawer-body {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
    gap: 15px
}

.task-drawer-body label {
    color: #cfd7e3;
}

.task-drawer-body input,
.task-drawer-body textarea,
.task-drawer-body select {
    background: #2b3645;
    border: none;
    padding: 10px;
    border-radius: 6px;
    color: white;
    font-size: 14px;
}

textarea {
    height: 85px;
}

/* Цвета */
.color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.color-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
}

.color-dot.selected {
    border-color: white;
}

/* Кнопка */
.drawer-save {
    margin-top: 30px;
    background: #38b4bb;
    color: white;
    border: none;
    padding: 12px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
}

.title__pop {
    color: #fff;
}

.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 20px;
}

.auth-card {
    background: #182337;
    padding: 40px 50px;
    border-radius: 12px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    color: #fff;
}

.auth-card h2 {
    margin-bottom: 25px;
    font-size: 26px;
    font-weight: 600;
    text-align: center;
}

.auth-card label {
    font-size: 15px;
    margin-bottom: 6px;
    display: block;
    color: #cfd7e3;
}

.auth-card input {
    width: 100%;
    background: #2b3645;
    border: none;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 18px;
    color: #fff;
    font-size: 15px;
    max-width: 100%;          /* чтобы не вылезало */
    box-sizing: border-box;
}

.auth-card button {
    width: 100%;
    background: rgb(56, 180, 187);
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    color: #fff;
    cursor: pointer;
    margin-top: 10px;
    transition: 0.2s;
    max-width: 100%;          /* чтобы не вылезало */
    box-sizing: border-box;
}

.auth-card button:hover {
    background: rgb(56, 180, 187);
}

.auth-link {
    margin-top: 20px;
    text-align: center;
    color: #cfd7e3;
}

.auth-link a {
    color: #4da6ff;
    text-decoration: none;
    font-weight: 500;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* ===== Верхняя панель ===== */

.top-bar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 25px;
    margin-bottom: 25px;

}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-wrapper input {
    flex: 1;
    background: #182337;
    border: none;
    outline: none;
    color: #fafafa;
    font-size: 16px;
    font-weight: 500;
    padding: 10px;
    border-radius: 10px;
    width: 100%;
}

.search-btn {
    background: transparent;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    position: absolute;
    right: 2px;
}

.premium-btn {
    background: #38b4bb;
    border: none;
    padding: 10px 22px;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    max-width: 250px;
    width: 100%;
}

.user-avatar {
    width: 5%;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-results {
    position: absolute;
    top: 48px; /* чётко под полем */
    left: 0;
    width: 100%;
    background: #1E2B45;
    border-radius: 10px;
    padding: 8px 0;
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
    display: none;
    max-height: 260px;
    overflow-y: auto;
    z-index: 2000;
}

.search-result-item {
    padding: 10px 16px;
    font-size: 14px;
    color: #fafafa;
    cursor: pointer;
    transition: 0.15s;
}

.search-result-item:hover {
    background: #2c3a55;
}

.account-page {
    border-radius: 12px;
    max-width: 600px;
    color: #fafafa;
}

.account-title {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 30px;
}

.account-avatar {
    display: flex;
    flex-direction: column;
    align-items: start;
    margin-bottom: 30px;
}

.account-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
}

.account-avatar button {
    background: #2BB5A0;
    padding: 10px 16px;
    border-radius: 6px;
    border: none;
    color: white;
    cursor: pointer;
}

.account-field {
    margin-bottom: 20px;
}

.account-field label {
    display: block;
    margin-bottom: 8px;
    opacity: 0.7;
    margin-top: 20px;
}

.account-field input {
    width: 100%;
    padding: 12px;
    background: #1a2533;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
}

.account-save-btn {
    width: 100%;
    background: #38b4bb;
    padding: 14px;
    border-radius: 8px;
    border: none;
    font-size: 17px;
    color: white;
    cursor: pointer;
    margin-top: 10px;
}

.hidden-page {
    display: none;
}

.mission-item {
    background: transparent;
    border-radius: 0px;
    padding: 12px 16px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #182337;
}

#missionPage h2 {
    font-size: 22px;
    color: #F2F2F2;
    margin-bottom: 25px;
}

.mission-title {
    flex-grow: 1;
    font-size: 15px;
    color: #F2F2F2;
}

.mission-check-icon {
    cursor: pointer;
    display: flex;
}

.mission-delete {
    cursor: pointer;
    padding: 4px;
    display: flex;
}


#missionInput {
    width: 100%;
    background: #0F1B2B;
    border: 1px solid #2A3C4F;
    padding: 10px 14px;
    border-radius: 8px;
    color: #fff;
    margin-top: 20px;
    max-width: 600px;
}

#missionList .mission-item.active-role {
    background: rgba(255, 255, 255, 0.08); /* красиво, как роли */
    border-radius: 8px;
}

#missionInput::placeholder {
    color: #6A6A6A;
}

#missionAddBtn {
    margin-top: 10px;
    background: #38b4bc;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
}

.mission-done {
    text-decoration: line-through;
    opacity: 0.6;
}

.mission-left {
    display: flex;
    gap: 12px;
    align-items: center;
}

.mission-editable {
    border-bottom: 1px dashed #4dd0e1;
}

.mission-btn {
    cursor: pointer;
    margin-left: 10px;
}

.report-wrapper {
    color: #fff;
    padding: 20px;
}

.report-block {
    margin-bottom: 40px;
}

.roles-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.role-card {
    background: #0F1A2A;
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid #1E2A3B;
}

.role-name {
    font-size: 15px;
    font-weight: 500;
}

.role-sub {
    font-size: 14px;
    color: #AEB7C7;
    margin-bottom: 8px;
}

/* Прогресс-бар */
.progress-bar {
    width: 100%;
    height: 9px;
    background: #1F2D40;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #4CD964;
    border-radius: 10px;
    transition: 0.4s ease;
}

/* Энергия */
.energy-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.energy-item {
    background: #0F1A2A;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #1E2A3B;
    min-width: 110px;
}

.energy-low { color: #FF6B6B; }
.energy-medium { color: #FFD93D; }
.energy-high { color: #4CD964; }

/* ====== Сетка 2 колонки для ролей ====== */
.roles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Стиль карточки роли */
.role-card {
    background: #0f1b2b;
    border: 1px solid #1d2a3a;
    border-radius: 10px;
    padding: 15px 20px;
}

/* Название роли */
.role-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #fff;
}

#reportPage h2 {
    font-size: 22px;
    color: #F2F2F2;
    margin-bottom: 25px;
}

#reportPage h3 {
    font-size: 16px;
    color: #F2F2F2;
    margin-bottom: 15px;
    padding-top: 20px;
}

.report-card-title {
    color: #fff;
}

.energy-day-title {
    color: #fff;
}

/* Подпись "1 из 5 задач — 20%" */
.role-card-sub {
    font-size: 14px;
    color: #9eb0c1;
    margin-bottom: 10px;
}

/* Прогресс бар */
.role-progress-bar {
    width: 100%;
    height: 6px;
    border-radius: 4px;
    background: #203040;
    overflow: hidden;
}

.role-progress-fill {
    height: 100%;
    background: #4cd964; /* зелёный Apple */
    border-radius: 4px;
}

/* Две колонки */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Общая карточка */
.report-card,
.energy-card {
    background: #0f1b2b;
    border: 1px solid #1d2a3a;
    padding: 18px 20px;
    border-radius: 12px;
}

/* Заголовки */
.report-card-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 6px;
}

.report-card-sub {
    font-size: 14px;
    color: #9eb0c1;
    margin-bottom: 10px;
}

/* Прогресс-бар */
.report-progress-bar {
    width: 100%;
    height: 6px;
    background: #203040;
    border-radius: 4px;
    overflow: hidden;
}

.report-progress-fill {
    height: 100%;
    background: #4cd964;
    border-radius: 4px;
}

/* Энергия */
.energy-day-title {
    font-size: 16px;
    font-weight: 600;
}

.energy-level {
    font-size: 14px;
    color: #9eb0c1;
    margin-top: 6px;
}

.goal-item {
    background: transparent;
    border-radius: 0px;
    padding: 12px 16px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #182337;
}

.goal-item.active-row {
    background: #f3f3f3;
    border-radius: 8px;
}

.goal-title {
    flex-grow: 1;
    font-size: 15px;
    color: #F2F2F2;
}

.goal-done {
    text-decoration: line-through;
    opacity: 0.6;
}

.goals-add-wrapper {
    margin-top: 15px;
}

#goalsInput {
    width: 100%;
    background: #0F1B2B;
    border: 1px solid #2A3C4F;
    padding: 10px 14px;
    border-radius: 8px;
    color: #fff;
    max-width: 600px;
}

.goal-left {
    display: flex;
    align-items: center;
}

.goal-left .goal-title {
    padding-left: 10px;
}

#goalsAddBtn {
    margin-top: 10px;
    background: #38b4bc;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
}

#goalsPage h2 {
    font-size: 22px;
    color: #F2F2F2;
    margin-bottom: 25px;
}



.landing-container {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.footer__home {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 20px;
}

.svg1 {
    position: absolute;
    left: -100px;
    bottom: -100px;
    z-index: -1;
}

.svg2 {
    position: absolute;
    right: -100px;
    top: -100px;
    z-index: -1;
}

.body__home {
color: #fafafa;
    background: #041529;
    height: 100vh;
    overflow: hidden;
}

.logo-img {
    height: 100px;
    opacity: 0.9;
    margin-bottom: 25px;
}

.title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 15px;
}

.subtitle {
    margin-top: 0;
    font-size: 17px;
    line-height: 1.5;
    color: rgba(255,255,255,0.85);
}

.buttons {
    margin-top: 35px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #1bb5b3;
    padding: 12px 22px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    color: white;
    transition: 0.2s;
}

.download-btn img {
    height: 18px;
}

.download-btn:hover {
    background: #17a2a0;
    transform: translateY(-2px);
}

.footer {
    margin-top: auto;
    text-align: center;
    padding: 25px;
    color: rgba(255,255,255,0.5);
    font-size: 14px;
}

@media (max-width: 480px) {
    .landing-container {
            text-align: center;
        }

        .buttons {
            margin-top: 35px;
            display: grid;
            justify-content: center;
            gap: 20px;
        }

        .download-btn {
            display: flex;
            align-items: center;
            gap: 10px;
            background: #1bb5b3;
            padding: 12px 22px;
            border-radius: 8px;
            text-decoration: none;
            font-weight: 500;
            color: white;
            transition: 0.2s;
            margin-bottom: 10px;
            /* text-align: center; */
            max-width: 300px;
        }

        .svg1 {
            position: absolute;
            left: -300px;
            bottom: -150px;
            z-index: -1;
        }

        .svg2 {
            position: absolute;
            right: -300px;
            top: -150px;
            z-index: -1;
        }

        .logo-img {
            height: 80px;
            opacity: 0.9;
            margin-bottom: 25px;
        }
}

.task-icon {
    position: absolute;
    bottom: 5px;
    right: 6px;
    width: 18px;
    height: 18px;
}

.day-cell {
    position: relative;
}

.task-label.done {
    text-decoration: line-through;
    opacity: 0.6;
}
