/* Hide horizontal scrollbar indicator below navbar/category bar for all browsers */
.category-bar-outer {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}
.category-bar-outer::-webkit-scrollbar {
  display: none;
  height: 0;
  background: transparent;
}
.nav-card img, .nav-card .nav-thumb {
  width: 110px !important;
  height: 110px !important;
  min-width: 110px !important;
  min-height: 110px !important;
  max-width: 120px;
  max-height: 120px;
  border-radius: 14px;
  object-fit: cover;
  margin-right: 16px;
}
/* Make images in Purane Topics boxes bigger and more visible */
.nav-card img, .nav-card .nav-thumb {
  width: 84px !important;
  height: 84px !important;
  min-width: 84px !important;
  min-height: 84px !important;
  max-width: 100px;
  max-height: 100px;
  border-radius: 12px;
  object-fit: cover;
  margin-right: 14px;
}
/* Make Purane Topics boxes wider */
.nav-card {
  min-width: 270px;
  max-width: 99%;
  width: 100%;
  padding-left: 18px;
  padding-right: 18px;
}
/* Make images in Purane Topics boxes bigger */
.nav-card img, .nav-card .nav-thumb {
  width: 72px !important;
  height: 72px !important;
  min-width: 72px !important;
  min-height: 72px !important;
  max-width: 90px;
  max-height: 90px;
  border-radius: 12px;
  object-fit: cover;
  margin-right: 12px;
}
/* Make topic/title inside Purane Topics boxes bigger */
/* Only one rule for topic font size in Purane Topics boxes */
.nav-card .nav-topic, .nav-card .topic-title, .nav-card .topic {
  font-size: 1rem !important;
  font-weight: 600;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  max-width: 100%;
}
/* Purane Topics (Old Topics) font size increase */
.nav-title {
  font-size: 1.rem;
}
.nav-list, .nav-card {
  font-size: 1.18rem;
}
/* Footer Styles */
.site-footer {
  background: linear-gradient(90deg, #e0f2fe 0%, #f0f9ff 100%);
  border-top: 1px solid #bae6fd;
  padding: 32px 0 18px 0;
  margin-top: 32px;
  color: #1e293b;
  font-size: 1rem;
  box-shadow: 0 2px 24px 0 rgba(56,189,248,0.08);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  width: 100%;
  flex-wrap: wrap;
  padding: 0 24px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 180px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(56,189,248,0.07);
  padding: 8px 18px 8px 10px;
}
.footer-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.footer-logo-main {
  font-weight: 700;
  font-size: 1.2rem;
  color: #0ea5e9;
  letter-spacing: 1px;
}
.footer-logo-tag {
  font-size: 1rem;
  color: #38bdf8;
}
.footer-about {
  color: #2563eb;
  max-width: 420px;
  text-align: left;
  font-size: 1.04rem;
  margin: 0 18px;
  background: #e0f2fe;
  border-radius: 10px;
  padding: 10px 18px;
  box-shadow: 0 2px 8px rgba(56,189,248,0.06);
}
.footer-motivation {
  color: #0ea5e9;
  font-weight: 600;
  margin-top: 8px;
  font-size: 1.01rem;
  font-style: italic;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-end;
  min-width: 220px;
}
.footer-link {
  color: #fff;
  background: linear-gradient(90deg, #38bdf8 60%, #0ea5e9 100%);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.01rem;
  border-radius: 999px;
  padding: 7px 18px 7px 14px;
  box-shadow: 0 2px 8px rgba(56,189,248,0.10);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: none;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  position: relative;
}
.footer-link::before {
  content: attr(data-icon);
  margin-right: 6px;
  font-size: 1.08em;
  opacity: 0.85;
}
.footer-link:hover {
  background: linear-gradient(90deg, #0ea5e9 60%, #38bdf8 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(14,165,233,0.13);
}
@media (max-width: 900px) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 0 10px;
  }
  .footer-about {
    text-align: left;
    margin: 0;
    font-size: 0.98rem;
  }
  .footer-links {
    justify-content: flex-start;
    gap: 10px;
    font-size: 0.97rem;
    min-width: 0;
  }
}
/* Make only navbar horizontally scrollable */
.category-bar-outer {
  width: 100%;
  overflow-x: auto;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}
.category-bar {
  display: flex;
  gap: 16px;
  justify-content: flex-start;
  align-items: center;
  min-width: max-content;
  padding: 10px 0 8px 0;
  border-bottom: 1px solid #e0e0e0;
  background: #fff;
}
.category-bar::-webkit-scrollbar {
  display: none;
}
@media (max-width: 700px) {
  .category-bar {
    gap: 10px;
    padding-left: 10px;
    padding-right: 10px;
  }
  .category-btn {
    flex: 0 0 auto;
    font-size: 14px;
    padding: 6px 14px;
  }
}
/* Modern Login Form Styles */
.login-modern-box {
  background: rgba(255,255,255,0.85);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.25);
  max-width: 370px;
  margin: 48px auto 0 auto;
  padding: 38px 32px 32px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: box-shadow 0.2s;
}
.login-modern-box .brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.login-modern-box .logo {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #16a34a 60%, #22d3ee 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(22,163,74,0.12);
}
.login-modern-box h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 2px;
}
.login-modern-box p {
  color: #6b7280;
  font-size: 1rem;
}
.login-modern-box .form-group {
  width: 100%;
  margin-bottom: 18px;
}

.login-modern-box .input-group {
  font-size: 1.13rem;
  display: flex;
  align-items: center;
  background: #f3f4f6;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  padding: 0 12px;
  transition: border 0.2s;
}
.login-modern-box .input-group:focus-within {
  border: 1.5px solid #16a34a;
}
.login-modern-box .input-icon {
  font-size: 1.2rem;
  color: #16a34a;
  margin-right: 8px;
}
.login-modern-box input[type="email"],
.login-modern-box input[type="password"] {
  border: none;
  outline: none;
  background: transparent;
  padding: 12px 0;
  font-size: 1rem;
  width: 100%;
  color: #222;
}
.login-modern-box .pw-toggle {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 0.95rem;
  cursor: pointer;
  margin-left: 8px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}
.login-modern-box .pw-toggle:hover {
  background: #e5e7eb;
}
.login-modern-box .actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
.login-modern-box .btn-primary {
  background: linear-gradient(90deg, #16a34a 60%, #22d3ee 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 0;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(22,163,74,0.10);
  transition: background 0.18s, transform 0.12s;
}
.login-modern-box .btn-primary:hover {
  background: linear-gradient(90deg, #22d3ee 0%, #16a34a 100%);
  transform: translateY(-2px) scale(1.02);
}
.login-modern-box .btn-ghost {
  background: none;
  color: #16a34a;
  border: 1px solid #16a34a;
  border-radius: 8px;
  padding: 10px 0;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.login-modern-box .btn-ghost:hover {
  background: #dcfce7;
  color: #065f46;
}
.login-modern-box .msg {
  width: 100%;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 16px;
  font-size: 0.98rem;
  text-align: center;
}
/* Category Bar Styles */
.category-bar {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 10px 0 8px 0;
  margin-bottom: 0px;
}
.category-btn {
  background: #ecfdf3;
  color: #166534;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  padding: 6px 22px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.category-btn.active, .category-btn:hover {
  background: #bbf7d0;
  color: #065f46;
}
/*
  style.css - Styles for funkyshare.com
  Moved from index.php <style> block
*/

:root {
  --bg: #f5f5f5;
  --bg-card: #ffffff;
  --border: #e0e0e0;
  --border-soft: #eeeeee;
  --text: #111827;
  --muted: #6b7280;
  --accent: #16a34a;
  --accent-soft: #dcfce7;
  --danger: #ef4444;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main.page-shell {
  padding-bottom: 60px; /* Footer ki height jitni ya usse zyada */
}

header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-circle {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-text span:first-child {
  font-weight: 600;
  font-size: 16px;
}

.logo-text span:last-child {
  font-size: 12px;
  color: var(--muted);
}

.header-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

#userDisplay {
  font-size: 13px;
  color: #6b7280;
  display: none;
}

.primary-btn {
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  padding: 7px 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(22, 163, 74, 0.25);
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.primary-btn.logout {
  background: #ef4444;
  border-color: #ef4444;
}

.primary-btn:hover {
  background: #15803d;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(22, 163, 74, 0.35);
}

.primary-btn.logout:hover {
  background: #dc2626;
  box-shadow: 0 14px 30px rgba(239, 68, 68, 0.35);
}

main.page-shell {
  flex: 1;
  padding: 16px;
  display: flex;
  justify-content: center;
}

.layout {
  width: 100%;
  max-width: 1120px;
  display: grid;
  /* Give main content more space and reduce sidebar width */
  grid-template-columns: minmax(0, 2.5fr) minmax(0, 0.9fr);
  gap: 16px;
  align-items: flex-start;
}

.content-card {
  background: var(--bg-card);
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  padding: 14px;
}

.content-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.media-panel {
  background: #fafafa;
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 10px;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-placeholder {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  padding: 10px;
}

.media-placeholder span {
  font-size: 26px;
  margin-bottom: 6px;
  display: block;
}

.media-panel img,
.media-panel iframe {
  width: 100%;
  max-height: 60vh; /* allow taller images to display fully */
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  object-fit: contain; /* show whole image without cropping */
  display: block;
}

.media-panel iframe {
  aspect-ratio: 16 / 9;
}

.text-panel {
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #ffffff;
  padding: 12px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.label-chip {
  align-self: flex-start;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: #f3f4f6;
  color: var(--muted);
}

#viewArea {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#mainTopic {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  color: #111827;
}

#mainDescription {
  font-size: 13px;
  line-height: 1.6;
  color: #374151;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 100%;
}

.empty-hint {
  font-size: 13px;
  color: var(--muted);
}

.empty-hint strong {
  color: #111827;
  font-weight: 500;
}

#editArea {
  display: none;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
}

.edit-input,
.edit-textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f9fafb;
  font-size: 13px;
  padding: 7px 8px;
  outline: none;
}

.edit-input:focus,
.edit-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.2);
}

.edit-textarea {
  resize: vertical;
  min-height: 70px;
}

.edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 2px;
}

.btn-ghost,
.btn-solid {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-ghost {
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--muted);
}

.btn-ghost:hover {
  background: #f3f4f6;
}

.btn-solid {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.btn-solid:hover {
  background: #15803d;
}

.post-actions {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.post-actions .spacer {
  flex: 1;
}

.pill-btn {
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: #f9fafb;
  font-size: 11px;
  padding: 4px 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #4b5563;
  transition: background 0.15s ease, transform 0.1s ease, border-color 0.15s ease;
}

.pill-btn span.icon {
  font-size: 13px;
}

.pill-btn:hover {
  background: #e5e7eb;
  border-color: #d1d5db;
  transform: translateY(-0.5px);
}

.pill-btn.primary {
  border-color: rgba(22, 163, 74, 0.4);
  background: #ecfdf3;
  color: #166534;
}

.pill-btn.primary:hover {
  background: #dcfce7;
}

.nav-sidebar {
  background: var(--bg-card);
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  padding: 10px 10px 12px;
  max-height: 700px;
  min-height: 420px;
  display: flex;
  flex-direction: column;
}

.nav-title {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.nav-title span.badge {
  font-size: 11px;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 2px 8px;
  color: var(--muted);
  border: 1px solid var(--border-soft);
}

.nav-list {
  overflow-y: auto;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}

/* Hide visible scrollbar on right sidebar but keep scrolling functional */
.nav-list {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}
.nav-list::-webkit-scrollbar {
  width: 0px;
  height: 0px;
  background: transparent; /* Chrome/Safari/Webkit */
}

.nav-card {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: #f9fafb;
  padding: 18px 10px;
  min-height: 110px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.nav-card:hover {
  background: #eef2ff;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.nav-thumb {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #e5e7eb;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #4b5563;
}

.nav-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.nav-thumb-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #ffffff;
  font-size: 9px;
  padding: 1px 4px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.nav-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.nav-topic {
  font-size: 12px;
  font-weight: 500;
  color: #111827;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.nav-meta {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-meta span.dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #d1d5db;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
  backdrop-filter: blur(4px);
  padding: 10px;
}

.modal {
  width: 100%;
  max-width: 790px;
  max-height: 100vh;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  padding: 12px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.modal-header h2 {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #111827;
}

.modal-header h2 span.icon {
  font-size: 18px;
}

.close-btn {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f9fafb;
  color: #4b5563;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  padding: 0;
  transition: background 0.15s ease, transform 0.1s ease;
  flex-shrink: 0;
}

.close-btn:hover {
  background: #e5e7eb;
  transform: translateY(-1px);
}

form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

label {
  font-size: 12px;
  color: var(--muted);
}

label span.req {
  color: var(--danger);
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
input[type="file"] {
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f9fafb;
  padding: 7px 8px;
  font-size: 13px;
  color: #111827;
  outline: none;
  font-family: inherit;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
input[type="file"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.18);
}

textarea {
  resize: vertical;
  min-height: 140px;
  max-height: 420px;
}

.hint {
  font-size: 11px;
  color: var(--muted);
}

.hint strong {
  color: #111827;
  font-weight: 500;
}

.danger {
  color: var(--danger);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.secondary-btn {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  padding: 5px 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.secondary-btn:hover {
  background: #f3f4f6;
}

.submit-btn {
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #ffffff;
  font-size: 13px;
  padding: 5px 12px;
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 10px 25px rgba(22, 163, 74, 0.25);
  transition: background 0.15s ease, transform 0.1s ease;
}

.submit-btn span.icon {
  font-size: 16px;
}

.submit-btn:hover {
  background: #15803d;
  transform: translateY(-1px);
}

/* Small inline spinner for submit buttons */
.spinner {
  border: 3px solid rgba(255,255,255,0.2);
  border-top: 3px solid rgba(255,255,255,0.95);
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error-box {
  display: none;
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 11px;
  border: 1px solid rgba(239, 68, 68, 0.7);
  background: #fef2f2;
  color: #991b1b;
}

.switch-link {
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  font-size: 12px;
}

.switch-link:hover {
  color: #15803d;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .nav-sidebar {
    max-height: none;
    order: 2;
  }
  .content-card {
    order: 1;
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding-inline: 10px;
    flex-direction: column;
    gap: 10px;
  }

  .header-buttons {
    width: 100%;
  }

  main.page-shell {
    padding: 10px;
  }

  .content-card {
    padding: 10px;
  }

  .primary-btn {
    font-size: 12px;
    padding: 6px 12px;
    flex: 1;
  }
}
