/* PhoneToolkit — Vivo Fastboot Info (clean single-purpose theme) */

:root {
  --status-green: #10B981;
  --status-red: #F43F5E;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Fira Code', monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

body.dark-theme {
  --bg-main: #0A0A0A;
  --bg-header: rgba(14, 14, 14, 0.96);
  --bg-card: rgba(20, 20, 20, 0.85);
  --bg-card-hover: rgba(28, 28, 28, 0.95);
  --bg-inset: rgba(0, 0, 0, 0.25);
  --bg-terminal: #050505;
  --border-subtle: rgba(255, 255, 255, 0.12);
  --accent-primary: #FFFFFF;
  --accent-glow: rgba(255, 255, 255, 0.15);
  --btn-primary-bg: #FFFFFF;
  --btn-primary-text: #000000;
  --text-main: #FFFFFF;
  --text-muted: #A3A3A3;
  --text-dim: #666666;
  --terminal-text: #E5E5E5;
}

body.light-theme {
  --bg-main: #F8F9FA;
  --bg-header: rgba(255, 255, 255, 0.96);
  --bg-card: #FFFFFF;
  --bg-card-hover: #F1F3F5;
  --bg-inset: rgba(0, 0, 0, 0.04);
  --bg-terminal: #0F172A;
  --border-subtle: rgba(0, 0, 0, 0.12);
  --accent-primary: #000000;
  --accent-glow: rgba(0, 0, 0, 0.12);
  --btn-primary-bg: #000000;
  --btn-primary-text: #FFFFFF;
  --text-main: #000000;
  --text-muted: #475569;
  --text-dim: #94A3B8;
  --terminal-text: #FDE68A;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-font-smoothing: antialiased; }

html, body {
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  font-family: var(--font-body);
  background: var(--bg-main);
  color: var(--text-main);
  transition: background-color 0.25s ease, color 0.25s ease;
}

.app-container { display: flex; flex-direction: column; min-height: 100vh; width: 100%; }

/* Header */
.app-header {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--bg-header);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 50;
}
.app-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
}
.brand { display: flex; align-items: center; gap: 8px; }
.brand-text h1 { font-size: 1.05rem; font-weight: 800; letter-spacing: 0.8px; }
.version-tag { font-size: 0.68rem; color: var(--text-muted); font-weight: 600; }
.header-status { display: flex; align-items: center; gap: 8px; }

/* Status pill */
.status-pill {
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  font-weight: 700;
  border: 1px solid var(--border-subtle);
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; }
.status-pill.offline { border-color: rgba(244, 63, 94, 0.4); color: var(--status-red); background: rgba(244, 63, 94, 0.08); }
.status-pill.offline .status-dot { background: var(--status-red); box-shadow: 0 0 8px var(--status-red); }
.status-pill.online { border-color: rgba(16, 185, 129, 0.4); color: var(--status-green); background: rgba(16, 185, 129, 0.08); }
.status-pill.online .status-dot { background: var(--status-green); box-shadow: 0 0 10px var(--status-green); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.25); opacity: 0.7; } }

/* Layout */
.content-area {
  flex: 1;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.page-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-header h2 { font-size: 1.15rem; font-weight: 800; }
.header-actions { display: flex; gap: 8px; }

/* Cards */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}
.hint-card { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }
.hint-card ol { margin: 8px 0 8px 18px; }
.hint-card strong { color: var(--text-main); }
.hint-note { font-size: 0.75rem; color: var(--text-dim); margin-top: 6px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  height: 36px;
  cursor: pointer;
  transition: all 0.18s ease;
  border: 1px solid transparent;
  font-family: var(--font-body);
}
.btn-sm { height: 30px; padding: 0 12px; font-size: 0.74rem; }
.btn-primary { background: var(--btn-primary-bg); color: var(--btn-primary-text); font-weight: 800; box-shadow: 0 4px 18px var(--accent-glow); }
.btn-primary:hover { filter: brightness(0.9); transform: translateY(-1px); }
.btn-secondary { background: var(--bg-card); border: 1px solid var(--border-subtle); color: var(--text-main); }
.btn-secondary:hover { background: var(--bg-card-hover); border-color: var(--text-main); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg-card-hover); color: var(--text-main); }

/* Device info */
.device-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.device-head h3 { font-size: 1rem; font-weight: 800; color: var(--accent-primary); }
.mono { font-family: var(--font-mono); }
.muted { color: var(--text-muted); font-size: 0.74rem; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.info-cell {
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.info-label { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-dim); font-weight: 700; }
.info-value { font-size: 0.85rem; font-weight: 600; font-family: var(--font-mono); word-break: break-word; }

/* Badges */
.badge { padding: 4px 10px; border-radius: 6px; font-size: 0.72rem; font-weight: 700; white-space: nowrap; }
.badge-gold { background: rgba(255, 255, 255, 0.1); color: var(--text-main); border: 1px solid var(--border-subtle); }
.badge-green { background: rgba(16, 185, 129, 0.15); color: var(--status-green); border: 1px solid var(--status-green); }
.badge-red { background: rgba(244, 63, 94, 0.15); color: var(--status-red); border: 1px solid var(--status-red); }

/* Table */
.table-responsive { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; font-family: var(--font-mono); }
.data-table th { text-align: left; color: var(--text-dim); padding: 8px; border-bottom: 1px solid var(--border-subtle); font-weight: 700; }
.data-table td { padding: 6px 8px; border-bottom: 1px solid var(--border-subtle); word-break: break-word; }
.data-table td:first-child { color: var(--text-muted); white-space: nowrap; }

/* Console */
.console-card { padding: 14px; }
.console-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.console-header span { font-size: 0.8rem; font-weight: 700; }
.log-actions { display: flex; gap: 6px; }
.terminal-log {
  background: var(--bg-terminal);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--terminal-text);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.5;
  padding: 12px 14px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 120px;
  max-height: 300px;
  resize: vertical;
}

.hidden { display: none !important; }

@media (max-width: 560px) {
  .brand-text h1 { font-size: 0.9rem; }
  .page-header h2 { font-size: 1rem; }
  .header-actions { width: 100%; }
  .header-actions .btn { flex: 1; }
}
