/* ================= Общие стили ================= */
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f9f9f9;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 60px; }
}
/* Полоса топ меню */
.header {
    width: 100%;
    background: #efefef;
    border-bottom: 1px solid #d1d5db;
}

/* Контейнер полосы */
.header-inner {
    max-width: 1700px;
    margin: 0 auto;
    padding: 12px 30px;

    display: flex;
    align-items: center;
    justify-content: space-between; /* главное: левая и правая часть по краям */
}

/* Левая часть (лого + меню) */
.left-menu {
    display: flex;
    align-items: center;
    gap: 20px; /* расстояние между логотипом и меню */
}

/* Логотип */
.logo-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: 30px; /* оставляем контейнер маленьким */
    height: 30px; /* контейнер можно оставить фиксированным, не увеличиваем слишком */
}

/* Только изображение */
.logo-box img {
    height: 300px;          /* увеличиваем размер лого */
    width: auto;            /* сохраняем пропорции */
    object-fit: contain;    /* чтобы не растягивалось */
}

/* Левое меню */
.nav-left {
    display: flex;
    gap: 18px;
    align-items: center;
}

/* Разделители между пунктами меню */
.nav-left .nav-link:not(:last-child)::after {
    content: "•";
    margin-left: 10px;
    color: #bdbdbd;
}

/* Ссылки */
.nav-link {
    text-decoration: none;
    color: #374151;
    font-weight: 500;
    padding: 6px 2px;
}

/* Hover эффект */
.nav-link:hover {
    color: #111;
}



/* Правая часть */
.nav-right {
    display: flex;
    align-items: center;
}

/* Кнопка аккаунта */
.account-link {
    padding: 8px 18px;
    border: 2px solid #e10600;
    border-radius: 8px;
    color: #e10600;
    font-weight: 500;
    text-decoration: none;
    transition: 0.25s;
}

.account-link:hover {
    background: #e10600;
    color: white;
}

/* ================= Контент ================= */
.content {
    margin-top: 60px;
    text-align: center;
}

.content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

/* ================= AUTH контейнер ================= */
.auth-container {
    width: 100%;
    max-width: 420px;
    margin: 70px auto;
    padding: 40px 45px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
    text-align: center;
}

.auth-container h2 {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 25px;
}

/* Поля INPUT */
.auth-container input[type="email"],
.auth-container input[type="password"],
.auth-container input[type="text"] {
    width: 100%;
    padding: 16px;
    margin: 12px 0 24px;
    border: 2px solid #e7e7e7;
    background: #fff;
    border-radius: 14px;
    font-size: 16px;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.auth-container input:focus {
    border-color: #007BFF;
    box-shadow: 0 0 6px rgba(0, 123, 255, 0.25);
    outline: none;
}

/* ================= Кнопка AUTH ================= */


/* ================= Footer links (Запомнить / Забыл пароль) ================= */
.auth-footer-links {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin: 20px 0 25px;
    padding: 2 12px; /* отступы слева и справа для раздвига */
}

.auth-footer-links a,
.auth-footer-links label {
    color: #007bff;
    font-size: 15px;
    text-decoration: none;
}

.auth-footer-links a:hover,
.auth-footer-links label:hover {
    text-decoration: underline;
}
}

/* Показать пароль */
.show-password {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: -10px;
    margin-bottom: 15px;
}

.show-password input {
    transform: scale(1.25);
}

/* ================= Flash сообщения ================= */
.flash-container {
    position: fixed;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    pointer-events: none;
}

.flash {
    padding: 14px 20px;
    margin-bottom: 12px;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 6px 22px rgba(0,0,0,0.18);
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.4s ease;
}

/* Цвета flash */
.flash-success,
.flash.success,
.flash.alert-success { background: #d4edda !important; color: #155724 !important; }

.flash-error,
.flash.error,
.flash.alert-danger,
.flash-danger { background: #f8d7da !important; color: #721c24 !important; }

.flash-warning,
.flash.warning,
.flash.alert-warning { background: #fff3cd !important; color: #856404 !important; }

.flash-info,
.flash.info,
.flash.alert-info { background: #d1ecf1 !important; color: #0c5460 !important; }

/* Исчезновение */
.flash.fade-out {
    opacity: 0;
    transform: translateY(-10px);
}



    .form-wrapper {
        max-width: 500px;
        margin: 40px auto;
        padding: 30px;
        background: #fff;
        border-radius: 16px;
        box-shadow: 0 4px 14px rgba(0,0,0,0.1);
    }

    .form-label {
        display: block;
        margin-bottom: 8px;
        font-weight: 600;
        color: #333;
    }

    .form-field {
        width: 100%;
        padding: 12px 15px;
        margin-bottom: 20px;
        border-radius: 12px;
        border: 1px solid #ccc;
        font-size: 16px;
        box-sizing: border-box;
        transition: 0.25s;
    }

    .form-field:focus {
        border-color: #4a90e2;
        outline: none;
        box-shadow: 0 0 5px rgba(74,144,226,0.3);
    }

    .form-textarea {
        min-height: 120px;
        resize: vertical;
    }

    .btn-submit {
        padding: 10px 20px;
        font-size: 16px;
        border-radius: 12px;
        border: none;
        background: #4a90e2;
        color: #fff;
        cursor: pointer;
        transition: 0.25s;
    }

    .btn-submit:hover {
        background: #357ac8;
    }

    h1.page-title {
        text-align: center;
        margin-top: 30px;
        font-size: 24px;
        color: #000;
    }




/* Flash сообщения */
.flash-container { position: fixed; top: 80px; right: 20px; z-index: 100; }
.flash { padding: 10px 20px; border-radius: 8px; margin-bottom: 10px; color: #fff; }
.flash-info { background: #4a90e2; }
.flash-success { background: #2ecc71; }
.flash-error { background: #e74c3c; }
.flash.fade-out { opacity: 0; transition: opacity 0.8s; }



/* Универсальный стиль кнопок */
.btn {
    display: inline-block;
    padding: 12px 1px;
    font-weight: 500;
    font-size: 15px;
    border-radius: 12px;
    text-decoration: none !important;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}



/* Второстепенные кнопки */
.btn-secondary {
    background-color: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
    transform: scale(1.05);
}

/* Дополнительно: маленькие кнопки */
.btn-small {
    padding: 10px 1px;  /* уже кнопку */
    font-size: 13px;
    border-radius: 10px;
}
/* Кнопка назад */
.btn-back { display: inline-block; padding: 12px 16px; background: #007bff; color: white; text-decoration: none; border-radius: 14px; transition: 0.25s ease; }
.btn-back:hover { background: #0a63c7; }

/* Поиск */
.search-wrapper {
    display: flex;
    justify-content: center; /* центрируем поисковое поле */
    align-items: center;
    position: relative;
    margin: 30px 0;
}

.search-input {
    width: 400px;
    height: 48px;
    padding: 12px 16px;
    border-radius: 12px;
    border: 2px solid #ccc;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
    z-index: 1;
}

.search-input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 8px rgba(74, 144, 226, 0.3);
}

.btn-back1 {
    position: absolute; /* позиционируем кнопку относительно контейнера */
    left: calc(37% - 220px); /* смещаем слева на половину ширины поиска */
    z-index: 2;
    display: inline-block;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 14px;
    padding: 12px 12px;
    transition: 0.25s ease;
}

.btn-back1:hover {
    background: #0a63c7;
}

/* Сетка карточек */
.catalog-container {
    display: grid;
    grid-template-columns: repeat(5, 220px);
    gap: 45px;
    justify-content: center;
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Карточка */
.card {
    width: 220px;
    height: 300px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s, box-shadow 0.25s;
}

.card:hover {
    transform: scale(1.04);
    box-shadow: 0 8px 18px rgba(0,0,0,0.15);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    margin: 10px 0;
}

.card-actions {
    display: flex;
    justify-content: space-between;
    padding: 0 10px 10px;
}

.btn-small {
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: 0.25s;
}

.btn-edit { background: #4a90e2; color: white; }
.btn-edit:hover { background: #357ac8; }
.btn-delete { background: #e74c3c; color: white; }
.btn-delete:hover { background: #c0392b; }

.add-card {
    width: 220px;
    height: 300px;
    border: 2px dashed #bbb;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: 0.3s;
}

.add-card:hover {
    border-color: #4a90e2;
    background: rgba(74, 144, 226, 0.1);
    transform: scale(1.04);
}

.add-card span {
    font-size: 50px;
    color: #4a90e2;
    font-weight: bold;
    line-height: 1;
}
.dark-theme {
    background: #0a0a0a;
    color: #fff;
}

.dark-theme .card {
    background: #1a1a1a;
    color: #fff;
}

.dark-theme .nav-link {
    color: #aaa;
}

.dark-theme .nav-link:hover {
    color: #fff;
}
