/* ===== NAVBAR ===== */
.navbar {
    position: sticky;
    top: 0;
    height: 64px;
    width: 100%;
    padding: 0 40px;
    display: flex;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(18, 41, 75, 0.06);
    z-index: 500;
    transition: box-shadow 0.3s;
}

.navbar:hover {
    box-shadow: 0 2px 16px rgba(18, 41, 75, 0.06);
}

.navbar-elements {
    width: 100%;
    max-width: 1280px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo — крупный, акцентный */
.navbar-logo-link {
    text-decoration: none;
    display: flex;
    align-items: baseline;
    flex-shrink: 0;
    gap: 0;
    transition: opacity 0.2s;
}

.navbar-logo-link:hover {
    text-decoration: none;
    opacity: 0.8;
}

.navbar-logo-text {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--color-blue-dark);
    letter-spacing: 2.5px;
}

.navbar-logo-dot {
    font-size: 2.2rem;
    font-weight: 800;
    color: #e8a838;
}

/* Menu items */
.navbar-main-menu {
    display: flex;
    gap: 0;
    justify-content: center;
    align-items: center;
}

.navbar-main-menu-item {
    color: var(--color-blue-dark);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 20px 16px;
    position: relative;
    transition: color 0.2s;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.navbar-main-menu-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background: var(--color-blue-dark);
    border-radius: 2px 2px 0 0;
    transform: scaleX(0);
    transition: transform 0.2s;
}

.navbar-main-menu-item:hover {
    color: var(--color-blue-dark);
    text-decoration: none;
}

.navbar-main-menu-item:hover::after {
    transform: scaleX(1);
}

.navbar-main-menu-item-active {
    color: var(--color-blue-dark);
    font-weight: 600;
}

.navbar-main-menu-item-active::after {
    transform: scaleX(1);
}

/* Right side */
.navbar-right-menu-block {
    display: flex;
    gap: 8px;
    align-items: center;
}

.navbar-right-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* === Navbar buttons (auth) === */
.navbar-btn {
    font-size: 15px;
    font-weight: 600;
    padding: 9px 22px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s;
    white-space: nowrap;
    line-height: 1.4;
}

.navbar-btn--primary {
    background: var(--color-blue-dark);
    color: #fff;
    box-shadow: 0 2px 8px rgba(18, 41, 75, 0.12);
}

.navbar-btn--primary:hover {
    background: var(--color-blue-dark-2);
    box-shadow: 0 4px 12px rgba(18, 41, 75, 0.2);
    transform: translateY(-1px);
}

.navbar-btn--primary:active {
    background: var(--color-blue-dark-3);
    transform: translateY(0);
}

.navbar-btn--ghost {
    background: rgba(18, 41, 75, 0.06);
    color: var(--color-blue-dark);
    box-shadow: none;
}

.navbar-btn--ghost:hover {
    background: rgba(18, 41, 75, 0.1);
    transform: translateY(-1px);
}

.navbar-btn--ghost:active {
    background: rgba(18, 41, 75, 0.14);
    transform: translateY(0);
}

/* Language selector */
.navbar-langs {
    position: relative;
}

.navbar-lang-select {
    background: transparent;
    border: none;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    margin-right: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-blue-dark);
    transition: background 0.15s, color 0.15s;
    box-shadow: none;
}

.navbar-lang-select:hover {
    background: rgba(18, 41, 75, 0.08);
    color: var(--color-blue-dark);
}

.navbar-lang-select img {
    width: 10px;
    opacity: 0.45;
    transition: opacity 0.15s;
}

.navbar-lang-select:hover img {
    opacity: 0.7;
}

.lang-dropdown {
    background-color: white;
    position: absolute;
    top: 40px;
    right: 8px;
    padding: 6px;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(18, 41, 75, 0.12);
    border: 1px solid rgba(18, 41, 75, 0.06);
    min-width: 130px;
}

.lang-dropdown-item {
    color: var(--color-blue-dark);
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    transition: background 0.15s;
}

.lang-dropdown-item:hover {
    background: rgba(18, 41, 75, 0.05);
}

/* User info */
.navbar-user-first-name,
.navbar-user-last-name,
.navbar-user-phone {
    font-size: 0.9rem;
    font-weight: 500;
}

.navbar-user-phone {
    border: none;
    color: var(--color-blue-dark-3);
    font-size: 15px;
    font-weight: 500;
}

.navbar-avatar {
    border-radius: 100px;
    object-fit: cover;
    width: 38px;
    height: 38px;
    border: 2px solid rgba(18, 41, 75, 0.08);
    transition: border-color 0.15s;
}

.navbar-avatar:hover {
    border-color: rgba(18, 41, 75, 0.16);
}

/* ===== Profile dropdown (unified company + logout) ===== */
.navbar-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    position: relative;
    padding: 4px 0;
    user-select: none;
}

.navbar-profile-info {
    text-align: right;
}

.navbar-profile-name {
    font-size: 15px;
    font-weight: 600;
    color: #12294B;
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.navbar-profile-phone {
    font-size: 15px;
    color: #5a6a7e;
    line-height: 1.3;
}

.navbar-profile-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid rgba(18, 41, 75, 0.08);
    transition: border-color 0.15s;
}

.navbar-profile:hover .navbar-profile-avatar {
    border-color: rgba(18, 41, 75, 0.18);
}

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

.navbar-profile-chevron {
    color: #9aa5b4;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.navbar-profile-dropdown:not([hidden]) ~ .navbar-profile-chevron,
.navbar-profile-chevron.open {
    transform: rotate(180deg);
}

/* Dropdown panel */
.navbar-profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 240px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(18, 41, 75, 0.12), 0 2px 8px rgba(18, 41, 75, 0.06);
    border: 1px solid rgba(18, 41, 75, 0.06);
    padding: 8px 0;
    z-index: 9999;
    animation: navDdFadeIn 0.15s ease;
}

@keyframes navDdFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.navbar-dd-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #9aa5b4;
    padding: 8px 16px 4px;
}

.navbar-dd-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    font-size: 15px;
    color: #12294B;
    cursor: pointer;
    transition: background 0.12s;
    text-decoration: none;
    white-space: nowrap;
}

.navbar-dd-item:hover {
    background: #f4f6f9;
}

.navbar-dd-item--active {
    font-weight: 600;
    color: #3657CD;
}

.navbar-dd-item--active svg:first-child {
    stroke: #3657CD;
}

.navbar-dd-check {
    margin-left: auto;
}

.navbar-dd-item--add {
    color: #5a6a7e;
    font-weight: 500;
}

.navbar-dd-item--add:hover {
    color: #3657CD;
}

.navbar-dd-divider {
    height: 1px;
    background: #f0f2f7;
    margin: 6px 0;
}

.navbar-dd-item--logout {
    color: #c62828;
}

.navbar-dd-item--logout:hover {
    background: #fef2f2;
}

.navbar-dd-item--logout svg {
    stroke: #c62828;
}

/* Burger menu */
.navbar-burger {
    display: none;
    margin-right: 8px;
    opacity: 0.5;
    cursor: pointer;
    transition: opacity 0.15s;
}

.navbar-burger:hover {
    opacity: 0.9;
}

/* === Notification bell === */
.navbar-notif-bell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s;
    margin-right: 4px;
}

.navbar-notif-bell:hover {
    background: rgba(18, 41, 75, 0.06);
}

.navbar-notif-bell svg {
    color: var(--color-blue-dark);
}

/* Notification dot */
.notif-red-dot {
    display: none;
    position: absolute;
    top: 6px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    color: white;
    background-color: #E53935;
    font-size: 10px;
    font-weight: 600;
    padding: 0 4px;
    line-height: 16px;
    text-align: center;
}

/* Notification dropdown */
#notif-dropdown {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 44px;
    right: 0;
    height: max-content;
    max-height: 420px;
    width: 360px;
    max-width: 95vw;
    border-radius: 16px;
    background-color: white;
    box-shadow: 0 12px 40px rgba(18, 41, 75, 0.14);
    border: 1px solid rgba(18, 41, 75, 0.06);
    overflow: hidden;
    padding: 0;
    animation: navDdFadeIn 0.15s ease;
}

/* Dropdown header */
.notif-dd-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px 12px;
    border-bottom: 1px solid #f0f2f7;
}

.notif-dd-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notif-dd-title {
    font-size: 15px;
    font-weight: 700;
    color: #12294B;
}

.notif-dd-badge {
    background: #e3f2fd;
    color: #1565c0;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    line-height: 1.4;
}

.notif-dd-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.notif-dd-header-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #5a6a7e;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.notif-dd-header-btn:hover {
    background: #f0f2f7;
    color: #12294B;
}

.notif-dd-back-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: none;
    background: #f0f2f7;
    color: #5a6a7e;
    cursor: pointer;
    transition: background 0.15s;
}

.notif-dd-back-btn:hover {
    background: #e0e6ee;
}

/* Dropdown body — types list */
#notif-dropdown-types {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scrollbar-width: thin;
    flex-grow: 1;
    padding: 8px;
    gap: 2px;
}

.notif-type-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s;
}

.notif-type-item:hover {
    background: rgba(18, 41, 75, 0.04);
}

.notif-type-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.notif-type-info {
    flex: 1;
    min-width: 0;
}

.notif-type-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.notif-type-name {
    font-size: 13px;
    font-weight: 700;
    color: #12294B;
}

.notif-type-count {
    background: #12294B;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 8px;
    line-height: 1.5;
}

.notif-type-preview {
    font-size: 12px;
    color: #5a6a7e;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.notif-type-date {
    font-size: 11px;
    color: #9aa5b4;
    text-align: right;
    margin-top: 2px;
}

/* Dropdown body — individual notifs */
#notif-dropdown-notifs {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scrollbar-width: thin;
    flex-grow: 1;
    padding: 8px;
    gap: 2px;
}

.notif-item {
    padding: 10px 12px;
    border-radius: 10px;
    transition: background 0.15s, opacity 0.3s;
    cursor: pointer;
}

.notif-item:hover {
    background: rgba(18, 41, 75, 0.04);
}

.notif-item-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.5;
    white-space: normal;
    color: #3a4a5e;
}

/* Dropdown footer */
.notif-dd-footer {
    display: flex;
    border-top: 1px solid #f0f2f7;
}

.notif-dd-footer-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-align: center;
    text-decoration: none;
    color: #5a6a7e;
}

.notif-dd-footer-btn:hover {
    background: #f8f9fb;
    color: #3657CD;
    text-decoration: none;
}

.notif-dd-footer-divider {
    width: 1px;
    background: #f0f2f7;
}

/* Ellipsis helper */
.text-ellipsis,
.elipses {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Company selector */
#company-select-dropdown {
    position: absolute;
    top: 28px;
    right: 0;
    width: max-content;
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    overflow: hidden;
    background-color: white;
    box-shadow: 0 8px 32px rgba(18, 41, 75, 0.12);
    border: 1px solid rgba(18, 41, 75, 0.06);
}

.company-select-item {
    padding: 8px 16px;
    font-size: 14px;
    transition: background 0.15s;
}

.company-select-item:hover {
    background-color: rgba(18, 41, 75, 0.04);
    cursor: pointer;
}

/* === Notifications full page (show_all_notifs) === */
.notif-page-wrap {
    max-width: 960px;
    width: 90%;
    margin: 0 auto;
    padding: 100px 24px 80px;
}

.notif-page-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.notif-page-header-icon {
    width: 48px;
    height: 48px;
    background: #f0f4ff;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notif-page-title {
    font-size: 24px;
    font-weight: 700;
    color: #12294B;
    margin: 0;
}

.notif-page-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.notif-page-filter {
    padding: 8px 16px;
    border: 1px solid #e0e6ee;
    border-radius: 10px;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    color: #3a4a5e;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.notif-page-filter:hover:not(:disabled) {
    border-color: #3657CD;
    color: #3657CD;
}

.notif-page-filter:disabled {
    background: linear-gradient(135deg, #3657CD 0%, #12294B 100%);
    color: #fff;
    border-color: transparent;
    cursor: default;
}

.notif-page-filter-count {
    font-size: 11px;
    opacity: 0.7;
}

.notif-page-filter-unread {
    color: #d32f2f;
    font-size: 11px;
    font-weight: 600;
}

.notif-page-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notif-page-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e6ee;
    padding: 16px 20px;
    border-radius: 14px;
    background: #fff;
    transition: border-color 0.15s;
}

.notif-page-card:hover {
    border-color: rgba(54, 87, 205, 0.2);
}

.notif-page-card-date {
    font-size: 12px;
    color: #9aa5b4;
    font-weight: 500;
    margin-bottom: 4px;
}

.notif-page-card-text {
    font-size: 14px;
    color: #3a4a5e;
    line-height: 1.6;
}

.notif-page-card-read {
    font-size: 12px;
    color: #9aa5b4;
    text-align: right;
    margin-top: 8px;
}

@media (max-width: 640px) {
    .notif-page-wrap {
        padding: 80px 16px 48px;
    }

    .notif-page-filters {
        gap: 6px;
    }

    .notif-page-filter {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1280px) {
    .navbar-burger {
        display: block;
        height: 24px;
    }

    .navbar-right-menu {
        display: flex;
    }

    .navbar-profile-info {
        display: none;
    }

    .navbar-langs {
        margin-right: 8px;
    }
}

@media (max-width: 1000px) {
    .navbar {
        padding: 0 16px;
        height: 56px;
    }

    .navbar-main-menu {
        display: none;
    }

    .navbar-logo-text,
    .navbar-logo-dot {
        font-size: 1.7rem;
    }

    .navbar-user-phone {
        font-size: 0.8rem;
    }

    .navbar-avatar {
        width: 34px;
        height: 34px;
    }

    .navbar-profile-avatar {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 640px) {
    .navbar-lang-select {
        margin-right: 0;
    }

    .navbar-logo-text,
    .navbar-logo-dot {
        font-size: 1.5rem;
    }
}

@media (max-width: 500px) {
    #notif-dropdown {
        left: 50%;
        transform: translateX(-38%);
        right: auto;
        z-index: 1;
    }

    .navbar-notif-bell {
        width: 36px;
        height: 36px;
        margin-right: 0;
    }

    .navbar-notif-bell svg {
        width: 20px;
        height: 20px;
    }

    .navbar-right-menu-block {
        gap: 4px;
    }

    .navbar-btn {
        display: none;
    }
}

/* ===== MOBILE MENU OVERLAY ===== */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(18, 41, 75, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.mobile-menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-panel {
    position: absolute;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 85vw;
    height: 100%;
    background: white;
    box-shadow: -8px 0 32px rgba(18, 41, 75, 0.15);
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
}

.mobile-menu-overlay.open .mobile-menu-panel {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(18, 41, 75, 0.06);
}

.mobile-menu-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s;
}

.mobile-menu-close:hover {
    background: rgba(18, 41, 75, 0.06);
}

.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
    flex: 1;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    color: var(--color-blue-dark);
    text-decoration: none;
    transition: background 0.15s;
}

.mobile-menu-link:hover,
.mobile-menu-link:active {
    background: rgba(18, 41, 75, 0.05);
    text-decoration: none;
    color: var(--color-blue-dark);
}

.mobile-menu-link svg {
    flex-shrink: 0;
    opacity: 0.5;
}

.mobile-menu-cta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 24px;
    border-top: 1px solid rgba(18, 41, 75, 0.06);
}

.mobile-menu-btn {
    width: 100%;
    padding: 13px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.15s, transform 0.15s;
    display: block;
}

.mobile-menu-btn--primary {
    background: var(--color-blue-dark);
    color: #fff;
    box-shadow: 0 4px 16px rgba(18, 41, 75, 0.18);
}

.mobile-menu-btn--primary:hover {
    background: var(--color-blue-dark-2);
}

.mobile-menu-btn--ghost {
    background: rgba(18, 41, 75, 0.06);
    color: var(--color-blue-dark);
}

.mobile-menu-btn--ghost:hover {
    background: rgba(18, 41, 75, 0.1);
}

.mobile-menu-btn--outline {
    background: transparent;
    color: var(--color-blue-dark);
    border: 1.5px solid rgba(18, 41, 75, 0.15);
}

.mobile-menu-btn--outline:hover {
    background: rgba(18, 41, 75, 0.04);
    text-decoration: none;
    color: var(--color-blue-dark);
}
