/* 大向集团 · 员工门户（现代清爽风格） */

:root {
  --p-primary: #4f46e5;
  --p-primary-dark: #4338ca;
  --p-primary-soft: #eef2ff;
  --p-ink: #1e293b;
  --p-muted: #94a3b8;
  --p-line: #e8edf4;
}

.portal-shell { min-height: 100vh; background: #f4f6fb; }

/* ---------- 顶栏 ---------- */
.portal-header { background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-bottom: 1px solid var(--p-line); position: sticky; top: 0; z-index: 20; }
.portal-header-inner { max-width: 1240px; margin: 0 auto; height: 68px; padding: 0 26px; display: flex; align-items: center; gap: 22px; }
.portal-brand { display: flex; align-items: center; gap: 11px; }
.portal-brand img { width: 40px; height: 40px; object-fit: contain; }
.portal-brand-name { font-weight: 750; font-size: 17px; color: var(--p-ink); letter-spacing: .01em; }
.portal-brand-sub { font-size: 11px; color: var(--p-muted); margin-top: 1px; }
.portal-motto { font-size: 13px; font-weight: 600; color: #64748b; letter-spacing: 0; margin-left: 22px; padding: 7px 15px; background: var(--p-primary-soft); color: var(--p-primary); border-radius: 99px; white-space: nowrap; }
.portal-header-user { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.portal-icon-btn { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--p-line); background: #fff; color: #64748b; font-size: 18px; cursor: pointer; position: relative; transition: .15s; display: flex; align-items: center; justify-content: center; }
.portal-icon-btn:hover { background: var(--p-primary-soft); color: var(--p-primary); border-color: #c7d2fe; }
.portal-dot { position: absolute; top: 4px; right: 5px; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; border: 2px solid #fff; }
.portal-avatar { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, #6366f1, #4338ca); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; }
.portal-user-meta { display: flex; flex-direction: column; line-height: 1.35; }
.portal-user-meta b { font-size: 14px; color: var(--p-ink); }
.portal-user-meta small { font-size: 11px; color: var(--p-muted); }

/* ---------- 欢迎条 ---------- */
.portal-welcome { position: relative; overflow: hidden; background: linear-gradient(105deg, #eef2ff 0%, #f5f3ff 48%, #f0f9ff 100%); border-bottom: 1px solid #eef0f6; padding: 30px 0 34px; }
.portal-welcome::before { content: ''; position: absolute; right: 8%; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(99,102,241,.14), transparent 70%); }
.portal-welcome-inner { max-width: 1240px; margin: 0 auto; padding: 0 26px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; position: relative; }
.portal-greeting { font-size: 26px; font-weight: 750; color: var(--p-ink); letter-spacing: -.01em; }
.portal-wave { font-size: 23px; }
.portal-date { font-size: 13px; color: #64748b; padding-bottom: 4px; }

/* ---------- 主体 ---------- */
.portal-main { max-width: 1240px; margin: 0 auto; padding: 26px 26px 66px; }
.portal-card { background: #fff; border: 1px solid var(--p-line); border-radius: 16px; padding: 22px 24px; box-shadow: 0 4px 20px rgba(15,23,42,.04); margin-bottom: 18px; }
.portal-top-grid { display: grid; grid-template-columns: 310px 1fr; gap: 18px; }
.portal-mid-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.portal-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.portal-card-head h3 { margin: 0; font-size: 16px; font-weight: 700; color: var(--p-ink); }
.link-btn { border: 0; background: none; color: var(--p-primary); cursor: pointer; font-size: 12px; font-weight: 600; }
.link-btn:hover { text-decoration: underline; }

/* ---------- 个人信息卡 ---------- */
.profile-card { background: linear-gradient(165deg, #fafaff 0%, #fff 60%); }
.profile-head { font-size: 13px; font-weight: 700; color: var(--p-primary); border-bottom: 2px solid #e0e7ff; padding-bottom: 11px; margin-bottom: 18px; letter-spacing: .02em; }
.profile-body { display: flex; gap: 16px; align-items: center; }
.profile-avatar { width: 78px; height: 78px; border-radius: 20px; background: linear-gradient(135deg, #818cf8, #4f46e5); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 32px; font-weight: 700; flex: 0 0 auto; box-shadow: 0 8px 20px rgba(79,70,229,.25); }
.profile-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.profile-row { display: flex; gap: 8px; font-size: 12px; line-height: 1.4; }
.profile-row span { color: var(--p-muted); flex: 0 0 34px; }
.profile-row b { color: #334155; word-break: break-all; font-weight: 600; }
.profile-detail-btn { width: 100%; margin-top: 18px; padding: 11px; border: 0; border-radius: 10px; background: var(--p-primary); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; transition: .15s; box-shadow: 0 4px 12px rgba(79,70,229,.22); }
.profile-detail-btn:hover { background: var(--p-primary-dark); transform: translateY(-1px); }
.profile-notice { margin: 13px 0 0; font-size: 11px; color: #b45309; background: #fffbeb; border: 1px solid #fef3c7; border-radius: 8px; padding: 8px 10px; line-height: 1.5; }

/* ---------- 应用宫格 ---------- */
.portal-tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--p-line); margin-bottom: 20px; }
.portal-tab { border: 0; background: none; padding: 0 0 12px; font-size: 14px; color: #64748b; cursor: pointer; position: relative; font-weight: 600; }
.portal-tab.active { color: var(--p-primary); }
.portal-tab.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--p-primary); border-radius: 3px 3px 0 0; }
.app-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px 10px; }
.app-item { text-align: center; text-decoration: none; color: #334155; padding: 10px 4px; border-radius: 12px; transition: .18s; }
.app-item:hover { background: var(--p-primary-soft); transform: translateY(-2px); }
.app-icon { width: 54px; height: 54px; margin: 0 auto 10px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; transition: .18s; }
.app-item:hover .app-icon { transform: scale(1.06); }
.color-blue { background: #eff6ff; color: #2563eb; }
.color-violet { background: #f5f3ff; color: #7c3aed; }
.color-green { background: #ecfdf5; color: #059669; }
.color-cyan { background: #ecfeff; color: #0891b2; }
.color-orange { background: #fff7ed; color: #ea580c; }
.color-red { background: #fef2f2; color: #dc2626; }
.color-teal { background: #f0fdfa; color: #0d9488; }
.app-name { font-size: 12px; line-height: 1.35; font-weight: 500; }

/* ---------- 待办 / 公告 ---------- */
.todo-panel { display: flex; flex-direction: column; gap: 8px; }
.portal-todo-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px; border: 1px solid var(--p-line); border-radius: 10px; font-size: 13px; }
.portal-todo-list { display: flex; flex-direction: column; gap: 8px; }
.portal-todo-item { display: flex; align-items: center; gap: 11px; padding: 12px 13px; border: 1px solid var(--p-line); border-left: 3px solid #f59e0b; border-radius: 10px; text-decoration: none; color: #334155; transition: .15s; }
.portal-todo-item.done { border-left-color: #16a34a; }
.portal-todo-item:hover { background: #f8fafc; }
.todo-icon { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; background: #fffbeb; color: #d97706; display: flex; align-items: center; justify-content: center; font-size: 17px; }
.portal-todo-item.done .todo-icon { background: #ecfdf5; color: #059669; }
.todo-body { flex: 1; min-width: 0; }
.todo-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.todo-meta { font-size: 11px; color: var(--p-muted); margin-top: 2px; }
.todo-arrow { color: #cbd5e1; font-size: 18px; }
.portal-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 26px 10px; color: #cbd5e1; font-size: 30px; }
.portal-empty p { font-size: 12px; color: var(--p-muted); margin: 8px 0 0; }

/* ---------- 通知公告 ---------- */
.portal-notice-list { display: flex; flex-direction: column; }
.notice-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 2px; border-bottom: 1px dashed var(--p-line); }
.notice-item:last-child { border-bottom: 0; }
.notice-title { font-size: 13px; color: #334155; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-title:hover { color: var(--p-primary); }
.notice-date { flex: 0 0 auto; font-size: 11px; color: var(--p-muted); }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .portal-top-grid { grid-template-columns: 280px 1fr; }
  .app-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 760px) {
  .portal-top-grid, .portal-mid-grid { grid-template-columns: 1fr; }
  .portal-motto { display: none; }
}
@media (max-width: 620px) {
  .portal-header-inner { height: 60px; padding: 0 14px; gap: 10px; }
  .portal-brand img { width: 34px; height: 34px; }
  .portal-brand-name { font-size: 15px; }
  .portal-brand-sub { font-size: 10px; }
  .portal-user-meta { display: none; }
  .portal-icon-btn { width: 34px; height: 34px; font-size: 16px; }
  .portal-avatar { width: 36px; height: 36px; border-radius: 10px; font-size: 14px; }
  .portal-header-user { gap: 8px; }
  .portal-welcome { padding: 22px 0 24px; }
  .portal-welcome-inner { padding: 0 14px; align-items: center; }
  .portal-greeting { font-size: 21px; }
  .portal-date { font-size: 11px; }
  .portal-main { padding: 16px 12px 48px; }
  .portal-card { padding: 17px 15px; border-radius: 14px; }
  .profile-avatar { width: 64px; height: 64px; border-radius: 16px; font-size: 26px; }
  .app-grid { grid-template-columns: repeat(4, 1fr); gap: 14px 4px; }
  .app-icon { width: 46px; height: 46px; border-radius: 13px; font-size: 21px; }
  .app-name { font-size: 11px; }
  .app-item { padding: 7px 2px; }
  .portal-tabs { gap: 20px; }
}

/* ---------- 员工资料编辑弹窗 ---------- */
.profile-input { width: 100%; max-width: 280px; padding: 6px 10px; border: 1px solid var(--p-line); border-radius: 8px; font: inherit; font-size: 13px; }
.profile-avatar-preview { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 10px; border: 1px solid var(--p-line); }
.profile-avatar-file { font-size: 12px; max-width: 170px; }
.info-row + .info-row { margin-top: 8px; }


/* 头像编辑行 */
.profile-avatar-row { display: flex; gap: 12px; padding: 10px 0; align-items: flex-start; }
.profile-avatar-row .info-label { flex: 0 0 56px; color: var(--p-muted); font-size: 12px; padding-top: 8px; }
.profile-avatar-edit { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.profile-avatar-preview, .profile-avatar-placeholder { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; border: 1px solid var(--p-line); background: linear-gradient(135deg, #818cf8, #4f46e5); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; flex: 0 0 auto; }
.profile-avatar-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
