/* ==============================================
   style-auth.css —— 登录界面 UI + 机型设置面板
   ============================================== */

/* ============ 登录遮罩（国画风）============ */
#login-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  /* 青绿山水渐变背景 */
  background:
    radial-gradient(circle at 20% 30%, rgba(95, 158, 160, 0.18) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(90, 138, 110, 0.18) 0%, transparent 50%),
    linear-gradient(135deg, #1a3a4a 0%, #2c4f66 60%, #1a3a4a 100%);
  font-family: 'Noto Sans SC', 'PingFang SC', sans-serif;
  padding: 16px;
}

/* 宣纸质感登录卡 */
.login-card {
  width: 100%;
  max-width: 400px;
  padding: 40px 36px 32px;
  background: #f7f5f0;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(212, 165, 116, 0.4);
  position: relative;
  animation: cardIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* 内边框（卷轴感） */
.login-card::before {
  content: "";
  position: absolute;
  top: 8px; left: 8px; right: 8px; bottom: 8px;
  border: 1px solid rgba(156, 141, 122, 0.18);
  border-radius: 8px;
  pointer-events: none;
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
  position: relative;
}

.login-header h2 {
  margin: 0 0 6px;
  font-size: 1.7rem;
  color: #2c4f66;
  letter-spacing: 0.18em;
  font-weight: 800;
}

.login-header .logo-icon {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 4px;
}

.login-header p {
  margin: 0;
  font-size: 0.82rem;
  color: #8a8a8a;
  letter-spacing: 0.08em;
}

.login-form { position: relative; }

.login-form input {
  width: 100%;
  padding: 11px 14px;
  margin-bottom: 14px;
  border: 1px solid #d4cfc7;
  border-radius: 9px;
  font-size: 0.95rem;
  background: #faf8f3;
  color: #1a1a1a;
  box-sizing: border-box;
  outline: none;
  transition: all 0.2s;
  font-family: inherit;
}

.login-form input:focus {
  border-color: #5f9ea0;
  box-shadow: 0 0 0 3px rgba(95, 158, 160, 0.15);
  background: #fff;
}

.login-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 9px;
  background: linear-gradient(180deg, #5f9ea0, #4a7c8c);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: all 0.25s;
  font-family: inherit;
}

.login-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(74, 124, 140, 0.4); }
.login-btn:active { transform: translateY(0); }

.login-toggle {
  width: 100%;
  margin-top: 6px;
  padding: 8px;
  border: none;
  background: transparent;
  color: #4a7c8c;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
}
.login-toggle:hover { color: #2c4f66; text-decoration: underline; }
.login-toggle:disabled, .login-btn:disabled, .code-btn:disabled { opacity: 0.55; cursor: wait; }

.register-code-row { display: flex; align-items: stretch; gap: 8px; margin-bottom: 14px; }
.register-code-row input { flex: 1; min-width: 0; margin-bottom: 0; }
.code-btn {
  flex: 0 0 auto;
  padding: 0 13px;
  border: 1px solid #5f9ea0;
  border-radius: 9px;
  background: #e8f4f0;
  color: #2c4f66;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.login-msg {
  min-height: 1.2em;
  margin: -4px 0 10px;
  text-align: center;
  font-size: 0.82rem;
  color: #8a8a8a;
}
.login-msg.error   { color: #c93756; }
.login-msg.success { color: #3d6b4f; }

/* ============ 退出按钮 ============ */
#logoutBtn {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  padding: 8px 16px;
  background: rgba(255,255,255,0.92);
  border: 1px solid #d4cfc7;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  color: #2c4f66;
  font-family: inherit;
}
#logoutBtn:hover { border-color: #c93756; color: #c93756; }

/* ============ 机型设置面板 ============ */
.settings-btn {
  background: linear-gradient(180deg, #d4a574, #b8935a);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.05em;
  font-family: inherit;
}
.settings-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(212, 165, 116, 0.4); }

.settings-panel {
  display: none;
  margin: 16px 0 24px;
  padding: 20px 24px;
  background: #f7f5f0;
  border: 1px solid #d4cfc7;
  border-radius: 12px;
  box-shadow: var(--shadow-soft, 0 4px 20px rgba(0,0,0,0.08));
}

.settings-panel.open { display: block; animation: cardIn 0.3s; }

.settings-panel h3 {
  margin: 0 0 6px;
  color: #2c4f66;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
}

.settings-panel .desc {
  margin: 0 0 16px;
  font-size: 0.82rem;
  color: #8a8a8a;
}

.settings-add {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.settings-add input {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid #d4cfc7;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  background: #faf8f3;
}
.settings-add input:focus { border-color: #5f9ea0; }

.settings-add button {
  padding: 9px 18px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(180deg, #5f9ea0, #4a7c8c);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.type-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.type-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: #e8f4f0;
  border: 1px solid #c8e0db;
  border-radius: 20px;
  font-size: 0.85rem;
  color: #2c4f66;
  font-family: 'Noto Sans SC', sans-serif;
}

.type-tag .del {
  cursor: pointer;
  color: #c93756;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
}

.type-tags-empty {
  font-size: 0.82rem;
  color: #8a8a8a;
  font-style: italic;
}

.settings-status {
  margin-top: 12px;
  font-size: 0.8rem;
  color: #3d6b4f;
  min-height: 1.2em;
}
.settings-status.error { color: #c93756; }

/* ============ 操作按钮 ============ */
.settings-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.primary-btn {
  padding: 9px 18px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(180deg, #5f9ea0, #4a7c8c);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
}
.primary-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(74, 124, 140, 0.35); }

.ghost-btn {
  padding: 9px 18px;
  border: 1px solid #d4cfc7;
  border-radius: 8px;
  background: #faf8f3;
  color: #2c4f66;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
}
.ghost-btn:hover { border-color: #5f9ea0; color: #4a7c8c; }

/* ============ 机型勾选框（从默认列表里选择）============ */
.type-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.type-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: #faf8f3;
  border: 1px solid #d4cfc7;
  border-radius: 20px;
  font-size: 0.88rem;
  color: #2c4f66;
  cursor: pointer;
  font-family: 'Noto Sans SC', sans-serif;
  transition: all 0.15s;
}
.type-checkbox:hover { border-color: #5f9ea0; }
.type-checkbox input { cursor: pointer; accent-color: #4a7c8c; }
.type-checkbox:has(input:checked) {
  background: #e8f4f0;
  border-color: #5f9ea0;
  font-weight: 600;
}
.filter-group--highlight .type-checkbox:has(input:checked) {
  background: rgba(201, 55, 86, 0.10);
  border-color: #c93756;
  color: #a52a4a;
}
.filter-group--blocked .type-checkbox:has(input:checked) {
  background: #ebe7e1;
  border-color: #8a8a8a;
  color: #625d56;
  text-decoration: line-through;
}

/* ============ 固定顶部栏 ============ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  background: linear-gradient(135deg, #2c4f66 0%, #1a3a4a 100%);
  border-bottom: 1px solid rgba(212, 165, 116, 0.35);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.12);
}
.topbar__main { min-height: 58px; padding: 8px 22px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.topbar__persistent { min-width: 0; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px 12px; }
.topbar__author { color: rgba(247,245,240,.76); font: 600 .7rem 'Noto Sans SC',sans-serif; white-space: nowrap; }
.topbar__brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar__logo {
  font-size: 1.35rem;
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(212, 165, 116, 0.2);
  border: 1px solid rgba(212, 165, 116, 0.4);
  border-radius: 10px;
  flex-shrink: 0;
}
.topbar__logo img { width: 34px; height: 34px; object-fit: contain; }
.login-logo-image { width: 76px; height: 76px; object-fit: contain; padding: 5px; border-radius: 18px; background: #2c4f66; }
.topbar__title-wrap { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.topbar__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f7f5f0;
  letter-spacing: 0.14em;
  white-space: nowrap;
}
.topbar__sub {
  font-size: 0.72rem;
  color: rgba(247, 245, 240, 0.65);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar__actions {
  display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px;
  min-width: 0; padding: 7px 22px; background: rgba(9,31,43,.28);
  border-top: 1px solid rgba(255,255,255,.08);
}
.topbar .topbar-action-btn {
  min-width: 0; height: 34px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.3); border-radius: 17px; background: rgba(255,255,255,.08);
  color: #fff; font: 700 .76rem 'Noto Sans SC',sans-serif; white-space: nowrap; cursor: pointer;
}
.topbar .topbar-action-btn:hover { transform: translateY(-1px); background: rgba(255,255,255,.16); }
.topbar .announcement-button { border-color: rgba(95,158,160,.7); background: rgba(95,158,160,.24); }
.topbar__login-state {
  min-width: 0; max-width: 360px; height: 34px; padding: 0 5px 0 10px; display: flex; align-items: center; gap: 7px;
  border: 1px solid rgba(255,255,255,.18); border-radius: 17px; background: rgba(255,255,255,.06);
}
.login-state-label { color: rgba(247,245,240,.62); font-size: .68rem; white-space: nowrap; }
.cloud-status {
  padding: 4px 9px;
  border-radius: 12px;
  font-size: 0.72rem;
  color: #fff;
  white-space: nowrap;
  background: rgba(255,255,255,0.14);
}
.cloud-status.online { background: rgba(61, 107, 79, 0.88); }
.cloud-status.offline { background: rgba(201, 55, 86, 0.88); }
.cloud-user-email { min-width: 0; color: rgba(247,245,240,0.78); font-size: 0.72rem; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cloud-role-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; height: 24px; padding: 0 8px; border-radius: 12px;
  color: #fff; font: 800 .68rem 'Noto Sans SC', sans-serif; letter-spacing: .08em;
  border: 1px solid rgba(255,255,255,.3);
}
.role-sup { background: linear-gradient(135deg, #c93756, #8f1d38); color: #fff; }
.role-lyj { background: linear-gradient(135deg, #7564c8, #4b3a94); color: #fff; }
.role-adm { background: linear-gradient(135deg, #d4a574, #a66f2d); color: #fff; }
.role-usr { background: linear-gradient(135deg, #5f9ea0, #4a7c8c); color: #fff; }
.admin-console-btn {
  height: 34px; padding: 0 13px; border: 1px solid rgba(255,210,145,.55); border-radius: 17px;
  background: linear-gradient(135deg, rgba(212,165,116,.34), rgba(201,55,86,.25));
  color: #fff; font: 700 .78rem 'Noto Sans SC', sans-serif; cursor: pointer;
}
.admin-console-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.cloud-logout-btn {
  height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 17px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  cursor: pointer;
}

@media (max-width: 720px) {
  .topbar__main { min-height: 52px; padding: 6px 12px; flex-wrap: wrap; }
  .topbar__logo { width: 34px; height: 34px; font-size: 1.08rem; }
  .topbar__title { font-size: .94rem; }
  .cloud-status { font-size: .66rem; padding: 3px 7px; }
  .topbar__actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); padding: 7px 10px; gap: 6px; }
  .topbar .topbar-action-btn, .topbar .author-btn { width: 100%; height: 32px; padding: 0 8px; font-size: .7rem; }
  .topbar__login-state { grid-column: 1 / -1; grid-row: 2; max-width: none; width: 100%; height: 32px; }
  .topbar .help-btn { grid-column: 1; grid-row: 3; }
  .author-dropdown { min-width: 0; grid-column: 2; grid-row: 3; }
  .author-menu { right: 0; }
  .cloud-user-email { display: block; flex: 1; max-width: none; }
  .cloud-role-badge { min-width: 34px; height: 21px; padding: 0 5px; }
  .cloud-logout-btn { height: 25px; padding: 0 8px; }
  .topbar__persistent { width: 100%; justify-content: space-between; gap: 4px 7px; padding-top: 3px; border-top: 1px solid rgba(255,255,255,.08); }
  .topbar__author { white-space: normal; font-size: .62rem; }
}

/* ============ 底部“工具 / 我的”主导航 ============ */
.app-tab-view { min-height: 0; }
.app-tab-view--active { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }
.bottom-nav {
  flex: 0 0 auto; min-height: 58px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr));
  border-top: 1px solid #ded7cc; background: rgba(250,248,243,.98); box-shadow: 0 -4px 18px rgba(44,79,102,.08);
  z-index: 950;
}
.bottom-nav__item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border: 0; background: transparent; color: #8a8a8a; cursor: pointer; font-family: 'Noto Sans SC',sans-serif;
}
.bottom-nav__item span { font-size: 1.12rem; line-height: 1.15; }
.bottom-nav__item b { font-size: .7rem; }
.bottom-nav__item.active { color: #2c4f66; background: linear-gradient(180deg,rgba(232,244,240,.1),rgba(232,244,240,.8)); }

.my-view { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 24px 16px 34px; background: #f2efe9; }
.my-container { width: min(720px,100%); margin: 0 auto; display: grid; gap: 18px; }
.my-profile-card {
  display: flex; align-items: center; gap: 14px; padding: 19px; border: 1px solid #ded7cc; border-radius: 16px;
  background: linear-gradient(145deg,#faf8f3,#eef5f3); box-shadow: 0 7px 24px rgba(44,79,102,.08);
}
.my-profile-avatar { width: 50px; height: 50px; flex: 0 0 50px; display: grid; place-items: center; border-radius: 50%; background: #2c4f66; font-size: 1.35rem; }
.my-profile-info { min-width: 0; flex: 1; }
.my-profile-label { display: block; color: #8a8a8a; font-size: .7rem; }
.my-profile-card .cloud-user-email { display: block; max-width: none; color: #2c4f66; font-size: .9rem; }
.my-username { display:block; font-size:1rem; color:#2878c8; }
.my-user-id { color:#8a8a8a; font-size:.7rem; }
.my-profile-card.role-manager .my-username { color:#c93756; }
.my-section h2 { margin: 0 0 7px 4px; color: #625d56; font-size: .76rem; font-weight: 700; }
.my-menu-list { overflow: hidden; border: 1px solid #ded7cc; border-radius: 13px; background: #faf8f3; }
.my-menu-item {
  width: 100%; min-height: 60px; display: grid; grid-template-columns: 30px minmax(100px,auto) minmax(0,1fr) 16px;
  align-items: center; gap: 8px; padding: 9px 14px; border: 0; border-bottom: 1px solid #e8e2d9;
  background: transparent; color: #2c4f66; text-align: left; text-decoration: none; cursor: pointer; font-family: 'Noto Sans SC',sans-serif;
}
.my-menu-item:last-child { border-bottom: 0; }
.my-menu-item:hover { background: #eef5f3; }
.my-menu-item > span { font-size: 1.15rem; }
.my-menu-item > b { font-size: .84rem; }
.my-menu-item > small { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: #8a8a8a; font-size: .7rem; white-space: nowrap; }
.my-menu-item > i { color: #aaa39a; font-size: 1.2rem; font-style: normal; text-align: right; }
.my-logout-btn { width: 100%; padding: 11px; border: 1px solid rgba(201,55,86,.45); border-radius: 11px; background: #fff; color: #c93756; font-weight: 700; cursor: pointer; }
.my-logout-btn:hover { background: #c93756; color: #fff; }
.my-inline-panel { display:grid; gap:10px; padding:16px; border:1px solid #ded7cc; border-radius:13px; background:#faf8f3; }
.my-inline-panel label { color:#2c4f66; font-size:.82rem; }
.my-inline-panel input[type="email"],.my-inline-panel input:not([type]),.my-inline-panel textarea { width:100%; padding:9px; border:1px solid #d4cfc7; border-radius:8px; font:inherit; }
.my-inline-panel button { padding:10px; border:0; border-radius:8px; background:#4a7c8c; color:#fff; font-weight:700; }
.bug-plea,.welcome-mail-warning { color:#c93756; font-size:.75rem; font-weight:700; }
.broadcast-tag-list { display:flex; flex-wrap:wrap; gap:7px; margin:7px 0; }
.broadcast-tag { border:1px solid #d4cfc7; border-radius:10px; padding:7px 9px; background:#faf8f3; color:#2c4f66; text-align:left; font-size:.7rem; cursor:pointer; }
.broadcast-tag.selected { border-color:#4a7c8c; background:#e8f4f0; }
.broadcast-tag.manager-source { border-color:#c93756; color:#a52a4a; background:rgba(201,55,86,.08); }
.announcement-field-row { display:grid; grid-template-columns:1fr 1fr 1fr; gap:7px; }

@media (max-width: 900px) {
  .bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; }
  #tool-view { padding-bottom: 58px; }
  .my-view { padding-bottom: 82px; }
}

@media (max-width: 600px) {
  .my-view { padding: 14px 12px 24px; }
  .my-view { padding-bottom: 82px; }
  .my-menu-item { grid-template-columns: 28px minmax(88px,auto) minmax(0,1fr) 12px; padding: 8px 11px; }
  .my-menu-item > small { font-size: .64rem; }
  .bottom-nav { min-height: 56px; }
}

/* ============ SUP 管理员操作台 ============ */
.admin-console-overlay {
  position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center;
  padding: 18px; background: rgba(26,58,74,.64); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.admin-console-card {
  width: min(940px, 100%); max-height: min(820px, 94vh); overflow: hidden;
  display: flex; flex-direction: column; padding: 28px;
  background: #f7f5f0; border: 1px solid rgba(212,165,116,.55); border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0,0,0,.38); font-family: 'Noto Sans SC','PingFang SC',sans-serif;
}
.admin-console-head { display: flex; justify-content: space-between; gap: 18px; padding-bottom: 17px; border-bottom: 1px solid #ded7cc; }
.admin-console-kicker { color: #c93756; font-size: .72rem; font-weight: 800; letter-spacing: .14em; }
.admin-console-head h2 { margin: 4px 0 5px; color: #2c4f66; font-size: 1.45rem; letter-spacing: .12em; }
.admin-console-head p { margin: 0; color: #7b756d; font-size: .82rem; }
.admin-console-close {
  width: 34px; height: 34px; flex: 0 0 34px; border: 1px solid #d4cfc7; border-radius: 50%;
  background: #faf8f3; color: #8a8a8a; cursor: pointer;
}
.admin-console-close:hover { color: #c93756; border-color: #c93756; }
.role-guide { display: flex; flex-wrap: wrap; gap: 12px; padding: 15px 0 10px; color: #625d56; font-size: .77rem; }
.role-guide span { display: inline-flex; align-items: center; gap: 6px; }
.role-dot { display: inline-flex; min-width: 42px; height: 22px; align-items: center; justify-content: center; border-radius: 11px; font-size: .65rem; letter-spacing: .06em; }
.admin-console-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 10px; color: #4a4a4a; font-size: .82rem; }
.admin-user-list { overflow: auto; display: grid; gap: 9px; padding: 3px 2px 4px; }
.admin-user-row {
  display: grid; grid-template-columns: minmax(180px,1fr) 55px 140px 170px; align-items: center; gap: 10px;
  padding: 11px 12px; background: #faf8f3; border: 1px solid #e2ddd5; border-radius: 10px;
}
.admin-user-row.is-self { background: #eef5f3; border-color: rgba(95,158,160,.38); }
.admin-user-email { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: #2c4f66; font-size: .85rem; font-weight: 700; }
.admin-user-email small { display: block; color: #8a8a8a; font-size: .68rem; font-weight: 400; margin-top: 2px; }
.admin-role-select { width: 100%; padding: 7px 8px; border: 1px solid #d4cfc7; border-radius: 8px; background: #fff; color: #2c4f66; font-weight: 700; }
.admin-role-select:disabled { opacity: .62; background: #eeeae3; }
.admin-save-role { padding: 7px 10px; border: 0; border-radius: 8px; background: #4a7c8c; color: #fff; font-weight: 700; cursor: pointer; }
.admin-save-role:disabled { opacity: .5; cursor: default; }
.admin-console-status { min-height: 1.4em; margin-top: 10px; color: #3d6b4f; font-size: .8rem; }
.admin-console-status.error { color: #c93756; }
.admin-users-empty { padding: 28px; text-align: center; color: #8a8a8a; border: 1px dashed #d4cfc7; border-radius: 10px; }

.admin-module-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px;
  padding: 24px 2px 8px; overflow: auto;
}
.admin-module-card {
  min-height: 160px; padding: 22px 18px; display: flex; flex-direction: column; align-items: flex-start;
  justify-content: center; gap: 8px; text-align: left; cursor: pointer;
  border: 1px solid #ded7cc; border-radius: 14px; background: #faf8f3; color: #2c4f66;
  box-shadow: 0 5px 18px rgba(44,79,102,.07); transition: transform .2s, border-color .2s, box-shadow .2s;
}
.admin-module-card:hover { transform: translateY(-3px); border-color: #5f9ea0; box-shadow: 0 9px 24px rgba(44,79,102,.14); }
.admin-module-icon { font-size: 1.7rem; }
.admin-module-card strong { font-size: .98rem; }
.admin-module-card small { color: #8a8a8a; font-size: .74rem; line-height: 1.55; }
.admin-module-back {
  width: fit-content; margin-top: 12px; padding: 6px 10px; border: 1px solid #d4cfc7; border-radius: 8px;
  background: #faf8f3; color: #4a7c8c; cursor: pointer; font-weight: 700;
}
.admin-module-view { min-height: 0; flex: 1; overflow: auto; padding: 15px 2px 2px; }

.admin-data-section { min-height: 0; display: flex; flex-direction: column; padding: 15px 0; border-bottom: 1px solid #ded7cc; }
.admin-section-title { display:flex; justify-content:space-between; align-items:center; gap:10px; color:#2c4f66; font-size:.92rem; font-weight:800; }
.admin-section-note { margin:4px 0 8px; color:#8a8a8a; font-size:.75rem; }
.admin-submission-list { max-height: 300px; overflow:auto; display:grid; gap:9px; padding-right:3px; }
.admin-submission-card { padding:12px; border:1px solid #e2ddd5; border-radius:10px; background:#faf8f3; }
.admin-submission-card.is-pending { border-color:rgba(212,165,116,.68); background:#fffaf1; }
.admin-submission-head { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.admin-submission-who { min-width:0; color:#2c4f66; font-size:.82rem; font-weight:700; overflow:hidden; text-overflow:ellipsis; }
.admin-submission-meta { margin-top:2px; color:#8a8a8a; font-size:.7rem; font-weight:400; }
.admin-submission-status { flex:0 0 auto; padding:3px 8px; border-radius:10px; background:#e8f4f0; color:#3d6b4f; font-size:.68rem; font-weight:700; }
.admin-submission-card.is-pending .admin-submission-status { background:#f5e5cb; color:#8a5a1f; }
.admin-submission-text { max-height:110px; overflow:auto; margin:9px 0; padding:8px 10px; white-space:pre-wrap; word-break:break-word; border:1px solid #e2ddd5; border-radius:8px; background:#fff; color:#4a4a4a; font: .72rem/1.55 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; }
.admin-submission-actions { display:flex; justify-content:flex-end; align-items:center; gap:8px; }
.admin-publish-btn { padding:7px 12px; border:0; border-radius:8px; background:linear-gradient(135deg,#5f9ea0,#4a7c8c); color:#fff; font-weight:700; cursor:pointer; }
.admin-publish-btn:disabled { opacity:.55; cursor:wait; }
#admin-role-section { min-height:0; display:flex; flex-direction:column; overflow:hidden; }

.admin-announcement-form { display: grid; gap: 11px; padding: 13px; border: 1px solid #e2ddd5; border-radius: 12px; background: #faf8f3; }
.admin-announcement-form label > span:first-child { display: block; margin-bottom: 4px; color: #625d56; font-size: .74rem; font-weight: 700; }
.admin-announcement-form input[type="text"],
.admin-announcement-form input:not([type]),
.admin-announcement-form select,
.admin-announcement-form textarea {
  width: 100%; padding: 9px 10px; border: 1px solid #d4cfc7; border-radius: 8px;
  background: #fff; color: #2c4f66; font: .84rem/1.6 'Noto Sans SC','PingFang SC',sans-serif;
}
.admin-announcement-form textarea { resize: vertical; min-height: 112px; }
.admin-announcement-form input:focus, .admin-announcement-form select:focus, .admin-announcement-form textarea:focus { outline: 2px solid rgba(95,158,160,.2); border-color: #5f9ea0; }
.admin-announcement-email { display: flex; align-items: flex-start; gap: 9px; padding: 9px 10px; border-radius: 8px; background: #eef5f3; }
.admin-announcement-email input { margin-top: 4px; }
.admin-announcement-email span { margin: 0 !important; }
.admin-announcement-email strong { display: block; color: #2c4f66; font-size: .8rem; }
.admin-announcement-email small { display: block; color: #8a8a8a; font-size: .68rem; }
.admin-announcement-history-title { margin: 15px 0 7px; }
.admin-announcement-list { display: grid; gap: 8px; }
.admin-announcement-item { padding: 10px 12px; border: 1px solid #e2ddd5; border-radius: 9px; background: #fff; }
.admin-announcement-item-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.admin-announcement-item-title { color: #2c4f66; font-size: .82rem; font-weight: 800; }
.admin-announcement-type { flex: 0 0 auto; padding: 2px 7px; border-radius: 10px; background: #e8f4f0; color: #3d6b4f; font-size: .65rem; font-weight: 700; }
.admin-announcement-type.is-update { background: #f5e5cb; color: #8a5a1f; }
.admin-announcement-item-content { margin-top: 5px; color: #625d56; font-size: .74rem; white-space: pre-wrap; word-break: break-word; }
.admin-announcement-item-meta { margin-top: 5px; color: #8a8a8a; font-size: .66rem; }

.admin-library-editors { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:12px 0 18px; }
.admin-library-editor { display:flex; flex-direction:column; gap:8px; padding:12px; border:1px solid #e2ddd5; border-radius:12px; background:#faf8f3; }
.admin-library-editor label { display:flex; justify-content:space-between; gap:8px; color:#2c4f66; font-size:.84rem; }
.admin-library-editor label small { color:#8a8a8a; font-size:.66rem; font-weight:400; text-align:right; }
.admin-library-editor textarea { width:100%; box-sizing:border-box; resize:vertical; min-height:105px; padding:9px 10px; border:1px solid #d4cfc7; border-radius:8px; background:#fff; color:#2c4f66; font:.8rem/1.65 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; }
.admin-library-editor textarea:focus, .admin-library-search-controls input:focus, .admin-library-search-controls select:focus { outline:2px solid rgba(95,158,160,.2); border-color:#5f9ea0; }
.admin-library-browser-head { display:flex; align-items:flex-end; justify-content:space-between; gap:12px; padding-top:13px; border-top:1px solid #ded7cc; }
.admin-library-browser-head > div:first-child { display:grid; gap:2px; color:#2c4f66; font-size:.88rem; }
.admin-library-browser-head small { color:#8a8a8a; font-size:.68rem; font-weight:400; }
.admin-library-search-controls { display:flex; gap:7px; }
.admin-library-search-controls input, .admin-library-search-controls select { padding:8px 9px; border:1px solid #d4cfc7; border-radius:8px; background:#fff; color:#2c4f66; }
.admin-library-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; margin-top:10px; padding-right:3px; }
.admin-library-row { display:grid; grid-template-columns:42px 72px minmax(0,1fr); align-items:center; gap:8px; padding:8px 9px; border:1px solid #e2ddd5; border-radius:8px; background:#fff; color:#625d56; font-size:.76rem; }
.admin-library-row strong { color:#2c4f66; font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; }
.admin-library-type { padding:2px 6px; border-radius:8px; text-align:center; background:#e8f4f0; color:#3d6b4f; font-size:.62rem; font-weight:800; }
.admin-library-type.is-liveries { background:#f5e5cb; color:#8a5a1f; }

@media (max-width: 650px) {
  .admin-console-card { padding: 20px 15px; max-height: 94vh; }
  .admin-module-grid { grid-template-columns: 1fr; }
  .admin-module-card { min-height: 102px; }
  .admin-submission-list { max-height: 270px; }
  .admin-user-row { grid-template-columns: minmax(140px,1fr) 48px; }
  .admin-user-created { display: none; }
  .admin-user-row > div:last-child { grid-column: 1 / -1; }
  .admin-library-editors, .admin-library-list { grid-template-columns:1fr; }
  .admin-library-browser-head { align-items:stretch; flex-direction:column; }
  .admin-library-search-controls input { min-width:0; flex:1; }
}

/* ============ 简笔人头像按钮 ============ */
.user-avatar-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.85);
  background: linear-gradient(135deg, #5f9ea0, #4a7c8c);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  padding: 0;
}
.user-avatar-btn:hover { transform: scale(1.07); box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
.avatar-icon { width: 22px; height: 22px; }

/* ============ 关于作者 下拉按钮 ============ */
.author-btn {
  padding: 0 16px;
  height: 40px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 20px;
  background: rgba(255,255,255,0.08);
  color: #f7f5f0;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s, border-color 0.2s;
}
.author-btn:hover { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.6); }
.author-btn .caret { font-size: 0.72rem; opacity: 0.8; }

/* ============ 管理员公告按钮 ============ */
.admin-announce-btn {
  padding: 0 16px;
  height: 40px;
  border: 1px solid rgba(245, 158, 11, 0.6);
  border-radius: 20px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 2px 10px rgba(217, 119, 6, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}
.admin-announce-btn:hover { transform: scale(1.05); box-shadow: 0 4px 16px rgba(217, 119, 6, 0.5); }

/* ============ 关于作者 下拉菜单 ============ */
.author-dropdown { position: relative; }
.author-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: #f7f5f0;
  border: 1px solid rgba(212, 165, 116, 0.4);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 4px;
}
.author-menu.open { display: flex; animation: cardIn 0.2s ease; }
.author-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #2c4f66;
  text-decoration: none;
  font-size: 0.92rem;
  font-family: 'Noto Sans SC', sans-serif;
  transition: background 0.15s;
}
.author-menu a:hover { background: #e8f4f0; }
.author-icon { font-size: 1.05rem; }

/* ============ 个人中心弹层 ============ */
#profileOverlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(26, 58, 74, 0.55);
  backdrop-filter: blur(4px);
  padding: 16px;
}

.profile-card {
  width: 100%;
  max-width: 420px;
  padding: 32px 30px;
  background: #f7f5f0;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  border: 1px solid rgba(212, 165, 116, 0.4);
  position: relative;
  font-family: 'Noto Sans SC', 'PingFang SC', sans-serif;
  animation: cardIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 30px; height: 30px;
  border: none;
  background: transparent;
  font-size: 1.1rem;
  color: #8a8a8a;
  cursor: pointer;
  border-radius: 50%;
}
.profile-close:hover { background: #eee; color: #c93756; }

.profile-card h2 {
  margin: 0 0 22px;
  font-size: 1.35rem;
  color: #2c4f66;
  letter-spacing: 0.12em;
}

.profile-section {
  margin-bottom: 20px;
}
.profile-section label {
  display: block;
  font-size: 0.82rem;
  color: #8a8a8a;
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}
.profile-section input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d4cfc7;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #faf8f3;
  box-sizing: border-box;
  outline: none;
  font-family: inherit;
}
.profile-section input:focus { border-color: #5f9ea0; }
.profile-section input:disabled { color: #555; background: #efece6; }

.profile-section .primary-btn { margin-top: 8px; width: auto; }

.profile-msg {
  margin-top: 10px;
  font-size: 0.82rem;
  min-height: 1.2em;
  color: #8a8a8a;
}
.profile-msg.error   { color: #c93756; }
.profile-msg.success { color: #3d6b4f; }

.logout-full-btn {
  width: 100%;
  margin-top: 8px;
  padding: 11px;
  border: 1px solid #c93756;
  border-radius: 8px;
  background: #fff;
  color: #c93756;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.logout-full-btn:hover { background: #c93756; color: #fff; }

/* ============ 每日公告：大屏居中悬浮 + 强虚化背景 ============ */
#daily-announce {
  position: fixed;
  inset: 0;
  z-index: 99997;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.25s ease;
}
.announce-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 45, 60, 0.62);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.announce-card {
  position: relative;
  width: 100%;
  max-width: 620px;
  max-height: 80vh;
  padding: 40px 44px 36px;
  background: #f7f5f0;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
  border: 1px solid rgba(212, 165, 116, 0.45);
  font-family: 'Noto Sans SC', 'PingFang SC', sans-serif;
  animation: cardIn 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.15);
  overflow-y: auto;
}
.announce-badge {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 700;
  color: #4a7c8c;
  letter-spacing: 0.12em;
  margin-bottom: 18px;
  padding: 5px 16px;
  background: #e8f4f0;
  border-radius: 20px;
  border: 1px solid rgba(95,158,160,0.35);
}
.announce-body {
  font-size: 1.15rem;
  line-height: 2;
  color: #2c4f66;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 4em;
  padding: 24px 26px;
  background: #faf8f3;
  border: 1px solid #d4cfc7;
  border-radius: 12px;
  margin-bottom: 26px;
}
.announce-ok {
  width: 100%;
  padding: 13px;
  font-size: 1rem;
  letter-spacing: 0.1em;
}

/* ============ 管理员公告编辑窗口 ============ */
#announce-editor {
  position: fixed;
  inset: 0;
  z-index: 99997;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(26, 58, 74, 0.5);
  backdrop-filter: blur(6px);
  padding: 16px;
}
.announce-editor-card {
  width: 100%;
  max-width: 500px;
  padding: 28px;
  background: #f7f5f0;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  border: 1px solid rgba(212, 165, 116, 0.4);
  position: relative;
  font-family: 'Noto Sans SC', 'PingFang SC', sans-serif;
  animation: cardIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.announce-editor-card h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  color: #2c4f66;
}
.announce-editor-card textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #d4cfc7;
  border-radius: 10px;
  font-size: 0.95rem;
  background: #faf8f3;
  box-sizing: border-box;
  outline: none;
  font-family: inherit;
  resize: vertical;
  margin-top: 12px;
}
.announce-editor-card textarea:focus { border-color: #5f9ea0; }
.announce-editor-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}

/* ============ 航班信息区（左侧面板内的原始数据框） ============ */
.flight-status {
  font-size: 0.78rem;
  color: #8a8a8a;
  min-height: 1.2em;
  font-family: 'Noto Sans SC', sans-serif;
}
.flight-status.success { color: #3d6b4f; }
.flight-status.error   { color: #c93756; }
.flight-status.info    { color: #4a7c8c; }

.announcement-once-note {
  margin: 12px 0;
  color: #c93756;
  font-size: 0.76rem;
  font-weight: 700;
}

.username-user { color: #1677c8 !important; }
.username-manager { color: #c52f4f !important; }

.admin-role-controls {
  display: flex;
  gap: 6px;
}

.panel-status { min-height: 1.2em; font-size: 0.82rem; }
.panel-status.success { color: #3d6b4f; }
.panel-status.error { color: #c93756; }
