/* ============================================================
   漏洞盒子 (Vulnerability Box) — 白色主题样式
   FastAdmin 风格 · Bootstrap 3.x 兼容
   ============================================================ */

/* --- CSS Variables --- */
:root {
  --primary:       #1677FF;
  --primary-light: #E8F3FF;
  --primary-dark:  #0958D9;
  --bg-body:       #F5F6FA;
  --bg-white:      #FFFFFF;
  --bg-sidebar:    #FAFBFC;
  --bg-hover:      #F5F5F5;
  --text-primary:  #1F1F1F;
  --text-secondary:#666666;
  --text-muted:    #999999;
  --text-white:    #FFFFFF;
  --border:        #EDF0F4;
  --border-light:  #F0F0F0;
  --success:       #52C41A;
  --success-bg:    #F6FFED;
  --warning:       #FAAD14;
  --warning-bg:    #FFFBE6;
  --danger:        #FF4D4F;
  --danger-bg:     #FFF2F0;
  --info:          #1677FF;
  --info-bg:       #E8F3FF;
  --shadow-sm:     0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:     0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg:     0 4px 16px rgba(0,0,0,0.08);
  --radius-sm:     4px;
  --radius-md:     8px;
  --radius-lg:     12px;
  --radius-round:  50%;
  --navbar-h:      56px;
  --sidebar-w:     220px;
  --transition:    0.2s ease;
}

/* --- Reset & Base --- */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial,
               sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover, a:focus {
  color: var(--primary-dark);
  text-decoration: none;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #9CA3AF;
}

/* ============================================================
   Top Navbar
   ============================================================ */
.top-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-h);
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  z-index: 1030;
  padding: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

/* Brand / Logo */
.navbar-brand {
  width: var(--sidebar-w);
  height: var(--navbar-h);
  display: flex;
  align-items: center;
  padding: 0 20px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  border-right: 1px solid var(--border);
  flex-shrink: 0;
  letter-spacing: 0.5px;
}
.navbar-brand .brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 10px;
  flex-shrink: 0;
}
.navbar-brand .brand-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

/* Center Nav Links */
.navbar-links {
  display: flex;
  align-items: center;
  height: 100%;
  margin-left: 8px;
  gap: 4px;
}
.navbar-links a {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 18px;
  font-size: 14px;
  color: var(--text-secondary);
  position: relative;
  transition: all var(--transition);
  font-weight: 500;
  white-space: nowrap;
}
.navbar-links a:hover {
  color: var(--primary);
  background: var(--primary-light);
}
.navbar-links a.active {
  color: var(--primary);
  font-weight: 600;
}
.navbar-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 18px;
  right: 18px;
  height: 2px;
  background: var(--primary);
  border-radius: 1px 1px 0 0;
}

/* Right Section */
.navbar-right {
  display: flex;
  align-items: center;
  margin-left: auto;
  padding-right: 16px;
  gap: 8px;
  height: 100%;
}

.nav-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-round);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 17px;
  cursor: pointer;
  position: relative;
  transition: all var(--transition);
  background: transparent;
  border: none;
  outline: none;
}
.nav-icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.nav-icon-btn .badge-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: var(--radius-round);
  border: 1.5px solid #fff;
}

/* User Dropdown */
.user-dropdown {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  margin-left: 4px;
  position: relative;
}
.user-dropdown:hover {
  background: var(--bg-hover);
}
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-round);
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}
.user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.user-role {
  font-size: 11px;
  color: var(--text-muted);
}
.user-dropdown .fa-caret-down {
  font-size: 12px;
  color: var(--text-muted);
  transition: transform var(--transition);
}
.user-dropdown.open .fa-caret-down {
  transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu-custom {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  padding: 4px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all var(--transition);
  z-index: 1050;
}
.user-dropdown.open .dropdown-menu-custom {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-menu-custom a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  color: var(--text-primary);
  font-size: 13px;
  transition: all var(--transition);
}
.dropdown-menu-custom a:hover {
  background: var(--bg-hover);
  color: var(--primary);
}
.dropdown-menu-custom a i {
  width: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}
.dropdown-menu-custom .divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* ============================================================
   Sidebar
   ============================================================ */
.sidebar {
  position: fixed;
  top: var(--navbar-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  z-index: 1020;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform var(--transition);
}

.sidebar-menu {
  list-style: none;
  margin: 0;
  padding: 12px 0;
}
.sidebar-menu li {
  margin: 0;
}

/* Main Menu Item */
.sidebar-menu > li > a {
  display: flex;
  align-items: center;
  padding: 11px 20px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
  border-left: 3px solid transparent;
  white-space: nowrap;
  gap: 10px;
}
.sidebar-menu > li > a > i:first-child {
  width: 18px;
  text-align: center;
  font-size: 15px;
  flex-shrink: 0;
}
.sidebar-menu > li > a:hover {
  background: #F0F2F5;
  color: var(--text-primary);
}
.sidebar-menu > li.active > a {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  border-left-color: var(--primary);
}
.sidebar-menu > li.active > a > i:first-child {
  color: var(--primary);
}

/* Submenu Arrow */
.sidebar-menu .pull-right {
  margin-left: auto;
  font-size: 12px;
  transition: transform var(--transition);
}
.sidebar-menu > li.treeview.open > a .pull-right {
  transform: rotate(-90deg);
}

/* Submenu */
.sidebar-menu .treeview-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(0,0,0,0.015);
}
.sidebar-menu > li.treeview.open .treeview-menu {
  max-height: 300px;
}
.treeview-menu > li > a {
  display: flex;
  align-items: center;
  padding: 9px 20px 9px 50px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 400;
  transition: all var(--transition);
  border-left: 3px solid transparent;
  position: relative;
}
.treeview-menu > li > a::before {
  content: '';
  position: absolute;
  left: 30px;
  width: 5px;
  height: 5px;
  border-radius: var(--radius-round);
  background: #D1D5DB;
  transition: all var(--transition);
}
.treeview-menu > li > a:hover {
  color: var(--text-primary);
  background: rgba(0,0,0,0.025);
}
.treeview-menu > li > a:hover::before {
  background: var(--primary);
}
.treeview-menu > li.active > a {
  color: var(--primary);
  font-weight: 500;
  background: rgba(22,119,255,0.04);
  border-left-color: var(--primary);
}
.treeview-menu > li.active > a::before {
  background: var(--primary);
  width: 7px;
  height: 7px;
  left: 29px;
  box-shadow: 0 0 0 3px rgba(22,119,255,0.2);
}

/* Sidebar Section Header */
.sidebar-header {
  padding: 20px 20px 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============================================================
   Content Wrapper
   ============================================================ */
.content-wrapper {
  margin-left: var(--sidebar-w);
  margin-top: var(--navbar-h);
  min-height: calc(100vh - var(--navbar-h));
  position: relative;
}
.content-wrapper iframe {
  width: 100%;
  height: calc(100vh - var(--navbar-h));
  border: none;
  display: block;
}

/* ============================================================
   Sub-Page Styles (inside iframe)
   ============================================================ */
.page-container {
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Page Header */
.page-header {
  margin-bottom: 24px;
}
.page-header h2 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}
.page-header .breadcrumb {
  margin: 0;
  padding: 0;
  background: none;
  font-size: 13px;
  color: var(--text-muted);
}
.page-header .breadcrumb a {
  color: var(--text-secondary);
}
.page-header .breadcrumb .active {
  color: var(--text-muted);
}

/* Stats Cards */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  transition: all var(--transition);
}
.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.stat-card .stat-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.stat-card .stat-icon.blue   { background: #E8F3FF; color: #1677FF; }
.stat-card .stat-icon.green  { background: #F6FFED; color: #52C41A; }
.stat-card .stat-icon.orange { background: #FFFBE6; color: #FAAD14; }
.stat-card .stat-icon.red    { background: #FFF2F0; color: #FF4D4F; }
.stat-card .stat-info { text-align: right; }
.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}
.stat-card .stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}
.stat-card .stat-change {
  font-size: 12px;
  margin-top: 4px;
  font-weight: 500;
}
.stat-card .stat-change.up   { color: var(--success); }
.stat-card .stat-change.down { color: var(--danger); }

/* Content Columns */
.content-columns {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

/* Panel / Card */
.panel-custom {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}
.panel-custom .panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-white);
}
.panel-custom .panel-header h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.panel-custom .panel-header .panel-action {
  font-size: 13px;
  color: var(--primary);
  cursor: pointer;
}
.panel-custom .panel-body {
  padding: 0;
}
.panel-custom .panel-body.no-padding {
  padding: 0;
}

/* Table */
.table-custom {
  width: 100%;
  border-collapse: collapse;
}
.table-custom th {
  background: #FAFBFC;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.table-custom td {
  padding: 14px 16px;
  font-size: 13px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.table-custom tbody tr {
  transition: background var(--transition);
}
.table-custom tbody tr:hover {
  background: #FAFBFC;
}
.table-custom tbody tr:last-child td {
  border-bottom: none;
}

/* Status Badges */
.badge-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}
.badge-pending    { background: #FFFBE6; color: #D48806; }
.badge-reviewing  { background: #E8F3FF; color: #1677FF; }
.badge-approved   { background: #F6FFED; color: #389E0D; }
.badge-rejected   { background: #FFF2F0; color: #CF1322; }
.badge-paid       { background: #F6FFED; color: #389E0D; }
.badge-draft      { background: #F5F5F5; color: #666666; }

/* Severity Badges */
.badge-severity {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.badge-severity.critical { background: #7B0000; color: #fff; }
.badge-severity.high     { background: #CF1322; color: #fff; }
.badge-severity.medium   { background: #FAAD14; color: #fff; }
.badge-severity.low      { background: #1677FF; color: #fff; }
.badge-severity.info     { background: #8C8C8C; color: #fff; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
}
.btn:focus { outline: none; }
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
}
.btn-default {
  background: #fff;
  color: var(--text-primary);
  border-color: var(--border);
}
.btn-default:hover {
  color: var(--primary);
  border-color: var(--primary);
}
.btn-success {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}
.btn-success:hover {
  background: #389E0D;
  border-color: #389E0D;
  color: #fff;
}
.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn-danger:hover {
  background: #CF1322;
  border-color: #CF1322;
  color: #fff;
}
.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}
.btn-lg {
  padding: 10px 24px;
  font-size: 15px;
}
.btn-outline {
  background: #fff;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

/* Forms */
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}
.form-group label .required {
  color: var(--danger);
  margin-left: 2px;
}
.form-control {
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
  line-height: 1.5;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(22,119,255,0.15);
}
.form-control::placeholder {
  color: #BFBFBF;
}
select.form-control {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}
textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* Severity Radio Group */
.severity-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.severity-radio {
  display: none;
}
.severity-radio + label {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: #fff;
  transition: all var(--transition);
  color: var(--text-secondary);
}
.severity-radio + label:hover {
  border-color: #BFBFBF;
}
.severity-radio:checked + label {
  border-color: currentColor;
  font-weight: 600;
}
.severity-radio#sev-critical + label { color: #7B0000; }
.severity-radio#sev-critical:checked + label { background: #FFF2F0; border-color: #7B0000; }
.severity-radio#sev-high + label { color: #CF1322; }
.severity-radio#sev-high:checked + label { background: #FFF2F0; border-color: #CF1322; }
.severity-radio#sev-medium + label { color: #D48806; }
.severity-radio#sev-medium:checked + label { background: #FFFBE6; border-color: #D48806; }
.severity-radio#sev-low + label { color: #1677FF; }
.severity-radio#sev-low:checked + label { background: #E8F3FF; border-color: #1677FF; }

/* Upload Zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: #FAFBFC;
}
.upload-zone:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.upload-zone i {
  font-size: 32px;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: block;
}
.upload-zone p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}
.upload-zone .upload-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 16px 20px;
}
.timeline-item {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  position: relative;
}
.timeline-item:not(:last-child) {
  border-bottom: 1px solid var(--border-light);
}
.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-round);
  flex-shrink: 0;
  margin-top: 4px;
}
.timeline-dot.blue   { background: var(--primary); }
.timeline-dot.green  { background: var(--success); }
.timeline-dot.orange { background: var(--warning); }
.timeline-dot.red    { background: var(--danger); }
.timeline-body {
  flex: 1;
  min-width: 0;
}
.timeline-body .tl-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.timeline-body .tl-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.timeline-body .tl-time {
  font-size: 11px;
  color: var(--text-muted);
}

/* Bounty Project Cards */
.bounty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.bounty-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 20px;
  transition: all var(--transition);
  cursor: pointer;
}
.bounty-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  transform: translateY(-2px);
}
.bounty-card .bc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.bounty-card .bc-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--primary);
  flex-shrink: 0;
}
.bounty-card .bc-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.bounty-card .bc-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}
.bounty-card .bc-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.bounty-card .bc-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.bc-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 500;
  background: var(--bg-hover);
  color: var(--text-secondary);
}
.bc-tag.active-tag {
  background: var(--primary-light);
  color: var(--primary);
}
.bc-reward {
  font-size: 18px;
  font-weight: 700;
  color: var(--danger);
  margin-top: 12px;
}

/* Ranking Table */
.ranking-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ranking-number {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-round);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: #BFBFBF;
  flex-shrink: 0;
}
.ranking-number.top-1 { background: linear-gradient(135deg, #FFD700, #FFA500); }
.ranking-number.top-2 { background: linear-gradient(135deg, #C0C0C0, #A0A0A0); }
.ranking-number.top-3 { background: linear-gradient(135deg, #CD7F32, #A0522D); }
.ranking-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-round);
  object-fit: cover;
}
.ranking-name {
  font-weight: 500;
  color: var(--text-primary);
}
.ranking-score {
  font-weight: 700;
  color: var(--primary);
  font-size: 15px;
}

/* Filters Toolbar */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  background: var(--bg-white);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.filters-bar .form-control {
  width: auto;
  min-width: 140px;
}
.filters-bar .search-input {
  width: 240px;
}

/* Pagination */
.pagination-custom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px 0;
}
.pagination-custom a,
.pagination-custom span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.pagination-custom a:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.pagination-custom .active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  font-weight: 600;
}
.pagination-custom .disabled {
  color: #D1D5DB;
  pointer-events: none;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state i {
  font-size: 48px;
  color: #D1D5DB;
  margin-bottom: 12px;
  display: block;
}
.empty-state p {
  font-size: 14px;
  margin-bottom: 16px;
}

/* Footer */
.app-footer {
  text-align: center;
  padding: 16px 24px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: var(--bg-white);
  margin-top: auto;
}

/* Text Utilities */
.text-muted   { color: var(--text-muted) !important; }
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger  { color: var(--danger) !important; }
.text-sm      { font-size: 12px; }
.text-xs      { font-size: 11px; }
.font-bold    { font-weight: 600; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mr-2 { margin-right: 8px; }
.ml-auto { margin-left: auto; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }

/* Inline Code / PoC Editor */
.code-editor {
  background: #1E1E1E;
  color: #D4D4D4;
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: "SF Mono", "Monaco", "Menlo", "Consolas", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
  min-height: 180px;
  border: none;
  outline: none;
  width: 100%;
  resize: vertical;
  tab-size: 4;
}
.code-editor::placeholder {
  color: #6A6A6A;
}

/* Tabs */
.tabs-nav {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 16px;
  gap: 0;
}
.tabs-nav a {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
}
.tabs-nav a:hover {
  color: var(--primary);
}
.tabs-nav a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.alert-info    { background: #E8F3FF; color: #0958D9; border: 1px solid #91CAFF; }
.alert-success { background: #F6FFED; color: #389E0D; border: 1px solid #B7EB8F; }
.alert-warning { background: #FFFBE6; color: #D48806; border: 1px solid #FFE58F; }
.alert-danger  { background: #FFF2F0; color: #CF1322; border: 1px solid #FFCCC7; }

/* Community / News Card List */
.post-list-item {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
  cursor: pointer;
}
.post-list-item:hover {
  background: #FAFBFC;
}
.post-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-round);
  flex-shrink: 0;
  object-fit: cover;
}
.post-content {
  flex: 1;
  min-width: 0;
}
.post-content .post-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.post-content .post-excerpt {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-meta {
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: var(--text-muted);
}
.post-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Settings Form */
.settings-section {
  margin-bottom: 24px;
}
.settings-section h5 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

/* ============================================================
   Responsive — Mobile First for Mini App
   ============================================================ */

/* Tablet: sidebar collapsed */
@media (max-width: 991px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 4px 0 16px rgba(0,0,0,0.12);
  }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1019;
    top: var(--navbar-h);
  }
  .sidebar-overlay.show {
    display: block;
  }
  .content-wrapper {
    margin-left: 0;
  }
  .navbar-brand {
    width: auto;
    border-right: none;
    padding: 0 12px;
  }
  .navbar-links { display: none; }
  .navbar-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--navbar-h);
    left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 4px 0;
  }
  .navbar-links.mobile-open a {
    height: 42px;
    padding: 0 20px;
    align-items: center;
  }
  .navbar-links.mobile-open a.active::after { display: none; }

  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .content-columns { grid-template-columns: 1fr; }
  .bounty-grid { grid-template-columns: 1fr; }
  .page-container { padding: 16px; }

  /* Mobile hamburger button */
  .mobile-sidebar-toggle { display: flex !important; }
}

/* Phone: full mobile */
@media (max-width: 480px) {
  :root { --navbar-h: 0px; }

  /* Two-row navbar: logo row + nav links row below */
  .top-navbar {
    position: relative;
    flex-wrap: wrap;
    padding: 0;
    height: auto;
  }
  .navbar-brand {
    width: 100%;
    height: 44px;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 0 12px;
  }
  .navbar-links {
    display: flex !important;
    width: 100%;
    height: 38px;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .navbar-links a {
    flex-shrink: 0;
    padding: 0 14px;
    font-size: 12px;
    height: 38px;
    display: flex;
    align-items: center;
  }
  .navbar-right { position: absolute; right: 10px; top: 6px; padding-right: 0; }
  body { padding-top: 0 !important; }
  .sidebar { top: 0; }
  .sidebar-overlay { top: 0; }
  .navbar-brand { padding: 0 6px; border-right: none; }
  .navbar-brand .brand-logo { width: 26px; height: 26px; margin-right: 5px; }
  .navbar-brand .brand-text { font-size: 14px; }
  .navbar-links { display: none; }
  .navbar-right { padding-right: 4px; gap: 2px; }
  .nav-icon-btn { width: 30px; height: 30px; font-size: 14px; }
  .user-dropdown { padding: 2px 4px; gap: 3px; }
  .user-avatar { width: 26px; height: 26px; }
  .user-name { font-size: 12px; }
  .user-role { display: none; }
  .fa-caret-down { display: none; }

  /* Sidebar - off canvas from left */
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    width: 260px;
    z-index: 1025;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 4px 0 16px rgba(0,0,0,0.15);
  }

  /* Overlay */
  .sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1019; top: var(--navbar-h);
  }
  .sidebar-overlay.show { display: block; }

  /* Content full width, navbar is static */
  .content-wrapper { margin-left: 0; margin-top: 0; }
  .content-wrapper iframe { height: calc(100vh - 82px); }

  /* Hamburger visible */
  .mobile-sidebar-toggle {
    display: flex !important;
    width: 34px; height: 34px;
    margin-right: 2px;
  }

  /* Sub-page adjustments */
  .page-container { padding: 12px 10px; }
  .stats-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .content-columns { grid-template-columns: 1fr; }
  .bounty-grid { grid-template-columns: 1fr; }
  .filters-bar { flex-direction: column; align-items: stretch; gap: 6px; }
  .filters-bar .form-control, .filters-bar .search-input { width: 100%; }
  .btn { padding: 8px 13px; font-size: 13px; min-height: 34px; }
  .table-custom th, .table-custom td { padding: 7px 8px; font-size: 11px; }
  .table-custom { display: block; overflow-x: auto; }
  .page-header h2 { font-size: 17px; }
  .row > [class*="col-"] { width: 100%; margin-bottom: 8px; }

  /* Hide large desktop elements */
  .breadcrumb, .footer, .pagination-custom { font-size: 11px; }
}
