:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --bg-color: #f8fafc;
    --surface-color: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
}

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

/* 헤더 */
.header {
    background: var(--surface-color);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo i {
    font-size: 32px;
    color: var(--primary-color);
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.nav {
    display: flex;
    gap: 8px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: var(--bg-color);
    color: var(--text-primary);
}

.nav-btn.active {
    background: var(--primary-color);
    color: white;
}

.nav-btn i {
    font-size: 18px;
}

.logout-btn {
    margin-left: 8px;
    border-left: 1px solid var(--border-color);
    padding-left: 16px;
}

.logout-btn:hover {
    background: #fee2e2 !important;
    color: var(--danger-color) !important;
}

/* 메인 콘텐츠 */
.main {
    padding: 32px 0;
    min-height: calc(100vh - 100px);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

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

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.page-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-header i {
    color: var(--primary-color);
}

/* 버튼 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-icon {
    padding: 8px 12px;
    background: var(--surface-color);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-icon:hover {
    background: var(--bg-color);
    color: var(--text-primary);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* 캘린더 */
.calendar-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: center;
    margin-bottom: 24px;
}

.calendar-controls h3 {
    font-size: 20px;
    font-weight: 600;
    min-width: 200px;
    text-align: center;
}

.calendar-wrapper {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 32px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-header {
    padding: 12px;
    text-align: center;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 14px;
}

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

.calendar-day {
    aspect-ratio: 1;
    padding: 8px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    border: 2px solid transparent;
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.calendar-day:hover {
    border-color: var(--primary-color);
    background: white;
}

.calendar-day.other-month {
    opacity: 0.4;
}

.calendar-day.today {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.calendar-day.has-meeting {
    background: #dbeafe;
    font-weight: 600;
}

.calendar-day.has-meeting::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-color);
}

.calendar-day-number {
    font-size: 14px;
}

/* 미팅 목록 */
.meetings-list {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.meetings-list h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

#meetings-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.meeting-card {
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    background: var(--bg-color);
    cursor: pointer;
    transition: all 0.2s;
}

.meeting-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.meeting-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 8px;
}

.meeting-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.meeting-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.meeting-status.예정 {
    background: #dbeafe;
    color: #1e40af;
}

.meeting-status.진행중 {
    background: #fef3c7;
    color: #92400e;
}

.meeting-status.완료 {
    background: #d1fae5;
    color: #065f46;
}

.meeting-status.취소 {
    background: #fee2e2;
    color: #991b1b;
}

.meeting-info {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

.meeting-info i {
    width: 16px;
}

/* 필터 */
.filters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-select, .search-input {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: var(--surface-color);
    color: var(--text-primary);
}

.filter-select {
    min-width: 180px;
}

.search-input {
    flex: 1;
    min-width: 250px;
}

.search-input::placeholder {
    color: var(--text-secondary);
}

/* 보고서 그리드 */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.report-card {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.report-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.report-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.report-category {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    background: var(--bg-color);
    color: var(--text-secondary);
}

.report-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.report-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.report-summary {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.progress-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-top: 12px;
}

.progress-badge.계획 {
    background: #f1f5f9;
    color: #475569;
}

.progress-badge.진행중 {
    background: #dbeafe;
    color: #1e40af;
}

.progress-badge.완료 {
    background: #d1fae5;
    color: #065f46;
}

.progress-badge.보류 {
    background: #fee2e2;
    color: #991b1b;
}

/* Publications Grid */
.publications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.publication-card {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s;
    border-left: 4px solid var(--primary-color);
}

.publication-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.publication-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
    gap: 12px;
}

.publication-type {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    background: var(--primary-color);
    color: white;
    white-space: nowrap;
}

.publication-impact {
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    white-space: nowrap;
}

.publication-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
    line-height: 1.4;
}

.publication-authors {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-style: italic;
}

.publication-journal {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 8px;
}

.publication-meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.publication-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-top: 12px;
}

.publication-status.Published {
    background: #d1fae5;
    color: #065f46;
}

.publication-status.In.Press,
.publication-status[data-status="In Press"] {
    background: #dbeafe;
    color: #1e40af;
}

.publication-status.Submitted {
    background: #fef3c7;
    color: #92400e;
}

.publication-status.In.Preparation,
.publication-status[data-status="In Preparation"] {
    background: #f1f5f9;
    color: #475569;
}

/* 통계 카드 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.stat-content h4 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

/* 연구원 그리드 */
.researchers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.researcher-card {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.researcher-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.researcher-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    font-weight: 600;
    margin: 0 auto 16px;
}

.researcher-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.researcher-position {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    background: var(--bg-color);
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.researcher-info {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* 모달 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
}

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

.modal-content {
    background: var(--surface-color);
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.modal-close:hover {
    background: var(--bg-color);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-actions {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--surface-color);
}

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* 반응형 */
@media (max-width: 768px) {
    .logo h1 {
        font-size: 18px;
    }

    .nav {
        flex-wrap: wrap;
    }

    .nav-btn span {
        display: none;
    }

    .nav-btn {
        padding: 12px 16px;
    }

    .page-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .calendar-day {
        font-size: 12px;
        padding: 4px;
    }

    .reports-grid {
        grid-template-columns: 1fr;
    }

    .researchers-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .filters {
        flex-direction: column;
    }

    .filter-select, .search-input {
        width: 100%;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
}

/* Notification System */
.notification {
    position: fixed;
    top: 24px;
    right: 24px;
    min-width: 320px;
    max-width: 500px;
    padding: 16px 20px;
    background: var(--surface-color);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    animation: notificationSlideIn 0.3s ease-out;
    border-left: 4px solid var(--primary-color);
}

@keyframes notificationSlideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notification.notification-hide {
    animation: notificationSlideOut 0.3s ease-in forwards;
}

@keyframes notificationSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

.notification i {
    font-size: 20px;
    flex-shrink: 0;
}

.notification span {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
}

.notification-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    flex-shrink: 0;
}

.notification-close:hover {
    background: var(--bg-color);
    color: var(--text-primary);
}

.notification-success {
    border-left-color: var(--success-color);
}

.notification-success i {
    color: var(--success-color);
}

.notification-error {
    border-left-color: var(--danger-color);
}

.notification-error i {
    color: var(--danger-color);
}

.notification-warning {
    border-left-color: var(--warning-color);
}

.notification-warning i {
    color: var(--warning-color);
}

.notification-info {
    border-left-color: var(--primary-color);
}

.notification-info i {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .notification {
        left: 12px;
        right: 12px;
        min-width: auto;
        max-width: none;
    }
}

