/* ===== 阿里工作台 · 样式 ===== */
:root {
  --orange: #FF6A00;
  --orange-2: #FF9A2E;
  --blue: #1677FF;
  --green: #22B573;
  --purple: #7C5CFF;
  --bg: #F2F4F7;
  --card: #FFFFFF;
  --text: #1F2329;
  --sub: #8A919F;
  --line: #E8EAED;
  --radius: 14px;
  --shadow: 0 1px 4px rgba(31, 35, 41, .06), 0 4px 16px rgba(31, 35, 41, .04);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
button, input, select { font: inherit; color: inherit; }
ul { list-style: none; }
a { text-decoration: none; color: inherit; }

/* ===== 顶部栏 ===== */
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: 60px;
  display: flex; align-items: center; gap: 20px;
  padding: 0 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; min-width: 210px; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--orange), var(--orange-2));
  color: #fff; font-size: 20px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 8px rgba(255, 106, 0, .35);
}
.logo-text { font-size: 17px; font-weight: 700; letter-spacing: .5px; }
.logo-sub { font-size: 10px; color: var(--sub); margin-top: 2px; letter-spacing: 1px; }

.search {
  flex: 1; max-width: 520px; position: relative;
}
.search input {
  width: 100%; height: 38px;
  padding: 0 14px 0 38px;
  border: 1px solid var(--line); border-radius: 19px;
  background: var(--bg); outline: none;
  transition: all .2s;
}
.search input:focus { background: #fff; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 106, 0, .12); }
.search-icon { position: absolute; left: 13px; top: 11px; width: 16px; height: 16px; fill: var(--sub); }

.top-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.clock { font-variant-numeric: tabular-nums; color: var(--sub); font-size: 13px; }
.icon-btn {
  position: relative; width: 36px; height: 36px; border: none; border-radius: 10px;
  background: transparent; cursor: pointer;
}
.icon-btn:hover { background: var(--bg); }
.icon-btn svg { width: 20px; height: 20px; fill: #4A5058; }
.badge-dot {
  position: absolute; top: 7px; right: 8px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #FF3B30; border: 1.5px solid #fff;
}
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), #6AA1FF);
  color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ===== 布局 ===== */
.layout { display: flex; align-items: flex-start; }

.sidebar {
  position: sticky; top: 60px;
  width: 212px; min-width: 212px;
  height: calc(100vh - 60px);
  background: #fff; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 14px 10px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; margin-bottom: 4px;
  border-radius: 10px; color: #4A5058; font-size: 14px;
  transition: all .15s;
}
.nav-item svg { width: 18px; height: 18px; fill: #8A919F; transition: fill .15s; }
.nav-item:hover { background: var(--bg); }
.nav-item.active { background: rgba(255, 106, 0, .1); color: var(--orange); font-weight: 600; }
.nav-item.active svg { fill: var(--orange); }
.nav-badge {
  margin-left: auto; font-style: normal; font-size: 11px;
  background: var(--bg); color: var(--sub);
  padding: 1px 8px; border-radius: 9px;
}
.nav-badge.orange { background: rgba(255, 106, 0, .12); color: var(--orange); }

.sidebar-foot { padding: 10px; }
.fish-card {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, #FFF3E8, #FFE8D1);
  border-radius: 12px; padding: 12px;
}
.fish-emoji { font-size: 24px; }
.fish-title { font-size: 12px; font-weight: 700; color: #B45309; }
.fish-sub { font-size: 11px; color: #C2814D; margin-top: 2px; }

/* ===== 主区 ===== */
main { flex: 1; padding: 20px 24px 32px; max-width: 1360px; }

.hero {
  background: linear-gradient(120deg, #FF6A00 0%, #FF8A1E 55%, #FFA53E 100%);
  border-radius: 18px;
  padding: 26px 30px;
  color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  box-shadow: 0 8px 24px rgba(255, 106, 0, .25);
  position: relative; overflow: hidden;
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%;
  background: rgba(255, 255, 255, .12);
}
.hero::before { width: 180px; height: 180px; right: -50px; top: -70px; }
.hero::after { width: 110px; height: 110px; right: 130px; bottom: -60px; }
.hero-text h1 { font-size: 22px; margin-bottom: 8px; }
.hero-text p { font-size: 13px; opacity: .92; }
.hero-stats { display: flex; gap: 12px; position: relative; z-index: 1; }
.stat-tile {
  min-width: 96px; padding: 12px 16px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 12px; text-align: center;
  backdrop-filter: blur(4px);
}
.stat-tile b { display: block; font-size: 24px; line-height: 1.2; }
.stat-tile span { font-size: 12px; opacity: .92; }

/* ===== 卡片 ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  margin-top: 18px;
}
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  scroll-margin-top: 76px;
}
.card-todo { grid-column: span 7; }
.card-appr { grid-column: span 5; }
.card-sched { grid-column: span 5; }
.card-ann { grid-column: span 7; }
.card-apps { grid-column: span 12; }

.card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.card-head h2 { font-size: 16px; font-weight: 700; position: relative; padding-left: 11px; }
.card-head h2::before {
  content: ""; position: absolute; left: 0; top: 3px; bottom: 3px;
  width: 4px; border-radius: 2px;
  background: linear-gradient(180deg, var(--orange), var(--orange-2));
}
.head-note { font-size: 12px; color: var(--sub); }
.link-btn { border: none; background: none; color: var(--blue); font-size: 12px; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

.chips { display: flex; gap: 6px; }
.chip {
  border: 1px solid var(--line); background: #fff;
  padding: 3px 12px; border-radius: 14px; font-size: 12px;
  color: var(--sub); cursor: pointer; transition: all .15s;
}
.chip:hover { color: var(--orange); border-color: var(--orange); }
.chip.active { background: var(--orange); border-color: var(--orange); color: #fff; }

.btn {
  border: none; border-radius: 9px; padding: 8px 18px;
  cursor: pointer; font-size: 13px; transition: all .15s;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: #E85F00; box-shadow: 0 4px 10px rgba(255, 106, 0, .3); }
.btn-plain { background: var(--bg); color: var(--text); }
.btn-plain:hover { background: var(--line); }

/* 待办 */
.todo-add { display: flex; gap: 8px; margin-bottom: 12px; }
.todo-add input[type="text"] {
  flex: 1; height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 9px; outline: none;
}
.todo-add input[type="text"]:focus { border-color: var(--orange); }
.todo-add select {
  height: 36px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff; outline: none;
}
.todo-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 8px; border-radius: 9px;
  transition: background .15s;
}
.todo-list li:hover { background: var(--bg); }
.todo-list .cb {
  width: 18px; height: 18px; border: 1.5px solid #C9CED6; border-radius: 50%;
  cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
}
.todo-list .cb.done { background: var(--green); border-color: var(--green); }
.todo-list .cb.done::after { content: "✓"; color: #fff; font-size: 11px; }
.todo-list .txt { flex: 1; }
.todo-list .txt.done { color: var(--sub); text-decoration: line-through; }
.tag {
  font-size: 11px; padding: 2px 9px; border-radius: 10px;
  background: rgba(22, 119, 255, .1); color: var(--blue);
}
.tag.t-客户 { background: rgba(255, 106, 0, .12); color: var(--orange); }
.tag.t-日常 { background: rgba(34, 181, 115, .12); color: var(--green); }
.tag.t-行政 { background: rgba(124, 92, 255, .12); color: var(--purple); }
.del-btn {
  border: none; background: none; cursor: pointer;
  color: #C9CED6; font-size: 16px; line-height: 1; padding: 4px 6px; border-radius: 6px;
}
.del-btn:hover { color: #FF3B30; background: rgba(255, 59, 48, .08); }

/* 审批 */
.appr-list li {
  padding: 12px; border: 1px solid var(--line); border-radius: 11px;
  margin-bottom: 10px;
}
.appr-row1 { display: flex; align-items: center; gap: 8px; }
.appr-title { font-weight: 600; font-size: 14px; }
.appr-status {
  margin-left: auto; font-size: 11px; padding: 2px 10px; border-radius: 10px;
}
.st-pending { background: rgba(255, 146, 0, .12); color: #D97706; }
.st-approved { background: rgba(34, 181, 115, .12); color: var(--green); }
.st-rejected { background: rgba(255, 59, 48, .1); color: #FF3B30; }
.appr-meta { font-size: 12px; color: var(--sub); margin: 6px 0 10px; }
.appr-actions { display: flex; gap: 8px; }
.btn-sm { padding: 5px 16px; font-size: 12px; border-radius: 8px; }
.btn-ok { background: rgba(34, 181, 115, .12); color: var(--green); }
.btn-ok:hover { background: var(--green); color: #fff; }
.btn-no { background: rgba(255, 59, 48, .08); color: #FF3B30; }
.btn-no:hover { background: #FF3B30; color: #fff; }

/* 日程 */
.sched-list { margin-bottom: 12px; }
.sched-list li {
  display: flex; gap: 12px; padding: 9px 4px; position: relative;
}
.sched-list li::before {
  content: ""; position: absolute; left: 30px; top: 30px; bottom: -9px;
  width: 2px; background: var(--line);
}
.sched-list li:last-child::before { display: none; }
.sched-time {
  width: 52px; font-weight: 700; color: var(--orange);
  font-variant-numeric: tabular-nums; padding-top: 1px;
}
.sched-dot {
  width: 10px; height: 10px; border-radius: 50%; margin-top: 5px;
  background: var(--orange); box-shadow: 0 0 0 3px rgba(255, 106, 0, .15);
  flex-shrink: 0;
}
.sched-body { flex: 1; }
.sched-body .t { font-weight: 600; }
.sched-body .p { font-size: 12px; color: var(--sub); margin-top: 2px; }
.sched-add { display: flex; gap: 8px; }
.sched-add input {
  height: 34px; padding: 0 10px; border: 1px solid var(--line);
  border-radius: 8px; outline: none;
}
.sched-add input:focus { border-color: var(--orange); }
#schedTime { width: 96px; }
#schedTitle { flex: 1; }
#schedPlace { width: 90px; }

/* 公告 */
.ann-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 8px; border-radius: 9px; cursor: pointer;
}
.ann-list li:hover { background: var(--bg); }
.ann-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); flex-shrink: 0; }
.ann-list li.read .ann-dot { background: #D5D9E0; }
.ann-title { font-weight: 500; }
.ann-list li.read .ann-title { color: var(--sub); font-weight: 400; }
.ann-date { margin-left: auto; font-size: 12px; color: var(--sub); }

/* 应用 */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 12px;
}
.app-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 6px; border-radius: 12px; transition: all .15s;
}
.app-item:hover { background: var(--bg); transform: translateY(-2px); }
.app-icon {
  width: 48px; height: 48px; border-radius: 13px;
  color: #fff; font-size: 22px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(31, 35, 41, .12);
}
.app-name { font-size: 12px; color: var(--text); }

.page-foot {
  margin-top: 26px; text-align: center;
  font-size: 12px; color: var(--sub);
}

/* ===== 响应式 ===== */
@media (max-width: 1120px) {
  .card-todo, .card-appr, .card-sched, .card-ann { grid-column: span 12; }
}
@media (max-width: 900px) {
  .sidebar { display: none; }
  .hero { flex-direction: column; align-items: flex-start; }
  .hero-stats { flex-wrap: wrap; }
  main { padding: 14px; }
  .logo-sub, .clock { display: none; }
}
