/* ===========================================
   ZENXNET VPN - DASHBOARD STYLES
   Personal Account / Subscriptions / Settings
   =========================================== */

/* ============= CSS VARIABLES ============= */
:root {
    --gradient-light: #DBEDEF;
    --gradient-medium: #51D0E0;
    --gradient-dark: #008798;
    --text-dark: #1a1a1a;
    --text-light: #666;
    --white: #ffffff;
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-light: rgba(81, 208, 224, 0.1);
    --shadow-medium: rgba(81, 208, 224, 0.2);
}

/* ============= BASE STYLES ============= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.dashboard-body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--gradient-light) 0%, var(--white) 50%, var(--gradient-light) 100%);
    background-attachment: fixed;
    color: var(--text-light);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--text-dark);
}

/* ============= BUTTONS ============= */
.btn {
    border-radius: var(--border-radius);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--shadow-light);
    font-family: 'Poppins', sans-serif;
}

/* Ripple wave effect from center on hover */
.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 70%);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease-out, height 0.5s ease-out;
}

.btn:hover::before {
    width: 300%;
    height: 300%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gradient-medium), var(--gradient-dark));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-medium);
    color: white;
}

.btn-primary:active {
    color: white !important;
    transform: translateY(0);
}

.btn-secondary {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 114, 128, 0.4);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
    color: white;
}

.btn-orange-gradient {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-orange-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
    color: white;
}

.btn-orange-gradient:active {
    color: white !important;
    transform: translateY(0);
}

/* ============= MAIN LAYOUT ============= */
.main-lk-wrapper {
    display: flex;
    flex-grow: 1;
    min-height: 100vh;
}

/* ============= SIDEBAR ============= */
.sidebar {
    width: 280px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(81, 208, 224, 0.2);
    padding: 2rem 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-profile {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    margin: 0 1rem 2rem 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: var(--border-radius);
    border: 1px solid rgba(81, 208, 224, 0.2);
    box-shadow: 0 4px 15px var(--shadow-light);
}

.sidebar-profile .profile-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 0.75rem;
    object-fit: cover;
    border: 2px solid var(--gradient-medium);
}

.sidebar-profile h5 {
    margin-bottom: 0.25rem;
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 700;
    word-break: break-word;
}

.sidebar-profile .text-muted {
    font-size: 0.8rem;
    color: var(--text-light) !important;
    word-break: break-word;
}

.sidebar-nav-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
    padding: 0.5rem 1rem;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
    margin: 0 1rem 0.25rem 1rem;
}

.sidebar-nav .nav-link:hover {
    background: linear-gradient(135deg, var(--gradient-medium), var(--gradient-dark));
    color: white;
}

.sidebar-nav .nav-link.active {
    background: linear-gradient(135deg, var(--gradient-medium), var(--gradient-dark));
    color: white;
    font-weight: 600;
}

.sidebar-nav .nav-link i.fa-fw {
    width: 1.5em;
    text-align: center;
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

/* ============= MAIN CONTENT ============= */
.lk-main-content {
    flex-grow: 1;
    padding: 2rem;
}

.lk-main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    border: 1px solid rgba(81, 208, 224, 0.2);
    box-shadow: 0 4px 15px var(--shadow-light);
}

.lk-main-header .lk-title {
    font-size: clamp(1.8rem, calc(1.5rem + 1vw), 2.5rem);
    font-weight: 800;
    margin-bottom: 0;
    color: var(--text-dark);
}

.lk-main-header .lk-title span {
    background: linear-gradient(135deg, var(--gradient-medium), var(--gradient-dark));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* ============= SUBSCRIPTION CARDS ============= */
.subscription-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(81, 208, 224, 0.2);
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 30px var(--shadow-light);
    transition: var(--transition);
    height: 100%;
    overflow: hidden;
    position: relative;
}

.subscription-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(81, 208, 224, 0.1), transparent);
    transition: var(--transition);
}

.subscription-card:hover::before {
    left: 100%;
}

.subscription-card:hover {
    box-shadow: 0 20px 50px var(--shadow-medium);
    border-color: var(--gradient-medium);
}

.subscription-card .card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.subscription-card .card-title {
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.subscription-card .card-text {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.subscription-card .card-text i.fa-fw {
    color: var(--gradient-dark);
}

/* ============= SETTINGS CARDS ============= */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(81, 208, 224, 0.2);
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 30px var(--shadow-light);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 15px 40px var(--shadow-medium);
    border-color: var(--gradient-medium);
}

.card-header {
    background: linear-gradient(135deg, rgba(81, 208, 224, 0.1), rgba(255, 255, 255, 0.8)) !important;
    border-bottom: 1px solid rgba(81, 208, 224, 0.2) !important;
    padding: 1.25rem 1.5rem;
}

.card-header h5 {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0;
}

.card-header h5 i {
    color: var(--gradient-dark);
}

.card-body {
    padding: 1.5rem;
}

/* ============= BADGES ============= */
.badge {
    font-size: 0.9em;
    padding: 0.4em 0.7em;
    border-radius: 0.5rem;
    font-weight: 500;
}

.badge-status-active {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.badge-status-expiring {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.badge-status-expired {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.badge-status-trial {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.badge-status-unlimited {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

/* ============= FORM CONTROLS ============= */
.form-control {
    border-radius: 12px;
    border: 2px solid rgba(81, 208, 224, 0.2);
    background: rgba(255, 255, 255, 0.9);
    transition: var(--transition);
    padding: 0.75rem 1rem;
    font-family: 'Poppins', sans-serif;
}

.form-control:focus {
    border-color: var(--gradient-medium);
    box-shadow: 0 0 0 4px rgba(81, 208, 224, 0.1);
    background: white;
    outline: none;
}

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

/* ============= ALERTS ============= */
.alert {
    border-radius: var(--border-radius);
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(20px);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
    border-left: 4px solid #10b981;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.alert-info {
    background: rgba(81, 208, 224, 0.1);
    color: var(--gradient-dark);
    border-left: 4px solid var(--gradient-medium);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

/* ============= MOBILE BOTTOM NAVIGATION ============= */
.bottom-mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(81, 208, 224, 0.2);
    padding: 0.5rem 0;
    z-index: 1040;
    box-shadow: 0 -4px 15px var(--shadow-light);
    height: 60px;
    display: none;
}

.bottom-mobile-nav .nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
}

.bottom-mobile-nav .nav-item {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bottom-mobile-nav .nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
    border-radius: var(--border-radius);
    line-height: 1.2;
}

.bottom-mobile-nav .nav-link:hover {
    color: var(--gradient-dark);
}

.bottom-mobile-nav .nav-link.active {
    background: linear-gradient(135deg, var(--gradient-medium), var(--gradient-dark));
    color: white !important;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
}

.bottom-mobile-nav .nav-link i.fa-fw {
    font-size: 1.2rem;
    margin-bottom: 0.15rem;
}

/* ============= OFFCANVAS MENU ============= */
.offcanvas.offcanvas-start {
    width: 280px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(81, 208, 224, 0.2);
}

.offcanvas-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(81, 208, 224, 0.2);
}

.offcanvas-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--text-dark);
}

.offcanvas-body {
    padding: 1rem 0;
}

.offcanvas-profile-header {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    margin: 0 1rem 1.5rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--border-radius);
    border: 1px solid rgba(81, 208, 224, 0.2);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.02);
}

.offcanvas-nav-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem 1rem;
}

.offcanvas-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
    margin: 0 1rem 0.25rem 1rem;
}

.offcanvas-nav .nav-link:hover {
    background: linear-gradient(135deg, var(--gradient-medium), var(--gradient-dark));
    color: white;
}

.offcanvas-nav .nav-link.active {
    background: linear-gradient(135deg, var(--gradient-medium), var(--gradient-dark));
    color: white;
    font-weight: 600;
}

.offcanvas-nav .nav-link i.fa-fw {
    width: 1.5em;
    text-align: center;
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

/* ============= EMPTY STATE ============= */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: var(--border-radius);
    border: 2px dashed rgba(81, 208, 224, 0.3);
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--gradient-medium);
    margin-bottom: 1.5rem;
}

.empty-state-title {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.empty-state-text {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* ============= LOADING SPINNER ============= */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============= COPY BUTTON ============= */
.copy-btn {
    background: transparent;
    border: 1px solid rgba(81, 208, 224, 0.3);
    border-radius: 8px;
    padding: 0.3rem 0.6rem;
    color: var(--gradient-dark);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
}

.copy-btn:hover {
    background: var(--gradient-medium);
    color: white;
    border-color: var(--gradient-medium);
}

.copy-btn.copied {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

/* ============= RESPONSIVE DESIGN ============= */
@media (min-width: 768px) {
    .sidebar {
        display: flex !important;
        flex-direction: column;
    }

    .bottom-mobile-nav {
        display: none !important;
    }

    .offcanvas {
        visibility: hidden !important;
    }

    .offcanvas.show {
        visibility: hidden !important;
    }

    .lk-main-content {
        padding: 2rem 2.5rem;
    }

    .lk-main-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 2rem;
    }

    .lk-main-header .lk-title {
        margin-bottom: 0;
        text-align: left;
    }

    .header-actions {
        margin-top: 0;
    }
}

@media (max-width: 767px) {
    .sidebar {
        display: none !important;
    }

    .bottom-mobile-nav {
        display: block !important;
    }

    .lk-main-content {
        padding: 1.5rem;
        padding-bottom: 80px;
    }

    .lk-main-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .lk-main-header .lk-title {
        text-align: center;
    }

    .header-actions {
        margin-top: 1rem;
    }

    .subscription-card:hover {
        transform: translateY(-5px);
    }
}

/* ============= SUBSCRIPTION STATUS COLORS ============= */
.status-active {
    color: #10b981;
}

.status-expiring {
    color: #f59e0b;
}

.status-expired {
    color: #ef4444;
}

.status-trial {
    color: #8b5cf6;
}

/* ============= QR CODE MODAL ============= */
.qr-code-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    background: white;
    border-radius: var(--border-radius);
}

.qr-code-container img {
    max-width: 250px;
    border-radius: 12px;
}

/* ============= SUBSCRIPTION LINK DISPLAY ============= */
.subscription-link {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
    word-break: break-all;
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-dark);
    border: 1px solid rgba(81, 208, 224, 0.2);
}

/* ============= PROGRESS BAR FOR TRAFFIC ============= */
.traffic-progress {
    height: 8px;
    border-radius: 4px;
    background: #e5e7eb;
    overflow: hidden;
}

.traffic-progress-bar {
    height: 100%;
    background: linear-gradient(135deg, var(--gradient-medium), var(--gradient-dark));
    transition: width 0.5s ease;
}

.traffic-progress-bar.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.traffic-progress-bar.danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* ============= iOS TOGGLE SWITCH ============= */
.ios-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ios-toggle {
    position: relative;
    display: inline-block;
    width: 51px;
    height: 31px;
    cursor: pointer;
}

.ios-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ios-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 31px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ios-toggle-slider:before {
    position: absolute;
    content: "";
    height: 27px;
    width: 27px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.ios-toggle input:checked+.ios-toggle-slider {
    background: linear-gradient(135deg, #34d399, #10b981);
}

.ios-toggle input:checked+.ios-toggle-slider:before {
    transform: translateX(20px);
}

.ios-toggle input:focus+.ios-toggle-slider {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.ios-toggle-label {
    font-size: 0.95rem;
    color: var(--text-dark);
    font-weight: 500;
}

/* ============= TOAST NOTIFICATIONS ============= */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    max-width: 400px;
    pointer-events: auto;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.toast-success {
    border-left: 4px solid #10b981;
}

.toast.toast-danger {
    border-left: 4px solid #ef4444;
}

.toast.toast-info {
    border-left: 4px solid #3b82f6;
}

.toast-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    color: #10b981;
}

.toast-danger .toast-icon {
    color: #ef4444;
}

.toast-info .toast-icon {
    color: #3b82f6;
}

.toast-message {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.toast-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    font-size: 1rem;
    transition: color 0.2s;
}

.toast-close:hover {
    color: var(--text-dark);
}

@media (max-width: 480px) {
    .toast-container {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }

    .toast {
        min-width: auto;
        max-width: none;
    }
}