/* ========================================
   MAIN CUSTOM STYLES
   Updated with modern design
======================================== */

/* ========================================
   ЦЕНТРИРОВАНИЕ ЛОГИНА
======================================== */
.login-center-position {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

/* Анимированный фон */
.login-center-position::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: backgroundMove 20s linear infinite;
    z-index: 0;
}

@keyframes backgroundMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

/* Форма логина */
.login-center-position > * {
    position: relative;
    z-index: 1;
}

.login-form-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    min-width: 400px;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   ОБЩИЙ LAYOUT
======================================== */
.app-layout-canvas {
    min-height: 100vh;
    background: linear-gradient(to bottom, #f9fafb 0%, #ffffff 100%);
}

.app-layout-container {
    position: relative;
    min-height: 100vh;
}

/* ========================================
   КОНТЕНТ
======================================== */
.content {
    padding: 24px;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ========================================
   ХЕДЕР
======================================== */
/* Стили удалены, чтобы не конфликтовать с app.css */

/* ========================================
   ТАБЛИЦЫ
======================================== */
table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

table thead {
    background: linear-gradient(to bottom, #f9fafb 0%, #f3f4f6 100%);
}

table thead th {
    padding: 16px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: #6b7280;
    border-bottom: 2px solid #e5e7eb;
}

table tbody tr {
    transition: all 0.2s ease;
}

table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
    transform: scale(1.01);
}

table tbody td {
    padding: 16px;
    border-bottom: 1px solid #f3f4f6;
}

/* ========================================
   ФОРМЫ
======================================== */
.form-control {
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    /*padding: 12px 16px;*/
    transition: all 0.3s ease;
    font-size: 14px;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.form-group {
    margin-bottom: 20px;
}

label {
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    color: #374151;
    font-size: 14px;
}

/* ========================================
   МОДАЛЬНЫЕ ОКНА
======================================== */
.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    border-radius: 16px 16px 0 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 20px 24px;
    border-bottom: none;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    border-top: 1px solid #f3f4f6;
    padding: 20px 24px;
    border-radius: 0 0 16px 16px;
}

/* ========================================
   АЛЕРТЫ
======================================== */
.alert {
    border-radius: 12px;
    padding: 16px 20px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 16px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: linear-gradient(135deg, rgba(17, 153, 142, 0.1) 0%, rgba(56, 239, 125, 0.1) 100%);
    color: #047857;
    border-left: 4px solid #10b981;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(235, 51, 73, 0.1) 0%, rgba(244, 92, 67, 0.1) 100%);
    color: #dc2626;
    border-left: 4px solid #ef4444;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(242, 153, 74, 0.1) 0%, rgba(242, 201, 76, 0.1) 100%);
    color: #d97706;
    border-left: 4px solid #f59e0b;
}

.alert-info {
    background: linear-gradient(135deg, rgba(33, 147, 176, 0.1) 0%, rgba(109, 213, 237, 0.1) 100%);
    color: #0369a1;
    border-left: 4px solid #0ea5e9;
}

/* ========================================
   ПАГИНАЦИЯ
======================================== */
.pagination {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pagination li a,
.pagination li span {
    display: block;
    padding: 8px 14px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #374151;
    transition: all 0.2s ease;
    font-weight: 500;
}

.pagination li a:hover {
    background: #667eea;
    color: #ffffff;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
}

.pagination li.active a,
.pagination li.active span {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.pagination li.disabled a,
.pagination li.disabled span {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   ДРОПДАУНЫ
======================================== */
.dropdown-menu {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 8px;
    margin-top: 8px;
    animation: fadeInDown 0.2s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    border-radius: 8px;
    padding: 10px 16px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.dropdown-item:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

/* ========================================
   ИКОНКИ
======================================== */
.fa, .ion {
    transition: transform 0.2s ease;
}

a:hover .fa,
a:hover .ion {
    transform: scale(1.1);
}

/* ========================================
   ЗАГРУЗЧИК
======================================== */
.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(102, 126, 234, 0.1);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   АДАПТИВНОСТЬ
======================================== */
@media (max-width: 991px) {
    .content {
        padding: 16px;
    }

    .login-form-container {
        min-width: auto;
        width: 90%;
        max-width: 400px;
        padding: 30px;
    }
}

@media (max-width: 767px) {
    .content {
        padding: 12px;
    }

    .login-form-container {
        padding: 24px;
    }

    table thead th {
        padding: 12px 8px;
        font-size: 0.7rem;
    }

    table tbody td {
        padding: 12px 8px;
        font-size: 0.875rem;
    }
}

@media (max-width: 576px) {
    .login-form-container {
        padding: 20px;
        min-width: auto;
        width: 95%;
    }

    .modal-content {
        border-radius: 12px;
    }

    .modal-header,
    .modal-footer {
        padding: 16px;
    }
}

/* ========================================
   УТИЛИТЫ
======================================== */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-sm {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.shadow {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.shadow-lg {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* ========================================
   СКРОЛЛ
======================================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f3f4f6;
}

::-webkit-scrollbar-thumb {
    background: #9ca3af;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* ========================================
   ПЕЧАТЬ
======================================== */
@media print {
    .app-layout-drawer {
        display: none;
    }

    .content {
        padding: 0;
    }

    .card {
        page-break-inside: avoid;
    }
}