:root {
    --primary-blue: #0f172a;
    --secondary-blue: #1e3a8a;
    --accent-blue: #3b82f6;
    --primary-orange: #f97316;
    --secondary-orange: #ea580c;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --text-main: #334155;
    --text-light: #64748b;
    --text-white: #f8fafc;
    
    --success: #10b981;
    --warning: #f59e0b;
    --purple: #8b5cf6;
    
    --border-color: rgba(226, 232, 240, 0.8);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-md: 12px;
    --radius-lg: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-main);
    overflow-x: hidden;
}

/* Utilities */
.text-orange { color: var(--primary-orange); }
.text-blue { color: var(--accent-blue); }
.text-green { color: var(--success); }
.text-warning { color: var(--warning); }

.bg-orange { background-color: var(--primary-orange); color: white; }
.bg-blue { background-color: var(--accent-blue); color: white; }
.bg-green { background-color: var(--success); color: white; }
.bg-purple { background-color: var(--purple); color: white; }

.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mr-2 { margin-right: 0.5rem; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-align-center { display: flex; align-items: center; }

/* Glassmorphism Panel */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
}

.glass-panel:hover {
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
    transform: translateY(-2px);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

.btn i { width: 18px; height: 18px; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary-orange), var(--secondary-orange));
    color: white;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}

.btn-secondary {
    background: var(--primary-blue);
    color: white;
}

.btn-secondary:hover {
    background: var(--secondary-blue);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-orange);
    color: var(--primary-orange);
    box-shadow: none;
}

.btn-outline:hover {
    background: rgba(249, 115, 22, 0.1);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: rgba(15, 23, 42, 0.05);
    color: var(--primary-blue);
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--text-light);
    font-weight: 500;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 1rem;
}

.btn-back:hover {
    color: var(--primary-blue);
    transform: translateX(-5px);
}

/* Badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-success { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary-blue);
}

.form-group input, .form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.9);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

.form-group input:focus, .form-group select:focus {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.select-sm, .select-md {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    font-family: inherit;
    outline: none;
}

/* App Container & Views */
.app-container {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    z-index: 1;
}

.view-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 10;
}

/* LOGIN VIEW */
.login-container {
    display: flex;
    height: 100%;
    width: 100%;
}

.login-left {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    display: flex;
    flex-direction: column;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.login-branding {
    z-index: 2;
}

.brand-icon {
    width: 48px;
    height: 48px;
    color: var(--primary-orange);
    margin-bottom: 1rem;
}

.login-branding h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-branding p {
    color: rgba(255,255,255,0.8);
    font-size: 1.1rem;
}

.login-illustration {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.gears-bg {
    position: absolute;
    opacity: 0.1;
}

.gear {
    color: white;
    position: absolute;
}

.gear-1 {
    width: 250px;
    height: 250px;
    top: -100px;
    left: -100px;
    animation: rotate 20s linear infinite;
}

.gear-2 {
    width: 150px;
    height: 150px;
    top: 60px;
    left: 110px;
    animation: rotate 15s linear infinite reverse;
}

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

.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light-bg);
    padding: 2rem;
}

.login-box {
    width: 100%;
    max-width: 450px;
    padding: 2.5rem;
}

.login-box h2 {
    color: var(--primary-blue);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.login-box .subtitle {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.forgot-pwd {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 500;
}

/* APP LAYOUT (Sidebar & Main Content) */
.app-layout {
    display: flex;
    background-color: #f1f5f9;
}

/* Sidebar */
.sidebar {
    width: 280px;
    height: 100%;
    background: white;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    z-index: 20;
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.brand-icon-small {
    color: var(--primary-orange);
    width: 32px;
    height: 32px;
}

.sidebar-header h2 {
    color: var(--primary-blue);
    font-size: 1.25rem;
    font-weight: 700;
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 1rem;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    color: var(--text-light);
    text-decoration: none;
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    transition: var(--transition);
    font-weight: 500;
    cursor: pointer;
}

.nav-item i { width: 20px; height: 20px; }

.nav-item:hover {
    background: rgba(15, 23, 42, 0.03);
    color: var(--primary-blue);
}

.nav-item.active {
    background: var(--primary-blue);
    color: white;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.2);
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.avatar {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-blue));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 0.95rem;
}

.user-role {
    font-size: 0.8rem;
    color: var(--text-light);
}

.btn-logout {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.btn-logout:hover {
    background: #ef4444;
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.topbar {
    height: 70px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 10;
}

.topbar-left, .topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-left h2 {
    font-size: 1.25rem;
    color: var(--primary-blue);
    font-weight: 600;
}

.search-bar {
    display: flex;
    align-items: center;
    background: var(--light-bg);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    width: 250px;
    border: 1px solid var(--border-color);
}

.search-bar i { color: var(--text-light); width: 18px; height: 18px; }
.search-bar input {
    border: none;
    background: transparent;
    padding-left: 0.5rem;
    width: 100%;
    outline: none;
    font-family: inherit;
}

.notifications { position: relative; }
.notifications .badge {
    position: absolute;
    top: 0; right: 0;
    background: var(--primary-orange);
    color: white;
    width: 18px; height: 18px;
    border-radius: 50%;
    font-size: 0.65rem;
    display: flex; align-items: center; justify-content: center;
    padding: 0;
}

/* Page Container (Scrollable) */
.page-container {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
}

.page-view {
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.stat-icon i { width: 28px; height: 28px; }

.stat-info h3 {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 0.25rem;
}
.stat-info .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.dashboard-charts {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.flex-2 { flex: 2; }
.flex-1 { flex: 1; }

.chart-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.card-header h3 { font-size: 1.1rem; color: var(--primary-blue); }

/* Table */
.table-responsive { overflow-x: auto; }
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th, .data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
.data-table th {
    font-weight: 600;
    color: var(--text-light);
    background: rgba(248, 250, 252, 0.5);
}
.data-table tbody tr { transition: var(--transition); }
.data-table tbody tr:hover { background: rgba(255, 255, 255, 0.8); }

.student-cell {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.student-avatar {
    width: 40px; height: 40px; border-radius: 50%;
}
.student-info h4 { font-size: 0.95rem; color: var(--primary-blue); margin-bottom: 0.2rem; }
.student-info span { font-size: 0.8rem; color: var(--text-light); }

/* Student Dashboard */
.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    margin-bottom: 2rem;
}
.profile-basic {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.profile-img { width: 80px; height: 80px; border-radius: 50%; border: 3px solid white; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.profile-info-text h2 { font-size: 1.8rem; color: var(--primary-blue); margin-bottom: 0.25rem; }
.profile-info-text p { color: var(--text-light); }

.student-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.upload-area {
    border: 2px dashed var(--accent-blue);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    background: rgba(59, 130, 246, 0.05);
    transition: var(--transition);
    cursor: pointer;
}
.upload-area:hover { background: rgba(59, 130, 246, 0.1); }
.upload-icon { width: 48px; height: 48px; color: var(--accent-blue); margin-bottom: 1rem; }
.upload-hint { display: block; font-size: 0.8rem; color: var(--text-light); margin-top: 0.5rem; }

.upload-list { list-style: none; }
.upload-list li {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    gap: 1rem;
}
.upload-list li:last-child { border-bottom: none; }
.upload-list li i { color: var(--text-light); }
.file-info { flex: 1; display: flex; flex-direction: column; }
.file-name { font-weight: 500; font-size: 0.95rem; }
.file-date { font-size: 0.8rem; color: var(--text-light); }

/* AI Analysis Results */
.ai-header { text-align: center; margin-bottom: 2rem; }
.ai-badge { 
    display: inline-flex; align-items: center; gap: 0.5rem; 
    background: rgba(16, 185, 129, 0.1); color: var(--success);
    padding: 0.5rem 1rem; border-radius: 20px; font-weight: 600; font-size: 0.9rem;
    margin-bottom: 1rem;
}
.ai-header h2 { font-size: 2rem; color: var(--primary-blue); margin-bottom: 0.5rem; }
.ai-header p { color: var(--text-light); max-width: 600px; margin: 0 auto; }

.recommendation-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3rem;
    background: linear-gradient(135deg, white, #fef3c7);
}
.highlight-border { border: 2px solid var(--primary-orange); box-shadow: 0 10px 30px rgba(249, 115, 22, 0.15); }

.recommendation-content { flex: 1; padding-right: 2rem; }
.recommendation-content .label { font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: 1px; font-size: 0.85rem; display: block; margin-bottom: 0.5rem; }
.recommendation-content h1 { font-size: 3rem; margin-bottom: 1rem; }
.recommendation-content .reasoning { font-size: 1.1rem; line-height: 1.6; color: var(--text-main); }

.score-circle {
    width: 150px; height: 150px;
    border-radius: 50%;
    background: white;
    border: 8px solid var(--primary-orange);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    box-shadow: 0 10px 25px rgba(249, 115, 22, 0.2);
}
.score-circle .score { font-size: 2.5rem; font-weight: 700; color: var(--primary-orange); }
.score-circle .score-label { font-size: 1rem; font-weight: 500; color: var(--text-light); }

.analysis-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.match-list-card, .strengths-card { padding: 1.5rem; }
.match-list-card h3, .strengths-card h3 { color: var(--primary-blue); margin-bottom: 1.5rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem; }

.match-item { margin-bottom: 1.5rem; }
.match-info { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-weight: 500; }
.progress-bar { width: 100%; height: 10px; background: var(--border-color); border-radius: 10px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 10px; transition: width 1s ease-out; }

.analysis-box { background: rgba(255,255,255,0.5); padding: 1rem; border-radius: var(--radius-md); border: 1px solid var(--border-color); }
.styled-list { list-style: none; margin-top: 0.5rem; }
.styled-list li { padding: 0.5rem 0; position: relative; padding-left: 1.5rem; }
.styled-list li::before { content: "•"; position: absolute; left: 0; color: var(--primary-orange); font-weight: bold; font-size: 1.2rem; }

.action-footer { display: flex; justify-content: center; gap: 1rem; padding: 2rem 0; }

.app-footer {
    display: none;
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-top: 1px solid var(--border-color);
    position: absolute;
    bottom: 0; width: 100%;
}
.app-footer p { color: var(--primary-blue); }
.app-footer .subtitle { font-size: 0.85rem; color: var(--text-light); margin-top: 0.2rem; }

/* Responsive */
@media (max-width: 992px) {
    .dashboard-charts, .student-grid, .analysis-details-grid { grid-template-columns: 1fr; }
    .recommendation-hero { flex-direction: column; text-align: center; }
    .recommendation-content { padding-right: 0; margin-bottom: 2rem; }
}

@media (max-width: 768px) {
    .login-container { flex-direction: column; }
    .login-left { padding: 2rem; flex: 0.5; }
    .login-box { padding: 1.5rem; }
    .sidebar { position: absolute; left: -280px; }
    .sidebar.open { left: 0; box-shadow: 10px 0 30px rgba(0,0,0,0.1); }
    .profile-header { flex-direction: column; gap: 1rem; text-align: center; }
}
