/* ==========================================================================
   Shiloh AI Playground CSS Style Sheet
   Premium Dark Glassmorphic Mobile-First Web Theme
   (CSS Variables provided by theme.css — loaded first)
   ========================================================================== */

/* Base resets & animations */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Hide native scrollbars on mobile but style on desktop */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.15);
}
::-webkit-scrollbar-thumb {
  background: var(--neon-violet-glow);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--neon-violet);
}

/* Utility Layouts */
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: var(--border-glass);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
}

.hidden {
  display: none !important;
}

/* User greeting tag — shown next to logo on mobile, hidden on desktop */
.user-greeting-tag {
  display: none;
}
.user-greeting-tag.hidden {
  display: none;
}

/* App Shell Structure */
.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* App Header (Desktop/Mobile adjustments) */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 25px;
  margin: 15px 15px 0 15px;
  z-index: 100;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-ring {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  overflow: hidden;
}

.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* Logo has built-in dark background, no invert needed */

.logo-text h1 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}

.logo-text span {
  font-size: 0.6rem;
  color: var(--neon-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  white-space: normal;
}

.desktop-nav {
  display: flex;
  gap: 10px;
}

.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.nav-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.nav-tab.active {
  color: var(--text-main);
  background: var(--bg-glass-active);
  box-shadow: inset 0 0 1px 1px rgba(255, 255, 255, 0.1);
  border-bottom: 2px solid var(--neon-violet);
}

/* Nav tab SVG icons */
.nav-svg-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: block;
}

  .system-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 6px 12px;
  border-radius: 20px;
  color: var(--text-secondary);
}

.status-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.status-pulse.offline {
  background-color: var(--neon-red);
  box-shadow: 0 0 8px var(--neon-red);
}

/* Main Content Router */
.app-main {
  flex: 1;
  padding: 15px 15px 0 15px;
  overflow-y: auto;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.4s ease;
  height: 100%;
  padding-bottom: 0;
}

.tab-panel.active {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   KANBAN SECTION STYLES
   ========================================== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.title-desc h2 {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 700;
}

.title-desc p {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

/* Mobile Kanban switches */
.mobile-kanban-toggle {
  display: none; /* Desktop default hidden */
  padding: 6px;
  gap: 4px;
  margin-bottom: 15px;
}

.mobile-column-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-title);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 10px 4px;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.mobile-column-tab.active {
  background: var(--bg-glass-active);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.mobile-column-tab .badge {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 0.7rem;
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  flex: 1;
  min-height: 0;
}

.kanban-column {
  display: flex;
  flex-direction: column;
  background: var(--bg-nav);
  border: var(--border-glass);
  border-radius: var(--border-radius-lg);
  padding: 15px;
  min-height: 0;
}

.column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.column-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.column-title i {
  font-size: 1.15rem;
}

.column-title h3 {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 600;
}

.column-count {
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
  padding: 2px 10px;
  border-radius: 12px;
  color: var(--text-secondary);
}

.column-cards {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 2px;
}

/* Kanban Article Cards */
.kanban-card {
  background: var(--bg-glass-card);
  border: var(--border-glass);
  border-radius: var(--border-radius-md);
  padding: 15px;
  transition: var(--transition-smooth);
  position: relative;
  cursor: grab;
  overflow: hidden;
  flex-shrink: 0;
}

.kanban-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.card-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.feed-name {
  font-size: 0.72rem;
  color: var(--neon-cyan);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.pub-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.card-title {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-title a {
  color: var(--text-main);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.card-title a:hover {
  color: var(--neon-cyan);
}

.card-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-author {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.card-btn {
  background: rgba(255, 255, 255, 0.04);
  border: none;
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-size: 0.75rem;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-btn:hover {
  background: var(--bg-glass-active);
  color: var(--text-main);
}

.card-btn.star-active {
  color: var(--neon-gold) !important;
  background: rgba(255, 215, 0, 0.08);
}

/* Highlight Column Colors */
.text-cyan { color: var(--neon-cyan); }
.text-violet { color: var(--neon-violet); }
.text-gold { color: var(--neon-gold); }
.text-gray { color: var(--text-muted); }

/* ==========================================
   NOTES SECTION STYLES
   ========================================== */
.notes-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  flex: 1;
  min-height: 0;
}

.notes-sidebar {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
}

.sidebar-header {
  padding: 15px;
  display: flex;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.search-bar {
  flex: 1;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--border-radius-md);
  border: var(--border-glass);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
}

.search-bar i {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.search-bar input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 0.88rem;
  width: 100%;
}

.notes-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 10px;
  gap: 6px;
}

.note-item {
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.note-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.note-item.active {
  background: var(--bg-glass-active);
  border-left: 3px solid var(--neon-violet);
  box-shadow: inset 0 0 1px rgba(255, 255, 255, 0.1);
}

.note-item h4 {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.note-item span {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Owner badge on note cards */
.note-owner-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-family: 'Fira Code', monospace;
  font-weight: 500;
  background: rgba(138, 43, 226, 0.12);
  color: var(--neon-violet);
  padding: 1px 7px;
  border-radius: 8px;
  margin-left: 6px;
  vertical-align: middle;
}

.note-owner-badge i {
  font-size: 0.6rem;
  margin-right: 2px;
}

.note-owner-badge--shared {
  background: rgba(255, 193, 7, 0.12);
  color: #ffc107;
}

/* Shared note card styling */
.note-shared {
  border-left: 2px solid rgba(255, 193, 7, 0.3);
}

.note-shared:hover {
  border-left-color: rgba(255, 193, 7, 0.6);
}

/* Owner badge in editor header */
.badge-owner {
  align-self: flex-start;
  background: rgba(255, 193, 7, 0.12) !important;
  color: #ffc107 !important;
  border: 1px solid rgba(255, 193, 7, 0.2) !important;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 8px;
  font-family: 'Fira Code', monospace;
  margin-left: 4px;
}

.notes-editor-pane {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  border-radius: var(--border-radius-lg);
}

.empty-state {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex: 1;
  padding: 40px;
  text-align: center;
}

.empty-icon {
  font-size: 3rem;
  color: var(--text-muted);
  margin-bottom: 15px;
  opacity: 0.4;
}

.empty-state h3 {
  font-family: var(--font-title);
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 20px;
  max-width: 320px;
}

/* Editor Container */
.editor-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.editor-header {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  gap: 15px;
}

.btn-back {
  display: none; /* Desktop default hidden */
}

.btn-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: var(--border-glass);
  color: var(--text-main);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-circle:hover {
  background: var(--bg-glass-active);
}

.note-meta-title {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.note-meta-title input {
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  width: 100%;
}

.note-meta-title .badge {
  align-self: flex-start;
  background: rgba(0, 245, 255, 0.08);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 245, 255, 0.15);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 8px;
  font-family: 'Fira Code', monospace;
}

.editor-actions {
  display: flex;
  gap: 8px;
}

/* Editor more menu dropdown */
.editor-more-menu {
  position: relative;
  display: inline-flex;
}
.editor-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  min-width: 160px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  overflow: hidden;
  animation: fadeIn 0.15s ease;
}
.editor-dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.82rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.15s;
}
.editor-dropdown button:hover {
  background: var(--bg-glass-active);
}
.editor-dropdown .dropdown-danger {
  color: var(--danger);
}
.editor-dropdown .dropdown-danger:hover {
  background: rgba(255, 59, 48, 0.1);
}

.editor-body {
  flex: 1;
  display: flex;
  position: relative;
  overflow: hidden;
}

.editor-textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  color: var(--text-main);
  font-family: 'Fira Code', monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  padding: 25px;
  overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.03);
}

.markdown-preview {
  flex: 1;
  padding: 25px;
  overflow-y: auto;
  line-height: 1.65;
  color: var(--text-main);
  font-size: 0.96rem;
}

/* Beautiful Markdown Typography */
.markdown-preview h1 { font-family: var(--font-title); font-size: 1.8rem; margin-bottom: 15px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); padding-bottom: 8px; }
.markdown-preview h2 { font-family: var(--font-title); font-size: 1.4rem; margin: 20px 0 10px 0; }
.markdown-preview h3 { font-family: var(--font-title); font-size: 1.15rem; margin: 15px 0 8px 0; }
.markdown-preview p { margin-bottom: 14px; }
.markdown-preview ul, .markdown-preview ol { margin: 0 0 14px 20px; }
.markdown-preview li { margin-bottom: 4px; }
.markdown-preview code { font-family: 'Fira Code', monospace; font-size: 0.85rem; padding: 2px 6px; background: rgba(0, 0, 0, 0.3); border-radius: 4px; color: var(--neon-cyan); }
.markdown-preview pre { font-family: 'Fira Code', monospace; background: rgba(0, 0, 0, 0.3); padding: 15px; border-radius: var(--border-radius-md); overflow-x: auto; margin-bottom: 14px; border: var(--border-glass); }
.markdown-preview pre code { padding: 0; background: transparent; color: inherit; }
.markdown-preview blockquote { border-left: 4px solid var(--neon-violet); padding-left: 15px; color: var(--text-secondary); margin-bottom: 14px; font-style: italic; }

/* ==========================================
   API HUB & SETTINGS SECTION
   ========================================== */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
}

.settings-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.card-header i {
  font-size: 1.25rem;
}

.card-header h3 {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 700;
}

.card-body {
  padding: 25px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.desc-text {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
}

.token-reveal-widget {
  display: flex;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  align-items: center;
}

.token-display {
  flex: 1;
  padding: 14px 20px;
  font-family: 'Fira Code', monospace;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  overflow-x: auto;
  color: var(--text);
  white-space: nowrap;
}

.token-reveal-widget .btn {
  border-radius: 0;
  height: 100%;
  padding: 0 18px;
}

.snippet-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.snippet-box h4 {
  font-family: var(--font-title);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.snippet-box pre {
  background: rgba(0, 0, 0, 0.3);
  padding: 15px;
  border-radius: var(--border-radius-md);
  border: var(--border-glass);
  overflow-x: auto;
  font-size: 0.82rem;
  color: var(--text-main);
  line-height: 1.4;
}

/* RSS feeds list in settings */
.feed-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  background: rgba(0, 0, 0, 0.15);
  padding: 15px;
  border-radius: var(--border-radius-md);
  border: var(--border-glass);
}

.form-row {
  display: flex;
  gap: 8px;
}

.form-row input, .form-row select {
  background: rgba(0, 0, 0, 0.3);
  border: var(--border-glass);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: var(--border-radius-sm);
  outline: none;
  font-size: 0.88rem;
  transition: var(--transition-smooth);
}

.form-row input:focus, .form-row select:focus {
  border-color: var(--neon-violet);

/* Feed Autocomplete Dropdown */
.feed-suggestions-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  max-height: 320px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.feed-suggestion-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid var(--border);
}

.feed-suggestion-item:last-child { border-bottom: none; }
.feed-suggestion-item:hover { background: rgba(255,255,255,0.06); }

.suggestion-icon { font-size: 1.1rem; flex-shrink: 0; }
.suggestion-text { flex: 1; min-width: 0; }
.suggestion-name { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text); }
.suggestion-url { display: block; font-size: 0.7rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggestion-cat-badge {
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.15);
  color: var(--primary);
  text-transform: uppercase;
  font-weight: 600;
  flex-shrink: 0;
}

  box-shadow: 0 0 6px var(--neon-violet-glow);
}

.form-row input[type="text"] {
  flex: 1;
}

.flex-row input[type="url"] {
  flex: 2;
}

.registered-feeds-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 2px;
}

.feed-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.02);
  border: var(--border-glass);
  border-radius: var(--border-radius-md);
}

.feed-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 80%;
}

.feed-title {
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-url {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-cat-badge {
  align-self: flex-start;
  font-size: 0.65rem;
  background: rgba(138, 43, 226, 0.08);
  color: var(--neon-violet);
  border: 1px solid rgba(138, 43, 226, 0.15);
  padding: 1px 6px;
  border-radius: 6px;
  text-transform: uppercase;
  font-weight: 600;
}

/* Buttons */
.btn {
  background: rgba(255, 255, 255, 0.05);
  border: var(--border-glass);
  color: var(--text-main);
  font-family: var(--font-title);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.btn:hover {
  background: var(--bg-glass-active);
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--neon-violet);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 14px var(--neon-violet-glow);
}

.btn-primary:hover {
  background: #993bf2;
  box-shadow: 0 4px 18px rgba(138, 43, 226, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn-danger {
  background: rgba(255, 59, 48, 0.1);
  border: 1px solid rgba(255, 59, 48, 0.2);
  color: #ff453a;
}

.btn-danger:hover {
  background: var(--neon-red);
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 59, 48, 0.4);
}

.btn-round {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  padding: 0;
}

.btn-icon {
  padding: 10px 14px;
}

.btn-delete-feed {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.btn-delete-feed:hover {
  color: var(--neon-red);
}

/* Dynamic Loading spinners */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Translucent Glowing Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-overlay);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeIn 0.3s ease;
}

.modal-content {
  width: 90%;
  max-width: 420px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  border: var(--border-glass-glow);
  box-shadow: 0 10px 50px rgba(138, 43, 226, 0.2);
}

.modal-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.neon-cyan-icon {
  font-size: 2.2rem;
  color: var(--neon-cyan);
  text-shadow: 0 0 10px var(--neon-cyan-glow);
}

.modal-content h2 {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 700;
}

.modal-content p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
}

.modal-content .input-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-content input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: var(--border-glass);
  color: var(--text-main);
  padding: 12px 18px;
  border-radius: var(--border-radius-md);
  outline: none;
  font-size: 0.95rem;
  text-align: center;
}

.modal-content input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 8px var(--neon-cyan-glow);
}

.modal-hint {
  font-size: 0.72rem !important;
  color: var(--text-muted) !important;
}

.modal-hint code {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  padding: 1px 4px;
}

/* Glowing Notification Toast */
.toast {
  position: fixed;
  top: 25px;
  right: 25px;
  padding: 12px 24px;
  background: var(--bg-elevated);
  border: var(--border-glass-glow);
  border-radius: var(--border-radius-md);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-main);
  z-index: 2000;
  box-shadow: 0 4px 20px var(--neon-violet-glow);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes slideIn {
  from { transform: translateX(50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Bottom Nav bar (Mobile only default hidden) */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 65px;
  border-radius: 0;
  border-top: var(--border-glass);
  border-bottom: none;
  border-left: none;
  border-right: none;
  z-index: 100;
  background: var(--bg-nav);
  justify-content: space-around;
  align-items: center;
}

.mobile-nav-tab {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  gap: 4px;
  transition: var(--transition-smooth);
  width: 25%;
  height: 100%;
}

.mobile-nav-tab i {
  font-size: 1.2rem;
}

.mobile-nav-tab span {
  font-size: 0.65rem;
  font-family: var(--font-title);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.mobile-nav-tab.active {
  color: var(--neon-cyan);
  text-shadow: 0 0 6px var(--neon-cyan-glow);
}


/* ==========================================================================
   RESPONSIVE MEDIA QUERIES (MOBILE UI FOCUS)
   ========================================================================== */

@media (max-width: 900px) {
  /* Notes section grid layout collapsing */
  .notes-layout {
    grid-template-columns: 1fr;
  }
  
  .notes-sidebar {
    height: 100%;
  }

  .notes-sidebar.hidden-mobile {
    display: none !important;
  }

  .notes-editor-pane {
    height: 100%;
  }

  .notes-editor-pane.hidden-mobile {
    display: none !important;
  }

  /* Mobile: compact editor toolbar */
  .editor-header {
    padding: 8px 10px;
    gap: 6px;
    flex-wrap: wrap;
  }

  .btn-back {
    display: flex;
    align-self: flex-start;
    margin-top: 2px;
  }

  .note-meta-title {
    flex: 1;
    min-width: 120px;
    order: 1;
  }

  .note-meta-title input {
    font-size: 1rem;
    width: 100%;
  }

  .note-meta-title input#note-edit-category {
    display: none; /* hide category on mobile */
  }

  .note-meta-title .badge {
    font-size: 0.6rem;
  }

  .editor-actions {
    flex-shrink: 0;
    gap: 3px;
    order: 2;
    margin-left: auto;
    align-self: center;
  }

  .editor-actions .btn-icon-text span {
    display: none; /* icon-only on mobile */
  }

  .editor-actions .btn-icon-text {
    padding: 6px 7px;
    min-width: 32px;
    justify-content: center;
  }

  .editor-actions .btn-icon-text i {
    margin: 0;
  }

  .editor-actions .btn-icon {
    padding: 6px 7px;
  }
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }
  .mobile-bottom-bar {
    display: flex;
    background: linear-gradient(135deg, rgba(15,185,185,0.12), rgba(15,185,185,0.04));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  .app-header {
    margin: 0;
    border-radius: 0;
    border-top: none;
    border-left: none;
    border-right: none;
    padding: 12px 15px;
  }

  /* System status bar on mobile: compact */
  .system-status {
    display: none;
  }
  .system-status.logged-in {
    display: flex;
    gap: 3px;
    padding: 2px 6px;
    font-size: 0.7rem;
    align-items: center;
  }

  /* Hide status text on mobile — just show pulse dot */
  .system-status.logged-in #system-status-text {
    display: none;
  }
  .system-status.logged-in .status-pulse {
    margin-right: 0;
  }

  /* Compact user badge — hide username text, tighter icons */
  .system-status.logged-in #current-user-display {
    display: none;
  }
  .system-status.logged-in #user-profile-badge {
    padding: 2px 4px;
    gap: 2px;
  }
  .system-status.logged-in #user-profile-badge i {
    font-size: 0.65rem;
    margin-right: 0 !important;
  }
  .system-status.logged-in .user-logout-btn {
    padding: 1px 3px;
    font-size: 0.6rem;
  }

  /* Compact theme/settings/lang toggle buttons */
  .theme-toggle-btn,
  .system-status.logged-in button,
  .system-status.logged-in [id^="lang-toggle"],
  .system-status.logged-in [id^="settings-btn"],
  .system-status.logged-in #theme-toggle-btn {
    padding: 2px 6px !important;
    font-size: 0.6rem !important;
    margin-right: 0 !important;
  }
  .system-status.logged-in #theme-toggle-btn i,
  .system-status.logged-in [id^="settings-btn"] i {
    font-size: 0.75rem;
  }

  /* Show mobile greeting tag next to logo */
  .user-greeting-tag {
    font-size: 0.7rem;
    font-weight: 400;
    opacity: 0.7;
  }
  .user-greeting-tag.hidden {
    display: none;
  }

  .mobile-bottom-bar {
    display: flex;
  }

  .app-main {
    padding: 10px;
    padding-bottom: 75px;
  }

  /* Kanban column switches for mobile readability */
  .mobile-kanban-toggle {
    display: flex;
  }

  .kanban-board {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .kanban-column {
    display: none; /* Hide non-active columns on mobile */
    background: transparent;
    border: none;
    padding: 0;
  }

  .kanban-column.active-mobile {
    display: flex;
  }

  /* Settings Grid Collapsing */
  .settings-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .card-body {
    padding: 15px;
  }

  .form-row.flex-row {
    flex-direction: column;
    gap: 8px;
  }

  .form-row select, .form-row input[type="url"], .form-row button {
    width: 100%;
  }

  .form-row button {
    height: 40px;
  }
}

/* ==========================================================================
   Multi-Tenant Authentication & Custom Settings Styling
   ========================================================================== */

/* Fullscreen Auth Overlay */
/* OAuth Buttons */
.oauth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}
.oauth-divider-line { flex: 1; height: 1px; background: var(--border); }
.oauth-divider-text { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }

.oauth-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-glass-card);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.oauth-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* Password visibility toggle */
.pw-wrap { position: relative; display: flex; align-items: center; }
.pw-wrap input { flex: 1; padding-right: 40px !important; }
.pw-toggle-btn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text-muted,#9ca3af);
  cursor: pointer; padding: 6px; font-size: 1rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px; transition: color 0.2s, background 0.2s;
}
.pw-toggle-btn:hover { color: var(--text,#f5f4f8); background: rgba(255,255,255,0.08); }
.form-input-wrapper .pw-toggle-btn { right: 4px; }
.form-input-wrapper:has(.pw-toggle-btn) input { padding-right: 36px; }
.form-input-wrapper:has(.pw-toggle-btn) .form-input {
  padding-right: 40px;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  transition: opacity 0.4s ease;
}

body:has(.auth-overlay:not(.hidden)) {
  overflow: hidden !important;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 40px 30px;
  background: var(--bg-glass);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-md), 0 0 30px var(--glow-violet);
  border-radius: var(--border-radius-lg);
}

.auth-logo {
  text-align: center;
  margin-bottom: 30px;
}

.auth-logo i {
  font-size: 3rem;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}

.auth-logo h2 {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.8rem;
  letter-spacing: -0.5px;
}

.auth-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-sm);
  padding: 4px;
  margin-bottom: 25px;
}

.auth-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.auth-tab-btn.active {
  background: var(--bg-glass-active);
  color: var(--neon-cyan);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input-wrapper {
  position: relative;
}

.form-input-wrapper i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: var(--border-glass);
  padding: 12px 12px 12px 38px;
  color: var(--text-main);
  border-radius: var(--border-radius-sm);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-smooth);
}

.form-input:focus {
  border-color: var(--neon-cyan);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 12px rgba(0, 245, 255, 0.15);
}

.auth-error {
  color: #ff3b30;
  background: rgba(255, 59, 48, 0.1);
  border: 1px solid rgba(255, 59, 48, 0.2);
  padding: 10px;
  border-radius: var(--border-radius-sm);
  font-size: 0.85rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Category Sidebar Section */
.note-category-section {
  padding: 12px 15px;
  border-bottom: var(--border-glass);
}

.note-category-section h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.category-pill {
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: var(--border-glass);
  color: var(--text-secondary);
  padding: 5px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.category-pill:hover, .category-pill.active {
  background: var(--bg-glass-active);
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
}

/* Settings Controls & Fields */
.settings-section-title {
  font-size: 0.95rem;
  color: var(--text-main);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 6px;
  margin: 25px 0 15px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: var(--font-title);
  display: flex;
  align-items: center;
  gap: 8px;
}

.challenge-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(138, 43, 226, 0.06);
  border: 1px dashed var(--neon-violet);
  padding: 15px;
  border-radius: var(--border-radius-md);
  margin: 15px 0;
  text-align: center;
}

.challenge-code {
  font-family: 'Fira Code', monospace;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--neon-cyan);
  letter-spacing: 2px;
  margin: 10px 0;
  text-shadow: 0 0 10px rgba(0, 245, 255, 0.4);
}

.challenge-timer {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-force-danger {
  background: rgba(255, 59, 48, 0.1);
  color: #ff3b30;
  border: 1px solid rgba(255, 59, 48, 0.3);
  padding: 10px 15px;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-force-danger:hover {
  background: #ff3b30;
  color: white;
  box-shadow: 0 0 15px rgba(255, 59, 48, 0.4);
}

.user-logout-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  margin-left: 10px;
}

.user-logout-btn:hover {
  background: rgba(255, 59, 48, 0.1);
  color: #ff3b30;
  border-color: rgba(255, 59, 48, 0.2);
}

.category-input-row {
  margin-bottom: 12px;
}

.category-input-row select {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: var(--border-glass);
  color: var(--text-main);
  padding: 10px;
  border-radius: var(--border-radius-sm);
  outline: none;
}

/* Administrative Users Management styles */
.admin-users-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-users-table th {
  font-family: var(--font-title);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.5px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.06);
  padding: 10px 8px;
}

.admin-users-table td {
  padding: 12px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.admin-users-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
}

.role-badge.role-admin {
  background: rgba(138, 43, 226, 0.12);
  color: #bf8eff;
  border: 1px solid rgba(138, 43, 226, 0.25);
}

.role-badge.role-viewer {
  background: rgba(0, 245, 255, 0.08);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 245, 255, 0.15);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
}

.status-badge.status-active {
  background: rgba(46, 204, 113, 0.12);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.2);
}

.status-badge.status-blocked {
  background: rgba(255, 59, 48, 0.12);
  color: var(--neon-red);
  border: 1px solid rgba(255, 59, 48, 0.2);
}

.user-action-btn {
  background: rgba(255, 255, 255, 0.04);
  border: var(--border-glass);
  color: var(--text-secondary);
  padding: 5px 8px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-size: 0.75rem;
  transition: var(--transition-smooth);
  margin-left: 4px;
}

.user-action-btn:hover {
  background: var(--bg-glass-active);
  color: var(--text-main);
}

.user-action-btn.btn-edit-user:hover {
  border-color: rgba(0, 245, 255, 0.4);
  color: var(--neon-cyan);
}

.user-action-btn.btn-block-user:hover {
  border-color: rgba(255, 215, 0, 0.4);
  color: var(--neon-gold);
}

.user-action-btn.btn-unblock-user:hover {
  border-color: rgba(46, 204, 113, 0.4);
  color: #2ecc71;
}

.user-action-btn.btn-delete-user:hover {
  border-color: rgba(255, 59, 48, 0.4);
  color: var(--neon-red);
  background: rgba(255, 59, 48, 0.05);
}



