/* ── Orbit 360 Auto Reply — v1.1.0 ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --o-ink: #0a0a14;
  --o-primary: #4f46e5;
  --o-primary-dark: #3730a3;
  --o-primary-light: #eef2ff;
  --o-accent: #06b6d4;
  --o-success: #10b981;
  --o-warn: #f59e0b;
  --o-danger: #ef4444;
  --o-bg: #f8f9fc;
  --o-surface: #ffffff;
  --o-border: #e4e7f0;
  --o-muted: #6b7280;
  --o-radius: 14px;
  --o-radius-sm: 8px;
  --o-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.06);
  --o-shadow-lg: 0 8px 32px rgba(0,0,0,.12);
}

/* ── BASE ── */
.orbit360-admin, .o-dash, .o-login {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--o-ink);
  -webkit-font-smoothing: antialiased;
}

/* ── ADMIN WRAPPER ── */
.orbit360-admin { max-width: 1200px; padding: 8px 0 40px; }

.o-admin-header { margin-bottom: 24px; }
.o-admin-header h1 { font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.o-admin-header p { color: var(--o-muted); margin: 0; }
.o-flex-between { display: flex; align-items: center; justify-content: space-between; }

/* ── NOTICES ── */
.o-notice { padding: 12px 16px; border-radius: var(--o-radius-sm); margin-bottom: 20px; font-weight: 500; }
.o-notice-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.o-notice-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ── STAT CARDS ── */
.o-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 28px; }
.o-card { background: var(--o-surface); border: 1px solid var(--o-border); border-radius: var(--o-radius); padding: 20px; box-shadow: var(--o-shadow); display: flex; flex-direction: column; gap: 6px; }
.o-card-icon { font-size: 22px; line-height: 1; }
.o-card-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--o-muted); }
.o-card-val { font-size: 32px; font-weight: 800; color: var(--o-primary); line-height: 1; }

.o-quick-actions { display: flex; gap: 12px; margin-bottom: 24px; }

/* ── BUTTONS ── */
.o-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--o-primary); color: #fff;
  border: none; border-radius: var(--o-radius-sm);
  padding: 10px 20px; font-size: 14px; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: background .15s, transform .1s;
  font-family: inherit; line-height: 1.4;
}
.o-btn:hover { background: var(--o-primary-dark); color: #fff; text-decoration: none; transform: translateY(-1px); }
.o-btn:active { transform: translateY(0); }
.o-btn-outline { background: transparent; color: var(--o-primary); border: 2px solid var(--o-primary); }
.o-btn-outline:hover { background: var(--o-primary-light); color: var(--o-primary-dark); }
.o-btn-sm { padding: 6px 14px; font-size: 13px; }

/* ── BADGES ── */
.o-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.o-badge-active, .o-badge-posted { background: #ecfdf5; color: #065f46; }
.o-badge-trial { background: #eff6ff; color: #1d4ed8; }
.o-badge-expired { background: #fef2f2; color: #991b1b; }
.o-badge-suspended { background: #fafafa; color: #374151; }
.o-badge-pending { background: #fffbeb; color: #92400e; }

/* ── TABLE ── */
.o-table-wrap { overflow-x: auto; border-radius: var(--o-radius); border: 1px solid var(--o-border); }
.o-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.o-table thead { background: #f9fafb; }
.o-table th { padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--o-muted); border-bottom: 1px solid var(--o-border); white-space: nowrap; }
.o-table td { padding: 14px 16px; border-bottom: 1px solid var(--o-border); vertical-align: top; }
.o-table tbody tr:last-child td { border-bottom: none; }
.o-table tbody tr:hover td { background: #f9fafb; }
.o-review-cell { max-width: 220px; font-size: 13px; }
.o-muted { color: var(--o-muted); font-size: 12px; }

/* ── FORM ── */
.o-form-card { background: var(--o-surface); border: 1px solid var(--o-border); border-radius: var(--o-radius); overflow: hidden; box-shadow: var(--o-shadow); }
.o-form-section { padding: 24px 28px; border-bottom: 1px solid var(--o-border); }
.o-form-section:last-of-type { border-bottom: none; }
.o-form-section h3 { font-size: 15px; font-weight: 700; margin: 0 0 16px; color: var(--o-ink); }
.o-formgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.o-full { grid-column: 1 / -1; }
.o-label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: #374151; }
.o-input { width: 100%; padding: 10px 14px; border: 1px solid var(--o-border); border-radius: var(--o-radius-sm); font-size: 14px; font-family: inherit; color: var(--o-ink); background: #fff; transition: border-color .15s, box-shadow .15s; box-sizing: border-box; }
.o-input:focus { outline: none; border-color: var(--o-primary); box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
.o-textarea { min-height: 100px; resize: vertical; }
.o-checkbox-label { flex-direction: row; align-items: center; gap: 10px; font-weight: 500; }
.o-checkbox-label input { width: 16px; height: 16px; accent-color: var(--o-primary); }
.o-form-footer { padding: 20px 28px; background: #f9fafb; }

/* ── STATUS PANEL (settings) ── */
.o-status-panel { background: var(--o-surface); border: 1px solid var(--o-border); border-radius: var(--o-radius); padding: 20px; margin-bottom: 24px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--o-shadow); }
.o-status-item { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; }
.o-status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.o-status-item.ok .o-status-dot { background: var(--o-success); }
.o-status-item.err .o-status-dot { background: var(--o-danger); }
.o-status-item.info .o-status-dot { background: var(--o-accent); }
.o-status-item code { font-size: 12px; background: #f3f4f6; padding: 2px 6px; border-radius: 4px; }

/* ── INFO BOX ── */
.o-info-box { background: var(--o-primary-light); border: 1px solid #c7d2fe; border-radius: var(--o-radius-sm); padding: 12px 16px; font-size: 13px; color: #3730a3; margin-bottom: 16px; }
.o-info-box a { color: var(--o-primary); }
.o-info-box code { font-size: 12px; background: #e0e7ff; padding: 1px 5px; border-radius: 3px; }

/* ── EMPTY STATE ── */
.o-empty { background: var(--o-surface); border: 2px dashed var(--o-border); border-radius: var(--o-radius); padding: 40px; text-align: center; color: var(--o-muted); font-size: 15px; }

/* ── ALERT ── */
.o-alert { padding: 12px 16px; border-radius: var(--o-radius-sm); margin-bottom: 20px; font-size: 14px; font-weight: 500; }
.o-alert-warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }

/* ════════════════════════════════════════
   LOGIN PAGE
════════════════════════════════════════ */
.o-login {
  min-height: 100vh; display: grid; grid-template-columns: 1fr 480px;
  background: #0d0b2e;
}
.o-login-brand {
  display: flex; flex-direction: column; justify-content: center;
  padding: 60px; color: #fff;
  background: linear-gradient(145deg, #0d0b2e 0%, #1e1b6b 60%, #312fa0 100%);
  position: relative; overflow: hidden;
}
.o-login-brand::before {
  content: ''; position: absolute; top: -120px; right: -120px;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,.25) 0%, transparent 70%);
  pointer-events: none;
}
.o-login-logo {
  width: 56px; height: 56px; background: var(--o-primary); border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 28px;
  font-family: 'Inter', sans-serif;
}
.o-login-brand h1 { font-size: 42px; font-weight: 800; line-height: 1.15; margin: 0 0 14px; }
.o-login-brand > p { font-size: 17px; color: rgba(255,255,255,.7); margin: 0 0 32px; line-height: 1.6; }
.o-login-features { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.o-login-features li { color: rgba(255,255,255,.85); font-size: 15px; }

.o-login-right {
  display: flex; align-items: center; justify-content: center;
  background: #fff; padding: 40px;
}
.o-login-card { width: 100%; max-width: 380px; }
.o-login-card h2 { font-size: 26px; font-weight: 800; margin: 0 0 6px; }
.o-login-sub { color: var(--o-muted); font-size: 14px; margin: 0 0 28px; }
.o-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.o-field label { font-size: 13px; font-weight: 600; color: #374151; }
.o-field input {
  width: 100%; padding: 12px 16px; border: 1.5px solid var(--o-border);
  border-radius: var(--o-radius-sm); font-size: 15px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s; box-sizing: border-box;
}
.o-field input:focus { outline: none; border-color: var(--o-primary); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
.o-login-btn {
  width: 100%; padding: 14px; background: var(--o-primary); color: #fff;
  border: none; border-radius: var(--o-radius-sm); font-size: 15px; font-weight: 700;
  cursor: pointer; margin-top: 8px; font-family: inherit; transition: background .15s;
}
.o-login-btn:hover { background: var(--o-primary-dark); }
.o-login-card .msg { font-size: 13px; color: var(--o-danger); margin: 10px 0 0; min-height: 20px; }

/* ════════════════════════════════════════
   DASHBOARD
════════════════════════════════════════ */
.o-dash {
  display: grid; grid-template-columns: 240px 1fr;
  min-height: 90vh; background: var(--o-bg);
  font-family: 'Inter', -apple-system, sans-serif;
}
.o-sidebar {
  background: #0d0b2e; color: #fff;
  display: flex; flex-direction: column; padding: 24px 16px;
  min-height: 90vh;
}
.o-sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 0 8px; margin-bottom: 32px;
}
.o-sidebar-logo {
  width: 36px; height: 36px; background: var(--o-primary); border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.o-sidebar-brand span:last-child { font-weight: 700; font-size: 15px; }
.o-sidebar-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.o-nav-item {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  border-radius: 10px; color: rgba(255,255,255,.65);
  font-size: 14px; font-weight: 500; cursor: pointer;
  transition: background .15s, color .15s; user-select: none;
}
.o-nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.o-nav-item.active { background: var(--o-primary); color: #fff; }
.o-logout-btn {
  background: rgba(255,255,255,.08); color: rgba(255,255,255,.7);
  border: none; border-radius: 10px; padding: 10px 12px; font-size: 14px;
  cursor: pointer; font-family: inherit; text-align: left; width: 100%;
  transition: background .15s; margin-top: 8px;
}
.o-logout-btn:hover { background: rgba(239,68,68,.2); color: #fca5a5; }

.o-dash-main { padding: 28px 32px; overflow-y: auto; }
.o-dash-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--o-border); }
.o-dash-header h1 { font-size: 22px; font-weight: 800; margin: 0 0 6px; }
.o-header-meta { display: flex; align-items: center; gap: 10px; }

/* Sections */
.o-section { display: none; }
.o-section.active { display: block; }
.o-section-title { font-size: 18px; font-weight: 700; margin: 0 0 6px; }
.o-section-desc { color: var(--o-muted); font-size: 14px; margin: 0 0 20px; }

/* Info row */
.o-info-row { display: flex; flex-wrap: wrap; gap: 0; background: var(--o-surface); border: 1px solid var(--o-border); border-radius: var(--o-radius); overflow: hidden; margin-top: 20px; box-shadow: var(--o-shadow); }
.o-info-item { flex: 1; min-width: 150px; padding: 16px 20px; border-right: 1px solid var(--o-border); }
.o-info-item:last-child { border-right: none; }
.o-info-item label { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--o-muted); margin-bottom: 4px; }
.o-info-item span { font-size: 14px; font-weight: 600; }

/* AI Panel */
.o-ai-panel { background: var(--o-surface); border: 1px solid var(--o-border); border-radius: var(--o-radius); padding: 24px; box-shadow: var(--o-shadow); }
.o-ai-panel textarea { width: 100%; padding: 14px; border: 1.5px solid var(--o-border); border-radius: var(--o-radius-sm); font-size: 14px; font-family: inherit; resize: vertical; box-sizing: border-box; transition: border-color .15s; }
.o-ai-panel textarea:focus { outline: none; border-color: var(--o-primary); box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
.o-ai-row { display: flex; align-items: flex-end; gap: 12px; margin-top: 14px; }
.o-field-inline { display: flex; flex-direction: column; gap: 6px; }
.o-field-inline label { font-size: 12px; font-weight: 600; color: var(--o-muted); }
.o-field-inline select { padding: 10px 14px; border: 1.5px solid var(--o-border); border-radius: var(--o-radius-sm); font-size: 14px; font-family: inherit; }
.o-ai-output { margin-top: 20px; background: #f8f9ff; border: 1px solid #c7d2fe; border-radius: var(--o-radius-sm); padding: 18px; }
.o-ai-output label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--o-muted); display: block; margin-bottom: 8px; }
#o-ai-text { font-size: 14px; line-height: 1.7; color: var(--o-ink); white-space: pre-wrap; }
.o-copy-btn { margin-top: 14px; background: transparent; border: 1.5px solid var(--o-primary); color: var(--o-primary); border-radius: var(--o-radius-sm); padding: 7px 16px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; transition: background .15s; }
.o-copy-btn:hover { background: var(--o-primary-light); }

/* Google panel */
.o-google-panel { background: var(--o-surface); border: 1px solid var(--o-border); border-radius: var(--o-radius); padding: 28px; box-shadow: var(--o-shadow); }
.o-google-status { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 24px; }
.o-google-icon { width: 48px; height: 48px; background: linear-gradient(135deg, #4285f4, #34a853); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 22px; font-weight: 800; flex-shrink: 0; }
.o-google-status b { display: block; font-size: 16px; margin-bottom: 4px; }
.o-google-status p { color: var(--o-muted); margin: 0; font-size: 14px; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .o-login { grid-template-columns: 1fr; }
  .o-login-brand { padding: 40px 28px; min-height: auto; }
  .o-login-right { padding: 32px 20px; }
  .o-dash { grid-template-columns: 1fr; }
  .o-sidebar { min-height: auto; }
  .o-grid { grid-template-columns: 1fr 1fr; }
  .o-formgrid { grid-template-columns: 1fr; }
  .o-dash-main { padding: 20px 16px; }
}
