@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Color Palette - Modern & Professional */
    --primary: #0b4ea2;
    --primary-hover: #083c82;
    --primary-soft: #eef4ff;

    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;

    --success: #10b981;
    --warning: #f59e0b;
    --danger: #e31b23;

    --sidebar-width: 260px;
    --top-nav-height: 70px;
    --border-radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--slate-50);
    color: var(--slate-900);
    overflow-x: hidden;
}

/* --- LAYOUT --- */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

/* --- SIDEBAR --- */
.sidebar {
    width: var(--sidebar-width);
    background: #ffffff;
    border-right: 1px solid var(--slate-200);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1000;
    transition: var(--transition);
}

.sidebar-logo {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--slate-900);
}

.sidebar-logo img {
    height: 32px;
}

.sidebar-nav {
    flex: 1;
    padding: 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--slate-600);
    text-decoration: none !important;
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    margin-bottom: 4px;
}

.nav-item:hover {
    background: var(--slate-100);
    color: var(--slate-900);
}

.nav-item.active {
    background: var(--primary-soft);
    color: var(--primary);
}

.nav-item i {
    font-size: 1.25rem;
    opacity: 0.7;
}

/* --- MAIN CONTENT --- */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    width: calc(100% - var(--sidebar-width));
}

.top-navbar {
    height: var(--top-nav-height);
    background: #ffffff;
    border-bottom: 1px solid var(--slate-200);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 999;
}

.search-bar {
    max-width: 400px;
    width: 100%;
    position: relative;
}

.search-bar i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--slate-300);
}

.search-bar input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    font-size: 0.875rem;
    transition: var(--transition);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.dashboard-container {
    padding: 32px;
    max-width: 1200px;
}

/* --- PREMIUM BLUE HERO --- */
.hero-glass {
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.15);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    color: #ffffff;
}

.hero-glass h4 {
    color: #ffffff !important;
    letter-spacing: -0.02em;
}

.hero-glass p {
    color: rgba(255, 255, 255, 0.85) !important;
}

.hero-accents {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: var(--primary);
    filter: blur(60px);
    opacity: 0.1;
    pointer-events: none;
}

/* --- PREMIUM CARD SYSTEM --- */
.card-premium {
    background: #ffffff;
    border: 1px solid var(--slate-200);
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-premium:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    border-color: var(--primary);
}

.card-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 20px;
}

.card-title {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--slate-900);
    margin-bottom: 8px;
    line-height: 1.4;
}

.card-description {
    font-size: 0.875rem;
    color: var(--slate-600);
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Specific Card Layouts */
.assignment-card {
    border: 1px solid var(--slate-200);
}

.material-card {
    background: linear-gradient(135deg, #ffffff 0%, var(--slate-50) 100%);
}

/* Helper Components */
.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

/* --- STATS ITEMS --- */
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 1.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--slate-600);
    font-weight: 500;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--slate-900);
}

/* --- TABLES --- */
.table-premium {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-premium th {
    background: var(--slate-50);
    padding: 12px 16px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--slate-600);
    font-weight: 600;
    border-bottom: 1px solid var(--slate-200);
}

.table-premium td {
    padding: 16px;
    border-bottom: 1px solid var(--slate-100);
    font-size: 0.9375rem;
}

/* --- UTILITIES --- */
.btn-primary-custom {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary-custom:hover {
    background: var(--primary-hover);
    transform: scale(1.02);
    color: #fff;
}

.badge-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.badge-submitted {
    background: #d1fae5;
    color: #065f46;
}

.badge-success-premium {
    background: #ecfdf5 !important;
    color: #059669 !important;
    border: 1px solid #10b981 !important;
    opacity: 1 !important;
}

.badge-success-branded {
    background: var(--primary-soft) !important;
    color: var(--primary) !important;
    border: 1px solid var(--primary) !important;
    opacity: 1 !important;
    font-weight: 700;
}

/* --- ASSIGNMENT CARD & PREMIUM COMPONENTS --- */
.assignment-description {
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 4.8rem;
}

.border-dashed {
    border-style: dashed !important;
}

.badge-premium {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-block;
}

.badge-hero {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.hero-glass .card-header-icon {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

.badge-blue {
    background: transparent;
    border: 1.5px solid var(--primary-soft);
    color: var(--primary);
}

.badge-green {
    background: #ecfdf5;
    color: #10b981;
}

.badge-orange {
    background: #fff7ed;
    color: #f59e0b;
}

.bg-slate-50 {
    background-color: var(--slate-50) !important;
}

/* RECENT ACTIVITY TIMELINE */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-item {
    display: flex;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--slate-100);
}

.activity-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

/* --- LOADER --- */
#pageLoader {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-custom {
    width: 40px;
    height: 40px;
    border: 3px solid var(--slate-100);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- LOGIN PAGE STYLES --- */
.login-wrapper {
    background-color: var(--slate-50);
}

.login-card {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    border-radius: 24px !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05) !important;
}

.login-icon-box {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ffffff 0%, var(--primary-soft) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: var(--shadow-sm);
}

.login-input {
    background: #ffffff !important;
    border: 1px solid var(--slate-200) !important;
    border-radius: 12px !important;
    padding: 12px 16px 12px 48px !important;
    transition: var(--transition) !important;
}

.login-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px var(--primary-soft) !important;
}

.login-icon-prefix {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--slate-400);
    z-index: 10;
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .sidebar.active {
        transform: translateX(0);
    }
}