/* 企业人脉活动管理系统 - Admin 样式 (仿 laravel-admin / AdminLTE) */
:root {
  --sidebar-bg: #222d32;
  --sidebar-dark: #1a2226;
  --sidebar-hover: #1e282c;
  --sidebar-active: #1e282c;
  --sidebar-text: #b8c7ce;
  --sidebar-active-text: #fff;
  --header-bg: #3c8dbc;
  --header-dark: #367fa9;
  --primary: #3c8dbc;
  --success: #00a65a;
  --info: #00c0ef;
  --warning: #f39c12;
  --danger: #dd4b39;
  --body-bg: #ecf0f5;
  --border: #d2d6de;
  --text: #333;
  --muted: #777;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; padding: 0; }
body {
  font-family: "Source Sans Pro", "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--body-bg);
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: #72afd2; }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; }

/* ========== Login ========== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #dce6f0 0%, #e8eef5 45%, #f5f7fa 100%);
}
.login-box {
  width: 360px;
  background: #fff;
  border-top: 3px solid var(--primary);
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  padding: 20px;
}
.login-logo {
  text-align: center;
  margin-bottom: 18px;
}
.login-logo h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: #444;
  letter-spacing: .5px;
}
.login-logo p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 15px;
}
.login-box .form-group { margin-bottom: 14px; position: relative; }
.login-box .form-control {
  width: 100%;
  height: 40px;
  padding: 8px 36px 8px 12px;
  border: 1px solid var(--border);
  border-radius: 0;
  font-size: 14px;
  outline: none;
}
.login-box .form-control:focus { border-color: #3c8dbc; }
.login-box .input-icon {
  position: absolute;
  right: 12px;
  top: 11px;
  color: #777;
  font-size: 16px;
}
.login-box .remember {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0 16px;
  color: #555;
  font-size: 13px;
}
.btn-login {
  display: block;
  width: 100%;
  height: 40px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  border-radius: 3px;
}
.btn-login:hover { background: var(--header-dark); }
.login-tip {
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  color: #999;
}

/* ========== Layout ========== */
.wrapper { min-height: 100vh; }
.main-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 50px;
  background: var(--header-bg);
  z-index: 1030;
  display: flex;
  align-items: center;
  color: #fff;
}
.main-header .logo {
  width: 230px;
  height: 50px;
  background: var(--header-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 10px;
  flex-shrink: 0;
}
.main-header .navbar {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  height: 50px;
}
.sidebar-toggle {
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  padding: 6px 10px;
}
.navbar-custom-menu {
  display: flex;
  align-items: center;
  gap: 12px;
}
.navbar-custom-menu .nav-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
  opacity: .9;
}
.navbar-custom-menu .nav-btn:hover { opacity: 1; }
.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  position: relative;
}
.user-menu img {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #fff;
  object-fit: cover;
}
.user-dropdown {
  display: none;
  position: absolute;
  top: 42px; right: 0;
  width: 260px;
  background: #fff;
  color: #333;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
  border-radius: 2px;
  z-index: 1100;
  overflow: hidden;
}
.user-menu.open .user-dropdown { display: block; }
.user-dropdown .ud-header {
  background: #3c8dbc;
  color: #fff;
  padding: 16px;
  text-align: center;
}
.user-dropdown .ud-header img {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4);
  margin-bottom: 8px;
}
.user-dropdown .ud-meta {
  padding: 10px 14px;
  font-size: 12px;
  color: #777;
  border-bottom: 1px solid #eee;
}
.user-dropdown .ud-actions {
  display: flex;
  justify-content: space-between;
  padding: 10px;
}
.user-dropdown .ud-actions a,
.user-dropdown .ud-actions button {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 2px;
  border: 1px solid #ddd;
  background: #f4f4f4;
  color: #444;
  cursor: pointer;
}
.user-dropdown .ud-actions .btn-exit {
  background: #dd4b39;
  border-color: #d73925;
  color: #fff;
}

/* Sidebar */
.main-sidebar {
  position: fixed;
  top: 50px; left: 0; bottom: 0;
  width: 230px;
  background: var(--sidebar-bg);
  overflow-y: auto;
  z-index: 1000;
  transition: margin-left .2s;
}
.user-panel {
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #1a2226;
}
.user-panel img {
  width: 45px; height: 45px;
  border-radius: 50%;
  background: #fff;
}
.user-panel .info { color: #fff; font-size: 13px; line-height: 1.5; }
.user-panel .info .status { color: #3c763d; font-size: 12px; }
.user-panel .info .status::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  background: #3c763d;
  border-radius: 50%;
  margin-right: 4px;
}
.sidebar-form {
  padding: 10px;
}
.sidebar-form input {
  width: 100%;
  height: 32px;
  border: 1px solid #374850;
  background: #374850;
  color: #fff;
  padding: 0 10px;
  border-radius: 2px;
  outline: none;
}
.sidebar-form input::placeholder { color: #aaa; }
.sidebar-menu > li > a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  color: var(--sidebar-text);
  border-left: 3px solid transparent;
}
.sidebar-menu > li > a:hover,
.sidebar-menu > li.active > a,
.sidebar-menu > li.menu-open > a {
  background: var(--sidebar-hover);
  color: #fff;
  border-left-color: var(--primary);
}
.sidebar-menu > li > a .fa { width: 18px; text-align: center; }
.sidebar-menu > li > a .pull-right-container {
  margin-left: auto;
  font-size: 12px;
  transition: transform .2s;
}
.sidebar-menu > li.menu-open > a .pull-right-container { transform: rotate(-90deg); }
.treeview-menu {
  display: none;
  background: var(--sidebar-dark);
}
.sidebar-menu > li.menu-open > .treeview-menu { display: block; }
.treeview-menu > li > a {
  display: block;
  padding: 10px 5px 10px 35px;
  color: var(--sidebar-text);
  font-size: 13px;
}
.treeview-menu > li > a:hover,
.treeview-menu > li.active > a {
  color: #fff;
  background: rgba(0,0,0,.15);
}
.treeview-menu > li > a::before {
  content: "•";
  margin-right: 8px;
  color: #4b646f;
}

/* Content */
.content-wrapper {
  margin-left: 230px;
  margin-top: 50px;
  min-height: calc(100vh - 50px);
  padding-bottom: 50px;
  transition: margin-left .2s;
}
.content-header {
  padding: 15px 15px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.content-header h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
}
.content-header h1 small {
  font-size: 14px;
  color: #777;
  margin-left: 8px;
  font-weight: 400;
}
.breadcrumb {
  display: flex;
  gap: 6px;
  font-size: 12px;
  color: #777;
  background: transparent;
  padding: 0;
  margin: 4px 0 0;
}
.breadcrumb a { color: var(--primary); }
.breadcrumb span { color: #777; }
.content { padding: 15px; }

.box {
  background: #fff;
  border-top: 3px solid var(--primary);
  box-shadow: 0 1px 1px rgba(0,0,0,.1);
  margin-bottom: 20px;
}
.box.box-success { border-top-color: var(--success); }
.box.box-warning { border-top-color: var(--warning); }
.box.box-danger { border-top-color: var(--danger); }
.box.box-info { border-top-color: var(--info); }
.box-header {
  padding: 12px 15px;
  border-bottom: 1px solid #f4f4f4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.box-title { font-size: 16px; font-weight: 500; margin: 0; }
.box-tools { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.box-body { padding: 15px; }
.box-footer {
  padding: 12px 15px;
  border-top: 1px solid #f4f4f4;
  background: #fff;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 13px;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  background: #f4f4f4;
  color: #444;
  line-height: 1.4;
  white-space: nowrap;
}
.btn:hover { opacity: .92; }
.btn-primary { background: var(--primary); border-color: #367fa9; color: #fff; }
.btn-success { background: var(--success); border-color: #008d4c; color: #fff; }
.btn-info { background: var(--info); border-color: #00acd6; color: #fff; }
.btn-warning { background: var(--warning); border-color: #e08e0b; color: #fff; }
.btn-danger { background: var(--danger); border-color: #d73925; color: #fff; }
.btn-default { background: #f4f4f4; border-color: #ddd; color: #444; }
.btn-sm { padding: 4px 8px; font-size: 12px; }
.btn-xs { padding: 2px 6px; font-size: 11px; }
.btn-block { display: flex; width: 100%; justify-content: center; }

/* Table */
.table-responsive { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
.table th, .table td {
  padding: 10px 12px;
  border: 1px solid #f4f4f4;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}
.table thead th {
  background: #fafafa;
  font-weight: 600;
  border-bottom: 2px solid #eee;
}
.table tbody tr:hover { background: #f9f9f9; }
.table .actions { display: flex; gap: 4px; }
.table .avatar {
  width: 36px; height: 36px;
  border-radius: 4px;
  object-fit: cover;
  background: #eee;
}
.thumb {
  width: 80px; height: 40px;
  object-fit: cover;
  border-radius: 2px;
  background: #eee;
}

/* Form */
.form-horizontal .form-group {
  display: flex;
  margin-bottom: 15px;
  align-items: flex-start;
}
.form-horizontal .control-label {
  width: 120px;
  padding-top: 7px;
  text-align: right;
  padding-right: 15px;
  flex-shrink: 0;
  color: #555;
}
.form-horizontal .control-label .required { color: #dd4b39; margin-right: 2px; }
.form-horizontal .col-sm {
  flex: 1;
  max-width: 560px;
}
.form-control {
  width: 100%;
  height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 0;
  font-size: 14px;
  outline: none;
  background: #fff;
}
.form-control:focus { border-color: #3c8dbc; }
textarea.form-control { height: auto; min-height: 90px; resize: vertical; }
select.form-control { appearance: auto; }
.help-block { font-size: 12px; color: #999; margin-top: 4px; }
.radio-inline, .checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 16px;
  margin-top: 7px;
}
.form-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding-top: 10px;
}
.form-check-opts {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 10px;
  font-size: 13px;
  color: #666;
}

/* Labels / Badges */
.label {
  display: inline-block;
  padding: 3px 7px;
  font-size: 11px;
  border-radius: 2px;
  color: #fff;
  line-height: 1.2;
}
.label-primary { background: var(--primary); }
.label-success { background: var(--success); }
.label-info { background: var(--info); }
.label-warning { background: var(--warning); }
.label-danger { background: var(--danger); }
.label-default { background: #d2d6de; color: #444; }
.method-tag {
  display: inline-block;
  padding: 2px 6px;
  font-size: 11px;
  border-radius: 2px;
  color: #fff;
  margin-right: 4px;
  font-weight: 600;
}
.method-ANY { background: #00a65a; }
.method-GET { background: #3c8dbc; }
.method-POST { background: #f39c12; }
.method-PUT { background: #00c0ef; }
.method-DELETE { background: #dd4b39; }

/* Grid */
.row { display: flex; flex-wrap: wrap; margin: 0 -10px; }
.col-4 { width: 33.333%; padding: 0 10px; }
.col-6 { width: 50%; padding: 0 10px; }
.col-8 { width: 66.666%; padding: 0 10px; }
.col-12 { width: 100%; padding: 0 10px; }

.info-table { width: 100%; }
.info-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f4f4f4;
}
.info-table td:first-child {
  width: 40%;
  color: #777;
  background: #fafafa;
}

.ext-list li {
  padding: 8px 0;
  border-bottom: 1px solid #f4f4f4;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ext-list li i { color: var(--primary); width: 18px; }

.dep-list li {
  padding: 6px 0;
  border-bottom: 1px solid #f4f4f4;
  display: flex;
  justify-content: space-between;
}
.dep-list .ver {
  background: #3c8dbc;
  color: #fff;
  padding: 1px 6px;
  border-radius: 2px;
  font-size: 11px;
}

/* Pagination */
.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: #666;
}
.pagination {
  display: flex;
  gap: 2px;
}
.pagination a, .pagination span {
  display: inline-block;
  padding: 5px 10px;
  border: 1px solid #ddd;
  background: #fff;
  color: #337ab7;
  min-width: 32px;
  text-align: center;
}
.pagination .active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.pagination a:hover { background: #eee; }

/* Menu tree */
.menu-layout { display: flex; gap: 16px; }
.menu-tree-panel, .menu-form-panel { flex: 1; }
.menu-tree {
  border: 1px solid #eee;
  padding: 10px;
  min-height: 360px;
  background: #fafafa;
}
.menu-tree li {
  padding: 6px 8px;
  margin: 2px 0;
  background: #fff;
  border: 1px solid #eee;
  cursor: move;
  display: flex;
  align-items: center;
  gap: 8px;
}
.menu-tree li .path { color: #999; font-size: 12px; margin-left: auto; }
.menu-tree ul { margin-left: 20px; margin-top: 4px; }

/* Dual listbox */
.dual-list {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.dual-list select {
  width: 100%;
  height: 180px;
  border: 1px solid var(--border);
  padding: 4px;
}
.dual-list .mid {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

/* Upload */
.upload-box {
  border: 1px dashed #ccc;
  padding: 12px;
  text-align: center;
  background: #fafafa;
  max-width: 320px;
}
.upload-box img {
  max-height: 120px;
  margin-bottom: 8px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Editor mock */
.editor-toolbar {
  border: 1px solid var(--border);
  border-bottom: none;
  padding: 6px 8px;
  background: #f7f7f7;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.editor-toolbar button {
  border: 1px solid #ddd;
  background: #fff;
  padding: 3px 8px;
  font-size: 12px;
  cursor: pointer;
}
.editor-area {
  border: 1px solid var(--border);
  min-height: 200px;
  padding: 12px;
  background: #fff;
}

/* Form builder */
.builder {
  display: flex;
  gap: 16px;
  min-height: 420px;
}
.builder-widgets {
  width: 200px;
  border: 1px solid #eee;
  background: #fafafa;
  padding: 10px;
}
.builder-widgets h4 { margin: 0 0 10px; font-size: 14px; }
.widget-item {
  padding: 8px 10px;
  margin-bottom: 6px;
  background: #fff;
  border: 1px solid #ddd;
  cursor: grab;
  font-size: 13px;
}
.builder-canvas {
  flex: 1;
  border: 1px dashed #bbb;
  background: #fff;
  padding: 16px;
  min-height: 400px;
}
.builder-canvas .field-preview {
  border: 1px solid #e5e5e5;
  padding: 12px;
  margin-bottom: 10px;
  background: #fafafa;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.builder-props {
  width: 240px;
  border: 1px solid #eee;
  padding: 10px;
  background: #fafafa;
}

/* Filter panel */
.filter-panel {
  display: none;
  background: #f9f9f9;
  border: 1px solid #eee;
  padding: 12px;
  margin-bottom: 12px;
}
.filter-panel.show { display: block; }
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}
.filter-item label {
  display: block;
  font-size: 12px;
  color: #777;
  margin-bottom: 4px;
}
.filter-item .form-control { width: 160px; }

/* Page panels */
.page { display: none; }
.page.active { display: block; }

/* Footer */
.main-footer {
  margin-left: 230px;
  padding: 12px 15px;
  background: #fff;
  border-top: 1px solid #d2d6de;
  color: #555;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  transition: margin-left .2s;
}

/* Collapsed */
body.sidebar-collapse .main-sidebar { margin-left: -230px; }
body.sidebar-collapse .content-wrapper,
body.sidebar-collapse .main-footer { margin-left: 0; }
body.sidebar-collapse .main-header .logo { width: 0; padding: 0; overflow: hidden; }

/* Modal */
.modal-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff;
  width: 520px;
  max-width: 92vw;
  max-height: 85vh;
  overflow: auto;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
}
.modal-header {
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f7f7f7;
}
.modal-header h3 { margin: 0; font-size: 16px; }
.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #999;
}
.modal-body { padding: 16px; }
.modal-footer {
  padding: 12px 16px;
  border-top: 1px solid #eee;
  text-align: right;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.toast {
  position: fixed;
  top: 70px;
  right: 20px;
  background: #00a65a;
  color: #fff;
  padding: 10px 18px;
  border-radius: 3px;
  z-index: 3000;
  display: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.toast.show { display: block; }

.stat-cards { display: flex; gap: 15px; margin-bottom: 20px; flex-wrap: wrap; }
.stat-card {
  flex: 1;
  min-width: 180px;
  background: #fff;
  border-radius: 2px;
  padding: 16px;
  box-shadow: 0 1px 1px rgba(0,0,0,.1);
  border-left: 4px solid var(--primary);
}
.stat-card.green { border-left-color: var(--success); }
.stat-card.yellow { border-left-color: var(--warning); }
.stat-card.red { border-left-color: var(--danger); }
.stat-card .num { font-size: 28px; font-weight: 600; margin: 4px 0; }
.stat-card .label { color: #777; font-size: 13px; }

.poster-preview {
  max-width: 280px;
  border: 1px solid #ddd;
  padding: 8px;
  background: #fff;
  text-align: center;
}
.poster-preview .mock-poster {
  height: 400px;
  background: linear-gradient(180deg, #1a4a8a 0%, #2a6bb5 50%, #3c8dbc 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
}
.poster-preview .mock-qr {
  width: 100px; height: 100px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  font-size: 12px;
}

@media (max-width: 992px) {
  .col-4, .col-6, .col-8 { width: 100%; }
  .menu-layout, .builder, .dual-list { flex-direction: column; }
  .builder-widgets, .builder-props { width: 100%; }
  .form-horizontal .form-group { flex-direction: column; }
  .form-horizontal .control-label { width: 100%; text-align: left; padding-bottom: 4px; }
  .main-sidebar { margin-left: -230px; }
  body.sidebar-open .main-sidebar { margin-left: 0; }
  .content-wrapper, .main-footer { margin-left: 0; }
  .main-header .logo { width: 0; padding: 0; overflow: hidden; }
}
