/* Parent Interface Styles */

/* Parent Login Interface */
.parent-login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.parent-login-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    text-align: center;
}

.parent-login-header {
    margin-bottom: 30px;
}

/* Parent Login Tabs */
.parent-login-tabs {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 30px;
    gap: 0;
}

.parent-tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    position: relative;
}

.parent-tab-btn:hover {
    color: #495057;
    background-color: #f8f9fa;
}

.parent-tab-btn.active {
    color: #8B5FBF;
    border-bottom-color: #8B5FBF;
    background-color: #f8f9fa;
}

.parent-tab-btn:first-child {
    border-radius: 8px 0 0 0;
}

.parent-tab-btn:last-child {
    border-radius: 0 8px 0 0;
}

/* Tab Content */
.parent-tab-content {
    display: none;
}

.parent-tab-content.active {
    display: block;
}

/* Parent Login Description */
.parent-login-description {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #8B5FBF;
}

.parent-login-description p {
    margin: 0;
    color: #495057;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Microsoft Sign-in Button */
.btn-microsoft {
    background: linear-gradient(135deg, #0078d4 0%, #106ebe 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.btn-microsoft:hover {
    background: linear-gradient(135deg, #106ebe 0%, #005a9e 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
}

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

.parent-login-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
}

.parent-login-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 0;
}

.parent-access-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(139, 95, 191, 0.1);
}

.parent-login-actions {
    margin-bottom: 20px;
}

.btn-parent-login {
    background: var(--primary-purple);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.btn-parent-login:hover {
    background: #7c3aed;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 95, 191, 0.3);
}

.parent-login-help {
    font-size: 14px;
    color: #6c757d;
    margin-top: 20px;
}

.parent-login-help a {
    color: var(--primary-purple);
    text-decoration: none;
    font-weight: 600;
}

.parent-login-help a:hover {
    text-decoration: underline;
}

/* Parent Login Tabs */
.parent-login-tabs {
    display: flex;
    margin-bottom: 24px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.parent-tab-btn {
    flex: 1;
    background: #f8f9fa;
    border: none;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.parent-tab-btn.active {
    background: white;
    color: var(--primary-purple);
    border-bottom-color: var(--primary-purple);
}

.parent-tab-btn:hover:not(.active) {
    background: #e9ecef;
    color: #495057;
}

.parent-tab-content {
    display: none;
}

.parent-tab-content.active {
    display: block;
}

/* Parent Dashboard Styles */
.parent-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.parent-dashboard-header {
    background: linear-gradient(135deg, #8B5FC7, #9C6CD3);
    color: white;
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 30px;
    text-align: center;
}

.parent-welcome-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.parent-welcome-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin: 0;
}

.student-selector-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.student-selector-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 16px;
}

.student-selector {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.student-selector-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    color: #495057;
}

.student-selector-btn:hover {
    background: #e9ecef;
    border-color: var(--primary-purple);
}

.student-selector-btn.active {
    background: var(--primary-purple);
    border-color: var(--primary-purple);
    color: white;
}

.parent-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.parent-content-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    cursor: pointer;
}

.parent-content-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.parent-card-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    display: block;
}

.parent-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
}

.parent-card-description {
    color: #6c757d;
    line-height: 1.5;
    margin-bottom: 16px;
}

.parent-card-meta {
    font-size: 14px;
    color: #8e8e93;
    display: flex;
    align-items: center;
    gap: 8px;
}

.parent-card-badge {
    background: var(--primary-purple);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.parent-card-badge.restricted {
    background: #fbbf24;
    color: #92400e;
}

/* Parent Sidebar */
.parent-sidebar {
    background: linear-gradient(180deg, #8B5FC7 0%, #9C6CD3 100%);
    width: 280px;
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    color: white;
    padding: 20px 0;
    box-shadow: 4px 0 12px rgba(139, 95, 199, 0.15);
    z-index: 1000;
}

.parent-sidebar-header {
    padding: 0 20px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 20px;
}

.parent-sidebar-logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.parent-sidebar-subtitle {
    font-size: 14px;
    opacity: 0.8;
    margin: 0;
}

.parent-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.parent-nav-item {
    margin-bottom: 4px;
}

.parent-nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 0;
}

.parent-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.parent-nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-right: 4px solid white;
}

.parent-nav-icon {
    margin-right: 12px;
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.parent-main-content {
    margin-left: 280px;
    padding: 20px;
    min-height: 100vh;
    background: #f8f9fa;
}

/* Homework Interface for Parents */
.parent-homework-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.homework-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.homework-status-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.homework-status-card.pending {
    border-color: #fbbf24;
    background: #fef3c7;
}

.homework-status-card.completed {
    border-color: #10b981;
    background: #d1fae5;
}

.homework-status-card.overdue {
    border-color: #ef4444;
    background: #fee2e2;
}

.homework-status-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.homework-status-label {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.homework-list {
    margin-top: 20px;
}

.homework-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.homework-item-content {
    flex: 1;
}

.homework-item-title {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
}

.homework-item-meta {
    font-size: 14px;
    color: #6c757d;
}

.homework-item-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.homework-item-status.pending {
    background: #fbbf24;
    color: #92400e;
}

.homework-item-status.completed {
    background: #10b981;
    color: #065f46;
}

.homework-item-status.overdue {
    background: #ef4444;
    color: #991b1b;
}

/* Messages Interface for Parents */
.parent-messages-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.messages-header {
    background: var(--primary-purple);
    color: white;
    padding: 20px;
}

.messages-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.conversation-list {
    border-right: 1px solid #e9ecef;
    height: 400px;
    overflow-y: auto;
}

.conversation-item {
    padding: 16px;
    border-bottom: 1px solid #f1f3f4;
    cursor: pointer;
    transition: background 0.2s ease;
}

.conversation-item:hover {
    background: #f8f9fa;
}

.conversation-item.active {
    background: #e7e3ff;
    border-left: 4px solid var(--primary-purple);
}

.conversation-with {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
}

.conversation-preview {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 8px;
}

.conversation-meta {
    font-size: 12px;
    color: #8e8e93;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.unread-badge {
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.message-thread {
    padding: 20px;
    height: 400px;
    overflow-y: auto;
}

.message-item {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.message-item.from-tutor {
    align-items: flex-start;
}

.message-item.from-parent {
    align-items: flex-end;
}

.message-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 12px;
    word-wrap: break-word;
}

.message-bubble.from-tutor {
    background: #f1f3f4;
    color: #2d3748;
}

.message-bubble.from-parent {
    background: var(--primary-purple);
    color: white;
}

.message-timestamp {
    font-size: 12px;
    color: #8e8e93;
    margin-top: 4px;
}

.message-compose {
    border-top: 1px solid #e9ecef;
    padding: 16px;
    display: flex;
    gap: 12px;
}

.message-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e9ecef;
    border-radius: 24px;
    outline: none;
    resize: none;
    font-family: inherit;
}

.message-input:focus {
    border-color: var(--primary-purple);
}

.message-send-btn {
    background: var(--primary-purple);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.message-send-btn:hover {
    background: #7c3aed;
    transform: scale(1.05);
}

/* Mobile Hamburger Menu */
.parent-mobile-header {
    display: none;
    background: var(--primary-purple);
    color: white;
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 1001;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.parent-mobile-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.parent-hamburger {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.parent-hamburger:hover {
    background: rgba(255, 255, 255, 0.1);
}

.parent-hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    margin: 5px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.parent-hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.parent-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.parent-hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Mobile Overlay */
.parent-mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.parent-mobile-overlay.active {
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .parent-mobile-header {
        display: flex;
    }

    .parent-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
    }

    .parent-sidebar.mobile-open {
        transform: translateX(0);
    }

    .parent-main-content {
        margin-left: 0;
    }

    .parent-content-grid {
        grid-template-columns: 1fr;
    }

    .homework-status-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .conversation-list {
        height: 200px;
    }

    .message-thread {
        height: 250px;
    }

    /* Mobile Content Improvements */
    .parent-content-card {
        padding: 16px;
        margin-bottom: 12px;
    }

    .parent-card-title {
        font-size: 1.1rem;
    }

    .parent-card-description {
        font-size: 0.9rem;
    }

    .homework-status-card {
        padding: 12px;
    }

    .homework-status-number {
        font-size: 1.5rem;
    }

    .homework-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .homework-item-status {
        align-self: flex-end;
    }

    /* Touch-friendly buttons on mobile */
    .btn-parent-login {
        padding: 16px 32px;
        font-size: 16px;
    }

    .parent-nav-link {
        padding: 16px 20px;
        font-size: 16px;
    }

    /* Improve form inputs for mobile */
    .form-group input,
    .form-group textarea,
    .message-input {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 14px 16px;
    }
}

/* ===========================================
   PARENT MESSAGES INTERFACE
   =========================================== */

.parent-messages-section {
    max-width: 800px;
    margin: 0 auto;
}

.messages-container {
    background: white;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    min-height: 400px;
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 0;
}

.message-item {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f4f8;
}

.message-item:last-child {
    border-bottom: none;
}

.message-from-parent {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.message-from-parent .message-header {
    color: rgba(255, 255, 255, 0.9);
}

.message-sending {
    opacity: 0.7;
    position: relative;
}

.message-sending::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 16px;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: message-spinner 1s linear infinite;
}

@keyframes message-spinner {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.message-from-tutor {
    background: #f8fafc;
    color: #2d3748;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.875rem;
}

.message-sender {
    font-weight: 600;
}

.message-time {
    opacity: 0.7;
    font-size: 0.8rem;
}

.message-content {
    font-size: 0.95rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.no-messages {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #718096;
}

.no-messages-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.6;
}

.no-messages h3 {
    margin: 0 0 8px 0;
    color: #4a5568;
}

.no-messages p {
    margin: 0;
    font-size: 0.9rem;
}

.parent-message-compose {
    background: white;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    padding: 20px;
}

.message-input-container {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

.message-input-container textarea {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s ease;
}

.message-input-container textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.message-input-container button {
    height: 48px;
    min-width: 120px;
}

.parent-error {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #e53e3e;
    background: #fed7d7;
    border-radius: 8px;
    margin: 20px;
    text-align: center;
}

@media (max-width: 768px) {
    .message-input-container {
        flex-direction: column;
        align-items: stretch;
    }

    .message-input-container button {
        height: 44px;
        min-width: unset;
    }

    .messages-container {
        max-height: 350px;
    }
}

/* Loading States */
.parent-loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.parent-loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-purple);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error States */
.parent-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 16px;
    color: #991b1b;
    text-align: center;
    margin: 20px 0;
}

.parent-error-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

/* Success States */
.parent-success {
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    padding: 16px;
    color: #065f46;
    text-align: center;
    margin: 20px 0;
}

.parent-success-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

/* ===========================================
   HOMEWORK DETAIL MODAL
   =========================================== */

.homework-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.homework-detail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.homework-detail-content {
    position: relative;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.homework-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 24px 32px 20px;
    border-bottom: 2px solid #f0f4f8;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.homework-header-info {
    flex: 1;
    margin-right: 20px;
}

.homework-detail-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.homework-detail-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.homework-subject {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.homework-due-date {
    font-size: 0.9rem;
    opacity: 0.9;
}

.homework-due-date.overdue {
    color: #fed7d7;
    font-weight: 600;
}

.homework-status-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.homework-status-badge.assigned {
    background: #fef3cd;
    color: #8b6914;
}

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

.homework-detail-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: normal;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.homework-detail-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.homework-detail-body {
    padding: 32px;
    overflow-y: auto;
    flex: 1;
}

.homework-description-section,
.homework-attachments-section,
.homework-submission-section,
.homework-submission-form {
    margin-bottom: 32px;
}

.homework-description-section h4,
.homework-attachments-section h4,
.homework-submission-section h4,
.homework-submission-form h4 {
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.homework-description {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4a5568;
}

/* Homework Attachments */
.homework-attachments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.attachment-item-detailed {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.attachment-item-detailed:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.attachment-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.attachment-icon {
    font-size: 1.5rem;
}

.attachment-name {
    font-weight: 500;
    color: #2d3748;
    flex: 1;
}

.attachment-size {
    font-size: 0.85rem;
    color: #718096;
}

.attachment-actions {
    display: flex;
    gap: 8px;
}

/* Homework Submission Section */
.submission-text {
    background: #f0fff4;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #48bb78;
    margin-bottom: 16px;
}

.submission-text strong {
    color: #276749;
    display: block;
    margin-bottom: 8px;
}

.submission-text p {
    margin: 0;
    color: #2d3748;
    line-height: 1.6;
}

.submission-files {
    background: #f0fff4;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #48bb78;
    margin-bottom: 16px;
}

.submission-files strong {
    color: #276749;
    display: block;
    margin-bottom: 12px;
}

.submission-files-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.submission-file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
}

.file-icon {
    font-size: 1.2rem;
}

.file-name {
    flex: 1;
    font-weight: 500;
    color: #2d3748;
}

.submission-date {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
}

.submission-date small {
    color: #718096;
    font-style: italic;
}

/* Homework Submission Form */
.submission-form {
    background: #fff5f5;
    padding: 24px;
    border-radius: 12px;
    border: 2px solid #fed7d7;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* File Upload Area */
.file-upload-area {
    position: relative;
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: #667eea;
    background: #f7fafc;
}

.file-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #4a5568;
}

.upload-icon {
    font-size: 2rem;
    margin-bottom: 4px;
}

.file-upload-text small {
    color: #718096;
    font-size: 0.85rem;
}

/* Selected Files */
.selected-files {
    margin-top: 16px;
}

.selected-files-header {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 12px;
}

.selected-file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #edf2f7;
    border-radius: 8px;
    margin-bottom: 8px;
}

.selected-file-item .file-icon {
    font-size: 1.2rem;
}

.selected-file-item .file-name {
    flex: 1;
    font-weight: 500;
    color: #2d3748;
}

.selected-file-item .file-size {
    font-size: 0.85rem;
    color: #718096;
}

/* Submission Actions */
.submission-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

/* Clickable homework items */
.clickable-homework {
    cursor: pointer;
    transition: all 0.2s ease;
}

.clickable-homework:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.homework-item-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.homework-attachments-preview {
    font-size: 0.85rem;
    color: #667eea;
    margin-top: 8px;
    font-weight: 500;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .homework-detail-modal {
        padding: 10px;
    }

    .homework-detail-content {
        max-height: 95vh;
    }

    .homework-detail-header {
        padding: 20px 20px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .homework-header-info {
        margin-right: 0;
        margin-bottom: 0;
    }

    .homework-detail-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .homework-detail-close {
        position: absolute;
        top: 16px;
        right: 16px;
    }

    .homework-detail-body {
        padding: 20px;
    }

    .attachment-item-detailed {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .attachment-actions {
        align-self: stretch;
        justify-content: space-between;
    }

    .submission-actions {
        flex-direction: column;
    }

    .submission-actions .btn {
        width: 100%;
    }
}