/* =============================================
   SKS Board - Student Styles
   ============================================= */

/* =============================================
   STUDENT LOGIN PAGE
   ============================================= */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: var(--space-8);
}

.login-card {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    max-width: 500px;
    width: 100%;
    border: 1px solid var(--color-border);
}

.login-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.login-header h2 {
    color: var(--color-text);
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-2);
    font-weight: 600;
}

.login-header p {
    color: var(--color-text-light);
    font-size: var(--font-size-l);
    margin: 0;
}

.login-form {
    margin-bottom: var(--space-8);
}

.login-btn {
    width: 100%;
    padding: var(--space-4) var(--space-6);
    background: var(--student-accent);
    color: white;
    border: none;
    border-radius: var(--radius-m);
    font-size: var(--font-size-base);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.login-btn:hover {
    background: var(--student-accent-hover);
    transform: translateY(-1px);
}

.login-help {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-m);
    padding: var(--space-4);
}

.login-help p {
    margin: 0 0 var(--space-3) 0;
    font-weight: 500;
    color: var(--color-text);
}

.login-help ul {
    margin: 0;
    padding-left: var(--space-6);
}

.login-help li {
    color: var(--color-text-light);
    margin-bottom: var(--space-1);
}

/* Custom Select Dropdown */
.custom-select {
    position: relative;
}

.select-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-m);
    background: var(--color-surface);
    cursor: pointer;
    transition: var(--transition-fast);
}

.select-display:hover {
    border-color: var(--color-border-strong);
}

.select-display.active {
    border-color: var(--student-accent);
    box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.1);
}

.select-text {
    color: var(--color-text);
}

.select-text.placeholder {
    color: var(--color-text-muted);
}

.select-arrow {
    width: 20px;
    height: 20px;
    color: var(--color-text-light);
    transition: var(--transition-fast);
}

.select-display.active .select-arrow {
    transform: rotate(180deg);
}

.select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-top: none;
    border-radius: 0 0 var(--radius-m) var(--radius-m);
    box-shadow: var(--shadow-sm);
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    display: none;
}

.select-options.show {
    display: block;
}

.select-option {
    padding: var(--space-3) var(--space-4);
    cursor: pointer;
    transition: var(--transition-fast);
    border-bottom: 1px solid var(--color-border);
}

.select-option:last-child {
    border-bottom: none;
}

.select-option:hover {
    background: var(--secondary-bg);
}

.select-option.selected {
    background: var(--student-accent);
    color: white;
}

/* =============================================
   STUDENT DASHBOARD LAYOUT
   ============================================= */
.student-page .dashboard-container {
    display: flex;
    min-height: calc(100vh - 60px);
    background: var(--color-bg-alt);
    gap: 10px;
    padding: 10px;
}

/* =============================================
   STUDENT HEADER OVERRIDES
   ============================================= */
.student-page .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    text-align: left;
}

.header-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
}

.student-page .header-left {
    display: flex;
    align-items: center;
}

.student-page .header-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-4);
}

/* =============================================
   STUDENT SIDEBAR NAVIGATION  
   ============================================= */
.student-page .sidebar {
    width: 280px;
    min-width: 280px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.student-page .sidebar-content {
    padding: var(--space-6);
    height: 100%;
    overflow-y: auto;
}

.student-page .nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    color: var(--color-text-light);
    text-decoration: none;
    border-radius: var(--radius-m);
    transition: var(--transition-fast);
    font-weight: 500;
}

.student-page .nav-link:hover {
    background: var(--secondary-bg);
    color: var(--color-text);
}

.student-page .nav-link.active {
    background: var(--student-accent);
    color: white;
}

/* =============================================
   STUDENT MAIN CONTENT AREA
   ============================================= */
.student-page .main-content {
    flex: 1;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.student-page .content-header {
    padding: var(--space-6);
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
}

.student-page .content-body {
    flex: 1;
    padding: var(--space-6);
    overflow-y: auto;
    background: var(--color-bg-alt);
}

/* =============================================
   STUDENT DASHBOARD OVERVIEW
   ============================================= */
.student-page .overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
}

.student-page .overview-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-l);
    padding: var(--space-6);
    transition: var(--transition);
    cursor: pointer;
}

.student-page .overview-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    border-color: var(--student-accent);
}

/* =============================================
   STUDENT AI CHAT INTERFACE
   ============================================= */
.student-page .chat-container {
    height: calc(100vh - 300px);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-l);
    overflow: hidden;
}

.student-page .chat-messages {
    flex: 1;
    padding: var(--space-4);
    overflow-y: auto;
    background: var(--color-bg-alt);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.student-page .chat-messages::-webkit-scrollbar {
    display: none;
}

.student-page .message.user .message-avatar {
    background: var(--student-accent);
    color: white;
}

.student-page .message.user .message-content {
    background: var(--student-accent);
    color: white;
    border-color: var(--student-accent);
}

.student-page .chat-input:focus {
    border-color: var(--student-accent);
    box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.1);
}

.student-page .send-btn {
    background: var(--student-accent);
}

.student-page .send-btn:hover:not(:disabled) {
    background: var(--student-accent-hover);
}

/* =============================================
   STUDENT SPECIFIC FEATURES
   ============================================= */

/* Collaboard Page */
.collaboard-page {
    height: 100%;
    overflow-y: auto;
}

.collaboard-canvas {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-m);
    background: var(--color-surface);
    width: 100%;
    height: 400px;
    margin: var(--space-4) 0;
}

.collaboard-tools {
    display: flex;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    padding: var(--space-3);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-m);
}

.tool-btn {
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-m);
    background: var(--color-surface);
    cursor: pointer;
    transition: var(--transition-fast);
}

.tool-btn:hover {
    background: var(--secondary-bg);
}

.tool-btn.active {
    background: var(--student-accent);
    color: white;
    border-color: var(--student-accent);
}

/* Task Submission Page */
.task-submission-page {
    height: 100%;
    overflow-y: auto;
}

.task-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
}

.task-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-l);
    padding: var(--space-6);
    transition: var(--transition);
}

.task-card:hover {
    border-color: var(--student-accent);
    box-shadow: var(--shadow-sm);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
}

.task-status {
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-pill);
    font-size: var(--font-size-xs);
    font-weight: 500;
}

.task-status.pending {
    background: #fff3cd;
    color: #856404;
}

.task-status.submitted {
    background: #d4edda;
    color: #155724;
}

.task-status.overdue {
    background: #f8d7da;
    color: #721c24;
}

.file-upload-area {
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-m);
    padding: var(--space-6);
    text-align: center;
    transition: var(--transition-fast);
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: var(--student-accent);
    background: var(--color-bg-alt);
}

/* Notebook Page */
.notebook-page {
    height: 100%;
    overflow-y: auto;
}

.note-editor {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-m);
    min-height: 300px;
    padding: var(--space-4);
    background: var(--color-surface);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    resize: vertical;
}

.note-editor:focus {
    outline: none;
    border-color: var(--student-accent);
    box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.1);
}

.note-toolbar {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    padding: var(--space-3);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-m);
}

.note-btn {
    padding: var(--space-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-s);
    background: var(--color-surface);
    cursor: pointer;
    transition: var(--transition-fast);
}

.note-btn:hover {
    background: var(--secondary-bg);
}

/* Deadlines Page */
.deadlines-page {
    height: 100%;
    overflow-y: auto;
}

.deadline-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
}

.deadline-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--student-accent);
    border-radius: var(--radius-m);
    padding: var(--space-4);
    transition: var(--transition);
}

.deadline-item:hover {
    box-shadow: var(--shadow-sm);
}

.deadline-item.urgent {
    border-left-color: #dc3545;
}

.deadline-item.warning {
    border-left-color: #ffc107;
}

.deadline-date {
    font-size: var(--font-size-s);
    color: var(--color-text-muted);
    margin-top: var(--space-2);
}

/* =============================================
   STUDENT SCROLLBAR HIDING
   ============================================= */
.student-page .content-body::-webkit-scrollbar,
.collaboard-page::-webkit-scrollbar,
.task-submission-page::-webkit-scrollbar,
.notebook-page::-webkit-scrollbar,
.deadlines-page::-webkit-scrollbar {
    width: 0px;
    height: 0px;
    background: transparent;
    display: none;
}

/* =============================================
   STUDENT RESPONSIVE DESIGN
   ============================================= */
@media (max-width: 1024px) {
    .student-page .dashboard-container {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }
    
    .student-page .sidebar {
        width: 100%;
        min-width: auto;
        order: 2;
    }
    
    .student-page .main-content {
        order: 1;
        min-height: 60vh;
    }
    
    .header-center {
        position: static;
        transform: none;
        order: 2;
        margin: var(--space-2) 0;
    }
    
    .student-page .header-content {
        flex-direction: column;
        gap: var(--space-2);
        text-align: center;
    }
}

@media (max-width: 768px) {
    .login-container {
        padding: var(--space-4);
    }
    
    .login-card {
        padding: var(--space-6);
    }
    
    .student-page .dashboard-container {
        gap: var(--space-2);
        padding: var(--space-2);
    }
    
    .student-page .content-body,
    .student-page .sidebar-content {
        padding: var(--space-4);
    }
    
    .student-page .overview-cards {
        grid-template-columns: 1fr;
    }
    
    .student-page .chat-container {
        height: 50vh;
    }
    
    .collaboard-tools {
        flex-wrap: wrap;
    }
    
    .task-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
    }
}