/* Student Dashboard Specific Styles */

.student-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.student-header h1 {
    color: white;
    margin: 0;
}

.student-header .welcome-text {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 0.5rem;
}

.student-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
    overflow-x: auto;
}

.student-tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.student-tab:hover {
    color: var(--primary-color);
}

.student-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.student-panel {
    display: none;
}

.student-panel.active {
    display: block;
}

.assignment-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s;
}

.assignment-card:hover {
    box-shadow: var(--shadow-md);
}

.assignment-card.overdue {
    border-left: 4px solid var(--danger-color);
}

.assignment-card.completed {
    border-left: 4px solid var(--success-color);
}

.assignment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.assignment-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.assignment-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.assignment-meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.assignment-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.assignment-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.calendar-container {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.calendar-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.calendar-nav {
    display: flex;
    gap: 0.5rem;
}

.calendar-nav button {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.375rem 0.75rem;
    cursor: pointer;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.2s;
}

.calendar-nav button:hover {
    background-color: var(--bg-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.calendar-weekday {
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 0.5rem;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    padding: 0.5rem;
    background: var(--card-bg);
}

.calendar-day:hover {
    background-color: var(--bg-color);
    border-color: var(--primary-color);
}

.calendar-day-today {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.calendar-day-has-assignments {
    border-color: var(--warning-color);
    background-color: rgba(245, 158, 11, 0.05);
}

.calendar-day-holiday {
    border-color: #f59e0b;
    background-color: rgba(245, 158, 11, 0.18);
}

.calendar-day-empty {
    border: none;
    background: transparent;
    cursor: default;
}

.calendar-day-empty:hover {
    background: transparent;
    border-color: transparent;
}

.calendar-day-number {
    font-size: 0.9375rem;
    font-weight: 500;
}

.calendar-day-indicators {
    display: flex;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.calendar-indicator {
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 1;
}

.calendar-indicator-pending {
    background-color: rgba(59, 130, 246, 0.2);
    color: var(--primary-color);
}

.calendar-indicator-overdue {
    background-color: rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
}

.calendar-indicator-completed {
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--success-color);
}

.submission-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.file-input-wrapper {
    position: relative;
    display: inline-block;
}

.file-input-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.file-input-label:hover {
    background-color: var(--border-color);
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.selected-file {
    display: inline-block;
    margin-left: 1rem;
    padding: 0.5rem 1rem;
    background-color: var(--bg-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

.submission-history {
    margin-top: 1rem;
}

.submission-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-color);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
}

.submission-info {
    flex: 1;
}

.submission-filename {
    font-weight: 500;
    color: var(--text-primary);
}

.submission-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.submission-actions {
    display: flex;
    gap: 0.5rem;
}

.list-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.list-item-content {
    flex: 1;
    min-width: 0;
}

.list-item-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.list-item-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.list-item-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.submission-grouping {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.submission-grouping-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.submission-view-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.submission-group-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.submission-group-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.submission-group,
.subject-group {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--card-bg);
}

.submission-group > summary,
.subject-group > summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
}

.submission-group summary::-webkit-details-marker,
.subject-group summary::-webkit-details-marker {
    display: none;
}

.submission-group-content {
    padding: 0 1rem 1rem;
}

.subject-group {
    margin-top: 0.5rem;
    background: var(--bg-color);
}

.subject-group > summary {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
}

.group-title {
    font-weight: 600;
    color: var(--text-primary);
}

.group-count {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    background: var(--bg-color);
    border-radius: 999px;
    padding: 0.125rem 0.5rem;
    white-space: nowrap;
}

.submission-items .list-item {
    margin: 0.5rem 0 0;
}

@media (max-width: 768px) {
    .list-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .list-item-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state-text {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.empty-state-hint {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

/* Curriculum Section */
.subject-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.subject-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.subject-header:hover {
    background-color: var(--bg-color);
}

.subject-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.subject-icon {
    font-size: 2rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background-color: var(--bg-color);
}

.subject-details h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.subject-details p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.subject-toggle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.subject-card.expanded .subject-toggle {
    transform: rotate(180deg);
}

.subject-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.subject-card.expanded .subject-content {
    max-height: 800px;
}

.curriculum-iframe-container {
    padding: 1.5rem;
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
}

.curriculum-iframe {
    width: 100%;
    height: 600px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: white;
}

.curriculum-actions {
    display: flex;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--card-bg);
}

/* Focus Mode (Full-Screen) */
.focus-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    background-color: #fff;
}

.focus-modal.active {
    display: flex;
    flex-direction: column;
}

.focus-modal-header {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 10001;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.focus-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.focus-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.focus-frame {
    width: 100%;
    height: 100vh;
    border: none;
}

.progress-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 1rem 0;
}

.progress-emphasis {
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
}

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

.progress-value {
    font-size: 1.25rem;
    font-weight: 600;
}

.progress-subjects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.progress-subject {
    background: var(--bg-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
}

.progress-subject-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.progress-subject-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.notes-card {
    padding: 1.75rem;
    border: 1px solid rgba(37, 99, 235, 0.08);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.9) 0%, #ffffff 55%);
}

.notes-header {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.notes-subtitle {
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.notes-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notes-status {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.notes-status.is-success {
    color: var(--success-color);
}

.notes-status.is-warning {
    color: var(--warning-color);
}

.notes-status.is-error {
    color: var(--danger-color);
}

.notes-body {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 1.5rem;
}

.notes-main,
.notes-side {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.notes-section {
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    background: var(--card-bg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.notes-editor textarea {
    min-height: 240px;
    background: #ffffff;
}

.notes-body textarea {
    min-height: 220px;
}

.notes-resources {
    margin-top: 1.5rem;
}

.notes-side .notes-resources {
    margin-top: 0;
}

.notes-resources h3 {
    margin-bottom: 0.25rem;
}

.notes-hint {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.notes-resource-form {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.notes-resource-form input[type="text"],
.notes-resource-form input[type="url"] {
    flex: 1 1 220px;
}

.notes-resources-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.notes-resource-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
}

.notes-resource-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.notes-resource-meta a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.notes-resource-meta span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.notes-resource-group {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    background: var(--card-bg);
}

.notes-resource-group h4 {
    margin: 0 0 0.75rem;
}

.notes-resource-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.notes-scratchpad {
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.notes-scratchpad.expanded {
    background: #eef2ff;
    border-color: #c7d2fe;
}

.notes-scratchpad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.notes-scratchpad-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.notes-scratchpad-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.notes-scratchpad-label select {
    padding: 0.3rem 0.45rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: #ffffff;
    font-weight: 600;
}

.notes-scratch-tool.active {
    background: var(--primary-color);
    color: #ffffff;
}

.notes-scratchpad-canvas {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 0.75rem;
}

@media (max-width: 768px) {
    .calendar-weekday {
        font-size: 0.75rem;
        padding: 0.25rem;
    }

    .calendar-day {
        padding: 0.25rem;
    }

    .calendar-day-number {
        font-size: 0.8125rem;
    }

    .calendar-day-indicator {
        width: 4px;
        height: 4px;
    }

    .assignment-header {
        flex-direction: column;
        gap: 0.75rem;
    }

    .assignment-actions {
        width: 100%;
    }

    .assignment-actions .btn {
        flex: 1;
    }

    .subject-header {
        padding: 1rem;
    }

    .subject-icon {
        font-size: 1.5rem;
        width: 2.5rem;
        height: 2.5rem;
    }

    .subject-details h3 {
        font-size: 1.125rem;
    }

    .curriculum-iframe {
        height: 400px;
    }

    .notes-body {
        grid-template-columns: 1fr;
    }
}
