/* DCM - Distance Course Management */
:root {
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --sidebar-bg: #1e1b4b;
    --sidebar-text: #c7d2fe;
    --sidebar-hover: #312e81;
    --sidebar-active: #4f46e5;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: #f8fafc;
    color: #1e293b;
}

/* Sidebar */
.sidebar {
    width: 260px;
    height: 100vh;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    overflow-y: auto;
    transition: width 0.3s;
}

.sidebar .logo {
    padding: 24px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar .logo h4 {
    color: #fff;
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0;
}

.sidebar .logo small {
    color: var(--sidebar-text);
    font-size: 0.75rem;
}

.sidebar .nav-item .nav-link {
    color: var(--sidebar-text);
    padding: 10px 20px;
    border-radius: 8px;
    margin: 2px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    transition: all 0.2s;
    text-decoration: none;
}

.sidebar .nav-item .nav-link:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.sidebar .nav-item .nav-link.active {
    background: var(--sidebar-active);
    color: #fff;
}

.sidebar .nav-item .nav-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.sidebar .nav-section-title {
    padding: 12px 20px 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(199,210,254,0.5);
}

/* Main content */
.main-content {
    margin-left: 260px;
    min-height: 100vh;
}

.topbar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar .page-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #1e293b;
    margin: 0;
}

.content-area {
    padding: 24px;
}

/* Stat cards */
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    transition: box-shadow 0.2s;
}

.stat-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.stat-card .icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.stat-card .stat-label {
    color: #64748b;
    font-size: 0.875rem;
    margin-top: 4px;
}

/* Table styles */
.table-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.table-card .table-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.table-card .table-header h5 {
    margin: 0;
    font-weight: 600;
    color: #1e293b;
}

.table-card table {
    margin: 0;
}

.table-card table thead th {
    background: #f8fafc;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 16px;
}

.table-card table tbody td {
    padding: 12px 16px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}

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

.table-card table tbody tr:hover {
    background: #f8fafc;
}

/* Badges */
.badge-role-admin { background: #fef3c7; color: #92400e; }
.badge-role-mentor { background: #dbeafe; color: #1e40af; }
.badge-role-student { background: #d1fae5; color: #065f46; }

.badge-status-active { background: #d1fae5; color: #065f46; }
.badge-status-inactive { background: #fee2e2; color: #991b1b; }
.badge-status-completed { background: #e0e7ff; color: #3730a3; }
.badge-status-cancelled { background: #fef3c7; color: #92400e; }

/* Forms */
.form-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 24px;
}

.form-label {
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.form-control, .form-select {
    border-color: #d1d5db;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.9rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-sm {
    padding: 4px 10px;
    font-size: 0.8rem;
}

/* Avatar */
.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Login page */
.login-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4f46e5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-card .logo-area {
    text-align: center;
    margin-bottom: 32px;
}

.login-card .logo-area .logo-icon {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

/* Alert */
.alert {
    border-radius: 8px;
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 0;
        overflow: hidden;
    }
    .main-content {
        margin-left: 0;
    }
}

/* Utility */
.text-muted-sm {
    color: #94a3b8;
    font-size: 0.8rem;
}

.cursor-pointer { cursor: pointer; }
.border-radius-lg { border-radius: 12px; }
.fw-500 { font-weight: 500 !important; }
.fw-600 { font-weight: 600 !important; }
.fw-medium { font-weight: 500 !important; }

.bg-indigo { background: #4f46e5 !important; }
.bg-green { background: #10b981 !important; }
.bg-yellow { background: #f59e0b !important; }
.bg-red { background: #ef4444 !important; }
.bg-blue { background: #3b82f6 !important; }
.bg-purple { background: #8b5cf6 !important; }

/* Stat icon (frontend page) */
.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Badge status — to'liq ro'yxat */
.badge-status-active    { background: #d1fae5; color: #065f46; padding: 3px 10px; border-radius: 20px; font-size: 0.78rem; font-weight: 500; }
.badge-status-inactive  { background: #fee2e2; color: #991b1b; padding: 3px 10px; border-radius: 20px; font-size: 0.78rem; font-weight: 500; }
.badge-status-graduated { background: #e0e7ff; color: #3730a3; padding: 3px 10px; border-radius: 20px; font-size: 0.78rem; font-weight: 500; }
.badge-status-lead      { background: #fef3c7; color: #92400e; padding: 3px 10px; border-radius: 20px; font-size: 0.78rem; font-weight: 500; }
.badge-status-completed { background: #e0e7ff; color: #3730a3; padding: 3px 10px; border-radius: 20px; font-size: 0.78rem; font-weight: 500; }
.badge-status-cancelled { background: #fef3c7; color: #92400e; padding: 3px 10px; border-radius: 20px; font-size: 0.78rem; font-weight: 500; }

/* Payment method badges */
.badge-method-cash     { background: #d1fae5; color: #065f46; }
.badge-method-card     { background: #dbeafe; color: #1e40af; }
.badge-method-transfer { background: #e0e7ff; color: #3730a3; }

/* Card shadow hover */
.card { border-radius: 12px !important; }
.shadow-sm { box-shadow: 0 1px 8px rgba(0,0,0,0.07) !important; }

/* Auto-dismiss alert */
.auto-dismiss { animation: fadeOut 0.5s ease 4s forwards; }
@keyframes fadeOut { to { opacity: 0; pointer-events: none; } }
