* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --blue: #1c96e8;
  --blue-light: #e3f3ff;
  --bg: #f4f7fb;
  --border: #e0e6f0;
  --text-main: #1f2933;
  --text-muted: #7b8794;
  --danger: #e0245e;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  height: 100vh;
}

.app-root {
  display: flex;
  height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: #ffffff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 12px;
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px 14px;
  border-bottom: 1px solid var(--border);
}

.logo-circle {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.logo-title {
  font-weight: 600;
}

.logo-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.user-card {
  display: flex;
  margin: 12px 4px;
  padding: 8px;
  border-radius: 10px;
  background: var(--blue-light);
  align-items: center;
  gap: 10px;
}

.avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
}

.user-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 6px;
  align-items: center;
}

.vip-tag {
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid #f6ad55;
  color: #c05621;
  font-size: 11px;
}

.hidden {
  display: none !important;
}

.nav-tabs {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-tab {
  text-align: left;
  border: none;
  background: transparent;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}

.nav-tab.active {
  background: var(--blue-light);
  color: var(--blue);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.text-btn,
.text-link {
  border: none;
  background: none;
  color: var(--blue);
  cursor: pointer;
  font-size: 13px;
  text-align: left;
}

.text-link {
  text-decoration: none;
}

.main-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-title {
  font-size: 16px;
  font-weight: 600;
}

.dot-status {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.dot-status.offline {
  background: #d1d5db;
}

.dot-status.online {
  background: #16a34a;
}

.view-container {
  flex: 1;
  padding: 12px;
  overflow: hidden;
}

.view {
  display: none;
  height: 100%;
}

.view.active {
  display: block;
}

/* composer and list */

.composer {
  background: #ffffff;
  border-radius: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  margin-bottom: 10px;
}

.composer textarea {
  width: 100%;
  border: none;
  resize: vertical;
  min-height: 60px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
}

.composer-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

.primary-btn,
.outline-btn {
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  border: none;
}

.primary-btn {
  background: var(--blue);
  color: #fff;
}

.outline-btn {
  background: #ffffff;
  border: 1px solid var(--blue);
  color: var(--blue);
}

.list {
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 8px;
  height: calc(100% - 96px);
  overflow-y: auto;
}

.feed-item {
  padding: 8px 4px;
  border-bottom: 1px solid #edf2f7;
}

.feed-item:last-child {
  border-bottom: none;
}

.feed-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.feed-content {
  font-size: 14px;
}

/* split layout */

.split {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 10px;
  height: 100%;
}

.split-left,
.split-right {
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.split-left .list,
.split-right .chat-messages {
  border: none;
  border-radius: 0;
  padding: 8px;
}

.split-header {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.chat-bubble {
  max-width: 80%;
  padding: 6px 10px;
  border-radius: 12px;
  margin-bottom: 6px;
  font-size: 14px;
}

.chat-bubble.me {
  margin-left: auto;
  background: var(--blue);
  color: #ffffff;
}

.chat-bubble.other {
  margin-right: auto;
  background: #e5edf5;
}

.chat-composer {
  border-top: 1px solid var(--border);
  padding: 6px 8px;
  display: flex;
  gap: 6px;
}

.chat-composer input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 6px 10px;
  font-size: 14px;
}

/* drive */

.drive-toolbar {
  padding: 8px 8px 4px;
  display: flex;
  gap: 8px;
}

.upload-btn {
  border-radius: 999px;
  border: 1px dashed var(--blue);
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
}

/* AI */

.ai-chat .chat-messages {
  height: calc(100vh - 130px);
}

/* modal */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px;
  width: 320px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.2);
}

.modal-content h3 {
  margin-bottom: 10px;
}

.modal-content input {
  width: 100%;
  margin-top: 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 6px 10px;
}

.modal-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* auth */

.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-container {
  background: #ffffff;
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--border);
  width: 320px;
}

.auth-container h1 {
  text-align: center;
  margin-bottom: 8px;
}

.auth-sub {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.auth-form input {
  width: 100%;
  margin-top: 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 8px 10px;
}

.full {
  width: 100%;
  margin-top: 10px;
}

.center {
  display: block;
  text-align: center;
  margin-top: 8px;
}

/* VIP */

.vip-card {
  background: #ffffff;
  padding: 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.vip-card h2 {
  margin-bottom: 10px;
}

.vip-benefits {
  margin-left: 16px;
  margin-bottom: 12px;
  font-size: 14px;
}

/* admin */

.admin-body {
  background: var(--bg);
}

.admin-root {
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.admin-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.admin-section {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 10px;
}

.admin-list {
  margin-top: 8px;
  max-height: 260px;
  overflow-y: auto;
}

.admin-item {
  padding: 6px 4px;
  font-size: 13px;
  border-bottom: 1px solid #edf2f7;
}

.admin-item:last-child {
  border-bottom: none;
}

.admin-toolbar {
  display: flex;
  gap: 6px;
  align-items: center;
}

.admin-toolbar input {
  flex: 1;
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 6px 8px;
}
