/* Упрощенный адаптивный layout для страниц без меню */

body {
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Стили для Flash сообщений */
.flash-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.flash-message {
    margin-bottom: 10px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease-out;
    position: relative;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.4;
}

.flash-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.flash-message.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-message.success::before {
    background: #28a745;
}

.flash-message.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-message.error::before {
    background: #dc3545;
}

.flash-message.warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border: 1px solid #ffeaa7;
}

.flash-message.warning::before {
    background: #ffc107;
}

.flash-message.info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.flash-message.info::before {
    background: #17a2b8;
}

.flash-message .flash-icon {
    margin-right: 10px;
    font-size: 1.2em;
}

.flash-message .flash-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    color: inherit;
}

.flash-message .flash-close:hover {
    opacity: 1;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.flash-message.slide-out {
    animation: slideOutRight 0.3s ease-in forwards;
}

/* Стили для стандартных флеш-сообщений CakePHP (класс .message) */
.message,
.simple-content .message {
    margin: 15px 0;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.message::before,
.simple-content .message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.message.success,
.simple-content .message.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.success::before,
.simple-content .message.success::before {
    background: #28a745;
}

.message.error,
.simple-content .message.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.error::before,
.simple-content .message.error::before {
    background: #dc3545;
}

.message.warning,
.simple-content .message.warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border: 1px solid #ffeaa7;
}

.message.warning::before,
.simple-content .message.warning::before {
    background: #ffc107;
}

.message.info,
.simple-content .message.info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.message.info::before,
.simple-content .message.info::before {
    background: #17a2b8;
}

.message.hidden,
.simple-content .message.hidden {
    display: none;
}

/* Контент */
.simple-content {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
    box-sizing: border-box;
}

/* Для страниц с формами (логин, регистрация) - центрирование */
.simple-content > form,
.simple-content > .users.login.content,
.simple-content > .users.index.content {
    align-self: center;
    margin: auto;
}

/* Заголовок с логотипом - теперь отдельная полоса сверху */
.simple-header-bar {
    padding: 20px 0;
    background: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
}

.simple-header-inner {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.simple-header-bar .simple-logo {
    margin: 0;
}

.simple-logo {
    font-size: 1.75rem;
    font-weight: bold;
    text-decoration: none;
    color: #dc3545;
    transition: opacity 0.2s;
    margin-left: 0;
}

.simple-logo:hover {
    opacity: 0.8;
    text-decoration: none;
}

.simple-logo span:first-child {
    color: #dc3545;
}

.simple-logo span:last-child {
    color: #6c757d;
}

@media (max-width: 767.98px) {
    .simple-header-bar {
        padding: 15px 0;
    }
    
    .simple-header-inner {
        padding: 0 20px;
    }
    
    .simple-logo {
        font-size: 1.5rem;
    }
    
    .simple-header-inner .btn-main-action,
    .main-content .btn-main-action {
        width: 100%;
        padding: 14px 24px;
        font-size: 1rem;
    }
}

/* Контент страницы */
.main-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 24px 24px 40px 24px;
    width: 100%;
    flex-shrink: 0;
}

.main-content h1 {
    font-size: 32px;
    font-weight: 400;
    line-height: 1.2;
    color: #111827;
    margin-bottom: 32px;
    padding: 20px 24px;
    background: linear-gradient(180deg, #FAFAFA 0%, #FFFFFF 100%);
    border: 1px solid #E5E7EB;
    border-radius: 12px;
}

.main-content h3 {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
    color: #111827;
}

.main-content .lead {
    font-size: 20px;
    font-weight: 400;
    line-height: 1.7;
    color: #374151;
}

.main-content p {
    font-size: 18px;
    line-height: 1.7;
    color: #374151;
    margin-bottom: 20px;
}

.main-content ul {
    padding-left: 28px;
    margin-bottom: 32px;
}

.main-content li {
    font-size: 18px;
    line-height: 1.7;
    color: #374151;
}

.main-content .content-text {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 40px;
}

/* Кнопка по стандартам дизайна (как в форме Users/edit.php) */
.btn-main-action,
.main-content .btn-main-action {
    padding: 14px 32px;
    font-size: 1.125rem;
    font-weight: 400;
    line-height: 1;
    border-radius: 4px;
    background-color: #343a40;
    border: none;
    color: #FFFFFF;
    text-decoration: none;
    display: inline-block;
    min-height: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-main-action:hover,
.main-content .btn-main-action:hover {
    background-color: #495057;
    color: #FFFFFF;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.btn-main-action:active,
.main-content .btn-main-action:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    background-color: #2d3436;
}

.btn-main-action:focus,
.main-content .btn-main-action:focus {
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(52, 58, 64, 0.25);
}

/* Мобильная версия */
@media (max-width: 767.98px) {
    .simple-content {
        padding: 15px;
        align-items: center;
        padding-top: 20px;
    }
    
    .main-content {
        padding: 24px 20px;
    }
    
    .main-content .content-text {
        padding: 32px 24px;
    }
    
    .main-content h1 {
        font-size: 28px;
        padding: 16px 20px;
    }
    
    .main-content .btn-main-action {
        width: 100%;
        padding: 14px 24px;
        font-size: 1rem;
    }
    
    .main-content h3 {
        font-size: 22px;
    }
    
    .main-content .lead {
        font-size: 18px;
    }
    
    .main-content p,
    .main-content li {
        font-size: 16px;
    }

    .flash-messages {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Формы */
.simple-content form {
    width: 100%;
    max-width: 450px;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

@media (max-width: 767.98px) {
    .simple-content form {
        padding: 20px;
    }
}

.simple-content h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #212529;
    font-size: 1.75rem;
}

@media (max-width: 767.98px) {
    .simple-content h2 {
        font-size: 1.5rem;
    }
}

/* Поля формы */
.simple-content .form-group {
    margin-bottom: 20px;
}

.simple-content label {
    display: block;
    margin-bottom: 5px;
    color: #495057;
    font-weight: 500;
}

.simple-content input[type="text"],
.simple-content input[type="tel"],
.simple-content input[type="email"],
.simple-content input[type="password"] {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.simple-content input[type="text"]:focus,
.simple-content input[type="tel"]:focus,
.simple-content input[type="email"]:focus,
.simple-content input[type="password"]:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Чекбокс */
.simple-content input[type="checkbox"] {
    margin-right: 8px;
    width: auto;
}

.simple-content .checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

/* Кнопки */
.simple-content button[type="submit"],
.simple-content .btn {
    width: 100%;
    padding: 12px 20px;
    background-color: #0d6efd;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.simple-content button[type="submit"]:hover,
.simple-content .btn:hover {
    background-color: #0b5ed7;
}

.simple-content button[type="submit"]:active,
.simple-content .btn:active {
    background-color: #0a58ca;
}

/* Стандартные стили для CakePHP форм */
.users.index.content,
.users.login.content {
    width: 100%;
    max-width: 450px;
}

/* Стили для CakePHP форм */
.simple-content fieldset {
    border: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.simple-content legend {
    display: none;
}

.simple-content .form-group {
    margin-bottom: 20px;
}

.simple-content .input {
    margin-bottom: 20px;
}

.simple-content .input label {
    display: block;
    margin-bottom: 5px;
    color: #495057;
    font-weight: 500;
    font-size: 0.875rem;
}

.simple-content .input input[type="text"],
.simple-content .input input[type="tel"],
.simple-content .input input[type="email"],
.simple-content .input input[type="password"] {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    font-family: inherit;
}

.simple-content .input input[type="text"]:focus,
.simple-content .input input[type="tel"]:focus,
.simple-content .input input[type="email"]:focus,
.simple-content .input input[type="password"]:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.simple-content .input input.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    appearance: none;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.simple-content .input input.form-control:focus {
    color: #212529;
    background-color: #fff;
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Чекбокс и его label */
.simple-content .checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 8px;
}

.simple-content .checkbox input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.simple-content .checkbox label {
    margin: 0;
    font-weight: 400;
    cursor: pointer;
}

/* Кнопки */
.simple-content button[type="submit"],
.simple-content .btn {
    width: 100%;
    padding: 12px 20px;
    background-color: #0d6efd;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
    font-family: inherit;
}

.simple-content button[type="submit"]:hover,
.simple-content .btn:hover {
    background-color: #0b5ed7;
}

.simple-content button[type="submit"]:active,
.simple-content .btn:active {
    background-color: #0a58ca;
}

.simple-content .btn-primary {
    background-color: #0d6efd;
    color: #fff;
}

.simple-content .btn-primary:hover {
    background-color: #0b5ed7;
    color: #fff;
}

.simple-content .btn-primary:active {
    background-color: #0a58ca;
    color: #fff;
}

/* Адаптивные колонки */
@media (max-width: 767.98px) {
    .col-md-6, .col-md-4, .col-md-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Заголовок страницы по спецификации Adaptive_H1.md */
.page-header {
    background: linear-gradient(180deg,
        #E5E7EB 0%,      /* Светло-серый сверху */
        #F9FAFB 50%,     /* Очень светлый серый посередине */
        #FFFFFF 100%     /* Белый снизу */
    );
    border-bottom: 2px solid #D1D5DB;
    padding: 41px 20px;  /* Уменьшено на 15% от 48px 24px */
    width: 100%;
    margin: 0;
    flex-shrink: 0;
}

.page-header__container {
    max-width: 800px;
    margin: 0 auto;
}

.page-header__title {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
    margin: 0 0 8px 0;
}

.page-header__subtitle {
    font-size: 15px;
    font-weight: 400;
    color: #6B7280;
    line-height: 1.5;
    margin: 0;
}

/* Mobile адаптация */
@media (max-width: 640px) {
    .page-header {
        padding: 27px 14px;  /* Уменьшено на 15% от 32px 16px */
    }

    .page-header__title {
        font-size: 24px;
    }

    .page-header__subtitle {
        font-size: 14px;
    }
}

