/* ============================================
   L2 IMPURE - Dashboard Styles
   ============================================ */

/* === Dashboard Layout === */
.dashboard {
    display: flex;
    min-height: 100vh;
    background: var(--bg-primary);
}

/* === Sidebar === */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
}

/* Sidebar Header */
.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.sidebar-logo-img {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.sidebar-nav-top {
    display: flex;
    gap: 10px;
}

.sidebar-nav-top a {
    padding: 8px 15px;
    font-size: 13px;
    color: var(--text-muted);
    border-radius: 4px;
    transition: all 0.3s;
}

.sidebar-nav-top a:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.sidebar-nav-top a.active {
    color: var(--accent-primary);
}

/* Server Selector */
.server-selector {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.server-selector-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.server-select {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

.server-select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* Sidebar Menu */
.sidebar-menu {
    padding: 20px 0;
    flex: 1;
}

.menu-section {
    margin-bottom: 25px;
}

.menu-section-title {
    padding: 0 20px;
    margin-bottom: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.3s;
    cursor: pointer;
}

.menu-item:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.menu-item.active {
    background: linear-gradient(90deg, rgba(212, 161, 74, 0.1), transparent);
    color: var(--accent-primary);
    border-left: 3px solid var(--accent-primary);
}

.menu-item-icon {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.menu-item-badge {
    margin-left: auto;
    padding: 2px 8px;
    background: var(--accent-primary);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    color: #000;
}

/* Server Status in Sidebar */
.sidebar-servers {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.sidebar-servers-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.sidebar-server-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 13px;
}

.sidebar-server-name {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.sidebar-server-icon {
    font-size: 14px;
}

.sidebar-server-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.sidebar-server-badge.online {
    background: rgba(0, 200, 83, 0.15);
    color: var(--accent-green);
}

.sidebar-server-badge.soon {
    background: rgba(212, 161, 74, 0.15);
    color: var(--accent-primary);
}

/* === Main Content === */
.dashboard-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a24 0%, #0a0a0f 100%);
    background-size: cover;
    background-position: center right;
    background-attachment: fixed;
    position: relative;
}

.dashboard-main::before {
    content: '';
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 15, 0.75);
    pointer-events: none;
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 30px;
    background: rgba(18, 18, 26, 0.95);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
}

.dashboard-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.create-account-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--accent-primary);
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #000;
    cursor: pointer;
    transition: all 0.3s;
}

.create-account-btn:hover {
    background: var(--accent-primary-hover);
    transform: translateY(-1px);
}

.dashboard-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-icon-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
}

.header-icon-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: #000;
    cursor: pointer;
}

/* Dashboard Content */
.dashboard-content {
    padding: 30px;
    flex: 1;
    position: relative;
    z-index: 1;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(26, 26, 36, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.stat-card-title {
    font-size: 14px;
    color: var(--text-muted);
}

.stat-card-menu {
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
}

.stat-card-value {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-icon {
    font-size: 28px;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 600;
}

.stat-number.gold {
    color: var(--accent-primary);
}

/* Game Accounts Section */
.section-box {
    background: rgba(26, 26, 36, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.section-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.section-box-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 500;
}

.btn-small {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--accent-primary);
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #000;
    cursor: pointer;
}

.btn-small:hover {
    background: var(--accent-primary-hover);
}

/* Accounts Table */
.accounts-table {
    width: 100%;
}

.accounts-table th,
.accounts-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.accounts-table th {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: transparent;
}

.accounts-table tr:last-child td {
    border-bottom: none;
}

.accounts-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.account-rank {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--accent-primary);
}

.account-name {
    font-weight: 600;
}

.account-date {
    color: var(--text-muted);
    font-size: 13px;
}

.account-chars {
    color: var(--accent-green);
}

.btn-hwid {
    padding: 6px 14px;
    background: var(--accent-primary);
    border: none;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #000;
    cursor: pointer;
}

.btn-hwid:hover {
    background: var(--accent-primary-hover);
}

.account-menu {
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
}

/* Help Box */
.help-box {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: rgba(26, 26, 36, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.help-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.help-text {
    flex: 1;
}

.help-text h4 {
    font-family: var(--font-display);
    font-size: 16px;
    margin-bottom: 5px;
}

.help-text p {
    font-size: 13px;
    color: var(--text-muted);
}

.btn-help {
    padding: 12px 25px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s;
}

.btn-help:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* === Modal: Create Game Account === */
.modal-create-account {
    max-width: 500px;
}

.modal-create-account .modal-body {
    padding: 30px;
}

.modal-create-account h2 {
    font-family: var(--font-display);
    font-size: 22px;
    margin-bottom: 25px;
    text-align: center;
}

.create-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-with-prefix {
    display: flex;
    align-items: center;
}

.input-prefix {
    padding: 14px 15px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-with-prefix .form-input {
    border-radius: 0 4px 4px 0;
    flex: 1;
}

.btn-create {
    padding: 16px;
    background: var(--accent-primary);
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #000;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-create:hover {
    background: var(--accent-primary-hover);
}

/* === Responsive === */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .dashboard-main {
        margin-left: 0;
    }
    
    .dashboard-main::before {
        left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-content {
        padding: 20px;
    }
    
    .dashboard-header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }
    
    .accounts-table {
        display: block;
        overflow-x: auto;
    }
    
    .help-box {
        flex-direction: column;
        text-align: center;
    }
}
