/* ===== Admin Layout - vue3-element-admin style ===== */
/* 基础重置 - 使用较低优先级，不覆盖 Tailwind 工具类 */
*,*::before,*::after{box-sizing:border-box;}
ul,ol{list-style:none;margin:0;padding:0;}
:root{
  --primary:#E8751A;
  --primary-dark:#C96012;
  --primary-light:#F5A623;
  --primary-bg:rgba(232,117,26,.08);
  --blue:#1A3550;
  --white:#fff;
  --bg:#f0f2f5;
  --card:#fff;
  --text:#303133;
  --text-regular:#606266;
  --text-secondary:#909399;
  --text-placeholder:#c0c4cc;
  --border:#e4e7ed;
  --border-light:#ebeef5;
  --success:#67c23a;
  --warning:#e6a23c;
  --danger:#f56c6c;
  --info:#909399;
  --sidebar-bg:#1d1e1f;
  --sidebar-text:rgba(255,255,255,.65);
  --sidebar-active-bg:var(--primary);
  --sidebar-width:210px;
  --header-height:50px;
  --font-cn:"Source Han Sans SC","Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif;
  --font-en:"Roboto",sans-serif;
  --radius:4px;
  --shadow:0 2px 12px rgba(0,0,0,.06);
}
html{font-size:14px;}
body{font-family:var(--font-cn);color:var(--text);background:var(--bg);min-height:100vh;}
a{text-decoration:none;color:inherit;}
img{max-width:100%;display:block;}

/* ===== Layout ===== */
.admin-layout{display:flex;min-height:100vh;}

/* ===== Sidebar ===== */
.sidebar{
  width:var(--sidebar-width);background:var(--sidebar-bg);
  position:fixed;top:0;left:0;bottom:0;z-index:100;
  display:flex;flex-direction:column;transition:.3s;overflow:hidden;
}
.sidebar-logo{
  height:var(--header-height);display:flex;align-items:center;
  padding:0 16px;border-bottom:1px solid rgba(255,255,255,.08);gap:10px;flex-shrink:0;
  background:var(--white);
}
.sidebar-logo img{height:36px;width:auto;}
.sidebar-logo svg{width:28px;height:28px;color:var(--primary);flex-shrink:0;}
.sidebar-logo span{font-size:14px;font-weight:600;color:#333;white-space:nowrap;overflow:hidden;}

.sidebar-menu{flex:1;overflow-y:auto;padding:6px 0;}
.sidebar-menu::-webkit-scrollbar{width:0;}

.menu-group{margin-bottom:2px;}
.menu-group-title{
  padding:20px 16px 6px;font-size:11px;color:rgba(255,255,255,.3);
  text-transform:uppercase;letter-spacing:1px;font-weight:500;
}
.menu-item{
  display:flex;align-items:center;gap:10px;padding:0 16px;height:42px;
  color:var(--sidebar-text);cursor:pointer;transition:.15s;position:relative;
  font-size:13px;border-radius:0;
}
.menu-item:hover{color:rgba(255,255,255,.9);background:rgba(255,255,255,.06);}
.menu-item.active{color:var(--white);background:var(--primary);}
.menu-item svg{width:18px;height:18px;flex-shrink:0;opacity:1;}
.menu-item.active svg{opacity:1;}
.menu-item span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}

/* 子菜单 */
.submenu-items{display:none;overflow:hidden;}
.menu-parent.open .submenu-items{display:block;}
.menu-parent>.menu-item .arrow{
  margin-left:auto;transition:.2s;opacity:.9;display:flex;align-items:center;
}
.menu-parent>.menu-item .arrow svg{width:12px;height:12px;}
.menu-parent.open>.menu-item .arrow{transform:rotate(180deg);}
.submenu-items .menu-item{padding-left:46px;height:38px;font-size:12.5px;}

/* ===== Main Area ===== */
.main-area{flex:1;margin-left:var(--sidebar-width);display:flex;flex-direction:column;height:100vh;min-width:0;overflow-x:hidden;overflow-y:auto;}

/* ===== Top Header ===== */
.top-header{
  height:var(--header-height);background:var(--white);
  border-bottom:1px solid var(--border-light);display:flex;
  align-items:center;justify-content:space-between;padding:0 20px;
  position:sticky;top:0;z-index:90;
}
.header-left{display:flex;align-items:center;gap:16px;}
.breadcrumb{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--text-secondary);}
.breadcrumb a{color:var(--text-secondary);transition:.15s;}
.breadcrumb a:hover{color:var(--primary);}
.breadcrumb .sep{color:var(--text-placeholder);}
.breadcrumb .current{color:var(--text);}

.header-right{display:flex;align-items:center;gap:16px;}
.header-btn{
  width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  cursor:pointer;transition:.15s;color:var(--text-secondary);background:none;border:none;
}
.header-btn:hover{background:var(--bg);color:var(--text);}
.header-btn svg{width:18px;height:18px;}
.header-avatar{
  display:flex;align-items:center;gap:8px;cursor:pointer;padding:4px 8px;
  border-radius:var(--radius);transition:.15s;
}
.header-avatar:hover{background:var(--bg);}
.header-avatar img{width:30px;height:30px;border-radius:50%;background:var(--border);}
.avatar-placeholder{
  width:30px;height:30px;border-radius:50%;background:var(--primary);
  color:var(--white);display:flex;align-items:center;justify-content:center;
  font-size:12px;font-weight:600;
}
.header-avatar span{font-size:13px;color:var(--text-regular);}

/* User Dropdown */
.header-user{position:relative;}
.user-dropdown-menu{
  position:absolute;top:100%;right:0;margin-top:6px;
  min-width:160px;background:#fff;border-radius:var(--radius);
  box-shadow:0 6px 24px rgba(0,0,0,.12);border:1px solid var(--border-light);
  opacity:0;visibility:hidden;transform:translateY(-4px);transition:.2s;
  z-index:100;padding:6px 0;
}
.header-user.open .user-dropdown-menu{opacity:1;visibility:visible;transform:translateY(0);}
.dropdown-item{
  display:flex;align-items:center;gap:8px;padding:8px 16px;
  font-size:13px;color:var(--text-regular);transition:.15s;cursor:pointer;text-decoration:none;
}
.dropdown-item:hover{background:var(--bg);color:var(--text);}
.dropdown-item-danger{color:var(--danger);}
.dropdown-item-danger:hover{background:rgba(245,108,108,.06);color:var(--danger);}
.dropdown-divider{height:1px;background:var(--border-light);margin:4px 0;}

/* ===== Content ===== */
.page-content{flex:1;padding:20px;overflow-x:auto;}

/* ===== Tags View ===== */
.tags-view{
  display:flex;align-items:center;gap:6px;padding:6px 20px;
  background:var(--white);border-bottom:1px solid var(--border-light);
  overflow-x:auto;flex-shrink:0;
}
.tags-view::-webkit-scrollbar{height:0;}
.tag-item{
  display:flex;align-items:center;gap:4px;padding:4px 12px;
  border-radius:3px;font-size:12px;cursor:pointer;white-space:nowrap;
  border:1px solid var(--border);color:var(--text-secondary);transition:.15s;
  background:var(--white);
}
.tag-item:hover{color:var(--primary);border-color:var(--primary);}
.tag-item.active{background:var(--primary);color:var(--white);border-color:var(--primary);}
.tag-item .tag-close{
  font-size:10px;margin-left:2px;opacity:.6;transition:.15s;
  width:14px;height:14px;display:flex;align-items:center;justify-content:center;
  border-radius:50%;
}
.tag-item .tag-close:hover{opacity:1;background:rgba(0,0,0,.1);}
.tag-item.active .tag-close:hover{background:rgba(255,255,255,.3);}

/* ===== Common Components ===== */
.card{background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow);padding:20px;}
.card-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;}
.card-title{font-size:15px;font-weight:600;color:var(--text);}

/* Table - 仅保留颜色 */
.el-table{width:100%;border-collapse:collapse;font-size:13px;}
.el-table thead{background:#fafafa;}
.el-table th{padding:10px 12px;text-align:left;font-weight:600;color:var(--text-regular);border-bottom:2px solid var(--border-light);font-size:12px;}
.el-table td{padding:10px 12px;border-bottom:1px solid var(--border-light);color:var(--text-regular);}
.el-table tbody tr:hover td{background:#fafafa;}

/* Buttons - 仅保留颜色 */
.el-btn{color:var(--text-regular);cursor:pointer;}
.el-btn:hover{color:var(--primary);}
.el-btn-primary{background:var(--primary);color:var(--white);}
.el-btn-primary:hover{background:var(--primary-dark);color:var(--white);}
.el-btn-success{background:var(--success);color:var(--white);}
.el-btn-danger{background:var(--danger);color:var(--white);}
.el-btn-text{color:var(--primary);cursor:pointer;}
.el-btn-text:hover{color:var(--primary-dark);}

/* Badge / Tag - 仅保留颜色 */
.el-tag-success{background:#f0f9eb;color:var(--success);}
.el-tag-warning{background:#fdf6ec;color:var(--warning);}
.el-tag-danger{background:#fef0f0;color:var(--danger);}
.el-tag-info{background:#f4f4f5;color:var(--info);}
.el-tag-primary{background:var(--primary-bg);color:var(--primary);}

/* Pagination */
.pagination{display:flex;align-items:center;justify-content:flex-end;gap:4px;margin-top:16px;font-size:13px;}
.pagination .page-info{color:var(--text-secondary);margin-right:8px;}
.page-btn{
  min-width:30px;height:30px;display:flex;align-items:center;justify-content:center;
  border:1px solid var(--border);border-radius:var(--radius);cursor:pointer;
  background:var(--white);color:var(--text-regular);font-size:13px;transition:.15s;
  padding:0 6px;
}
.page-btn:hover{color:var(--primary);border-color:var(--primary);}
.page-btn.active{background:var(--primary);color:var(--white);border-color:var(--primary);}
.page-btn.disabled{color:var(--text-placeholder);cursor:not-allowed;}

/* Form inputs - 仅保留颜色 */
.el-input:focus{border-color:var(--primary);}
.el-input::placeholder{color:var(--text-placeholder);}

/* Search bar */
.filter-bar{display:flex;align-items:center;gap:10px;margin-bottom:16px;flex-wrap:wrap;}
.filter-bar label{font-size:13px;color:var(--text-secondary);white-space:nowrap;}

/* ===== 页面标题栏（通用） ===== */
.page-title-bar{display:flex;align-items:center;gap:12px;margin-bottom:16px;}
.page-title-text{font-size:16px;font-weight:600;color:var(--text);}

/* WangEditor 编辑区域最大高度限制 */
.w-e-text-container .w-e-scroll { max-height: 80vh; }

/* 日期范围选择器宽度覆盖 */
.el-date-editor--daterange.el-input__wrapper { width: 220px !important; max-width: 220px !important; }
