/* Theme Tokens */
:root {
  --bg: #0a0a0a;
  --surface: #1a1a1a;
  --surface-2: #252525;
  --border: #333;
  --text: #ffffff;
  --muted: #ccc;
  --accent: #00d4ff;
  --accent-2: #00a8cc;
  --danger: #dc3545;
  --success: #28a745;
  --warning: #ffc107;
}

/* Basic reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Oswald', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* App Container */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Layout dashboard */
.app-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.app-header .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.app-header .header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-header .brand h1 {
  color: var(--accent);
  margin: 0;
  font-size: 1.5rem;
}

.app-header .header-nav {
  display: flex;
  gap: 1rem;
}

.app-header .nav-link {
  color: var(--text);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.app-header .nav-link:hover {
  background: var(--surface-2);
}

.app-header .nav-link.active {
  background: var(--accent);
  color: var(--bg);
}

/* Dashboard Layout */
.dashboard-layout {
  display: flex;
  gap: 0;
  min-height: calc(100vh - 64px);
}

.dashboard-sidebar {
  width: 240px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding: 1.5rem 1rem;
  background: var(--surface);
}

.dashboard-content {
  flex: 1;
  min-width: 0;
  padding: 2rem 2.5rem;
}

/* Dashboard Header */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.dashboard-title {
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

.dashboard-search {
  flex-shrink: 0;
}

.search-input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.6rem 1rem;
  color: var(--text);
  font-size: 0.9rem;
  width: 260px;
  transition: border-color 0.2s ease;
  font-family: inherit;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0,212,255,0.12);
}

.search-input::placeholder {
  color: var(--muted);
}

/* Page Header */
.page-header {
  margin-bottom: 2rem;
}

.page-header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

.page-header-text {
  flex: 1;
}

.page-title {
  color: var(--text);
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0 0 0.4rem 0;
  letter-spacing: -0.01em;
}

.page-subtitle {
  color: var(--muted);
  font-size: 1rem;
  margin: 0;
  line-height: 1.5;
}

.page-header-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-add-app {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-add-app:hover {
  background: var(--surface-2);
  border-color: var(--accent);
  color: var(--accent);
}

.search-box {
  position: relative;
}

/* Summary Cards */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.summary-card-icon {
  width: 36px;
  height: 36px;
  background: rgba(0,212,255,0.12);
  color: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.summary-card-content {
  flex: 1;
}

.summary-card-title,
.summary-card-label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.summary-card-value {
  color: var(--text);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 2rem 0;
}

.empty-state-icon {
  color: var(--muted);
  margin-bottom: 1rem;
}

.empty-state-content h3 {
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.empty-state-content p {
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* Reusable Components */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.1);
}

.card-header {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.card-title {
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.card-subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.25rem 0 0 0;
}

/* Badge Component */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid transparent;
}

.badge-primary {
  background: rgba(0, 212, 255, 0.2);
  color: var(--accent);
  border-color: rgba(0, 212, 255, 0.3);
}

.badge-success {
  background: rgba(40, 167, 69, 0.2);
  color: #28a745;
  border-color: rgba(40, 167, 69, 0.3);
}

.badge-warning {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
  border-color: rgba(255, 193, 7, 0.3);
}

.badge-danger {
  background: rgba(220, 53, 69, 0.2);
  color: var(--danger);
  border-color: rgba(220, 53, 69, 0.3);
}

.badge-secondary {
  background: var(--surface-2);
  color: var(--muted);
  border-color: var(--border);
}

/* Chip Component */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  background: var(--surface-2);
  color: var(--text);
  border-radius: 4px;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
}

.chip:last-child {
  margin-right: 0;
}

/* Action Bar Component */
.action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.action-bar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.action-bar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .page-header-content {
    flex-direction: column;
    align-items: stretch;
  }
  
  .page-header-actions {
    order: -1;
  }
  
  .summary-cards {
    grid-template-columns: 1fr;
  }
  
  .dashboard-layout {
    flex-direction: column;
  }
  
  .dashboard-sidebar {
    width: 100%;
  }
  
  .app-hero {
    flex-direction: column;
    text-align: center;
  }
  
  .app-hero-actions {
    justify-content: center;
  }
  
  .action-bar {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Sidebar (dashboard) — flush inside .dashboard-sidebar, no extra box needed */
.sidebar-section {
  margin-bottom: 1.5rem;
}

.sidebar-section:last-child {
  margin-bottom: 0;
}

.sidebar-section-title {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
  padding: 0 0.5rem;
}

.sidebar-link {
  display: block;
  color: var(--text);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  margin-bottom: 1px;
  transition: background 0.15s ease, color 0.15s ease;
  font-size: 0.875rem;
  position: relative;
}

.sidebar-link:hover {
  background: var(--surface-2);
  color: var(--accent);
}

.sidebar-link.is-active {
  background: rgba(0,212,255,0.12);
  color: var(--accent);
  font-weight: 600;
  border-left: 3px solid var(--accent);
  padding-left: calc(0.75rem - 3px);
}

.sidebar-link.admin-link {
  background: rgba(220, 53, 69, 0.08);
  color: var(--danger);
  border: 1px solid rgba(220, 53, 69, 0.2);
  font-weight: 500;
  margin-top: 0.25rem;
}

.sidebar-link.admin-link:hover {
  background: rgba(220, 53, 69, 0.18);
}

/* App Grid */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
  align-items: start;
}

/* Hidden card wrapper — removes item from grid flow entirely */
.app-card-wrapper.is-hidden {
  display: none !important;
}

/* Search empty state (live search only) */
.search-empty-state {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 1rem 0 2rem;
}

/* Responsive Dashboard */
@media (max-width: 1024px) {
  .dashboard-layout {
    flex-direction: column;
  }
  
  .dashboard-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 1rem;
  }
  
  .sidebar-section {
    display: inline-block;
    margin-right: 0.5rem;
    margin-bottom: 0;
    vertical-align: top;
  }
}

@media (max-width: 768px) {
  .app-grid {
    grid-template-columns: 1fr;
  }
  
  .search-input {
    width: 100%;
  }
}

/* Dashboard Cards — canonical definition */
.app-card-wrapper {
  position: relative;
}

.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
  height: 100%;
  min-height: 190px;
  box-sizing: border-box;
}

.app-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(0,212,255,0.1);
  transform: translateY(-1px);
}

.app-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex-shrink: 0;
}

.app-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: rgba(0,212,255,0.15);
  color: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1rem;
  flex-shrink: 0;
  overflow: hidden;
}

.app-icon img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 6px;
}

.app-info {
  flex: 1;
  min-width: 0;
}

.app-name {
  color: var(--text);
  font-size: 0.975rem;
  font-weight: 600;
  margin: 0 0 0.15rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-desc {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  overflow: hidden;
  flex: 1;
}

.app-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-top: auto;
}

.app-category {
  display: inline-block;
  background: transparent;
  color: var(--accent);
  padding: 0;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  opacity: 0.75;
}

.app-status {
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid;
}

.app-status.active {
  background: rgba(40, 167, 69, 0.15);
  color: var(--success);
  border-color: rgba(40, 167, 69, 0.3);
}

.app-status.inactive {
  background: rgba(220, 53, 69, 0.15);
  color: var(--danger);
  border-color: rgba(220, 53, 69, 0.3);
}

.app-status.draft {
  background: rgba(255, 193, 7, 0.15);
  color: var(--warning);
  border-color: rgba(255, 193, 7, 0.3);
}

.app-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.app-tag {
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 500;
}

/* Empty State */
.empty-dashboard {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted);
}

.empty-dashboard h3 {
  color: var(--text);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.empty-dashboard p {
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

/* Legacy header slots (kept for compatibility) */
.app-header-left { display: flex; flex-direction: column; gap: 2px; }
.app-header-title { font-size: 20px; font-weight: 700; letter-spacing: -0.5px; }
.app-header-sub { font-size: 14px; opacity: 0.85; }
.app-header-center { position: absolute; left: 50%; transform: translateX(-50%); }
.header-logo { height: 32px; width: auto; max-width: 220px; display: block; }
.header-logo-text { font-size: 24px; font-weight: 700; color: #ffffff; letter-spacing: -0.5px; text-transform: uppercase; }

.login-logo-text {
  font-size: 32px;
  font-weight: 700;
  color: #00d4ff;
  letter-spacing: -1px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.app-header-right { display: flex; align-items: center; gap: 16px; }
.user-name { font-size: 14px; }
.btn-logout { background: #000; color: #fff; border: none; padding: 8px 16px; font-size: 13px; cursor: pointer; border-radius: 999px; }
.btn-logout:hover { opacity: 0.9; }
.app-content { display: flex; min-height: calc(100vh - 60px); }
.app-main { flex: 1; padding: 24px 32px 32px; background: #1a1a1a; }
.app-main-header { margin-bottom: 12px; }
.app-main-title { font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.app-main-subtitle { font-size: 13px; color: #999; }

/* ---------- NIEUWE LOGIN STIJL ---------- */

/* Specifiek voor login-page body */
body.login-page {
  margin: 0;
  padding: 0;
  background: linear-gradient(145deg, #0f3460 0%, #16213e 50%, #1a1a1a 100%);
  background-attachment: fixed;
  font-family: 'Oswald', Arial, sans-serif;
}

/* Wrapper */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* Card */
.login-box {
  background: #252525;
  padding: 36px 42px;
  border-radius: 22px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  border: 1px solid #333333;
  animation: fadeIn 0.4s ease-out;
}

/* Logo bovenaan */
.login-logo {
  text-align: center;
  margin-bottom: 20px;
}
.login-logo img {
  width: 160px;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Titel & subtitel */
.login-title {
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #ffffff;
}
.login-subtitle {
  text-align: center;
  font-size: 14px;
  color: #999999;
  margin-bottom: 14px;
}
.login-highlight {
  text-align: center;
  color: #00d4ff;
  font-size: 13px;
  margin-bottom: 20px;
}

/* Form */
.form-group {
  margin-bottom: 14px;
}
label {
  font-size: 13px;
  display: block;
  margin-bottom: 5px;
  color: #e0e0e0;
}
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #444444;
  border-radius: 10px;
  font-size: 13px;
  background: #1a1a1a;
  color: #e0e0e0;
}
input[type="email"]:focus,
input[type="password"]:focus {
  border-color: #00d4ff;
  outline: none;
  box-shadow: 0 0 0 1px rgba(0,212,255,0.25);
}

/* Button */
.btn-primary {
  width: 100%;
  padding: 12px 16px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: linear-gradient(90deg, #00d4ff 0%, #00a8cc 100%);
  color: #000000;
  font-size: 15px;
  font-weight: 500;
}
.btn-primary:hover {
  opacity: 0.92;
}

/* Error */
.login-error {
  background: #ff4444;
  color: #ffffff;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  margin-bottom: 12px;
}

/* legacy app-status overrides removed — canonical rules above apply */

/* Admin link — override already handled by sidebar-link.admin-link */

/* Footer */
.login-footer {
  margin-top: 20px;
  border-top: 1px solid #333333;
  padding-top: 16px;
  font-size: 16px;
  color: #e0e0e0;
  text-align: center;
  line-height: 1.5;
}
.login-footer a {
  text-decoration: none;
  color: #00d4ff;
}
.login-footer a:hover {
  text-decoration: underline;
}

/* Badge */
.login-badge {
  font-size: 13px;
  color: #999999;
  text-align: center;
  margin-top: 10px;
}

/* Button variants for dashboard */
.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  min-height: 32px;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface-2);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-danger {
  background: rgba(220, 53, 69, 0.15);
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
  background: rgba(220, 53, 69, 0.25);
}

/* Flash messages for dashboard */
.flash {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  border-left: 4px solid;
}

.flash-success {
  background: rgba(40, 167, 69, 0.1);
  color: #28a745;
  border-color: #28a745;
}

.flash-error {
  background: rgba(220, 53, 69, 0.15);
  color: #dc3545;
  border-color: #dc3545;
}

.flash-warning {
  background: rgba(255, 193, 7, 0.15);
  color: #ffc107;
  border-color: #ffc107;
}

.flash-info {
  background: rgba(0, 212, 255, 0.15);
  color: var(--accent);
  border-color: var(--accent);
}

/* Form container - matches admin.css for consistent form width */
.form-container {
  max-width: 820px;
}

/* Form sections */
.form-section {
  margin-bottom: 2.25rem;
  padding-bottom: 2.25rem;
  border-bottom: 1px solid var(--border);
}

.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.form-section-header {
  margin-bottom: 1.25rem;
}

.form-section-header h3 {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.3rem 0;
}

.form-section-header p {
  color: var(--muted);
  margin: 0;
  font-size: 0.85rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.12);
}

.form-help {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.form-actions .btn-danger {
  margin-left: auto;
}

.required {
  color: #dc3545;
}

/* Password toggle button */
.password-toggle {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.password-toggle:hover {
  color: var(--text);
}

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

.password-input-wrapper input[type="password"],
.password-input-wrapper input[type="text"] {
  padding-right: 2.5rem;
}

/* Breadcrumbs */
.breadcrumbs {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.breadcrumb-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
}

.breadcrumb-link:hover {
  color: var(--accent);
}

.breadcrumb-separator {
  color: var(--muted);
  margin: 0 0.5rem;
  font-size: 0.85rem;
}

.breadcrumb-current {
  color: var(--text);
  font-size: 0.85rem;
}

/* Fade-in animatie */
@keyframes fadeIn {
  from {opacity: 0; transform: translateY(10px);}
  to {opacity: 1; transform: translateY(0);}
}

.login-logo a img {
  transition: opacity 0.2s ease;
}

.login-logo a:hover img {
  opacity: 0.85;
}

@media (max-width: 600px) {
  .app-header {
    padding: 10px 14px;
  }

  .header-logo {
    height: 26px;
    max-width: 180px;
  }

  .user-name {
    display: none;
  }

  .app-content {
    flex-direction: column;
  }

  .app-sidebar {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 1px solid #e2e2e2;
    gap: 6px;
  }

  .sidebar-section-title {
    width: 100%;
    margin-bottom: 4px;
  }

  .sidebar-link {
    font-size: 13px;
    padding: 5px 8px;
  }

  .app-search-form {
  flex-direction: column;
  align-items: stretch;
  }

}

/* fav button positioning — wrapper already defined with .app-card */

.fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease;
  line-height: 0;
  border-radius: 4px;
  z-index: 2;
}

.fav-form {
  margin: 0;
  padding: 0;
  display: inline;
}

.app-card-wrapper:hover .fav-btn {
  opacity: 1;
}

.fav-btn.is-fav {
  opacity: 1;
  color: #f5a623;
}

.fav-btn:hover {
  color: #f5a623;
}
