:root {
  --ewha-green: #00462A;
  --ewha-green-light: #0C6040;
  --ewha-gold: #8E793E;
  /* 보조색으로 금색 계열 */
  --text-dark: #1F1F1F;
  --text-gray: #666666;
  --bg-light: #F9F9F9;
  --border-color: #E0E0E0;

  --font-sans: 'Nanum Gothic', sans-serif;
  --font-serif: 'Nanum Gothic', sans-serif;
}

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

html,
body {
  width: 100%;
  min-height: 100vh;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

#root {
  min-height: 100vh;
  width: 100%;
  display: flex;
}

.app-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  background-color: #F9F9F9;
  min-height: 100vh;
}

/* Response for mobile */
@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
  }
}


h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--ewha-green);
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: var(--font-sans);
}

input,
select,
textarea {
  font-family: var(--font-sans);
}

/* ===== LOGIN PAGE (이화 컨설팅 분석) ===== */
.login-container {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, #e6f7ef 0%, #fff 50%, #e6f7ef 100%);
  box-sizing: border-box;
}

.login-container--analytics {
  background: linear-gradient(135deg, #f5f3ef 0%, #fff 45%, #e6f7ef 100%);
}

.login-card {
  background: #fff;
  padding: 2.5rem 3rem;
  border-radius: 1rem;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  width: 100%;
  max-width: 420px;
}

.login-card--analytics {
  border-top: 3px solid var(--ewha-gold);
}

.login-logo {
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-logo-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.login-logo-box {
  width: 80px;
  height: 80px;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid #f3f4f6;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  overflow: hidden;
}

.login-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-logo-accent {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--ewha-green), var(--ewha-gold));
  border-radius: 2px;
  margin-top: 1rem;
}

.login-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ewha-green);
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.login-subtitle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  color: var(--text-gray);
  margin-bottom: 1.5rem;
}

.login-subtitle-icon {
  color: var(--ewha-gold);
  flex-shrink: 0;
}

.login-error-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  border-radius: 0.5rem;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  font-size: 0.875rem;
  font-weight: 500;
}

.login-error-icon {
  flex-shrink: 0;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.login-form .form-group {
  margin-bottom: 1.25rem;
}

.login-form .form-group:last-of-type {
  margin-bottom: 0.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 0.375rem;
  margin-left: 0.25rem;
}

.form-input-wrap {
  position: relative;
}

.form-input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
  transition: color 0.2s;
}

.form-input-wrap:focus-within .form-input-icon {
  color: var(--ewha-green);
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  font-size: 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  background: #fff;
  color: var(--text-dark);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--ewha-green);
  box-shadow: 0 0 0 3px rgba(0, 70, 42, 0.1);
}

.form-input::placeholder {
  color: #9ca3af;
}

.form-input:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.login-remember {
  padding: 0.5rem 0.25rem 1rem;
}

.login-remember-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-gray);
}

.login-remember-label:hover {
  color: var(--text-dark);
}

.login-remember-checkbox {
  width: 1rem;
  height: 1rem;
  border-radius: 0.25rem;
  border: 1px solid var(--border-color);
  accent-color: var(--ewha-green);
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

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

.btn-primary {
  background: var(--ewha-green);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: #003d23;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.btn-login {
  width: 100%;
  padding: 0.875rem 1rem;
  margin-top: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.btn-login:hover:not(:disabled) {
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.login-btn-spinner {
  animation: login-spin 0.8s linear infinite;
}

@keyframes login-spin {
  to { transform: rotate(360deg); }
}

.btn-secondary {
  background: #fff;
  color: var(--text-dark);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-light);
  border-color: #9ca3af;
}

.login-footer {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #f3f4f6;
  text-align: center;
}

.login-footer-text {
  font-size: 0.75rem;
  color: #9ca3af;
}

.login-footer-link {
  color: var(--ewha-green);
  font-weight: 700;
  cursor: help;
}

.login-footer-link:hover {
  text-decoration: underline;
}

.login-home-wrap {
  margin-top: 1.5rem;
  flex-shrink: 0;
}

/* 로그인 카드+홈 버튼을 하나의 블록으로 화면 정중앙에 배치 */
.login-container .login-card {
  flex-shrink: 0;
}

.login-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-gray);
  background: none;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.login-home-btn:hover {
  color: var(--ewha-green);
  background: rgba(0, 70, 42, 0.06);
}

.animate-fade-in {
  animation: login-fade-in 0.3s ease;
}

@keyframes login-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.login-loading {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--bg-light);
}

.login-loading p {
  font-size: 0.875rem;
  color: var(--text-gray);
}

.login-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--ewha-green);
  border-radius: 50%;
  animation: login-spin 0.8s linear infinite;
}

.login-error-text {
  color: var(--text-dark);
  font-size: 0.9375rem;
}

@media (max-width: 768px) {
  .login-card {
    padding: 1.5rem;
    max-width: 100%;
  }
  .login-title {
    font-size: 1.25rem;
  }
  .login-subtitle {
    font-size: 0.8125rem;
  }
}
/* Pagination Styles */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    padding: 0.2rem 0.5rem;
}

.ewha-select {
    padding: 0.4rem 0.8rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-family: var(--font-sans);
    color: var(--text-dark);
    font-size: 0.85rem;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.ewha-select:focus {
    border-color: var(--ewha-green);
    box-shadow: 0 0 0 2px rgba(0, 70, 42, 0.1);
}

.page-navigation {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: #666;
}

.page-btn:hover:not(:disabled) {
    background-color: var(--ewha-green);
    color: white;
    border-color: var(--ewha-green);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 70, 42, 0.15);
}

.page-btn:active:not(:disabled) {
    transform: translateY(0);
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background-color: #f5f5f5;
}

.page-info {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #444;
    background: #f8f9fa;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    border: 1px solid #eeeff2;
}

.current-page {
    color: var(--ewha-green);
    font-weight: 700;
}

.divider {
    color: #ccc;
    font-size: 0.8rem;
}

.total-pages {
    color: #888;
}

/* Drag Overlay Styles */
.drag-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 70, 42, 0.9);
    /* Ewha Green with high opacity */
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    /* Match grid wrapper if needed, or container */
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

.drag-content {
    color: white;
    text-align: center;
    font-family: var(--font-sans);
    font-size: 1.2rem;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    border: 3px dashed rgba(255, 255, 255, 0.5);
    border-radius: 12px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.ewha-container {
    max-width: 1600px;
    /* Increased from 1200px */
    width: 95%;
    /* Take up most of screen if needed */
    margin: 0 auto;
    padding: 2rem;
    min-height: 80vh;
    /* Ensure drop area has height */
}


.ewha-header {
    text-align: center;
    margin-bottom: 2rem;
}

.ewha-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 2px solid var(--ewha-green);
    display: inline-block;
    padding-bottom: 0.5rem;
}

.ewha-header p {
    color: var(--text-gray);
    margin-top: 1rem;
}

.grid-wrapper {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 70, 42, 0.08);
    /* 이화 그린 틴트가 들어간 그림자 */
    overflow: hidden;
    border: 1px solid var(--border-color);
}

/* Stats Tab Styles */
.stats-container {
    background: transparent;
    margin-bottom: 2rem;
}

.stats-header-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0 1rem;
}

.stats-header-controls h3 {
    font-size: 1.2rem;
    color: var(--ewha-green);
    margin: 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--ewha-green);
    cursor: pointer;
}

.filter-group {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1rem;
    cursor: pointer;
    user-select: none;
}

.radio-label input[type="radio"] {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--ewha-green);
    cursor: pointer;
}

.stats-grid-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background-color: var(--ewha-green);
    color: white;
    font-weight: 500;
    padding: 0.4rem 1rem;
    text-align: center;
    font-family: var(--font-serif);
}

.stats-grid-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 0.4rem 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.stats-grid-row:hover {
    background-color: #F0F6F4;
}

.stats-grid-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 0.4rem 1rem;
    background-color: #f9f9f9;
    font-weight: 700;
    color: var(--ewha-green);
    border-top: 2px solid var(--ewha-green);
    text-align: center;
}

/* Frequency Stats Grid (4 columns) */
.stats-freq-grid-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    background-color: var(--ewha-green);
    color: white;
    font-weight: 500;
    padding: 0.4rem 1rem;
    text-align: center;
    font-family: var(--font-serif);
    margin-top: 2rem;
    /* Spacing from previous table */
}

.stats-freq-grid-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    padding: 0.4rem 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.stats-freq-grid-row:hover {
    background-color: #F0F6F4;
}

.stats-freq-grid-footer {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    padding: 0.4rem 1rem;
    background-color: #f9f9f9;
    font-weight: 700;
    color: var(--ewha-green);
    border-top: 2px solid var(--ewha-green);
    text-align: center;
}

/* Name-based Stats Grid (6 columns) */
.stats-name-grid-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
    background-color: var(--ewha-green);
    color: white;
    font-weight: 500;
    padding: 0.4rem 1rem;
    text-align: center;
    font-family: var(--font-serif);
    margin-top: 2rem;
}

.stats-name-grid-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
    padding: 0.4rem 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.stats-name-grid-row:hover {
    background-color: #F0F6F4;
}

.stats-name-grid-footer {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
    padding: 0.4rem 1rem;
    background-color: #f9f9f9;
    font-weight: 700;
    color: var(--ewha-green);
    border-top: 2px solid var(--ewha-green);
    text-align: center;
}

/* Tab Styles */
.content-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0px;
}

.tab-btn {
    padding: 0.8rem 1.5rem;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-gray);
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    font-family: var(--font-sans);
}

.tab-btn:hover {
    color: var(--ewha-green);
    background-color: rgba(0, 70, 42, 0.05);
    border-radius: 8px 8px 0 0;
}

.tab-btn.active {
    color: var(--ewha-green);
    font-weight: 700;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    /* Overlap border-bottom */
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--ewha-green);
    border-radius: 3px 3px 0 0;
}

/* Chart Placeholder */
.chart-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 70, 42, 0.08);
    padding: 2rem;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--border-color);
    color: var(--text-gray);
    flex-direction: column;
    gap: 1rem;
}


.grid-header {
    display: grid;
    grid-template-columns: 80px 300px 1fr;
    background-color: var(--ewha-green);
    color: white;
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    border-bottom: 1px solid var(--ewha-green-light);
}

.grid-header span {
    text-align: center;
    font-family: var(--font-serif);
    letter-spacing: 0.05em;
    display: flex;
    justify-content: center;
    align-items: center;
    word-break: keep-all;
    /* Prevent word breaking for Korean */
    line-height: 1.2;
}

.grid-row {
    display: grid;
    grid-template-columns: 80px 300px 1fr;
    padding: 0.6rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
    align-items: center;
}

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

.grid-row:hover {
    background-color: #F0F6F4;
    /* 아주 연한 녹색 */
    padding-left: 1.8rem;
    /* 살짝 오른쪽으로 이동하는 애니메이션 */
}

.col-no {
    text-align: center;
    font-weight: 700;
    color: var(--ewha-green);
    font-family: var(--font-serif);
}

.col-title {
    font-weight: 600;
    color: var(--text-dark);
    padding-right: 1.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.col-text {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive */
@media (max-width: 768px) {
    .grid-header {
        display: none;
        /* 헤더 숨김 */
    }

    .grid-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 1.5rem;
    }

    .grid-row:hover {
        padding-left: 1.5rem;
        /* 모바일에서는 이동 효과 제거하거나 줄임 */
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    }

    .col-no {
        text-align: left;
        font-size: 0.8rem;
        color: var(--ewha-gold);
        margin-bottom: 0.2rem;
    }

    .col-title {
        font-size: 1.1rem;
        white-space: normal;
    }
}

/* Job Grid Styles */
.job-grid {
    overflow-x: auto;
    /* Allow horizontal scroll if screen is very small */
}

.job-grid .grid-header,
.job-grid .grid-row {
    /* Converted from px to fr for responsive layout */
    /* No(0.5) Date(1.2) College(1.0) Dept(1.1) Grade(0.5) ID(0.8) Name(0.8) Type(1.4) Consultant(0.8) Response(0.8) */
    grid-template-columns: 0.5fr 1.2fr 1fr 1.1fr 0.5fr 0.8fr 0.8fr 1.4fr 0.8fr 0.8fr;
    width: 100%;
    /* Fit to container */
    min-width: 100%;
    /* Ensure it fills container */
    font-size: 0.85rem;
    /* Slightly reduced font size */
    gap: 0.4rem;
    padding: 0.4rem 0.5rem;
    white-space: nowrap;
    /* Prevent wrapping in general for cleaner look */
}

.job-grid .grid-header span,
.job-grid .grid-row>div {
    display: flex;
    align-items: center;
}

.col-center {
    justify-content: center;
    text-align: center;
    color: var(--text-dark);
    word-break: keep-all;
}

.col-left {
    justify-content: flex-start;
    text-align: left;
    color: var(--text-dark);
}

.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block !important;
    max-width: 100%;
    /* Ensure it truncates within its grid cell */
}

/* Jinro Grid Styles */
.jinro-grid {
    overflow-x: auto;
}

.jinro-grid .grid-header,
.jinro-grid .grid-row {
    /* Converted from px to fr */
    /* 60 180 140 160 80 60 100 100 140 100 140 180 80 80 */
    grid-template-columns:
        0.5fr 1.2fr 1fr 1.1fr 0.6fr 0.5fr 0.8fr 0.8fr 1fr 0.8fr 1fr 1.2fr 0.6fr 0.6fr;
    width: 100%;
    min-width: 100%;
    font-size: 0.85rem;
    gap: 0.4rem;
    padding: 0.4rem 0.5rem;
    white-space: nowrap;
}

.jinro-grid .grid-header span,
.jinro-grid .grid-row>div,
.job-grid .grid-header span,
.job-grid .grid-row>div {
    display: flex;
    align-items: center;
}

.job-grid .grid-header span,
.jinro-grid .grid-header span {
    justify-content: center;
    cursor: pointer;
    user-select: none;
    position: relative;
    /* For potential sort icon positioning if we want it absolute, but inline is fine */
}

.job-grid .grid-header span:hover,
.jinro-grid .grid-header span:hover {
    background-color: rgba(0, 0, 0, 0.05);
    /* Slight hover effect */
    border-radius: 4px;
}

.no-data {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    font-size: 1.1rem;
    color: var(--text-gray);
    width: 100%;
}

.button-container {
    display: flex;
    justify-content: space-between;
    /* 양 끝 정렬 */
    margin-top: 2rem;
}

.ewha-btn {
    background-color: var(--ewha-green);
    color: white;
    border: 1px solid var(--ewha-green);
    padding: 0.8rem 1.8rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-sans);
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 70, 42, 0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ewha-btn.outline {
    background-color: white;
    color: var(--ewha-green);
}

.ewha-btn:hover {
    background-color: var(--ewha-green-light);
    border-color: var(--ewha-green-light);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 70, 42, 0.3);
}

.ewha-btn.outline:hover {
    background-color: #F0F6F4;
    color: var(--ewha-green);
    border-color: var(--ewha-green);
}

.ewha-btn:active {
    transform: translateY(0);
}


@media (max-width: 768px) {
    .button-container {
        padding: 0 1.5rem;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    width: fit-content;
    /* Adjust width to content */
    min-width: 80%;
    /* But at least 80% */
    max-width: 95vw;
    /* Allow it to grow almost full screen */
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--ewha-green);
    padding-bottom: 0.5rem;
}

.modal-header h3 {
    margin: 0;
    color: var(--ewha-green);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-gray);
    padding: 0;
}

.modal-close:hover {
    color: var(--text-dark);
}

.clickable-cell {
    cursor: pointer;
    text-decoration: underline;
    color: var(--ewha-green);
}

/* Pre-Survey Table Styles */
.pre-survey-table-container {
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 70, 42, 0.08);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.pre-survey-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1500px;
    /* Ensure horizontal scroll for many columns */
}

.pre-survey-table th,
.pre-survey-table td {
    border: 1px solid #e0e0e0;
    padding: 6px 10px;
    text-align: center;
    font-size: 0.9rem;
}

.pre-survey-table th {
    background-color: var(--ewha-green);
    color: white;
    font-weight: 500;
    white-space: nowrap;
}

.pre-survey-table thead tr:first-child th {
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.pre-survey-table tbody tr:hover {
    background-color: #F0F6F4;
}

.q-check {
    color: var(--ewha-green);
    font-weight: bold;
}

/* Scroll Cell Styles for Long Text Fields */
.scroll-cell {
    max-height: 80px;
    overflow-y: auto;
    overflow-x: hidden;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.85rem;
    text-align: left;
    padding: 8px;
    box-sizing: border-box;
    display: block;
    width: 100%;
}

/* Custom scrollbar for webkit */
.scroll-cell::-webkit-scrollbar {
    width: 4px;
}

.scroll-cell::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.scroll-cell::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

/* Ensure table cells containing scroll-cell maintain proper padding */
.pre-survey-table td:has(.scroll-cell) {
    padding: 0;
    vertical-align: top;
}/* Sidebar Styles */
.sidebar {
    width: 240px;
    background-color: white;
    border-right: 1px solid var(--border-color);
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.02);
    transition: width 0.3s ease;
    /* Slide transition */
    flex-shrink: 0;
    z-index: 1;
    /* Prevent shrinking in flex container */
    overflow: visible;
}

.sidebar.collapsed {
    width: 4px;
    padding: 0;
    overflow: visible;
    border-right: none;
    box-shadow: none;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    margin-bottom: 3rem;
    position: static;
    height: 40px;
    /* consistent height for header area */
}

/* Adjustments for collapsed state */
.sidebar.collapsed .sidebar-header {
    height: 0;
    margin: 0;
    padding: 0;
}

.sidebar.collapsed .sidebar-brand,
.sidebar.collapsed .menu-list,
.sidebar.collapsed .sidebar-footer {
    display: none;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.sidebar-logo-box {
    width: 40px;
    height: 40px;
    padding: 0.35rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.6rem;
    background: #fff;
    box-shadow: 0 3px 8px rgb(0 0 0 / 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sidebar-brand-title {
    color: var(--ewha-green);
    font-weight: 700;
    font-size: 1.25rem;
    white-space: nowrap;
}

/* Toggle Button Styles */
.toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s, color 0.2s;
}

.sidebar:not(.collapsed) .toggle-btn {
    position: absolute;
    top: 50%;
    right: -22px;
    width: 22px;
    height: 44px;
    padding: 0;
    border: 1px solid #e3e7e5;
    border-radius: 0 0.625rem 0.625rem 0;
    background: #fff;
    box-shadow: 2px 2px 7px rgb(0 0 0 / 0.12);
    transform: translateY(-50%);
    z-index: 10;
}

.toggle-btn:hover {
    background-color: #f0f0f0;
    color: var(--ewha-green);
}

.sidebar.collapsed .toggle-btn {
    position: absolute;
    top: 50%;
    left: 4px;
    right: auto;
    width: 22px;
    height: 44px;
    padding: 0;
    border: 1px solid #e3e7e5;
    border-radius: 0 0.625rem 0.625rem 0;
    background: #fff;
    box-shadow: 2px 2px 7px rgb(0 0 0 / 0.12);
    transform: translateY(-50%);
    z-index: 10;
}


.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.sidebar-footer {
    margin-top: auto;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 0.75rem 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-gray);
    transition: color 0.2s, background 0.2s;
    border-radius: 0.5rem;
}

.sidebar-logout:hover {
    color: var(--ewha-green);
    background: #f5f5f5;
}

.menu-item {
    padding: 1rem 0.5rem 1rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: var(--text-gray);
    border-left: 4px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    /* Space between icon and text */
    height: 50px;
    white-space: nowrap;
    /* Prevent text wrapping */
}

.sidebar.collapsed .menu-item {
    justify-content: center;
    padding: 1rem 0;
}

.menu-item:hover {
    background-color: #f5f5f5;
    color: var(--ewha-green);
}

.menu-item.active {
    background-color: #F0F6F4;
    color: var(--ewha-green);
    border-left-color: var(--ewha-green);
    font-weight: 700;
}

.menu-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
}

.menu-item-text {
    font-size: 0.875rem;
    transition: opacity 0.2s;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1rem 0;
        transition: none;
    }

    .sidebar.collapsed {
        width: 100%;
        /* Mobile doesn't support side collapse usually, maybe hide menu list? */
    }

    .sidebar-header {
        justify-content: center;
        margin-bottom: 1rem;
    }

    .toggle-btn {
        display: none;
        /* Hide toggle on mobile for now */
    }

    .sidebar-brand {
        margin-bottom: 0;
        margin-left: 0;
        margin-right: 0;
    }

    .menu-list {
        flex-direction: row;
        justify-content: center;
        gap: 0;
    }

    .menu-item {
        padding: 0.8rem 1.5rem;
        border-left: none;
        border-bottom: 3px solid transparent;
        justify-content: center;
        height: auto;
        gap: 0.5rem;
    }

    .menu-item.active {
        border-left: none;
        border-bottom-color: var(--ewha-green);
        background: none;
    }
}
.satisfaction-match-container {
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.upload-section {
    display: flex;
    gap: 20px;
    height: 180px;
}

.drop-zone {
    flex: 1;
    border: 2px dashed #e0e0e0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #fafafa;
    transition: all 0.2s ease;
    cursor: pointer;
}

.drop-zone:hover,
.drop-zone.drag-active {
    border-color: #00462A;
    background-color: #f0fdf4;
}

.upload-icon {
    color: #00462A;
    margin-bottom: 12px;
}

.zone-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.zone-desc {
    font-size: 0.9rem;
    color: #666;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 8px 16px;
    background-color: #e8f5e9;
    border-radius: 20px;
    color: #00462A;
    font-size: 0.9rem;
}

.comparison-results {
    flex: 1;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.results-header {
    padding: 16px 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-header-left {
    display: flex;
    align-items: center;
}

.main-tabs {
    display: flex;
    gap: 4px;
}

.main-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.main-tab:hover {
    background: #f0f0f0;
    color: #333;
}

.main-tab.active {
    background: #e8f5e9;
    color: #00462A;
}

.results-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}


.download-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #00462A;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-left: auto;
    /* Push to right */
}

.download-btn:hover {
    background-color: #00331f;
}

.reset-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.reset-btn:hover {
    background-color: #e0e0e0;
    color: #333;
}

.stats-summary {
    display: flex;
    gap: 16px;
    align-items: center;
}

.filter-checkboxes {
    display: flex;
    gap: 12px;
    align-items: center;
    padding-left: 16px;
    margin-left: 16px;
    border-left: 1px solid #ddd;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: #555;
    cursor: pointer;
    user-select: none;
}

.filter-checkbox input[type="checkbox"],
.filter-checkbox input[type="radio"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.stat-item {
    font-size: 0.9rem;
    color: #666;
}

.stat-item strong {
    color: #00462A;
    margin-left: 4px;
}

.table-container {
    flex: 1;
    overflow-y: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    padding: 6px 12px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    border-bottom: 1px solid #eee;
}

.comparison-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.comparison-table th.sortable svg {
    display: inline-block;
    vertical-align: middle;
    margin-left: 4px;
}

.comparison-table th.sortable:hover {
    background-color: #e8f4f0;
    color: #00462A;
}

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

.comparison-table tr:hover {
    background-color: #f8fcf9;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-match {
    background-color: #e6fffa;
    color: #00462A;
}

.status-mismatch {
    background-color: #ffebee;
    color: #c62828;
}

.status-not-in-ref {
    background-color: #fef3c7;
    color: #92400e;
}

.status-duplicate {
    background-color: #fff3e0;
    color: #e65100;
}

.duplicate-row {
    background-color: #fffdf9;
}

.mismatch-cell {
    color: #c62828;
    background-color: #fff8f8;
    font-weight: 500;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    gap: 12px;
}

/* New Styles for Data Content within Cells */
.data-content {
    display: flex;
    flex-direction: column;
    gap: 0px;
    align-items: center;
}

.reference-data {
    font-size: 0.8em;
    color: #666;
    /* Default color for reference data */
}

/* Ensure mismatch cells style their children correctly if needed, 
   though the parent .mismatch-cell color usually cascades. 
   We can enforce specifically if desired. */
.mismatch-cell .student-data {
    color: #c62828;
    font-weight: 600;
}

/* 엑셀 미리보기 */
.excel-preview-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 400px;
}

.excel-preview-sheet-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
    margin-bottom: 12px;
}

.excel-sheet-tab {
    padding: 6px 14px;
    border: 1px solid #ddd;
    background: #fafafa;
    color: #555;
    font-size: 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.excel-sheet-tab:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.excel-sheet-tab.active {
    background: #00462A;
    color: white;
    border-color: #00462A;
}

.excel-preview-content {
    flex: 1;
    overflow: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
}

.excel-preview-html {
    width: 100%;
    overflow: auto;
}

.excel-preview-html table,
.excel-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.excel-preview-table.excel-preview-exact {
    table-layout: fixed;
    font-family: var(--font-sans);
    font-size: 11px;
}

.excel-preview-exact td {
    padding: 2px 6px;
    vertical-align: middle;
    /* 테두리는 셀에 정의된 경우에만 적용 (인라인 style로) */
}

.excel-preview-html td,
.excel-preview-html th,
.excel-preview-table:not(.excel-preview-exact) td {
    border: 1px solid #ddd;
    padding: 4px 8px;
    min-width: 60px;
}

.excel-preview-html th {
    background: #f5f5f5;
    font-weight: 600;
}

.sub-tabs {
    padding: 0 4px;
}

.excel-sheet-tab.active {
    background: #00462A;
    color: white;
    border-color: #00462A;
    box-shadow: 0 2px 4px rgba(0, 70, 42, 0.2);
}

.extraction-grid-container {
    padding: 0 4px;
}

.month-card h3 {
    color: #00462A;
    font-size: 1.1rem;
    font-weight: 700;
}

.validation-box {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.anomaly-box {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Excel Style Dashboard */
.excel-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    align-items: start;
}

.excel-style-table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.85rem;
    border: 2px solid #ccc;
    background: white;
}

.excel-style-table th,
.excel-style-table td {
    border: 1px solid #ddd;
    padding: 6px 8px;
    text-align: center;
}

.excel-header-main {
    background-color: #3b82f6;
    /* Blue in image */
    color: white;
    font-weight: 700;
}

.excel-header-sub {
    background-color: #f3f4f6;
    color: #374151;
    font-weight: 600;
}

.excel-total-row {
    font-weight: 700;
}

.excel-total-highlight {
    background-color: #fef08a !important;
    /* Yellow highlight */
}

.excel-total-orange {
    background-color: #fb923c !important;
    /* Orange highlight */
    color: white;
}

.excel-side-header {
    background-color: #3b82f6;
    color: white;
    font-weight: 700;
    width: 80px;
}

.excel-summary-header {
    background-color: #00462A;
    color: white;
    padding: 8px 16px;
    display: inline-block;
    border-radius: 4px 4px 0 0;
    font-weight: 600;
}

.excel-college-matrix {
    grid-column: 1 / -1;
    /* Full width for college table */
    margin-top: 20px;
}
/* Layout Reset for Full Width Sidebar */
#root {
  max-width: none;
  margin: 0;
  padding: 0;
  text-align: left;
  width: 100%;
}

.app-container {
  display: flex;
  width: 100vw;
  min-height: 100vh;
}