.header {
    height: 72px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-xl);
    z-index: 1001;
    -webkit-backdrop-filter: var(--blur-val);
    backdrop-filter: var(--blur-val);
    transition: background 0.3s ease, border 0.3s ease;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex: 1;
}

.header-title {
    display: flex;
    align-items: center;
    margin-left: 8px;
}

.title-main {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-header);
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.header-center {
    flex: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-right {
    justify-content: flex-end;
}

/* Search Bar */
.search-bar {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 0 var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    width: 100%;
    max-width: 480px;
    height: 44px;
    transition: var(--transition);
}

.search-bar:focus-within {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px var(--primary-light);
    max-width: 520px;
}

.search-bar i {
    color: var(--text-muted);
    font-size: 1rem;
}

.search-bar input {
    border: none;
    background: none;
    outline: none;
    width: 100%;
    font-size: var(--size-body);
    color: var(--text-header);
}

/* Interactions */
.header-interactions {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding-right: var(--space-md);
    margin-right: 4px;
}

.icon-btn {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    position: relative;
    transition: var(--transition);
}

.icon-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
    transform: translateY(-2px);
}

.notification-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: var(--error);
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-card);
}

/* Student Profile */
.student-profile {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    cursor: pointer;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.student-profile:hover {
    background: var(--primary-light);
}

.student-text {
    text-align: right;
    display: block;
}

.student-text h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-header);
    line-height: 1;
}

.status-badge {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 2px 8px;
    border-radius: 100px;
    margin-top: 4px;
    display: inline-block;
}

.header .avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    border: 2px solid var(--primary);
    object-fit: cover;
    background: #fff;
}

.main-layout {
    display: flex;
    flex: 1;
    background: var(--bg-main);
    overflow: hidden;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

#main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--bg-main);
}

.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-xl);
    width: 100%;
    box-sizing: border-box;
    flex: 1;
}

/* Remove padding when chat is active so it takes full height */
#main-content:has(.chat-container) {
    padding: 0;
    max-width: none;
    margin: 0;
    overflow: hidden;
}

#chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

#chat-area .action-buttons {
    flex-shrink: 0;
}

.chat-area {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}