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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    min-height: 100vh;
    background: #f5f7fa;
    position: relative;
    overflow-x: hidden;
}

body::before {
    display: none;
}

@keyframes backgroundShift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, -20px) scale(1.1); }
}

.container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.glass-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e0e7ef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    color: #005bff;
    text-align: center;
    margin-bottom: 10px;
    font-size: 2.5rem;
    font-weight: 700;
}

.subtitle {
    color: #6b7280;
    text-align: center;
    margin-bottom: 30px;
    font-size: 1rem;
}

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

label {
    display: block;
    color: #374151;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #111827;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input::placeholder {
    color: #9ca3af;
}

input:focus {
    outline: none;
    border-color: #005bff;
    box-shadow: 0 0 0 3px rgba(0, 91, 255, 0.1);
}

.btn {
    width: 100%;
    padding: 14px;
    background: #005bff;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn:hover {
    background: #0047cc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 91, 255, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: #005bff;
}

.btn-secondary {
    background: #ffffff;
    color: #005bff;
    border: 1px solid #005bff;
    margin-top: 15px;
}

.btn-secondary:hover {
    background: #f0f5ff;
    color: #0047cc;
    border-color: #0047cc;
}

.links {
    text-align: center;
    margin-top: 20px;
    color: #6b7280;
    font-size: 0.9rem;
}

.links a {
    color: #005bff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.links a:hover {
    border-bottom-color: #005bff;
}

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-error {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #dc2626;
}

.alert-success {
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    color: #059669;
}

.home-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.home-buttons .btn {
    margin-top: 0;
}

/* Dashboard Styles */
.dashboard-container {
    max-width: 1400px !important;
    padding: 30px !important;
    background: #f5f7fa !important;
}

.dashboard-section {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e0e7ef;
    padding: 25px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dashboard-section:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.dashboard-section h2 {
    color: #111827;
    font-size: 1.5rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-section h2::before {
    font-size: 1.3rem;
}

.dashboard-section:nth-of-type(1) h2::before { content: '⚡'; }
.dashboard-section:nth-of-type(2) h2::before { content: '⚙️'; }
.dashboard-section:nth-of-type(3) h2::before { content: '📋'; }
.dashboard-section:nth-of-type(4) h2::before { content: '📝'; }

.status-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #e5e7eb;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    animation: pulse 2s infinite;
}

.status-indicator.waiting {
    background: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.status-indicator.running {
    background: #3b82f6;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
    animation: pulse 1s infinite;
}

.status-indicator.error {
    background: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-info {
    flex: 1;
}

.status-label {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.status-value {
    color: #111827;
    font-size: 1.1rem;
    font-weight: 600;
}

.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-action {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-action.primary {
    background: #005bff;
    color: #fff;
}

.btn-action.primary:hover:not(:disabled) {
    background: #0047cc;
}

.btn-action.secondary {
    background: #ffffff;
    color: #005bff;
    border: 1px solid #005bff;
}

.btn-action.secondary:hover:not(:disabled) {
    background: #f0f5ff;
    color: #0047cc;
    border-color: #0047cc;
}

.btn-action:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.settings-group {
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.settings-group h3 {
    color: #111827;
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.settings-group label {
    display: block;
    color: #374151;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.settings-group input,
.settings-group select {
    width: 100%;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #111827;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.settings-group input:focus,
.settings-group select:focus {
    outline: none;
    border-color: #005bff;
    box-shadow: 0 0 0 3px rgba(0, 91, 255, 0.1);
}

.settings-group select option {
    background: #ffffff;
    color: #111827;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.history-table thead {
    background: #f9fafb;
}

.history-table th {
    padding: 12px;
    text-align: left;
    color: #374151;
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 1px solid #e5e7eb;
}

.history-table td {
    padding: 12px;
    color: #111827;
    border-top: 1px solid #f3f4f6;
    font-size: 0.9rem;
}

.history-table tr:hover {
    background: #f9fafb;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge.success {
    background: rgba(16, 185, 129, 0.3);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.5);
}

.status-badge.error {
    background: rgba(239, 68, 68, 0.3);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.5);
}

.logs-container {
    background: #1f2937;
    border-radius: 8px;
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    border: 1px solid #374151;
}

.logs-container pre {
    margin: 0;
    color: #10b981;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 15px;
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
}

.message.success {
    background: #d1fae5;
    color: #059669;
    border: 1px solid #6ee7b7;
}

.message.error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

.empty-state::before {
    content: '📭';
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUpModal 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUpModal {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid #e5e7eb;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

.modal-header h2 {
    color: #005bff;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #dc2626;
}

.modal-body {
    padding: 25px;
}

@media (max-width: 480px) {
    .glass-card {
        padding: 30px 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-action {
        width: 100%;
    }
}
