@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Анимация "пульсации" для выделенного текста */
@keyframes pulse-text {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* Анимация плавного появления контента */
@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

:root {
    /* ФОН (Светлая Ч/Б тема) */
    --surface-color-rgb: 255, 255, 255;
    --bg-color: #f8f9fa;
    --surface-color: #ffffff;

    /* ТЕКСТ */
    --text-color: #212529;
    --text-muted-color: #6c757d;
    
    /* ОСНОВНОЙ ЦВЕТ (ЧЕРНЫЙ) */
    --primary-color: #000000;
    --primary-hover-color: #333333;
    --primary-light-color: #f0f0f0;
    --primary-text-color: #FFFFFF;
    
    /* ЦВЕТА АДМИНКИ */
    --admin-red: #c92a2a;
    --admin-red-hover: #a62222;
    --admin-green: #28a745;
    --admin-green-hover: #218838;

    /* ГРАНИЦЫ И ДРУГИЕ ЭЛЕМЕНЕНТЫ */
    --border-color: #dee2e6;
    --border-color-light: #f1f3f5;
    --table-header-bg: #f8f9fa;
    --table-header-text: #212529;
    --table-row-hover-bg: var(--primary-light-color);
    --input-bg: #ffffff;
    --input-text: #212529;
    --input-border: #ced4da;
    --input-focus-border: var(--primary-color);
    --input-focus-shadow: rgba(0, 0, 0, 0.15);

    /* Тени */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}


* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
    font-family: 'Inter', 'Open Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.75;
    font-size: 16px;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.highlight-onsite {
    color: var(--primary-color);
    font-weight: 600;
    animation: pulse-text 2.5s ease-in-out infinite;
}

.side-background-text {
    position: fixed;
    top: 120px;
    bottom: 100px;
    width: calc((100vw - 1340px) / 2);
    padding: 20px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted-color);
    font-size: 13px;
    line-height: 1.6;
    overflow: hidden;
    z-index: 1;
    opacity: 0.2; /* Cамый темный/прозрачный вариант */
    user-select: none;
}
.side-background-text.left-text {
    left: 0;
    text-align: justify;
}
.side-background-text.right-text {
    right: 0;
    text-align: justify;
}

.side-background-text ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.side-background-text ul li {
    padding-bottom: 15px;
    opacity: 0;
    animation: fadeInSlideUp 0.8s ease-out forwards;
}
.side-background-text ul li:nth-child(1) { animation-delay: 0.3s; }
.side-background-text ul li:nth-child(2) { animation-delay: 0.6s; }
.side-background-text ul li:nth-child(3) { animation-delay: 0.9s; }
.side-background-text ul li:nth-child(4) { animation-delay: 1.2s; }

.side-background-text strong {
    color: var(--text-color);
    font-weight: 600;
}

.page-services .side-background-text,
.page-portfolio .side-background-text {
    align-items: flex-start;
    padding-top: 150px;
}

.container {
    max-width: 1240px;
    margin: 50px auto 70px auto;
    padding: 40px 50px;
    background: var(--surface-color);
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    flex-grow: 1;
    position: relative;
    z-index: 2;
    opacity: 0;
    animation: fadeInSlideUp 0.8s ease-out 0.2s forwards;
}

header {
    background: var(--surface-color); padding: 15px 50px;
    border-bottom: 1px solid var(--border-color); position: sticky;
    top: 0; z-index: 1000; box-shadow: var(--shadow-md);
    transition: transform 0.3s ease-in-out;
}
header.header-hidden { transform: translateY(-100%); }

.header-top-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; }

.logo-info a {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.header-logo {
    display: block;
    height: 90px;
    width: auto;
}

.logo-info h1 {
    margin: 0; font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    font-weight: 800; color: var(--text-color);
    transition: color 0.3s ease-in-out;
    line-height: 1.2;
}
.logo-info h1:hover { color: var(--primary-color); }
.logo-info p { margin-top: 4px; font-size: 0.9rem; color: var(--text-muted-color); font-weight: 500; }

.header-controls { display: flex; align-items: center; gap: 25px; }
.language-switcher { display: flex; gap: 12px; }
.lang-btn {
    padding: 8px 16px; border: 2px solid transparent; text-decoration: none;
    border-radius: 10px; font-size: 0.9em; font-family: 'Poppins', sans-serif;
    font-weight: 600; background-color: transparent; color: var(--text-muted-color);
    transition: all 0.3s ease-in-out; position: relative;
}
.lang-btn.active { color: var(--primary-color); font-weight: 700; }


/*
* ЛОГИКА ОТОБРАЖЕНИЯ (Mobile First)
*/

/* 1. По умолчанию (мобильные) скрываем десктопные элементы */
.main-nav { display: none; }
.language-switcher-desktop { display: none; }
.user-auth-desktop { display: none; }

.menu-toggle {
    display: block; /* Показываем гамбургер по умолчанию */
    cursor: pointer; font-size: 2rem;
    color: var(--text-color); background: none; border: none; padding: 0;
    z-index: 1001; position: relative;
}
.language-switcher-mobile { display: block; padding: 15px 0; }
.mobile-nav-container { display: block; }

/* 2. Стили для мобильного меню */
.mobile-nav-container {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 999;
    background: rgba(var(--surface-color-rgb), 0.85);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 16px 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}
.mobile-nav-container.active {
    max-height: 500px;
    padding: 10px 0;
}
.mobile-nav ul { list-style: none; padding: 0; margin: 0; flex-direction: column; gap: 0; }
.mobile-nav li { border-bottom: 1px solid rgba(0, 0, 0, 0.1); }
.mobile-nav li:last-of-type { border-bottom: none; }
.mobile-nav a {
    background: transparent; box-shadow: none; border: none;
    display: block; padding: 16px 30px; text-align: center;
    color: var(--text-color); font-size: 1rem; font-weight: 600;
    margin: 0; border-radius: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.mobile-nav a:hover { 
    background-color: var(--primary-color); 
    color: var(--primary-text-color); 
}
.mobile-nav .language-switcher { justify-content: center; }


/* 3. Переключаем на десктопной версии (1281px и шире) */
@media (min-width: 1281px) {
    .main-nav { display: block; }
    .main-nav ul { list-style: none; padding: 0; margin: 0; display: flex; justify-content: center; gap: 25px; }
    .main-nav a {
        color: var(--text-color); text-decoration: none; padding: 9px 24px;
        border-radius: 8px; font-family: 'Poppins', sans-serif; font-weight: 600;
        font-size: 1rem; display: block; position: relative;
        transition: all 0.3s ease-in-out; border: 2px solid transparent;
    }
    .main-nav a:hover, .main-nav a.active-link { 
        color: var(--primary-text-color); 
        border-color: var(--primary-color); 
        background-color: var(--primary-color); 
    }
    
    .language-switcher-desktop { display: flex; }
    .user-auth-desktop { display: flex; }
    
    .menu-toggle { display: none; }
    .mobile-nav-container { display: none; }
    .language-switcher-mobile { display: none; }
}


.filters-container {
    background-color: var(--surface-color); padding: 35px 40px;
    border-radius: 18px; margin-bottom: 40px;
    border: 1px solid var(--border-color); box-shadow: var(--shadow-lg);
}
.category-filters { display: flex; flex-wrap: wrap; gap: 15px; align-items: center; margin-bottom: 30px; }
.category-filters span { margin-right: 20px; font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.15rem; }
.filters-container input[type="text"] {
    padding: 15px 22px; width: 100%; max-width: 550px;
    border: 2px solid var(--input-border); border-radius: 12px;
    font-size: 1.05rem; background: var(--input-bg); color: var(--input-text);
    box-shadow: var(--shadow-sm); transition: all 0.3s ease-in-out;
}
.filters-container input[type="text"]:focus { 
    border-color: var(--primary-color); 
    outline: none;
    box-shadow: 0 0 0 4px var(--input-focus-shadow);
}
.category-btn {
    padding: 10px 22px; font-size: 0.95rem; font-weight: 600;
    border-radius: 10px; color: var(--text-color); background-color: var(--surface-color);
    border: 2px solid var(--border-color); box-shadow: var(--shadow-sm);
    text-decoration: none; cursor: pointer; transition: all 0.3s ease-in-out;
    flex-grow: 0;
}
.category-btn:hover { color: var(--primary-text-color); border-color: var(--primary-color); background-color: var(--primary-color); }
.category-btn.active { color: var(--primary-text-color); background-color: var(--primary-color); border-color: var(--primary-color); }

.table-responsive-wrapper {
    display: block; width: 100%;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border-color); border-radius: 18px;
    box-shadow: var(--shadow-xl); position: relative;
}

table { 
    width: 100%; border-collapse: separate; 
    border-spacing: 0; table-layout: fixed;
}
table th:first-child { width: 80px; }
table th:last-child { width: 180px; }
table th, table td { padding: 20px 25px; text-align: left; border-bottom: 1px solid var(--border-color); }
table th { font-family: 'Poppins', sans-serif; font-weight: 700; background: var(--table-header-bg); color: var(--table-header-text); border-bottom-width: 3px; border-color: var(--primary-color) !important; }
table thead th:first-child { border-top-left-radius: 17px; }
table thead th:last-child { border-top-right-radius: 17px; }
table tbody tr:hover { background: var(--table-row-hover-bg); }
table tbody tr:last-child td { border-bottom: none; }
.table-no-data { text-align: center; padding: 20px; color: var(--text-muted-color); }

.services-price-note {
    padding: 15px 20px;
    margin-bottom: 30px;
    text-align: center;
    font-size: 0.95em;
    color: var(--text-color);
    background-color: var(--primary-light-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.portfolio-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}
.portfolio-item {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}
.portfolio-item:hover { transform: translateY(-5px); box-shadow: var(--shadow-xl); }
.portfolio-item img {
    width: 100%; height: 250px;
    object-fit: cover; display: block;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}
.portfolio-item-description { padding: 20px; font-size: 0.95em; line-height: 1.6; color: var(--text-muted-color); }

.lightbox {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.lightbox.active { opacity: 1; pointer-events: auto; }
.lightbox img {
    max-width: 90%;
    max-height: 80%;
    box-shadow: 0 0 30px rgba(0,0,0,0.7);
    border-radius: 8px;
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    font-weight: 300;
    color: white;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease;
}
.lightbox-close:hover { transform: scale(1.1); }

a { color: var(--primary-color); text-decoration: none; font-weight: 600; }
a:hover { color: var(--primary-hover-color); }

footer {
    text-align: center; padding: 40px 30px; background: var(--surface-color);
    color: var(--text-muted-color); margin-top: auto;
    border-top: 1px solid var(--border-color); font-size: 1rem;
    position: relative; z-index: 2;
}

@media (max-width: 1540px) {
    .side-background-text { display: none; }
}


@media (max-width: 768px) {
    .container {
        animation: none !important;
        opacity: 1 !important;
    }

    body { font-size: 15px; }
    .container { padding: 20px 15px; margin: 20px auto 30px auto; }
    header { padding: 10px 15px; }
    .header-top-row { flex-wrap: nowrap; }
    
    .header-logo { height: 55px; }
    .logo-info h1 { font-size: 1.3rem; }
    .logo-info p { display: none; }
    
    .table-responsive-wrapper::after {
        background: linear-gradient(to right, rgba(255, 255, 255, 0), var(--surface-color) 80%);
    }
    table th:first-child { width: 15%; }
    table th:last-child { width: 30%; }
    table th, table td { 
        padding: 12px 10px; font-size: 14px;
        white-space: normal; word-break: break-word;
        hyphens: auto;
    }
    table th:last-child, table td:last-child { white-space: nowrap; }
    
    .filters-container { padding: 20px; }
    .category-filters { flex-direction: column; align-items: stretch; gap: 10px; }
    .services-price-note { margin: 0 0 20px 0; padding: 10px 15px; font-size: 0.9em; }
    footer { padding: 25px 20px; }
}

/* Стили для кнопки Входа/Выхода */
.user-auth .user-name {
    font-weight: 600;
    font-size: 0.9em;
    white-space: nowrap;
}

.user-auth .auth-link {
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.9em;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-color);
    background-color: var(--primary-color);
    color: var(--primary-text-color);
    white-space: nowrap;
}

.user-auth .auth-link:hover {
    background-color: var(--primary-hover-color);
}

/* Красная кнопка "Админ" */
.user-auth .auth-link.admin-link {
    background-color: var(--admin-red);
    border-color: var(--admin-red);
}
.user-auth .auth-link.admin-link:hover {
    background-color: var(--admin-red-hover);
}


.user-auth-desktop {
    /* display: none; По умолчанию скрыто, см. выше */
    align-items: center;
    gap: 10px;
    margin-left: 15px;
}

/* Стили для мобильной кнопки входа */
.user-auth-mobile {
    padding: 16px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.user-auth-mobile .user-name {
    font-weight: 600;
    font-size: 1em;
    margin-bottom: 5px;
}

.user-auth-mobile .auth-link {
    width: 100%;
    max-width: 250px;
    text-align: center;
}

.user-auth-mobile .auth-link.admin-link {
    background-color: var(--admin-red);
    border-color: var(--admin-red);
    color: #fff;
    margin-bottom: 10px;
}

/*
* СТИЛИ ДЛЯ АДМИН-ПАНЕЛИ (admin.php) - УЛУЧШЕННЫЕ
*/
.admin-page body {
    background-color: #f1f3f5;
}
.admin-page .container {
    animation: none !important;
    opacity: 1 !important;
}
.admin-page #mainHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--primary-color);
}
.admin-page h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
    font-weight: 700;
}
.admin-page .logo-info p {
    display: block;
    margin-top: 0;
    font-size: 0.85rem;
}
.admin-form h3 {
    margin-bottom: 20px;
    padding-bottom: 0;
    border-bottom: none;
    font-size: 1.4rem;
    font-weight: 600;
}
.admin-form {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-md);
}

/* Блок Технических Работ */
.maintenance-block {
    text-align: center;
    border: 3px solid var(--border-color);
}
.maintenance-status {
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 5px;
    display: inline-block;
    margin-left: 10px;
}
.status-on {
    color: #fff;
    background-color: var(--admin-red);
}
.status-off {
    color: var(--admin-green);
    background-color: #e6f9e6;
}
.maintenance-btn {
    margin-top: 15px;
    padding: 10px 20px;
}
.maintenance-btn.on {
    background-color: var(--admin-red);
}
.maintenance-btn.on:hover {
    background-color: var(--admin-red-hover);
}
.maintenance-btn.off {
    background-color: var(--admin-green);
}
.maintenance-btn.off:hover {
    background-color: var(--admin-green-hover);
}
/* Конец Блока Технических Работ */


.form-grid.compact-grid {
    display: grid;
    grid-template-columns: 150px 100px 1fr 1fr 1fr; /* Категория | Цена | RU | EN | UZ */
    gap: 15px;
    margin-bottom: 20px;
}
.admin-form input,
.admin-form select {
    width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    box-shadow: none;
}
.admin-form button {
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    background-color: var(--primary-color);
    color: var(--primary-text-color);
}
.admin-form button:hover {
    background-color: var(--primary-hover-color);
}
/* Кнопки добавления (сейчас только одна) */
.form-actions-add {
    display: block;
    margin-top: 15px;
}
.form-actions-add .update-btn {
    display: block;
    width: 100%;
}
/* Конец Кнопок добавления */


.admin-divider {
    border: 0;
    border-top: 2px dashed var(--border-color);
    margin: 40px 0;
}
.notice {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 600;
}
.notice.success {
    background: #e6f9e6;
    color: #1a6e1a;
    border: 1px solid #c3eec3;
}
.notice.error {
    background: #fdecec;
    color: #a62222;
    border: 1px solid #f9c9c9;
}

/* Стили для таблицы редактирования */
.admin-table-wrapper {
    overflow-x: auto; /* Включаем скролл для маленьких экранов */
    border: none;
    box-shadow: none;
}
.admin-table-wrapper table {
    table-layout: auto;
    width: 100%;
    min-width: 1000px; /* Минимальная ширина, чтобы таблица не сжималась */
}
.admin-table-wrapper table thead th {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color) !important;
}
.admin-table-wrapper table tbody tr:hover {
    background-color: var(--primary-light-color);
}
.category-header-row td {
    background-color: var(--primary-light-color) !important;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    text-align: center !important;
    padding: 10px 0 !important;
    border-top: 3px solid var(--primary-color) !important;
}
.editable-row input[type="text"],
.editable-row input[type="number"],
.editable-row select {
    padding: 6px 10px;
    margin-bottom: 5px;
    font-size: 0.9em;
    width: 100%;
    box-sizing: border-box;
}
.editable-row input[type="text"]:last-of-type,
.editable-row input[type="number"]:last-of-type {
    margin-bottom: 0;
}
.editable-row .update-btn {
    background-color: var(--primary-color);
    margin-bottom: 5px;
    display: block;
    width: 100%;
    padding: 8px;
}
.editable-row .delete-btn {
    background-color: var(--admin-red);
    display: block;
    width: 100%;
    padding: 8px;
}
.editable-row .delete-btn:hover {
    background-color: var(--admin-red-hover);
}

/*
* СТИЛИ ДЛЯ ФОРМЫ ОБРАТНОГО ЗВОНКА (HOME.HTML)
*/
.callback-section {
    padding: 25px 0 0 0;
    margin-top: 25px;
    border-top: 1px solid var(--border-color);
}

.callback-section h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.callback-section form {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap; /* Для мобильной адаптации */
}

.callback-section input[type="text"],
.callback-section input[type="tel"] {
    flex-grow: 1;
    min-width: 200px;
    padding: 12px 15px;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.callback-section input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.callback-section button[type="submit"] {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background-color: var(--primary-color);
    color: var(--primary-text-color);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.callback-section button[type="submit"]:hover {
    background-color: var(--primary-hover-color);
}

/*
* СТИЛИ ДЛЯ СТРАНИЦЫ КОНТАКТОВ
*/
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr; /* Информация и Форма */
    gap: 40px;
    margin-top: 20px;
}

.contact-info h2,
.contact-form h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.contact-info p {
    line-height: 1.5;
    margin-bottom: 15px;
}

.contact-info .contact-detail {
    margin-bottom: 20px;
    line-height: 1.4;
}

.contact-info .contact-detail strong {
    display: block;
    font-size: 1.1em;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 3px;
}

/* Стили для формы */
.contact-form .form-group {
    margin-bottom: 15px;
}

.contact-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--text-muted-color);
    font-size: 0.9em;
}

.contact-form input[type="text"],
.contact-form input[type="tel"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    background-color: var(--input-bg);
    color: var(--input-text);
}

.contact-form textarea {
    resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.contact-form .btn-primary {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    background-color: var(--primary-color);
    color: var(--primary-text-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

.contact-form .btn-primary:hover {
    background-color: var(--primary-hover-color);
}

.form-message {
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 15px;
}

.form-message.success {
    background: #e6f9e6;
    color: #1a6e1a;
    border: 1px solid #c3eec3;
}

.form-message.error {
    background: #fdecec;
    color: #a62222;
    border: 1px solid #f9c9c9;
}


/* Мобильная адаптация */
@media (max-width: 1050px) {
    .admin-page .container {
        padding: 20px 10px;
    }
    .form-grid.compact-grid {
        grid-template-columns: 1fr 1fr;
    }
    .form-grid.compact-grid select[name="category_key"] {
        grid-column: 1 / -1;
    }
}
@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr; 
    }
}
@media (max-width: 768px) {
    .form-actions-add {
        grid-template-columns: 1fr;
    }
    .callback-section form {
        flex-direction: column;
        gap: 10px;
    }
    .callback-section input[type="text"],
    .callback-section input[type="tel"],
    .callback-section button[type="submit"] {
        width: 100%;
        min-width: unset;
    }
}