:root {
    --bg-dark: #1E1E1E;
    --bg-darker: #2b2b2b;
    --text-primary: #FFFFFF;
    --text-secondary: #92928F;
    --status-active: #50CD89;
}

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

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body.authenticated {
    display: block;
}

.login-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-dark);
}

.login-container {
    background-color: #2D2D2D;
    width: 400px;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header h1 {
    color: #FFFFFF;
    font-size: 24px;
    font-weight: 500;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-control {
    background-color: #808080;
    border: none;
    border-radius: 4px;
    height: 40px;
    padding: 0 16px;
    color: #FFFFFF;
    font-size: 14px;
}

.form-control::placeholder {
    color: #FFFFFF;
    opacity: 1;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #4CAF50;
}

.remember-me label {
    color: #808080;
    font-size: 14px;
}

.btn-signin {
    background-color: #4CAF50;
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    height: 40px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-signin:hover {
    background-color: #45a049;
}

.login-footer {
    margin-top: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.forgot-password,
.signup-link {
    color: #2196F3;
    text-decoration: none;
    font-size: 14px;
}

.forgot-password:hover,
.signup-link:hover {
    text-decoration: underline;
}

.sidebar {
    width: 265px;
    background-color: var(--bg-dark);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    padding: 1rem 0;
    text-align: left;
    margin-bottom: 2rem;
}

.logo h1 {
    font-size: 1.25rem;
    color: var(--text-primary);
    font-weight: 600;
}

.nav-menu {
    list-style: none;
}

.nav-menu li {
    margin-bottom: 0.5rem;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    border-radius: 6px;
    transition: all 0.3s;
    font-size: 0.875rem;
}

.nav-menu a:hover, .nav-menu a.active {
    background-color: var(--primary);
    color: var(--text-primary);
}

.nav-menu a i {
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

.content {
    flex: 1;
    margin-left: 265px;
    padding: 2rem;
    background-color: var(--bg-light);
}

.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.server-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.server-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.server-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.active {
    background-color: var(--status-active);
    color: white;
}

.status-badge.offline {
    background-color: #808080;
    color: white;
}

.status-badge.warning {
    background-color: var(--warning);
    color: var(--text-primary);
}

.status-badge.error {
    background-color: var(--error);
    color: var(--text-primary);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.metric-card {
    background: var(--metric-bg);
    border-radius: 8px;
    padding: 1rem;
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.metric-title {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.metric-value {
    font-size: 1.25rem;
    font-weight: 600;
}

.metric-value.critical {
    color: var(--error);
}

.chart-container {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    margin-top: auto;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info span {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.logout-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0.5rem;
    transition: color 0.3s;
}

.logout-btn:hover {
    color: var(--text-primary);
}

.dashboard {
    padding: 0 20px 20px 20px;
    background-color: #1E1E1E;
    min-height: 100vh;
}

.top-bar {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: #1E1E1E;
}

.title {
    color: #FFFFFF;
    font-size: 20px;
}

.controls {
    display: flex;
    gap: 30px;
    align-items: center;
}

.search-input {
    background-color: #2D2D2D;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    color: #FFFFFF;
    min-width: 200px;
}

.status-select {
    background-color: #2D2D2D;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    color: #FFFFFF;
    min-width: 120px;
    text-align: center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 32px;
}

.status-select option {
    text-align: left;
    background-color: #2D2D2D;
    color: #FFFFFF;
}

.status-select::-ms-expand {
    display: none;
}

.username {
    color: #808080;
    margin-right: 10px;
}

.logout-btn {
    background-color: #2D2D2D;
    border: 1px solid #4CAF50;
    border-radius: 4px;
    padding: 8px 16px;
    color: #FFFFFF;
    cursor: pointer;
    transition: background-color 0.2s;
}

.logout-btn:hover {
    background-color: #4CAF50;
}

.server-section h2 {
    color: #FFFFFF;
    font-size: 20px;
    margin: 40px 0 30px;
}

.server-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    padding-top: 10px;
}

.server-card {
    background-color: #2D2D2D;
    border-radius: 8px;
    padding: 20px;
    width: 100%;
}

.server-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.server-name {
    color: var(--text-primary);
    font-weight: 500;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.status-badge.active {
    background-color: var(--status-active);
    color: white;
}

.server-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.metric {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.metric span:first-child {
    color: var(--text-secondary);
    font-size: 14px;
}

.metric .value {
    color: var(--text-primary);
    font-size: 16px;
}

.server-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.server-footer span {
    color: var(--text-secondary);
    font-size: 14px;
}

.server-footer a {
    color: #2196F3;
    text-decoration: none;
    font-size: 14px;
}

.error-message {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
    text-align: center;
}

.message {
    color: #FFFFFF;
    text-align: center;
    margin-bottom: 20px;
}

.message p {
    margin-bottom: 10px;
}

.dashboard-container {
    padding: 20px;
    background-color: #1E1E1E;
    min-height: 100vh;
}

.dashboard-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.server-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.server-info h1 {
    color: #FFFFFF;
    margin: 0;
    font-size: 24px;
}

.server-meta {
    display: flex;
    gap: 30px;
}

.meta-item {
    display: flex;
    gap: 8px;
}

.meta-item .label {
    color: #808080;
}

.meta-item .value {
    color: #FFFFFF;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.chart-card {
    background-color: #2D2D2D;
    border-radius: 8px;
    padding: 20px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.chart-header h3 {
    color: #FFFFFF;
    margin: 0;
    font-size: 16px;
}

.current-value {
    color: #4CAF50;
    font-size: 14px;
    font-weight: 500;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.status-badge.active {
    background-color: #4CAF50;
    color: #FFFFFF;
}

.status-badge.warning {
    background-color: #FFC107;
    color: #000000;
}

.status-badge.error {
    background-color: #DC3545;
    color: #FFFFFF;
}


@media (max-width: 1200px) {
    .chart-grid {
        grid-template-columns: 1fr;
    }
    
    .server-meta {
        flex-direction: column;
        gap: 10px;
    }
}

.metrics-row {
    display: grid;
    grid-template-columns: repeat(4, 430px);
    gap: 20px;
    padding: 0;
    margin-top: 20px;
}

.metric-box {
    background-color: #2B2B2B;
    border-radius: 8px;
    border: 1px solid rgb(77, 76, 76);
    padding: 20px;
    height: 160px;
    display: flex;
    flex-direction: column;
}

.metric-box canvas {
    width: 100% !important;
    height: 30px !important;
    margin-top: auto;
}

.metric-box h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
}

.metric-box .current-value {
    font-size: 30px;
    margin: 0 0 5px 0;
}

.metric-box .time-period {
    font-size: 12px;
    margin-top: 5px;
}

.charts-row {
    display: grid;
    grid-template-columns: repeat(2, 900px);
    gap: 20px;
    padding: 0;
    margin-top: 20px;
}

.large-chart-box {
    background-color: #2B2B2B;
    border-radius: 8px;
    border: 1px solid rgb(77, 76, 76);
    padding: 20px;
    height: 340px;
}

.large-chart-box h3 {
    color: #FFFFFF;
    font-size: 14px;
    margin: 0 0 15px 0;
}

.bottom-row {
    display: grid;
    grid-template-columns: 910px 580px 280px;
    gap: 20px;
    padding: 0;
    margin-top: 20px;
}

.network-chart-box {
    background-color: #2B2B2B;
    border-radius: 8px;
    border: 1px solid rgb(77, 76, 76);
    padding: 20px;
    height: 340px;
    width: 890px;
}

.network-chart-box h3 {
    color: #FFFFFF;
    font-size: 14px;
    margin: 0 0 15px 0;
}

.alerts-box {
    background-color: #2B2B2B;
    border-radius: 8px;
    padding: 20px;
    height: 340px; 
}

.alerts-box h3 {
    color: #FFFFFF;
    font-size: 14px;
    margin: 0 0 15px 0;
}

.alerts-table {
    width: 100%;
}

.alerts-table table {
    width: 100%;
    border-collapse: collapse;
}

.alerts-table th,
.alerts-table td {
    padding: 8px;
    text-align: left;
    font-size: 12px;
    color: #FFFFFF;
}

.level {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.level.error { background-color: #DC3545; }
.level.warning { background-color: #FFC107; color: #000000; }
.level.success { background-color: #28A745; }
.level.info { background-color: #17A2B8; }

.status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.status.active { background-color: #DC3545; }
.status.resolved { background-color: #28A745; }

.system-info-box {
    background-color: #2B2B2B;
    border-radius: 8px;
    padding: 20px;
    height: 340px;
}

.system-info-box h3 {
    color: #FFFFFF;
    font-size: 14px;
    margin: 0 0 15px 0;
}

.info-item {
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-item .label {
    color: #A3A3A3;
    font-size: 14px;
}

.info-item .value {
    color: #FFFFFF;
    font-size: 15px;
}

canvas {
    width: 100% !important;
}

.right-column {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.disk-box-content {
    display: flex;
    align-items: center;
    height: calc(100% - 30px);
}

.disk-chart-container {
    width: 120px;
    height: 120px;
}

.disk-info {
    margin-left: 20px;
}

.metric-box, 
.large-chart-box, 
.network-chart-box, 
.alerts-box, 
.system-info-box {
    background-color: #2B2B2B;
    border-radius: 8px;
    border: 1px solid rgb(77, 76, 76);
}

.servers-content-wrapper {
    margin: 0 30px 0 50px;
}

.content-wrapper {
    margin: 0;
    padding: 0 20px;
}

.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.large-chart-box canvas,
.network-chart-box canvas {
    width: 100% !important;
    height: calc(100% - 55px) !important;
    margin-top: 15px;
}


.metric-box.disk-space {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.disk-space h3 {
    margin: 0 0 10px 0;
}

.disk-space .current-value {
    font-size: 30px;
    margin: 0;
    color: #FFFFFF;
}

.disk-space .total-space {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}

.disk-space-chart {
    position: absolute;
    right: 20px;
    top: 50%; 
    transform: translateY(-50%);
    width: 100px !important;
    height: 100px !important;
}

/* Адаптивный дизайн для страницы сервера */
@media (max-width: 1920px) {
    .metrics-row {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }

    .charts-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .bottom-row {
        grid-template-columns: 2fr 1.5fr 1fr;
        gap: 15px;
    }

    .network-chart-box {
        width: auto;
        height: 340px;
    }

    .network-chart-box canvas {
        height: calc(100% - 55px) !important;
    }
}

@media (max-width: 1440px) {
    .metrics-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .charts-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .bottom-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .network-chart-box {
        width: auto;
        height: 340px;
    }

    .network-chart-box canvas {
        height: calc(100% - 55px) !important;
    }
}

@media (max-width: 768px) {
    .metrics-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .metric-box {
        height: auto;
        min-height: 140px;
    }

    .content-wrapper {
        padding: 10px;
    }

    .top-bar {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }

    .controls {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .search-input,
    .status-select {
        width: 100%;
    }

    .username {
        text-align: center;
    }

    .logout-btn {
        width: 100%;
    }

    .network-chart-box {
        height: 300px;
    }

    .network-chart-box canvas {
        height: calc(100% - 55px) !important;
    }
}

@media (max-width: 480px) {
    .metric-box .current-value {
        font-size: 24px;
    }

    .alerts-table th,
    .alerts-table td {
        padding: 6px;
        font-size: 11px;
    }

    .info-item {
        flex-direction: column;
        gap: 5px;
    }

    .info-item .label,
    .info-item .value {
        font-size: 12px;
    }

    .network-chart-box {
        height: 250px;
    }

    .network-chart-box canvas {
        height: calc(100% - 55px) !important;
    }
}

.back-btn {
    color: var(--text-primary);
    text-decoration: none;
    padding: 5px 14px;
    background-color: #2D2D2D;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    margin-right: 7px;
}

.back-btn:hover {
    background-color: #383838;
    border-color: rgba(255, 255, 255, 0.2);
}

.back-btn::before {
    content: "←";
    margin-right: 8px;
    font-size: 16px;
}

/* Стили для управления серверами Timeweb Cloud */
.server-controls {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #444;
}

.control-buttons {
    display: flex;
    gap: 5px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.control-buttons .btn {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 28px;
}

.control-buttons .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.control-buttons .btn-sm {
    font-size: 11px;
    padding: 3px 6px;
    min-width: 28px;
    height: 24px;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.server-info {
    font-size: 11px;
    color: #888;
    line-height: 1.3;
}

.server-info small {
    font-size: 10px;
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

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

.modal-dialog {
    background-color: #2D2D2D;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content {
    border-radius: 8px;
    overflow: hidden;
}

.modal-header {
    background-color: #3D3D3D;
    padding: 15px 20px;
    border-bottom: 1px solid #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.modal-header .close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-header .close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
    color: var(--text-primary);
}

.modal-footer {
    background-color: #3D3D3D;
    padding: 15px 20px;
    border-top: 1px solid #444;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-primary);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    background-color: #444;
    border: 1px solid #555;
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.form-control::placeholder {
    color: #888;
}

/* Уведомления */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    z-index: 9999;
    max-width: 300px;
    word-wrap: break-word;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
}

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

.notification-success {
    background-color: #28a745;
}

.notification-error {
    background-color: #dc3545;
}

.notification-info {
    background-color: #007bff;
}

/* Дополнительные responsive стили для управления серверами */
@media (max-width: 768px) {
    .control-buttons {
        justify-content: center;
    }
    
    .modal-dialog {
        width: 95%;
        margin: 10px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
        margin-bottom: 5px;
    }
}

/* Стили для секции Cloud */
.server-section h2 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #444;
    font-family: inherit;
}

/* Стили для серверов Cloud - в стиле карточек мониторинга */
.timeweb-card {
    background: #2D2D2D;
    border: 1px solid #444;
    border-radius: 8px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.timeweb-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    border-color: #555;
}

.timeweb-card .server-header {
    background: #2D2D2D;
    color: #ffffff;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #444;
}

.timeweb-card .server-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #ffffff;
}

.timeweb-card .status-badge {
    background: #28a745;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.timeweb-card .status-badge.off {
    background: #dc3545;
}

.timeweb-card .server-metrics {
    background: #2D2D2D;
    padding: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.timeweb-card .metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #383838;
    border-radius: 4px;
    border-left: 3px solid #007bff;
}

.timeweb-card .metric span:first-child {
    font-weight: 500;
    color: #ccc;
    font-size: 0.9rem;
}

.timeweb-card .metric .value {
    font-weight: 600;
    color: #ffffff;
    font-size: 0.9rem;
}

.timeweb-card .server-info {
    background: #383838;
    border-top: 1px solid #444;
    padding: 12px 16px;
    font-size: 0.85rem;
    color: #ccc;
}

.timeweb-card .server-controls {
    background: #2D2D2D;
    border-top: 1px solid #444;
    padding: 16px;
}

.timeweb-card .control-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.timeweb-card .btn {
    font-size: 0.85rem;
    padding: 10px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 500;
    text-decoration: none;
    min-width: 120px;
    height: 40px;
}

.timeweb-card .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.timeweb-card .btn-sm {
    font-size: 0.85rem;
    padding: 10px 16px;
    min-width: 120px;
    height: 40px;
}

/* Цвета кнопок - все серые, кроме опасных действий */
.btn-success {
    background-color: #6c757d;
    color: white;
}
.btn-success:hover {
    background-color: #545b62;
    color: white;
}

.btn-warning {
    background-color: #6c757d;
    color: white;
}
.btn-warning:hover {
    background-color: #545b62;
    color: white;
}

.btn-info {
    background-color: #6c757d;
    color: white;
}
.btn-info:hover {
    background-color: #545b62;
    color: white;
}

.btn-primary {
    background-color: #6c757d;
    color: white;
}
.btn-primary:hover {
    background-color: #545b62;
    color: white;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}
.btn-secondary:hover {
    background-color: #545b62;
    color: white;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}
.btn-danger:hover {
    background-color: #c82333;
    color: white;
}

/* Специальные классы для опасных действий */
.btn-reinstall {
    background-color: #dc3545;
    color: white;
}
.btn-reinstall:hover {
    background-color: #c82333;
    color: white;
}

.btn-delete {
    background-color: #dc3545;
    color: white;
}
.btn-delete:hover {
    background-color: #c82333;
    color: white;
}

/* Иконки Font Awesome */
.fas {
    font-size: 0.9em;
}

/* Улучшенные модальные окна */
.modal {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal-dialog {
    max-width: 500px;
    margin: 50px auto;
}

.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background: #ffffff;
}

.modal-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    padding: 20px 24px;
    border-bottom: none;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #ffffff;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Улучшенные уведомления */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease-out;
    max-width: 400px;
    border-left: 4px solid rgba(255, 255, 255, 0.3);
}

.notification.success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.notification.error {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
}

.notification.info {
    background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%);
}

.notification.warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: #212529;
}

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

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

/* Стили для детальной страницы сервера Cloud */
.server-detail-card {
    background: #2D2D2D;
    border: 1px solid #444;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    margin-bottom: 20px;
}

.server-detail-card .server-header {
    background: #2D2D2D;
    color: white;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #444;
}

.server-info-main h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
}

.server-actions {
    display: flex;
    gap: 10px;
}

.server-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    padding: 24px;
    background: #2D2D2D;
}

.detail-section {
    background: #383838;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 20px;
}

.detail-section h4 {
    margin: 0 0 16px 0;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 2px solid #444;
    padding-bottom: 8px;
    font-family: inherit;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #444;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item .label {
    font-weight: 500;
    color: #ccc;
}

.detail-item .value {
    font-weight: 600;
    color: #ffffff;
}

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

.action-group {
    background: #383838;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.action-group h4 {
    margin: 0 0 16px 0;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: inherit;
}

.action-group .btn {
    margin: 8px 0;
    width: 100%;
    height: 45px;
    font-size: 0.9rem;
    padding: 12px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
    text-decoration: none;
    box-sizing: border-box;
}

/* Переопределяем цвета кнопок для страницы управления - все серые по умолчанию */
.management-actions .btn-success,
.management-actions .btn-warning,
.management-actions .btn-info,
.management-actions .btn-primary,
.management-actions .btn-secondary {
    background-color: #6c757d;
    color: white;
}

.management-actions .btn-success:hover,
.management-actions .btn-warning:hover,
.management-actions .btn-info:hover,
.management-actions .btn-primary:hover,
.management-actions .btn-secondary:hover {
    background-color: #545b62;
    color: white;
}

/* Красные кнопки для опасных действий */
.management-actions .btn-danger,
.management-actions .btn-reinstall,
.management-actions .btn-delete {
    background-color: #dc3545;
    color: white;
}

.management-actions .btn-danger:hover,
.management-actions .btn-reinstall:hover,
.management-actions .btn-delete:hover {
    background-color: #c82333;
    color: white;
}

.actions-history {
    background: #383838;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 20px;
}

.action-item {
    border-bottom: 1px solid #444;
    padding: 16px 0;
}

.action-item:last-child {
    border-bottom: none;
}

.action-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.action-type {
    font-weight: 600;
    color: #ffffff;
}

.action-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-running {
    background: #d1ecf1;
    color: #0c5460;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-failed {
    background: #f8d7da;
    color: #721c24;
}

.action-time {
    color: #ccc;
    font-size: 0.9rem;
}

.action-message {
    color: #ccc;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.action-user {
    color: #ccc;
    font-size: 0.85rem;
    font-style: italic;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .timeweb-card .control-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .timeweb-card .server-metrics {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .modal-dialog {
        margin: 20px;
        max-width: calc(100% - 40px);
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .server-detail-card .server-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .server-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .server-details-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px;
    }
    
    .management-actions {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .action-header {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

/* Стили для чат-бота */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--status-active) 0%, #45B07A 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(80, 205, 137, 0.4);
    transition: all 0.3s ease;
    color: white;
    font-size: 24px;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(80, 205, 137, 0.6);
}

.chatbot-toggle.active {
    background: linear-gradient(135deg, #45B07A 0%, #3A9B6A 100%);
    box-shadow: 0 4px 20px rgba(69, 176, 122, 0.4);
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: var(--bg-darker);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #404040;
}

.chatbot-window.active {
    display: flex;
    animation: slideUp 0.3s ease-out;
}

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

.chatbot-header {
    background: linear-gradient(135deg, var(--status-active) 0%, #45B07A 100%);
    padding: 16px 20px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-title {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.chatbot-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.chatbot-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--bg-dark);
}

.chatbot-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.chatbot-message.user {
    background: linear-gradient(135deg, var(--status-active) 0%, #45B07A 100%);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chatbot-message.bot {
    background: #404040;
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chatbot-typing {
    display: none;
    align-self: flex-start;
    background: #404040;
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    font-size: 14px;
}

.chatbot-typing.active {
    display: block;
}

.typing-dots {
    display: inline-block;
}

.typing-dots::after {
    content: '...';
    animation: typing 1.5s infinite;
}

@keyframes typing {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

.chatbot-input-container {
    padding: 16px;
    background: var(--bg-darker);
    border-top: 1px solid #404040;
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.chatbot-input {
    flex: 1;
    background: var(--bg-dark);
    border: 1px solid #404040;
    border-radius: 20px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 14px;
    resize: none;
    min-height: 20px;
    max-height: 100px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.chatbot-input:focus {
    border-color: var(--status-active);
}

.chatbot-input::placeholder {
    color: var(--text-secondary);
}

.chatbot-send {
    background: linear-gradient(135deg, var(--status-active) 0%, #45B07A 100%);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 16px;
}

.chatbot-send:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(80, 205, 137, 0.3);
}

.chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .chatbot-container {
        bottom: 10px;
        right: 10px;
    }
    
    .chatbot-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 100px);
        bottom: 80px;
        right: 10px;
        left: 10px;
    }
    
    .chatbot-toggle {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}


/* GitHub Button */
.github-btn {
    background: linear-gradient(135deg, #58a6ff 0%, #1f6feb 100%);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    box-shadow: 0 2px 8px rgba(88, 166, 255, 0.3);
}

.github-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(88, 166, 255, 0.5);
    color: #ffffff;
    text-decoration: none;
}

/* Advanced Tools Section */
.advanced-tools-section {
    margin: 30px 0;
    padding: 25px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tool-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: #ffffff;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    color: #ffffff;
}

.tool-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 24px;
    color: #ffffff;
}

.ssh-tool .tool-icon { background: linear-gradient(135deg, #00ff00 0%, #00cc00 100%); }
.file-tool .tool-icon { background: linear-gradient(135deg, #ffc107 0%, #ff8f00 100%); }
.process-tool .tool-icon { background: linear-gradient(135deg, #dc3545 0%, #c82333 100%); }
.logs-tool .tool-icon { background: linear-gradient(135deg, #17a2b8 0%, #138496 100%); }
.services-tool .tool-icon { background: linear-gradient(135deg, #6610f2 0%, #520dc2 100%); }

.tool-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

    .tool-description {
        font-size: 12px;
        color: #8b949e;
        line-height: 1.4;
    }

/* Enhanced server cards with cyber effects */
.server-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.server-card:hover::before {
    left: 100%;
}

.server-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.timeweb-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.timeweb-card:hover::before {
    left: 100%;
}

.timeweb-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}
