:root {
  --primary-color: #6366f1;
  --primary-color-dark: #4f46e5;
  --primary-color-light: rgba(99, 102, 241, 0.1);
}

html, body, #app {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: "PingFang SC", sans-serif, Helvetica, Arial, Verdana, Tahoma;
  color: #333;
}

/* Element primary override */
.el-button--primary {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
}
.el-button--primary:hover,
.el-button--primary:focus {
  background-color: var(--primary-color-dark) !important;
  border-color: var(--primary-color-dark) !important;
}
.el-checkbox__input.is-checked .el-checkbox__inner,
.el-checkbox__input.is-indeterminate .el-checkbox__inner {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
}
.el-checkbox__inner:hover {
  border-color: var(--primary-color);
}
.el-dialog__headerbtn:hover .el-dialog__close {
  color: var(--primary-color);
}

/* ========== LOGIN ========== */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
  position: relative;
}

.bubbles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.bubble {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  animation: floatBubble ease-in-out infinite;
}

@keyframes floatBubble {
  0%, 100% { transform: translate(0) scale(1); }
  25% { transform: translate(20px, -20px) scale(1.02); }
  50% { transform: translate(-15px, 15px) scale(1.05); }
  75% { transform: translate(10px, 10px) scale(0.98); }
}

.login-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 60px 40px 40px;
  z-index: 2;
}

.login-left .login-illustration {
  width: 900px;
  max-width: 900px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.12));
}

.login-card {
  width: 380px;
  background: #fff;
  border-radius: 20px;
  padding: 45px 40px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.18);
  z-index: 2;
  margin-left: -30px;
}

.login-title {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin: 0 0 6px;
  text-align: center;
}

.login-desc {
  font-size: 13px;
  color: #999;
  margin: 0 0 32px;
  text-align: center;
}

.login-footer {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
  z-index: 2;
}

.login-form {
  margin: 10px 0;
}

.login-form .el-form-item {
  margin-bottom: 20px;
}

.login-form .el-form-item__content {
  width: 100%;
}

.login-form .el-input input {
  height: 46px;
  line-height: 46px;
  padding: 0 15px 0 42px;
  background: #f7f8fa;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #333;
  font-size: 14px;
  transition: all 0.3s;
}

.login-form .el-input input:focus {
  border-color: var(--primary-color);
  background: #fff;
  box-shadow: 0 0 0 4px var(--primary-color-light);
}

.login-form .el-input input::placeholder {
  color: #aaa;
}

.login-form .el-input .el-input__prefix {
  left: 14px;
}

.login-form .el-input .el-input__prefix i,
.login-form .login-prefix-icon {
  font-size: 18px !important;
  color: #bbb;
}

.login-prefix-icon,
.login-suffix-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 46px;
  color: #bbb;
}

.login-suffix-icon {
  cursor: pointer;
  width: 22px;
}

.login-suffix-icon:hover {
  color: #888;
}

.disclaimer-item {
  margin-bottom: 20px;
}

.disclaimer-item .el-checkbox__label {
  font-size: 14px;
  font-weight: 500;
  color: #606266;
  padding-left: 10px;
}

.disclaimer-link {
  color: #606266;
  font-weight: 500;
  cursor: pointer;
}

.disclaimer-link:hover {
  color: var(--primary-color);
}

.login-submit {
  width: 100%;
  height: 48px;
  border-radius: 12px !important;
  font-size: 16px !important;
  letter-spacing: 6px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 12px;
  transition: all 0.3s;
  background: var(--primary-color) !important;
  border: none !important;
  color: #fff !important;
  padding: 0 !important;
}

.login-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(34, 172, 53, 0.4);
  background: var(--primary-color-dark) !important;
}

.login-submit:active {
  transform: translateY(0);
}

.agreement-body {
  max-height: 240px;
  overflow: auto;
  line-height: 1.8;
  color: #303133;
  font-size: 14px;
  padding-right: 4px;
}

.agreement-hint {
  margin-top: 12px;
  color: #909399;
  font-size: 12px;
}

@media screen and (max-width: 1100px) {
  .login-left { padding: 30px; }
  .login-left .login-illustration { width: 400px; max-width: 400px; }
  .login-card { margin-left: 0; }
}

@media screen and (max-width: 900px) {
  .login-left { display: none; }
  .login-card { margin-left: 0; }
}

@media screen and (max-width: 480px) {
  .login-card {
    width: calc(100% - 40px);
    margin: 20px;
    padding: 35px 25px;
    border-radius: 16px;
  }
}

/* ========== LAYOUT ========== */
.avue-contail {
  position: relative;
  width: 100%;
  height: 100%;
  background: #f5f6f7;
}

.sidebar_box {
  height: 100%;
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
}

.sidebar_box .box_card {
  width: 88px;
  box-sizing: border-box;
  border: none !important;
  height: 100% !important;
  background: var(--primary-color);
  box-shadow: none;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
}

.sidebar_box .box_card .logo {
  position: fixed;
  left: 0;
  top: 0;
  width: 88px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  z-index: 10;
}

.sidebar_box .box_card .logo img {
  width: 56px;
  height: 56px;
}

.sidebar_box .menu-scroll {
  padding: 70px 10px 0;
  height: calc(100% - 140px);
  overflow-y: auto;
}

.sidebar_box .menu-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.sidebar_box .text,
.sidebar_box .activeitem {
  position: relative;
  font-size: 14px;
  margin: 0 0 10px;
  width: 68px;
  height: 68px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  color: #fff;
  background-color: transparent;
  border-radius: 8px;
}

.sidebar_box .text i,
.sidebar_box .activeitem i {
  margin-bottom: 8px;
  font-size: 20px;
}

.sidebar_box .text span,
.sidebar_box .activeitem span {
  font-size: 12px;
  line-height: 1;
}

.sidebar_box .activeitem {
  background-color: #fff;
  color: var(--primary-color);
}

.sidebar_box .text:hover .sidebar_mask {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-color: #000;
  opacity: 0.3;
  border-radius: 8px;
}

.sidebar_box .fold-btn {
  width: 50px;
  height: 50px;
  background: #fbfdfb;
  border-radius: 8px;
  position: fixed;
  top: calc(100vh - 60px);
  left: 18px !important;
  z-index: 9999;
  text-align: center;
  cursor: pointer;
}

.sidebar_box .fold-btn i {
  font-size: 20px;
  line-height: 50px;
  color: #333;
}

.sidebar_box .secondbox {
  height: 100%;
  width: 152px;
  margin-left: 88px;
  border-radius: 0 8px 8px 0;
  background: #fff;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9;
  overflow: hidden;
  transition: width 0.3s;
}

.sidebar_box .secondbox.is-collapsed {
  width: 0;
}

.sidebar_box .secondbox .title {
  height: 60px;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #ebeef5;
  box-sizing: border-box;
}

.sidebar_box .secondbox .title-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.sidebar_box .secondbox .title-text {
  font-size: 20px;
  font-weight: 600;
  color: var(--primary-color);
  letter-spacing: 3px;
}

.sidebar_box .secondbox .title-sub {
  font-size: 11px;
  color: #999;
  letter-spacing: 1px;
  font-weight: 400;
}

.sidebar_box .secondtext,
.sidebar_box .secondactive {
  box-sizing: border-box;
  padding: 8px 0 8px 16px;
  font-size: 14px;
  margin: 0 0 12px;
  width: 100%;
  height: 32px;
  white-space: nowrap;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  cursor: pointer;
  color: #000;
}

.sidebar_box .secondtext:hover {
  color: var(--primary-color);
  background-color: var(--primary-color-light);
}

.sidebar_box .secondactive {
  color: var(--primary-color);
  border-right: 4px solid var(--primary-color);
  background-color: var(--primary-color-light);
}

.avue-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  padding-left: 240px;
  width: 100%;
  background-color: #fff;
  box-sizing: border-box;
  transition: all 0.3s;
  z-index: 8;
}

.avue-header.is-collapsed {
  padding-left: 88px;
}

.avue-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15);
  color: rgba(0, 0, 0, 0.65);
  height: 64px;
  line-height: 32px;
  box-sizing: border-box;
}

.top-bar__left {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #666;
}

.top-bar__left .crumb-current {
  color: #21ac34 !important;
}

.top-bar__right {
  display: flex;
  align-items: center;
}

.header_useInfo {
  width: 120px;
  height: 32px;
  background: #f7f9fe;
  border-radius: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8px;
  box-sizing: border-box;
  cursor: pointer;
}

.header_useInfo img {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.header_useInfo .user_name {
  width: 70px;
  line-height: 20px;
  font-size: 14px;
  color: #2b5631;
  font-weight: 500;
  margin: 0 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avue-tags {
  user-select: none;
  position: relative;
  padding: 0 10px;
  margin-bottom: 0;
  border-top: 1px solid #f6f6f6;
  background-color: #fff;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  height: 40px;
}

.avue-tags .tag-item {
  margin: 0 3px;
  height: 40px;
  line-height: 40px;
  font-size: 13px;
  font-weight: 400;
  color: #ccc;
  padding: 0 12px;
  cursor: pointer;
  position: relative;
}

.avue-tags .tag-item.is-active {
  color: var(--primary-color);
  border-bottom: 3px solid var(--primary-color);
}

.avue-main {
  position: absolute;
  top: 64px;
  left: 240px;
  padding: 2px;
  width: calc(100% - 240px);
  height: calc(100% - 64px);
  overflow: hidden;
  transition: all 0.3s;
  background: #f5f6f7;
  box-sizing: border-box;
}

.avue-main.is-collapsed {
  width: calc(100% - 88px);
  left: 88px;
}

.avue-main #avue-view {
  height: calc(100% - 42px);
  overflow: auto;
  background: #ebf1f6;
}

/* ========== HOME ========== */
.app-container {
  padding: 20px;
  background-color: #f5f7fa;
  min-height: 100%;
  box-sizing: border-box;
}

.statistics-cards {
  margin-bottom: 20px;
  display: flex !important;
}

.statistics-cards::before,
.statistics-cards::after {
  display: none !important;
}

.statistics-cards .el-col {
  float: none;
  display: flex;
}

.statistics-cards .stat-card {
  height: 100%;
  flex: 1;
  width: 100%;
  background: #fff;
  padding: 20px;
  border-radius: 4px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
}

.statistics-cards .stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.15);
}

.statistics-cards .stat-card .stat-header {
  color: #606266;
  font-size: 14px;
  margin-bottom: 10px;
}

.statistics-cards .stat-card .stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #303133;
  margin-bottom: 10px;
}

.statistics-cards .stat-card .stat-value.highlight {
  color: #67c23a;
}

.statistics-cards .stat-card .stat-footer {
  color: #909399;
  font-size: 12px;
  margin-top: 2px;
}

.user-stat-card {
  position: relative;
  min-height: 168px;
  padding-bottom: 52px !important;
}

.user-stat-card .user-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.user-stat-card .greeting {
  font-size: 14px;
  font-weight: 500;
  color: #2563eb;
  margin-bottom: 2px;
}

.user-stat-card .datetime {
  font-size: 12px;
  color: #909399;
}

.user-stat-card .username {
  font-size: 16px;
  font-weight: 700;
  color: #303133;
}

.user-stat-card .user-footer {
  color: #909399;
  font-size: 12px;
  display: flex;
  align-items: center;
}

.user-stat-card .user-footer i {
  margin-right: 4px;
}

.user-stat-card .stat-actions {
  position: absolute;
  bottom: 15px;
  right: 20px;
}

.bill-section,
.notice-section {
  margin-bottom: 20px;
}

.bill-card .bill-header,
.notice-card .notice-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bill-card .bill-header .title,
.notice-card .notice-header .title {
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 500;
}

.bill-card .bill-header .title i,
.notice-card .notice-header .title i {
  margin-right: 8px;
  color: #409eff;
}

.bill-collapse {
  margin-top: 15px;
}

.bill-collapse .collapse-title {
  display: flex;
  align-items: center;
  color: #409eff;
  font-size: 14px;
}

.bill-collapse .collapse-title i {
  margin-right: 5px;
}

.notice-list .notice-item {
  padding: 14px;
  margin-bottom: 14px;
  background: #f8f9fa;
  border-radius: 4px;
  transition: all 0.3s;
  position: relative;
}

.notice-list .notice-item:hover {
  background: #f0f2f5;
  transform: translateY(-2px);
}

.today-notice {
  border-left: 4px solid #409eff;
  box-shadow: 0 1px 6px 0 rgba(64, 158, 255, 0.12);
}

.notice-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.notice-title {
  font-size: 14px;
  font-weight: 500;
  color: #303133;
  display: flex;
  align-items: center;
}

.notice-title i {
  margin-right: 6px;
  color: #409eff;
}

.notice-content {
  color: #606266;
  line-height: 1.5;
  margin: 10px 0;
  font-size: 13px;
}

.notice-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notice-time {
  color: #909399;
  font-size: 11px;
  display: flex;
  align-items: center;
}

.notice-time i {
  margin-right: 4px;
}

/* ========== INNER PAGES ========== */
.page-card {
  background: #fff;
  border-radius: 8px;
  padding: 16px 18px 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.page-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.page-toolbar .left {
  display: flex;
  gap: 10px;
  align-items: center;
}

.chat-wrap {
  display: flex;
  height: calc(100vh - 130px);
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.chat-list {
  width: 280px;
  border-right: 1px solid #ebeef5;
  display: flex;
  flex-direction: column;
}

.chat-list-hd {
  padding: 14px 16px;
  border-bottom: 1px solid #ebeef5;
  font-weight: 600;
  color: var(--primary-color);
}

.chat-item {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f5f5f5;
}

.chat-item.active,
.chat-item:hover {
  background: var(--primary-color-light);
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-meta {
  flex: 1;
  min-width: 0;
}

.chat-meta .name {
  font-size: 14px;
  font-weight: 500;
  color: #303133;
}

.chat-meta .last {
  font-size: 12px;
  color: #909399;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #f7f8fc;
}

.chat-main-hd {
  height: 52px;
  background: #fff;
  border-bottom: 1px solid #ebeef5;
  display: flex;
  align-items: center;
  padding: 0 18px;
  font-weight: 600;
}

.chat-msgs {
  flex: 1;
  padding: 18px;
  overflow: auto;
}

.msg-row {
  display: flex;
  margin-bottom: 14px;
}

.msg-row.me {
  justify-content: flex-end;
}

.msg-bubble {
  max-width: 60%;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff;
  color: #303133;
  font-size: 14px;
  line-height: 1.6;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.msg-row.me .msg-bubble {
  background: var(--primary-color);
  color: #fff;
}

.chat-input {
  background: #fff;
  border-top: 1px solid #ebeef5;
  padding: 12px 16px;
  display: flex;
  gap: 10px;
}
