/* 전역 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    height: -webkit-fill-available;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    min-height: -webkit-fill-available;
}

.container {
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    max-width: 1170px;
}

/* 상단 헤더 */
.top-header {
    background-color: #28426F;
    color: white;
    padding: 16px 0;
    font-size: 12px;
    height: 52px;
    display: flex;
    align-items: center;
}

.top-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 560px;
    margin-left: -20px;
}

.logo-section img {
    height: 40px;
    width: auto;
}

.top-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.top-nav a {
    color: white;
    text-decoration: none;
}

.top-nav .divider {
    color: rgba(255,255,255,0.6);
}

/* 메인 네비게이션 */
.main-nav {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-nav .container {
    display: flex;
    align-items: center;
    padding-top: 12px;
    padding-bottom: 12px;
}

.main-nav .logo {
    margin-right: 130px;
}

.main-nav .logo img {
    height: 34px;
    width: auto;
}

.main-nav .menu {
    display: flex;
    list-style: none;
    gap: 25px;
}

.main-nav .menu a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
}

.main-nav .menu .realtime-lecture-btn {
    background-color: #FF8C94;
    color: white;
    padding: 6px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.3s ease;
    display: inline-block;
    white-space: nowrap;
}

.main-nav .menu .realtime-lecture-btn:hover {
    background-color: #FF7F8A;
}

/* Hero 섹션 */
.hero-section {
    background-image: url('https://images.unsplash.com/photo-1564013799919-ab600027ffc6?w=1600&h=400&fit=crop');
    background-size: cover;
    background-position: center;
    position: relative;
    min-height: 302px;
    display: flex;
    align-items: flex-end;
    padding-bottom: 0;
    padding-top: 32px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0.05), rgba(255,255,255,0.15));
}

.hero-container {
    position: relative;
    z-index: 1;
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: 276px 292px 289px 257px;
    gap: 0;
    z-index: 1;
}

/* 1. 교수 프로필 */
.profile-box {
    background: transparent;
    height: 270px;
    margin-right: 20px;
}

.profile-bg {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 0;
    text-align: center;
    overflow: hidden;
    box-shadow: none;
    height: 100%;
}

.profile-dept {
    background-color: rgba(255,255,255,0.15);
    color: white;
    padding: 10px;
    font-size: 13px;
    font-weight: 500;
}

.profile-photo {
    padding: 20px 20px 12px;
    display: flex;
    justify-content: center;
}

.profile-photo img {
    width: 108px;
    height: 144px;
    object-fit: cover;
    border-radius: 0;
    border: 2px solid rgba(255,255,255,0.2);
}

.profile-name {
    color: #f9d748;
    font-size: 16px;
    font-weight: bold;
    padding: 12px 15px 20px;
}

.profile-name span {
    font-size: 14px;
    font-weight: normal;
    margin-left: 3px;
    color: white;
}

/* 2. 상담·지도 관리현황 */
.counsel-box {
    background: white;
    border-radius: 0;
    border-right: 1px solid #e0e0e0;
    overflow: hidden;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    height: 270px;
}

.box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
}

.box-header.blue {
    background-color: #5da3e8;
    color: white;
}

.box-header h3 {
    font-size: 18px;
    font-weight: normal;
}

.plus-btn {
    background-color: transparent;
    color: white;
    border: none;
    width: 22px;
    height: 22px;
    border-radius: 0;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.counsel-tabs {
    display: flex;
    padding: 10px 12px;
    gap: 5px;
    background-color: white;
    border-bottom: 1px solid #e0e0e0;
}

.ctab {
    flex: 1;
    padding: 7px 6px;
    background-color: #f5f5f5;
    border: none;
    border-radius: 0;
    font-size: 11px;
    cursor: pointer;
    font-weight: 500;
    color: #333;
}

.ctab.active {
    background-color: #5da3e8;
    color: white;
    font-weight: bold;
}

.counsel-items {
    padding: 12px 15px 15px;
    flex: 1;
}

.counsel-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    margin-bottom: 8px;
    background-color: white;
    border-radius: 0;
    border: 1px solid #e0e0e0;
}

.counsel-item:last-child {
    margin-bottom: 0;
}

.counsel-item .label {
    font-size: 12px;
    color: #333;
    font-weight: 500;
}

.counsel-item .value {
    font-size: 13px;
    font-weight: bold;
}

.counsel-item .value.red {
    background-color: #e74c3c;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
}

/* 3. 달력 */
.calendar-box {
    background: white;
    border-radius: 0;
    border-right: 1px solid #e0e0e0;
    padding: 12px;
    box-shadow: none;
    height: 270px;
    overflow: hidden;
}

.calendar-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
    position: relative;
}

.cal-month {
    font-size: 15px;
    font-weight: bold;
    color: #333;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.cal-nav {
    background: white;
    border: 1px solid #ddd;
    width: 26px;
    height: 26px;
    border-radius: 0;
    cursor: pointer;
    font-size: 14px;
}

.cal-nav:first-child {
    margin-right: auto;
}

.cal-nav:nth-child(3) {
    margin-left: auto;
}

.cal-menu {
    background: white;
    border: 1px solid #ddd;
    width: 26px;
    height: 26px;
    border-radius: 0;
    cursor: pointer;
    font-size: 14px;
}

.calendar-grid {
    width: 100%;
}

.cal-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 6px;
}

.cal-day {
    text-align: center;
    font-size: 10px;
    font-weight: bold;
    color: #666;
    padding: 4px 0;
}

.cal-day.sun {
    color: #e74c3c;
}

.cal-day.sat {
    color: #3498db;
}

.cal-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.cal-date {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    border-radius: 0;
    cursor: pointer;
    position: relative;
    background-color: white;
    border: 1px solid #f0f0f0;
}

.cal-date:hover:not(.empty) {
    background-color: #e9ecef;
}

.cal-date.sun {
    color: #e74c3c;
}

.cal-date.sat {
    color: #3498db;
}

.cal-date.today {
    background-color: #3498db;
    color: white;
    font-weight: bold;
}

.cal-date.green {
    background-color: #5cb85c;
    color: white;
    font-weight: bold;
}

.cal-date.empty {
    cursor: default;
    background-color: transparent;
    border: none;
}

.date-badge {
    position: absolute;
    top: 1px;
    right: 1px;
    background-color: #e74c3c;
    color: white;
    font-size: 7px;
    padding: 1px 3px;
    border-radius: 8px;
    font-weight: bold;
    line-height: 1;
}

.date-badge.blue {
    background-color: #3498db;
}

/* 4. 공지사항 */
.notice-box {
    background: white;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    height: 270px;
}

.notice-items {
    padding: 12px 15px 15px;
    flex: 1;
}

.notice-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.notice-line:last-child {
    border-bottom: none;
}

.notice-left {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 1;
    min-width: 0;
}

.num-badge {
    background-color: #3498db;
    color: white;
    padding: 2px 5px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: bold;
    flex-shrink: 0;
}

.num-badge.blue {
    background-color: #3498db;
}

.notice-text {
    font-size: 11px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notice-right {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
    margin-left: auto;
    width: 60px;
    position: relative;
}

.notice-date {
    font-size: 10px;
    color: #e74c3c;
    position: absolute;
    right: 20px;
}

.new-badge {
    background-color: #e74c3c;
    color: white;
    padding: 2px 5px;
    border-radius: 10px;
    font-size: 8px;
    font-weight: bold;
    display: inline-block;
    text-align: center;
    width: 14px;
    position: absolute;
    right: 0;
}

/* 메인 컨텐츠 영역 */
.main-content {
    padding: 20px 0;
    background-color: #f5f5f5;
    min-height: 100vh;
    box-sizing: border-box;
}

/* 듀얼 카드 */
.dual-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.feature-card {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 0;
    border-radius: 0;
    color: white;
    box-shadow: none;
    width: 1116px;
    height: 55px;
    box-sizing: border-box;
    overflow: hidden;
}

.red-card {
    background: #E87171;
}

.blue-card {
    background: #3682D7;
}

.card-left {
    width: 210px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: transparent;
}

.card-icon {
    font-size: 45px;
    flex-shrink: 0;
}

.card-left h3 {
    font-size: 17px;
    font-weight: bold;
    margin: 0;
}

.card-body {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 30px;
    background: white;
}

.card-body p {
    font-size: 18px;
    opacity: 1;
    line-height: 1.3;
    margin: 0;
    color: #333;
}

.card-body p strong {
    color: #3682D7;
}

.card-action {
    background: transparent;
    color: white;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0;
    border-radius: 0;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* 교수님 알림 */
.prof-notice-section {
    background: white;
    border-radius: 0;
    padding: 0;
    margin-bottom: 30px;
    box-shadow: none;
    width: 1116px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding: 0 30px;
    background-color: #1858A8;
    color: white;
    height: 53px;
}

.section-head h2 {
    font-size: 25px;
    color: white;
    font-weight: normal;
    text-align: left;
}

.more {
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.notice-list-area {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 18px 30px;
    background: white;
    width: 1114px;
    height: 187px;
    box-sizing: border-box;
    overflow: hidden;
    justify-content: space-evenly;
}

.notice-full-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    background-color: transparent;
    border-radius: 0;
    cursor: pointer;
    border-bottom: 1px solid #e5e5e5;
}

.notice-full-row:last-child {
    border-bottom: none;
}

.notice-full-row:hover {
    background-color: transparent;
}

.row-num {
    color: #333;
    font-weight: 600;
    width: 30px;
    font-size: 13px;
}

.row-icon {
    font-size: 13px;
    margin-right: 5px;
}

.row-text {
    flex: 1;
    font-size: 13px;
    font-weight: 400;
    color: #333;
}

.row-date {
    color: #999;
    font-size: 12px;
    margin-left: 15px;
}

/* 교과·과정 */
.course-section {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin-bottom: 30px;
    width: 1116px;
    border: none;
}

.course-main-title {
    padding: 20px 0 15px;
    border-bottom: none;
}

.main-title-text {
    font-size: 20px;
    color: #333;
    font-weight: bold;
    margin: 0;
}

.course-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    background: transparent;
    border-bottom: none;
}

.section-title {
    font-size: 14px;
    color: #333;
    font-weight: normal;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-icon {
    color: #3682D7;
    font-size: 16px;
}

.blue-text {
    color: #3682D7;
}

.semester-select {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
    background: white;
}

.section-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    background-color: transparent;
    border-bottom: none;
}

.toolbar-left {
    display: flex;
    gap: 10px;
}

.course-section .section-toolbar {
    justify-content: flex-end;
}

.tab-btn {
    background: white;
    color: #666;
    border: 1px solid #ddd;
    padding: 6px 16px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 0;
    font-weight: normal;
}

.tab-btn.active {
    background: #3682D7;
    color: white;
    border-color: #3682D7;
    font-weight: 600;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-label {
    color: #666;
    font-size: 13px;
    font-weight: normal;
}

.filter-select {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 12px;
    background: white;
}

.course-table,
.program-table,
.support-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid #e0e0e0;
}

.course-table thead,
.program-table thead,
.support-table thead {
    background-color: #f5f5f5;
}

.course-table th,
.program-table th,
.support-table th {
    padding: 12px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #ddd;
}

.course-table td,
.program-table td,
.support-table td {
    padding: 12px;
    text-align: center;
    font-size: 13px;
    color: #333;
    border-bottom: 1px solid #e5e5e5;
    background-color: white;
}

.detail-btn {
    background-color: #e87171;
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

/* 비교과 프로그램 현황 */
.program-section {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin-bottom: 30px;
    width: 1116px;
    border: none;
}

.empty-message {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* 교수 지원 */
.support-section {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin-bottom: 30px;
    width: 1116px;
    border: none;
}

.date-link {
    color: #3682D7;
    cursor: pointer;
}

.apply-btn {
    background-color: #3682D7;
    color: white;
    border: none;
    padding: 6px 18px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

/* TOP 버튼 */
.top-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #5da3e8;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 10px;
    font-weight: bold;
}

.top-button div:first-child {
    font-size: 14px;
}

/* PolyTalk 버튼 */
.polytalk-btn {
    background: #3682D7;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.polytalk-btn:hover {
    background: #2a6bb5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.polytalk-icon {
    font-size: 18px;
}

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: #3682D7;
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.modal-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.modal-close:hover {
    transform: scale(1.2);
}

.modal-body {
    padding: 25px 30px;
    overflow-y: auto;
    max-height: calc(80vh - 80px);
}

.student-search {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #3682D7;
}

.search-btn {
    background-color: #3682D7;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-btn:hover {
    background-color: #2a6bb5;
}

.modal-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.modal-table thead {
    background-color: #f8f9fa;
}

.modal-table th {
    padding: 12px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
}

.modal-table td {
    padding: 12px;
    text-align: center;
    font-size: 13px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}

.modal-table tbody tr:hover {
    background-color: #f8f9fa;
}

.select-student-btn {
    background-color: #3682D7;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.select-student-btn:hover {
    background-color: #2a6bb5;
    transform: scale(1.05);
}

/* PolyTalk 페이지 */
.polytalk-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f5f7fa;
    z-index: 1500;
    overflow-y: auto;
}

.polytalk-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* PolyTalk 메인 컨텐츠 섹션 */
.polytalk-content-section {
    width: 100%;
    margin: 0 auto 30px;
    padding: 0 20px;
    box-sizing: border-box;
    max-width: 1116px;
}

.course-main-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0 15px;
    border-bottom: none;
}

.back-btn-header {
    background: #3682D7;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.back-btn-header:hover {
    background: #2a6bb5;
}

.polytalk-main-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

/* 왼쪽: 학생 프로필 패널 */
.student-profile-panel {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 15px;
}

.profile-avatar {
    margin-bottom: 15px;
}

.avatar-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3682D7 0%, #5da3e8 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(54, 130, 215, 0.3);
}

.avatar-image {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(54, 130, 215, 0.3);
    border: 3px solid white;
}

.student-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.student-name-row h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.country-flag {
    font-size: 20px;
}

.phone-code {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.profile-info-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-card {
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.card-label {
    font-size: 11px;
    color: #666;
    margin-bottom: 4px;
    font-weight: 500;
}

.card-value {
    font-size: 13px;
    color: #333;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.country-flag-small {
    font-size: 16px;
}

/* 오른쪽: 채팅 패널 */
.chat-panel {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    height: 700px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

/* 모바일에서 상담 시작 후 헤더 숨김 */
@media (max-width: 768px) {
    .chat-header.header-hidden {
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        z-index: 100;
    }
}

.language-select-header {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
    flex-shrink: 1;
    overflow: hidden;
}

.language-select-header label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.language-select-header select {
    width: 80px;
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    box-sizing: border-box;
}

/* 모바일에서만 언어 선택 숨김 처리 (부드러운 애니메이션) */
@media (max-width: 768px) {
    .language-select-header {
        transition: gap 0.3s ease;
    }

    .language-select-header label {
        transition: opacity 0.3s ease, max-height 0.3s ease, margin 0.3s ease, padding 0.3s ease, height 0.3s ease;
        opacity: 1;
        max-height: 50px;
        height: auto;
        overflow: hidden;
        display: block;
    }

    .language-select-header select {
        transition: opacity 0.3s ease, max-height 0.3s ease, padding 0.3s ease, margin 0.3s ease, height 0.3s ease;
        opacity: 1;
        max-height: 50px;
        height: auto;
        overflow: hidden;
    }

    /* 언어 선택 숨김 처리 (모바일에서만) */
    .language-select-header label.language-hidden,
    .language-select-header select.language-hidden {
        opacity: 0;
        max-height: 0;
        height: 0;
        margin: 0;
        padding: 0;
        overflow: hidden;
        pointer-events: none;
        visibility: hidden;
    }

    /* 숨김 처리된 요소가 있을 때 gap 조정 */
    .language-select-header:has(.language-hidden) {
        gap: 0;
    }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
    min-width: 0;
}

/* 헤더의 마이크 넘기기 버튼 숨김 (하단 중앙에 배치) */
.header-right .mic-toggle-btn {
    display: none !important;
}

.mic-status-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
    padding: 0;
}

.mic-status-btn:hover {
    background: #f0f0f0;
    border-color: #3682D7;
    transform: scale(1.1);
}

.mic-status-btn svg {
    width: 18px;
    height: 18px;
    stroke: #666;
}

.mic-status-btn:hover svg {
    stroke: #3682D7;
}

.mic-status-btn.active {
    background: #3682D7;
    border-color: #3682D7;
}

.mic-status-btn.active svg {
    stroke: white;
}

.translation-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.counsel-start-btn {
    background: #3682D7;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
}

.counsel-start-btn:hover {
    background: #2a6bb5;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(54, 130, 215, 0.3);
}

.counsel-start-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 마이크 넘기기 버튼 (polytalk.css 스타일 참고) */
.mic-toggle-btn {
    background: #f1f5f9;
    border: none;
    border-radius: 8px;
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #64748b;
    padding: 0 12px;
    flex-shrink: 1;
    min-width: 0;
}

.mic-toggle-btn:hover {
    background: #e2e8f0;
    color: #475569;
}

.mic-toggle-btn.active {
    background: #667eea;
    color: #ffffff;
}

.mic-toggle-btn.active:hover {
    background: #5568d3;
}

.mic-toggle-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.mic-toggle-btn.active svg {
    stroke: #ffffff;
    color: #ffffff;
}

.mic-toggle-text {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 마이크 넘기기 버튼을 화면 하단 중앙에 고정 배치 (동그란 아이콘만) */
#micToggleBtn {
    position: fixed !important;
    bottom: 50px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 1000 !important;
    background: #ef4444 !important;
    border: none !important;
    border-radius: 50% !important;
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    /* 터치 시 잔상 제거 */
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
    outline: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    color: #ffffff !important;
    padding: 0 !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
}

/* 버튼 외부 하단 중앙에 Toss 텍스트 추가 */
#micToggleBtn::after {
    content: 'Toss' !important;
    position: absolute !important;
    top: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin-top: 8px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #ef4444 !important;
    white-space: nowrap !important;
    pointer-events: none !important;
}

#micToggleBtn:hover {
    background: #dc2626 !important;
    color: #ffffff !important;
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4) !important;
}

#micToggleBtn.active {
    background: #667eea !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4) !important;
}

#micToggleBtn.active::after {
    color: #667eea !important;
}

#micToggleBtn.active:hover {
    background: #5568d3 !important;
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5) !important;
}

#micToggleBtn svg {
    width: 24px !important;
    height: 24px !important;
    flex-shrink: 0;
    stroke: #ffffff !important;
    color: #ffffff !important;
}

#micToggleBtn.active svg {
    stroke: #ffffff !important;
    color: #ffffff !important;
}

#micToggleBtn .mic-toggle-text {
    display: none !important;
}

.end-counsel-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
}

.end-counsel-btn:hover {
    background: #ee5a5a;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 107, 107, 0.3);
}

.end-counsel-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.status-message-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.status-message-box {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.status-message-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #4caf50;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 20px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.status-message-text {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-top: 10px;
}

.chat-panel {
    position: relative;
}

.translation-status .status-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #f44336;
    transition: background-color 0.3s ease;
}

.translation-status .status-dot.connected {
    background-color: #4caf50;
    animation: pulse 2s infinite;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.4), 0 0 12px rgba(76, 175, 80, 0.2);
}

.translation-status .status-dot.disconnected {
    background-color: #f44336;
    box-shadow: 0 0 8px rgba(244, 67, 54, 0.4), 0 0 12px rgba(244, 67, 54, 0.2);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 8px rgba(76, 175, 80, 0.4), 0 0 12px rgba(76, 175, 80, 0.2);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.05);
        box-shadow: 0 0 10px rgba(76, 175, 80, 0.5), 0 0 16px rgba(76, 175, 80, 0.3);
    }
}

.status-text {
    font-size: 13px;
    color: #333;
    font-weight: 500;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.chat-messages .welcome-message {
    text-align: center;
    color: #999;
    font-size: 14px;
    padding: 40px 20px;
    font-style: italic;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message {
    margin-bottom: 16px;
    display: flex;
    animation: messageSlideIn 0.3s ease;
}

.chat-message.professor {
    justify-content: flex-end;
}

.chat-message.student {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 12px;
    position: relative;
}

.message-bubble.professor {
    background: #87ceeb;
    color: #333;
    border: 1px solid #5dade2;
    border-bottom-right-radius: 4px;
}

.message-bubble.student {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 11px;
    color: #999;
    margin-bottom: 6px;
}

.message-bubble.student .message-time {
    color: #999;
}

.message-original {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 4px;
}

.message-translated {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #e9ecef;
}

.message-bubble.student .message-translated {
    color: #666;
    border-top-color: #e9ecef;
}

.message-bubble.professor .message-time {
    color: rgba(0, 0, 0, 0.6);
}

.message-bubble.professor .message-translated {
    color: rgba(0, 0, 0, 0.7);
    border-top-color: rgba(0, 0, 0, 0.1);
}

.chat-input-bottom {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    background: white;
}

.voice-btn {
    background: transparent;
    border: 1px solid #ddd;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.voice-btn:hover {
    background: #f0f0f0;
    border-color: #3682D7;
}

.voice-btn svg {
    width: 20px;
    height: 20px;
    stroke: #666;
}

.voice-btn:hover svg {
    stroke: #3682D7;
}

.chat-input-main {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.chat-input-main:focus {
    border-color: #3682D7;
}

.send-btn-main {
    background: #3682D7;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.send-btn-main:hover {
    background: #2a6bb5;
}

/* 학생 상세보기 페이지 스타일 */
.student-detail-container {
    width: 1116px;
    margin: 0 auto;
    padding: 20px 0;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 30px;
}

.detail-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.detail-body {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 반응형 */
@media (max-width: 1200px) {
    .polytalk-content-section {
        padding: 0 15px;
    }
    
    .header-right {
        gap: 10px;
    }
    
    .counsel-start-btn,
    .end-counsel-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

@media (max-width: 900px) {
    .header-right {
        gap: 8px;
    }
    
    .counsel-start-btn,
    .end-counsel-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .language-select-header {
        gap: 8px;
    }
    
    .language-select-header select {
        width: 70px;
        font-size: 11px;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 10px 0;
    }
    
    .polytalk-content-section {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin-bottom: 10px;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .polytalk-main-layout {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 15px;
    }
    
    .student-profile-panel {
        position: static;
        padding: 12px;
    }
    
    .profile-header {
        padding-bottom: 12px;
        margin-bottom: 12px;
    }
    
    .avatar-image {
        width: 60px;
        height: 60px;
    }
    
    .avatar-circle {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .student-name-row h3 {
        font-size: 14px;
    }
    
    .country-flag {
        font-size: 18px;
    }
    
    .phone-code {
        font-size: 12px;
    }
    
    .profile-info-cards {
        gap: 6px;
    }
    
    .info-card {
        padding: 8px 10px;
    }
    
    .card-label {
        font-size: 10px;
        margin-bottom: 3px;
    }
    
    .card-value {
        font-size: 12px;
    }
    
    .chat-panel {
        height: calc(100vh - 100px);
        min-height: 500px;
        max-height: none;
    }
    
    .chat-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        padding: 12px 15px;
    }
    
    .language-select-header {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .language-select-header > label,
    .language-select-header > select {
        width: 100%;
    }
    
    .translation-status {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        margin-top: 8px;
        gap: 8px;
    }
    
    .translation-status .mic-toggle-btn {
        display: none !important;
    }
    
    .translation-status .status-dot,
    .translation-status .status-text {
        order: 1;
    }
    
    .language-select-header label {
        font-size: 12px;
        font-weight: 600;
        color: #333;
        display: block;
        margin-bottom: 6px;
    }
    
    .language-select-header select {
        width: 100%;
        padding: 8px 10px;
        font-size: 12px;
        border: 1px solid #ddd;
        border-radius: 6px;
        background-color: white;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 10px center;
        padding-right: 30px;
        box-sizing: border-box;
    }
    
    .language-select-header select option {
        font-size: 16px !important;
        padding: 12px !important;
    }
    
    /* 모바일에서 label과 select를 그룹화 */
    .language-select-header > * {
        width: 100%;
    }
    
    .header-right {
        width: 100%;
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    /* 모바일에서 header-right의 마이크 넘기기 버튼은 숨기고 하단 중앙에 배치 */
    .header-right .mic-toggle-btn {
        display: none !important;
    }
    
    .counsel-start-btn,
    .end-counsel-btn {
        width: 100%;
    }
    
    .mic-status-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
    }
    
    .mic-status-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .translation-status {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        margin-top: 8px;
        gap: 8px;
    }
    
    .status-text {
        font-size: 12px;
    }
    
    .header-right {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    /* 모바일에서 translation-status의 마이크 넘기기 버튼 숨김 (하단 중앙에 배치) */
    .translation-status .mic-toggle-btn {
        display: none !important;
    }
    
    /* 모바일에서 마이크 넘기기 버튼을 하단 중앙에 고정 배치 (동그란 아이콘만) */
    #micToggleBtn {
        position: fixed !important;
        bottom: 50px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 1000 !important;
        background: #ef4444 !important;
        border: none !important;
        border-radius: 50% !important;
        width: 56px !important;
        height: 56px !important;
        min-width: 56px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0 !important;
        /* 터치 시 잔상 제거 */
        -webkit-tap-highlight-color: transparent !important;
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        user-select: none !important;
        outline: none !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        color: #ffffff !important;
        padding: 0 !important;
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
    }
    
    /* 모바일에서 버튼 외부 하단 중앙에 Toss 텍스트 추가 */
    /* 마이크 버튼 숨김 */
    #micToggleBtn {
        display: none !important;
    }
    
    /* Toss 텍스트 제거 */
    /* #micToggleBtn::after {
        content: 'Toss' !important;
        position: absolute !important;
        top: 100% !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin-top: 8px !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        color: #ef4444 !important;
        white-space: nowrap !important;
        pointer-events: none !important;
    } */
    
    #micToggleBtn:hover {
        background: #dc2626 !important;
        color: #ffffff !important;
        box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4) !important;
    }
    
    #micToggleBtn.active {
        background: #667eea !important;
        color: #ffffff !important;
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4) !important;
    }
    
    /* Toss 텍스트 제거 */
    /* #micToggleBtn.active::after {
        color: #667eea !important;
    } */
    
    #micToggleBtn.active:hover {
        background: #5568d3 !important;
        box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5) !important;
    }
    
    #micToggleBtn svg {
        width: 24px !important;
        height: 24px !important;
        flex-shrink: 0;
        stroke: #ffffff !important;
        color: #ffffff !important;
    }
    
    #micToggleBtn.active svg {
        stroke: #ffffff !important;
        color: #ffffff !important;
    }
    
    #micToggleBtn .mic-toggle-text {
        display: none !important;
    }
    
    .counsel-start-btn {
        width: 100%;
        padding: 12px;
        font-size: 14px;
        min-height: 44px;
    }
    
    /* 마이크 버튼 숨김 */
    .mic-toggle-btn {
        display: none !important;
    }
    
    .mic-toggle-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .mic-toggle-text {
        display: none;
    }
    
    .end-counsel-btn {
        width: 100%;
        padding: 12px;
        font-size: 14px;
        min-height: 44px;
    }
    
    .chat-messages {
        padding: 15px 12px;
    }
    
    .message-bubble {
        max-width: 85%;
        padding: 12px 16px;
        word-wrap: break-word;
        word-break: break-word;
    }
    
    .message-time {
        font-size: 10px;
        margin-bottom: 6px;
        opacity: 0.7;
    }
    
    .message-original {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 6px;
    }
    
    .message-translated {
        font-size: 12px;
        line-height: 1.4;
        margin-top: 6px;
        padding-top: 6px;
        opacity: 0.8;
    }
    
    .chat-input-bottom {
        padding: 12px 15px;
        gap: 10px;
        min-height: 60px;
    }
    
    .voice-btn {
        width: 44px;
        height: 44px;
        flex-shrink: 0;
        min-width: 44px;
        min-height: 44px;
    }
    
    .voice-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .chat-input-main {
        padding: 12px 15px;
        font-size: 16px;
        min-height: 44px;
        -webkit-appearance: none;
        border-radius: 22px;
    }
    
    .send-btn-main {
        padding: 12px 20px;
        font-size: 14px;
        white-space: nowrap;
        min-height: 44px;
        min-width: 60px;
    }
    
    .course-main-title {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        padding: 10px 10px 8px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .main-title-text {
        font-size: 18px;
        flex-shrink: 1;
        min-width: 0;
    }
    
    .course-main-title .history-toggle-btn-wrapper,
    .course-main-title #historyToggleBtn {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        flex-shrink: 0;
        min-width: auto !important;
        width: auto !important;
        height: auto !important;
        padding: 6px 12px !important;
        font-size: 13px !important;
        margin: 0 !important;
    }
    
    .course-main-title .history-toggle-btn-wrapper .k-button-text {
        display: inline-block !important;
        visibility: visible !important;
    }
    
    .status-message-box {
        padding: 30px 20px;
        margin: 20px;
        max-width: calc(100% - 40px);
    }
    
    .status-message-icon {
        width: 50px;
        height: 50px;
        font-size: 28px;
        margin-bottom: 15px;
    }
    
    .status-message-text {
        font-size: 16px;
    }
    
    .chat-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    /* 헤더 모바일 최적화 */
    .top-header {
        padding: 10px 0;
    }
    
    .top-nav {
        font-size: 11px;
        gap: 5px;
    }
    
    .top-nav .divider {
        margin: 0 3px;
    }
    
    .main-nav {
        padding: 10px 0;
    }
    
    .main-nav .menu {
        display: none;
    }
    
    /* Hero 섹션 모바일 최적화 */
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .container {
        padding: 0 15px;
    }
}

.polytalk-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.polytalk-title h1 {
    color: white;
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.back-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.back-btn:hover {
    background-color: white;
    color: #3682D7;
}

.student-info-bar,
.record-info-bar {
    display: flex;
    gap: 30px;
    align-items: center;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-weight: 500;
}

.info-value {
    color: white;
    font-size: 14px;
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.15);
    padding: 4px 12px;
    border-radius: 4px;
}

.polytalk-content-section .polytalk-body {
    background: white;
    border-radius: 0;
    padding: 20px;
    border: 1px solid #e0e0e0;
    box-shadow: none;
}

.translation-area {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.translation-panel {
    background: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.panel-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header.professor {
    background: #3682D7;
    color: white;
}

.panel-header.student {
    background: #f5576c;
    color: white;
}

.panel-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.language-select select {
    padding: 6px 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    cursor: pointer;
    font-weight: 600;
}

.conversation-box {
    min-height: 350px;
    max-height: 350px;
    overflow-y: auto;
    padding: 20px;
    background: white;
}

.chat-input-area {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #e0e0e0;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
    outline: none;
}

.chat-input:focus {
    border-color: #3682D7;
}

.chat-send-btn {
    background: #3682D7;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    background: #2a6bb5;
    transform: scale(1.05);
}

.chat-send-btn:active {
    transform: scale(0.95);
}

.chat-send-btn svg {
    width: 18px;
    height: 18px;
    stroke: white;
}

.welcome-message {
    color: #999;
    text-align: center;
    padding: 40px 20px;
    font-size: 14px;
    line-height: 1.8;
}

.message-item {
    margin-bottom: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    background-color: #f0f0f0;
    animation: messageSlideIn 0.3s ease;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-time {
    font-size: 11px;
    color: #999;
    margin-bottom: 4px;
}

.message-text {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
}

.translation-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.divider-icon {
    font-size: 32px;
    color: #3682D7;
}

.divider-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 12px;
    font-weight: 600;
    color: #3682D7;
}

.control-panel {
    background: #f5f7fa;
    border-radius: 10px;
    padding: 25px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #adb5bd;
    position: relative;
}

.status-dot.active {
    background-color: #51cf66;
    animation: statusBlink 1.5s infinite;
}

@keyframes statusBlink {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(81, 207, 102, 0.7);
    }
    50% {
        opacity: 0.8;
        box-shadow: 0 0 0 6px rgba(81, 207, 102, 0);
    }
}

.status-text {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
}

.control-buttons {
    display: flex;
    gap: 15px;
}

.ctrl-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.ctrl-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.start-btn {
    background: #51cf66;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.start-btn:hover:not(:disabled) {
    background: #37b24d;
}

.stop-btn {
    background: #ff6b6b;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.stop-btn:hover:not(:disabled) {
    background: #ee5a6f;
}

.save-btn {
    background: #3682D7;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.save-btn:hover:not(:disabled) {
    background: #2a6bb5;
}

.btn-icon {
    font-size: 16px;
}

.timer-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.timer-label {
    font-size: 13px;
    font-weight: 600;
    color: #495057;
}

.timer-value {
    font-size: 24px;
    font-weight: 700;
    color: #3682D7;
    font-family: 'Courier New', monospace;
    background: white;
    padding: 8px 16px;
    border-radius: 6px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 상담 기록 페이지 */
.record-content {
    padding: 20px 0;
}

.record-section {
    margin-bottom: 30px;
}

.record-section h3 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3682D7;
}

.record-text-box {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    min-height: 200px;
    font-size: 14px;
    line-height: 1.8;
    color: #333;
}

.record-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.action-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    color: white;
}

.export-btn {
    background: #3682D7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.export-btn:hover {
    background: #2a6bb5;
}

.print-btn {
    background: #51cf66;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.print-btn:hover {
    background: #37b24d;
}

.email-btn {
    background: #339af0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.email-btn:hover {
    background: #228be6;
}

/* 학생 상세보기 페이지 */
.student-info-card,
.counsel-stats,
.counsel-history {
    background: white;
    border-radius: 10px;
    padding: 25px 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.section-title-detail {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #3682D7;
}

.student-info-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.student-photo-section {
    flex-shrink: 0;
}

.student-photo-container {
    width: 180px;
    height: 240px;
    border-radius: 12px;
    overflow: hidden;
    border: 3px solid #e9ecef;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.student-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px 30px;
    flex: 1;
}

.info-row {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-label-detail {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    width: 100px;
    flex-shrink: 0;
}

.info-value-detail {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* 상담 통계 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    border: 2px solid #e9ecef;
    transition: all 0.3s;
}

.stat-card:hover {
    border-color: #3682D7;
    transform: translateY(-2px);
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #3682D7;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

/* 상담 이력 */
.history-item {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.history-item:hover {
    border-color: #3682D7;
    box-shadow: 0 4px 12px rgba(54, 130, 215, 0.1);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #dee2e6;
}

.history-date {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-badge {
    background: #3682D7;
    color: white;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
}

.history-date-badge {
    background: white;
    color: #333;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #dee2e6;
}

.time-badge {
    background: white;
    color: #333;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #dee2e6;
}

.duration-badge {
    background: #51cf66;
    color: white;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
}

.counsel-type-badge {
    padding: 6px 14px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    background: white;
    border: 1px solid #dee2e6;
}

.counsel-type-badge.face {
    background: white;
    border-color: #dee2e6;
}

.counsel-type-badge.online {
    background: white;
    border-color: #dee2e6;
}

.counsel-type-badge.phone {
    background: white;
    border-color: #dee2e6;
}

.history-content {
    background: white;
    border-radius: 8px;
    padding: 20px;
}

.counsel-topic {
    font-size: 15px;
    color: #333;
    margin-bottom: 0;
    flex: 1;
}

.counsel-topic strong {
    color: #3682D7;
}

.topic-value {
    color: #333;
}

.topic-edit {
    padding: 6px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: white;
    color: #333;
    min-width: 200px;
    margin-left: 8px;
    transition: border-color 0.3s ease;
}

.topic-edit:focus {
    outline: none;
    border-color: #3682D7;
}

.counsel-summary {
    margin-bottom: 15px;
}

.counsel-summary strong {
    font-size: 14px;
    color: #333;
    display: block;
    margin-bottom: 8px;
}

.counsel-summary p {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    margin: 0;
    padding-left: 15px;
    border-left: 3px solid #e9ecef;
}

.summary-text {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    margin: 0;
    padding-left: 15px;
    border-left: 3px solid #e9ecef;
    white-space: pre-wrap;
}

.counsel-result {
    margin-bottom: 15px;
}

.counsel-result strong {
    font-size: 14px;
    color: #333;
    display: block;
    margin-bottom: 8px;
}

.counsel-result ul {
    margin: 0;
    padding-left: 25px;
}

.counsel-result li {
    font-size: 13px;
    color: #555;
    line-height: 1.8;
    margin-bottom: 5px;
}

.counsel-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.counsel-status.completed {
    background: #d3f9d8;
    color: #2b8a3e;
}

.counsel-status.pending {
    background: #fff3bf;
    color: #e67700;
}

.status-icon {
    font-size: 14px;
}

/* 상담 내용 수정 기능 */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.edit-counsel-btn {
    background: #3682D7;
    border: none;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    color: white;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.edit-counsel-btn:hover {
    background: #2a6bb5;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(54, 130, 215, 0.3);
}

.summary-text,
.result-list {
    transition: opacity 0.3s ease;
}

.summary-edit,
.result-edit {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.3s ease;
}

.summary-edit:focus,
.result-edit:focus {
    outline: none;
    border-color: #3682D7;
}

.edit-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.save-edit-btn,
.cancel-edit-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-edit-btn {
    background: #3682D7;
    color: white;
}

.save-edit-btn:hover {
    background: #2a6bb5;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(54, 130, 215, 0.3);
}

.cancel-edit-btn {
    background: #e9ecef;
    color: #495057;
}

.cancel-edit-btn:hover {
    background: #dee2e6;
}

/* 상담 기록 작성 버튼 */
.history-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.history-title-bar .section-title-detail {
    margin-bottom: 0;
}

.history-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sort-buttons {
    display: flex;
    gap: 0;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.sort-btn {
    background: white;
    color: #666;
    border: none;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border-right: 1px solid #e0e0e0;
}

.sort-btn:last-child {
    border-right: none;
}

.sort-btn:hover {
    background: #f8f9fa;
}

.sort-btn.active {
    background: #3682D7;
    color: white;
}

.add-counsel-btn {
    background: #3682D7;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.add-counsel-btn:hover {
    background: #2a6bb5;
    transform: translateY(-2px);
}

/* 상담 기록 작성 모달 */
.counsel-form-modal {
    max-width: 900px;
}

.counsel-form-body {
    max-height: calc(80vh - 80px);
    overflow-y: auto;
}

.form-section {
    margin-bottom: 30px;
}

.form-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.required {
    color: #e74c3c;
    font-weight: bold;
}

.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="text"],
.form-group select,
.form-group textarea {
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3682D7;
}

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

.form-help {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* 상담 주제 카테고리 */
.topic-categories {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 10px;
}

.topic-btn {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 18px 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 100px;
    position: relative;
    overflow: hidden;
}

.topic-btn:hover {
    border-color: #3682D7;
    background: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(54, 130, 215, 0.15);
}

.topic-btn.active {
    background: linear-gradient(135deg, #3682D7 0%, #5da3e8 100%);
    border-color: #3682D7;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(54, 130, 215, 0.3);
}

.topic-btn.active::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 14px;
    font-weight: bold;
    color: white;
    background: rgba(255, 255, 255, 0.25);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: checkmarkPop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes checkmarkPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.topic-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.topic-icon svg {
    width: 100%;
    height: 100%;
    stroke: #3682D7;
    transition: all 0.3s ease;
}

.topic-btn:hover .topic-icon {
    transform: scale(1.15);
}

.topic-btn:hover .topic-icon svg {
    stroke: #2a6bb5;
}

.topic-btn.active .topic-icon {
    transform: scale(1.1);
}

.topic-btn.active .topic-icon svg {
    stroke: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.topic-text {
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    text-align: center;
    line-height: 1.4;
    transition: all 0.3s ease;
    letter-spacing: -0.2px;
}

.topic-btn:hover .topic-text {
    color: #2a6bb5;
}

.topic-btn.active .topic-text {
    color: white;
}

.topic-selected-msg {
    display: block;
    margin-top: 10px;
    padding: 8px 12px;
    background: #e7f5ff;
    border-radius: 6px;
    border-left: 3px solid #3682D7;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.form-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.cancel-btn {
    background: #e9ecef;
    color: #495057;
}

.cancel-btn:hover {
    background: #dee2e6;
}

.submit-btn {
    background: #3682D7;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.submit-btn:hover {
    background: #2a6bb5;
}

/* 반응형 */
@media (max-width: 1400px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .translation-area {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .translation-divider {
        flex-direction: row;
    }
    
    .divider-text {
        writing-mode: horizontal-tb;
    }
    
    .divider-icon {
        transform: rotate(90deg);
    }
}

@media (max-width: 1200px) {
    .topic-categories {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .main-nav .menu {
        display: none;
    }
    
    .dual-cards {
        grid-template-columns: 1fr;
    }
    
    .top-nav {
        font-size: 10px;
    }
    
    .control-panel {
        flex-direction: column;
        gap: 20px;
    }
    
    .control-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .ctrl-btn {
        width: 100%;
        justify-content: center;
    }
    
    .student-info-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .student-photo-container {
        width: 150px;
        height: 200px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .history-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .history-title-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .history-actions {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    
    .sort-buttons {
        width: 100%;
    }
    
    .sort-btn {
        flex: 1;
    }
    
    .add-counsel-btn {
        width: 100%;
    }
    
    .topic-categories {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 오른쪽 사이드바 - q_menu 스타일 */
.q_menu {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    transition: all 0.3s ease;
}

/* 토글 버튼 */
.q_menu .toggle {
    width: 56px;
    height: 56px;
    background: #3682D7;
    border: 2px solid white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(54, 130, 215, 0.3);
    position: relative;
    text-decoration: none;
    z-index: 2;
}

.q_menu .toggle:hover {
    background: #2a6bb5;
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(54, 130, 215, 0.4);
}

.q_menu .toggle span {
    display: none;
}

.q_menu .toggle::before {
    content: '';
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5'%3E%3Crect x='3' y='4' width='18' height='16' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3Cline x1='8' y1='4' x2='8' y2='10'%3E%3C/line%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: block;
    position: relative;
    z-index: 1;
}

/* 작은 원형 화살표 버튼 */
.q_menu .toggle::after {
    content: '';
    width: 32px;
    height: 32px;
    background: #5da3e8;
    border: 2px solid white;
    border-radius: 50%;
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    box-shadow: 0 2px 8px rgba(54, 130, 215, 0.3);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: 16px 16px;
    background-repeat: no-repeat;
    background-position: center;
    transition: all 0.3s ease;
}

.q_menu.on .toggle::after {
    transform: translateX(-50%) rotate(180deg);
}

/* 내부 메뉴 */
.q_menu .inner {
    position: absolute;
    right: 0;
    top: 72px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.q_menu.on .inner {
    opacity: 1;
    max-height: 500px;
    pointer-events: auto;
}

.q_menu .inner ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.q_menu .inner ul li {
    margin: 0;
    padding: 0;
}

.q_menu .inner ul li a {
    width: 48px;
    height: 48px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    padding: 0;
    overflow: hidden;
    text-decoration: none;
    color: #333;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 20px 20px;
    margin-bottom: 8px;
}

.q_menu .inner ul li:last-child a {
    margin-bottom: 0;
}

.q_menu .inner ul li a:hover {
    width: auto;
    min-width: 140px;
    background-color: #f8f9fa;
    background-position: 12px center;
    border-color: #3682D7;
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    justify-content: flex-start;
    padding: 0 12px 0 44px;
    gap: 12px;
}

/* 발송이력 아이콘 */
.q_menu .inner ul li a.send {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3Cpath d='M8 8 L6 6 L8 4' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3C/path%3E%3Cpath d='M6 6 L10 6' stroke='%23666' stroke-width='2' stroke-linecap='round'%3E%3C/path%3E%3C/svg%3E");
}

.q_menu .inner ul li a.send:hover {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233682D7' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3Cpath d='M8 8 L6 6 L8 4' stroke='%233682D7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3C/path%3E%3Cpath d='M6 6 L10 6' stroke='%233682D7' stroke-width='2' stroke-linecap='round'%3E%3C/path%3E%3C/svg%3E");
}

/* 푸시이력 아이콘 */
.q_menu .inner ul li a.push {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9'%3E%3C/path%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'%3E%3C/path%3E%3C/svg%3E");
}

.q_menu .inner ul li a.push:hover {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233682D7' stroke-width='2'%3E%3Cpath d='M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9'%3E%3C/path%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'%3E%3C/path%3E%3C/svg%3E");
}

/* Q&A 아이콘 */
.q_menu .inner ul li a.que {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpath d='M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3'%3E%3C/path%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'%3E%3C/line%3E%3C/svg%3E");
}

.q_menu .inner ul li a.que:hover {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233682D7' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpath d='M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3'%3E%3C/path%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'%3E%3C/line%3E%3C/svg%3E");
}

/* 업로드 아이콘 */
.q_menu .inner ul li a.upload {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'%3E%3C/path%3E%3Cpolyline points='17 8 12 3 7 8'%3E%3C/polyline%3E%3Cline x1='12' y1='3' x2='12' y2='15'%3E%3C/line%3E%3C/svg%3E");
}

.q_menu .inner ul li a.upload:hover {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233682D7' stroke-width='2'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'%3E%3C/path%3E%3Cpolyline points='17 8 12 3 7 8'%3E%3C/polyline%3E%3Cline x1='12' y1='3' x2='12' y2='15'%3E%3C/line%3E%3C/svg%3E");
}

.q_menu .inner ul li a span {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.q_menu .inner ul li a:hover span {
    opacity: 1;
    width: auto;
}

/* TOP 버튼 */
.q_menu .top {
    width: 56px;
    height: 56px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-top: 8px;
    opacity: 0.5;
    pointer-events: none;
    text-decoration: none;
    color: #333;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    position: relative;
}

.q_menu .top::before {
    content: '▲';
    font-size: 14px;
    line-height: 1;
    margin-bottom: 2px;
    display: block;
}

.q_menu .top:hover {
    background: #e9ecef;
    border-color: #3682D7;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .q_menu {
        right: 10px;
    }
    
    .q_menu .toggle {
        width: 48px;
        height: 48px;
    }
    
    .q_menu .toggle::before {
        width: 20px;
        height: 20px;
    }
    
    .q_menu .toggle::after {
        width: 28px;
        height: 28px;
        bottom: -14px;
        background-size: 14px 14px;
    }
    
    .q_menu .inner ul li a {
        width: 44px;
        height: 44px;
        background-size: 18px 18px;
    }
    
    .q_menu .inner ul li a:hover {
        padding: 0 10px 0 40px;
        background-position: 10px center;
    }
    
    .q_menu .top {
        width: 48px;
        height: 48px;
    }
    
    .q_menu .top::before {
        font-size: 12px;
    }
    
    .q_menu .top {
        font-size: 9px;
    }
}