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

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    padding: 20px;
}

.container { max-width: 100%; margin: 0 auto; }

/* Header */
.header {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px 30px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.1);
}

.header h1 { color: white; font-size: 28px; }
.header h1 span { background: linear-gradient(135deg, #667eea, #764ba2); padding: 5px 12px; border-radius: 10px; font-size: 14px; margin-left: 10px; }

/* Buttons - единый стиль для всех кнопок */
.btn, button {
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    background: rgba(102,126,234,0.8);
    color: white;
}

.btn:hover, button:hover {
    background: #667eea;
    transform: translateY(-1px);
}

.btn-outline {
    background: rgba(102,126,234,0.8);
    border: none;
    color: white;
}

.btn-outline:hover {
    background: #667eea;
}

.btn-success {
    background: rgba(72,187,120,0.8);
}
.btn-success:hover {
    background: #48bb78;
}

.btn-danger {
    background: rgba(233,69,96,0.8);
}
.btn-danger:hover {
    background: #e94560;
}

/* Server Card */
.server-card {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    width: 100%;
}

.server-card:hover { background: rgba(255,255,255,0.08); }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.server-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.server-status.online { background: rgba(72,187,120,0.2); color: #48bb78; }
.server-status.offline { background: rgba(233,69,96,0.2); color: #e94560; }
.server-status .dot { width: 8px; height: 8px; border-radius: 50%; }
.server-status.online .dot { background: #48bb78; animation: pulse 2s infinite; }

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

.server-name { font-size: 22px; font-weight: bold; color: white; margin-bottom: 20px; }

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

.info-section {
    background: rgba(0,0,0,0.3);
    border-radius: 15px;
    padding: 15px;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.info-row {
    display: flex;
    margin-bottom: 8px;
    font-size: 13px;
}

.info-label { width: 40%; color: rgba(255,255,255,0.5); }
.info-value { width: 60%; color: white; font-weight: 500; }

.metric-bar { margin-bottom: 12px; }
.metric-header { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 12px; color: rgba(255,255,255,0.7); }
.bar-container { background: rgba(0,0,0,0.5); border-radius: 10px; overflow: hidden; height: 8px; }
.bar-fill { height: 100%; border-radius: 10px; transition: width 0.5s ease; }
.bar-fill.cpu { background: linear-gradient(90deg, #48bb78, #38a169); }
.bar-fill.ram { background: linear-gradient(90deg, #667eea, #764ba2); }
.bar-fill.disk { background: linear-gradient(90deg, #ed8936, #dd6b20); }

.protocols-list { display: flex; flex-direction: column; gap: 10px; }
.protocol-item { background: rgba(0,0,0,0.3); border-radius: 8px; padding: 8px 12px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.protocol-name { background: rgba(102,126,234,0.4); padding: 4px 12px; border-radius: 20px; color: white; font-family: monospace; text-decoration: none; }
.protocol-status.enabled { background: rgba(72,187,120,0.2); color: #48bb78; }

.card-actions { display: flex; gap: 10px; margin-top: 20px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,0.1); }

.login-box { max-width: 450px; margin: 100px auto; background: rgba(255,255,255,0.05); backdrop-filter: blur(10px); padding: 40px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.1); }
.login-box h2 { color: white; text-align: center; margin-bottom: 30px; }
.login-box input { width: 100%; padding: 12px; margin: 10px 0; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; color: white; }

.error { color: #e94560; text-align: center; margin-top: 15px; }
.modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-content { background: #1a1a2e; padding: 30px; border-radius: 20px; min-width: 420px; border: 1px solid rgba(255,255,255,0.1); }
.modal-content input { width: 100%; padding: 12px; margin: 10px 0; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; color: white; }

.empty-state { text-align: center; padding: 60px; color: rgba(255,255,255,0.5); }
.no-data { color: rgba(255,255,255,0.3); font-style: italic; }
.uptime { font-family: monospace; font-size: 12px; color: #48bb78; }

/* Кнопка Refresh (Update) - больше */
.header-buttons .btn-outline {
    padding: 10px 20px !important;
    font-size: 14px !important;
}

/* Кнопки Edit - меньше */
#bandwidth-6 button,
#max-users-6 button,
#safety-margin-6 button {
    padding: 4px 10px !important;
    font-size: 12px !important;
    min-width: auto !important;
}

/* Кнопки Edit - маленькие */
#bandwidth-6 button,
#max-users-6 button,
#safety-margin-6 button {
    padding: 3px 8px !important;
    font-size: 12px !important;
    min-width: auto !important;
}

/* Стили для информации о протоколах */
.protocol-port, .protocol-clients {
    color: white !important;
    font-weight: bold !important;
    font-size: 12px !important;
}

.protocol-port {
    margin-left: 4px;
}

.protocol-clients {
    margin-left: 8px;
}

/* Единый контейнер для всех страниц */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

/* Единые стили для карточек тарифов */
.tariffs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

/* Единый контейнер для всех страниц */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}
