* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Tahoma, sans-serif;
}

body {
    background: #f0f2f5;
}

/* ===== ساختار اصلی ===== */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ===== سایدبار ===== */
.sidebar {
    width: 250px;
    background: #1a1a2e;
    color: white;
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    padding: 20px 0;
    z-index: 1040;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.sidebar-header {
    text-align: center;
    padding: 0 0 20px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h5 {
    margin: 0;
    color: white;
}

.sidebar-header small {
    color: #888;
}

.sidebar nav {
    padding: 15px 0;
}

.sidebar nav a {
    display: block;
    padding: 12px 25px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    margin: 3px 10px;
    border-radius: 10px;
    transition: all 0.3s;
}

.sidebar nav a:hover {
    background: rgba(255,255,255,0.08);
    color: white;
}

.sidebar nav a.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.sidebar nav a.text-danger {
    color: #ff6b6b !important;
}

.sidebar nav a.text-danger:hover {
    background: rgba(255,107,107,0.15);
}

.sidebar nav hr {
    border-color: rgba(255,255,255,0.08);
    margin: 15px 20px;
}

.sidebar nav .badge {
    background: #dc3545;
    color: white;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    float: left;
}

/* ===== محتوای اصلی ===== */
.main-content {
    margin-right: 250px;
    flex: 1;
    padding: 30px;
    min-height: 100vh;
}

/* ===== گرادیانت‌ها ===== */
.gradient-text {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-gradient {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    color: white;
    padding: 10px 25px;
    border-radius: 10px;
    transition: all 0.3s;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    color: white;
}

/* ===== کارت‌ها ===== */
.card-custom {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

/* ===== جدول ===== */
.table-custom {
    width: 100%;
    border-collapse: collapse;
}

.table-custom th {
    background: #f8f9fa;
    padding: 12px 15px;
    text-align: right;
    border-bottom: 2px solid #dee2e6;
}

.table-custom td {
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
}

.table-custom tr:hover {
    background: #f8f9fa;
}

/* ===== بج‌ها ===== */
.badge-admin { background: #dc3545; color: white; padding: 4px 12px; border-radius: 20px; font-size: 12px; }
.badge-deputy { background: #007bff; color: white; padding: 4px 12px; border-radius: 20px; font-size: 12px; }
.badge-teacher { background: #28a745; color: white; padding: 4px 12px; border-radius: 20px; font-size: 12px; }
.badge-student { background: #17a2b8; color: white; padding: 4px 12px; border-radius: 20px; font-size: 12px; }
.badge-active { background: #28a745; color: white; padding: 4px 12px; border-radius: 20px; font-size: 12px; }
.badge-inactive { background: #dc3545; color: white; padding: 4px 12px; border-radius: 20px; font-size: 12px; }

/* ===== دکمه کوچک ===== */
.btn-sm-custom {
    padding: 4px 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
}

.btn-sm-custom:hover {
    background: #f0f0f0;
}

/* ===== واکنش‌گرایی موبایل ===== */
@media (max-width: 768px) {
    .sidebar {
        right: -280px;
        width: 280px;
    }
    
    .sidebar.active {
        right: 0;
        box-shadow: 0 0 30px rgba(0,0,0,0.3);
    }
    
    .main-content {
        margin-right: 0;
        padding: 15px;
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1039;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
    
    .mobile-menu-btn {
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 1050;
        width: 55px;
        height: 55px;
        border-radius: 50%;
        border: none;
        background: linear-gradient(135deg, #667eea, #764ba2);
        color: white;
        font-size: 24px;
        box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
        cursor: pointer;
        transition: all 0.3s;
    }
    
    .mobile-menu-btn:hover {
        transform: scale(1.1);
    }
}