/* 모투스컴퍼니 데일리 - 공통 스타일 */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  background: #f4f6f8;
  color: #2c3e50;
  -webkit-font-smoothing: antialiased;
}
a { color: #3498db; text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* 헤더 */
.hero {
  background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
  color: #fff;
  padding: 60px 20px 80px;
  text-align: center;
  position: relative;
}
.hero h1 { font-size: 36px; font-weight: 800; margin: 0 0 10px; letter-spacing: -0.5px; }
.hero p { font-size: 16px; opacity: 0.9; margin: 0; }
.hero .logo-area { margin-bottom: 14px; }
.hero .logo-area img { height: 40px; }

/* 카드 */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  margin-bottom: 24px;
}
.card-title {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 16px;
  border-left: 4px solid #3498db;
  padding-left: 12px;
}

/* 자사 콘텐츠 섹션 */
.company-section {
  background: linear-gradient(135deg, #fffaf0 0%, #fff5e0 100%);
  border: 1px solid #f0c14b;
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 24px;
}
.company-section .card-title { border-left-color: #f0c14b; }
.company-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.company-card {
  background: #fff;
  border: 1px solid #f0c14b;
  border-radius: 10px;
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
  cursor: pointer;
}
.company-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(240,193,75,0.25); }
.company-card .thumb { width: 100%; height: 160px; object-fit: cover; display: block; }
.company-card .thumb-fallback {
  width: 100%; height: 160px;
  background: linear-gradient(135deg, #f0c14b 0%, #e09b3d 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 36px;
}
.company-card .body { padding: 14px 16px 16px; }
.company-card .badge {
  display: inline-block; padding: 3px 10px;
  background: #f0c14b; color: #5a3e00;
  font-size: 11px; font-weight: 700; border-radius: 12px; margin-right: 4px;
}
.company-card .badge.pin { background: #e74c3c; color: #fff; }
.company-card h3 { font-size: 15px; font-weight: 700; margin: 8px 0 6px; line-height: 1.4; }
.company-card .summary { font-size: 13px; color: #5a6878; line-height: 1.6; margin-bottom: 10px; min-height: 42px; }
.company-card .more { font-size: 12px; color: #2c3e50; font-weight: 700; }

/* 구독 카드 */
.subscribe-card {
  background: linear-gradient(135deg, #ff9966 0%, #ff5e62 100%);
  color: #fff;
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(255,94,98,0.25);
}
.subscribe-card h2 { font-size: 22px; margin: 0 0 6px; }
.subscribe-card p { font-size: 14px; opacity: 0.9; margin: 0 0 18px; }
.subscribe-form { display: flex; gap: 8px; flex-wrap: wrap; }
.subscribe-form input {
  flex: 1; min-width: 180px;
  padding: 12px 14px;
  border: none; border-radius: 8px;
  font-size: 14px; font-family: inherit;
}
.subscribe-form button {
  padding: 12px 22px; border: none; border-radius: 8px;
  background: #2c3e50; color: #fff; font-weight: 700;
  cursor: pointer; font-size: 14px;
}
.subscribe-form button:hover { background: #1a252f; }

/* 카테고리 필터 */
.cat-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.cat-filter button {
  padding: 7px 14px; border: 1px solid #dfe6ed; border-radius: 20px;
  background: #fff; color: #5a6878; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.cat-filter button.active { background: #3498db; color: #fff; border-color: #3498db; }

/* 뉴스 리스트 */
.news-item {
  padding: 14px 0;
  border-bottom: 1px solid #ecf0f1;
}
.news-item:last-child { border-bottom: none; }
.news-meta { font-size: 12px; color: #95a5a6; margin-bottom: 4px; }
.news-meta .cat-badge {
  display: inline-block; padding: 2px 8px;
  background: #3498db; color: #fff;
  font-size: 11px; font-weight: 700; border-radius: 4px; margin-right: 6px;
}
.news-item h4 { font-size: 14px; font-weight: 600; margin: 4px 0 4px; line-height: 1.5; }
.news-item h4 a { color: #2c3e50; }
.news-item .desc { font-size: 13px; color: #7f8c8d; line-height: 1.6; }

/* AI 요약 */
.summary-content {
  font-size: 14px; line-height: 1.8; color: #34495e;
}
.summary-content h2 { font-size: 17px; margin: 18px 0 10px; color: #2c3e50; }
.summary-content h3 { font-size: 15px; margin: 14px 0 8px; color: #34495e; }
.summary-content ul { padding-left: 20px; margin: 8px 0; }
.summary-content li { margin: 4px 0; }
.summary-content p { margin: 8px 0; }
.summary-content strong { color: #2c3e50; }

/* 버튼 */
.btn {
  display: inline-block; padding: 10px 18px;
  border: none; border-radius: 8px;
  background: #3498db; color: #fff;
  font-weight: 600; cursor: pointer; font-size: 14px;
  font-family: inherit; text-decoration: none;
}
.btn:hover { background: #2980b9; text-decoration: none; }
.btn-secondary { background: #ecf0f1; color: #2c3e50; }
.btn-secondary:hover { background: #dfe6ed; }
.btn-danger { background: #e74c3c; }
.btn-danger:hover { background: #c0392b; }
.btn-warning { background: #f39c12; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* 아카이브 */
.archive-list { display: flex; flex-wrap: wrap; gap: 8px; }
.archive-list a {
  padding: 8px 14px; background: #ecf0f1; color: #2c3e50;
  border-radius: 6px; font-size: 13px; font-weight: 600;
}
.archive-list a:hover { background: #3498db; color: #fff; text-decoration: none; }

/* 폼 */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #2c3e50; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid #dfe6ed; border-radius: 8px;
  font-size: 14px; font-family: inherit;
  background: #fff;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: #3498db;
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group .hint { font-size: 12px; color: #95a5a6; margin-top: 4px; }

/* 토스트 */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: #2c3e50; color: #fff;
  padding: 12px 20px; border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 1000; font-size: 14px; font-weight: 600;
  animation: slidein .3s;
}
.toast.error { background: #e74c3c; }
.toast.success { background: #27ae60; }
@keyframes slidein { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* 푸터 */
footer {
  text-align: center; padding: 30px 20px;
  color: #95a5a6; font-size: 13px;
}

/* 관리자 레이아웃 */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 220px; background: #2c3e50; color: #fff;
  padding: 24px 0; flex-shrink: 0;
}
.admin-sidebar h2 { padding: 0 20px 20px; font-size: 16px; border-bottom: 1px solid rgba(255,255,255,0.1); margin: 0 0 14px; }
.admin-sidebar nav a {
  display: block; padding: 10px 20px;
  color: #bdc3c7; text-decoration: none; font-size: 14px;
  border-left: 3px solid transparent;
}
.admin-sidebar nav a:hover, .admin-sidebar nav a.active {
  background: rgba(52,152,219,0.15); color: #fff;
  border-left-color: #3498db;
}
.admin-main { flex: 1; padding: 28px; background: #f4f6f8; overflow-x: auto; }
.admin-main h1 { font-size: 24px; margin: 0 0 24px; }

/* 통계 카드 */
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.stat-card {
  background: #fff; border-radius: 12px; padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.stat-card .label { font-size: 12px; color: #95a5a6; font-weight: 600; }
.stat-card .value { font-size: 28px; font-weight: 800; margin-top: 6px; color: #2c3e50; }
.stat-card .sub { font-size: 12px; color: #7f8c8d; margin-top: 4px; }

/* 테이블 */
.table-wrap { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
table th, table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #ecf0f1; }
table th { background: #f8fafc; color: #5a6878; font-weight: 700; font-size: 13px; }
table tr:hover { background: #f8fafc; }
.tag {
  display: inline-block; padding: 3px 10px;
  border-radius: 10px; font-size: 11px; font-weight: 700;
}
.tag-published { background: #27ae60; color: #fff; }
.tag-draft { background: #95a5a6; color: #fff; }
.tag-expired { background: #e74c3c; color: #fff; }
.tag-success { background: #27ae60; color: #fff; }
.tag-failed { background: #e74c3c; color: #fff; }

/* 모바일 */
@media (max-width: 768px) {
  .hero h1 { font-size: 26px; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; padding: 14px 0; }
  .admin-sidebar nav { display: flex; flex-wrap: wrap; }
  .admin-sidebar nav a { flex: 1; min-width: 120px; text-align: center; border-left: none; }
  .admin-main { padding: 16px; }
}
