/* styles.css */

/* =====================
   CSS переменные
   ===================== */
:root {
    /* Цвета */
    --color-bg: #C6CFDA;
    --color-workspace: #EEF1F3;
    --color-sidebar:#617686;
    --color-btn:#415466;
    --color-card:#F7F7F7;

    /* Размеры */
    --sidebar-width: 30px;
    --radius-large: 16px;
    --radius-medium: 10px;
    --radius-small: 6px;

    /* Отступы */
    --padding-main: 24px;
    --padding-inner: 16px;
    --gap-main: 16px;

    /* Шрифт */
    --font-main: 'Inter', sans-serif;
}

/* =====================
   Сброс
   ===================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;

}

/* =====================
   База
   ===================== */
body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    height: 100%;
    margin: 0;
    padding: 0;
}

.wrap{

    min-height: 100vh;
    /* width: 100%; */
    min-width: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;  /* важно! */
    /* margin: 20px 0 20px 0; */
    padding: 20px 10px; /* вот реальные отступы сверху и снизу */
    box-sizing: border-box; /* чтобы padding не добавлял к общей высоте */
}
.wrap2{

    height: 100%;
    width:  100%;
    min-width: auto;
    border: none;
    box-sizing: border-box;    /* внутренние padding учитываются */
    border-radius: 0px var(--radius-large) var(--radius-large) 0px;
}

.workspace{
    background-color: var(--color-workspace);
    width: calc(100% - 40px);
    min-width: auto;
    height: 100%;
    max-height: 100%;
    border-radius: var(--radius-large);
    display: flex;
    justify-content:baseline;
} 

.search, .container_search{
    font-size: 12px;         /* размер шрифта 10px */
    font-family: var(--font-main); /* или другой шрифт */
    padding: 2px 4px;        /* небольшой padding для компактного вида */
    box-sizing: border-box;  /* чтобы padding не увеличивал ширину */
    
}

.panel{
    width: 100%;
    height: 40px;
    border: none;
    border-radius: 0px var(--radius-large) 0px 0px;
    display: flex;
    justify-content: flex-start;
    margin: 20px 0 0 0;
}

.sidebar{
    width: 40px;
    min-height: 100%;
    border: none;
    border-radius: var(--radius-large) 0px 0px var(--radius-large);
    background-color: var(--color-sidebar);
}
/* .container {
    
    display: flex;
    flex-direction: row;
    justify-content: space-around;
} */

.text1{
    width: 150px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    margin: 0 10px 0 20px;
    font-weight: 700;
}
/* кружок */
.contracts-title {
    display: flex;
    align-items: center;
    gap: 6px;
}

.contracts-count {
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    background: #ffffff;
    color: var(--color-sidebar);
    border-radius: 35%;
    border:solid;
    border-width: 1px;
    font-size: 8px;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-10px);
}


.wrap_btn{
    width: 40px;
    height: 40px;
}

.btn_add {
    /* font-family: var(--font-main);
    width: 100%;
    height: 100%;
    background-color: var(--color-btn);
    color: white;
    border: none;
    border-radius: var(--radius-medium);
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s; */

    width: 40px;
    height: 40px;
    background-color: #fff;
    border: none;
    border-radius: var(--radius-medium);
    cursor: pointer;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.055);
    
}

.btn_add:hover {
    border: solid;
    border-color: var(--color-bg);
    border-width: 1px;
}

.img_add{
  margin: 3px 0 0 0;
}

.delete{
    border: none;
    background-color: #ffffff;
    cursor: pointer;
}

#logout, #settingsBtn{
    border: none;
    background-color: var(--color-sidebar);
    cursor: pointer;
    margin: 10px 0 0 10px;
}

.action {
  opacity: 0;
  visibility: hidden;
  line-height: 0;
}

li:hover .action {
  opacity: 1;
  visibility: visible;
  
}
/* удаление места под иконкой */
.action img {
  display: block;
}

.wrap_list{
    min-height: calc(100vh - 160px);
    min-width: auto;
    overflow-x: auto; /* добавляем горизонтальную прокрутку для таблицы */
}

#contract_list{
    list-style: none;
    padding: 0;
    margin: 20px 0 0 0;
}

.contract_card{
    display: grid;

    grid-template-columns: 
        38%      /* Название */
        10%     /* Круг */
        11%      /* Регион */
        11%      /* Цена */
        11%      /* Расход */
        9%      /* Дата с */
        9%   /* Дата по */
        1%;

    align-items: center;
    width: calc(100% - 40px);
    height: 40px;
    margin: 0 20px 12px 20px;
    padding: 0 20px;
    box-sizing: border-box;
    border-bottom: 1px solid #ccc;
    font-size: 12px;
    background-color: #F7F7F7;
    border-radius: var(--radius-medium);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    opacity: 0;
    transform: translateY(10px);
    animation: cardAppear 0.35s ease forwards;
}
/* opacity:0 — карточка сначала невидима

translateY(10px) — небольшой сдвиг вниз

forwards — сохраняет конечное состояние */

@keyframes cardAppear{
    to{
        opacity: 1;
        transform: translateY(0);
        
    }
}

.contract_card:hover{
    background-color: #ffffff;
}

.contracts-header {
    display: grid;

    grid-template-columns: 
        38%      /* Название */
        10%     /* Круг */
        11%      /* Регион */
        11%      /* Цена */
        11%      /* Расход */
        9%      /* Дата с */
        9%   /* Дата по */
        1%;

    align-items: center;
    width: calc(100% - 40px);
    height: 20px;
    margin: 20px 20px 0px 20px;
    padding: 0 20px;
    box-sizing: border-box;
    font-size: 10px;
    font-weight: 400;
    color: var(--color-sidebar);
    transform: translateY(10px);
}

.title, .title_header{
    /* min-width: 40%; */
    /* white-space: nowrap;  */     /* запрещаем перенос строк */
    overflow: hidden;         /* скрываем всё, что не помещается */
    text-overflow: ellipsis;
    /* display: inline-block; */
    
}

.status, .region, .price, .date_from, .date_toS, .status_header, .region_header, .price_header, .date_from_header, .date_to_header{
    /* min-width: 12%; */
    /* white-space: nowrap;  */     /* запрещаем перенос строк */
    overflow: hidden;         /* скрываем всё, что не помещается */
    text-overflow: ellipsis;
    /* display: inline-block; */
}

/* .status, .status_header{ */
    /* min-width: 30px; */
    /* white-space: nowrap;  */     /* запрещаем перенос строк */
    /* overflow: hidden;  */        /* скрываем всё, что не помещается */
    /* text-overflow: ellipsis; */
    /* display: inline-block; */
/* } */

/* ----------------------Контейнер круга ----------------------*/
.progress-circle {
    width: 30px;
    height: 30px;
    position: relative;
    display: flex;               /* включаем flex */
    align-items: center;         /* центр по вертикали */
    justify-content: center;     /* центр по горизонтали */
}

/* Сам SVG */
.progress-circle svg {
    transform: rotate(-90deg);
    position: absolute;
    inset: 0;              /* top:0 left:0 right:0 bottom:0 */
    width: 100%;
    height: 100%;
    
}

/* Центральный текст */
.progress-text {
    position: relative;
    font-size: 10px;
    font-weight: 400;
    /* top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); */
    z-index: 1;
    /* white-space: nowrap; */   /* чтобы число не переносилось */
    line-height: 1;        /* важно */
}

/* Цвет фона круга */
.progress-bg {
    stroke: var(--color-bg);
}

/* Цвет прогресса */
.progress-bar {
    stroke: var(--color-btn);
    transition: stroke-dashoffset 1s ease;
}

/* Цвет по умолчанию (нормальный срок) */
.progress-normal {
    stroke: var(--color-btn); /* фиолетовый */
}

/* Если осталось <= 14 дней */
.progress-warning {
    stroke: #c62828; /* красный */
    color: #c62828; /* красный */;
}



.modal input {
    font-size: 12px;         /* размер шрифта 10px */
    font-family: var(--font-main); /* или другой шрифт */
    padding: 2px 4px;        /* небольшой padding для компактного вида */
    box-sizing: border-box;  /* чтобы padding не увеличивал ширину */
}

/* ===== MODAL ===== */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.hidden {
    display: none !important;
}

/* модалка для ввода данных */
.modal-content {
    background: white;
    padding: 20px;
    border-radius: var(--radius-medium);
    width: 700px;
    display: flex;
    flex-direction: row;
    gap: 30px;
    align-items: stretch; /* колонки одинаковой высоты */
}

/* левая часть */
.modal-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ========================правая часть ==============*/
.modal-right {
    flex: 1;                     /* равная ширина с левой */
    display: flex;
    flex-direction: column;      /* элементы сверху вниз */
}

/* список расходов */
#expenseList {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* строка ввода расхода */
.expense-row {
    display: flex;
    gap: 5px;
    align-items: center;
}

.expense-row input {
    height: 30px;
    padding: 4px;
    font-size: 10px;
    font-weight: 300;
}

.expense-text {
    flex: 1;
    height: 10px;
    font-size: 5px;
}

.expense-amount {
    width: 70px;
    height: 10px;
}

/* кнопки внутри строки */
.expense-row button {
    height: 30px;
    cursor: pointer;
}

#addExpenseBtn {
    background: none;      /* убираем фон */
    border: none;          /* убираем рамку */
    padding: 0;

    color: #2563eb;        /* синий как ссылка */
    font-size: 14px;

    cursor: pointer;
    text-decoration: none;
    margin-top: auto; /* вот это главное */
}

.expenses-header {
    display: flex;
    justify-content: space-between; /* левый и правый край */
    align-items: center;
    font-weight: 600;
    font-size: 16px;
}

#expensesTotal {
    font-weight: 500;
}

.expenses-total-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
}

.currency {
    font-size: 14px;
    opacity: 0.8;
}

/* Галочка и крестик строки ввода */
.icon-btn {
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-left: 4px;
    transition: transform 0.15s ease, color 0.15s ease, text-shadow 0.15s ease;
}

/* Hover галочка */
.icon-btn.check:hover {
    color: #16a34a; /* зелёный */
    /* transform: scale(1.2); */
    text-shadow: 0 0 4px rgba(22, 163, 74, 0.5);
}

/* Hover крестик */
.icon-btn.cancel:hover {
    color: #dc2626; /* красный */
    /* transform: scale(1.2); */
    text-shadow: 0 0 4px rgba(220, 38, 38, 0.5);
}

/* плавное масштабирование

лёгкое "подсвечивание"

возврат в нормальное состояние */
#expensesTotal {
    transition: color 0.25s ease;
    font-weight: 600;
}

/* увеличение */
.total-up {
    color: #16a34a;
    text-shadow: 0 0 6px rgba(22, 163, 74, 0.4);
}

/* уменьшение */
.total-down {
    color: #dc2626;
    text-shadow: 0 0 6px rgba(220, 38, 38, 0.4);
}

/* ================================= */

/* Общие стили для input в модальном окне */
.modal-content input {
    height: 32px;                        /* высота поля */
    padding: 6px;                         /* внутренние отступы */
    border: 1px solid #ccc;               /* обычная рамка */
    border-radius: var(--radius-small);   /* скругление углов */
    font-family: var(--font-main);        /* шрифт такой же как body */
    color: #1f2933;                       /* цвет текста */
    background-color: #fff;               /* фон */
    transition: border 0.2s, box-shadow 0.2s; /* плавный переход */
}
/* Стили при фокусе на поле */
.modal-content input:focus {
    outline: none;                         /* убираем стандартный контур браузера */
    border: 1px solid #adafb3;             /* аккуратная синяя рамка */
    box-shadow: 0 0 4px rgba(61, 62, 66, 0.5); /* легкое свечение */
}
.modal-actions {
    display: flex;
    gap: 10px;
}

.modal-actions button {
    flex: 1;
    height: 34px;
    border: none;
    border-radius: var(--radius-small);
    cursor: pointer;
}


/* Стили кнопки "Сохранить" */
#saveBtn {
    background-color: var(--color-btn);    /* основной цвет кнопки */
    color: #ffffff;                        /* текст белый */
}

/* Hover эффект для "Сохранить" */
#saveBtn:hover {
    background-color: var(--color-sidebar); /* при наведении меняем цвет */
}

/* Стили кнопки "Отмена" */
#cancelBtn {
    background-color: #999999;             /* серый цвет */
    color: #ffffff;                        /* текст белый */
}

/* Hover эффект для "Отмена" */
#cancelBtn:hover {
    background-color: #777777;             /* чуть темнее при наведении */
}


/* Стили для текста плейсхолдера */
.modal-content input::placeholder {
    font-family: var(--font-main);       /* наследуем шрифт body */
    color: #999;                         /* цвет текста плейсхолдера */
    opacity: 1;                           /* для кроссбраузерности */
}

/* АВТОРИЗАЦИЯ */

.form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-color: #ffffff;
  padding: 30px;
  width: 450px;
  border-radius: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

::placeholder {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.form button {
  align-self: flex-end;
}

.flex-column > label {
  color: #151717;
  font-weight: 600;
}

.inputForm {
  border: 1.5px solid #ecedec;
  border-radius: 10px;
  height: 50px;
  display: flex;
  align-items: center;
  padding-left: 10px;
  transition: 0.2s ease-in-out;
}

.input {
  margin-left: 10px;
  border-radius: 10px;
  border: none;
  width: 100%;
  height: 100%;
}

.input:focus {
  outline: none;
}

.inputForm:focus-within {
  border: 1.5px solid #2d79f3;
}

.flex-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.flex-row > div > label {
  font-size: 14px;
  color: black;
  font-weight: 400;
}

.span {
  font-size: 14px;
  margin-left: 5px;
  color: #2d79f3;
  font-weight: 500;
  cursor: pointer;
}

.button-submit {
  margin: 20px 0 10px 0;
  background-color: #151717;
  border: none;
  color: white;
  font-size: 15px;
  font-weight: 500;
  border-radius: 10px;
  height: 50px;
  width: 100%;
  cursor: pointer;
}

.p {
  text-align: center;
  color: black;
  font-size: 14px;
  margin: 5px 0;
}

.btn {
  margin-top: 10px;
  width: 100%;
  height: 50px;
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 500;
  gap: 10px;
  border: 1px solid #ededef;
  background-color: white;
  cursor: pointer;
  transition: 0.2s ease-in-out;
}

.btn:hover {
  border: 1px solid #2d79f3;
  ;
}
.auth-overlay{
    position: fixed;                /* фиксируем */
    inset: 0;                       /* растягиваем */
    background: rgba(0,0,0,.4);     /* затемнение */
    display: flex;                 /* flex */
    justify-content: center;       /* центр */
    align-items: center;           /* центр */
    z-index: 300;                  /* поверх */
}

.auth-box{
    background: white;             /* фон */
    padding: 0px;                 /* отступ */
    border-radius: 16px;           /* скругление */
    position: relative;
}

/* восстановление пароля */


.form-container {
  max-width: 400px;
  background-color: #fff;
  padding: 32px 24px;
  font-size: 14px;
  font-family: inherit;
  color: #212121;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-sizing: border-box;
  border-radius: 10px;
  box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.084), 0px 2px 3px rgba(0, 0, 0, 0.168);
}

.form-container button:active {
  scale: 0.95;
}

.form-container .logo-container {
  text-align: center;
  font-weight: 600;
  font-size: 18px;
}

.form-container .form_forgot {
  display: flex;
  flex-direction: column;
}

.form-container .form-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.form-container .form-group label {
  display: block;
  margin-bottom: 5px;
}

.form-container .form-group input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 6px;
  font-family: inherit;
  border: 1px solid #ccc;
}

.form-container .form-group input::placeholder {
  opacity: 0.5;
}

.form-container .form-group input:focus {
  outline: none;
  border-color: #1778f2;
}

.form-container .form-submit-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: inherit;
  color: #fff;
  background-color: #212121;
  border: none;
  width: 100%;
  padding: 12px 16px;
  font-size: inherit;
  gap: 8px;
  margin: 12px 0;
  cursor: pointer;
  border-radius: 6px;
  box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.084), 0px 2px 3px rgba(0, 0, 0, 0.168);
}

.form-container .form-submit-btn:hover {
  background-color: #313131;
}

.form-container .link {
  color: #1778f2;
  text-decoration: none;
}

.form-container .signup-link {
  align-self: center;
  font-weight: 500;
}

.form-container .signup-link .link {
  font-weight: 400;
}

.form-container .link:hover {
  text-decoration: underline;
}


/* поле поиска */
.InputContainer {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgb(255, 255, 255);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  padding-left: 15px;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.055);
  margin-left: 40px;
}

.inputSearch{
  width: 170px;
  height: 100%;
  border: none;
  outline: none;
  font-size: 12px;
  color: var(--color-sidebar);
  caret-color: rgb(255, 81, 0);
}

.labelforsearch {
  cursor: text;
  padding: 0px 12px;
}

.searchIcon {
  width: 13px;
}

.border {
  height: 40%;
  width: 1.3px;
  background-color: rgb(223, 223, 223);
}

.micIcon {
  width: 12px;
}

.micButton {
  padding: 0px 15px 0px 12px;
  border: none;
  background-color: transparent;
  height: 40px;
  cursor: pointer;
  transition-duration: 0.3s;
}

.searchIcon path {
  fill: rgb(114, 114, 114);
}

.micIcon path {
  fill: rgb(255, 81, 0);
}

.micButton:hover {
  background-color: rgb(255, 230, 230);
  transition-duration: 0.3s;
}



/* =============== ОВАЛ ============= */
/* контейнер с готовыми расходами */
.expense-tags {
    flex: 1;
    border: 1px solid var(--color-bg);       /* рамка */
    border-radius: 8px;              /* скругление */
    padding: 8px;
    background-color: #ffffff;       /* лёгкий фон */

    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    margin-bottom: 10px;
    min-height: 200px;                /* минимальная видимая зона */
    max-height: 200px;               /* ограничиваем высоту */
    overflow-y: auto;                /* вертикальный скролл */
    align-content: flex-start;   /* ключевое */
    align-items: flex-start;     /* чтобы элементы не растягивались */
}

.expense-tags::-webkit-scrollbar {
    width: 6px;
}
.expense-tags::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 3px;
}

.expense-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background-color: #eef2f7;
    border-radius: 20px;
    font-size: 13px;
    cursor: default;
    height: 20px;
    opacity: 0;              /* изначально невидим */
    transform: scale(0.8);   /* немного уменьшен */
    transition: all 0.2s ease; /* плавность */
}

/* сам овал */


/* крестик удаления */
/* Крестик внутри овала */
.expense-tag button,
.expense-tag-delete {
    cursor: pointer;
    user-select: none;
    border: none;
    background: none;
    font-size: 14px;
    margin-left: 6px;
    transition: transform 0.15s ease, color 0.15s ease, text-shadow 0.15s ease;
}

/* Hover эффект для крестика овала */
.expense-tag button:hover, .expense-tag-delete:hover {
    color: #dc2626; /* красный цвет */
    /* transform: scale(1.2); /* слегка увеличиваем */
    text-shadow: 0 0 4px rgba(220, 38, 38, 0.5); /* лёгкий glow */
}

/* класс который "включает" появление */
.expense-tag.show {
    opacity: 1;
    transform: scale(1);
}


/* =========================
   CONTRACT EXPENSE PROGRESS
   ========================= */

.expense-progress{
    max-width: 120px;
    height: 4px;
    background: #e5e7eb;
    border-radius: 6px;
    position: relative;
    overflow: visible; /* чтобы tooltip был виден */

}

.expense-progress-fill{
    height: 100%;
    width: 0%;
    
    border-radius: 6px;
    
    transition: width 1s ease;
}

/* tooltip */
.expense-progress-tooltip{
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    background: #111;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    white-space: pre-line;
    width: 120px;   /* ширина по содержимому */

    white-space: normal;  /* разрешаем перенос */
    text-align: center;
}

.expense-progress:hover .expense-progress-tooltip{
    opacity: 1;
}

/* ================= SETTINGS MODAL ================= */

.settings-modal-content {
    background: white;
    width: 420px;
    padding: 24px;
    border-radius: var(--radius-medium);
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.settings-modal-content h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-btn);
    margin-bottom: 4px;
}

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

.settings-group label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.settings-modal-content input {
    height: 36px;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: var(--radius-small);
    font-size: 13px;
    transition: 0.2s;
}

.settings-modal-content input:focus {
    outline: none;
    border-color: var(--color-btn);
    box-shadow: 0 0 0 3px rgba(65, 84, 102, 0.12);
}


/* ================= SETTINGS MODAL FIX ================= */
#settingsModal .settings-modal-content {
    background: #fff;
    width: 420px;
    padding: 24px;
    border-radius: var(--radius-medium);
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

#settingsModal .settings-modal-content h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-btn);
    margin: 0;
}

#settingsModal .settings-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#settingsModal .settings-group label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

#settingsModal .settings-modal-content input {
    height: 36px;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: var(--radius-small);
    font-size: 13px;
    width: 100%;
}

#settingsModal .settings-modal-content input:focus {
    outline: none;
    border-color: var(--color-btn);
    box-shadow: 0 0 0 3px rgba(65, 84, 102, 0.12);
}

#settingsModal .modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

#settingsModal .modal-actions button {
    flex: 1;
    height: 36px;
    border: none;
    border-radius: var(--radius-small);
    cursor: pointer;
}

#saveSettingsBtn {
    background-color: var(--color-btn);
    color: white;
}

#saveSettingsBtn:hover {
    background-color: var(--color-sidebar);
}

#cancelSettingsBtn {
    background-color: #9ca3af;
    color: white;
}

#cancelSettingsBtn:hover {
    background-color: #6b7280;
}

/* ================= СТИЛИ ДЛЯ ПОДСВЕТКИ ПОИСКА ================= */

.search-highlight {
    background-color: #ffeb3b;
    color: #000000;
    font-weight: 600;
    padding: 0 2px;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

/* Анимация для появления/исчезновения карточек при поиске */
.contract_card {
    transition: display 0.2s ease, opacity 0.2s ease;
}

/* Дополнительный стиль для поля поиска при активном состоянии */
.InputContainer:focus-within {
    box-shadow: 0 0 0 2px rgba(97, 118, 134, 0.3);
    border-radius: 10px;
}



/* ================= КОНТЕЙНЕР ДЛЯ ПОИСКА И ФИЛЬТРА ================= */

/* Стили для выпадающего списка */
.filter-select {
    height: 40px;
    padding: 0 12px;
    margin-left: 40px;
    border: none;
    border-radius: var(--radius-medium);
    background-color: white;
    font-family: var(--font-main);
    font-size: 12px;
    color: var(--color-sidebar);
    cursor: pointer;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.055);
    transition: all 0.2s ease;
}

.filter-select:hover {
    border: 1px solid var(--color-bg);
}

.filter-select:focus {
    outline: none;
    border: 1px solid var(--color-sidebar);
    box-shadow: 0 0 0 2px rgba(97, 118, 134, 0.2);
}


/* ================= ВЫПАДАЮЩИЙ СПИСОК В СТИЛЕ ИНПУТА ================= */

.search-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 40px;
}

/* Обертка для селекта */
.filter-input-wrapper {
    position: relative;
}

/* Стилизация самого select под input */
.filter-select-input {
    height: 40px;
    margin-left: 40px;
    min-width: 180px;
    padding: 0 30px 0 12px;
    background-color: white;
    border: none;
    border-radius: var(--radius-medium);
    font-family: var(--font-main);
    font-size: 12px;
    color: var(--color-sidebar);
    cursor: pointer;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.055);
    transition: all 0.2s ease;
    appearance: none; /* Убираем стандартную стрелку */
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Стрелка для селекта */
.filter-input-wrapper::after {
    content: "▼";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: var(--color-sidebar);
    pointer-events: none;
    transition: transform 0.2s ease;
}

/* Анимация стрелки при открытии */
.filter-select-input:focus + .filter-input-wrapper::after,
.filter-select-input:active + .filter-input-wrapper::after {
    transform: translateY(-50%) rotate(180deg);
}

/* Hover эффект */
.filter-select-input:hover {
    border: 1px solid var(--color-bg);
    background-color: #f8f9fa;
}

/* Фокус (как у инпута) */
.filter-select-input:focus {
    outline: none;
    border: 1px solid var(--color-sidebar);
    box-shadow: 0 0 0 2px rgba(97, 118, 134, 0.2);
}

/* Стили для опций внутри выпадающего списка */
.filter-select-input option {
    padding: 10px;
    font-family: var(--font-main);
    font-size: 12px;
    background-color: white;
    color: #333;
}

/* Стиль для выпадающего списка (самого полотна) */
.filter-select-input option:hover {
    background-color: var(--color-bg);
}

/* Кастомный стиль для выпадающего списка в браузерах WebKit (Chrome, Safari) */
.filter-select-input::-webkit-listbox {
    border-radius: var(--radius-medium);
    border: 1px solid var(--color-sidebar);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 4px 0;
}

/* Стиль для опций в выпадающем списке */
.filter-select-input option {
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.filter-select-input option:checked {
    background-color: var(--color-bg);
    color: var(--color-sidebar);
}

/* ================= КАСТОМНЫЕ УВЕДОМЛЕНИЯ (TOAST) ================= */

.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1f2937;
    color: white;
    padding: 10px 20px;
    border-radius: 40px;
    font-size: 13px;
    font-family: var(--font-main);
    font-weight: 500;
    z-index: 1000;
    opacity: 0;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    white-space: nowrap;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-notification.error {
    background: #c62828;
}

.toast-notification.success {
    background: #2e7d32;
}

.toast-notification.warning {
    background: #ed6c02;
}

/* Для мобильных устройств - перенос текста */
@media (max-width: 600px) {
    .toast-notification {
        white-space: normal;
        max-width: 90%;
        text-align: center;
        font-size: 12px;
        padding: 8px 16px;
    }
}

/* Медиа-запрос для экранов меньше 768px */

    
/* =====================
   АДАПТИВНОСТЬ ДЛЯ ЭКРАНОВ МЕНЕЕ 1024px
   ===================== */
@media (max-width: 1024px) {
        .contract_card {

        font-size: 9px;
    }
}
/* =====================
   АДАПТИВНОСТЬ ДЛЯ ЭКРАНОВ МЕНЕЕ 768px
   ===================== */

@media (max-width: 815px) {

    .donate-sidebar-btn {
   
        margin-bottom: 10px;
    }
    
    .modal-content{
        width: 400px;
    }
    .modal-right{
        width: 150px;
    }
    .expense-text{
        width: 80px;
    }
    .expense-amount{
        width: 40px;
    }

    /* Скрываем только заголовки "Действует с" и "Действует по" */
    .contracts-header .date_from_header,
    .contracts-header .date_to_header {
        display: none;
    }
    
    /* Скрываем столбцы "Действует с" и "Действует по" в карточках */
    .contract_card .date_from,
    .contract_card .date_to {
        display: none;
    }
    
    /* Перестраиваем сетку заголовков без дат */
    .contracts-header {
        grid-template-columns: 
            38%      /* Название */
            12%      /* Круг */
            18%      /* Регион */
            18%      /* Цена */
            10%      /* Расход */
            4%       /* Действие */;
        gap: 4px;
        padding: 0 8px;
        font-size: 9px;
        display: grid; /*确保显示 */
    }
    
    /* Перестраиваем сетку карточки без дат */
    .contract_card {
        grid-template-columns: 
            38%      /* Название */
            12%      /* Круг */
            18%      /* Регион */
            18%      /* Цена */
            10%      /* Расход */
            4%       /* Действие */;
        gap: 4px;
        padding: 0 8px;
        font-size: 10px;
        height: 38px;
        width: 100%;
        margin: 0 0 12px 0;
    }
    
    /* Убираем боковую панель в отдельный блок */
    .sidebar {
        width: 100%;
        height: 50px;
        min-height: auto;
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 10px;
        border-radius: var(--radius-large) var(--radius-large) 0 0;
        order: -1;
    }
    
    #logout, #settingsBtn {
        margin: 0 0 0 10px;
    }
    
    .workspace {
        flex-direction: column;
        border-radius: var(--radius-large);
    }
    
    /* Панель с кнопками */
    .panel {
        flex-wrap: wrap;
        gap: 10px;
        height: auto;
        padding: 10px;
        margin: 10px 0 0 0;
    }
    
    .text1 {
        margin: 0 10px 0 10px;
        font-size: 14px;
    }
    
    /* Поиск и фильтр */
    .InputContainer {
        margin-left: 0;
        flex: 1;
        min-width: 150px;
    }
    
    .filter-input-wrapper {
        margin-left: 0;
        flex: 1;
        min-width: 150px;
    }
    
    .filter-select-input {
        margin-left: 0;
        width: 100%;
        min-width: auto;
    }
    
    /* Уменьшаем круг диаграммы */
    .progress-circle {
        width: 20px !important;
        height: 20px !important;
    }
    
    .progress-circle svg {
        display: none;
    }
    
    .progress-text {
        font-size: 7px !important;
    }
    
    /* Кнопка удаления */
    .action img {
        width: 14px;
        height: 14px;
    }
    
    /* Убираем фиксированные минимальные ширины */
    .wrap {
        min-width: auto;
        padding: 20px 10px;
    }
    
    .wrap2 {
        min-width: auto;
    }
    
    .workspace {
        min-width: auto;
    }
    
    .wrap_list {
        min-width: auto;
        overflow-x: auto;
    }
}

/* пользовательское соглашение */
/* Чекбокс в форме регистрации */

#termsModal {
    z-index: 1000 !important;
}

#termsModal .terms-content {
    width: 450px;
    max-width: 90%;
    flex-direction: column !important;
    background: white;
    position: relative;
    z-index: 1001;
}
.checkbox-wrapper {
    margin: 10px 0 5px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #555;
    cursor: pointer;
}

.checkbox-label input {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

.checkbox-label span a {
    color: var(--color-btn);
    text-decoration: none;
}

.checkbox-label span a:hover {
    text-decoration: underline;
}

/* Модалка пользовательского соглашения */
.terms-content {
    width: 450px;
    max-width: 90%;
    flex-direction: column !important;
}

.terms-text {
    font-size: 13px;
    line-height: 1.5;
    color: #333;
    max-height: 400px;
    overflow-y: auto;
    padding: 5px;
}

.terms-text ul {
    margin: 10px 0;
    padding-left: 20px;
}

.terms-text li {
    margin: 5px 0;
}

#showTermsLink{
    color: #1778f2
}

.landing-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(180deg, #f7f9fc 0%, #eef3f8 100%);
}

.landing-card {
  width: 100%;
  height: 100%;
  max-width: 770px;
  background: white;
  border-radius: 20px;
  padding: 48px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
  overflow-y: auto;
}

.landing-card h1 {
  margin: 0 0 16px;
  font-size: 30px;
  text-align:center;
}

.landing-card p {
  font-size: 14px;
  line-height: 1.6;
  color: #4b5563;
}

.landing-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 28px 0;
  font-size: 14px;
}

.landing-actions {
  display: flex;
  gap: 12px;
}

.landing-actions button {
  border: none;
  border-radius: 12px;
  padding: 14px 22px;
  font-size: 14px;
  cursor: pointer;
}

#startFreeBtn {
  background: #111827;
  color: white;
}

#openLoginBtn {
  background: #e5e7eb;
}
#landing {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #f7f9fc 0%, #eef3f8 100%);
    padding: 24px;
    height: 100%;
}

/* Для экранов меньше 500px - делаем поиск шире за счёт других элементов */
@media (max-width: 550px) {
    .InputContainer {
        min-width: 140px;
    }
    
    .form{
        width: 300px;
    }
    
    .modal-content{
        width: 400px;
    }
    .modal-right{
        width: 150px;
    }
    .expense-text{
        width: 80px;
    }
    .expense-amount{
        width: 40px;
    }    

    .inputSearch {
        min-width: 80px;
        
    }
    
    /* Уменьшаем отступы внутри поиска */
    .InputContainer {
        padding-left: 8px;  /* было 15px */
    }
    
    .labelforsearch {
        padding: 0 8px;     /* было 0px 12px */
    }

    .donate-sidebar-btn {
   
        margin-bottom: 10px;
    }
    .title_header, .region_header, .status_header, .price_header, .expenses_header{
        display: none;
    }

    .expenses-total-label, .currency{
        font-size: 14px;
    }

    #expensesTotal, #modal_label{
        font-size: 14px;
    }
}

@media (max-width: 450px) {
    .InputContainer {
        min-width: 120px;
    }
    
    .inputSearch {
        min-width: 60px;
        
    }
    
    .form{
        width: 300px;
    }
    
    .modal-content{
        width: 400px;
    }
    .modal-right{
        width: 150px;
    }
    .expense-text{
        width: 80px;
    }
    .expense-amount{
        width: 40px;
    }


    .InputContainer {
        padding-left: 5px;
    }
    
    .labelforsearch {
        padding: 0 5px;
    }
    .donate-sidebar-btn {
   
        margin-bottom: 10px;
    }
    .title_header, .region_header, .status_header, .price_header, .expenses_header{
        display: none;
    }

    .expenses-total-label, .currency{
        font-size: 14px;
    }

    #expensesTotal, #modal_label{
        font-size: 14px;
    }
}


/* ================= МОДАЛКА ПОЖЕРТВОВАНИЙ (ПРОСТАЯ ВЕРТИКАЛЬНАЯ) ================= */


.donate-simple-modal {
    background: white;
    padding: 24px;
    border-radius: var(--radius-medium);
    width: 420px;
    max-width: 90%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.donate-simple-modal h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-btn);
    margin: 0;
}

.donate-text {
    font-size: 13px;
    line-height: 1.5;
    color: #4b5563;
    margin: 0;
}

.donate-card-box {
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #e2e8f0;
}

.donate-card-label {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 8px;
}

.donate-card-number {
    font-size: 18px;
    font-weight: 700;
    font-family: monospace;
    letter-spacing: 2px;
    background: white;
    padding: 8px 12px;
    border-radius: 6px;
    text-align: center;
    border: 1px solid #cbd5e1;
}

.donate-simple-modal .modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.donate-simple-modal .modal-actions button {
    flex: 1;
    height: 36px;
    border: none;
    border-radius: var(--radius-small);
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 13px;
}

#copyCardBtn {
    background-color: var(--color-btn);
    color: white;
}

#copyCardBtn:hover {
    background-color: var(--color-sidebar);
}

#closeDonateBtn {
    background-color: #9ca3af;
    color: white;
}

#closeDonateBtn:hover {
    background-color: #6b7280;
}

/* Адаптив */
@media (max-width: 500px) {
    .donate-simple-modal {
        width: 340px;
        padding: 20px;
    }
}

/* ================= КНОПКА ПОЖЕРТВОВАНИЙ В БОКОВОМ МЕНЮ ================= */

.donate-sidebar-btn {
    position: relative;
    border: none;
    background-color: transparent;
    cursor: pointer;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    border-radius: 50%;
    margin-left: 10px;
    margin-top: 10px;
}

.donate-sidebar-btn:hover {
    transform: scale(1.15);
    background-color: rgba(255, 255, 255, 0.1);
}

/* SVG сердечко - можно красить в любой цвет! */
.donate-sidebar-heart {
    width: 20px;
    height: 20px;
    position: relative;
    z-index: 2;
    color: #f8cbc4; /* нежный розовый */
    transition: color 0.2s ease;
    stroke: #f8cbc4;
    fill: #f8cbc4;
   
}

.donate-sidebar-btn:hover .donate-sidebar-heart {
    color: #ffa2a2; /* чуть насыщеннее при наведении */
    stroke: #ffa2a2;
    fill: #ffa2a2;
}

/* Пульсирующая волна (светлый розовый) */
.donate-sidebar-pulse {
    position: absolute;
    width: 36px;
    height: 36px;
    background-color: rgba(249, 168, 168, 0.5); /* нежный розовый */
    border-radius: 50%;
    z-index: 0;
    opacity: 0;
    transform: scale(0.5);
    pointer-events: none;
}

/* Анимация пульсации */
@keyframes sidebarHeartPulse {
    0% {
        transform: scale(0.5);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

/* Класс для запуска анимации */
.donate-sidebar-pulse.active {
    animation: sidebarHeartPulse 0.7s ease-out forwards;
}

/* ================= КНОПКИ КОПИРОВАНИЯ ДЛЯ КАРТ ================= */

.copy-card-btn-small {
    transition: all 0.2s ease;
}

.copy-card-btn-small:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.copy-card-btn-small:active {
    transform: scale(0.95);
}

/* Hover эффект для блоков с картами */
.donate-card-item {
    transition: all 0.2s ease;
}

.donate-card-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
