:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --text: #14213d;
  --muted: #697386;
  --line: #e5e9ef;
  --accent: #d96c3f;
  --accent-dark: #a94722;
  --soft: #fff0e9;
  --green: #267a61;
  --blue: #315fa9;
  --purple: #7a4aa6;
  --yellow: #a77700;
  --shadow: 0 10px 30px rgba(30, 42, 60, .08);
  --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; background: var(--bg); color: var(--text); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 280px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; background: #152238; color: #fff; padding: 24px 18px; display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; gap: 12px; align-items: center; padding: 0 8px 24px; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand-mark { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--accent); color: white; font-weight: 800; font-size: 22px; }
.brand h1 { font-size: 17px; margin: 0 0 4px; }
.brand p { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #aeb9c8; margin: 0; }
nav { display: grid; gap: 5px; margin-top: 18px; overflow-y: auto; padding-right: 4px; }
.nav-btn { border: 0; background: transparent; color: #b9c4d4; text-align: left; padding: 11px 12px; border-radius: 11px; display: flex; align-items: center; gap: 10px; }
.nav-btn:hover, .nav-btn.active { background: rgba(255,255,255,.1); color: #fff; }
.nav-icon { width: 22px; text-align: center; }
.sidebar-footer { margin-top: auto; padding: 16px 10px 0; border-top: 1px solid rgba(255,255,255,.1); color: #b9c4d4; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.status-dot { width: 8px; height: 8px; background: #65d69b; border-radius: 50%; box-shadow: 0 0 0 4px rgba(101,214,155,.12); }
.main { min-width: 0; }
.topbar { min-height: 72px; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; padding: 14px 28px; display: flex; align-items: center; gap: 16px; }
.topbar h2 { margin: 2px 0 0; font-size: 20px; }
.eyebrow { margin: 0; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.top-actions { margin-left: auto; display: flex; gap: 10px; }
.menu-btn { display: none; border: 0; background: transparent; font-size: 24px; }
.primary-btn, .ghost-btn, .icon-btn { border-radius: 10px; padding: 10px 14px; border: 1px solid transparent; }
.primary-btn { background: var(--accent); color: white; font-weight: 700; }
.primary-btn:hover { background: var(--accent-dark); }
.ghost-btn { background: #fff; color: var(--text); border-color: var(--line); }
.icon-btn { background: transparent; font-size: 24px; padding: 4px 8px; }
.content { padding: 24px; max-width: 1500px; margin: 0 auto; }
.hero { background: linear-gradient(135deg, #152238, #253a5c); color: white; padding: 28px 30px; border-radius: 24px; box-shadow: var(--shadow); }
.hero h3 { font-size: clamp(25px, 3vw, 36px); margin: 8px 0 12px; max-width: 900px; line-height: 1.22; }
.hero p { max-width: 900px; color: #d7dfeb; font-size: 15px; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero .ghost-btn { background: rgba(255,255,255,.08); color: white; border-color: rgba(255,255,255,.2); }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.section { margin-top: 26px; }
.section-header { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-header h3 { margin: 0; font-size: 18px; }
.section-header p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: 0 4px 18px rgba(25, 35, 50, .04); }
.card h4 { margin: 0 0 10px; }
.card p { color: var(--muted); line-height: 1.65; }
.stat { display: flex; justify-content: space-between; align-items: flex-start; }
.stat-number { font-size: 26px; font-weight: 800; }
.stat-label { color: var(--muted); font-size: 13px; }
.progress { height: 8px; background: #edf0f4; border-radius: 999px; overflow: hidden; margin-top: 14px; }
.progress > span { display: block; height: 100%; background: var(--accent); }
.badge { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--soft); color: var(--accent-dark); }
.badge.green { background: #e6f5ef; color: var(--green); }
.badge.blue { background: #e9f0fb; color: var(--blue); }
.badge.purple { background: #f1eafa; color: var(--purple); }
.badge.yellow { background: #fff5d7; color: var(--yellow); }
.callout { border-left: 4px solid var(--accent); background: var(--soft); padding: 16px 18px; border-radius: 0 12px 12px 0; line-height: 1.7; }
.list { margin: 0; padding-left: 20px; color: var(--muted); line-height: 1.8; }
.table-wrap { overflow-x: auto; background: white; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; background: #fafbfc; }
tr:last-child td { border-bottom: 0; }
.character-card { position: relative; overflow: hidden; }
.character-card::after { content: ""; position: absolute; width: 130px; height: 130px; border-radius: 50%; right: -50px; top: -50px; background: var(--soft); }
.character-avatar { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; color: white; font-size: 24px; font-weight: 800; margin-bottom: 16px; position: relative; z-index: 1; }
.avatar-james { background: var(--blue); }
.avatar-angeline { background: var(--accent); }
.avatar-joseph { background: var(--green); }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tab-btn { border: 1px solid var(--line); background: white; padding: 8px 12px; border-radius: 999px; }
.tab-btn.active { background: var(--text); color: white; border-color: var(--text); }
.episode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.episode { background: white; border: 1px solid var(--line); border-radius: 15px; padding: 16px; }
.episode-num { color: var(--accent); font-size: 12px; font-weight: 800; }
.episode h4 { margin: 6px 0; }
.episode p { margin: 0; color: var(--muted); font-size: 14px; }
.kanban { display: grid; grid-template-columns: repeat(4, minmax(260px, 1fr)); gap: 16px; overflow-x: auto; padding-bottom: 8px; }
.kanban-col { background: #eef1f5; border-radius: 16px; padding: 14px; min-height: 360px; }
.kanban-col h4 { margin: 0 0 12px; display: flex; justify-content: space-between; }
.kanban-item { background: white; border-radius: 12px; padding: 13px; margin-bottom: 10px; box-shadow: 0 3px 10px rgba(25,35,50,.06); }
.kanban-item small { color: var(--muted); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filters input, .filters select, .form-grid input, .form-grid textarea, .form-grid select { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: white; width: 100%; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid label { display: grid; gap: 7px; font-size: 13px; color: var(--muted); }
.form-grid textarea { min-height: 110px; resize: vertical; }
.full { grid-column: 1 / -1; }
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline-item { position: relative; margin-bottom: 20px; }
.timeline-item::before { content: ""; position: absolute; left: -21px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px var(--soft); }
.modal { position: fixed; inset: 0; display: none; place-items: center; background: rgba(10,16,26,.56); z-index: 50; padding: 20px; }
.modal.open { display: grid; }
.modal-card { width: min(720px, 100%); background: white; border-radius: 20px; padding: 22px; box-shadow: var(--shadow); }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.modal-header h3 { margin: 4px 0 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.empty { text-align: center; padding: 40px; color: var(--muted); }
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .episode-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -290px; width: 280px; transition: .25s; box-shadow: var(--shadow); }
  .sidebar.open { left: 0; }
  .menu-btn { display: block; }
  .topbar { padding: 12px 16px; }
  .top-actions .ghost-btn { display: none; }
  .content { padding: 16px; }
  .hero { padding: 22px; }
  .grid-2, .grid-3, .grid-4, .episode-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .full { grid-column: auto; }
}

.language-switch{display:flex;align-items:center;padding:3px;border:1px solid var(--border);border-radius:10px;background:#fff;gap:2px}
.language-btn{border:0;background:transparent;color:var(--muted);font:inherit;font-size:13px;font-weight:700;padding:7px 10px;border-radius:7px;cursor:pointer;white-space:nowrap}
.language-btn:hover{background:var(--soft)}
.language-btn.active{background:var(--navy);color:#fff}
@media(max-width:900px){.top-actions{gap:6px}.language-btn{padding:6px 8px}.top-actions>.ghost-btn{display:none}}
@media(max-width:620px){.language-switch{order:-1}.top-actions{flex-wrap:wrap;justify-content:flex-end}.language-btn{font-size:12px}}
