* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif; background: #f5f7fa; color: #333; font-size: 14px; line-height: 1.5; }
.page { display: none; }
.page.active { display: block; }
.panel { display: none; }
.panel.active { display: block; }

/* Login */
.login-bg { min-height: 100vh; background: linear-gradient(135deg, #1F497D 0%, #2E75B6 100%); display: flex; justify-content: center; align-items: flex-start; padding: 60px 16px 30px; }
.login-card { width: 100%; max-width: 380px; background: #fff; border-radius: 16px; padding: 40px 30px; box-shadow: 0 8px 40px rgba(0,0,0,0.15); }
.login-logo { text-align: center; font-size: 28px; font-weight: bold; color: #1F497D; margin-bottom: 4px; }
.login-subtitle { text-align: center; font-size: 14px; color: #999; margin-bottom: 28px; }
.form-group { margin-bottom: 16px; }
.form-input { width: 100%; height: 44px; border: 1.5px solid #ddd; border-radius: 10px; padding: 0 14px; font-size: 15px; outline: none; transition: border-color .2s; background: #fff; }
.form-input:focus { border-color: #1F497D; }
.form-divider { text-align: center; font-size: 13px; color: #999; margin: 16px 0; position: relative; }
.form-divider::before, .form-divider::after { content: ''; position: absolute; top: 50%; width: 30%; height: 1px; background: #eee; }
.form-divider::before { left: 0; } .form-divider::after { right: 0; }
.privacy-row { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; font-size: 13px; color: #666; margin: 12px 0 16px; }
.checkbox-label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: #1F497D; }
.check-text { color: #666; }
.link-text { color: #1F497D; cursor: pointer; text-decoration: underline; font-size: 13px; }
.sep { color: #ddd; margin: 0 4px; }
.btn { width: 100%; height: 44px; border: none; border-radius: 10px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all .2s; }
.btn-primary { background: #1F497D; color: #fff; }
.btn-primary:disabled { background: #a0b8d6; cursor: not-allowed; }
.btn-primary:hover:not(:disabled) { background: #163a63; }
.btn-secondary { background: #e8ecf1; color: #333; }
.btn-secondary:hover { background: #d5dce6; }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-danger:hover { background: #c0392b; }
.btn-sm { height: 36px; font-size: 13px; width: auto; padding: 0 20px; }
.login-footer { text-align: center; margin-top: 16px; font-size: 14px; color: #999; }
.invite-row { margin-top: 16px; text-align: center; }
.divider { border-top: 1px solid #eee; margin: 16px 0; }
.invite-tip { font-size: 13px; color: #999; display: block; margin-bottom: 12px; }

/* Top Nav */
.top-nav { position: fixed; top: 0; left: 0; right: 0; height: 48px; background: linear-gradient(135deg, #1F497D, #2E75B6); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; z-index: 100; }
.nav-title { font-size: 17px; font-weight: bold; }
.nav-user { display: flex; align-items: center; gap: 4px; cursor: pointer; padding: 6px 10px; border-radius: 6px; font-size: 14px; }
.nav-user:hover { background: rgba(255,255,255,0.15); }
.nav-arrow { font-size: 10px; transition: transform .2s; }
.user-menu { position: fixed; top: 48px; right: 10px; background: #fff; border-radius: 10px; box-shadow: 0 4px 20px rgba(0,0,0,0.15); display: none; z-index: 200; min-width: 140px; overflow: hidden; }
.user-menu.show { display: block; }
.user-menu .menu-item { padding: 12px 18px; font-size: 14px; cursor: pointer; color: #333; }
.user-menu .menu-item:hover { background: #f0f4ff; color: #1F497D; }

/* Content */
.content { padding: 56px 12px 72px; max-width: 600px; margin: 0 auto; min-height: 100vh; }

/* Cards */
.card { background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 14px; box-shadow: 0 1px 6px rgba(0,0,0,0.06); }
.card-title { font-size: 16px; font-weight: bold; color: #333; margin-bottom: 14px; }
.welcome-card { background: linear-gradient(135deg, #1F497D, #2E75B6); color: #fff; padding: 24px 20px; border-radius: 12px; margin-bottom: 14px; }
.welcome-text { font-size: 20px; font-weight: bold; display: block; margin-bottom: 6px; }
.role-badge { display: inline-block; padding: 3px 12px; border-radius: 20px; font-size: 12px; background: rgba(255,255,255,0.2); }
.stats-grid { display: flex; gap: 8px; }
.stat-item { flex: 1; text-align: center; padding: 12px 8px; border-radius: 10px; cursor: pointer; transition: background .2s; }
.stat-item:hover { background: #f0f4ff; }
.stat-num { font-size: 28px; font-weight: bold; color: #1F497D; display: block; }
.stat-label { font-size: 12px; color: #888; display: block; margin-top: 4px; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.action-btn { flex: 1; min-width: 100px; padding: 14px 10px; background: #f5f7fa; border-radius: 10px; text-align: center; cursor: pointer; font-size: 13px; transition: background .2s; }
.action-btn:hover { background: #e8ecf5; }
.action-btn .icon { font-size: 22px; display: block; margin-bottom: 4px; }

/* Reports */
.report-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #f0f0f0; cursor: pointer; }
.report-item:last-child { border: none; }
.report-item:hover { background: #f8f9fb; margin: 0 -12px; padding: 12px; border-radius: 8px; }
.report-name { font-size: 14px; font-weight: 600; display: block; }
.report-job { font-size: 12px; color: #999; }
.report-score { font-size: 20px; font-weight: bold; }
.score-high { color: #27ae60; } .score-mid { color: #e67e22; } .score-low { color: #e74c3c; }
.report-hint { font-size: 12px; color: #999; padding: 8px 12px; background: #FFF8E1; border-radius: 8px; margin-bottom: 12px; }

/* Panels */
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.panel-title { font-size: 17px; font-weight: bold; color: #333; }
.back-link { color: #1F497D; cursor: pointer; font-size: 14px; }
.back-link:hover { text-decoration: underline; }

/* Jobs */
.job-card { background: #fff; border-radius: 12px; padding: 16px; margin-bottom: 12px; box-shadow: 0 1px 6px rgba(0,0,0,0.06); cursor: pointer; }
.job-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.1); }
.job-title { font-size: 16px; font-weight: bold; color: #333; }
.job-company { font-size: 13px; color: #888; margin-top: 4px; }
.job-meta { display: flex; gap: 12px; margin-top: 8px; font-size: 12px; color: #999; }
.job-status { font-size: 12px; padding: 2px 8px; border-radius: 10px; }
.status-open { background: #e8f5e9; color: #2e7d32; }
.status-closed { background: #fbe9e7; color: #c62828; }
.status-draft { background: #f5f5f5; color: #888; }

/* Detail */
.detail-section { margin-bottom: 16px; }
.detail-label { font-size: 13px; color: #888; margin-bottom: 4px; display: block; }
.detail-value { font-size: 15px; color: #333; line-height: 1.6; }

/* Interview */
.msg-row { display: flex; gap: 10px; margin-bottom: 12px; align-items: flex-start; }
.msg-ai { justify-content: flex-start; }
.msg-user { justify-content: flex-end; }
.msg-avatar { width: 36px; height: 36px; border-radius: 50%; background: #1F497D; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.msg-bubble { max-width: 75%; padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.6; word-break: break-word; }
.msg-ai .msg-bubble { background: #eef3fa; color: #333; border-bottom-left-radius: 4px; }
.msg-user .msg-bubble { background: #1F497D; color: #fff; border-bottom-right-radius: 4px; }
.thinking { opacity: 0.6; }
.chat-box { background: #fff; border-radius: 12px; padding: 16px; max-height: 450px; overflow-y: auto; margin-bottom: 12px; box-shadow: 0 1px 6px rgba(0,0,0,0.06); }
.input-row { display: flex; gap: 8px; }
.input-row .form-input { flex: 1; }
.voice-btn { width: 44px; height: 44px; border-radius: 50%; background: #f0f0f0; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 18px; border: none; }
.voice-btn:hover { background: #e0e0e0; }
.voice-btn.recording { background: #ff4444; color: #fff; animation: pulse 1s infinite; }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }

/* Evaluation */
.eval-header { text-align: center; margin-bottom: 16px; }
.eval-title { font-size: 18px; font-weight: bold; color: #333; }
.eval-level { font-size: 14px; color: #1F497D; margin-top: 4px; display: block; }
.score-circle { text-align: center; margin: 16px 0; }
.score-number { font-size: 52px; font-weight: bold; color: #1F497D; }
.score-unit { font-size: 16px; color: #999; }
.dim-item { margin-bottom: 12px; }
.dim-header { display: flex; justify-content: space-between; margin-bottom: 4px; }
.dim-name { font-size: 13px; color: #666; }
.dim-score { font-size: 14px; font-weight: bold; color: #1F497D; }
.dim-bar { height: 8px; background: #f0f0f0; border-radius: 4px; overflow: hidden; }
.dim-bar-fill { height: 100%; background: linear-gradient(90deg, #1F497D, #2E75B6); border-radius: 4px; }
.eval-text { font-size: 14px; color: #555; line-height: 1.7; white-space: pre-wrap; margin-top: 6px; }
.section-title { font-size: 15px; font-weight: bold; color: #333; margin: 16px 0 8px; display: block; }

/* Profile */
.profile-header { display: flex; align-items: center; gap: 16px; }
.profile-avatar { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, #1F497D, #2E75B6); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: bold; }
.profile-name { font-size: 18px; font-weight: bold; }
.profile-role { font-size: 13px; color: #888; }
.info-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
.info-key { color: #999; }
.menu-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid #f0f0f0; cursor: pointer; font-size: 14px; }
.menu-row:hover { color: #1F497D; }
.menu-row .arrow { margin-left: auto; color: #ccc; }

/* Resume */
.resume-item { display: flex; align-items: center; padding: 14px 0; border-bottom: 1px solid #f0f0f0; }
.resume-info { flex: 1; }
.resume-title { font-size: 14px; font-weight: 600; }
.resume-meta { font-size: 12px; color: #888; margin-top: 2px; }
.resume-actions { display: flex; gap: 8px; }
.file-upload { border: 2px dashed #ccc; border-radius: 10px; padding: 30px; text-align: center; cursor: pointer; margin-bottom: 14px; }
.file-upload:hover { border-color: #1F497D; background: #f8f9ff; }
.file-upload .icon { font-size: 32px; }
.file-upload .text { font-size: 13px; color: #888; margin-top: 6px; display: block; }

/* Bottom Nav */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; height: 56px; background: #fff; border-top: 1px solid #eee; display: flex; z-index: 100; }

/* Desktop Nav - 默认隐藏，桌面端显示 */
.desktop-nav { display: none; }
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 10px; color: #999; cursor: pointer; gap: 2px; }
.nav-item.active { color: #1F497D; }
.nav-item .nav-icon { font-size: 20px; }
.nav-item:hover { color: #1F497D; }

/* Toast */
.toast { position: fixed; top: 60px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.8); color: #fff; padding: 10px 24px; border-radius: 8px; font-size: 14px; z-index: 999; display: none; max-width: 80%; }
.toast.show { display: block; animation: fadeIn .3s; }
@keyframes fadeIn { from { opacity: 0; transform: translateX(-50%) translateY(-10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* Loading */
.loading { text-align: center; padding: 40px; color: #999; }
.empty { text-align: center; padding: 40px; color: #999; font-size: 14px; }

/* Responsive */
@media (max-width: 400px) {
  .login-card { padding: 30px 20px; }
  .content { padding: 56px 8px 72px; }
}

/* === 桌面端全屏宽布局 === */
@media (min-width: 768px) {
  body { background: #eef1f5; }
  
  /* 内容容器 - 真正满屏（top-nav 48px + desktop-nav 44px） */
  .content { max-width: none; padding: 104px 32px 40px; width: 100%; }
  
  /* 顶部导航全宽 */
  .top-nav { padding: 0 32px; }
  
  /* 桌面端水平导航栏 - 替代底部导航 */
  .desktop-nav { display: flex !important; position: fixed; top: 48px; left: 0; right: 0; height: 44px; background: #fff; border-bottom: 1px solid #e8e8e8; z-index: 99; box-shadow: 0 1px 4px rgba(0,0,0,0.04); overflow-x: auto; }
  .desktop-nav::-webkit-scrollbar { height: 0; }
  .desktop-nav-scroll { display: flex; align-items: center; gap: 2px; padding: 0 32px; white-space: nowrap; }
  .desktop-nav-item { display: inline-flex; align-items: center; gap: 4px; padding: 0 14px; height: 44px; font-size: 13px; color: #666; cursor: pointer; border-bottom: 2px solid transparent; transition: all .2s; }
  .desktop-nav-item:hover { color: #1F497D; background: #f5f8ff; }
  .desktop-nav-item.active { color: #1F497D; border-bottom-color: #1F497D; font-weight: 600; }
  .desktop-nav-sep { width: 1px; height: 22px; background: #ddd; margin: 0 6px; flex-shrink: 0; }
  
  /* 桌面端：隐藏底部导航 */
  .bottom-nav { display: none !important; }
  
  /* 登录页面保持居中 */
  .login-bg { min-height: 100vh; align-items: center; }
  .login-card { max-width: 400px; }
  
  /* 仪表盘统计用4列网格 */
  .stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .stat-num { font-size: 32px; }
  
  /* 快捷操作网格 */
  .quick-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .action-btn { min-width: 140px; padding: 16px 12px; font-size: 14px; }
  
  /* 岗位列表 - 按企业分组，每个企业一条横线+标题，下面纵向排列 */
  #jobs-content { display: block; }
  .company-group { margin-bottom: 28px; }
  .company-group-sep { height: 1px; background: linear-gradient(to right, #1F497D, #ddd, transparent); margin-bottom: 12px; }
  .company-group-title { font-size: 18px; font-weight: bold; color: #1F497D; padding: 4px 0 12px; display: flex; align-items: center; gap: 10px; }
  .company-group-count { font-size: 13px; font-weight: normal; color: #888; background: #f0f4ff; padding: 2px 10px; border-radius: 10px; }
  .company-group .jobs-list { display: flex; flex-direction: column; gap: 10px; }
  .company-group .job-card { margin-bottom: 0; }
  
  /* 学生列表表格更宽 */
  #students-content .card { padding: 16px 20px; }
  
  /* 聊天框在宽屏更高 */
  .chat-box { max-height: none; }
  
  /* 报告网格 */
  #eval-content { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
  .report-item { padding: 14px 0; }
  
  /* 评估报告详情 - 两列 */
  .eval-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  
  /* 底栏 - 宽屏时居中（只对非面试页面生效） */
  .bottom-nav { max-width: 500px; left: 50%; transform: translateX(-50%); border-radius: 12px 12px 0 0; box-shadow: 0 -2px 10px rgba(0,0,0,0.08); }
  
  /* 企业列表网格 */
  #companies-content { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
  #companies-content > .card:first-child { grid-column: 1 / -1; }
  
  /* 题库网格 */
  #questions-content { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 12px; }
  
  /* 面试布局 - 桌面端左右分栏（真正的视频会议风格） */
  .interview-layout.desktop { 
    display: flex; flex-direction: row !important; 
    height: calc(100vh - 110px) !important; 
    height: calc(100dvh - 110px) !important; 
    gap: 16px; 
    background: transparent !important;
    border-radius: 0 !important;
    padding: 0;
  }
  
  /* 左侧栏：固定宽度，AI头像在上 + 视频在下 */
  .interview-layout.desktop .interview-left { 
    flex: 0 0 340px; 
    display: flex; 
    flex-direction: column; 
    gap: 12px;
    min-width: 280px;
  }
  
  /* AI面试官卡片区域 - 左上 */
  .interview-layout.desktop .interview-left-top { 
    flex: 0 0 auto; 
    background: linear-gradient(135deg, #1F497D, #2c5f8a); 
    border-radius: 14px; 
    padding: 20px; 
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  }
  
  /* AI头像大图 */
  .interview-layout.desktop .interview-left-top .ai-avatar { 
    width: 100px !important; 
    height: 100px !important; 
    border-radius: 50%;
    margin: 0 auto 12px;
    border: 3px solid rgba(255,255,255,0.5) !important;
    overflow: hidden;
  }
  .interview-layout.desktop .interview-left-top .ai-avatar img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
  }
  
  /* 视频区域 - 左下 */
  .interview-layout.desktop .interview-left-bottom { 
    flex: 1; 
    min-height: 240px; 
    background: #000; 
    border-radius: 14px; 
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  }
  .interview-layout.desktop .interview-left-bottom video { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transform: scaleX(-1);
  }
  
  /* 右侧栏：对话记录 + 输入框 */
  .interview-layout.desktop .interview-right { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    background: #fff; 
    border-radius: 14px; 
    overflow: hidden; 
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    min-width: 0;
  }
  
  /* 右栏中的聊天框占满剩余空间 */
  .interview-layout.desktop .interview-right .chat-box { 
    flex: 1; 
    overflow-y: auto; 
    padding: 20px;
    background: #f8f9fb;
    max-height: none !important;
  }
  
  /* 右栏中的输入区 */
  .interview-layout.desktop .interview-right .input-area {
    flex: 0 0 auto;
    padding: 12px 16px;
    background: white;
    border-top: 1px solid #eee;
  }
  .interview-layout.desktop .interview-right .input-area .input-row {
    display: flex;
    gap: 8px;
  }
  .interview-layout.desktop .interview-right .input-area .input-row .form-input {
    flex: 1;
  }
  
  /* 表单在宽屏更宽 */
  .form-input { height: 46px; font-size: 16px; }
  .btn { height: 46px; font-size: 16px; }
  textarea.form-input { height: auto; }
  
  /* 卡片间距 */
  .card { padding: 24px; margin-bottom: 16px; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
