/* Soro v2.0 - 공통 스타일 */
:root {
  --primary: #1565c0;
  --primary-dark: #0d47a1;
  --primary-light: #e3f2fd;
  --danger: #e53935;
  --danger-dark: #c62828;
  --success: #43a047;
  --warning: #fb8c00;
  --purple: #6a1b9a;
  --bg: #f5f5f5;
  --white: #fff;
  --border: #e0e0e0;
  --text: #333;
  --text-light: #666;
  --text-muted: #999;
  --sidebar-width: 200px;
  --header-height: 46px;
  --tab-height: 40px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Malgun Gothic','Apple SD Gothic Neo',sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  overflow: hidden;
  height: 100vh;
}

/* 상단 헤더 */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: var(--header-height);
  background: var(--white);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.app-header .logo {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.app-header .user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-light);
}
.app-header .user-info .username { font-weight: 600; color: var(--text); }
.app-header .logout-btn {
  background: none;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 3px 10px;
  cursor: pointer;
  font-size: 11px;
  color: var(--text-light);
}
.app-header .logout-btn:hover { background: #f0f0f0; }

/* 탭 바 */
.tab-bar {
  display: flex;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  gap: 0;
  overflow-x: auto;
  position: sticky;
  top: var(--header-height);
  z-index: 99;
}
.tab-bar a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 28px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.15s;
}
.tab-bar a:hover { color: var(--primary); background: var(--primary-light); }
.tab-bar a.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-bar a .tab-icon { font-size: 14px; }

/* 탭 콘텐츠 (iframe) */
.tab-content {
  width: 100%;
  height: calc(100vh - var(--header-height) - var(--tab-height));
  border: none;
}

/* 공통 버튼 */
.btn { padding: 7px 18px; border-radius: 6px; font-size: 12px; cursor: pointer; border: 1px solid #ccc; font-family: inherit; }
.btn-primary { background: var(--primary); color: var(--white); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { background: var(--danger); color: var(--white); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger-dark); }
.btn-secondary { background: #f5f5f5; color: var(--text); }
.btn-secondary:hover { background: #e0e0e0; }
.btn-success { background: var(--success); color: var(--white); border-color: var(--success); }
.btn-warning { background: var(--warning); color: var(--white); border-color: var(--warning); }
.btn-sm { padding: 4px 10px; font-size: 11px; }
.btn-icon { background: none; border: none; cursor: pointer; font-size: 16px; padding: 2px 4px; color: var(--text-light); }
.btn-icon:hover { color: var(--text); }

/* 공통 모달 */
.modal-overlay { display: none; position: fixed; top:0;left:0;right:0;bottom:0; background: rgba(0,0,0,0.4); z-index: 200; justify-content: center; align-items: center; }
.modal-overlay.active { display: flex; }
.modal { background: var(--white); border-radius: 12px; width: 640px; max-width: 95vw; max-height: 90vh; overflow-y: auto; box-shadow: 0 8px 32px rgba(0,0,0,0.2); }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid #eee; }
.modal-header h2 { font-size: 15px; }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text-muted); padding: 0 4px; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 16px 20px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; padding: 10px 20px; border-top: 1px solid #eee; }

/* 토스트 알림 */
.copy-toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(20px); background: #333; color: #fff; padding: 10px 24px; border-radius: 8px; font-size: 14px; opacity: 0; transition: all 0.3s; z-index: 300; pointer-events: none; }
.copy-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 공통 테이블 */
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th { text-align: left; padding: 8px 10px; background: #f5f5f5; border: 1px solid var(--border); color: #555; font-weight: 600; white-space: nowrap; }
.data-table td { padding: 6px 10px; border: 1px solid var(--border); }
.data-table tr:hover td { background: #fafafa; }

/* 공통 폼 */
.form-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.form-table th { text-align: left; padding: 8px 10px; background: #f5f5f5; border: 1px solid var(--border); width: 100px; color: #555; font-weight: 600; vertical-align: middle; }
.form-table td { padding: 6px 10px; border: 1px solid var(--border); }
.form-table input, .form-table select, .form-table textarea { width: 100%; font-size: 13px; padding: 6px 8px; border: 1px solid #ddd; border-radius: 4px; font-family: inherit; }
.form-table input:focus, .form-table textarea:focus { outline: none; border-color: var(--primary); }
.form-table textarea { min-height: 60px; resize: vertical; }

/* 공통 카드 */
.stat-card { background: var(--white); border-radius: 8px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.stat-card .stat-value { font-size: 28px; font-weight: 700; margin-top: 4px; }
.stat-card .stat-label { font-size: 12px; color: var(--text-light); }

/* 검색 필드 */
.search-box { display: flex; align-items: center; position: relative; }
.search-box input { width: 100%; padding: 6px 30px 6px 10px; border: 1px solid #ddd; border-radius: 6px; font-size: 12px; }
.search-box input:focus { outline: none; border-color: var(--primary); }

/* 로딩 스피너 */
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid #ccc; border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 스크롤바 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* 빈 상태 */
.empty-state { text-align: center; padding: 40px; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 48px; margin-bottom: 10px; }
.empty-state p { font-size: 14px; }

/* 우선순위 색상 */
.priority-urgent { background: #ffebee; border-left: 3px solid #e53935; }
.priority-high { background: #fff3e0; border-left: 3px solid #fb8c00; }
.priority-medium { background: #e8f5e9; border-left: 3px solid #43a047; }
.priority-low { background: #f3e5f5; border-left: 3px solid #ab47bc; }
.priority-badge { font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 3px; color: #fff; }
.priority-badge.urgent { background: #e53935; }
.priority-badge.high { background: #fb8c00; }
.priority-badge.medium { background: #43a047; }
.priority-badge.low { background: #ab47bc; }

/* 상태 배지 */
.status-badge { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 10px; }
.status-badge.inbox { background: #e0e0e0; color: #555; }
.status-badge.todo { background: #e3f2fd; color: #1565c0; }
.status-badge.doing { background: #fff3e0; color: #e65100; }
.status-badge.waiting { background: #f3e5f5; color: #6a1b9a; }
.status-badge.done { background: #e8f5e9; color: #2e7d32; }

/* 로그인 페이지 */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
}
.login-card {
  background: var(--white);
  border-radius: 16px;
  padding: 40px;
  width: 380px;
  max-width: 90vw;
  box-shadow: 0 16px 48px rgba(0,0,0,0.2);
}
.login-card h1 { font-size: 22px; margin-bottom: 6px; color: var(--primary); }
.login-card p { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }
.login-card .form-group { margin-bottom: 16px; }
.login-card label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 4px; color: var(--text-light); }
.login-card input { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; }
.login-card input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(21,101,192,0.1); }
.login-card .login-btn { width: 100%; padding: 12px; font-size: 14px; font-weight: 700; border-radius: 8px; margin-top: 8px; }
.login-error { color: var(--danger); font-size: 12px; margin-top: 8px; display: none; text-align: center; }

/* 반응형 - 태블릿 */
@media (max-width: 768px) {
  .tab-bar { padding: 0; gap: 0; }
  .tab-bar a { padding: 8px 6px; font-size: 10px; flex: 1; justify-content: center; text-align: center; flex-direction: column; gap: 2px; }
  .tab-bar a .tab-text { font-size: 9px; }
  .tab-bar a .tab-icon { font-size: 16px; }
  .app-header { padding: 0 12px; height: 40px; }
  .app-header .logo { font-size: 14px; }
  .app-header .user-info { gap: 6px; font-size: 11px; }
  .app-header .logout-btn { padding: 2px 8px; font-size: 10px; }
  --header-height: 40px;
  --tab-height: 50px;
  .tab-content { height: calc(100vh - 40px - 50px); }
  .modal { width: 95vw; }
}

/* 반응형 - 모바일 */
@media (max-width: 480px) {
  .tab-bar a { padding: 8px 12px; min-width: 0; }
  .tab-bar a .tab-text { font-size: 11px; }
  .tab-bar a .tab-icon { font-size: 16px; }
  .tab-content { height: calc(100vh - 40px - 42px); }
  .app-header { padding: 0 10px; }
}

/* ===== 인트로 랜딩 화면 ===== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+KR:wght@300;400;600&display=swap');

.landing-screen {
  position: fixed; inset: 0; z-index: 1000;
  background: #0c0c0c;
  display: flex;
  transition: opacity 0.8s ease, transform 0.6s ease;
  overflow: hidden;
}
.landing-screen.fade-out {
  opacity: 0; transform: scale(1.05);
  pointer-events: none;
}
.landing-paintings {
  display: flex;
  width: 100%; height: 100%;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0 10%;
}
.painting-panel {
  position: relative;
  flex: 0 0 30%;
  height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  overflow: hidden;
  gap: 0;
}
.painting-wrap {
  display: flex; flex-direction: column;
  align-items: center;
  animation: paintingFloat 7s ease-in-out infinite;
}
.painting-panel:nth-child(3) .painting-wrap {
  animation-delay: -3.5s;
}
.painting-panel img {
  max-height: 75vh;
  width: auto;
  max-width: 95%;
  object-fit: contain;
  filter: brightness(0.8) contrast(1.05);
}
.painting-caption {
  margin-top: 10px;
  text-align: center;
  font-family: 'Noto Serif KR', serif;
  font-size: 10px; color: rgba(255,255,255,0.3);
  letter-spacing: 1px;
}
@keyframes paintingFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.landing-center {
  flex: 0 0 24%;
  height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 10;
  text-align: center;
  padding: 0 20px;
}
.landing-slogan {
  animation: sloganIn 1.2s ease-out 0.3s both;
}
.landing-slogan h1 {
  font-family: 'Noto Serif KR', serif;
  font-size: 30px; font-weight: 300;
  color: #e8dfd3;
  letter-spacing: 3px;
  line-height: 1.8;
}
.landing-slogan p {
  margin-top: 20px;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 13px; font-weight: 300;
  color: rgba(255,255,255,0.4);
  letter-spacing: 3px;
}
.landing-divider {
  width: 40px; height: 1px;
  background: rgba(255,255,255,0.2);
  margin: 28px auto;
  animation: sloganIn 1.2s ease-out 0.6s both;
}
@keyframes sloganIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.landing-enter {
  margin-top: 40px;
  z-index: 10;
  padding: 14px 56px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.7);
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 13px; font-weight: 400;
  letter-spacing: 4px;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.3s ease;
  animation: sloganIn 1.2s ease-out 1s both;
}
.landing-enter:hover {
  border-color: rgba(255,255,255,0.5);
  color: rgba(255,255,255,0.95);
  background: rgba(255,255,255,0.15);
}
@media (max-width: 768px) {
  .landing-paintings { padding: 0 2%; }
  .painting-panel { flex: 0 0 35%; }
  .painting-panel img { max-height: 50vh; }
  .landing-center { flex: 0 0 30%; }
  .landing-slogan h1 { font-size: 20px; }
}
