/* ========================================
   舞萌出勤排卡系统 - 首页样式
   ======================================== */

/* --- 页面容器 --- */
.page-home {
  padding-bottom: 32px;
}

/* --- 店铺信息卡片 --- */
.shop-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin: 16px;
  padding: 24px 20px 20px;
  text-align: center;
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.5s ease forwards;
}

.shop-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-gradient);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.shop-card__logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  object-fit: cover;
}

.shop-card__name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.shop-card__tag {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* --- 人数面板 --- */
.count-panel {
  margin: 0 16px 12px;
  padding: 24px 20px;
  background: var(--primary-gradient);
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: 0 8px 28px rgba(91, 106, 240, 0.3);
  animation: fadeInUp 0.5s ease 0.05s forwards;
  opacity: 0;
}

.count-panel__label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}

.count-panel__value {
  font-size: 52px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.02em;
  animation: countUp 0.3s ease;
}

.count-panel__unit {
  font-size: 18px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  margin-left: 2px;
}

/* --- 操作按钮区 --- */
.action-row {
  display: flex;
  gap: 12px;
  margin: 0 16px 12px;
  animation: fadeInUp 0.5s ease 0.1s forwards;
  opacity: 0;
}

.action-row .btn {
  flex: 1;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-md);
}

/* --- 公告卡片 --- */
.announce-card {
  margin: 0 16px 12px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
  animation: fadeInUp 0.5s ease 0.15s forwards;
  opacity: 0;
}

.announce-card__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.announce-card__icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.announce-card__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.announce-card__content {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  word-break: break-word;
  overflow-wrap: break-word;
}

.announce-card__content img,
.announce-card__content video,
.announce-card__content iframe,
.announce-card__content table,
.announce-card__content pre {
  max-width: 100%;
  height: auto;
}

.announce-card__content table {
  border-collapse: collapse;
  width: 100%;
  display: block;
  overflow-x: auto;
}

.announce-card__content p {
  margin: 0 0 8px;
}

.announce-card__content a {
  color: var(--primary);
  word-break: break-all;
}

.announce-card__content ul,
.announce-card__content ol {
  padding-left: 20px;
  margin: 8px 0;
}

.announce-card__content blockquote {
  border-left: 3px solid var(--primary);
  padding-left: 12px;
  margin: 8px 0;
  color: var(--text-muted);
}

.announce-card__content h1,
.announce-card__content h2,
.announce-card__content h3,
.announce-card__content h4,
.announce-card__content h5,
.announce-card__content h6 {
  color: var(--text-primary);
  margin: 12px 0 6px;
  font-weight: 600;
}

.announce-card__content hr {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 12px 0;
}

.announce-card__content code {
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  word-break: break-all;
}

.announce-card__content pre {
  background: var(--bg);
  padding: 12px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
}

/* --- 机厅状态面板（店铺卡片内） --- */
.shop-status {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.shop-status__row {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 8px;
}

.shop-status__item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 服务器状态链接 */
.shop-status__server-link {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 16px;
  background: var(--bg);
  transition: background var(--transition-fast);
}

.shop-status__server-link:hover {
  background: rgba(91, 106, 240, 0.08);
}

.shop-status__arrow {
  font-size: 14px;
  color: var(--text-muted);
  margin-left: 2px;
}

.shop-status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #10B981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
  animation: pulse 2s infinite;
}

.shop-status__label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.shop-status__icon {
  font-size: 13px;
}

.shop-status__crowd {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 12px;
  letter-spacing: 0.03em;
}

.shop-status__config {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-light);
}

.shop-status__config-label {
  font-size: 11px;
  color: var(--text-muted);
}

.shop-status__mbtn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  line-height: 1;
}

.shop-status__mbtn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.shop-status__mbtn:active {
  transform: scale(0.9);
}

.shop-status__mval {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 20px;
  text-align: center;
}

.shop-status__calc {
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--bg);
  border-radius: 8px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
  word-break: break-all;
  text-align: center;
}

/* --- 留言板（首页精简卡片列表） --- */
.message-card__total {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: auto;
}

.message-card__content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message-card__more {
  padding: 8px 0 0;
  text-align: center;
}

/* 首页留言条目 */
.home-msg-item {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.6;
}

.home-msg-item__head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.home-msg-item__avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.home-msg-item__name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.home-msg-item__time {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
}

.home-msg-item__text {
  font-size: 13px;
  color: var(--text-secondary);
  word-break: break-word;
  padding-left: 28px;
}

/* --- 留言板卡片 --- */
.message-card {
  margin: 0 16px 12px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
  animation: fadeInUp 0.5s ease 0.2s forwards;
  opacity: 0;
}

.message-card__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.message-card__icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.message-card__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.message-card__content {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  word-break: break-word;
}

/* --- 侧栏菜单 --- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: var(--bg-card);
  z-index: 1100;
  box-shadow: var(--shadow-xl);
  transform: translateX(-100%);
  transition: transform var(--transition-slow);
  display: flex;
  flex-direction: column;
}

.sidebar--open {
  transform: translateX(0);
}

.sidebar__header {
  padding: 32px 24px 20px;
  background: var(--primary-gradient);
  color: #fff;
}

.sidebar__header-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.sidebar__header-sub {
  font-size: 13px;
  opacity: 0.8;
  margin-top: 4px;
}

.sidebar__nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.sidebar__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.sidebar__item:hover {
  background: var(--bg);
  color: var(--primary);
}

.sidebar__item:active {
  background: rgba(91, 106, 240, 0.08);
}

.sidebar__item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.sidebar__item-icon--pk {
  background: rgba(16, 185, 129, 0.1);
  color: #10B981;
}

.sidebar__item-icon--settings {
  background: rgba(139, 92, 246, 0.1);
  color: #8B5CF6;
}

.sidebar__footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* --- 遮罩层 --- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-slow);
}

.overlay--show {
  opacity: 1;
  visibility: visible;
}

/* --- 菜单按钮 --- */
.menu-btn {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  transition: background var(--transition-fast);
}

.menu-btn:hover {
  background: rgba(91, 106, 240, 0.08);
}

.menu-btn__line {
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-normal);
}

/* --- 空状态 --- */
.empty-state {
  text-align: center;
  padding: 32px 20px;
  color: var(--text-muted);
}

.empty-state__text {
  font-size: 14px;
  margin-top: 8px;
}

/* --- 加载骨架屏 --- */
.skeleton {
  background: linear-gradient(90deg, var(--border-light) 25%, #E8ECF1 50%, var(--border-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

.skeleton--text {
  height: 14px;
  margin-bottom: 8px;
}

.skeleton--title {
  height: 20px;
  width: 60%;
  margin-bottom: 12px;
}
