@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,400;14..32,500;14..32,600&display=swap');

:root {
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.4);
    --transition-fast: 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Inter', sans-serif;
    background: #0a0a14;
    color: #e0e0e0;
    overflow-x: hidden;
}

/* Анимированный фон с эффектом воды */
body::before {
    content: "";
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 20% 50%, rgba(0, 180, 255, 0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 20%, rgba(200, 0, 255, 0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 40% 80%, rgba(0, 255, 200, 0.06) 0%, transparent 50%);
    animation: waterMove 20s infinite alternate ease-in-out;
    z-index: -1;
}
@keyframes waterMove {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-2%, -1%) scale(1.02); }
    100% { transform: translate(2%, 1%) scale(0.98); }
}

/* Обёртка для плашек – без сдвига при наведении */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    border: 1px solid var(--glass-border);
    border-radius: 1.4rem;
    box-shadow: var(--shadow-soft);
    transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.glass-card:hover {
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 180, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.18);
    /* transform: translateY(-4px);  <-- убрано, чтобы не было прыжков */
}

/* Таблицы */
.table-dark-glass {
    --bs-table-bg: transparent !important;
    --bs-table-color: #e0e0e0;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
    border-radius: 1rem;
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}
.table-dark-glass th,
.table-dark-glass td {
    background-color: transparent !important;
    color: #e0e0e0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.9rem 1rem;
    vertical-align: middle;
}
.table-dark-glass thead th {
    background-color: rgba(255, 255, 255, 0.06) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    color: #ccc;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.6px;
}
.table-dark-glass tbody tr {
    transition: background 0.2s;
}
.table-dark-glass tbody tr:hover {
    background: rgba(255, 255, 255, 0.06) !important;
}
.table-danger td {
    background-color: rgba(220, 53, 69, 0.25) !important;
}

/* Кнопки */
.btn {
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    font-weight: 500;
}
.btn:active {
    transform: scale(0.96);
}
.btn-outline-light {
    border-color: rgba(255,255,255,0.3);
}
.btn-outline-light:hover {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.25);
    background: rgba(255,255,255,0.08);
}

/* Навигация */
.navbar {
    backdrop-filter: blur(16px);
    background: rgba(0, 0, 0, 0.4) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Модальные окна */
.modal-content.glass-card {
    background: rgba(10, 10, 22, 0.88);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Toast */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
}
.toast {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.8rem;
    color: #fff;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6);
    animation: slideInRight 0.4s ease-out;
}
.toast-header {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}
.toast-body {
    font-weight: 500;
}
.toast-success {
    background: rgba(25, 135, 84, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.3);
}

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

/* Скроллбар */
::-webkit-scrollbar {
    width: 7px;
}
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* Адаптив */
@media (max-width: 768px) {
    .glass-card {
        padding: 1.5rem !important;
    }
    .table-dark-glass th,
    .table-dark-glass td {
        padding: 0.6rem 0.5rem;
    }
}

/* Дополнительные утилитарные классы */
.opacity-40 {
    opacity: 0.4;
}
.text-emerald {
    color: #34d399 !important;
}
/* Кнопки с акцентами */
.btn-emerald {
    background-color: #059669;
    border-color: #059669;
    color: white;
}
.btn-emerald:hover {
    background-color: #047857;
}
.btn-cyan {
    background-color: #0891b2;
    border-color: #0891b2;
    color: white;
}
.btn-cyan:hover {
    background-color: #0e7490;
}
.btn-amber {
    background-color: #d97706;
    border-color: #d97706;
    color: white;
}
.btn-amber:hover {
    background-color: #b45309;
}

/* Цветные кнопки истории аттестаций */
.btn-history-green {
    background-color: #198754;
    border-color: #198754;
    color: white;
}
.btn-history-green:hover {
    background-color: #157347;
}

.btn-history-blue {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}
.btn-history-blue:hover {
    background-color: #0b5ed7;
}

.btn-history-purple {
    background-color: #6f42c1;
    border-color: #6f42c1;
    color: white;
}
.btn-history-purple:hover {
    background-color: #5e36a6;
}

.btn-history-orange {
    background-color: #fd7e14;
    border-color: #fd7e14;
    color: white;
}
.btn-history-orange:hover {
    background-color: #e96b02;
}

/* ===== Modern Glassmorphic Buttons ===== */

.btn-glass {
    position: relative;
    overflow: hidden;
    border: none;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.btn-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-glass:hover::before {
    left: 100%;
}

/* Primary Glass Button */
.btn-glass-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-glass-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    color: white;
}

/* Success Glass Button */
.btn-glass-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-glass-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    color: white;
}

/* Danger Glass Button */
.btn-glass-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-glass-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
    color: white;
}

/* Info Glass Button */
.btn-glass-info {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.btn-glass-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4);
    color: white;
}

/* Warning Glass Button */
.btn-glass-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-glass-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
    color: white;
}

/* Secondary Glass Button */
.btn-glass-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.3);
}

.btn-glass-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 114, 128, 0.4);
    color: white;
}

/* Outline Glass Buttons */
.btn-glass-outline-primary {
    background: transparent;
    border: 2px solid #6366f1;
    color: #6366f1;
}

.btn-glass-outline-primary:hover {
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.2);
}

.btn-glass-outline-success {
    background: transparent;
    border: 2px solid #10b981;
    color: #10b981;
}

.btn-glass-outline-success:hover {
    background: rgba(16, 185, 129, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.2);
}

.btn-glass-outline-danger {
    background: transparent;
    border: 2px solid #ef4444;
    color: #ef4444;
}

.btn-glass-outline-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.2);
}

/* Ripple Effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Icon Button */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-icon i {
    font-size: 1.1em;
}

.table-primary td {
    background-color: rgba(59, 130, 246, 0.2) !important;
}
.table-success td {
    background-color: rgba(34, 197, 94, 0.2) !important;
}
.table-danger td {
    background-color: rgba(239, 68, 68, 0.2) !important;
}
