/* ========================================================================== */
/* ADMIN --> TUNNEL AND VPN                                                       */
/* ========================================================================== */

.vpn-wrapper {
    padding: 60px 70px;
    margin-left: var(--sidenav-width);
    margin-top: var(--topnav-height);
    margin-bottom: 300px;
}

@media (max-width: 991.98px) {
    .vpn-wrapper {
         padding: 24px var(--page-gutter);
    }
}

/* section 1 : HEADER */

.vpn-header h1 {
    font-size: 2.6rem;
    font-weight: 650;
    color: #032f4f;
    margin-bottom: 6px;
}

.vpn-sub {
    max-width: 700px;
    font-size: 1.05rem;
    color: #48687f;
    line-height: 1.6;
}


/* section / titles  */

.vpn-section {
    margin-top: 50px;
    margin-bottom: 40px;
}

.vpn-section-title {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.08rem;
    font-weight: 700;
    color: #022a46;
    margin-bottom: 18px;
}

.vpn-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #032f4f;
    margin-bottom: 6px;
}

/* section 2 : OVERVIEW */

.vpn-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
/* ADD USER SECTION */
.vpn-add-user {
    transition: background 0.2s ease;
    cursor: pointer;
    height: 100%; /* stretch to match table height */
    border-radius: 20px;
    margin-left: 1rem;
}
.add-user-content {
    display: flex; /* make flex container */
    align-items: center; /* vertically center + and text */
    justify-content: center; /* horizontally center inside parent */
    gap: 0.5rem; /* optional spacing between + and text */
    padding: 0.75rem;
}

.add-user-plus {
    font-size: 2rem;
    font-weight: 400;
    line-height: 1;
}

.add-user-text {
    font-size: 0.95rem;
    opacity: 0.7;
}

.simple-vpn-grid {
    display: grid;
    grid-template-columns: .5fr 2fr auto; /* left = add user, right = table */
    gap: 1rem;
    align-items: start;
}

/* ADD USER SECTION */
.simple-vpn-add-user {
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.2s ease;
    cursor: pointer;
    height: 100%; /* stretch to match table height */
    border-radius: 20px;
}

.simple-add-user-content {
    text-align: center;
}

.simple-add-user-plus {
    font-size: 5rem;
    font-weight: 600;
    line-height: 1;
}

.simple-add-user-text {
    margin-top: 1rem;
    font-size: 0.95rem;
    opacity: 0.7;
}

/* CONNECTED CLIENTS SECTION */
.simple-vpn-section {
    display: flex;
    flex-direction: column;
    justify-content: stretch;
}

.simple-vpn-section-title {
    margin-bottom: 1rem;
}

.simple-vpn-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.simple-vpn-table {
    width: 100%;
    border-collapse: collapse;
}

    .simple-vpn-table th,
    .simple-vpn-table td {
        padding: 0.5rem;
        text-align: left;
    }

/* card */
.overview-card {
    background: white;
    padding: 18px;
    border-radius: 14px;
    border: 1px solid rgba(2, 42, 70, 0.10);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
    transition: transform 0.18s, box-shadow 0.18s;
}

.overview-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.10);
}

/* top row: label + status */
.ov-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.ov-label {
    font-size: 0.85rem;
    font-weight: 750;
    letter-spacing: 0.04rem;
    text-transform: uppercase;
    color: rgba(2, 42, 70, 0.68);
}

/* value */
.ov-value {
    font-size: 1.55rem;
    font-weight: 800;
    color: #032f4f;
    line-height: 1.1;
    margin: 2px 0 6px 0;
}

/* meta */
.ov-meta {
    font-size: 0.88rem;
    color: rgba(2, 42, 70, 0.62);
}

/* status pill */
.ov-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid transparent;
    white-space: nowrap;
}

.ov-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.9;
}

.ov-status.is-good {
    background: rgba(34, 197, 94, 0.14);
    color: #15803d;
    border-color: rgba(34, 197, 94, 0.22);
}

.ov-status.is-bad {
    background: rgba(239, 68, 68, 0.14);
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.24);
}

.is-good {
    background: rgba(34, 197, 94, 0.14);
    color: #15803d;
    border-color: rgba(34, 197, 94, 0.22);
}
    .is-good:hover {
        background: rgba(34, 197, 94, 0.7);
        color: #0b421f;
        border-color: rgba(34, 197, 94, 0.22);
    }

/* toggle (WireGuard) */

.wg-inline-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.wg-inline-hint {
    font-size: 0.88rem;
    color: rgba(2, 42, 70, 0.62);
}

.toggle-switch {
    width: 48px;
    height: 26px;
    background: #c7c7c7;
    border-radius: 999px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s ease;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.10);
}

    .toggle-switch.on {
        background: #2ecc71;
    }

.toggle-knob {
    width: 20px;
    height: 20px;
    background: white;
    position: absolute;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.2s;
}

.toggle-switch.on .toggle-knob {
    transform: translateX(22px);
}

/* section 3 : WIREGUARD CONFIG */

.wg-config {
    background: white;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 18px 20px;
}

.wg-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
}

    .wg-row:last-child {
        border-bottom: none;
    }

/* table wrapper + table — Base styles are centralized in admin-shared.css */
/* This section intentionally removed; see admin-shared.css for .vpn-table styles */
/* buttons                                                                    */

.add-app-btn {
    padding: 10px 16px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 15px;
    border: none;
    border-radius: 12px;
    background: #16a34a;
    color: white;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
    white-space: nowrap;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.add-app-btn:hover {
    background: #15803d;
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}

.add-app-btn:active {
    transform: translateY(0);
}

/* reset typography when inside titles */
h1 .info-icon,
h2 .info-icon,
h3 .info-icon {
    font-size: 12px !important;
    font-weight: 750 !important;
    color: #022a46 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

/* VPN USER ADDED */
/* Backdrop */
.wg-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 30, 0.65);
    backdrop-filter: blur(8px);
    z-index: 1040;
    animation: fadeIn .25s ease-out;
}

/* Modal */
.wg-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    animation: popIn .3s cubic-bezier(.2,.8,.2,1);
}

.wg-dialog {
    width: 100%;
    max-width: 420px;
    padding: 1rem;
}

.wg-content {
    background: #ffffff;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25), 0 5px 15px rgba(0,0,0,0.1);
}

/* Header */
.wg-header {
    position: relative;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    background: linear-gradient(45deg, #6fe2c1, #54a48d 25%, #3a6b5c 50%, #21362f 75%, #000000 100%);
    color: white;
}

.wg-title {
    margin: 0;
    font-weight: 700;
}

.wg-subtitle {
    font-size: .85rem;
    opacity: .85;
}

.wg-success-icon {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

/* Close */
.wg-close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    border: none;
    background: transparent;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: .8;
}

    .wg-close:hover {
        opacity: 1;
    }

/* Body */
.wg-body {
    padding: 2rem 1.5rem;
}

/* QR Glow Effect */
.wg-qr-wrapper {
    display: inline-block;
    padding: 1rem;
    border-radius: 1.25rem;
    background: white;
    position: relative;
}

    .wg-qr-wrapper::before {
        content: "";
        position: absolute;
        inset: -8px;
        border-radius: 1.5rem;
        background: linear-gradient(45deg, #0d6efd, #3a86ff, #4cc9f0);
        filter: blur(18px);
        opacity: .5;
        z-index: -1;
    }

.wg-qr {
    width: 220px;
    border-radius: .75rem;
}

/* Text */
.wg-scan-text {
    margin-top: 1.25rem;
    font-weight: 500;
}

.wg-hint {
    font-size: .8rem;
    color: #6c757d;
}

/* Loading */
.wg-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #6c757d;
}

.wg-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e9ecef;
    border-top: 4px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Footer */
.wg-footer {
    padding: 1rem 1.5rem 1.5rem;
}

.wg-button {
    width: 100%;
    padding: .75rem;
    border-radius: .75rem;
    border: none;
    font-weight: 600;
    background: #248A6D;
    color: white;
    transition: all .2s ease;
}

    .wg-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 20px grey;
    }

.pubkey {
    cursor: pointer;
    font-family: monospace;
    white-space: nowrap;
}

.view-btn {
    margin-left: 6px;
    font-size: 12px;
    padding: 2px 6px;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
}

    .modal-content pre {
        background: #f5f5f5;
        padding: 10px;
        overflow-x: auto;
        font-family: monospace;
    }

.modal-actions {
    margin-top: 15px;
    text-align: right;
}

.key-container {
    position: relative;
}

    .key-container pre {
        background: #f5f5f5;
        padding: 12px;
        overflow-x: auto;
        font-family: monospace;
        border-radius: 6px;
        margin: 0;
    }

.copy-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

    .copy-icon:hover {
        opacity: 1;
    }


/* Animations */
@keyframes popIn {
    from {
        transform: scale(.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Dark mode → css/dark/admin/dark-admin-vpn.css */

