/* ── v-cloak: скрывать Vue-шаблоны до монтирования ──────────────────────── */
[v-cloak] { display: none !important; }

/* ── App layout (sidebar nav + content) ─────────────────────────────────── */

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #f0f2f5; color: #1a1a2e; }

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

/* Sidebar */
#appSidebar {
  background: #1a1a2e;
  color: #e8e8f0;
  display: flex;
  flex-direction: column;
  padding: 0;
  position: sticky;
  top: 0;
  height: 100vh;
}
.nav-logo { font-size: 16px; font-weight: 700; color: #fff; padding: 24px 20px 20px; border-bottom: 1px solid #2a2a4a; }
.nav-logo span { color: #6c63ff; }
.nav-items { display: flex; flex-direction: column; padding: 12px 0; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  font-size: 13px; color: #9090b0; text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: #252540; color: #e8e8f0; }
.nav-item.active { background: #1e1e3a; color: #fff; border-left: 3px solid #6c63ff; padding-left: 17px; }
.nav-icon { font-size: 15px; min-width: 20px; }
.nav-footer { padding: 16px 20px; border-top: 1px solid #2a2a4a; display: flex; flex-direction: column; gap: 8px; }
.nav-user { font-size: 11px; color: #6060a0; }
.nav-logout-btn { background: none; border: 1px solid #3a3a5a; color: #9090b0; font-size: 12px; padding: 6px 10px; border-radius: 6px; cursor: pointer; text-align: left; transition: background 0.15s, color 0.15s; }
.nav-logout-btn:hover { background: #2a2a4a; color: #e8e8f0; }

/* Main content */
.app-content { padding: 32px; overflow-y: auto; }
.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: 20px; font-weight: 700; color: #1a1a2e; }
.page-header p  { font-size: 13px; color: #7070a0; margin-top: 4px; }

/* Card */
.card { background: #fff; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.07); padding: 24px; margin-bottom: 20px; }
.card-title { font-size: 14px; font-weight: 700; color: #1a1a2e; margin-bottom: 18px; }

/* Form */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-label { font-size: 12px; font-weight: 600; color: #4a4a6a; text-transform: uppercase; letter-spacing: 0.6px; }
.form-label .optional { font-weight: 400; color: #9090b0; text-transform: none; letter-spacing: 0; margin-left: 4px; }
.form-input, .form-select, .form-textarea {
  padding: 9px 12px; border: 1px solid #d8d8e8; border-radius: 8px;
  font-size: 13px; color: #1a1a2e; background: #fff;
  transition: border-color 0.15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: #6c63ff; }
.form-textarea { resize: vertical; min-height: 80px; font-family: inherit; line-height: 1.5; }
.form-hint { font-size: 11px; color: #9090b0; }

/* Tags input */
.tags-input-wrap { border: 1px solid #d8d8e8; border-radius: 8px; padding: 6px 10px; display: flex; flex-wrap: wrap; gap: 6px; cursor: text; min-height: 40px; align-items: center; background: #fff; transition: border-color 0.15s; }
.tags-input-wrap:focus-within { border-color: #6c63ff; }
.tag-item { background: #f0eeff; color: #5a52e0; font-size: 12px; padding: 3px 8px; border-radius: 20px; display: flex; align-items: center; gap: 4px; }
.tag-remove { cursor: pointer; font-size: 14px; line-height: 1; color: #9090b0; }
.tag-remove:hover { color: #e05a52; }
.tags-text-input { border: none; outline: none; font-size: 13px; min-width: 120px; flex: 1; font-family: inherit; }

/* Platform checkboxes */
.plat-checks { display: flex; flex-wrap: wrap; gap: 10px; }
.plat-check { display: none; }
.plat-check-label {
  padding: 7px 14px; border-radius: 20px; font-size: 12px; font-weight: 600;
  cursor: pointer; border: 2px solid transparent; transition: all 0.15s;
  background: #f0f2f5; color: #7070a0;
}
.plat-check:checked + .plat-check-label { border-color: currentColor; background: #fff; }
.plat-check-label.perplexity { color: #20b2aa; }
.plat-check-label.grok       { color: #e67e22; }
.plat-check-label.gemini     { color: #db2777; }
.plat-check-label.serp       { color: #3498db; }
.plat-check-label.openai     { color: #16a34a; }

/* Buttons */
.btn-primary { background: #6c63ff; color: #fff; border: none; border-radius: 8px; padding: 10px 24px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.15s; }
.btn-primary:hover { background: #5a52e0; }
.btn-primary:disabled { background: #b0aae0; cursor: not-allowed; }
.save-bar { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.save-status { font-size: 13px; color: #1a6640; }

/* Login page */
body.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #1a1a2e; }
.login-card { background: #fff; border-radius: 16px; padding: 40px; width: 360px; box-shadow: 0 8px 40px rgba(0,0,0,0.3); }
.login-logo { font-size: 20px; font-weight: 700; color: #1a1a2e; margin-bottom: 8px; }
.login-logo span { color: #6c63ff; }
.login-sub { font-size: 13px; color: #9090b0; margin-bottom: 28px; }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-error { color: #a02020; font-size: 13px; background: #fde8e8; padding: 8px 12px; border-radius: 6px; display: none; }
.login-error.show { display: block; }
.login-btn { background: #6c63ff; color: #fff; border: none; border-radius: 8px; padding: 11px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.15s; }
.login-btn:hover { background: #5a52e0; }
.login-btn:disabled { background: #b0aae0; cursor: not-allowed; }
