/* peck-host pro dashboard */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
  --bg:       #0a0b0f;
  --bg2:      #111318;
  --bg3:      #1a1d27;
  --border:   rgba(255,255,255,0.07);
  --text:     #e8eaf0;
  --text2:    #8890a4;
  --accent:   #7c6af7;
  --accent2:  #a78bfa;
  --green:    #34d399;
  --red:      #f87171;
  --yellow:   #fbbf24;
  --r:        10px;
  --r-sm:     6px;
  --font:     'Inter', system-ui, sans-serif;
  --mono:     'JetBrains Mono', monospace;
  --trans:    0.15s ease;
}

body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.6; }

/* Layout */
.app { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }

/* Sidebar */
.sidebar {
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 24px 16px;
  position: sticky; top: 0; height: 100vh;
}

.logo { display: flex; align-items: center; gap: 8px; margin-bottom: 32px; padding: 0 8px; }
.logo-icon { font-size: 24px; }
.logo-text { font-size: 18px; font-weight: 700; letter-spacing: -0.5px; }
.logo-accent { color: var(--accent2); }

.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--r-sm);
  background: none; border: none; color: var(--text2);
  font: inherit; font-size: 13.5px; font-weight: 500;
  cursor: pointer; text-align: left; transition: var(--trans);
}
.nav-item:hover { background: var(--bg3); color: var(--text); }
.nav-item.active { background: rgba(124,106,247,0.15); color: var(--accent2); }
.nav-icon { font-size: 15px; }

.sidebar-footer { margin-top: 24px; display: flex; flex-direction: column; gap: 8px; }
.wallet-badge { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: var(--bg3); border-radius: var(--r-sm); }
.wallet-text { font-size: 12px; color: var(--text2); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-online { background: var(--green); box-shadow: 0 0 6px var(--green); }
.dot-offline { background: var(--text2); }
.dot-checking { background: var(--yellow); animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* Topbar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-bottom: 1px solid var(--border);
  background: var(--bg); position: sticky; top: 0; z-index: 10;
}
.page-title { font-size: 18px; font-weight: 600; }
.health-badge { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text2); background: var(--bg2); padding: 6px 12px; border-radius: 20px; border: 1px solid var(--border); }

/* Content */
.main { display: flex; flex-direction: column; }
.content { padding: 24px; }
.section { display: none; }
.section.active { display: block; }

/* Buttons */
.btn {
  padding: 8px 16px; border-radius: var(--r-sm); border: none;
  font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
  transition: var(--trans); white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent2); filter: brightness(1.1); }
.btn-ghost { background: var(--bg3); color: var(--text2); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--border); }
.btn-connect { background: linear-gradient(135deg, var(--accent), #a78bfa); color: #fff; border: none; border-radius: var(--r-sm); padding: 9px 12px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; text-align: center; transition: var(--trans); }
.btn-connect:hover { filter: brightness(1.1); }
.btn-lg { padding: 12px 28px; font-size: 14px; width: 100%; margin-top: 8px; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-danger { background: rgba(248,113,113,0.15); color: var(--red); border: 1px solid rgba(248,113,113,0.3); }
.btn-danger:hover { background: rgba(248,113,113,0.25); }

/* Section actions */
.section-actions { display: flex; gap: 8px; margin-bottom: 20px; }

/* Cards */
.card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; }
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-header h3 { font-size: 14px; font-weight: 600; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }

/* Service card */
.service-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); padding: 16px; transition: var(--trans); }
.service-card:hover { border-color: rgba(124,106,247,0.3); }
.service-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.service-name { font-weight: 600; font-size: 14px; }
.service-url { font-size: 11px; color: var(--text2); font-family: var(--mono); margin-bottom: 12px; }
.service-url a { color: var(--accent2); text-decoration: none; }
.service-url a:hover { text-decoration: underline; }
.service-meta { display: flex; gap: 16px; margin-bottom: 12px; }
.service-stat { font-size: 12px; color: var(--text2); }
.service-stat strong { color: var(--text); display: block; font-size: 13px; }
.service-actions { display: flex; gap: 8px; }

/* Badges */
.badge { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.5px; }
.badge-green { background: rgba(52,211,153,0.15); color: var(--green); }
.badge-yellow { background: rgba(251,191,36,0.15); color: var(--yellow); }
.badge-gray { background: rgba(136,144,164,0.15); color: var(--text2); }
.badge-red { background: rgba(248,113,113,0.15); color: var(--red); }

/* Channel card */
.channel-card { margin-bottom: 24px; }
.channel-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 20px; }
.stat-label { font-size: 11px; color: var(--text2); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.stat-value { font-size: 20px; font-weight: 600; font-family: var(--mono); }
.channel-input-row { display: flex; gap: 10px; }

/* Inputs */
.input {
  background: var(--bg3); border: 1px solid var(--border); border-radius: var(--r-sm);
  color: var(--text); font: inherit; padding: 8px 12px; font-size: 13px;
  transition: var(--trans); width: 100%;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(124,106,247,0.2); }
.input::placeholder { color: var(--text2); }
.input-mono { font-family: var(--mono); font-size: 12px; }

/* Forms */
.deploy-form { max-width: 700px; }
.form-group { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-label { display: block; font-size: 12px; font-weight: 500; color: var(--text2); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.4px; }
.optional { font-weight: 400; text-transform: none; letter-spacing: 0; }
.radio-group { display: flex; gap: 16px; }
.radio-option { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; color: var(--text); }
.radio-option input { accent-color: var(--accent); }

/* Domain search */
.search-bar { display: flex; gap: 10px; margin-bottom: 20px; }
.domain-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; }
.domain-name { font-family: var(--mono); font-size: 13px; font-weight: 500; }
.domain-price { font-size: 12px; color: var(--green); font-family: var(--mono); margin-right: 12px; }

/* Deploy estimate */
.deploy-estimate { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 12px 16px; font-size: 12.5px; color: var(--text2); margin-top: 4px; margin-bottom: 4px; }
.deploy-status { margin-top: 12px; font-size: 13px; min-height: 20px; }
.status-success { color: var(--green); }
.status-error { color: var(--red); }
.status-loading { color: var(--yellow); }

/* Misc */
.subsection-title { font-size: 14px; font-weight: 600; color: var(--text2); margin-bottom: 12px; margin-top: 4px; }
.divider { height: 1px; background: var(--border); margin: 24px 0; }
.loading-state, .empty-state { color: var(--text2); font-size: 13px; padding: 24px; text-align: center; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); }
.error-card { background: rgba(248,113,113,0.08); border: 1px solid rgba(248,113,113,0.2); border-radius: var(--r); padding: 12px 16px; color: var(--red); font-size: 13px; margin-bottom: 12px; }

/* Billing usage rows */
.usage-row { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; }
.usage-label { font-size: 13px; font-weight: 500; }
.usage-stats { display: flex; gap: 24px; font-size: 12px; color: var(--text2); }
.usage-stats span strong { color: var(--text); }
