/* ============================================================
   Agent X7 Global Design System
   Cyber/Hacker Dark Theme
   ============================================================ */

/* CSS Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* Dark body + cyber grid background */
body {
  background-color: #0a0a0f;
  background-image:
    linear-gradient(rgba(0,255,178,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,178,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  color: #c8d8e8;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  padding-top: 56px; /* topbar height */
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #0a0a0f; }
::-webkit-scrollbar-thumb { background: #00ffb2; border-radius: 3px; }

/* Links */
a { color: #00ffb2; text-decoration: none; }
a:hover { color: #00e5ff; text-decoration: underline; }

/* ============================================================
   Layout
   ============================================================ */
.x7-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 16px 90px;
}

/* ============================================================
   Panel / Card
   ============================================================ */
.x7-panel {
  background: rgba(0,20,30,0.85);
  border: 1px solid rgba(0,255,178,0.18);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 0 18px rgba(0,255,178,0.06);
}

.x7-card {
  background: rgba(0,15,25,0.9);
  border: 1px solid rgba(0,255,178,0.22);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.x7-card:hover {
  border-color: rgba(0,255,178,0.5);
  box-shadow: 0 0 12px rgba(0,255,178,0.12);
}

/* ============================================================
   Buttons
   ============================================================ */
.x7-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 38px;
  text-decoration: none;
}
.x7-btn-primary {
  background: linear-gradient(135deg, #00ffb2, #00c896);
  color: #0a0a0f;
}
.x7-btn-primary:hover {
  background: linear-gradient(135deg, #00e5ff, #00b8d4);
  box-shadow: 0 0 16px rgba(0,255,178,0.4);
  color: #0a0a0f;
  text-decoration: none;
}
.x7-btn-danger {
  background: linear-gradient(135deg, #ff4444, #cc0000);
  color: #fff;
}
.x7-btn-danger:hover {
  background: linear-gradient(135deg, #ff6666, #ff2222);
  box-shadow: 0 0 16px rgba(255,68,68,0.4);
  text-decoration: none;
}
.x7-btn-secondary {
  background: rgba(0,255,178,0.1);
  border: 1px solid rgba(0,255,178,0.3);
  color: #00ffb2;
}
.x7-btn-secondary:hover {
  background: rgba(0,255,178,0.2);
  box-shadow: 0 0 12px rgba(0,255,178,0.2);
  text-decoration: none;
}

/* ============================================================
   Grid
   ============================================================ */
.x7-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.x7-grid-2 { grid-template-columns: repeat(2, 1fr); }
.x7-grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3, h4 {
  color: #00ffb2;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}
h1 { font-size: 1.8rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }

.x7-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.x7-badge-green { background: rgba(0,255,178,0.15); color: #00ffb2; border: 1px solid rgba(0,255,178,0.3); }
.x7-badge-blue  { background: rgba(0,229,255,0.15); color: #00e5ff; border: 1px solid rgba(0,229,255,0.3); }
.x7-badge-red   { background: rgba(255,68,68,0.15);  color: #ff4444; border: 1px solid rgba(255,68,68,0.3); }
.x7-badge-gray  { background: rgba(100,120,140,0.2); color: #8899aa; border: 1px solid rgba(100,120,140,0.3); }

/* ============================================================
   Tables
   ============================================================ */
.x7-table { width: 100%; border-collapse: collapse; }
.x7-table th {
  background: rgba(0,255,178,0.1);
  color: #00ffb2;
  padding: 10px 12px;
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid rgba(0,255,178,0.2);
}
.x7-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0,255,178,0.07);
  vertical-align: middle;
  overflow-wrap: anywhere;
}
.x7-table tr:hover td { background: rgba(0,255,178,0.04); }

/* Mobile table cards */
@media (max-width: 600px) {
  .x7-table-wrap { overflow-x: auto; }
  .x7-table-mobile thead { display: none; }
  .x7-table-mobile tr {
    display: block;
    background: rgba(0,15,25,0.9);
    border: 1px solid rgba(0,255,178,0.18);
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 10px;
  }
  .x7-table-mobile td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    border: none;
    padding: 5px 0;
    font-size: 13px;
  }
  .x7-table-mobile td::before {
    content: attr(data-label);
    font-weight: 700;
    color: #00ffb2;
    font-size: 11px;
    text-transform: uppercase;
    min-width: 80px;
    flex-shrink: 0;
  }
}

/* ============================================================
   Forms
   ============================================================ */
.x7-form-group { margin-bottom: 16px; }
.x7-form-group label {
  display: block;
  color: #00ffb2;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.x7-input, .x7-select, .x7-textarea {
  width: 100%;
  background: rgba(0,20,30,0.9);
  border: 1px solid rgba(0,255,178,0.25);
  border-radius: 6px;
  color: #c8d8e8;
  font-size: 14px;
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.x7-input:focus, .x7-select:focus, .x7-textarea:focus {
  border-color: #00ffb2;
  box-shadow: 0 0 8px rgba(0,255,178,0.2);
}
.x7-select option { background: #0a0a0f; }

/* ============================================================
   Tabs
   ============================================================ */
.x7-tabs-wrap {
  display: flex;
  overflow-x: auto;
  gap: 6px;
  padding-bottom: 4px;
  margin-bottom: 16px;
  scrollbar-width: none;
}
.x7-tabs-wrap::-webkit-scrollbar { display: none; }
.x7-tab {
  flex: 0 0 auto;
  padding: 8px 16px;
  border: 1px solid rgba(0,255,178,0.2);
  border-radius: 6px;
  background: rgba(0,20,30,0.7);
  color: #8899aa;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s;
}
.x7-tab:hover { border-color: rgba(0,255,178,0.4); color: #00ffb2; }
.x7-tab.active {
  background: rgba(0,255,178,0.15);
  border-color: #00ffb2;
  color: #00ffb2;
}

/* ============================================================
   Status indicators
   ============================================================ */
.x7-status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}
.x7-status-online  { background: #00ffb2; box-shadow: 0 0 6px #00ffb2; animation: pulse 2s infinite; }
.x7-status-offline { background: #ff4444; }
.x7-status-warn    { background: #ffaa00; }
@keyframes pulse {
  0%,100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 700px) {
  .x7-page { padding: 12px 10px 90px; }
  .x7-grid-2, .x7-grid-3 { grid-template-columns: 1fr; }
  h1 { font-size: 1.4rem; }
  .x7-btn { width: 100%; justify-content: center; }
}
@media (max-width: 400px) {
  body { font-size: 13px; }
  .x7-panel { padding: 12px; }
}
