/* Dashboard Layout */
.dashboard-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: calc(100vh - 80px);
    background-color: var(--primary-dark);
}

/* Sidebar */
.dashboard-sidebar {
    background: var(--secondary-dark);
    border-right: 2px solid var(--border-color);
    padding: 2rem 0;
}

.user-profile {
    text-align: center;
    padding: 0 1.5rem 2rem;
    border-bottom: 2px solid var(--border-color);
}

.user-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-orange) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar i {
    font-size: 3rem;
    color: var(--text-white);
}

.user-profile h3 {
    color: var(--text-white);
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.user-profile p {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.verified-badge {
    display: inline-block;
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.verified-badge i {
    font-size: 0.75rem;
    margin-right: 4px;
}

.sidebar-nav {
    padding: 1.5rem 0;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--text-gray);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-nav .nav-link i {
    font-size: 1.2rem;
    width: 24px;
}

.sidebar-nav .nav-link:hover {
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent-cyan);
    border-left-color: var(--accent-cyan);
}

.sidebar-nav .nav-link.active {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-cyan);
    border-left-color: var(--accent-cyan);
}

/* Main Content */
.dashboard-main {
    padding: 2rem;
    overflow-y: auto;
}

/* Email Verification Banner */
.verification-banner {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15) 0%, rgba(239, 68, 68, 0.15) 100%);
    border: 2px solid var(--accent-orange);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    animation: slideDown 0.3s ease;
}

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

.verification-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.verification-content > i {
    font-size: 2.5rem;
    color: var(--accent-orange);
}

.verification-content > div {
    flex: 1;
}

.verification-content h3 {
    color: var(--accent-orange);
    margin-bottom: 0.25rem;
    font-size: 1.2rem;
}

.verification-content p {
    color: var(--text-gray);
    margin: 0;
    font-size: 0.95rem;
}

.verification-content .btn {
    white-space: nowrap;
}

.dashboard-section {
    display: none;
}

.dashboard-section.active {
    display: block;
}

.dashboard-section h1 {
    font-size: 2rem;
    color: var(--text-white);
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-orange) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-section h2 {
    font-size: 1.5rem;
    color: var(--text-white);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.dashboard-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-cyan) 0%, var(--accent-orange) 100%);
    border-radius: 2px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--secondary-dark);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-cyan);
}

.stat-card:nth-child(2):hover {
    border-color: var(--accent-orange);
}

.stat-card:nth-child(4):hover {
    border-color: var(--accent-orange);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, var(--accent-orange) 0%, #f97316 100%);
}

.stat-card:nth-child(4) .stat-icon {
    background: linear-gradient(135deg, #f97316 0%, var(--accent-orange) 100%);
}

.stat-icon i {
    font-size: 1.8rem;
    color: var(--text-white);
}

.stat-content h3 {
    font-size: 1.8rem;
    color: var(--accent-cyan);
    margin-bottom: 0.25rem;
}

.stat-card:nth-child(2) .stat-content h3 {
    color: var(--accent-orange);
}

.stat-card:nth-child(4) .stat-content h3 {
    color: var(--accent-orange);
}

.stat-content p {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* Quick Actions */
.quick-actions {
    margin-top: 3rem;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.action-card {
    background: var(--secondary-dark);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.action-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-cyan);
    box-shadow: var(--shadow-lg);
}

.action-card:nth-child(2):hover,
.action-card:nth-child(3):hover {
    border-color: var(--accent-orange);
}

.action-card i {
    font-size: 2.5rem;
    color: var(--accent-cyan);
    margin-bottom: 1rem;
}

.action-card:nth-child(2) i,
.action-card:nth-child(3) i {
    color: var(--accent-orange);
}

.action-card h3 {
    color: var(--text-white);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.action-card p {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* Server Cards */
.servers-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.server-card {
    background: var(--secondary-dark);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.server-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-cyan);
}

.server-card:nth-child(even):hover {
    border-color: var(--accent-orange);
}

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

.server-name {
    font-size: 1.3rem;
    color: var(--accent-cyan);
    font-weight: 600;
}

.server-card:nth-child(even) .server-name {
    color: var(--accent-orange);
}

.server-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.server-status.active {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.server-status.pending {
    background: rgba(249, 115, 22, 0.2);
    color: var(--accent-orange);
}

.server-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.server-spec {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.server-spec i {
    color: var(--accent-cyan);
    width: 16px;
}

.server-card:nth-child(even) .server-spec i {
    color: var(--accent-orange);
}

.server-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.server-actions .btn {
    flex: 1;
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Orders Table */
.table-container {
    background: var(--secondary-dark);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

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

.orders-table thead {
    background: var(--tertiary-dark);
}

.orders-table th {
    padding: 1rem;
    text-align: left;
    color: var(--accent-cyan);
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

.orders-table th:nth-child(even) {
    color: var(--accent-orange);
}

.orders-table td {
    padding: 1rem;
    color: var(--text-gray);
    border-bottom: 1px solid var(--border-color);
}

.orders-table tr:hover {
    background: rgba(6, 182, 212, 0.05);
}

.orders-table tr:nth-child(even):hover {
    background: rgba(249, 115, 22, 0.05);
}

.order-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

.order-status.completed {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.order-status.processing {
    background: rgba(249, 115, 22, 0.2);
    color: var(--accent-orange);
}

.order-status.pending {
    background: rgba(100, 116, 139, 0.2);
    color: var(--text-gray);
}

/* Priority Badges */
.priority-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    text-transform: capitalize;
}

.priority-badge.priority-low {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.priority-badge.priority-medium {
    background: rgba(249, 115, 22, 0.2);
    color: var(--accent-orange);
}

.priority-badge.priority-high {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Ticket Status */
.ticket-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    text-transform: capitalize;
}

.ticket-status.open {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.ticket-status.in-progress {
    background: rgba(249, 115, 22, 0.2);
    color: var(--accent-orange);
}

.ticket-status.closed {
    background: rgba(100, 116, 139, 0.2);
    color: var(--text-gray);
}

/* Profile Cards */
.profile-card {
    background: var(--secondary-dark);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.profile-card h2 {
    margin-bottom: 1.5rem;
}

.profile-card .form-group {
    margin-bottom: 1.5rem;
}

.profile-card .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--accent-cyan);
}

.profile-card .form-group:nth-child(even) label {
    color: var(--accent-orange);
}

.profile-card .form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background-color: var(--tertiary-dark);
    color: var(--text-white);
    transition: border-color 0.3s ease;
}

.profile-card .form-group input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

.profile-card .form-group:nth-child(even) input:focus {
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.profile-card .form-group input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-light-gray);
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: var(--text-white);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

/* Ticket Modal */
.ticket-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.ticket-modal-content {
    background: var(--secondary-dark);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ticket-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    background: var(--tertiary-dark);
}

.ticket-modal-header h2 {
    color: var(--accent-cyan);
    font-size: 1.3rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ticket-modal-header h2::after {
    display: none;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-gray);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.modal-close-btn:hover {
    color: #ef4444;
}

.ticket-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.ticket-info-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.ticket-info-item {
    background: var(--tertiary-dark);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.ticket-info-item.full-width {
    grid-column: span 2;
}

.ticket-info-item label {
    display: block;
    color: var(--accent-cyan);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.ticket-info-item p {
    color: var(--text-white);
    margin: 0;
    font-size: 1rem;
}

.ticket-conversation {
    margin-top: 1.5rem;
}

.ticket-conversation h3 {
    color: var(--accent-orange);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ticket-messages {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ticket-message {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    position: relative;
}

.ticket-message.user-message {
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.3);
    margin-left: 1.5rem;
}

.ticket-message.admin-message {
    background: rgba(249, 115, 22, 0.15);
    border: 1px solid rgba(249, 115, 22, 0.3);
    margin-right: 1.5rem;
}

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

.message-sender {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-message .message-sender {
    color: var(--accent-cyan);
}

.admin-message .message-sender {
    color: var(--accent-orange);
}

.message-time {
    color: var(--text-gray);
    font-size: 0.8rem;
}

.message-content {
    color: var(--text-white);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Responsive Design */
@media (max-width: 968px) {
    .dashboard-container {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        border-right: none;
        border-bottom: 2px solid var(--border-color);
    }

    .sidebar-nav {
        display: flex;
        overflow-x: auto;
        padding: 0;
    }

    .sidebar-nav .nav-link {
        flex-direction: column;
        padding: 1rem;
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
    }

    .sidebar-nav .nav-link.active {
        border-left: none;
        border-bottom-color: var(--accent-cyan);
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .servers-list {
        grid-template-columns: 1fr;
    }

    .table-container {
        overflow-x: auto;
    }
}

/* VPN Account Creation Modals */
.vpn-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.vpn-modal-content {
    background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--tertiary-dark) 100%);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 500px;
    width: 100%;
    text-align: center;
    animation: slideUp 0.4s ease;
    max-height: 90vh;
    overflow-y: auto;
}

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

.vpn-modal-content.processing {
    border-color: var(--accent-cyan);
}

.vpn-modal-content.success {
    border-color: #10b981;
}

.vpn-modal-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--accent-cyan);
}

.vpn-modal-icon.success {
    color: #10b981;
}

.vpn-modal-icon i {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.vpn-modal-content h2 {
    color: var(--text-white);
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.vpn-modal-content > p {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--tertiary-dark);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 1.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-orange));
    border-radius: 3px;
    animation: progressAnimation 2s ease-in-out infinite;
}

@keyframes progressAnimation {
    0% { width: 0%; }
    50% { width: 80%; }
    100% { width: 100%; }
}

.vpn-details-card {
    background: var(--tertiary-dark);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.vpn-details-card .detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.vpn-details-card .detail-row:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.vpn-details-card .label {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.vpn-details-card .value {
    color: var(--text-white);
    font-weight: 600;
}

.qr-code-section {
    background: linear-gradient(135deg, #1e3a5f 0%, #0a1628 100%);
    border: 2px solid var(--accent-cyan);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.qr-code-section h3 {
    color: var(--accent-cyan);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.qr-code-img {
    width: 180px;
    height: 180px;
    border-radius: 8px;
    background: #fff;
    padding: 8px;
}

.qr-hint {
    color: var(--text-gray);
    font-size: 0.85rem;
    margin-top: 0.75rem;
}

.uri-section {
    margin: 1.5rem 0;
}

.uri-section h4 {
    color: var(--accent-orange);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.uri-box {
    background: var(--tertiary-dark);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transition: all 0.3s ease;
}

.uri-box:hover {
    border-color: var(--accent-orange);
    background: rgba(249, 115, 22, 0.1);
}

.uri-box code {
    color: var(--text-white);
    font-size: 0.75rem;
    word-break: break-all;
    text-align: left;
}

.uri-box i {
    color: var(--accent-orange);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.copy-hint {
    color: var(--text-gray);
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.email-note {
    color: #10b981;
    font-size: 0.9rem;
    margin: 1.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.vpn-modal-close {
    margin-top: 1rem;
    padding: 12px 30px;
    font-size: 1rem;
}
