/* ========================================
   СНТ Покровские Земли - Стили сайта
   Эстетика: Soft & Organic
   ======================================== */

/* ----------------------------------------
   CSS Custom Properties (Design Tokens)
   ---------------------------------------- */
:root {
    /* Цветовая палитра - Природные оттенки */
    --color-primary: #2d5a27;
    --color-primary-light: #4a8c42;
    --color-primary-dark: #1a3d16;
    --color-primary-rgb: 45, 90, 39;
    
    --color-secondary: #8b6914;
    --color-secondary-light: #c4a035;
    --color-secondary-dark: #5c4610;
    
    /* Акцентные цвета */
    --color-accent: #e8a838;
    --color-accent-light: #f5c96a;
    
    /* Нейтральные цвета */
    --color-white: #ffffff;
    --color-black: #1a1a1a;
    --color-gray-50: #fafafa;
    --color-gray-100: #f5f5f5;
    --color-gray-200: #e8e8e8;
    --color-gray-300: #d4d4d4;
    --color-gray-400: #a3a3a3;
    --color-gray-500: #737373;
    --color-gray-600: #525252;
    --color-gray-700: #404040;
    --color-gray-800: #262626;
    --color-gray-900: #171717;
    
    /* Фоновые цвета */
    --bg-primary: #ffffff;
    --bg-secondary: #f8faf7;
    --bg-tertiary: #f0f5ed;
    --bg-dark: #1a2d18;
    
    /* Текстовые цвета */
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #6b6b6b;
    --text-light: #ffffff;
    --text-light-muted: rgba(255, 255, 255, 0.8);
    
    /* Типографика */
    --font-primary: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-secondary: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Размеры шрифтов */
    --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --text-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
    --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
    --text-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);
    --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 1.25rem + 1.25vw, 2rem);
    --text-3xl: clamp(1.875rem, 1.5rem + 1.875vw, 2.5rem);
    --text-4xl: clamp(2.25rem, 1.75rem + 2.5vw, 3.5rem);
    --text-5xl: clamp(3rem, 2rem + 5vw, 4.5rem);
    
    /* Отступы (8px система) */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;
    
    /* Скругления */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;
    
    /* Тени */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 40px -4px rgba(0, 0, 0, 0.1), 0 8px 16px -4px rgba(0, 0, 0, 0.05);
    --shadow-card: 0 4px 20px rgba(45, 90, 39, 0.08);
    --shadow-card-hover: 0 8px 30px rgba(45, 90, 39, 0.15);
    
    /* Переходы */
    --transition-fast: 150ms ease-out;
    --transition-base: 220ms ease-out;
    --transition-slow: 300ms ease-out;
    --transition-slower: 400ms ease-out;
    
    /* Контейнер */
    --container-max: 1280px;
    --container-padding: 1.5rem;
    
    /* z-index */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
}

/* ----------------------------------------
   Reset & Base Styles
   ---------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-secondary);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul, ol {
    list-style: none;
}

/* ----------------------------------------
   Container & Layout
   ---------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

/* ----------------------------------------
   Typography
   ---------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { margin-top: 3em; }

/* ----------------------------------------
   Buttons
   ---------------------------------------- */
.btn, table.table .button, #send, .tbladdbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-8);
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1;
    text-align: center;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    cursor: pointer;
    min-height: 48px;
}

.btn-primary, #send, table.table .button, .tbladdbtn {
    background: var(--color-primary);
    color: var(--text-light);
    box-shadow: 0 4px 14px rgba(var(--color-primary-rgb), 0.3);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--color-primary-rgb), 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-white);
}

table.table .button {
    padding: 3px;
    margin: 3px;
    border-radius: var(--radius-sm);
    min-height: 28px;
}
table.table a {text-decoration: underline;}
/* ----------------------------------------
   Header
   ---------------------------------------- */
.pgheader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    padding: var(--space-4) 0;
    background: transparent;
    transition: all var(--transition-base);
}

.pgheader.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    padding: var(--space-3) 0;
}

.pgheader.scrolled .logo-title {
    color: var(--text-primary);
}

.pgheader.scrolled .logo-subtitle {
    color: var(--text-muted);
}

.pgheader.scrolled .logo-icon {
    color: var(--color-primary);
}

.pgheader.scrolled .nav-link {
    color: var(--text-secondary);
}

.pgheader.scrolled .nav-link:hover {
    color: var(--color-primary);
}

.pgheader.scrolled .burger-line {
    background: var(--text-primary);
}

.pgheader-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.logo-icon {
    width: 44px;
    height: 44px;
    color: var(--color-white);
    transition: color var(--transition-base);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: var(--font-primary);
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-light);
    line-height: 1.2;
    transition: color var(--transition-base);
}

.logo-subtitle {
    font-size: var(--text-xs);
    color: var(--text-light-muted);
    transition: color var(--transition-base);
}

/* Navigation */
.nav {
    display: none;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.nav-link {
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-light-muted);
    position: relative;
    padding: var(--space-2) 0;
    transition: color var(--transition-base);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width var(--transition-base);
}

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

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    padding: var(--space-3);
    z-index: var(--z-modal);
}

.burger-line {
    width: 100%;
    height: 2px;
    background: var(--color-white);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

.mobile-menu-btn.active .burger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.mobile-menu-btn.active .burger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .burger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* Mobile Navigation */
.nav.active {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-dark);
    z-index: var(--z-modal-backdrop);
    padding: var(--space-20) var(--space-6);
}

.nav.active .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-6);
}

.nav.active .nav-link {
    font-size: var(--text-2xl);
    color: var(--text-light);
}

/* ----------------------------------------
   Hero Section
   ---------------------------------------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(26, 45, 24, 0.85) 0%,
        rgba(45, 90, 39, 0.7) 50%,
        rgba(26, 45, 24, 0.9) 100%
    );
}

.hero-content {
    text-align: center;
    padding: var(--space-32) var(--space-4);
    max-width: 900px;
}

.hero-title {
    font-size: var(--text-5xl);
    color: var(--text-light);
    margin-bottom: var(--space-4);
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: var(--text-xl);
    color: var(--text-light-muted);
    max-width: 600px;
    margin: 0 auto var(--space-10);
    line-height: 1.5;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: var(--space-8);
    margin-bottom: var(--space-10);
    flex-wrap: wrap;
}

.hero-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-4);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    min-width: 120px;
}

.hero-feature-number {
    font-family: var(--font-primary);
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--color-accent);
    line-height: 1;
}

.hero-feature-text {
    font-size: var(--text-sm);
    color: var(--text-light-muted);
    margin-top: var(--space-1);
}

.hero-buttons {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

.hero-scroll {
    position: absolute;
    bottom: var(--space-8);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-light-muted);
    font-size: var(--text-xs);
    animation: bounce 2s infinite;
}

.scroll-indicator {
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-full);
    position: relative;
}

.scroll-indicator::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--color-accent);
    border-radius: var(--radius-full);
    animation: scroll-indicator 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes scroll-indicator {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(16px);
    }
}


/* ----------------------------------------
   Section Headers
   ---------------------------------------- */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-12);
}

.section-tag {
    display: inline-block;
    font-family: var(--font-primary);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-primary);
    background: var(--bg-tertiary);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-4);
}

.section-title {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-4);
}

.section-description {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ----------------------------------------
   About Section
   ---------------------------------------- */
.about {
    padding: var(--space-24) 0;
    background: var(--bg-primary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-12);
    align-items: center;
}

.about-text {
    font-size: var(--text-base);
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-8);
}

.stat-item {
    display: flex;
	

		flex-direction: column;
	
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.stat-item:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
}

.stat-icon {
    width: 40px;
    height: 40px;
    color: var(--color-primary);
    flex-shrink: 0;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: var(--font-primary);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.about-image {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.about-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.about-image-badge {
    position: absolute;
    bottom: var(--space-6);
    right: var(--space-6);
    background: var(--color-primary);
    color: var(--text-light);
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.badge-number {
    display: block;
    font-family: var(--font-primary);
    font-size: var(--text-3xl);
    font-weight: 700;
    line-height: 1;
}

.badge-text {
    font-size: var(--text-xs);
    opacity: 0.9;
}

/* ----------------------------------------
   Login Section
   ---------------------------------------- */

.section_login {
    padding: var(--space-24) 0;
    background: var(--bg-primary);
}

/* ----------------------------------------
   Benefits Section
   ---------------------------------------- */
.benefits {
    padding: var(--space-24) 0;
    background: var(--bg-secondary);
}

.benefits-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
}

.benefit-card {
    background: var(--bg-primary);
    padding: var(--space-8);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: all var(--transition-slow);
}

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

.benefit-icon {
    width: 56px;
    height: 56px;
    color: var(--color-primary);
    margin-bottom: var(--space-4);
    padding: var(--space-3);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.benefit-title {
    font-size: var(--text-lg);
    margin-bottom: var(--space-3);
}

.benefit-text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ----------------------------------------
   Gallery Section
   ---------------------------------------- */
.gallery {
    padding: var(--space-24) 0;
    background: var(--bg-primary);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 1/1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slower);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(26, 45, 24, 0.9) 0%,
        transparent 60%
    );
    display: flex;
    align-items: flex-end;
    padding: var(--space-4);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    color: var(--text-light);
    font-size: var(--text-sm);
    font-weight: 500;
}

/* ----------------------------------------
   News Section
   ---------------------------------------- */
.news {
    padding: var(--space-24) 0;
    background: var(--bg-secondary);
}

.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
}

.news-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-slow);
}

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

.news-card-featured {
    grid-column: 1;
}

.news-card-featured .news-image {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.news-card-featured .news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-content {
    padding: var(--space-6);
}

.news-date {
    font-size: var(--text-xs);
    color: var(--color-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.news-title {
    font-size: var(--text-lg);
    margin: var(--space-3) 0;
    line-height: 1.4;
}

.news-text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-4);
}

.news-link {
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-primary);
    transition: color var(--transition-base);
}

.news-link:hover {
    color: var(--color-primary-dark);
}

/* ----------------------------------------
   Login Section
   ---------------------------------------- */
.login {
    padding: var(--space-24) 0;
    background: var(--bg-secondary);
}

.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.login-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-slow);
    width: 100%;
    max-width: 480px;
}

.login-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
}

.login-image {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-content {
    padding: var(--space-8);
}

.login-title {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-2);
    color: var(--text-primary);
    text-align: center;
}

.login-subtitle {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: var(--space-8);
    line-height: 1.6;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.login-footer {
    text-align: center;
    margin-top: var(--space-6);
    padding-top: var(--space-6);
    border-top: 1px solid var(--color-gray-200);
}

.login-footer p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
}

.login-footer a {
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-primary);
    transition: color var(--transition-base);
}

.login-footer a:hover {
    color: var(--color-primary-dark);
}

.login-separator {
    text-align: center;
    margin: var(--space-4) 0;
    position: relative;
}

.login-separator::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 1px;
    background: var(--color-gray-200);
}

.login-separator span {
    display: inline-block;
    background: var(--bg-primary);
    padding: 0 var(--space-3);
    font-size: var(--text-sm);
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

.login-message {
    padding: var(--space-4);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-6);
    font-size: var(--text-sm);
    text-align: center;
}

.login-message.success {
    background: rgba(0, 255, 75, 0.1);
    color: var(--color-primary-dark);
    border: 1px solid rgba(0, 255, 75, 0.3);
}

.login-message.error {
    background: rgba(200, 0, 100, 0.1);
    color: #c80064;
    border: 1px solid rgba(200, 0, 100, 0.3);
}

.login-message.info {
    background: rgba(255, 245, 70, 0.1);
    color: #c80064;
    border: 1px solid rgba(255, 245, 70, 0.3);
}

/* ----------------------------------------
   Appeal Section
   ---------------------------------------- */
.appeal {
    padding: var(--space-24) 0;
    background: var(--bg-primary);
}

.appeal-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-12);
}

.section-header-left {
    text-align: left;
    margin: 0 0 var(--space-10) 0;
}

.appeal-benefits {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.appeal-benefit {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    padding: var(--space-4);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.appeal-benefit:hover {
    background: var(--bg-tertiary);
    transform: translateX(4px);
}

.appeal-benefit-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    padding: var(--space-2);
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    color: var(--color-primary);
}

.appeal-benefit-icon svg {
    width: 100%;
    height: 100%;
}

.appeal-benefit-content h4 {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: 600;
    margin-bottom: var(--space-1);
}

.appeal-benefit-content p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* Appeal Form Container */
.appeal-form-container {
    border-color: var(--bg-secondary);
    padding: var(--space-8);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.appeal-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-5);
}

/* Form Select */
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-4) center;
    padding-right: var(--space-12);
    cursor: pointer;
}

.form-select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%232d5a27' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

/* Form Textarea */
.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Submit Button in Appeal Form */
.appeal-form .btn-submit {
    margin-top: var(--space-2);
    width: 100%;
}

/* Form Success Message */
.form-success {
    display: none;
    text-align: center;
    padding: var(--space-8);
}

.form-success.active {
    display: block;
}

.form-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-6);
    padding: var(--space-4);
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    color: var(--color-primary);
}

.form-success-icon svg {
    width: 100%;
    height: 100%;
}

.form-success h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-3);
}

.form-success p {
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
}

.form-success-number {
    display: inline-block;
    background: var(--bg-tertiary);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-sm);
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--color-primary);
}

/* ----------------------------------------
   Contacts Section
   ---------------------------------------- */
.contacts {
    padding: var(--space-24) 0;
    background: var(--bg-primary);
}

.contacts-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-12);
}

.contacts-info {
    order: 2;
}

.contact-items {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
}

.contact-item {
    display: flex;
    gap: var(--space-4);
    padding: var(--space-5);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.contact-item:hover {
    background: var(--bg-tertiary);
}

.contact-icon {
    width: 44px;
    height: 44px;
    color: var(--color-primary);
    flex-shrink: 0;
    padding: var(--space-2);
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
}

.contact-label {
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: 600;
    margin-bottom: var(--space-1);
}

.contact-text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.6;
}

.contact-phone {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-base);
    display: inline-block;
}

.contact-phone:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

.contacts-map {
    order: 1;
}

.map-placeholder {
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--color-gray-300);
}

.map-content {
    text-align: center;
    color: var(--text-muted);
}

.map-content svg {
    color: var(--color-primary);
    margin-bottom: var(--space-4);
}

.map-content p {
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.map-content span {
    font-size: var(--text-sm);
}

/* ----------------------------------------
   Footer
   ---------------------------------------- */
.footer {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
    margin-bottom: var(--space-12);
}

.footer-logo {
    margin-bottom: var(--space-4);
}

.footer-logo .logo-icon {
    color: var(--color-accent);
}

.footer-logo .logo-title {
    color: var(--text-light);
}

.footer-logo .logo-subtitle {
    color: var(--text-light-muted);
}

.footer-description {
    font-size: var(--text-sm);
    color: var(--text-light-muted);
    line-height: 1.7;
    max-width: 320px;
}

.footer-title {
    font-size: var(--text-base);
    margin-bottom: var(--space-4);
    color: var(--text-light);
}

.footer-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.footer-list a,
.footer-list li {
    font-size: var(--text-sm);
    color: var(--text-light-muted);
    transition: color var(--transition-base);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.footer-list a:hover {
    color: var(--color-accent);
}

.footer-contacts li {
    color: var(--text-light-muted);
}

.footer-contacts svg {
    color: var(--color-primary-light);
    flex-shrink: 0;
}

.footer-bottom {
    padding-top: var(--space-8);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
}

.copyright {
    font-size: var(--text-sm);
    color: var(--text-light-muted);
}

.footer-bottom-links {
    display: flex;
    gap: var(--space-6);
    justify-content: center;
}

.footer-bottom-links a {
    font-size: var(--text-sm);
    color: var(--text-light-muted);
    transition: color var(--transition-base);
}

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

/* ----------------------------------------
   Login Button
   ---------------------------------------- */
.btn-login {
    display: none;
    background: var(--color-accent);
    color: var(--text-primary);
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-xs);
    min-height: 42px;
    box-shadow: 0 4px 14px rgba(232, 168, 56, 0.3);
}

.btn-login:hover {
    background: var(--color-accent-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 168, 56, 0.4);
}

.phheader.scrolled .btn-login {
    background: var(--color-primary);
    color: var(--text-light);
    box-shadow: 0 4px 14px rgba(var(--color-primary-rgb), 0.3);
}

.phheader.scrolled .btn-login:hover {
    background: var(--color-primary-dark);
    box-shadow: 0 6px 20px rgba(var(--color-primary-rgb), 0.4);
}

.btn-login svg {
    width: 18px;
    height: 18px;
}

/* Mobile Login Button in Menu */
.nav-mobile-login {
    display: block;
    margin-top: var(--space-6);
    padding-top: var(--space-6);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-login-mobile {
    width: 100%;
    justify-content: center;
}

/* ----------------------------------------
   Modal
   ---------------------------------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 45, 24, 0.85);
    backdrop-filter: blur(4px);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

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

.modal {
    position: relative;
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    _overflow-y: auto;
    padding: var(--space-8);
    box-shadow: var(--shadow-xl);
    transform: scale(0.95) translateY(20px);
    transition: transform var(--transition-slow);
}

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

.modal-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-close svg {
    width: 18px;
    height: 18px;
}

.modal-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-4);
    padding: var(--space-4);
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    color: var(--color-primary);
}

.modal-icon svg {
    width: 100%;
    height: 100%;
}

.modal-title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-2);
}

.modal-subtitle {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* Login Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.form-label {
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-primary);
}

.form-input, #f_username, #f_password {
    width: 100%;
    padding: var(--space-4);
    font-family: var(--font-secondary);
    font-size: var(--text-base);
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    outline: none;
    background: var(--bg-primary);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(var(--color-primary-rgb), 0.1);
}

.password-wrapper {
    position: relative;
}

.password-wrapper .form-input {
    padding-right: var(--space-12);
}

.password-toggle {
    position: absolute;
    right: var(--space-3);
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
}

.password-toggle:hover {
    color: var(--color-primary);
    background: var(--bg-tertiary);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

/* Checkbox */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
}

.checkbox-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-gray-300);
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    position: relative;
    flex-shrink: 0;
}

.checkbox-input:checked + .checkbox-custom {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.checkbox-input:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid var(--color-white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-input:focus + .checkbox-custom {
    box-shadow: 0 0 0 4px rgba(var(--color-primary-rgb), 0.1);
}

.checkbox-text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.forgot-link {
    font-size: var(--text-sm);
    color: var(--color-primary);
    font-weight: 500;
    transition: color var(--transition-base);
}

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

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-base);
    margin-top: var(--space-2);
}

/* Modal Footer */
.modal-footer {
    text-align: center;
    margin-top: var(--space-6);
    padding-top: var(--space-6);
    border-top: 1px solid var(--color-gray-200);
}

.modal-footer p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.register-link {
    color: var(--color-primary);
    font-weight: 600;
    transition: color var(--transition-base);
}

.register-link:hover {
    color: var(--color-primary-dark);
}

/* ========================================
   Responsive Design
   ======================================== */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .hero-features {
        gap: var(--space-6);
    }
    
    .hero-feature {
        min-width: 140px;
        padding: var(--space-5);
    }
    
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .contact-items {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    :root {
        --container-padding: 2rem;
    }
    
    .nav {
        display: block;
    }
    
    .mobile-menu-btn {
        display: none;
    }
    
    .btn-login {
        display: inline-flex;
    }
    
    .nav-mobile-login {
        display: none;
    }
    
    .hero-buttons {
        gap: var(--space-6);
    }
    
    .about-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-16);
    }
    
    .about-image-badge {
        bottom: var(--space-8);
        right: var(--space-8);
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .news-card-featured {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    
    .news-card-featured .news-image {
        aspect-ratio: auto;
        height: 100%;
    }
    
    .news-card-featured .news-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .contacts-wrapper {
        grid-template-columns: 1fr 1fr;
    }
    
    .contacts-info {
        order: 1;
    }
    
    .contacts-map {
        order: 2;
    }
    
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
        gap: var(--space-12);
    }
    
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
	
	.stat-item {
		flex-direction: row;
	}
	
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    :root {
        --container-padding: 2.5rem;
    }
    
    .benefits-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .gallery-item-large {
        grid-column: span 2;
        grid-row: span 2;
    }
    
    .gallery-item-wide {
        grid-column: span 2;
    }
    
    .news-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .news-card-featured {
        grid-column: 1 / 3;
        grid-template-columns: 1fr;
    }
    
    .news-card-featured .news-image {
        aspect-ratio: 16/9;
        height: auto;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    :root {
        --container-padding: 3rem;
    }
    
    .hero-content {
        padding: var(--space-32) var(--space-8);
    }
    
    .hero-title {
        font-size: var(--text-5xl);
    }
    
    .about {
        padding: var(--space-32) 0;
    }
    
    .benefits {
        padding: var(--space-32) 0;
    }
    
    .gallery {
        padding: var(--space-32) 0;
    }
    
    .news {
        padding: var(--space-32) 0;
    }
    
    .contacts {
        padding: var(--space-32) 0;
    }
    
    .contact-items {
        grid-template-columns: repeat(2, 1fr);
    }
	
}

/* ----------------------------------------
   Documents Section
   ---------------------------------------- */
.documents {
    padding: var(--space-24) 0;
}

.documents-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
}

.document-card {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    background: var(--bg-primary);
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: all var(--transition-slow);
}

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

.document-icon {
    width: 56px;
    height: 56px;
    color: var(--color-primary);
    flex-shrink: 0;
    padding: var(--space-3);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.document-icon svg {
    width: 100%;
    height: 100%;
}

.document-title {
    font-family: var(--font-primary);
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: var(--text-primary);
}

.document-description {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-4);
    flex-grow: 1;
}

.document-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-primary);
    position: relative;
    padding: var(--space-2) 0;
    transition: color var(--transition-base);
}

.document-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width var(--transition-base);
}

.document-link:hover {
    color: var(--color-primary-dark);
}

.document-link:hover::after {
    width: 100%;
}

.document-link svg {
    flex-shrink: 0;
}

/* Print styles */
@media print {
    .pgheader,
    .hero,
    .hero-scroll,
    .mobile-menu-btn {
        display: none;
    }
    
    body {
        font-size: 12pt;
        color: #000;
    }
    
    .section-title {
        font-size: 18pt;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* обтекания и выравнивания */
.fleft 		{ float:left }
.fright		{ float:right }
.left 		{ text-align: left }
.right 		{ text-align: right }
.center 	{ text-align: center }
.nowrap 	{ white-space: nowrap; }
.clear 		{ clear:both; }
.auto 		{ overflow:auto; }

/* отступы */
.top10 		{ margin-top:10px; }
.top20 		{ margin-top:20px; }
.bottom5 	{ margin-bottom:5px; }
.bottom10 	{ margin-bottom:10px; }
.bottom20 	{ margin-bottom:20px; }
.left5 		{ margin-left:5px; }
.left10 		{ margin-left:10px; }
.left20 		{ margin-left:20px; }
.right5 		{ margin-right: 5px}
.right10 	{ margin-right: 10px}
.right20 	{ margin-right: 20px}
.both5		{ margin-left:5px; margin-right:5px; }
.both10		{ margin-left:10px; margin-right:10px; }
.both20		{ margin-left:20px; margin-right:20px; }
.pright5	{ padding-right:5px}
.pright10	{ padding-right:10px}
.pright20	{ padding-right:20px}
.pleft5		{ padding-left:5px}
.pleft10	{ padding-left:10px}
.pleft20	{ padding-left:20px}
.pboth10	{ padding-right:10px; padding-left:10px }
.ptop10		{ padding-top:10px }
.pbotom10	{ padding-bottom:10px }
.width100	{ width:100% }
.width98	{ width:98% }
.width60	{ max-width:60px; overflow:hidden; }

/* Декоры текста */
.hint		{ cursor: pointer; border-bottom:1px dashed #AAA}
.pointer	{ cursor: pointer; }
.underline 	{ text-decoration:underline}
.big		{ font-size:110%; }
.small		{ font-size:86%; }
.bold 		{ font-weight: bold } 


/* отображение блоков */
.hidden 		{ display:none }
.invisible 	{ visibility:hidden; }
.faded 		{ opacity: 0.1; }
.modal_		{ border:1px solid #AAA; background-color: #FFF; border-radius:5px; padding: 10px; box-shadow: 0 0 5px rgba(0,0,0,0.5);
				left: 50%; width: auto; min-width: 500px; max-width: 1000px; position: fixed; top: 1vh; max-height: 95vh;  overflow-y: auto; z-index: 1001;	transform: translate(-50%, 0%);}
.overdiv	{ z-index:1001; }
.error		{ background-color:#C80064 !important; color: #FFFF46; padding:10px; border-radius: 5px; }
.error a, .error a:visited		{ color:#FFFF46 }
.info		{ background-color:#FFFF46 !important; color: #C80064; padding:10px; border-radius: 5px; }
.green		{ background-color: rgba(0, 255, 75, 0.71) !important; padding:10px; border-radius: 5px; }
.approve	{ background-color:#8067DC !important; color: #FFFF46; padding:10px; border-radius: 5px; }

/* форма из php.class.forms */
.magictablesform		{ margin:4px 8px; border: 1px solid #9BB6A8; border-top-left-radius: 10px;}
.form_title	{ font-size:1.5em; background-color: #F5F5F5; padding:10px; border-bottom:1px solid #CCC; border-top-left-radius: 10px; border-top-right-radius:10px; }
.form table	{ margin:8px 12px; width:auto }
.form_buttons { background-color: #007aff; padding:10px;  border-top:1px solid #CCC; text-align:center }
.th_myform {font-size: var(--text-sm);}
.table .headerSortUp { background-image: url(/magic/img/asc.gif); }
.table .headerSortDown {	background-image: url(/magic/img/desc.gif);	}



/* ========================================
   Enhanced Table Styles - Color Palette & Mobile
   Улучшенные стили таблиц в цветах сайта
   ======================================== */

/* Переопределяем базовые стили таблицы в цветовой палитре сайта */
.table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    margin: var(--space-6) 0;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-gray-200);
    background: var(--bg-primary);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

/* Заголовки таблиц */
.table thead tr th {
    padding: var(--space-4) var(--space-5);
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    color: var(--color-white);
    background-color: var(--color-primary);
    border-bottom: 2px solid var(--color-primary-dark);
}

.table thead tr th:first-child {
    border-top-left-radius: var(--radius-md);
}

.table thead tr th:last-child {
    border-top-right-radius: var(--radius-md);
}

/* Ячейки таблицы */
.table tbody tr td {
    padding: var(--space-4) var(--space-5);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    border-top: 1px solid var(--color-gray-200);
    border-right: 1px solid var(--color-gray-200);
    vertical-align: middle;
    transition: background-color var(--transition-fast);
}

.table tbody tr td:first-child {
    border-left: 1px solid var(--color-gray-200);
}

.table tbody tr td:last-child {
    border-right: 1px solid var(--color-gray-200);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:last-child td:first-child {
    border-bottom-left-radius: var(--radius-md);
}

.table tbody tr:last-child td:last-child {
    border-bottom-right-radius: var(--radius-md);
}

/* Чередующиеся строки */
.table tbody tr:nth-child(even) {
    background-color: var(--bg-secondary);
}

.table tbody tr:nth-child(even) td {
    background-color: var(--bg-secondary);
}

/* Hover эффект */
.table tbody tr:hover {
    background-color: var(--bg-tertiary);
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(var(--color-primary-rgb), 0.08);
}

.table tbody tr:hover td {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

/* ========================================
   Mobile Responsive Tables
   Адаптивность для мобильных устройств
   ======================================== */

/* Адаптивный контейнер для таблиц */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-6);
}

.table-responsive .table {
    margin: 0;
    min-width: 600px;
}

/* Индикатор горизонтальной прокрутки */
.table-wrapper {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.table-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(45, 90, 39, 0.05));
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.table-wrapper.overflowing::after {
    opacity: 1;
}

/* Small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Уменьшаем отступы для мобильных */
    .table {
        font-size: var(--text-xs);
        margin: var(--space-4) 0;
        border-radius: var(--radius-sm);
    }
    
    .table thead tr th {
        padding: var(--space-2) var(--space-3);
        font-size: var(--text-xs);
        letter-spacing: 0;
        text-transform: none;
    }
    
    .table tbody tr td {
        padding: var(--space-2) var(--space-3);
        font-size: var(--text-xs);
        line-height: 1.4;
    }
    
    /* Компактная таблица для мобильных */
    .table.table-sm tbody tr td,
    .table.table-sm thead tr th {
        padding: var(--space-1) var(--space-2);
        font-size: var(--text-xs);
    }
    
    /* Улучшаем прокрутку на мобильных */
    .table-responsive {
        border: 1px solid var(--color-gray-200);
    }
    
    /* Карточный режим для очень узких экранов */
    .table-mobile-cards {
        display: block;
    }
    
    .table-mobile-cards thead {
        display: none;
    }
    
    .table-mobile-cards tbody,
    .table-mobile-cards tr,
    .table-mobile-cards td {
        display: block;
        width: 100%;
    }
    
    .table-mobile-cards tr {
        margin-bottom: var(--space-4);
        border: 1px solid var(--color-gray-200);
        border-radius: var(--radius-md);
        padding: var(--space-4);
        background: var(--bg-primary);
        box-shadow: var(--shadow-sm);
    }
    
    .table-mobile-cards td {
        text-align: right;
        padding: var(--space-2) 0;
        border-bottom: 1px solid var(--color-gray-100);
    }
    
    .table-mobile-cards td:last-child {
        border-bottom: none;
    }
    
    .table-mobile-cards td::before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
        text-transform: uppercase;
        font-size: var(--text-xs);
        color: var(--color-primary);
        letter-spacing: 0.05em;
        margin-right: var(--space-3);
    }
}

/* Small tablets (576px and up) */
@media (min-width: 576px) {
    .table thead tr th {
        padding: var(--space-3) var(--space-4);
        font-size: var(--text-sm);
    }
    
    .table tbody tr td {
        padding: var(--space-3) var(--space-4);
        font-size: var(--text-sm);
    }
}

/* Tablets (768px and up) */
@media (min-width: 768px) {
    .table thead tr th {
        padding: var(--space-4) var(--space-6);
        font-size: var(--text-sm);
    }
    
    .table tbody tr td {
        padding: var(--space-4) var(--space-6);
        font-size: var(--text-sm);
    }
}

/* Desktops (992px and up) */
@media (min-width: 992px) {
    .table {
        margin: var(--space-8) 0;
    }
    
    .table thead tr th {
        padding: var(--space-5) var(--space-8);
        font-size: var(--text-base);
    }
    
    .table tbody tr td {
        padding: var(--space-5) var(--space-8);
        font-size: var(--text-base);
    }
}

/* ========================================
   Table Variants
   Варианты оформления таблиц
   ======================================== */

/* Компактная таблица */
.table-sm thead tr th,
.table-sm tbody tr td {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
}

/* Таблица без границ между ячейками */
.table-borderless tbody tr td {
    border: none;
}

.table-borderless tbody tr:last-child td {
    border-bottom: none;
}

/* Таблица с закругленными углами */
.table-rounded {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table-rounded thead tr th:first-child {
    border-top-left-radius: var(--radius-lg);
}

.table-rounded thead tr th:last-child {
    border-top-right-radius: var(--radius-lg);
}

.table-rounded tbody tr:last-child td:first-child {
    border-bottom-left-radius: var(--radius-lg);
}

.table-rounded tbody tr:last-child td:last-child {
    border-bottom-right-radius: var(--radius-lg);
}

/* ========================================
   Special Colors for Table Cells
   Цветовые индикаторы для ячеек
   ======================================== */

/* Изумрудный цвет (положительный) */
.izumrud {
    color: var(--color-primary) !important;
    font-weight: 600;
}

/* Рубиновый цвет (отрицательный) */
.rubin {
    color: #c80064 !important;
    font-weight: 600;
}

/* Подсказка */
.table .hint {
    cursor: pointer;
    border-bottom: 1px dashed var(--color-gray-400);
    color: var(--color-primary);
    transition: all var(--transition-fast);
}

.table .hint:hover {
    border-bottom-style: solid;
    color: var(--color-primary-dark);
}

/* ========================================
   Content Body Section
   Стили для контентных страниц
   ======================================== */

.content-body {
    padding: var(--space-24) 0;
    background: var(--bg-primary);
}

/* Нумерованные списки */
.content-body ol {
    margin: var(--space-6) 0;
    padding-left: var(--space-8);
}

.content-body ol li {
    margin-bottom: var(--space-1);
    line-height: 1.6;
    color: var(--text-secondary);
    padding-left: var(--space-8);
    position: relative;
}

/* Цифры для нумерованного списка */
.content-body ol {
    counter-reset: content-counter;
}

.content-body ol > li::before {
    counter-increment: content-counter;
    content: counter(content-counter) ".";
    position: absolute;
    left: 0;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: var(--text-base);
    color: var(--color-primary);
    width: 24px;
    text-align: right;
    line-height: 1.2;
}

/* Вложенные нумерованные списки */
.content-body ol ol {
    margin-top: var(--space-3);
}

/* Маркированные списки */
.content-body ul {
    margin: var(--space-6) 0;
    padding-left: var(--space-6);
}

.content-body ul li {
    margin-bottom: var(--space-1);
    line-height: 1.6;
    color: var(--text-secondary);
    padding-left: var(--space-8);
    position: relative;
}

/* Маркеры для маркированного списка */
.content-body ul > li::before {
    content: "•";
    position: absolute;
    left: 0;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: var(--text-lg);
    color: var(--color-primary);
    line-height: 1.2;
}

/* Вложенные маркированные списки */
.content-body ul ul {
    margin-top: var(--space-3);
}

/* Ссылки внутри списков */
.content-body li a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-base);
    font-weight: 500;
}

.content-body li a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* Альтернативные маркеры (опционально) */
.content-body ul.disc li::before {
    content: "◦";
}

.content-body ul.circle li::before {
    content: "●";
}

.content-body ul.square li::before {
    content: "■";
}

/* Абзацы внутри списков */
.content-body li p {
    margin: var(--space-2) 0;
}

.content-body li strong {
    color: var(--text-primary);
    font-weight: 600;
}

.content-body h5 {
    margin-top: var(--space-3);
}

/* ========================================
   Error Section
   Стили для ошибок
   ======================================== */

.error-section {
    padding: var(--space-24) 0;
    background: var(--bg-primary);
}

.error-section .section-header {
    text-align: left;
}

.error-section .section-title {
    color: var(--color-error, #c80064);
}

.error-section .section-content {
    padding: var(--space-8);
    background: rgba(200, 0, 100, 0.05);
    border: 1px solid rgba(200, 0, 100, 0.1);
    border-radius: var(--radius-lg);
}

.error-section .error {
    background: rgba(200, 0, 100, 0.1);
    border: 1px solid rgba(200, 0, 100, 0.2);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    color: #c80064;
}

/* ========================================
   Print Styles for Tables
   Стили для печати
   ======================================== */

@media print {
    .table {
        box-shadow: none;
        page-break-inside: avoid;
        border: 1px solid var(--text-primary);
    }
    
    .table thead tr th {
        background: var(--color-gray-100) !important;
        color: var(--text-primary) !important;
        border: 1px solid var(--text-primary) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .table tbody tr td {
        border: 1px solid var(--color-gray-300) !important;
        color: var(--text-primary) !important;
        background: var(--bg-primary) !important;
    }
    
    .table tbody tr:nth-child(even) td {
        background: var(--bg-secondary) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .table tbody tr:hover {
        transform: none;
        box-shadow: none;
    }
}

/* ========================================
   Accessibility Enhancements
   Улучшения доступности
   ======================================== */

/* Focus стили для клавиатурной навигации */
.table tbody tr:focus,
.table tbody tr:focus-within {
    outline: 2px solid var(--color-primary);
    outline-offset: -2px;
    background-color: var(--bg-tertiary);
}

.table tbody tr:focus td,
.table tbody tr:focus-within td {
    background-color: var(--bg-tertiary);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .table tbody tr {
        transition: none;
    }
    
    .table tbody tr:hover {
        transform: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .table {
        border: 2px solid var(--text-primary);
    }
    
    .table thead tr th,
    .table tbody tr td {
        border: 1px solid var(--text-primary);
    }
}

/* ========================================
   Dark Mode Support (опционально)
   Поддержка темной темы
   ======================================== */

@media (prefers-color-scheme: dark) {
    .table {
        background: #212529;
        border-color: #495057;
    }
    
    .table thead tr th {
        background: var(--color-primary);
        border-color: var(--color-primary-dark);
    }
    
    .table tbody tr td {
        color: #e9ecef;
        border-color: #495057;
    }
    
    .table tbody tr:nth-child(even) td {
        background: rgba(255, 255, 255, 0.05);
    }
    
    .table tbody tr:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .table tbody tr:hover td {
        background: rgba(255, 255, 255, 0.1);
    }
}

#tbl_divs td, #tbl_divs th, 
#tbl_contenttypes td, #tbl_contenttypes th, 
#tbl_users td, #tbl_users th, 
#tbl_fdivs td, #tbl_fdivs th, 
#tbl_fboards td, #tbl_fboards th, 
#tbl_news td, #tbl_news th, 
#tbl_tgbotcomms td, #tbl_tgbotcomms th, #tbl_tgusers td, #tbl_tgusers th, 
#tbl_groups td, #tbl_groups th,
#tbl_ticket td, #tbl_ticket th
{font-size: 14px; padding: 3px;}

#frmcs.form {border:0}
div.appeal-form-container div.form_buttons {display: none;}
section.appeal div.appeal-wrapper {gap: 0;}


.magicmodal		{ border:1px solid #AAA; background-color: #FFF; border-radius:5px; padding: 10px; box-shadow: 0 0 5px rgba(0,0,0,0.5);
				left: 50%; width: auto; min-width: 500px; max-width: 1000px; position: fixed; top: 1vh; max-height: 95vh;  overflow-y: auto; z-index: 1001;	transform: translate(-50%, 0%);}
.overdiv	{ z-index:1001; }

.redaktbtn {
    font-size: 0 !important;
    position: relative;
    width: 32px;
    height: 32px;
    cursor: pointer;
}

.redaktbtn::before {
    content: "✎";           /* Unicode U+270E */
    font-size: 18px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.delrowbtn {
    font-size: 0 !important;
    position: relative;
    width: 32px;
    height: 32px;
    cursor: pointer;
}

.delrowbtn::before {
    content: "🗑";           /* Unicode U+270E */
    font-size: 18px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}