/**
 * Developer: amirhossinbanavand
 * Website: banclub.ir
 */

@font-face {
    font-family: 'CustomFont';
    src: url('../font/font.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-dark: #090514;
    --primary-purple: #8e2de2;
    --secondary-purple: #4a00e0;
    --glass-bg: rgba(20, 10, 40, 0.4);
    --glass-border: rgba(142, 45, 226, 0.2);
    --glass-hover: rgba(142, 45, 226, 0.15);
    --text-main: #ffffff;
    --text-muted: #a09eb0;
    --danger: #ff4b4b;
    --success: #00e676;
    --warning: #ffb300;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'CustomFont', Tahoma, Arial, sans-serif;
    direction: rtl;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(74, 0, 224, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(142, 45, 226, 0.15), transparent 25%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--primary-purple);
    border-radius: 4px;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    border-radius: 20px;
}

.sidebar {
    width: 280px;
    height: calc(100vh - 40px);
    margin: 20px 20px 20px 0;
    position: fixed;
    right: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    padding: 20px;
    transition: all 0.3s ease;
    z-index: 1000;
}

.brand {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 40px;
    background: linear-gradient(to left, var(--primary-purple), var(--secondary-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.nav-menu {
    list-style: none;
    flex-grow: 1;
}

.nav-item {
    margin-bottom: 10px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-size: 15px;
}

.nav-link svg {
    width: 20px;
    height: 20px;
    margin-left: 15px;
    fill: currentColor;
}

.nav-link:hover, .nav-link.active {
    background: var(--glass-hover);
    color: var(--text-main);
    border-right: 4px solid var(--primary-purple);
}

.main-content {
    flex: 1;
    margin-right: 300px;
    padding: 20px;
    transition: all 0.3s ease;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    margin-bottom: 30px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
}

.menu-toggle svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-profile img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--primary-purple);
    object-fit: cover;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    padding: 25px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100px;
    height: 100px;
    background: var(--primary-purple);
    opacity: 0.1;
    border-radius: 50%;
    filter: blur(20px);
}

.stat-title {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 15px;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: var(--text-main);
}

.tables-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.data-table-container {
    padding: 25px;
    overflow-x: auto;
}

.section-title {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}

th {
    padding: 15px;
    color: var(--text-muted);
    font-weight: normal;
    border-bottom: 1px solid var(--glass-border);
    white-space: nowrap;
}

td {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    font-size: 14px;
    white-space: nowrap;
}

tbody tr:hover {
    background: var(--glass-hover);
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.status-success { background: rgba(0, 230, 118, 0.1); color: var(--success); }
.status-warning { background: rgba(255, 179, 0, 0.1); color: var(--warning); }
.status-danger { background: rgba(255, 75, 75, 0.1); color: var(--danger); }

.action-btn {
    background: linear-gradient(45deg, var(--primary-purple), var(--secondary-purple));
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-size: 12px;
    transition: opacity 0.3s;
}

.action-btn:hover {
    opacity: 0.8;
}

@media (max-width: 992px) {
    .tables-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(120%);
        margin: 0;
        height: 100vh;
        border-radius: 0;
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .main-content {
        margin-right: 0;
        padding: 10px;
    }
    .menu-toggle {
        display: block;
    }
}