:root {
  --admin-primary: #C41E24;
  --admin-primary-dark: #A8181F;
  --admin-gold: #C9A94E;
  --admin-bg: #F5F6FA;
  --admin-sidebar-bg: #2C1810;
  --admin-sidebar-hover: #3D2B1F;
  --admin-text: #2C1810;
  --admin-text-muted: #7A6655;
  --admin-border: #E5E7EB;
  --admin-white: #FFFFFF;
  --admin-success: #10B981;
  --admin-warning: #F59E0B;
  --admin-danger: #EF4444;
  --admin-info: #3B82F6;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--admin-bg);
  color: var(--admin-text);
  font-size: 14px;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

.admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2C1810 0%, #6B4C3B 50%, #C41E24 100%);
  position: relative;
  overflow: hidden;
}

.admin-login::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,169,78,0.15) 0%, transparent 70%);
  top: -200px;
  right: -200px;
}

.admin-login::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196,30,36,0.1) 0%, transparent 70%);
  bottom: -150px;
  left: -150px;
}

.admin-login__card {
  position: relative;
  z-index: 10;
  width: 420px;
  background: var(--admin-white);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  overflow: hidden;
}

.admin-login__header {
  background: linear-gradient(135deg, var(--admin-primary) 0%, var(--admin-primary-dark) 100%);
  padding: 40px 40px 30px;
  text-align: center;
  position: relative;
}

.admin-login__header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--admin-gold);
}

.admin-login__logo {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--admin-white);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 700;
  color: var(--admin-primary);
  font-family: 'Noto Serif SC', serif;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.admin-login__title {
  color: var(--admin-white);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
  font-family: 'Noto Serif SC', serif;
  letter-spacing: 2px;
}

.admin-login__subtitle {
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  letter-spacing: 1px;
}

.admin-login__body {
  padding: 32px 40px 40px;
}

.admin-login__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.admin-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-form-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--admin-text);
}

.admin-form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-md);
  font-size: 14px;
  transition: all 200ms ease;
  outline: none;
}

.admin-form-input:focus {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px rgba(196,30,36,0.1);
}

.admin-form-row {
  display: flex;
  gap: 12px;
}

.admin-form-row .admin-form-group {
  flex: 1;
}

.admin-form-captcha {
  width: 120px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #F5ECD7, #E8D5A3);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--admin-primary);
  cursor: pointer;
  user-select: none;
  font-family: monospace;
  transition: transform 200ms ease;
}

.admin-form-captcha:hover {
  transform: scale(1.02);
}

.admin-login__remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--admin-text-muted);
}

.admin-login__remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 200ms ease;
  text-decoration: none;
}

.admin-btn--primary {
  background: var(--admin-primary);
  color: var(--admin-white);
}

.admin-btn--primary:hover {
  background: var(--admin-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(196,30,36,0.3);
}

.admin-btn--secondary {
  background: var(--admin-white);
  color: var(--admin-text);
  border: 1px solid var(--admin-border);
}

.admin-btn--secondary:hover {
  background: var(--admin-bg);
}

.admin-btn--danger {
  background: var(--admin-danger);
  color: white;
}

.admin-btn--danger:hover {
  background: #DC2626;
}

.admin-btn--success {
  background: var(--admin-success);
  color: white;
}

.admin-btn--sm {
  padding: 6px 14px;
  font-size: 13px;
}

.admin-btn--block {
  width: 100%;
}

.admin-login__btn {
  margin-top: 8px;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 2px;
}

.admin-login__footer {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--admin-text-muted);
}

.admin-login__footer a {
  color: var(--admin-primary);
  margin: 0 8px;
}

.admin-login__back {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 20;
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: color 200ms ease;
}

.admin-login__back:hover {
  color: var(--admin-white);
}

.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 240px;
  background: var(--admin-sidebar-bg);
  color: var(--admin-white);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 300ms ease;
}

.admin-sidebar__brand {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-sidebar__logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--admin-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  font-family: 'Noto Serif SC', serif;
  flex-shrink: 0;
}

.admin-sidebar__brand-name {
  font-size: 16px;
  font-weight: 600;
  font-family: 'Noto Serif SC', serif;
  letter-spacing: 1px;
}

.admin-sidebar__menu {
  flex: 1;
  padding: 16px 0;
  overflow-y: auto;
}

.admin-sidebar__section {
  padding: 12px 24px 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.4);
  font-weight: 600;
}

.admin-sidebar__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  transition: all 150ms ease;
  border-left: 3px solid transparent;
  position: relative;
}

.admin-sidebar__item:hover {
  background: var(--admin-sidebar-hover);
  color: var(--admin-white);
}

.admin-sidebar__item--active {
  background: var(--admin-sidebar-hover);
  color: var(--admin-gold);
  border-left-color: var(--admin-gold);
}

.admin-sidebar__item-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.admin-sidebar__item-label {
  flex: 1;
  font-size: 14px;
}

.admin-sidebar__item-badge {
  background: var(--admin-primary);
  color: white;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.admin-sidebar__footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-sidebar__user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--admin-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--admin-sidebar-bg);
  flex-shrink: 0;
}

.admin-sidebar__user-info {
  flex: 1;
  overflow: hidden;
}

.admin-sidebar__user-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--admin-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-sidebar__user-role {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

.admin-sidebar__logout {
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
  border-radius: 4px;
  transition: all 150ms ease;
}

.admin-sidebar__logout:hover {
  color: var(--admin-danger);
  background: rgba(239,68,68,0.1);
}

.admin-main {
  flex: 1;
  margin-left: 240px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.admin-header {
  background: var(--admin-white);
  padding: 16px 32px;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.admin-header__left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-header__menu-toggle {
  display: none;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 150ms ease;
}

.admin-header__menu-toggle:hover {
  background: var(--admin-bg);
}

.admin-header__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--admin-text);
}

.admin-header__breadcrumb {
  font-size: 13px;
  color: var(--admin-text-muted);
}

.admin-header__breadcrumb span {
  margin: 0 6px;
  color: var(--admin-border);
}

.admin-header__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-header__action-btn {
  position: relative;
  padding: 8px;
  cursor: pointer;
  border-radius: 6px;
  font-size: 18px;
  transition: background 150ms ease;
}

.admin-header__action-btn:hover {
  background: var(--admin-bg);
}

.admin-header__action-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  background: var(--admin-danger);
  border-radius: 50%;
}

.admin-content {
  flex: 1;
  padding: 24px 32px;
}

.admin-page-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--admin-text);
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.admin-stat-card {
  background: var(--admin-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all 200ms ease;
  position: relative;
  overflow: hidden;
}

.admin-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.admin-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.admin-stat-card--primary::before { background: var(--admin-primary); }
.admin-stat-card--success::before { background: var(--admin-success); }
.admin-stat-card--warning::before { background: var(--admin-warning); }
.admin-stat-card--info::before { background: var(--admin-info); }

.admin-stat-card__label {
  font-size: 14px;
  color: var(--admin-text-muted);
  margin-bottom: 12px;
}

.admin-stat-card__value {
  font-size: 32px;
  font-weight: 700;
  color: var(--admin-text);
  margin-bottom: 8px;
}

.admin-stat-card__change {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.admin-stat-card__change--up {
  color: var(--admin-success);
}

.admin-stat-card__change--down {
  color: var(--admin-danger);
}

.admin-card {
  background: var(--admin-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.admin-card__header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-card__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--admin-text);
}

.admin-card__actions {
  display: flex;
  gap: 10px;
}

.admin-card__body {
  padding: 24px;
}

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

.admin-table-search {
  flex: 1;
  max-width: 300px;
  position: relative;
}

.admin-table-search input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-md);
  font-size: 14px;
  outline: none;
  transition: all 200ms ease;
}

.admin-table-search input:focus {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px rgba(196,30,36,0.1);
}

.admin-table-search::before {
  content: '🔍';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  opacity: 0.5;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--admin-border);
}

.admin-table th {
  background: var(--admin-bg);
  font-weight: 600;
  font-size: 13px;
  color: var(--admin-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-table tr:hover {
  background: rgba(196,30,36,0.02);
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.admin-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.admin-status--active {
  background: rgba(16,185,129,0.1);
  color: var(--admin-success);
}
.admin-status--active::before { background: var(--admin-success); }

.admin-status--pending {
  background: rgba(245,158,11,0.1);
  color: var(--admin-warning);
}
.admin-status--pending::before { background: var(--admin-warning); }

.admin-status--disabled {
  background: rgba(107,76,59,0.1);
  color: var(--admin-text-muted);
}
.admin-status--disabled::before { background: var(--admin-text-muted); }

.admin-action-btns {
  display: flex;
  gap: 8px;
}

.admin-action-btn {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: all 150ms ease;
}

.admin-action-btn--edit {
  background: rgba(59,130,246,0.1);
  color: var(--admin-info);
}
.admin-action-btn--edit:hover {
  background: var(--admin-info);
  color: white;
}

.admin-action-btn--delete {
  background: rgba(239,68,68,0.1);
  color: var(--admin-danger);
}
.admin-action-btn--delete:hover {
  background: var(--admin-danger);
  color: white;
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 0;
  margin-top: 16px;
  border-top: 1px solid var(--admin-border);
}

.admin-pagination__info {
  font-size: 13px;
  color: var(--admin-text-muted);
}

.admin-pagination__btns {
  display: flex;
  gap: 4px;
}

.admin-pagination__btn {
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--admin-border);
  background: var(--admin-white);
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  transition: all 150ms ease;
}

.admin-pagination__btn:hover {
  border-color: var(--admin-primary);
  color: var(--admin-primary);
}

.admin-pagination__btn--active {
  background: var(--admin-primary);
  color: white;
  border-color: var(--admin-primary);
}

.admin-pagination__btn--active:hover {
  color: white;
}

.admin-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 200ms ease;
  padding: 20px;
}

.admin-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.admin-modal {
  background: var(--admin-white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 200ms ease;
}

.admin-modal-overlay.active .admin-modal {
  transform: translateY(0);
}

.admin-modal__header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-modal__title {
  font-size: 18px;
  font-weight: 600;
}

.admin-modal__close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  color: var(--admin-text-muted);
  border-radius: 6px;
  transition: all 150ms ease;
}

.admin-modal__close:hover {
  background: var(--admin-bg);
  color: var(--admin-text);
}

.admin-modal__body {
  padding: 24px;
}

.admin-modal__footer {
  padding: 16px 24px;
  border-top: 1px solid var(--admin-border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.admin-toast {
  position: fixed;
  top: 24px;
  right: 24px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  z-index: 2000;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateX(100%);
  transition: all 300ms ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-toast.show {
  opacity: 1;
  transform: translateX(0);
}

.admin-toast--success {
  background: var(--admin-success);
  color: white;
}

.admin-toast--error {
  background: var(--admin-danger);
  color: white;
}

.admin-toast--info {
  background: var(--admin-info);
  color: white;
}

.admin-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--admin-text-muted);
}

.admin-empty__icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.admin-empty__text {
  font-size: 14px;
}

.hidden {
  display: none !important;
}

@media (max-width: 1024px) {
  .admin-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }
  
  .admin-sidebar.show {
    transform: translateX(0);
  }
  
  .admin-main {
    margin-left: 0;
  }
  
  .admin-header {
    padding: 12px 20px;
  }
  
  .admin-header__menu-toggle {
    display: block;
  }
  
  .admin-content {
    padding: 16px 20px;
  }
  
  .admin-stats-grid {
    grid-template-columns: 1fr;
  }
  
  .admin-card__body {
    padding: 16px;
  }
  
  .admin-table-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .admin-table-search {
    max-width: none;
  }
  
  .admin-login__card {
    width: 100%;
    margin: 20px;
  }
  
  .admin-login__body {
    padding: 24px;
  }
  
  .admin-table {
    display: block;
    overflow-x: auto;
  }
}
