/* ========================================
   SmetaMetrika - Основные стили
   ======================================== */

/* CSS Переменные */
:root {
    /* Цветовая палитра */
    --color-black: #0a0a0a;
    --color-dark: #1a1a1a;
    --color-gray-dark: #333333;
    --color-gray: #666666;
    --color-gray-light: #999999;
    --color-gray-lighter: #cccccc;
    --color-gray-lightest: #f5f5f5;
    --color-white: #ffffff;
    
    /* Акцентные цвета */
    --color-primary: #0a0a0a;
    --color-primary-hover: #1a1a1a;
    --color-secondary: #ffffff;
    
    /* Размеры и отступы */
    --container-max-width: 1200px;
    --header-height: 70px;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    
    /* Переходы */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Тени */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* ========================================
   Сброс и базовые стили
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--color-white);
    color: var(--color-black);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    transition: all var(--transition-fast);
}

input, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* ========================================
   Утилиты
   ======================================== */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   Фоновая сетка
   ======================================== */
.grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    background-size: 50px 50px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 60%, transparent 100%);
    mask-image: radial-gradient(ellipse 80% 50% at 50% 50%, #000 60%, transparent 100%);
    background-image: linear-gradient(to right, #e2e8f0 1px, transparent 1px), linear-gradient(to bottom, #e2e8f0 1px, transparent 1px);
}

/* Animated Background Particles */
.grid-background::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        /* Маленькие акцентные точки */
        radial-gradient(circle 3px at 15% 25%, rgba(16, 148, 247, 0.4) 0%, transparent 100%),
        radial-gradient(circle 2px at 35% 65%, rgba(20, 184, 166, 0.35) 0%, transparent 100%),
        radial-gradient(circle 4px at 75% 15%, rgba(139, 92, 246, 0.35) 0%, transparent 100%),
        radial-gradient(circle 2px at 85% 75%, rgba(16, 185, 129, 0.4) 0%, transparent 100%),
        radial-gradient(circle 3px at 45% 85%, rgba(16, 148, 247, 0.35) 0%, transparent 100%),
        radial-gradient(circle 2px at 25% 45%, rgba(59, 130, 246, 0.3) 0%, transparent 100%),
        radial-gradient(circle 3px at 65% 55%, rgba(139, 92, 246, 0.3) 0%, transparent 100%),
        radial-gradient(circle 2px at 55% 35%, rgba(20, 184, 166, 0.4) 0%, transparent 100%),
        /* Средние градиентные пятна */
        radial-gradient(circle 80px at 20% 80%, rgba(16, 148, 247, 0.15) 0%, transparent 100%),
        radial-gradient(circle 100px at 80% 20%, rgba(139, 92, 246, 0.12) 0%, transparent 100%),
        radial-gradient(circle 90px at 40% 40%, rgba(20, 184, 166, 0.13) 0%, transparent 100%),
        radial-gradient(circle 70px at 60% 70%, rgba(59, 130, 246, 0.14) 0%, transparent 100%);
    z-index: -1;
    animation: floatingGradient 25s ease-in-out infinite;
    pointer-events: none;
}

@keyframes floatingGradient {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    25% {
        transform: translate(-15px, -25px) rotate(90deg) scale(1.05);
    }
    50% {
        transform: translate(10px, -15px) rotate(180deg) scale(0.95);
    }
    75% {
        transform: translate(-10px, 20px) rotate(270deg) scale(1.02);
    }
}

/* ========================================
   3D Фон
   ======================================== */
.background-3d {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.background-3d::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.02) 50%, transparent 100%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.5; }
    50% { transform: scale(1.1) rotate(5deg); opacity: 0.8; }
}

/* ========================================
   Кнопки
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: all var(--transition-normal);
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-black);
    border: 1px solid var(--color-gray-lighter);
}

.btn-outline:hover {
    border-color: var(--color-gray);
    background-color: var(--color-gray-lightest);
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-full {
    width: 100%;
}

.btn-txt {
    position: relative;
    z-index: 1;
}

#loginBtn.type1 {
    position: relative;
    overflow: hidden;
    transition: color 0.5s ease-in-out, box-shadow 0.5s ease-in-out, border-color 0.5s ease-in-out;
}

#loginBtn.type1::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 10px;
    height: 10px;
    border-radius: 30px;
    background-color: #0a0a0a;
    transform: scale(0);
    transition: transform 0.5s ease-in-out;
}

#loginBtn.type1:hover {
    color: #fff;
    border-color: #333;
    box-shadow: 1px 1px 200px #252525;
}

#loginBtn.type1:hover::after {
    transform: scale(100);
}

/* ========================================
   Шапка
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-gray-lightest);
    z-index: 1000;
    transition: all var(--transition-normal);
}

.header.scrolled {
    box-shadow: var(--shadow-sm);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    animation: focus-in-contract 0.7s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
}

/* Логотип */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 18px;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border-radius: var(--border-radius);
    font-weight: 700;
    font-size: 18px;
}

@keyframes tracking-in-expand {
    0% {
        letter-spacing: -0.5em;
        opacity: 0;
    }
    40% {
        opacity: 0.6;
    }
    100% {
        opacity: 1;
    }
}

@keyframes focus-in-contract {
    0% {
        filter: blur(12px);
        opacity: 0;
    }
    100% {
        filter: blur(0);
        opacity: 1;
    }
}

.logo-text {
    color: var(--color-black);
    animation: tracking-in-expand 0.7s cubic-bezier(0.215, 0.610, 0.355, 1.000) both;
}

/* Навигация десктоп */
.nav-desktop {
    display: none;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-size: 14px;
    color: var(--color-gray);
    font-weight: 500;
}

.nav-link:hover {
    color: var(--color-black);
}

/* Кнопки авторизации */
.auth-buttons {
    display: none;
    align-items: center;
    gap: 12px;
}

/* Гамбургер меню */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    padding: 0;
    background: none;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--color-black);
    border-radius: 1px;
    transition: all var(--transition-fast);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Мобильное меню */
.mobile-menu {
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--color-white);
    border-bottom: 1px solid var(--color-gray-lightest);
    padding: 20px;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-nav-link {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-gray);
    padding: 8px 0;
}

.mobile-nav-link:hover {
    color: var(--color-black);
}

.mobile-menu-divider {
    border: none;
    border-top: 1px solid var(--color-gray-lightest);
    margin: 8px 0;
}

.mobile-full-width {
    width: 100%;
    margin-top: 8px;
}

/* ========================================
   Hero секция
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    padding-bottom: 60px;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
}

.hero-content {
    text-align: center;
    animation: focus-in-contract 0.7s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
}

.hero-title {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--color-black);
}

.hero-title-accent {
    color: var(--color-gray);
}

.hero-subtitle {
    font-size: 18px;
    color: var(--color-gray);
    max-width: 500px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-black);
}

.stat-label {
    font-size: 14px;
    color: var(--color-gray);
    margin-top: 4px;
}

/* Hero визуальный элемент */
.hero-visual {
    display: none;
    justify-content: center;
    align-items: center;
}

.hero-card {
    width: 100%;
    max-width: 400px;
    background-color: var(--color-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--color-gray-lightest);
    overflow: hidden;
}

.hero-card-header {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
    background-color: var(--color-gray-lightest);
}

.hero-card-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--color-gray-lighter);
}

.hero-card-dot:nth-child(1) { background-color: #ff5f57; }
.hero-card-dot:nth-child(2) { background-color: #ffbd2e; }
.hero-card-dot:nth-child(3) { background-color: #28c840; }

.hero-card-content {
    padding: 24px;
}

.hero-card-line {
    height: 12px;
    background-color: var(--color-gray-lightest);
    border-radius: 6px;
    margin-bottom: 12px;
}

.hero-card-line.short { width: 40%; }
.hero-card-line { width: 100%; }
.hero-card-line.medium { width: 70%; }

.hero-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.hero-card-grid-item {
    height: 60px;
    background-color: var(--color-gray-lightest);
    border-radius: var(--border-radius);
}

/* ========================================
   Секция Преимущества
   ======================================== */
.features {
    padding: 100px 0;
    background-color: var(--color-gray-lightest);
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
    color: var(--color-black);
}

.section-subtitle {
    font-size: 18px;
    color: var(--color-gray);
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.feature-card {
    background-color: var(--color-white);
    padding: 32px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-gray-lightest);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    color: var(--color-black);
}

.feature-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-black);
}

.feature-description {
    font-size: 15px;
    color: var(--color-gray);
    line-height: 1.6;
}

/* ========================================
   Секция О нас
   ======================================== */
.about {
    padding: 100px 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
}

.about-text {
    order: 2;
}

.about-description {
    font-size: 16px;
    color: var(--color-gray);
    margin-bottom: 20px;
    line-height: 1.7;
}

.about-list {
    margin-top: 30px;
}

.about-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    color: var(--color-black);
    margin-bottom: 16px;
}

.about-list svg {
    width: 20px;
    height: 20px;
    color: var(--color-black);
    flex-shrink: 0;
}

.about-visual {
    order: 1;
    display: flex;
    justify-content: center;
}

.about-card {
    background-color: var(--color-black);
    color: var(--color-white);
    padding: 40px;
    border-radius: var(--border-radius-lg);
    display: flex;
    gap: 40px;
    align-items: center;
}

.about-card-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about-card-number {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
}

.about-card-label {
    font-size: 14px;
    color: var(--color-gray-light);
    margin-top: 8px;
}

.about-card-divider {
    width: 1px;
    height: 60px;
    background-color: var(--color-gray);
}

/* ========================================
   Секция Контакты
   ======================================== */
.contact {
    padding: 100px 0;
    background-color: var(--color-gray-lightest);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 40px;
}

.contact-card {
    background-color: var(--color-white);
    padding: 32px;
    border-radius: var(--border-radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.contact-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-gray-lightest);
    border-radius: 50%;
    margin: 0 auto 16px;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
    color: var(--color-black);
}

.contact-card h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-black);
}

.contact-card p {
    font-size: 15px;
    color: var(--color-gray);
}

/* ========================================
   Футер
   ======================================== */
.footer {
    background-color: var(--color-dark);
    color: var(--color-gray-light);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .logo {
    margin-bottom: 16px;
}

.footer-brand .logo-text {
    color: var(--color-white);
}

.footer-description {
    font-size: 14px;
    line-height: 1.6;
    max-width: 300px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-white);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links a {
    font-size: 14px;
    color: var(--color-gray-light);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-white);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid var(--color-gray-dark);
    text-align: center;
}

.footer-bottom p {
    font-size: 14px;
    color: var(--color-gray);
}

/* ========================================
   Модальные окна
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background-color: var(--color-white);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 420px;
    padding: 40px;
    position: relative;
    transform: translateY(-20px);
    transition: transform var(--transition-normal);
    box-shadow: var(--shadow-xl);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--color-gray-lightest);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background-color: var(--color-gray-lighter);
}

.modal-close svg {
    width: 18px;
    height: 18px;
    color: var(--color-gray);
}

.modal-header {
    margin-bottom: 30px;
}

.modal-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-black);
}

.modal-header p {
    font-size: 15px;
    color: var(--color-gray);
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-black);
}

.form-group input {
    padding: 14px 16px;
    border: 1px solid var(--color-gray-lighter);
    border-radius: var(--border-radius);
    font-size: 15px;
    transition: all var(--transition-fast);
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-black);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.form-group input::placeholder {
    color: var(--color-gray-lighter);
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    width: 100%;
    padding-right: 44px;
}

.password-toggle {
    --color: #666666;
    --size: 24px;
    width: calc(var(--size) + 8px);
    height: calc(var(--size) + 8px);
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: var(--size);
    user-select: none;
    fill: var(--color);
    color: var(--color);
}

.password-toggle .eye {
    animation: keyframes-fill .5s;
}

.password-toggle .eye-slash {
    animation: keyframes-fill .5s;
    display: none;
}

.password-toggle input:checked ~ .eye {
    display: none;
}

.password-toggle input:checked ~ .eye-slash {
    display: block;
}

.password-toggle input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.password-toggle svg {
    width: var(--size);
    height: var(--size);
    display: block;
}

@keyframes keyframes-fill {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.cyberpunk-checkbox {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 1px solid #666666;
    border-radius: 5px;
    background-color: transparent;
    display: inline-block;
    position: relative;
    margin-right: 10px;
    cursor: pointer;
}
input.cyberpunk-checkbox {
    border: 1px solid #666666;
    border-radius: 5px;
    width: 20px;
    height: 20px;
    outline: none;
    margin: 0;
    margin-right: 10px;
}
input.cyberpunk-checkbox.form-check-input:checked::after {
    content: none;
}
input.cyberpunk-checkbox:checked {
    background: transparent;
    border-color: #666666;
}

.cyberpunk-checkbox:before {
    content: "";
    background-color: #1976d2;
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 12px;
    height: 12px;
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

.cyberpunk-checkbox:checked:before {
    transform: translate(-50%, -50%) scale(1);
}

.cyberpunk-checkbox--sm {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
input.cyberpunk-checkbox.cyberpunk-checkbox--sm {
    width: 14px;
    height: 14px;
}
.cyberpunk-checkbox--sm:before {
    width: 8px;
    height: 8px;
}

.cyberpunk-checkbox--xs {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
}
input.cyberpunk-checkbox.cyberpunk-checkbox--xs {
    width: 10px;
    height: 10px;
}
.cyberpunk-checkbox--xs:before {
    width: 8px;
    height: 8px;
}

.checkbox-label input.cyberpunk-checkbox,
.permission-checkbox input.cyberpunk-checkbox {
    margin-right: 0;
}

.cyberpunk-checkbox-label {
    color: #666666;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
}

.forgot-link {
    color: var(--color-gray);
    text-decoration: underline;
}

.forgot-link:hover {
    color: var(--color-black);
}

.modal-footer {
    margin-top: 24px;
    text-align: center;
}

.modal-footer p {
    font-size: 14px;
    color: var(--color-gray);
}

.link-btn {
    color: var(--color-black);
    font-weight: 500;
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer;
    font-size: inherit;
}

.link-btn:hover {
    color: var(--color-gray);
}

/* ========================================
   Адаптивность - Планшет (768px+)
   ======================================== */
@media (min-width: 768px) {
    .nav-desktop {
        display: flex;
    }

    .auth-buttons {
        display: flex;
    }

    .hamburger {
        display: none;
    }

    .hero-title {
        font-size: 56px;
    }

    .hero-subtitle {
        font-size: 20px;
    }

    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }

    .about-content {
        grid-template-columns: 1fr 1fr;
    }

    .about-text {
        order: 1;
    }

    .about-visual {
        order: 2;
    }
}

/* ========================================
   Адаптивность - Десктоп (1024px+)
   ======================================== */
@media (min-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr 1fr;
    }

    .hero-content {
        text-align: left;
    }

    .hero-title {
        font-size: 64px;
    }

    .hero-subtitle {
        margin-left: 0;
    }

    .hero-buttons {
        justify-content: flex-start;
    }

    .hero-stats {
        justify-content: flex-start;
    }

    .hero-visual {
        display: flex;
    }

    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .section-title {
        font-size: 42px;
    }
}

/* ========================================
   Адаптивность - Большие экраны (1440px+)
   ======================================== */
@media (min-width: 1440px) {
    :root {
        --container-max-width: 1400px;
    }

    .hero-title {
        font-size: 72px;
    }
}

/* ========================================
   Адаптивность - Маленькие телефны (375px и меньше)
   ======================================== */
@media (max-width: 375px) {
    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-stats {
        gap: 20px;
    }

    .stat-number {
        font-size: 24px;
    }

    .section-title {
        font-size: 28px;
    }

    .modal {
        padding: 24px;
    }

    .about-card {
        flex-direction: column;
        gap: 24px;
        padding: 24px;
    }

    .about-card-divider {
        width: 60px;
        height: 1px;
    }
}

/* ========================================
   Горизонтальная ориентация телефона
   ======================================== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding-top: calc(var(--header-height) + 40px);
        padding-bottom: 40px;
    }

    .hero-container {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-visual {
        display: none;
    }

    .modal {
        padding: 24px;
        max-width: 500px;
    }

    .modal-header h2 {
        font-size: 24px;
    }
}

/* ========================================
   Печать
   ======================================== */
@media print {
    .header,
    .footer,
    .modal-overlay,
    .grid-background,
    .background-3d,
    .hero-visual,
    .hero-buttons {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    .hero {
        min-height: auto;
        padding: 20px 0;
    }

    .hero-title {
        font-size: 24pt;
    }
}

/* ========================================
   Уведомления (Notifications)
   ======================================== */

/* Модальное окно уведомлений */
.notifications-modal {
    position: fixed;
    top: 70px;
    right: 20px;
    width: 380px;
    max-height: 500px;
    background: var(--color-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 9999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--color-gray-lightest);
}

.notifications-modal.active {
    display: flex;
}

/* Заголовок уведомлений */
.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-gray-lightest);
    background: #fafafa;
}

.notifications-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-black);
    margin: 0;
}

.notifications-actions {
    display: flex;
    gap: 8px;
}

.notifications-actions button {
    background: none;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    color: var(--color-gray);
    font-size: 18px;
    border-radius: 4px;
    transition: all 0.2s;
}

.notifications-actions button:hover {
    background: var(--color-gray-lightest);
    color: var(--color-black);
}

/* Список уведомлений */
.notifications-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.notifications-list::-webkit-scrollbar {
    width: 6px;
}

.notifications-list::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.notifications-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.notifications-list::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Элемент уведомления */
.notification-item {
    display: flex;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--color-gray-lightest);
    transition: background 0.2s;
    cursor: pointer;
    position: relative;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: #f9f9f9;
}

.notification-item.unread {
    background: #f0f7ff;
}

.notification-item.unread:hover {
    background: #e8f2ff;
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #1094F7;
    border-radius: 50%;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.notification-icon.project { background: #e3f2fd; color: #1976d2; }
.notification-icon.estimate { background: #e8f5e9; color: #388e3c; }
.notification-icon.task { background: #fff3e0; color: #f57c00; }
.notification-icon.purchase { background: #fce4ec; color: #c2185b; }
.notification-icon.payment { background: #f3e5f5; color: #7b1fa2; }
.notification-icon.material { background: #e0f7fa; color: #0097a7; }
.notification-icon.system { background: #f5f5f5; color: #616161; }

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-black);
    margin: 0 0 4px 0;
    line-height: 1.4;
}

.notification-message {
    font-size: 13px;
    color: var(--color-gray);
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.notification-time {
    font-size: 11px;
    color: var(--color-gray-light);
}

.notification-delete {
    opacity: 0;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--color-gray-light);
    font-size: 16px;
    transition: all 0.2s;
}

.notification-item:hover .notification-delete {
    opacity: 1;
}

.notification-delete:hover {
    color: #d32f2f;
}

/* Пустое состояние */
.notifications-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--color-gray-light);
}

.notifications-empty i {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
    opacity: 0.5;
}

.notifications-empty p {
    margin: 0;
    font-size: 14px;
}

/* Кнопка "Прочитать все" */
.notifications-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--color-gray-lightest);
    background: #fafafa;
}

.notifications-footer button {
    width: 100%;
    padding: 8px;
    background: var(--color-white);
    border: 1px solid var(--color-gray-lighter);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--color-gray);
    transition: all 0.2s;
}

.notifications-footer button:hover {
    background: var(--color-gray-lightest);
    color: var(--color-black);
}

/* Бейдж уведомлений на кнопке */
.notification-btn {
    position: relative;
}

.notification-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ff4444;
    color: white;
    font-size: 10px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.notification-btn .badge.hidden {
    display: none;
}

/* ========================================
   Логотип СметаМетрика (CSS версия)
   ======================================== */
.logo-svg {
    display: flex;
    align-items: center;
    height: 41px;
}

.logo-svg svg {
    height: 100%;
    width: auto;
}

.app-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--color-gray, #666);
}
.app-spinner__animation {
    font-size: 32px;
    margin-bottom: 12px;
    animation: fa-spin 2s linear infinite;
}
.app-spinner__animation .las {
    font-size: inherit;
}
.app-spinner__text {
    font-size: 14px;
    color: var(--color-gray, #999);
}

.app-api-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}
.app-api-error__icon {
    font-size: 48px;
    color: #ef4444;
    margin-bottom: 12px;
}
.app-api-error__text {
    font-size: 14px;
    color: var(--color-gray, #666);
    margin-bottom: 16px;
    max-width: 400px;
}
.app-api-error__retry {
    cursor: pointer;
}

.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.field-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 1px #dc3545;
}

.field-valid {
    border-color: #28a745 !important;
}

.field-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
    line-height: 1.3;
    animation: fadeIn 0.2s ease;
}

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