.admin-body { margin: 0; background: #f0f2f5; }
.admin-layout { display: flex; min-height: 100vh; }
.admin-sider {
  width: 220px; background: #001529; color: rgba(255,255,255,.85);
  flex-shrink: 0; position: fixed; top: 0; left: 0; bottom: 0; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent;
}
.admin-sider .brand { padding: 16px 20px; font-size: 16px; font-weight: 600; color: #fff; border-bottom: 1px solid rgba(255,255,255,.1); }
.admin-menu { padding: 4px 0 16px; }
.admin-menu .group { padding: 12px 20px 6px; font-size: 12px; color: rgba(255,255,255,.45); }

.menu-section { border-bottom: 1px solid rgba(255,255,255,.04); }
.menu-section-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px 12px 20px; font-size: 13px; color: rgba(255,255,255,.55);
  cursor: pointer; user-select: none; transition: color .2s;
}
.menu-section-head:hover { color: rgba(255,255,255,.85); }
.menu-arrow {
  width: 8px; height: 8px; border-right: 1.5px solid rgba(255,255,255,.45);
  border-bottom: 1.5px solid rgba(255,255,255,.45); transform: rotate(-45deg);
  transition: transform .2s; flex-shrink: 0; margin-left: 8px;
}
.menu-section.open .menu-arrow { transform: rotate(45deg); margin-top: -4px; }
.menu-section-body { display: none; padding-bottom: 4px; }
.menu-section.open .menu-section-body { display: block; }

.admin-menu a {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 16px 9px 36px; color: rgba(255,255,255,.75); font-size: 13px;
  cursor: pointer; text-decoration: none; border-left: 3px solid transparent;
  transition: background .15s, color .15s;
}
.admin-menu a:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-menu a.active {
  background: rgba(22,119,255,.18); color: #69b1ff; border-left-color: #1677ff;
}
.admin-menu a span { flex: 1; }
.admin-main { flex: 1; margin-left: 220px; display: flex; flex-direction: column; }
.admin-topbar {
  height: 48px; background: #fff; border-bottom: 1px solid #f0f0f0;
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
  position: sticky; top: 0; z-index: 10;
}
.admin-topbar-right { display: flex; align-items: center; gap: 12px; }
.admin-search-wrap { position: relative; }
.admin-search-wrap input {
  width: 220px; padding: 6px 12px; border: 1px solid #d9d9d9; border-radius: 6px; font-size: 13px;
}
.admin-search-drop {
  display: none; position: absolute; top: 100%; right: 0; margin-top: 4px;
  width: 320px; max-height: 360px; overflow-y: auto; background: #fff;
  border: 1px solid #eee; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.12); z-index: 100;
}
.admin-search-drop.open { display: block; }
.admin-search-drop a {
  display: block; padding: 10px 14px; font-size: 13px; color: #333; border-bottom: 1px solid #f5f5f5; cursor: pointer;
}
.admin-search-drop a:hover { background: #f5f9ff; }
.admin-search-type { display: inline-block; font-size: 11px; color: #1677ff; background: #e6f4ff; padding: 1px 6px; border-radius: 4px; margin-right: 6px; }
.admin-search-empty { padding: 16px; text-align: center; color: #999; font-size: 13px; }
.admin-content { padding: 20px 24px; }
.admin-panel { display: none; }
.admin-panel.active { display: block; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.panel-head h2 { font-size: 18px; margin: 0; border: none; padding: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: 8px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.stat-card .n { font-size: 24px; font-weight: 700; color: #1677ff; }
.stat-card .l { font-size: 12px; color: #999; margin-top: 4px; }
.stat-card.warn .n { color: #fa8c16; }
.stat-card.ok .n { color: #52c41a; }
.toolbar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.toolbar input, .toolbar select { width: auto; margin: 0; min-width: 140px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.inline-form { background: #fafafa; padding: 16px; border-radius: 8px; margin-bottom: 16px; display: none; }
.inline-form.show { display: block; }
.ticket-thread { max-height: 300px; overflow-y: auto; background: #fafafa; padding: 12px; border-radius: 8px; margin: 12px 0; }
.ticket-msg { margin-bottom: 10px; padding: 8px 12px; border-radius: 6px; background: #fff; font-size: 13px; }
.ticket-msg.admin { border-left: 3px solid #1677ff; }
.ticket-msg .meta { font-size: 11px; color: #999; margin-bottom: 4px; }

.registrar-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 8px;
}
.registrar-card {
  background: linear-gradient(145deg, #1a2332 0%, #0f1419 100%);
  border-radius: 12px; padding: 20px; color: #e8eaed;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.registrar-card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.registrar-card-head h4 { margin: 0; font-size: 18px; color: #fff; }
.reg-badges { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.reg-badge { font-size: 11px; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.reg-badge-on { background: #52c41a33; color: #95de64; border: 1px solid #52c41a55; }
.reg-badge-off { background: #6663; color: #aaa; }
.reg-badge-prod { background: #ff4d4f33; color: #ff7875; border: 1px solid #ff4d4f55; }
.reg-badge-sandbox { background: #fa8c1633; color: #ffc069; }
.reg-badge-default { background: #1677ff33; color: #69b1ff; border: 1px solid #1677ff55; }
.registrar-balance { font-size: 28px; font-weight: 700; color: #fff; margin: 8px 0; }
.registrar-balance small { font-size: 14px; color: #888; font-weight: 400; }
.registrar-meta { font-size: 13px; color: #888; margin-bottom: 16px; }
.registrar-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.registrar-actions .btn { font-size: 12px; padding: 4px 10px; }
.registrar-actions .btn-outline { background: transparent; border-color: #444; color: #ccc; }
.registrar-actions .btn-outline:hover { border-color: #1677ff; color: #69b1ff; }

.domain-search-bar { display: flex; gap: 8px; margin-bottom: 12px; max-width: 560px; }
.domain-search-bar input { flex: 1; margin: 0; }
.domain-result-table { width: 100%; margin-top: 12px; }
.domain-result-table .domain-avail { color: #52c41a; }
.domain-result-table .domain-taken { color: #999; }
.domain-result-empty { padding: 24px; text-align: center; color: #999; }
.domain-status-0 { color: #fa8c16; }
.domain-status-1 { color: #52c41a; }
.domain-status-2 { color: #ff4d4f; }
.domain-status-3 { color: #999; }
.domain-tip { font-size: 13px; color: #888; margin-bottom: 16px; line-height: 1.6; }
.domain-placeholder { padding: 32px; text-align: center; background: #fafafa; border-radius: 8px; color: #666; }
.domain-placeholder h4 { margin: 0 0 8px; color: #333; }

.husk-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.husk-stat { background: #fff; border-radius: 8px; padding: 16px 20px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.husk-stat .n { font-size: 28px; font-weight: 700; color: #1677ff; line-height: 1.2; }
.husk-stat .l { font-size: 13px; color: #888; margin-top: 4px; }
.husk-stat.ok .n { color: #52c41a; }
.husk-stat.warn .n { color: #fa8c16; }
.husk-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.husk-toolbar input { width: 180px; margin: 0; min-width: 120px; }
.husk-toolbar select { width: auto; margin: 0; min-width: 120px; }
.husk-toolbar-right { margin-left: auto; display: flex; gap: 8px; }
.husk-table-wrap { overflow-x: auto; }
.husk-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.husk-table th { background: #fafafa; padding: 10px 12px; text-align: left; font-weight: 600; white-space: nowrap; }
.husk-table td { padding: 10px 12px; border-top: 1px solid #f0f0f0; vertical-align: middle; }
.husk-avatar { display: inline-flex; width: 32px; height: 32px; border-radius: 50%; background: #1677ff; color: #fff; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; }
.husk-tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.husk-tag-green { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }
.husk-tag-orange { background: #fff7e6; color: #fa8c16; border: 1px solid #ffd591; }
.husk-tag-gray { background: #f5f5f5; color: #999; }
.husk-actions a { color: #1677ff; cursor: pointer; margin-right: 8px; font-size: 12px; text-decoration: none; }
.husk-actions a:hover { text-decoration: underline; }
.husk-actions a.danger { color: #ff4d4f; }
.husk-domains-cell { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: #666; }
.husk-switch { position: relative; display: inline-block; width: 36px; height: 20px; }
.husk-switch input { opacity: 0; width: 0; height: 0; }
.husk-switch span { position: absolute; inset: 0; background: #ccc; border-radius: 20px; cursor: pointer; transition: .2s; }
.husk-switch span:before { content: ''; position: absolute; width: 16px; height: 16px; left: 2px; bottom: 2px; background: #fff; border-radius: 50%; transition: .2s; }
.husk-switch input:checked + span { background: #1677ff; }
.husk-switch input:checked + span:before { transform: translateX(16px); }
.husk-dropdown { position: relative; display: inline-block; }
.husk-dropdown-menu { display: none; position: absolute; right: 0; top: 100%; z-index: 20; min-width: 140px; background: #fff; border: 1px solid #eee; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,.12); padding: 4px 0; }
.husk-dropdown-menu.open { display: block; }
.husk-dropdown-menu a { display: block; padding: 8px 14px; font-size: 13px; color: #333; cursor: pointer; text-decoration: none; white-space: nowrap; }
.husk-dropdown-menu a:hover { background: #f5f5f5; }
.husk-dropdown-menu a.danger { color: #ff4d4f; }
.btn-outline { background: transparent; border: 1px solid #d9d9d9; color: #333; }
.btn-outline:hover { border-color: #1677ff; color: #1677ff; }
.husk-dropdown-sep { height: 1px; background: #f0f0f0; margin: 4px 0; }
.husk-table-wrap { overflow-x: auto; margin-top: 12px; }
.husk-actions a { margin-right: 10px; cursor: pointer; color: #1677ff; font-size: 13px; }
.husk-actions a.danger, .husk-link-danger { color: #ff4d4f !important; }
.husk-link-ok { color: #52c41a !important; cursor: pointer; margin-right: 10px; font-size: 13px; }
.husk-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 9999; display: none; align-items: center; justify-content: center; padding: 16px; }
.husk-modal-overlay.open { display: flex !important; }
.husk-modal { background: #1f1f1f; color: #eee; border-radius: 10px; width: 420px; max-width: 100%; box-shadow: 0 8px 32px rgba(0,0,0,.4); }
.husk-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #333; }
.husk-modal-head h4 { margin: 0; font-size: 16px; }
.husk-modal-close { background: none; border: none; color: #999; font-size: 22px; cursor: pointer; line-height: 1; }
.husk-modal-body { padding: 20px; }
.husk-modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid #333; }
.husk-form-row { margin-bottom: 18px; }
.husk-form-row > label:first-child { display: block; margin-bottom: 8px; color: #aaa; font-size: 13px; }
.husk-radio { display: inline-flex; align-items: center; gap: 6px; margin-right: 20px; font-size: 14px; cursor: pointer; }
.husk-stepper { display: flex; align-items: center; gap: 8px; }
.husk-stepper button { width: 32px; height: 32px; border: 1px solid #444; background: #2a2a2a; color: #eee; border-radius: 6px; cursor: pointer; }
.husk-stepper input { width: 100px; padding: 6px 10px; border: 1px solid #444; background: #2a2a2a; color: #eee; border-radius: 6px; text-align: center; }
@media (max-width: 900px) { .husk-stats { grid-template-columns: repeat(2, 1fr); } }

@media (max-width: 900px) {
  .admin-sider { width: 64px; }
  .admin-sider .brand, .menu-section-head span, .menu-arrow, .admin-menu a span { display: none; }
  .menu-section-body { display: block !important; }
  .admin-menu a { padding: 10px 16px; justify-content: center; }
  .admin-main { margin-left: 64px; }
}
