/* ================= GLOBAL CUSTOM VARIABLES ================= */
:root {
    --bg-main: #0b0f19;
    --bg-card: #151c2c;
    --bg-card-hover: #1e2638;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(99, 102, 241, 0.35);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --primary: #6366f1;       /* Indigo */
    --primary-gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
    --secondary-gradient: linear-gradient(135deg, #3b82f6, #06b6d4);
    --warning-gradient: linear-gradient(135deg, #f59e0b, #ef4444);
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --font-sans: 'Outfit', 'Inter', -apple-system, sans-serif;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ================= BASIC RESET & ROOT SETUP ================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* Enable smooth one-finger momentum scroll on mobile webview */
}

/* Disable selection only on UI controls for native app touch responses */
.nav-item, .mobile-nav-item, button, .brand-logo, .sidebar-logo, .pill, .badge-item, .logo-icon, i, .sidebar-creator {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Ensure all other contents (chat bubbles, paragraphs, lists) are selectable on web */
p, span, h1, h2, h3, h4, h5, li, pre, code, td, th, div:not(.nav-item):not(.mobile-nav-item):not(.sidebar-creator) {
    -webkit-user-select: text;
    user-select: text;
}

body::-webkit-scrollbar {
    width: 8px;
}
body::-webkit-scrollbar-track {
    background: var(--bg-main);
}
body::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
body::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: var(--font-sans);
    cursor: pointer;
}

/* ================= HELPER CLASSES ================= */
.hidden {
    display: none !important;
}

/* ================= AUTHENTICATION VIEWS ================= */
.auth-view {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 24px;
    background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.08) 0%, rgba(0, 0, 0, 0) 90%);
}

.brand-header {
    margin-bottom: 24px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #a5b4fc, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-icon {
    stroke: #818cf8;
    width: 32px;
    height: 32px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 40px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.auth-card:hover {
    border-color: var(--border-hover);
}

.auth-card h1 {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #f8fafc, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-card h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 32px;
}

.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 32px;
}

/* Primary/Secondary Buttons */
.primary-btn {
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.primary-btn:active {
    transform: translateY(0);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.25s;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.feature-pills {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 30px;
    padding: 6px 14px;
    font-size: 0.85rem;
    color: #a5b4fc;
}

.pill-icon {
    width: 14px;
    height: 14px;
}

/* Auth Forms */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}

.auth-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    text-align: left;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group.full-width {
    grid-column: span 2;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.input-group input, .input-group select, .input-group textarea {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.input-group input:focus, .input-group select:focus, .input-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.input-group textarea {
    resize: vertical;
    min-height: 100px;
}

.submit-btn {
    margin-top: 10px;
}

.switch-auth {
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.switch-auth span {
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

/* ================= MAIN LAYOUT SCREEN ================= */
#main-container {
    width: 100%;
}

#app-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar (Desktop) */
.sidebar {
    width: 260px;
    background: #0f1524;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
}

.sidebar-logo {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

.sidebar-menu {
    flex-grow: 1;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    width: 100%;
    text-align: left;
    transition: all 0.2s;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(99, 102, 241, 0.1);
    color: #a5b4fc;
    font-weight: 600;
}

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

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.user-badge-small {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.user-meta {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-name-small {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.logout-icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-icon-btn:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

/* Content Wrapper */
.content-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--bg-main);
}

/* App Header */
.app-header {
    height: 80px;
    border-bottom: 1px solid var(--border-color);
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(12px);
    z-index: 99;
}

.header-welcome .greetings {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-welcome h2 {
    font-size: 1.4rem;
    font-weight: 700;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.action-badge-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 10px;
    border-radius: 10px;
    position: relative;
    transition: all 0.2s;
}

.action-badge-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.badge-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--bg-main);
}

.header-divider {
    width: 1px;
    height: 24px;
    background: var(--border-color);
}

.quick-campus-ai-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
    transition: all 0.2s;
}

.quick-campus-ai-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

/* View Container */
.view-container {
    padding: 32px;
    flex-grow: 1;
}

.content-view {
    animation: fadeIn 0.4s ease-out;
}

/* ================= CARDS GENERAL STYLING ================= */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ================= STEP 3: DASHBOARD ELEMENTS ================= */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.dashboard-grid .full-width {
    grid-column: span 2;
}

/* Attendance stats */
.attendance-flex {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 20px;
}

.circular-progress-container {
    position: relative;
    width: 120px;
    height: 120px;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring__circle {
    transition: stroke-dashoffset 0.6s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.progress-val {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
}

.attendance-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.breakdown-item {
    display: flex;
    flex-direction: column;
}

.breakdown-item .lbl {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.breakdown-item .val {
    font-size: 1.3rem;
    font-weight: 700;
}

.breakdown-item .val.green {
    color: var(--success);
}

.attendance-bar-indicators {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.subj-bar-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.subj-meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 500;
}

.subj-pct-val {
    color: var(--success);
    font-weight: 600;
}

.subj-pct-val.low {
    color: var(--danger);
}

.subj-bar-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.subj-bar-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.subj-bar-fill.warning {
    background: var(--warning-gradient);
}

/* Streak and Coding Widget */
.dsa-streak-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.streak-count-badge {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.streak-grid {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
}

.streak-radial {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.streak-fire-glow {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.2) 0%, rgba(239, 68, 68, 0.05) 100%);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
}

.fire-icon {
    width: 32px;
    height: 32px;
    stroke: var(--warning);
    fill: var(--warning);
    animation: bounceFire 1.5s infinite ease-in-out;
}

@keyframes bounceFire {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.6)); }
}

.dsa-progress-info {
    flex-grow: 1;
}

.dsa-progress-info h4 {
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.dsa-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.dsa-bar-fill {
    height: 100%;
    background: var(--secondary-gradient);
    border-radius: 4px;
}

.dsa-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.streak-week {
    display: flex;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.week-bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.bubble-day {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
}

.week-bubble.active .bubble-day {
    background: var(--warning-gradient);
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}

/* Today's Classes schedule cards list */
.classes-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.class-card-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.class-card-item:hover {
    border-color: rgba(99, 102, 241, 0.25);
    background: rgba(99, 102, 241, 0.03);
}

.class-card-details h4 {
    font-size: 1.05rem;
    font-weight: 600;
}

.class-card-details .time {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.class-card-details i {
    width: 14px;
    height: 14px;
}

.class-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary);
}

/* Pending assignments list */
.mini-assignments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mini-assign-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.mini-assign-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.mini-assign-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
}

.mini-assign-info .deadline {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Campus AI quick card */
.campus-ai-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 14px;
}

.quick-ask-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.quick-ask-bubble {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border-radius: 8px;
    padding: 10px;
    text-align: left;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.quick-ask-bubble:hover {
    background: rgba(99, 102, 241, 0.12);
    transform: translateX(4px);
}

.quick-ask-input {
    display: flex;
    gap: 8px;
}

.quick-ask-input input {
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    color: white;
    font-size: 0.85rem;
    outline: none;
}

.quick-ask-input input:focus {
    border-color: var(--primary);
}

.quick-ask-input button {
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 8px;
    width: 38px;
    height: 38px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

.quick-ask-input button:hover {
    transform: scale(1.05);
}

/* ================= GENERAL VIEW PANELS & FORM STRUCTURES ================= */
.split-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 24px;
    align-items: start;
}

.form-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.panel-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 12px;
}

.panel-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.demo-notice {
    margin-top: 16px;
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 12px;
    padding: 14px;
}

.demo-notice p {
    font-size: 0.8rem;
    color: #cbd5e1;
    margin-bottom: 10px;
    line-height: 1.4;
}

.btn-sm {
    padding: 8px 16px !important;
    font-size: 0.85rem !important;
}

/* ================= STEP 4: TIMETABLE WIDGET ================= */
.timetable-grid-wrapper {
    overflow-x: auto;
}

.timetable-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.timetable-table th, .timetable-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.timetable-table th {
    font-weight: 600;
    color: var(--text-secondary);
}

.timetable-table tr:hover {
    background: rgba(255, 255, 255, 0.01);
}

.action-row-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    transition: all 0.2s;
}

.action-row-btn:hover {
    color: var(--danger);
}

.empty-state {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 48px;
    color: var(--text-muted);
    gap: 14px;
}

.empty-state i {
    width: 48px;
    height: 48px;
}

.empty-state p {
    max-width: 280px;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* ================= STEP 6: ASSIGNMENT COMPONENT ================= */
.file-drop-area {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    background: rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: border-color 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.file-drop-area:hover {
    border-color: var(--primary);
}

.file-drop-area i {
    width: 28px;
    height: 28px;
    color: var(--text-secondary);
}

.file-msg {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.assignments-scroller {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 8px;
}

.assignments-scroller::-webkit-scrollbar {
    width: 6px;
}
.assignments-scroller::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}

.assignment-card-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.assign-header-row {
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.assign-meta-group h4 {
    font-size: 1.05rem;
    font-weight: 700;
}

.assign-meta-group .sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.date-badge {
    background: rgba(99, 102, 241, 0.1);
    color: #a5b4fc;
    border-radius: 30px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.assign-attachment-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.1);
    padding: 6px 12px;
    border-radius: 8px;
    width: max-content;
}

.assign-attachment-row i {
    width: 14px;
    height: 14px;
}

.assign-actions-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 14px;
}

.assign-ai-shortcuts {
    display: flex;
    gap: 8px;
}

.ai-pill-btn {
    background: rgba(139, 92, 246, 0.1);
    color: #c084fc;
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.ai-pill-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    transform: translateY(-1px);
}

.complete-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.complete-checkbox input {
    accent-color: var(--success);
    width: 16px;
    height: 16px;
}

/* ================= STEP 8: DSA CODING INTERFACE ================= */
.challenge-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.challenge-row-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.challenge-row-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.challenge-row-item.active {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.challenge-info-block h4 {
    font-size: 0.95rem;
    font-weight: 600;
}

.difficulty-tag {
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    padding: 2px 6px;
}

.difficulty-tag.easy {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.difficulty-tag.medium {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.status-badge-solve {
    font-size: 0.8rem;
    font-weight: 600;
}

.status-badge-solve.solved {
    color: var(--success);
}

.status-badge-solve.pending {
    color: var(--text-muted);
}

/* Code Editor Card */
.editor-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.editor-header h4 {
    font-size: 1.2rem;
    font-weight: 700;
}

.problem-statement {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    background: rgba(0, 0, 0, 0.15);
    padding: 14px;
    border-radius: 8px;
}

.code-editor-box {
    display: flex;
    background: #080c14;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.editor-gutter {
    background: #0c1220;
    border-right: 1px solid var(--border-color);
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    user-select: none;
}

.code-editor-box textarea {
    flex-grow: 1;
    background: transparent;
    border: none;
    resize: none;
    color: #38bdf8; /* Cyan-sky text color */
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    padding: 16px;
    height: 220px;
    line-height: 1.5;
    outline: none;
}

.editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.console-output {
    background: #080c14;
    border-top: 2px solid var(--primary);
    border-radius: 8px;
    padding: 14px;
}

.console-output h5 {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.console-output pre {
    font-family: monospace;
    font-size: 0.85rem;
    color: #e2e8f0;
}

/* ================= STEP 7: AI ASSISTANT & CHAT SYSTEM ================= */
.ai-chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 180px);
    justify-content: space-between;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    margin-bottom: 16px;
}

.ai-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.ai-avatar i {
    color: white;
    width: 22px;
    height: 22px;
}

.ai-title-details h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.ai-title-details span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.chat-logs {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 8px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
}

.chat-logs::-webkit-scrollbar {
    width: 6px;
}
.chat-logs::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}

.chat-msg {
    display: flex;
    max-width: 75%;
}

.chat-msg.user {
    align-self: flex-end;
}

.chat-msg.ai {
    align-self: flex-start;
}

.chat-msg .bubble {
    padding: 12px 18px;
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.chat-msg.user .bubble {
    background: var(--primary-gradient);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.chat-msg.ai .bubble {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: #cbd5e1;
    border-bottom-left-radius: 4px;
}

.chat-msg .bubble ul {
    margin-left: 20px;
    margin-top: 6px;
}

.chat-suggestions-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 12px;
}

.suggest-chip {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s;
}

.suggest-chip:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, 0.3);
}

.chat-input-bar {
    display: flex;
    gap: 12px;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.chat-input-bar input {
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 20px;
    color: white;
    font-size: 0.95rem;
    outline: none;
}

.chat-input-bar input:focus {
    border-color: var(--primary);
}

/* ================= STEP 9: RESUME AI GENERATOR ================= */
.resume-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 24px;
    align-items: start;
}

.resume-results {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ai-suggestions-card {
    background: rgba(139, 92, 246, 0.05);
    border-color: rgba(139, 92, 246, 0.15);
}

.ai-suggestions-card h4 {
    color: #c084fc;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.ai-suggestions-card ul {
    margin-left: 20px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
}

.resume-preview-card {
    background: white !important;
    color: #1e293b !important;
    padding: 40px !important;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.resume-doc-body {
    font-family: serif; /* Classic resume styling */
    color: #1e293b;
    line-height: 1.4;
}

.res-doc-header {
    text-align: center;
}

.res-doc-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.res-doc-header p {
    font-size: 0.85rem;
    color: #475569;
}

.res-divider {
    border: none;
    border-top: 1px solid #cbd5e1;
    margin: 16px 0;
}

.res-doc-section {
    margin-bottom: 16px;
}

.res-doc-section h3 {
    font-size: 0.95rem;
    text-transform: uppercase;
    color: #334155;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 4px;
    margin-bottom: 8px;
    font-weight: 700;
}

.res-doc-section p {
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.res-project-item {
    margin-bottom: 8px;
}

.res-project-item strong {
    font-size: 0.88rem;
}

.res-project-item p {
    font-size: 0.82rem;
    color: #475569;
}

.preview-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
    border-top: 1px solid #cbd5e1;
    padding-top: 16px;
}

/* ================= STEP 10: PROFILE DETAILS ================= */
.profile-layout-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.profile-header-card {
    position: relative;
    padding: 0 0 24px 0 !important;
    overflow: hidden;
}

.profile-banner-grad {
    height: 120px;
    background: var(--primary-gradient);
}

.profile-header-meta {
    padding: 0 24px;
    display: flex;
    align-items: flex-end;
    gap: 20px;
    margin-top: -50px;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 4px solid var(--bg-card);
    box-shadow: var(--shadow-lg);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}

.profile-identity {
    flex-grow: 1;
    margin-bottom: 10px;
}

.profile-identity h2 {
    font-size: 1.6rem;
    font-weight: 800;
}

.profile-identity p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.profile-rank-badge {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 12px;
    padding: 12px 20px;
    text-align: center;
    margin-bottom: 10px;
}

.profile-rank-badge .rank-lbl {
    font-size: 0.75rem;
    color: #a5b4fc;
    text-transform: uppercase;
    display: block;
    margin-bottom: 2px;
}

.profile-rank-badge .rank-val {
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.p-stat {
    display: flex;
    align-items: center;
    gap: 16px;
}

.p-stat i {
    width: 28px;
    height: 28px;
}

.p-stat i.purple { color: #c084fc; }
.p-stat i.orange { color: var(--warning); }
.p-stat i.blue { color: #38bdf8; }

.p-stat .lbl {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: block;
}

.p-stat .val {
    font-size: 1.25rem;
    font-weight: 700;
}

.badges-card .badges-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.badge-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.badge-item .badge-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
}

.badge-item.unlocked .badge-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-item.unlocked .badge-icon.streak-badge {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge-item.locked {
    opacity: 0.5;
}

.badge-item.locked .badge-icon {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-muted);
}

.badge-item span {
    font-size: 0.95rem;
    font-weight: 600;
}

.badge-item .badge-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

/* ================= MODALS & TOAST BANNERS ================= */

/* Attendance Notification Toast */
.attendance-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    background: rgba(21, 28, 44, 0.95);
    border: 1px solid var(--primary);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3), 0 0 15px rgba(99, 102, 241, 0.15);
    border-radius: 16px;
    padding: 20px;
    max-width: 380px;
    width: calc(100% - 48px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 16px;
    backdrop-filter: blur(12px);
    animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.toast-content {
    display: flex;
    gap: 14px;
    align-items: center;
}

.toast-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary);
}

.pulse-icon {
    animation: pulseGlow 1.5s infinite ease-in-out;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); filter: drop-shadow(0 0 6px var(--primary)); }
}

.toast-text h4 {
    font-size: 0.95rem;
    font-weight: 700;
}

.toast-text p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.toast-actions {
    display: flex;
    gap: 10px;
}

.toast-btn {
    flex-grow: 1;
    border: none;
    padding: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s;
}

.toast-btn.present {
    background: var(--success);
    color: white;
}

.toast-btn.absent {
    background: var(--danger);
    color: white;
}

.toast-btn:hover {
    filter: brightness(1.1);
}

/* Warning overlay */
.alert-overlay, .campus-ai-overlay, .assignment-ai-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1001;
    display: flex;
    justify-content: center;
    align-items: center;
}

.alert-card {
    background: var(--bg-card);
    border: 1px solid var(--danger);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 400px;
    width: calc(100% - 32px);
    text-align: center;
    box-shadow: 0 20px 50px rgba(239, 68, 68, 0.3);
    animation: scaleUp 0.3s ease;
}

@keyframes scaleUp {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.alert-icon-warning {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 16px auto;
}

.alert-card h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.alert-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.4;
}

.alert-btn {
    background: var(--danger);
    color: white;
    border: none;
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
}

/* Campus AI Modal Panel */
.campus-ai-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 480px;
    height: 560px;
    max-width: calc(100% - 32px);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.campus-ai-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.campus-ai-header .title-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.campus-ai-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.campus-ai-sparkle {
    color: #60a5fa;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
}

.campus-ai-chat-logs {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.campus-ai-chat-logs::-webkit-scrollbar {
    width: 6px;
}
.campus-ai-chat-logs::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}

.campus-ai-suggestions {
    padding: 10px 20px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.campus-suggest-chip {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 0.78rem;
    white-space: nowrap;
}

.campus-ai-input-bar {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}

.campus-ai-input-bar input {
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 16px;
    color: white;
    font-size: 0.9rem;
    outline: none;
}

.campus-ai-input-bar input:focus {
    border-color: #3b82f6;
}

/* Assignment Helper Modal */
.assignment-ai-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 500px;
    max-width: calc(100% - 32px);
    box-shadow: var(--shadow-lg);
    animation: scaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.assignment-ai-card .modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.assignment-ai-card .modal-body {
    padding: 24px;
}

.assignment-ai-card h4 {
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.ai-operation-tabs {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 16px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
}

.tab-btn.active {
    color: #c084fc;
    border-bottom: 2px solid #c084fc;
}

.ai-response-box {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 18px;
    min-height: 120px;
    max-height: 250px;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #cbd5e1;
}

/* ================= MOBILE BOTTOM NAV & RESPONSIVENESS ================= */
.mobile-nav {
    display: none;
}

@media (max-width: 1024px) {
    .split-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    
    .app-header {
        padding: 0 16px;
    }
    
    .view-container {
        padding: 16px;
        padding-bottom: 90px; /* Space for mobile bottom-nav */
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid .full-width {
        grid-column: span 1;
    }
    
    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: calc(64px + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        background: rgba(15, 21, 36, 0.95);
        backdrop-filter: blur(12px);
        border-top: 1px solid var(--border-color);
        justify-content: space-around;
        align-items: center;
        z-index: 99;
        box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.3);
    }
    
    .mobile-nav-item {
        background: transparent;
        border: none;
        color: var(--text-muted);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        font-size: 0.75rem;
        flex-grow: 1;
        transition: all 0.2s;
    }
    
    .mobile-nav-item i {
        width: 20px;
        height: 20px;
    }
    
    .mobile-nav-item.active {
        color: #a5b4fc;
    }
    
    .auth-form-grid {
        grid-template-columns: 1fr;
    }
    
    .input-group.full-width {
        grid-column: span 1;
    }
    
    .auth-card {
        padding: 24px 16px;
    }
}

/* ================= DEVELOPER SPACE & CREDITS FOOTER ================= */
.developer-credit-footer {
    margin-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.developer-credit-footer .dev-name {
    color: #a5b4fc;
    font-weight: 700;
}

.dev-insta-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.dev-insta-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.dev-insta-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}

.dev-insta-btn i {
    width: 14px;
    height: 14px;
}

/* Sidebar Dev mentions */
.sidebar-creator {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.sidebar-creator-links {
    display: flex;
    gap: 10px;
}

.sidebar-creator-links a {
    color: var(--text-muted);
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.sidebar-creator-links a:hover {
    color: #a5b4fc;
}

.sidebar-creator-links i {
    width: 14px;
    height: 14px;
}

/* Developer Profile Page Card */
.developer-profile-card {
    background: linear-gradient(135deg, rgba(21, 28, 44, 0.7) 0%, rgba(99, 102, 241, 0.05) 100%) !important;
    border: 1px solid rgba(99, 102, 241, 0.2) !important;
    margin-top: 12px;
}

.developer-profile-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #a5b4fc;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.dev-desc {
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.dev-details-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 16px;
}

.dev-meta-text h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
}

.dev-meta-text p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.dev-social-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.dev-social-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
    color: white;
}

.dev-social-btn.pub {
    background: var(--primary-gradient);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.25);
}

.dev-social-btn.pub:hover {
    box-shadow: 0 6px 14px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.dev-social-btn.priv {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
}

.dev-social-btn.priv:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.dev-social-btn i {
    width: 14px;
    height: 14px;
}

/* ================= ADAPTIVE MOBILE & WEBVIEW FIXES ================= */
@media (max-width: 1024px) {
    .resume-layout {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
}

@media (max-width: 768px) {
    /* Header layout wraps cleanly */
    .app-header {
        height: auto !important;
        min-height: 70px;
        padding: 12px 16px !important;
        flex-direction: row !important;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .header-welcome {
        flex-grow: 1;
    }
    
    .header-welcome h2 {
        font-size: 1.15rem !important;
        margin-top: 2px;
    }

    .header-actions {
        gap: 10px;
    }

    .quick-campus-ai-btn {
        padding: 8px 12px !important;
        font-size: 0.8rem !important;
    }

    /* Content container limits */
    .view-container {
        padding: 12px !important;
        padding-bottom: 90px !important;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .content-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden;
    }

    /* Profile details cards spacing */
    .profile-stats-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .profile-header-meta {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center;
        margin-top: -40px !important;
        gap: 12px !important;
    }

    .profile-avatar-large {
        width: 80px !important;
        height: 80px !important;
        font-size: 2rem !important;
    }

    .profile-identity {
        margin-bottom: 0 !important;
    }

    .profile-rank-badge {
        width: 100%;
        margin-bottom: 0 !important;
    }

    /* Resume Preview Card formatting */
    .resume-preview-card {
        padding: 16px !important;
        width: 100%;
        box-sizing: border-box;
        overflow-x: auto;
    }

    .resume-doc-body {
        min-width: 280px;
    }

    /* Modals size limits */
    .campus-ai-panel {
        width: 100% !important;
        height: 90vh !important;
        max-width: 100% !important;
        border-radius: 16px 16px 0 0 !important;
        position: fixed;
        bottom: 0;
        left: 0;
        animation: slideUpBottom 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    @keyframes slideUpBottom {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    /* Code editor widths */
    .code-editor-box {
        width: 100% !important;
        max-width: 100% !important;
    }

    .code-editor-box textarea {
        font-size: 0.8rem !important;
        height: 180px !important;
    }

    /* Attendance flex layout */
    .attendance-flex {
        flex-direction: column !important;
        gap: 16px !important;
        text-align: center;
        justify-content: center;
    }

    .attendance-breakdown {
        align-items: center;
    }

    /* Badges layouts */
    .badges-card .badges-row {
        grid-template-columns: 1fr !important;
    }

    /* Timetable inputs & table adjustments */
    .input-row {
        grid-template-columns: 1fr !important;
    }

    .timetable-table th, .timetable-table td {
        padding: 10px 8px !important;
        font-size: 0.82rem !important;
    }

    /* Assignments mobile card adjustments */
    .assign-header-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }

    .assign-actions-footer {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        width: 100% !important;
    }

    .assign-ai-shortcuts {
        width: 100% !important;
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
    }

    /* DSA / Code Editor adjustments */
    .editor-gutter {
        display: none !important; /* Hide line numbers on mobile to fit screen */
    }

    .code-editor-box textarea {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .challenge-row-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
}

@media (max-width: 480px) {
    /* Welcome cards */
    .auth-card {
        padding: 20px 12px !important;
    }
    
    .auth-card h1 {
        font-size: 1.7rem !important;
    }

    .brand-logo {
        font-size: 1.4rem !important;
    }

    /* Developer profile card formatting */
    .dev-details-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px;
    }
    
    .dev-social-buttons {
        width: 100%;
    }

    .dev-social-btn {
        width: 100% !important;
        justify-content: center;
    }
}

/* ================= TODAY'S CLASSES ATTENDANCE ACTION BUTTONS ================= */
.class-status-action {
    display: flex;
    align-items: center;
}

.class-action-btns {
    display: flex;
    gap: 8px;
}

.mark-btn {
    border: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.mark-btn.p-btn {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.mark-btn.p-btn:hover {
    background: var(--success);
    color: white;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.4);
    transform: scale(1.08);
}

.mark-btn.a-btn {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.mark-btn.a-btn:hover {
    background: var(--danger);
    color: white;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.4);
    transform: scale(1.08);
}

.attended-tag {
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
}

.attended-tag.present {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.attended-tag.absent {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.attended-tag.waiting {
    background: rgba(245, 158, 11, 0.08);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.attended-tag i {
    width: 14px;
    height: 14px;
}

/* ================= PRIVACY POLICY COMPLIANCE LINKS ================= */
.sidebar-privacy-link {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-decoration: none;
    margin-top: 8px;
    transition: color 0.2s ease;
    text-align: center;
}

.sidebar-privacy-link:hover {
    color: var(--primary);
}

.footer-privacy-link {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    margin-top: 10px;
    transition: color 0.2s ease;
}

.footer-privacy-link:hover {
    color: var(--primary);
}

/* Mobile responsive card list layout for Timetable Table */
@media (max-width: 768px) {
    .timetable-table, 
    .timetable-table thead, 
    .timetable-table tbody, 
    .timetable-table th, 
    .timetable-table td, 
    .timetable-table tr {
        display: block;
    }

    .timetable-table thead {
        display: none !important; /* Hide column headers on mobile */
    }

    .timetable-table tr {
        background: rgba(255, 255, 255, 0.02) !important;
        border: 1px solid var(--border-color) !important;
        border-radius: var(--radius-lg) !important;
        margin-bottom: 16px !important;
        padding: 16px !important;
        box-shadow: var(--shadow-sm);
    }

    .timetable-table td {
        border-bottom: 1px dashed rgba(255, 255, 255, 0.05) !important;
        padding: 10px 0 !important;
        font-size: 0.9rem !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    .timetable-table td:last-child {
        border-bottom: none !important;
        padding-bottom: 0 !important;
        margin-top: 6px;
    }

    .timetable-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-secondary);
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .timetable-table td strong {
        color: var(--text-primary);
    }

    .actions-cell {
        justify-content: flex-end !important;
    }

    .section-select-row {
        flex-direction: column !important;
    }

    .section-select-row select,
    .section-select-row button {
        width: 100% !important;
    }
}


