/* parent.css - Parent Portal Styles */

.parent-container {
    display: flex;
    margin-top: 80px;
    min-height: calc(100vh - 80px);
}

/* Sidebar */
.parent-sidebar {
    width: 300px;
    background: white;
    border-right: 1px solid #eaeaea;
    padding: 2rem;
    position: fixed;
    height: calc(100vh - 80px);
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eaeaea;
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--dark);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Children List */
.children-list {
    margin-bottom: 1rem;
}

.child-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.child-item:hover {
    background: #e9ecef;
}

.child-item.active {
    background: var(--primary);
    color: white;
}

.child-item.active .child-grade {
    background: white;
    color: var(--primary);
}

.child-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.child-info {
    flex: 1;
}

.child-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.child-grade {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    display: inline-block;
}

.btn-add-child {
    width: 100%;
    padding: 0.75rem;
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
}

.btn-add-child:hover {
    background: var(--primary);
    color: white;
}

/* Notifications */
.notifications {
    max-height: 200px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
}

.notification-item i {
    color: var(--secondary);
    margin-top: 0.25rem;
}

.notification-item p {
    flex: 1;
    margin: 0;
    font-size: 0.9rem;
}

.time {
    font-size: 0.8rem;
    color: var(--gray);
}

/* Help Links */
.help-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.help-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gray);
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s;
}

.help-links a:hover {
    background: #f8f9fa;
    color: var(--primary);
}

/* Main Content */
.parent-main {
    flex: 1;
    margin-left: 300px;
    padding: 2rem;
    background: #f8f9fa;
}

.welcome-section {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 2rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

.welcome-section h1 {
    margin-bottom: 0.5rem;
}

.date-display {
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.stat-content h3 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
    color: var(--dark);
}

.stat-content p {
    color: var(--gray);
    margin: 0;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.dashboard-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.dashboard-card.large {
    grid-column: span 2;
}

.card-header {
    padding: 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #eaeaea;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.card-header select {
    padding: 0.5rem;
    border: 2px solid #ddd;
    border-radius: var(--radius);
    background: white;
}

.card-body {
    padding: 1.5rem;
}

/* Performance List */
.performance-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.performance-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: var(--radius);
}

.performance-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.performance-info {
    flex: 1;
}

.performance-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.performance-bar {
    height: 8px;
    background: #eaeaea;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.performance-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
}

/* Activity Feed */
.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: var(--radius);
}

.activity-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.activity-desc {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.activity-time {
    font-size: 0.8rem;
    color: var(--gray);
}

/* Sessions List */
.sessions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.session-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: var(--radius);
}

.session-time {
    text-align: center;
    background: white;
    padding: 0.5rem;
    border-radius: 8px;
    min-width: 80px;
}

.session-day {
    display: block;
    font-weight: bold;
    color: var(--primary);
}

.session-hour {
    display: block;
    font-size: 0.9rem;
    color: var(--gray);
}

.session-info {
    flex: 1;
}

.session-tutor {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.session-subject {
    color: var(--gray);
    font-size: 0.9rem;
}

.btn-join {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
}

/* Messages */
.messages-container {
    max-height: 300px;
    overflow-y: auto;
}

.message-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.message-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.message-content {
    flex: 1;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

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

.message-time {
    color: var(--gray);
    font-size: 0.8rem;
}

.message-text {
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.message-child {
    display: inline-block;
    background: #e3f2fd;
    color: var(--primary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.btn-new-message {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Insights */
.insights {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.insight-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: var(--radius);
    border-left: 4px solid var(--secondary);
}

.insight-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.insight-desc {
    color: var(--gray);
    font-size: 0.9rem;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: var(--radius);
    font-size: 1rem;
}

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

.subjects-checkboxes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.subjects-checkboxes label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}

.btn-full {
    width: 100%;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .dashboard-card.large {
        grid-column: span 1;
    }
}

@media (max-width: 1024px) {
    .parent-container {
        flex-direction: column;
    }
    
    .parent-sidebar {
        position: static;
        width: 100%;
        height: auto;
    }
    
    .parent-main {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-overview {
        grid-template-columns: 1fr;
    }
    
    .subjects-checkboxes {
        grid-template-columns: 1fr;
    }
}