/* 全局样式 - iOS风格 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 信息页面样式 */
.info-section {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  padding: 16px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

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

.info-item label {
  font-weight: 500;
  color: #6d6d70;
  min-width: 120px;
}

.info-item span {
  color: #1d1d1f;
  text-align: right;
  word-break: break-all;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f2f2f7;
  color: #1d1d1f;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: row;
  min-height: 100vh;
}

.container {
  padding: 10px;
}

/* 导航栏样式 */
.navbar {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 12px 0;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.navbar h1 {
  font-size: 24px;
  font-weight: 600;
  color: #1d1d1f;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  text-decoration: none;
  color: #007aff;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(0, 122, 255, 0.1);
  color: #007aff;
}

/* 卡片样式 */
.card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 14px 16px 16px 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.card h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #1d1d1f;
}

/* 筛选表单样式 */
.filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: flex-end;
  margin-bottom: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  min-width: 160px;
  max-width: 200px;
  flex: 1 1 120px;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: #6d6d70;
  margin-bottom: 4px;
}

.form-group input,
.form-group select {
  padding: 7px 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 0.2s ease;
  max-width: 200px;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #007aff;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* 按钮组自适应 */
.form-group > div {
  display: flex;
  gap: 12px;
}

/* 按钮样式 */
.btn {
  padding: 7px 14px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 80px;
  word-break: keep-all;
}

.btn-primary {
  background: #007aff;
  color: white;
}

.btn-primary:hover {
  background: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.btn-secondary {
  background: rgba(0, 0, 0, 0.05);
  color: #1d1d1f;
}

.btn-secondary:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.btn-danger {
  background: #ff3b30;
  color: white;
}

.btn-danger:hover {
  background: #d70015;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
}

/* 表格样式 */
.table-container {
  overflow-x: auto;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th {
  background: rgba(0, 0, 0, 0.02);
  padding: 8px 6px;
  text-align: left;
  font-weight: 600;
  color: #6d6d70;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 10;
}

td {
  padding: 8px 6px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  color: #1d1d1f;
}

tr:hover {
  background: rgba(0, 122, 255, 0.02);
}

/* 操作按钮 */
.action-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-right: 8px;
}

.edit-btn {
  background: #007aff;
  color: white;
}

.edit-btn:hover {
  background: #0056b3;
  transform: translateY(-1px);
}

.delete-btn {
  background: #ff3b30;
  color: white;
}

.delete-btn:hover {
  background: #d70015;
  transform: translateY(-1px);
}

/* 分页样式 - 优化布局 */
#pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.pagination-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pagination-center {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

#pagination button {
  padding: 8px 12px;
  margin: 0 2px;
  font-size: 14px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.8);
  color: #1d1d1f;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-weight: 500;
}

#pagination button:hover:not(:disabled) {
  background: rgba(0, 122, 255, 0.1);
  border-color: #007aff;
  transform: translateY(-1px);
}

#pagination button.current-page {
  background: #007aff;
  color: white;
  border-color: #007aff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

#pagination button.current-page:hover {
  background: #0056b3;
  border-color: #0056b3;
}

#pagination input[type="number"] {
  padding: 8px 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  width: 60px;
  text-align: center;
  background: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

#pagination input[type="number"]:focus {
  outline: none;
  border-color: #007aff;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

#pagination .goto-btn {
  background: #34c759;
  color: white;
  border-color: #34c759;
}

#pagination .goto-btn:hover {
  background: #28a745;
  border-color: #28a745;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(52, 199, 89, 0.3);
}

/* 页面大小选择器样式 */
.page-size-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #6d6d70;
}

.page-size-selector label {
  font-weight: 500;
}

.page-size-selector select {
  padding: 6px 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  cursor: pointer;
  min-width: 80px;
}

.page-size-selector select:focus {
  outline: none;
  border-color: #007aff;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* 数据统计信息 */
.data-info {
  font-size: 14px;
  color: #6d6d70;
  font-weight: 500;
}

/* 空数据状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #6d6d70;
}

.empty-state .icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state .title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #1d1d1f;
}

.empty-state .subtitle {
  font-size: 14px;
  color: #6d6d70;
}

/* 优化弹窗样式 - 居中、遮罩、卡片风格 */
.modal {
  display: flex;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  padding: 20px;
  box-sizing: border-box;
}
.modal > .container {
  background: rgba(255,255,255,0.98);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  padding: 0;
  min-width: 320px;
  max-width: calc(90vw - 40px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  max-height: calc(80vh - 40px);
  overflow-y: auto;
  margin: auto;
}
.modal .card {
  background: transparent;
  box-shadow: none;
  border: none;
  margin: 0;
  padding: 24px 28px 20px 28px;
  border-radius: 16px;
  position: relative;
}
.modal h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 18px;
  color: #1d1d1f;
  text-align: center;
}
.modal .form-group {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}
.modal .form-group label {
  min-width: 90px;
  font-size: 15px;
  color: #6d6d70;
  margin-bottom: 0;
  margin-right: 12px;
  text-align: left;
  flex-shrink: 0;
}
.modal .form-group div {
  flex: 1 1 auto;
  font-size: 16px;
  color: #1d1d1f;
  word-break: break-all;
  text-align: left;
}
.modal .form-group input,
.modal .form-group select {
  padding: 8px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  font-size: 16px;
  background: #f7f7fa;
  transition: border 0.2s;
}
.modal .form-group input:focus,
.modal .form-group select:focus {
  border-color: #007aff;
  outline: none;
}
.modal .form-actions {
  display: flex;
  gap: 14px;
  justify-content: flex-end;
  margin-top: 18px;
}

.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #e9ecef;
  color: #868e96;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
  z-index: 10;
}
.modal-close-btn:hover {
  background-color: #dee2e6;
}

@media (max-width: 600px) {
  .modal > .container {
    min-width: 0;
    width: 98vw;
    padding: 0;
  }
  .modal .card {
    padding: 16px 6vw 12px 6vw;
  }
}

/* 加载状态 */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #6d6d70;
}

.loading::after {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 122, 255, 0.3);
  border-top: 2px solid #007aff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 12px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .filter-form {
    gap: 8px 8px;
  }
  .form-group {
    min-width: 90px;
    max-width: 100%;
    flex: 1 1 90px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 4px;
  }
  
  .navbar .container {
    flex-direction: column;
    gap: 16px;
  }
  
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .filter-form {
    flex-direction: column;
    gap: 6px 0;
  }
  
  .form-group {
    min-width: 100%;
    max-width: 100%;
    flex: 1 1 100%;
  }
  
  .form-group > div {
    flex-direction: column;
    gap: 6px;
  }
  
  .btn {
    min-width: 0;
    width: 100%;
    margin-bottom: 4px;
    padding: 8px 0;
  }
  
  #pagination {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }
  
  .pagination-left,
  .pagination-center,
  .pagination-right {
    justify-content: center;
  }
  
  .table-container {
    font-size: 12px;
  }
  
  th, td {
    padding: 12px 8px;
  }
  
  .action-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
}
.modal .form-group{
  display: flex;
  flex-direction: row;
  max-width: 100%;
}
.modal .form-group label{
  text-align: right;
}
#permModal .form-group{
  flex-direction: column;
  align-items: flex-start;
}
/* 汉堡菜单 */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: #1d1d1f;
  margin: 3px 0;
  border-radius: 2px;
  transition: 0.3s;
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }
  
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    text-align: center;
  }
  
  .nav-links.active {
    display: flex;
  }
}

.manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

@media (max-width: 768px) {
  .manage-actions {
    flex-direction: column;
    gap: 6px;
  }
  .manage-actions .btn {
    width: 100%;
    min-width: 0;
  }
}

/* 侧边栏风格优化，收起时仅显示展开按钮 */
.sidebar {
  width: 200px;
  min-width: 60px;
  background: rgba(255,255,255,0.95);
  color: #1d1d1f;
  border-right: 1px solid #e0e0e0;
  box-shadow: 2px 0 8px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  transition: width 0.2s, background 0.2s;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
}
.sidebar.collapsed {
  width: 48px;
  min-width: 48px;
  background: rgba(255,255,255,0.95);
}
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 12px;
  font-size: 18px;
  font-weight: bold;
  background: transparent;
  color: #1d1d1f;
  border-bottom: 1px solid #e0e0e0;
  min-height: 48px;
}
.sidebar.collapsed .sidebar-header span {
  display: none;
}
#sidebar-toggle {
  background: none;
  border: none;
  color: #007aff;
  font-size: 22px;
  cursor: pointer;
  padding: 0 4px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: background 0.2s;
}
#sidebar-toggle:hover {
  background: #f2f2f7;
}
.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 0;
}
.sidebar.collapsed .sidebar-links {
  display: flex;
}
.sidebar-links a {
  color: #1d1d1f;
  text-decoration: none;
  padding: 10px 24px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s, transform 0.1s;
  font-size: 16px;
  margin: 0 8px;
  display: flex;
  align-items: center;
  position: relative;
}

.sidebar-links a .menu-icon {
  margin-right: 12px;
  font-size: 16px;
  min-width: 20px;
  text-align: center;
}

.sidebar-links a .menu-text {
  flex: 1;
}

.sidebar-links a.clicked {
  transform: scale(0.95);
  opacity: 0.8;
}

.sidebar.collapsed .sidebar-links a .menu-text {
  display: none;
}

.sidebar.collapsed .sidebar-links a .menu-icon {
  margin-right: 0;
  font-size: 18px;
  text-align: center;
}

.sidebar.collapsed .sidebar-links a {
  justify-content: center;
  padding: 10px 8px;
  margin: 0 4px;
  position: relative;
}

.sidebar.collapsed .sidebar-links a:hover::after {
  content: attr(title);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
  margin-left: 8px;
}
.sidebar-links a.active, .sidebar-links a:hover {
  background: #e6f0ff;
  color: #007aff;
}

.sidebar.collapsed .sidebar-links a:hover {
  background: #e6f0ff;
  color: #007aff;
  border-radius: 8px;
}
.main-content {
  margin-left: 200px;
  flex: 1 1 auto;
  transition: margin-left 0.2s;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.sidebar.collapsed ~ .main-content {
  margin-left: 48px;
}
@media (max-width: 600px) {
  .sidebar { position: absolute; height: 100%; }
  .main-content { margin-left: 48px; }
}

/* 修正 .container 使其不影响主布局 */
.main-content .container {
  padding: 10px;
}

/* 退出登录按钮吸底和自适应样式 */
.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.sidebar-logout-btn {
  width: 90%;
  margin: 16px auto 8px auto;
  display: block;
  transition: width 0.2s, padding 0.2s;
  text-align: center;
  font-size: 16px;
}
.sidebar.collapsed .sidebar-logout-btn {
  width: 36px;
  min-width: 36px;
  padding: 7px 0;
  font-size: 18px;
}
.sidebar.collapsed .sidebar-logout-btn .logout-text {
  display: none;
}
.sidebar.collapsed .sidebar-logout-btn::after {
  content: '退';
  display: inline-block;
  font-size: 18px;
}

/* 批量操作相关样式 */
.batch-actions {
    margin-top: 10px;
    padding: 10px;
    border-top: 1px solid #eee;
}

.batch-actions button {
    margin-right: 10px;
}

/* 复选框样式 */
.item-checkbox, #select-all {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* 模态框样式 */
.modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border-radius: 5px;
    width: 80%;
    max-width: 500px;
}

.modal-actions {
    margin-top: 20px;
    text-align: right;
}

.modal-actions button {
    margin-left: 10px;
}
#serverModal .modal-dialog {
  width: 400px;
}
#serverModal .modal-content {
  width: 100%;
}

/* 用户筛选下拉框样式 */
#filter-user {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 表格中的用户名列样式 */
#status-table td:nth-child(7) {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
} 