/* Remove focus outline globally */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: none !important;
    box-shadow: none !important;
}

.profile-dropdown-wrapper {
    position: relative;
}

.profile-trigger {
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
}

.profile-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22b3a5 0%, #1a9a8e 100%);
    overflow: hidden;
    border: 2px solid transparent;
}

.profile-dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 8px 0;
}

.profile-dropdown-item--admin {
    background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%);
    color: #92400e;
    position: relative;
}

.profile-dropdown-item--admin:hover {
    background: linear-gradient(135deg, #fde68a 0%, #fef08a 100%);
    color: #78350f;
}

.profile-dropdown-item--admin i {
    color: #d97706;
}

.profile-dropdown-badge {
    background: #ef4444;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
    font-weight: 600;
}

.profile-trigger:hover .profile-avatar {
    border-color: #22b3a5;
}

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

.profile-avatar-initials {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    z-index: 1100;
    overflow: hidden;
    display: none;
    opacity: 0;
    visibility: hidden;
}

.profile-dropdown-wrapper::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 20px;
    background: transparent;
}

@media (hover: hover) {
    .profile-dropdown-wrapper:hover .profile-dropdown {
        display: block;
        opacity: 1;
        visibility: visible;
    }
}

.profile-dropdown-header {
    display: flex;
    gap: 14px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e5e7eb;
}

.profile-dropdown-avatar {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #22b3a5 0%, #1a9a8e 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.profile-avatar-initials-lg {
    color: #fff;
    font-weight: 700;
    font-size: 20px;
}

.profile-dropdown-info {
    flex: 1;
    min-width: 0;
}

.profile-dropdown-name {
    font-weight: 700;
    font-size: 18px;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px;
}

.profile-dropdown-role {
    margin-top: 8px;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.role-badge--designer {
    background: linear-gradient(135deg, #dbeafe 0%, #ede9fe 100%);
    color: #4f46e5;
}

.role-badge--customer {
    background: linear-gradient(135deg, #d1fae5 0%, #ecfeff 100%);
    color: #059669;
}

.profile-dropdown-body {
    padding: 8px;
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: #374151;
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.profile-dropdown-item:hover {
    background: #f3f4f6;
    color: #111827;
    transform: translateX(4px);
}

.profile-dropdown-item i {
    font-size: 18px;
    color: #9ca3af;
    transition: color 0.2s;
}

.profile-dropdown-item:hover i {
    color: #22b3a5;
}

.profile-dropdown-item--accent {
    background: linear-gradient(135deg, #f0fdf9 0%, #ecfeff 100%);
    color: #059669;
    margin-top: 4px;
}

.profile-dropdown-item--accent:hover {
    background: linear-gradient(135deg, #d1fae5 0%, #cffafe 100%);
    color: #047857;
}

.profile-dropdown-item--accent i {
    color: #10b981;
}

.profile-dropdown-item--payouts {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    color: #059669;
    margin-top: 4px;
}

.profile-dropdown-item--payouts:hover {
    background: linear-gradient(135deg, #d1fae5 0%, #dcfce7 100%);
    color: #047857;
    transform: translateX(4px);
}

.profile-dropdown-item--payouts i {
    color: #10b981;
}

.profile-dropdown-footer {
    padding: 8px;
    border-top: 1px solid #e5e7eb;
    background: #fafafa;
}

.profile-dropdown-logout {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: #6b7280;
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.profile-dropdown-logout:hover {
    background: #fef2f2;
    color: #dc2626;
}

.profile-dropdown-logout i {
    font-size: 18px;
}

.profile-dropdown-logout:hover i {
    color: #dc2626;
}

.notification-dropdown {
    position: relative;
}

.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 999px;
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.4);
}

.notif-menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    width: 340px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    z-index: 1100;
    overflow: hidden;
}

.notif-menu-header {
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.notif-mark-read-btn {
    border: none;
    background: transparent;
    color: #22b3a5;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.notif-mark-read-btn:hover {
    background: #f0fdf9;
}

.notif-menu-body {
    max-height: 380px;
    overflow-y: auto;
}

.notif-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: all 0.2s;
}

.notif-item:hover {
    background: #f9fafb;
}

.notif-item.unread {
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
    border-left: 3px solid #22b3a5;
}

.notif-item-title {
    font-weight: 600;
    font-size: 13px;
    color: #111827;
    margin-bottom: 4px;
}

.notif-item-message {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

.notif-item-meta {
    margin-top: 6px;
    font-size: 11px;
    color: #9ca3af;
}

.notif-empty {
    padding: 30px 16px;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
}

.navbar-brand {
    font-size: 1.4rem;
    font-weight: 700;
    color: #22b3a5 !important;
    text-decoration: none !important;
    letter-spacing: -0.5px;
    transition: opacity 0.2s;
}

.navbar-brand:hover {
    text-decoration: none !important;
    opacity: 0.85;
}

[data-theme="dark"] .profile-dropdown,
.dark .profile-dropdown {
    background: #1f2937;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .profile-dropdown-header,
.dark .profile-dropdown-header {
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    border-color: #374151;
}

[data-theme="dark"] .profile-dropdown-name,
.dark .profile-dropdown-name {
    color: #f9fafb;
}

[data-theme="dark"] .profile-dropdown-username,
.dark .profile-dropdown-username {
    color: #9ca3af;
}

[data-theme="dark"] .profile-dropdown-item,
.dark .profile-dropdown-item {
    color: #d1d5db;
}

[data-theme="dark"] .profile-dropdown-item:hover,
.dark .profile-dropdown-item:hover {
    background: #374151;
    color: #f9fafb;
}

[data-theme="dark"] .profile-dropdown-footer,
.dark .profile-dropdown-footer {
    background: #111827;
    border-color: #374151;
}

[data-theme="dark"] .notif-menu,
.dark .notif-menu {
    background: #1f2937;
}

[data-theme="dark"] .notif-menu-header,
.dark .notif-menu-header {
    background: #111827;
    border-color: #374151;
    color: #f9fafb;
}

[data-theme="dark"] .notif-item,
.dark .notif-item {
    border-color: #374151;
}

[data-theme="dark"] .notif-item:hover,
.dark .notif-item:hover {
    background: #374151;
}

[data-theme="dark"] .notif-item-title,
.dark .notif-item-title {
    color: #f9fafb;
}

.support-fab {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1400;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, #22b3a5 0%, #1a9a8e 50%, #0f766e 100%);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.1s ease;
}

.support-fab:hover {
    color: #ffffff;
    background: linear-gradient(135deg, #1a9a8e 0%, #15827a 50%, #0b5f56 100%);
    transform: translateY(-1px);
}

.support-fab:active {
    transform: translateY(0);
}

.support-fab i {
    font-size: 1.2rem;
}

.support-fab-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
    animation: supportBadgePulse 2s infinite;
}

@keyframes supportBadgePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.7);
    }
}

.highlight-target {
    animation: highlightPulse 2s ease-out;
}

@keyframes highlightPulse {
    0% {
        background-color: rgba(34, 179, 165, 0.3);
        box-shadow: 0 0 0 4px rgba(34, 179, 165, 0.2);
    }
    100% {
        background-color: transparent;
        box-shadow: none;
    }
}

@media (max-width: 768px) {
    .support-fab {
        padding: 14px;
        border-radius: 999px;
        right: 16px;
        bottom: 16px;
    }

    .support-fab-text {
        display: none;
    }

    .support-fab-badge {
        top: -4px;
        right: -4px;
        min-width: 18px;
        height: 18px;
        font-size: 10px;
    }

    .notif-menu {
        width: calc(100vw - 32px);
        right: -60px;
    }

    .profile-dropdown {
        width: calc(100vw - 32px);
        right: -16px;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #14b8a6;
    color: white !important;
}

.btn-primary:hover {
    background: #0d9488;
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

.btn-ghost:hover {
    background: #f3f4f6;
    color: #111827;
}

/* ===== ДОКУМЕНТЫ ===== */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.document-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.document-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    border-color: var(--accent, #22b3a5);
}

.document-card-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-light, #e6f7f5);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent, #22b3a5);
    margin-bottom: 1rem;
}

.document-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary, #1a1a2e);
}

.document-card-arrow {
    color: var(--accent, #22b3a5);
    transition: transform 0.2s;
}

.document-card:hover .document-card-arrow {
    transform: translateX(4px);
}

/* Страница документа */
.document-container {
    max-width: 800px;
    margin: 0 auto;
}

.document-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color, #e0e0e0);
}

.document-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary, #1a1a2e);
}

.document-meta {
    color: var(--text-muted, #6c757d);
    font-size: 0.875rem;
}

.document-content {
    line-height: 1.8;
    color: var(--text-primary, #1a1a2e);
}

.document-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary, #1a1a2e);
}

.document-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.document-content p {
    margin-bottom: 1rem;
}

.document-content ul, .document-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.document-content li {
    margin-bottom: 0.5rem;
}

.document-content a {
    color: var(--accent, #22b3a5);
}

.document-sidebar {
    position: sticky;
    top: 100px;
}

.document-nav-title {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary, #1a1a2e);
}

.document-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.document-nav-list li {
    margin-bottom: 0.5rem;
}

.document-nav-list a {
    color: var(--text-muted, #6c757d);
    text-decoration: none;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.document-nav-list a:hover,
.document-nav-list a.active {
    background: var(--accent-light, #e6f7f5);
    color: var(--accent, #22b3a5);
}

/* ===== ДОПОЛНИТЕЛЬНЫЕ MOBILE FIXES ===== */
@media (max-width: 480px) {
    .profile-dropdown {
        width: calc(100vw - 24px);
        right: -8px;
    }

    .notif-menu {
        width: calc(100vw - 24px);
        max-height: 70vh;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 360px) {
    .profile-dropdown,
    .notif-menu {
        width: calc(100vw - 16px);
    }
}

/* === ГЛОБАЛЬНОЕ УДАЛЕНИЕ ПОДЧЕРКИВАНИЯ ССЫЛОК === */
a {
    text-decoration: none !important;
}

a:hover {
    text-decoration: none !important;
}

/* Mobile profile dropdown fix */
@media (max-width: 768px) {
    .profile-dropdown-wrapper {
        position: static;
    }

    .profile-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 70vh;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
        z-index: 9999;
    }

    .profile-dropdown-wrapper:hover .profile-dropdown,
    .profile-dropdown-wrapper .profile-dropdown.active {
        display: block;
        opacity: 1;
        visibility: visible;
    }
}

.profile-dropdown.show {
    display: block;
    opacity: 1;
    visibility: visible;
}

/* Mobile notifications dropdown */
@media (max-width: 480px) {
    .notif-menu {
        position: fixed;
        left: 10px;
        right: 10px;
        width: auto;
        max-width: calc(100vw - 20px);
        top: 60px;
    }
}

/* === Скрытие скроллбара === */
::-webkit-scrollbar {
    display: none;
}

html, body, * {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* ===== КРАСИВОЕ МЕНЮ С АНИМАЦИЕЙ ===== */
.app-navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0.75rem 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.app-navbar .navbar-nav.me-auto {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.app-navbar .nav-item {
    position: relative;
    display: flex;
    align-items: center;
}

/* Точки-разделители между пунктами */
.app-navbar .navbar-nav.me-auto .nav-item:not(:last-child)::after {
    content: '•';
    color: #d1d5db;
    font-size: 0.5rem;
    margin-left: 0.75rem;
    opacity: 0.7;
}

.app-navbar .nav-link {
    position: relative;
    color: #4b5563 !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem !important;
    transition: color 0.2s ease;
    overflow: hidden;
}

/* Анимированное подчёркивание */
.app-navbar .nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #22b3a5, #14b8a6);
    border-radius: 2px;
    transform: translateX(-50%);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-navbar .nav-link:hover {
    color: #22b3a5 !important;
}

.app-navbar .nav-link:hover::before {
    width: 80%;
}

/* Активная ссылка */
.app-navbar .nav-link.active {
    color: #22b3a5 !important;
}

.app-navbar .nav-link.active::before {
    width: 80%;
}

/* Эффект свечения при наведении */
.app-navbar .nav-link::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(34, 179, 165, 0.1) 0%, transparent 70%);
    border-radius: 8px;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease;
    z-index: -1;
}

.app-navbar .nav-link:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

/* Мобильная версия - убираем точки */
@media (max-width: 991px) {
    .app-navbar .navbar-nav.me-auto .nav-item::after {
        display: none;
    }
    
    .app-navbar .navbar-nav.me-auto {
        gap: 0;
        padding: 1rem 0;
    }
    
    .app-navbar .nav-link {
        padding: 0.75rem 1rem !important;
        border-radius: 8px;
    }
    
    .app-navbar .nav-link:hover {
        background: rgba(34, 179, 165, 0.08);
    }
    
    .app-navbar .nav-link::before {
        display: none;
    }
    
    .app-navbar .nav-link::after {
        display: none;
    }
}

/* Тёмная тема */
[data-theme="dark"] .app-navbar,
.dark .app-navbar {
    background: rgba(31, 41, 55, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .app-navbar .nav-link,
.dark .app-navbar .nav-link {
    color: #d1d5db !important;
}

[data-theme="dark"] .app-navbar .nav-link:hover,
.dark .app-navbar .nav-link:hover,
[data-theme="dark"] .app-navbar .nav-link.active,
.dark .app-navbar .nav-link.active {
    color: #22b3a5 !important;
}

[data-theme="dark"] .app-navbar .navbar-nav.me-auto .nav-item::after,
.dark .app-navbar .navbar-nav.me-auto .nav-item::after {
    color: #4b5563;
}

/* ===== КРАСИВЫЙ СКРОЛЛБАР ДЛЯ УВЕДОМЛЕНИЙ ===== */
.notif-menu-body {
    scrollbar-width: thin;
    scrollbar-color: #22b3a5 #f1f5f9;
}

.notif-menu-body::-webkit-scrollbar {
    display: block !important;
    width: 6px !important;
}

.notif-menu-body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.notif-menu-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #22b3a5 0%, #14b8a6 100%);
    border-radius: 10px;
    border: 1px solid #f1f5f9;
}

.notif-menu-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #1a9a8e 0%, #0d9488 100%);
}

/* Тёмная тема */
[data-theme="dark"] .notif-menu-body,
.dark .notif-menu-body {
    scrollbar-color: #22b3a5 #374151;
}

[data-theme="dark"] .notif-menu-body::-webkit-scrollbar-track,
.dark .notif-menu-body::-webkit-scrollbar-track {
    background: #374151;
}
