/* ========================================
   Admin Panel - ALE Review Robot
   Design System & Global Styles
   ======================================== */

/* CSS Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --theme-color: #409EFF;
  --sidebar-width: 210px;
  --sidebar-bg: #304156;
  --sidebar-menu-hover: #263445;
  --sidebar-text: #bfcbd9;
  --header-height: 50px;
  --tags-height: 34px;
  --bg-color: #f0f2f5;
  --text-primary: #303133;
  --text-regular: #606266;
  --text-secondary: #909399;
  --text-placeholder: #C0C4CC;
  --border-color-base: #DCDFE6;
  --border-color-light: #E4E7ED;
  --border-color-lighter: #EBEEF5;
  --border-color-extra-light: #F2F6FC;
  --success: #67C23A;
  --warning: #E6A23C;
  --danger: #F56C6C;
  --info: #909399;
  --font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
}

body {
  font-family: var(--font-family);
  font-size: 14px;
  color: var(--text-primary);
  background-color: var(--bg-color);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--theme-color);
  text-decoration: none;
}

/* ========== Layout ========== */
.app-wrapper {
  position: relative;
  height: 100vh;
  width: 100%;
  display: none; /* Hidden by default until Firebase auth validates */
  overflow: hidden;
}

/* ========== Sidebar ========== */
.sidebar-container {
  width: var(--sidebar-width);
  height: 100%;
  background-color: var(--sidebar-bg);
  transition: width 0.28s;
  overflow-y: auto;
  overflow-x: hidden;
  flex-shrink: 0;
  z-index: 1001;
}

.sidebar-container::-webkit-scrollbar {
  width: 6px;
}
.sidebar-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.sidebar-container.collapsed {
  width: 54px;
}

.sidebar-logo-container {
  height: 50px;
  line-height: 50px;
  background: #2b2f3a;
  text-align: center;
  overflow: hidden;
}

.sidebar-logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0 10px;
}

.sidebar-title {
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  margin-left: 10px;
  white-space: nowrap;
}

.el-menu {
  border: none;
  width: 100%;
  background-color: transparent;
}

.el-menu-item, .el-submenu__title {
  height: 56px;
  line-height: 56px;
  padding: 0 20px;
  color: var(--sidebar-text);
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  transition: all 0.3s;
}

.el-menu-item:hover, .el-submenu__title:hover {
  background-color: var(--sidebar-menu-hover);
}

.el-menu-item.is-active {
  color: var(--theme-color);
}

.menu-icon {
  width: 24px;
  text-align: center;
  font-size: 16px;
  margin-right: 16px;
}

.el-submenu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.el-submenu .el-menu {
  background-color: #1f2d3d;
  display: none;
}

.el-submenu.is-opened .el-menu {
  display: block;
}

.el-submenu .el-menu-item {
  padding-left: 48px;
}

.submenu-arrow {
  margin-left: auto;
  font-size: 12px;
  transition: transform 0.3s;
}

.el-submenu.is-opened .submenu-arrow {
  transform: rotate(180deg);
}

/* ========== Main Container ========== */
.main-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ========== Header ========== */
.navbar {
  height: var(--header-height);
  overflow: hidden;
  position: relative;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,21,41,.08);
  display: flex;
  align-items: center;
  padding: 0 15px;
  z-index: 1000;
}

.hamburger-container {
  padding: 0 15px;
  height: 100%;
  cursor: pointer;
  transition: background .3s;
  -webkit-tap-highlight-color:transparent;
  display: flex;
  align-items: center;
}

.hamburger-container:hover {
  background: rgba(0, 0, 0, .025)
}

.hamburger {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: transform 0.3s;
}

.sidebar-container.collapsed ~ .main-container .hamburger {
  transform: rotate(180deg);
}

.breadcrumb-container {
  font-size: 14px;
  line-height: 50px;
  margin-left: 8px;
}

.breadcrumb-container .no-redirect {
  color: #97a8be;
  cursor: text;
}

.right-menu {
  margin-left: auto;
  display: flex;
  align-items: center;
  height: 100%;
}

.right-menu-item {
  padding: 0 8px;
  height: 100%;
  font-size: 18px;
  color: #5a5e66;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: background .3s;
}

.right-menu-item:hover {
  background: rgba(0, 0, 0, .025)
}

.avatar-container {
  margin-left: 15px;
}

.avatar-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

/* ========== Tags View ========== */
.tags-view-container {
  height: var(--tags-height);
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #d8dce5;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 3px 0 rgba(0, 0, 0, .04);
  display: flex;
  align-items: center;
  padding: 0 15px;
}

.tags-view-item {
  display: inline-block;
  position: relative;
  cursor: pointer;
  height: 26px;
  line-height: 26px;
  border: 1px solid #d8dce5;
  color: #495060;
  background: #fff;
  padding: 0 8px;
  font-size: 12px;
  margin-left: 5px;
  margin-top: 4px;
}

.tags-view-item:first-of-type {
  margin-left: 0;
}

.tags-view-item.active {
  background-color: #42b983;
  color: #fff;
  border-color: #42b983;
}

.tags-view-item.active::before {
  content: '';
  background: #fff;
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  position: relative;
  margin-right: 2px;
}

.el-icon-close {
  width: 16px;
  height: 16px;
  vertical-align: 2px;
  border-radius: 50%;
  text-align: center;
  transition: all .3s cubic-bezier(.645, .045, .355, 1);
  transform-origin: 100% 50%;
}

.el-icon-close:before {
  transform: scale(.6);
  display: inline-block;
}

.el-icon-close:hover {
  background-color: #b4bccc;
  color: #fff;
}

/* ========== App Main ========== */
.app-main {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  position: relative;
}

/* ========== Dashboard / Cards ========== */
.el-row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -10px;
  margin-right: -10px;
}

.el-col {
  padding-left: 10px;
  padding-right: 10px;
  box-sizing: border-box;
}

.el-col-6 { width: 25%; }
.el-col-8 { width: 33.33333%; }
.el-col-12 { width: 50%; }
.el-col-24 { width: 100%; }

.el-card {
  border: 1px solid var(--border-color-lighter);
  background-color: #fff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
  color: var(--text-primary);
  margin-bottom: 20px;
}

.el-card__header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-color-lighter);
  box-sizing: border-box;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.el-card__body {
  padding: 20px;
}

/* Panel Group (Dashboard Top Cards) */
.panel-group {
  margin-top: 18px;
}

.card-panel {
  height: 108px;
  cursor: pointer;
  font-size: 12px;
  position: relative;
  overflow: hidden;
  color: #666;
  background: #fff;
  box-shadow: 4px 4px 40px rgba(0, 0, 0, .05);
  border-color: rgba(0, 0, 0, .05);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  margin-bottom: 32px;
}

.card-panel-icon-wrapper {
  padding: 16px;
  transition: all 0.38s ease-out;
  border-radius: 6px;
}

.card-panel-icon {
  font-size: 48px;
}

.card-panel-description {
  font-weight: bold;
  margin: 26px;
  margin-left: 0px;
  text-align: right;
}

.card-panel-text {
  line-height: 18px;
  color: rgba(0, 0, 0, 0.45);
  font-size: 16px;
  margin-bottom: 12px;
}

.card-panel-num {
  font-size: 20px;
}

.icon-people { color: #40c9c6; }
.icon-message { color: #36a3f7; }
.icon-money { color: #f4516c; }
.icon-shopping { color: #34bfa3; }

.card-panel:hover .card-panel-icon-wrapper.icon-people { background: #40c9c6; color: #fff; }
.card-panel:hover .card-panel-icon-wrapper.icon-message { background: #36a3f7; color: #fff; }
.card-panel:hover .card-panel-icon-wrapper.icon-money { background: #f4516c; color: #fff; }
.card-panel:hover .card-panel-icon-wrapper.icon-shopping { background: #34bfa3; color: #fff; }
.card-panel:hover .card-panel-icon { color: #fff; }

/* ========== Filter Container ========== */
.filter-container {
  padding-bottom: 10px;
}

.filter-item {
  display: inline-block;
  vertical-align: middle;
  margin-bottom: 10px;
  margin-right: 10px;
}

/* ========== Forms & Inputs ========== */
.el-input {
  position: relative;
  font-size: 14px;
  display: inline-block;
  width: 100%;
}

.el-input__inner {
  -webkit-appearance: none;
  background-color: #fff;
  background-image: none;
  border-radius: 4px;
  border: 1px solid var(--border-color-base);
  box-sizing: border-box;
  color: var(--text-regular);
  display: inline-block;
  font-size: inherit;
  height: 36px;
  line-height: 36px;
  outline: none;
  padding: 0 15px;
  transition: border-color .2s cubic-bezier(.645,.045,.355,1);
  width: 100%;
}

.el-input__inner:focus {
  border-color: var(--theme-color);
}

.el-input--medium .el-input__inner {
  height: 36px;
  line-height: 36px;
}

/* ========== Buttons ========== */
.el-button {
  display: inline-block;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  background: #fff;
  border: 1px solid var(--border-color-base);
  color: var(--text-regular);
  -webkit-appearance: none;
  text-align: center;
  box-sizing: border-box;
  outline: none;
  margin: 0;
  transition: .1s;
  font-weight: 500;
  padding: 10px 20px;
  font-size: 14px;
  border-radius: 4px;
}

.el-button:hover, .el-button:focus {
  color: var(--theme-color);
  border-color: #c6e2ff;
  background-color: #ecf5ff;
}

.el-button--primary {
  color: #fff;
  background-color: var(--theme-color);
  border-color: var(--theme-color);
}

.el-button--primary:hover, .el-button--primary:focus {
  background: #66b1ff;
  border-color: #66b1ff;
  color: #fff;
}

.el-button--success {
  color: #fff;
  background-color: var(--success);
  border-color: var(--success);
}

.el-button--danger {
  color: #fff;
  background-color: var(--danger);
  border-color: var(--danger);
}

.el-button--mini {
  padding: 7px 15px;
  font-size: 12px;
  border-radius: 3px;
}

/* ========== Tables ========== */
.el-table {
  position: relative;
  overflow-x: auto;
  box-sizing: border-box;
  flex: 1;
  width: 100%;
  max-width: 100%;
  background-color: #fff;
  font-size: 14px;
  color: var(--text-regular);
  border: 1px solid var(--border-color-lighter);
  border-bottom: none;
}

.el-table th, .el-table td {
  padding: 12px 0;
  min-width: 0;
  box-sizing: border-box;
  text-overflow: ellipsis;
  vertical-align: middle;
  position: relative;
  text-align: left;
  border-bottom: 1px solid var(--border-color-lighter);
}

.el-table th {
  background-color: #f5f7fa;
  color: var(--text-secondary);
  font-weight: bold;
}

.el-table .cell {
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  word-break: break-all;
  line-height: 23px;
  padding-left: 10px;
  padding-right: 10px;
}

.el-table tr:hover > td {
  background-color: #f5f7fa;
}

/* Pagination */
.pagination-container {
  background: #fff;
  padding: 16px;
  text-align: right;
  border: 1px solid var(--border-color-lighter);
  border-top: none;
}

.el-pagination {
  white-space: nowrap;
  padding: 2px 5px;
  color: var(--text-primary);
  font-weight: 700;
}

.el-pagination button, .el-pagination span:not([class*=suffix]) {
  display: inline-block;
  font-size: 13px;
  min-width: 35.5px;
  height: 28px;
  line-height: 28px;
  vertical-align: top;
  box-sizing: border-box;
}

.el-pagination .el-pager {
  user-select: none;
  list-style: none;
  display: inline-block;
  vertical-align: top;
  font-size: 0;
  padding: 0;
  margin: 0;
}

.el-pager li {
  padding: 0 4px;
  background: #fff;
  vertical-align: top;
  display: inline-block;
  font-size: 13px;
  min-width: 35.5px;
  height: 28px;
  line-height: 28px;
  cursor: pointer;
  box-sizing: border-box;
  text-align: center;
  margin: 0;
  color: var(--text-regular);
}

.el-pager li.active {
  color: var(--theme-color);
  cursor: default;
}

.el-pager li:hover {
  color: var(--theme-color);
}

/* Tags */
.el-tag {
  background-color: #ecf5ff;
  border-color: #d9ecff;
  display: inline-block;
  height: 32px;
  padding: 0 10px;
  line-height: 30px;
  font-size: 12px;
  color: var(--theme-color);
  border-width: 1px;
  border-style: solid;
  border-radius: 4px;
  box-sizing: border-box;
  white-space: nowrap;
}

.el-tag--success {
  background-color: #f0f9eb;
  border-color: #e1f3d8;
  color: var(--success);
}

.el-tag--info {
  background-color: #f4f4f5;
  border-color: #e9e9eb;
  color: var(--info);
}

.el-tag--warning {
  background-color: #fdf6ec;
  border-color: #faecd8;
  color: var(--warning);
}

.el-tag--danger {
  background-color: #fef0f0;
  border-color: #fde2e2;
  color: var(--danger);
}

/* Dialog */
.el-dialog__wrapper {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: auto;
  margin: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.5);
  display: none;
}

.el-dialog__wrapper.is-visible {
  display: block;
}

.el-dialog {
  position: relative;
  margin: 15vh auto 50px;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
  box-sizing: border-box;
  width: 50%;
}

.el-dialog__header {
  padding: 20px 20px 10px;
}

.el-dialog__title {
  line-height: 24px;
  font-size: 18px;
  color: var(--text-primary);
}

.el-dialog__body {
  padding: 30px 20px;
  color: var(--text-regular);
  font-size: 14px;
  word-break: break-all;
}

.el-dialog__footer {
  padding: 10px 20px 20px;
  text-align: right;
  box-sizing: border-box;
}

/* El Form */
.el-form-item {
  margin-bottom: 22px;
}

.el-form-item__label {
  text-align: right;
  vertical-align: middle;
  float: left;
  font-size: 14px;
  color: var(--text-regular);
  line-height: 40px;
  padding: 0 12px 0 0;
  box-sizing: border-box;
}

.el-form-item__content {
  line-height: 40px;
  position: relative;
  font-size: 14px;
}

.el-form-item__content::before, .el-form-item__content::after {
  display: table;
  content: "";
}

.el-form-item__content::after {
  clear: both;
}

.el-switch {
  display: inline-flex;
  align-items: center;
  position: relative;
  font-size: 14px;
  line-height: 20px;
  height: 20px;
  vertical-align: middle;
}

.el-switch__core {
  margin: 0;
  display: inline-block;
  position: relative;
  width: 40px;
  height: 20px;
  border: 1px solid #dcdfe6;
  outline: none;
  border-radius: 10px;
  box-sizing: border-box;
  background: #dcdfe6;
  cursor: pointer;
  transition: border-color .3s,background-color .3s;
  vertical-align: middle;
}

.el-switch__core:after {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  border-radius: 100%;
  transition: all .3s;
  width: 16px;
  height: 16px;
  background-color: #fff;
}

.el-switch.is-checked .el-switch__core {
  border-color: #13ce66;
  background-color: #13ce66;
}

.el-switch.is-checked .el-switch__core::after {
  left: 100%;
  margin-left: -17px;
}


/* Custom Admin Complex Table Styles */
.complex-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
  align-items: center;
}
.complex-filter .el-form-item {
  display: flex;
  align-items: center;
  margin-bottom: 0;
}
.complex-filter .el-form-item__label {
  font-weight: 700;
  width: auto;
  white-space: nowrap;
}
.complex-filter .el-input__inner {
  width: 150px;
}
.complex-filter .long-input {
  width: 250px;
}

.table-cell-multi {
  font-size: 13px;
  line-height: 22px;
}
.text-primary { color: #409EFF; }
.text-success { color: #67C23A; }
.text-danger { color: #F56C6C; }
.text-warning { color: #E6A23C; }
.text-purple { color: #9c27b0; }
.text-gray { color: #909399; }

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.btn-row {
  display: flex;
  gap: 6px;
  justify-content: center;
}
.el-button--outline-warning { color: #E6A23C; border-color: #fbc4c4; background: #fdf6ec; border-radius: 4px; border: 1px solid #fbc4c4;}
.el-button--outline-success { color: #67C23A; border-color: #c2e7b0; background: #f0f9eb; border-radius: 4px; border: 1px solid #c2e7b0;}
.el-button--outline-danger { color: #F56C6C; border-color: #fbc4c4; background: #fef0f0; border-radius: 4px; border: 1px solid #fbc4c4;}
.el-button--outline-primary { color: #409EFF; border-color: #b3d8ff; background: #ecf5ff; border-radius: 4px; border: 1px solid #b3d8ff;}
.el-button--outline-info { color: #909399; border-color: #d3d4d6; background: #f4f4f5; border-radius: 4px; border: 1px solid #d3d4d6;}
.el-button--solid-blue { background: #409EFF; color: #fff; border: none; }
.el-button--solid-blue:hover { background: #66b1ff; }

.operate-col {
  width: 200px;
}

