:root {
    --bg: #0a0a0c;
    --card: #121215;
    --text: #ffffff;
    --text-light: #b3b3b3;
    --border: #2d2d30;
    --primary: #ff5f7e;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(0,0,0,0.3);
    --glow: 0 0 15px rgba(255, 95, 126, 0.4);
}
* {
    margin: 0; padding: 0; box-sizing: border-box;
}
body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--bg) 0%, #0a0a0c 100%);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.6;
    padding: 24px;
    max-width: 1000px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}
.auth-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 60px);
    gap: 24px;
    padding-bottom: 60px;
    position: relative;
    overflow: hidden;
}
.auth-screen > * {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}
.auth-screen > *:nth-child(1) {
    animation-delay: 0.1s;
}
.auth-screen > *:nth-child(2) {
    animation-delay: 0.2s;
}
.auth-screen > *:nth-child(3) {
    animation-delay: 0.3s;
}
.auth-screen > *:nth-child(4) {
    animation-delay: 0.4s;
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 16px;
    color: var(--text-light);
    font-size: 13px;
    background: rgba(10, 10, 12, 0.8);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    z-index: 100;
}
.main-app {
    padding-bottom: 60px;
    display: none;
}
.auth-header {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}
.auth-subheader {
    color: var(--text-light);
    max-width: 600px;
    text-align: center;
}
.auth-input {
    width: 100%;
    max-width: 300px;
    padding: 12px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 14px;
    font-family: monospace;
    outline: none;
    transition: all 0.3s ease;
}
.auth-input:focus {
    border-color: var(--primary);
    box-shadow: var(--glow);
}
.btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 95, 126, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 95, 126, 0.4);
}
.btn-primary:active {
    transform: translateY(0);
}
.btn-success {
    background: var(--success-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}
.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}
.btn-danger {
    background: var(--danger-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}
.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text);
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    transform: translateY(-1px);
}
.main-app {
    display: none;
    flex: 1;
    flex-direction: column;
}
.main-app[style*="display: flex"],
.main-app[style*="display:block"] {
    display: flex !important;
}
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
header .nav-tab {
    border: 1px solid var(--border);
    background: transparent;
}
header .nav-tab:hover {
    background: rgba(255, 255, 255, 0.05);
}
header .nav-tab.active {
    background: rgba(255, 95, 126, 0.15);
    border-color: var(--primary);
}
header .nav-tab.active::after {
    display: none; /* Убираем подчеркивание для кнопок в header */
}
h1 {
    font-weight: 700;
    font-size: 28px;
    color: var(--text);
    letter-spacing: -0.5px;
}
.nav-tabs {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}
.nav-tab {
    padding: 10px 18px;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    border-radius: var(--radius);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.nav-tab:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
}
.nav-tab.active {
    color: var(--primary);
    background: rgba(255, 95, 126, 0.15);
    font-weight: 600;
}
.nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 18px;
    right: 18px;
    height: 2px;
    background: var(--primary-gradient);
    border-radius: 2px;
}
.section {
    display: none;
}
.section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}
.section.active > * {
    animation: slideInUp 0.4s ease forwards;
    opacity: 0;
}
.section.active > *:nth-child(1) {
    animation-delay: 0.1s;
}
.section.active > *:nth-child(2) {
    animation-delay: 0.2s;
}
.section.active > *:nth-child(3) {
    animation-delay: 0.3s;
}
.section.active > *:nth-child(4) {
    animation-delay: 0.4s;
}
.section.active > *:nth-child(5) {
    animation-delay: 0.5s;
}
.section.active > *:nth-child(6) {
    animation-delay: 0.6s;
}
.section.active > *:nth-child(7) {
    animation-delay: 0.7s;
}
.section.active > *:nth-child(8) {
    animation-delay: 0.8s;
}
@keyframes fadeIn {
    from { opacity: 0; } to { opacity: 1; }
}
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.chart-container {
    position: relative;
    width: 100%;
    height: 300px;
}
.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}
.card:hover {
    box-shadow: var(--shadow-hover);
    border-color: rgba(255, 95, 126, 0.2);
}
.card h2 {
    font-size: 20px;
    margin-bottom: 20px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(26, 26, 31, 0.6);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}
.form-control:hover {
    border-color: rgba(255, 95, 126, 0.3);
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 95, 126, 0.1), var(--glow);
    background: rgba(26, 26, 31, 0.8);
}
.output {
    background: #1e1e21;
    padding: 12px;
    border-radius: var(--radius);
    font-family: monospace;
    font-size: 13px;
    white-space: pre-wrap;
    overflow-x: auto;
    margin-top: 12px;
    border: 1px solid var(--border);
}
.table-responsive {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
th {
    font-weight: 600;
    color: var(--text-light);
    font-size: 13px;
}
tr {
    transition: all 0.2s ease;
}
tr:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(2px);
}
.status-good { color: var(--success); }
.status-bad { color: var(--danger); }
.status-rebrute { color: var(--warning); }
.status-assigned { color: var(--info); }
.footer {
    margin-top: auto;
    text-align: center;
    color: var(--text-light);
    font-size: 13px;
    padding: 20px 0;
    border-top: 1px solid var(--border);
}
@keyframes swipeLeft {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-100%);
        opacity: 0;
    }
}
.swipe-left-out {
    animation: swipeLeft 0.4s ease-out forwards;
}
@keyframes swipeRight {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}
.swipe-right-out {
    animation: swipeRight 0.4s ease-out forwards;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.skeleton-loader {
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: var(--radius);
}
@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.preloader-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
}
.skeleton-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    border: 1px solid var(--border);
}
.skeleton-line {
    height: 16px;
    margin-bottom: 12px;
    border-radius: 4px;
}
.skeleton-line:last-child {
    margin-bottom: 0;
}
.skeleton-line.short {
    width: 60%;
}
.skeleton-line.medium {
    width: 80%;
}
.skeleton-line.long {
    width: 100%;
}
.skeleton-button {
    height: 36px;
    width: 120px;
    border-radius: var(--radius);
    margin-top: 8px;
}
.skeleton-table {
    width: 100%;
}
.skeleton-table-row {
    height: 48px;
    margin-bottom: 8px;
    border-radius: 4px;
}
.skeleton-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    flex-direction: column;
    gap: 16px;
}
.skeleton-spinner-circle {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 95, 126, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.skeleton-spinner-text {
    color: var(--text-light);
    font-size: 14px;
}
/* Drag & Drop стили для менеджера серверов */
.server-container {
    background: var(--card);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    min-height: 120px;
    transition: all 0.3s ease;
}
.server-container.drag-over {
    border-color: var(--primary);
    background: rgba(255, 95, 126, 0.1);
    border-style: solid;
}
.server-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.server-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text);
}
.server-url {
    font-family: monospace;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}
.software-item {
    display: inline-block;
    background: rgba(255, 95, 126, 0.15);
    border: 1px solid rgba(255, 95, 126, 0.3);
    border-radius: 6px;
    padding: 6px 12px;
    margin: 4px;
    font-size: 12px;
    cursor: move;
    user-select: none;
    transition: all 0.2s ease;
}
.software-item:hover {
    background: rgba(255, 95, 126, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(255, 95, 126, 0.3);
}
.software-item.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}
.server-software-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 40px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
}
.server-software-list.empty {
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 12px;
}
.available-software-item {
    display: inline-block;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 6px;
    padding: 6px 12px;
    margin: 4px;
    font-size: 12px;
    cursor: move;
    user-select: none;
    transition: all 0.2s ease;
}
.available-software-item:hover {
    background: rgba(59, 130, 246, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}
.available-software-item.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}
/* Стили для уведомлений */
.notification-icon {
    position: relative;
    cursor: pointer;
    padding: 8px 12px;
    font-size: 18px;
    transition: all 0.3s ease;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}
.notification-icon:hover {
    background: rgba(255, 255, 255, 0.05);
}
.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--danger);
    color: white;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    padding: 0 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.notification-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 320px;
    max-width: 400px;
    max-height: 500px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}
.notification-dropdown.show {
    display: block;
    animation: fadeIn 0.2s ease;
}
.notification-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.notification-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}
.notification-clear {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}
.notification-clear:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}
.notification-list {
    padding: 8px;
}
.notification-item {
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border-left: 3px solid var(--danger);
    cursor: pointer;
    transition: all 0.2s ease;
}
.notification-item:hover {
    background: rgba(255, 255, 255, 0.05);
}
.notification-item.read {
    opacity: 0.6;
    border-left-color: var(--border);
}
.notification-title {
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--text);
}
.notification-message {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.4;
}
.notification-time {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 6px;
    opacity: 0.7;
}
.notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
}
@media (max-width: 768px) {
    body { padding: 16px; }
    .auth-input { width: 260px; }
    .card { padding: 16px; }
    .notification-dropdown {
        min-width: 280px;
        max-width: 90vw;
    }
}
