/* ============================================
   MikroTik WireGuard Manager — Custom Styles
   ============================================ */

/* --- Загальні стилі --- */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* --- Навігація --- */
.navbar-brand {
    font-weight: 700;
    letter-spacing: 0.5px;
}

.navbar-brand i {
    color: #0d6efd;
}

/* --- Картки статистики --- */
.stat-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    opacity: 0.7;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
}

.stat-card .stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Блоки конфігурації --- */
.config-block {
    position: relative;
    background: #1a1d21;
    border: 1px solid #2d3238;
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
}

.config-block pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #e8e8e8;
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
}

.config-block .btn-copy {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.config-block:hover .btn-copy {
    opacity: 1;
}

/* --- QR-код --- */
.qr-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}

.qr-container img {
    max-width: 280px;
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    background: #fff;
    padding: 1rem;
}

/* --- Таблиці --- */
.table > thead > tr > th {
    border-bottom-width: 2px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

/* --- Бейджі статусу --- */
.badge-active {
    background-color: #198754 !important;
}

.badge-inactive {
    background-color: #6c757d !important;
}

/* --- Кнопки дій --- */
.btn-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* --- Footer --- */
.footer {
    padding: 1rem 0;
    margin-top: 2rem;
    border-top: 1px solid #2d3238;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.6;
}

/* --- Алерти --- */
.alert-flash {
    border-radius: 0.5rem;
    border: none;
}

/* --- Форми --- */
.form-label {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.form-text {
    font-size: 0.8rem;
}

/* --- Картки серверів та клієнтів --- */
.card {
    border: 1px solid #2d3238;
}

.card-header {
    font-weight: 600;
    font-size: 1.1rem;
}

/* --- Анімація копіювання --- */
.copy-success {
    animation: copyFlash 0.5s ease;
}

@keyframes copyFlash {
    0% { background-color: rgba(25, 135, 84, 0.3); }
    100% { background-color: transparent; }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .stat-card .stat-value {
        font-size: 1.5rem;
    }

    .config-block pre {
        font-size: 0.75rem;
    }

    .table-responsive {
        font-size: 0.85rem;
    }

    .btn-actions .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.25rem;
    }
}
