/* --- Общие настройки --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0fff0;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 70px;
}

main {
    flex: 1 0 auto;
}

/* --- Navbar --- */
.navbar {
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    z-index: 1050;
}
.navbar-green {
    background-color: #d4f7d4;
}
.navbar-brand i {
    transition: transform 0.3s ease, color 0.3s ease;
}
.navbar-brand:hover i {
    transform: rotate(-10deg) scale(1.1);
    color: #1d991d;
}
.navbar .nav-link {
    position: relative;
    transition: color 0.2s ease;
}
.navbar .nav-link.active {
    color: #047904 !important;
}
.navbar .nav-link.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    height: 3px;
    width: 100%;
    background-color: #32cd32;
    border-radius: 3px;
}
.navbar .nav-link:hover {
    color: #047904 !important;
}

/* --- Профиль --- */
.profile-dropdown .profile-link {
    padding: 4px 12px;
    border: 2px solid #b9e4b9;
    border-radius: 25px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}
.profile-dropdown .profile-link:hover {
    background-color: #eaffea;
    border-color: #32cd32;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.profile-dropdown .profile-link img {
    margin-right: 6px;
}
.profile-box {
    border: 2px solid #b9e4b9;
    border-radius: 15px;
    padding: 8px 12px;
    background-color: #f9fff9;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}
.profile-box:hover {
    border-color: #32cd32;
    background-color: #eaffea;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.navbar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #b9e4b9;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* --- Кнопки --- */
.btn-main {
    background-color: #32cd32;
    color: #fff;
    border-radius: 25px;
    height: 48px;
    padding: 4px 20px;
    max-width: 220px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
    border: none;
}
.btn-main:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
    background-color: #28b428;
}
.btn-light {
    background-color: #e6ffe6;
    color: #32cd32;
    border-radius: 25px;
    width: 100%;
    max-width: 200px;
    transition: all 0.3s ease;
}
.btn-light:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* --- Поля ввода --- */
.form-control {
    border-radius: 25px;
    border: 1px solid #d0d0d0;
    padding: 10px 14px;
    transition: all 0.3s ease;
}
.form-control:focus {
    border-color: #32cd32;
    box-shadow: 0 0 0 0.15rem rgba(50, 205, 50, 0.25);
}

/* --- Кнопка поиска --- */
.search-form {
    display: flex;
    align-items: center;
    position: relative;
    max-width: 300px;
}
.search-form input {
    flex: 1;
    padding-right: 2.5rem; /* место для крестика */
}
.search-clear {
    position: absolute;
    right: 60px; /* отступ от кнопки поиска */
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    font-size: 1.2rem;
    cursor: pointer;
    color: #888;
    z-index: 2;
    padding: 0;
}
.search-clear:hover {
    color: #32cd32;
}
.search-form button {
    margin-left: 8px;
    border-radius: 25px;
    background-color: #32cd32;
    color: #fff;
    border: none;
    padding: 10px 18px;
    transition: all 0.3s ease;
    z-index: 3;
}
.search-form button:hover:not(:disabled) {
    background-color: #28b428;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* --- Offcanvas меню --- */
.offcanvas-body {
    padding: 1rem;
}
.offcanvas .list-group-item {
    border-radius: 10px;
    margin-bottom: 5px;
}
.offcanvas .list-group-item-action:hover {
    background-color: #e6ffe6;
}

/* --- Footer --- */
.footer {
    background-color: #d4f7d4;
    border-top: 2px solid #b9eeb9;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
    font-size: 0.95rem;
    color: #2e2e2e;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
}
.footer:hover {
    background-color: #c9f4c9;
}
.footer-link {
    color: #047904;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease, transform 0.2s ease;
}
.footer-link:hover {
    color: #025c02;
    transform: translateY(-2px);
}
.footer-sub-link {
    color: #2e2e2e;
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-sub-link:hover {
    color: #047904;
    text-decoration: underline;
}
.footer i {
    font-size: 1.2rem;
}
.brand-icon-footer {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: linear-gradient(180deg,#e8ffea,#d4f7d4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
.brand-icon-footer i {
    font-size: 1.1rem;
    color: #047904;
}
.brand-text {
    font-size: 1rem;
    color: #0b6620;
}

/* --- Адаптивность --- */
@media (max-width: 576px) {
    .search-form { max-width: 180px; }
    .search-clear { right: 50px; }
    .footer { text-align: center; }
    .footer .container { flex-direction: column; gap: 10px; }
    .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }
    .navbar-avatar { width: 32px; height: 32px; }
    .btn-main, .btn-light { height: 44px; }
}

/* --- Карточка профиля --- */
.profile-card {
    border-radius: 15px;
    background-color: #f9fff9;
    border: 1px solid #b9e4b9;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}
.profile-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* --- Аватар с эффектом --- */
.avatar-wrapper {
    display: inline-block;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(145deg, #32cd32, #1d991d);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.avatar-wrapper:hover {
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(50,205,50,0.6);
}
.profile-img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #b9e4b9;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.avatar-wrapper:hover .profile-img {
    transform: scale(1.05);
}

/* --- Toast корректировка --- */
.toast-body {
    font-weight: 500;
}

/* --- Поля формы --- */
.profile-form {
    border-radius: 15px;
    transition: box-shadow 0.3s ease;
}
.profile-form:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* --- Кнопка глазик для пароля --- */
.input-group .toggle-password {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}
.input-group .toggle-password:hover {
    background-color: #e6ffe6;
}
.input-group .password-input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* --- Активная вкладка navbar --- */
.navbar .nav-link.active-tab {
    background-color: #e6ffe6;
    border: 2px solid #32cd32;
    border-radius: 12px;
    color: #047904 !important;
    padding: 6px 12px;
}
.navbar .nav-link.active-tab:hover {
    background-color: #d4f7d4;
    border-color: #28b428;
}
