:root {
    --primary: #4f46e5;
    --bg-main: #f9fafb;
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background: var(--bg-main);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

.screen-center {
    display: flex;
    height: 100vh;
    justify-content: center;
    align-items: center;
}

.card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.input-field {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
}

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

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-outline {
    background: transparent;
    color: #dc2626;
    border: 1px solid #fca5a5;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
}

/* Dashboard Layout */
.header {
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
}

.main-layout {
    display: flex;
    height: calc(100vh - 70px);
    padding: 20px;
    gap: 20px;
}

.sidebar {
    width: 300px;
    display: flex;
    flex-direction: column;
}

.student-list {
    flex: 1;
    overflow-y: auto;
}

.student-item {
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid transparent;
    margin-bottom: 8px;
    background: var(--bg-main);
    transition: 0.2s;
}

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

.student-item.active {
    background: #e0e7ff;
    border-color: var(--primary);
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
    padding-right: 10px;
}

.chat-input-row {
    display: flex;
    gap: 10px;
}

.msg {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 12px;
    position: relative;
}

.msg.own {
    align-self: flex-end;
    background: #e0e7ff;
    border-bottom-right-radius: 2px;
}

.msg.other {
    align-self: flex-start;
    background: #f3f4f6;
    border-bottom-left-radius: 2px;
}

.msg-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 5px;
    text-align: right;
}