/* Base styles */
html, body
{
   height: 100%;
   margin: 0;
   padding: 0;
}

   /* Custom styles for dark theme */
   body[data-theme="dark"]
   {
      background-color: #0a0e27;
      color: #ffffff;
   }

   body[data-theme="night"]
   {
      background-color: #450a0a !important;
      color: #fca5a5 !important;
   }

      body[data-theme="night"] .bg-dark-blue-900
      {
         background-color: #450a0a !important;
      }

      body[data-theme="night"] .bg-dark-blue-800
      {
         background-color: #7f1d1d !important;
      }

      body[data-theme="night"] .bg-dark-blue-700
      {
         background-color: #991b1b !important;
      }

      body[data-theme="night"] .hover\:bg-dark-blue-700:hover
      {
         background-color: #991b1b !important;
      }

      body[data-theme="night"] .text-white
      {
         color: #fca5a5 !important;
      }

      body[data-theme="night"] .text-gray-300
      {
         color: #fca5a5 !important;
      }

/* Dropdown button styles - ensure no background */
.dropdown-button {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Dropdown menu styles */
.dropdown-menu {
    z-index: 1000 !important;
    position: absolute !important;
}

.dropdown-menu a {
    display: block !important;
    width: 100% !important;
    text-decoration: none !important;
    transition: none !important;
}

.dropdown-menu a:hover {
    background-color: #1e293b !important;
    color: #ffffff !important;
}

      body[data-theme="night"] .text-gray-400
      {
         color: #f87171 !important;
      }

      body[data-theme="night"] .border-gray-700
      {
         border-color: #991b1b !important;
      }

/* Form styles */
.form-control
{
   background-color: #1e293b;
   border: 1px solid #374151;
   color: #ffffff;
   padding: 0.5rem 1rem;
   border-radius: 0.375rem;
   width: 100%;
}

   .form-control:focus
   {
      outline: 2px solid transparent;
      outline-offset: 2px;
      border-color: #3b82f6;
      box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
   }

body[data-theme="night"] .form-control
{
   background-color: #991b1b !important;
   border-color: #dc2626 !important;
   color: #fca5a5 !important;
}

/* Select/Dropdown styles */
.form-select
{
   background-color: #1e293b;
   border: 1px solid #374151;
   color: #ffffff;
   padding: 0.5rem 1rem;
   border-radius: 0.375rem;
   width: 100%;
   cursor: pointer;
}

   .form-select:focus
   {
      outline: 2px solid transparent;
      outline-offset: 2px;
      border-color: #3b82f6;
      box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
   }

body[data-theme="night"] .form-select
{
   background-color: #991b1b !important;
   border-color: #dc2626 !important;
   color: #fca5a5 !important;
}

/* Catalog detail buttons: equal-width columns on mobile when wrapping */
@media (max-width: 639px) {
    .catalog-detail-buttons > * {
        flex: 1 1 calc(50% - 0.25rem);
    }
    .catalog-detail-buttons > .finder-chart-dropdown > button {
        width: 100%;
    }
}

/* Button styles */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
}

/* Button size variants */
.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

/* New style for icon-only buttons */
.btn-icon {
    background-color: transparent !important;
    border: none !important;
    padding: 0.25rem !important;
    margin: 0;
    line-height: 1;
    border-radius: 0.25rem;
    transition: all 0.2s;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Sortable header buttons - completely transparent text-only */
.sortable-header {
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.sortable-header:hover {
    background-color: transparent !important;
}

.sortable-header:focus {
    outline: none;
    background-color: transparent !important;
}

.btn-primary
{
   background-color: #3b82f6;
   color: #ffffff;
}

   .btn-primary:hover
   {
      background-color: #2563eb;
   }

.btn-secondary
{
   background-color: #6b7280;
   color: #ffffff;
}

   .btn-secondary:hover
   {
      background-color: #4b5563;
   }

.btn-danger
{
   background-color: #ef4444;
   color: #ffffff;
}

   .btn-danger:hover
   {
      background-color: #dc2626;
   }

body[data-theme="night"] .btn-danger
{
   background-color: #7f1d1d !important;
   color: #fca5a5 !important;
}

   body[data-theme="night"] .btn-danger:hover
   {
      background-color: #991b1b !important;
   }

/* Night mode button styles */
body[data-theme="night"] .btn-primary
{
   background-color: #991b1b !important;
   color: #fca5a5 !important;
}

   body[data-theme="night"] .btn-primary:hover
   {
      background-color: #7f1d1d !important;
   }

body[data-theme="night"] .btn-secondary
{
   background-color: #7f1d1d !important;
   color: #fca5a5 !important;
}

   body[data-theme="night"] .btn-secondary:hover
   {
      background-color: #450a0a !important;
   }

body[data-theme="night"] .btn-danger
{
   background-color: #991b1b;
   color: #fca5a5;
}

   body[data-theme="night"] .btn-danger:hover
   {
      background-color: #7f1d1d;
   }

/* Compact table styles */
.table-sm td, .table-sm th {
    padding: 0.25rem 0.5rem;
}

.badge-sm {
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
}

.table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

body[data-theme="night"] .table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

/* Compact button group */
.btn-group-sm > .btn {
    padding: 0.15rem 0.3rem;
    font-size: 0.8rem;
}

/* Night mode icon colors */
body[data-theme="night"] .text-blue-400
{
   color: #f87171 !important;
}

body[data-theme="night"] .text-green-400
{
   color: #f87171 !important;
}

body[data-theme="night"] .text-purple-400
{
   color: #f87171 !important;
}

/* Exception: Keep Add to Plan/List action buttons colored in night mode */
body[data-theme="night"] .tonight-add-to-plan.text-purple-400
{
   color: #c084fc !important;
}

body[data-theme="night"] .tonight-add-to-plan.text-purple-400:hover
{
   color: #d8b4fe !important;
}

body[data-theme="night"] .tonight-add-to-list.text-blue-400
{
   color: #60a5fa !important;
}

body[data-theme="night"] .tonight-add-to-list.text-blue-400:hover
{
   color: #93c5fd !important;
}

body[data-theme="night"] .text-yellow-400
{
   color: #f87171 !important;
}

body[data-theme="night"] .text-red-400
{
   color: #f87171 !important;
}

body[data-theme="night"] .text-indigo-400
{
   color: #f87171 !important;
}

/* Night mode observation type badges */
body[data-theme="night"] .bg-blue-600
{
   background-color: #991b1b !important;
}

body[data-theme="night"] .bg-purple-600
{
   background-color: #7f1d1d !important;
}

/* Table styles */
.table
{
   width: 100%;
   border-collapse: collapse;
}

   .table th
   {
      background-color: #1e293b;
      padding: 0.75rem;
      text-align: left;
      font-weight: 600;
      border-bottom: 1px solid #374151;
   }

   .table td
   {
      padding: 0.75rem;
      border-bottom: 1px solid #374151;
   }

   .table tr:hover
   {
      background-color: #1e293b;
   }

body[data-theme="night"] .table th
{
   background-color: #991b1b;
}

body[data-theme="night"] .table tr:hover
{
   background-color: #991b1b;
}

/* Card styles */
.card
{
   background-color: #1e293b;
   border: 1px solid #374151;
   border-radius: 0.5rem;
   padding: 1.25rem;
   margin-bottom: 1rem;
   position: relative;
   display: flex;
   flex-direction: column;
   min-height: 250px;
}

body[data-theme="night"] .card
{
   background-color: #991b1b;
   border-color: #dc2626;
}

/* Night mode form button overrides */
body[data-theme="night"] form button.text-green-400 {
    color: #f87171 !important;
}

body[data-theme="night"] form button.text-green-400:hover {
    color: #fca5a5 !important;
}

/* ============================================================
   NIGHT VISION MODE — Extended Coverage
   ============================================================ */

/* --- Backgrounds: Tailwind gray scale → red scale --- */
body[data-theme="night"] .bg-gray-900 {
    background-color: #1a0505 !important;
}

body[data-theme="night"] .bg-gray-800 {
    background-color: #2d0a0a !important;
}

body[data-theme="night"] .bg-gray-700 {
    background-color: #3d1010 !important;
}

body[data-theme="night"] .bg-black {
    background-color: #0d0202 !important;
}

body[data-theme="night"] .hover\:bg-gray-800:hover {
    background-color: #2d0a0a !important;
}

body[data-theme="night"] .hover\:bg-gray-700:hover {
    background-color: #3d1010 !important;
}

/* --- Text colors --- */
body[data-theme="night"] .text-gray-100 {
    color: #fca5a5 !important;
}

body[data-theme="night"] .text-gray-200 {
    color: #fca5a5 !important;
}

body[data-theme="night"] .text-gray-500 {
    color: #993333 !important;
}

body[data-theme="night"] .text-gray-600 {
    color: #7f2d2d !important;
}

/* --- Border colors --- */
body[data-theme="night"] .border-gray-600 {
    border-color: #7f1d1d !important;
}

body[data-theme="night"] .border-gray-800 {
    border-color: #450a0a !important;
}

/* --- Colored badges → red --- */
body[data-theme="night"] .bg-green-600,
body[data-theme="night"] .bg-green-500 {
    background-color: #991b1b !important;
}

body[data-theme="night"] .bg-yellow-600,
body[data-theme="night"] .bg-yellow-500 {
    background-color: #7f1d1d !important;
}

body[data-theme="night"] .bg-orange-600 {
    background-color: #7f1d1d !important;
}

body[data-theme="night"] .bg-indigo-600 {
    background-color: #991b1b !important;
}

/* --- Colored icons → red --- */
body[data-theme="night"] .text-cyan-400,
body[data-theme="night"] .text-teal-400,
body[data-theme="night"] .text-teal-500,
body[data-theme="night"] .text-sky-400,
body[data-theme="night"] .text-lime-400,
body[data-theme="night"] .text-amber-400,
body[data-theme="night"] .text-amber-500,
body[data-theme="night"] .text-orange-400,
body[data-theme="night"] .text-orange-500,
body[data-theme="night"] .text-blue-500,
body[data-theme="night"] .text-purple-500,
body[data-theme="night"] .text-green-500,
body[data-theme="night"] .text-green-400 {
    color: #f87171 !important;
}

/* --- Hover text → salmon red --- */
body[data-theme="night"] .hover\:text-gray-300:hover {
    color: #fca5a5 !important;
}

body[data-theme="night"] .hover\:text-white:hover {
    color: #fca5a5 !important;
}

body[data-theme="night"] .hover\:text-blue-300:hover,
body[data-theme="night"] .hover\:text-green-300:hover {
    color: #fca5a5 !important;
}

/* --- Info/warning banners → red --- */
body[data-theme="night"] .bg-blue-900 {
    background-color: #1a0505 !important;
}

body[data-theme="night"] .border-blue-600 {
    border-color: #7f1d1d !important;
}

body[data-theme="night"] .text-blue-300 {
    color: #fca5a5 !important;
}

body[data-theme="night"] .text-blue-200 {
    color: #fca5a5 !important;
}

/* --- Dropdown hover → red --- */
body[data-theme="night"] .dropdown-menu a:hover {
    background-color: #3d1010 !important;
    color: #fca5a5 !important;
}

/* --- Mobile menu --- */
body[data-theme="night"] #mobile-menu {
    background-color: #1a0505 !important;
    border-color: #7f1d1d !important;
}

/* --- Modals and overlays --- */
body[data-theme="night"] .modal-content,
body[data-theme="night"] [id*="keyboard-shortcuts"],
body[data-theme="night"] [id*="modal"] {
    background-color: #2d0a0a !important;
    border-color: #7f1d1d !important;
    color: #fca5a5 !important;
}

/* --- Cookie banner --- */
body[data-theme="night"] .cookie-banner,
body[data-theme="night"] [class*="cookie"] {
    background-color: #2d0a0a !important;
    border-color: #7f1d1d !important;
}

/* ============================================================
   NIGHT: Focus & Active States (Step 4)
   ============================================================ */

body[data-theme="night"] .form-control:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

body[data-theme="night"] .form-select:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

body[data-theme="night"] *:focus-visible {
    outline-color: #ef4444 !important;
}

body[data-theme="night"] .ring-blue-500 {
    --tw-ring-color: #ef4444 !important;
}

body[data-theme="night"] .focus\:ring-blue-500:focus {
    --tw-ring-color: #ef4444 !important;
}

body[data-theme="night"] .btn-icon:hover {
    background-color: rgba(239, 68, 68, 0.15) !important;
}

/* ============================================================
   NIGHT: Image Dimming (Step 5)
   ============================================================ */

body[data-theme="night"] img[src*="/uploads/"],
body[data-theme="night"] img[src*="wikipedia"],
body[data-theme="night"] img[src*="caldwell"] {
    filter: brightness(0.35) saturate(0.3) sepia(0.5) hue-rotate(-30deg);
    transition: filter 0.3s ease;
}

body[data-theme="night"] img[src*="/uploads/"]:hover,
body[data-theme="night"] img[src*="wikipedia"]:hover,
body[data-theme="night"] img[src*="caldwell"]:hover {
    filter: brightness(0.6) saturate(0.5) sepia(0.3) hue-rotate(-30deg);
}

/* Hero / decorative images — stronger dim */
body[data-theme="night"] .oblog-hero img {
    filter: brightness(0.25) saturate(0.2) sepia(0.6) hue-rotate(-30deg);
}

/* Night view: suppress APOD image/video (bright external content) */
body[data-theme="night"] .apod-media {
    display: none !important;
}
body[data-theme="night"] .apod-night-notice {
    display: block !important;
}

/* Night view: suppress survey images (bright external content) */
body[data-theme="night"] .survey-media {
    display: none !important;
}
body[data-theme="night"] .survey-night-notice {
    display: block !important;
}

/* Night view: heavily dim community/hero photos in catalog details */
body[data-theme="night"] #photo-grid img {
    filter: brightness(0.15) saturate(0) sepia(0.8) hue-rotate(-30deg);
}

/* Night view: suppress white glow on hero photo and mini starmap */
body[data-theme="night"] img[style*="box-shadow"],
body[data-theme="night"] .mini-starmap[style*="box-shadow"] {
    box-shadow: none !important;
}

/* ============================================================
   NIGHT: Global Accent & Scrollbar (Step 9)
   ============================================================ */

body[data-theme="night"] {
    accent-color: #ef4444;
}

body[data-theme="night"] input[type="checkbox"],
body[data-theme="night"] input[type="radio"],
body[data-theme="night"] input[type="range"] {
    accent-color: #ef4444;
}

/* Scrollbar */
body[data-theme="night"] ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

body[data-theme="night"] ::-webkit-scrollbar-track {
    background: #1a0505;
}

body[data-theme="night"] ::-webkit-scrollbar-thumb {
    background: #4d1515;
    border-radius: 4px;
}

body[data-theme="night"] ::-webkit-scrollbar-thumb:hover {
    background: #662222;
}

/* Selection highlight */
body[data-theme="night"] ::selection {
    background: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

body[data-theme="night"] ::-moz-selection {
    background: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

/* --- Table border colors in night mode --- */
body[data-theme="night"] .table th {
    border-bottom-color: #7f1d1d;
}

body[data-theme="night"] .table td {
    border-bottom-color: #7f1d1d;
}

/* ============================================================
   NIGHT: Additional Gaps (Round 2)
   ============================================================ */

/* --- Issue 1: Index page "Browse catalog" amber button → dim red --- */
body[data-theme="night"] .btn-catalog {
    background-color: #7f1d1d !important;
    color: #fca5a5 !important;
}

body[data-theme="night"] .btn-catalog:hover {
    background-color: #991b1b !important;
}

/* --- Issue 2: Catalog Details — blue badges, upload button --- */
body[data-theme="night"] .bg-blue-100 {
    background-color: #2d0a0a !important;
}

body[data-theme="night"] .text-blue-800 {
    color: #fca5a5 !important;
}

body[data-theme="night"] .bg-blue-700 {
    background-color: #991b1b !important;
}

body[data-theme="night"] .text-blue-200 {
    color: #fca5a5 !important;
}

body[data-theme="night"] .bg-blue-500 {
    background-color: #991b1b !important;
}

body[data-theme="night"] .hover\:bg-blue-500:hover {
    background-color: #7f1d1d !important;
}

body[data-theme="night"] .bg-blue-600 {
    background-color: #991b1b !important;
}

body[data-theme="night"] .hover\:bg-blue-600:hover {
    background-color: #7f1d1d !important;
}

/* Mini-starmap white shadow → red glow */
body[data-theme="night"] .mini-starmap {
    box-shadow: 0 0 14px 3px rgba(239, 68, 68, 0.15) !important;
}

/* --- Issue 3: Lists — green published badge --- */
body[data-theme="night"] .bg-green-700 {
    background-color: #7f1d1d !important;
}

body[data-theme="night"] .text-green-200 {
    color: #fca5a5 !important;
}

/* --- Issue 4: Events — colored left borders → red --- */
body[data-theme="night"] .border-yellow-500 {
    border-color: #991b1b !important;
}

body[data-theme="night"] .border-teal-500 {
    border-color: #7f1d1d !important;
}

body[data-theme="night"] .border-purple-500 {
    border-color: #991b1b !important;
}

body[data-theme="night"] .border-orange-500 {
    border-color: #7f1d1d !important;
}

body[data-theme="night"] .border-red-500 {
    border-color: #ef4444 !important;
}

body[data-theme="night"] .border-cyan-500 {
    border-color: #991b1b !important;
}

body[data-theme="night"] .border-indigo-500 {
    border-color: #7f1d1d !important;
}

body[data-theme="night"] .border-emerald-500 {
    border-color: #991b1b !important;
}

/* --- Plans Details — red clear button --- */
body[data-theme="night"] .bg-red-600 {
    background-color: #991b1b !important;
}

body[data-theme="night"] .hover\:bg-red-700:hover,
body[data-theme="night"] .hover\:bg-red-500:hover {
    background-color: #7f1d1d !important;
}

/* --- Plans Details — batch action buttons --- */
.btn-batch-purple {
    background-color: #8b5cf6;
    color: white;
    border: none;
}
.btn-batch-purple:hover {
    background-color: #7c3aed;
}
.btn-batch-blue {
    background-color: #3b82f6;
    color: white;
    border: none;
}
.btn-batch-blue:hover {
    background-color: #2563eb;
}

body[data-theme="night"] .btn-batch-purple,
body[data-theme="night"] .btn-batch-blue {
    background-color: #991b1b !important;
    color: #fca5a5 !important;
}

body[data-theme="night"] .btn-batch-purple:hover,
body[data-theme="night"] .btn-batch-blue:hover {
    background-color: #7f1d1d !important;
}

/* --- Plans Details — minimap cell background --- */
.minimap-cell {
    background-color: #1e2533;
}

body[data-theme="night"] .minimap-cell {
    background-color: #1a0505 !important;
}

/* --- Plans Details — observed badge (green-100/green-800) --- */
body[data-theme="night"] .bg-green-100 {
    background-color: #2d0a0a !important;
}

body[data-theme="night"] .text-green-800 {
    color: #fca5a5 !important;
}

/* --- Plans Details — observed row highlight --- */
body[data-theme="night"] .bg-green-900 {
    background-color: #1a0505 !important;
}

/* --- Plans Details — progress bar gradient --- */
body[data-theme="night"] .bg-gradient-to-r.from-blue-600.to-green-600 {
    background-image: none !important;
    background-color: #991b1b !important;
}

/* --- Plans Details — text colors --- */
body[data-theme="night"] .text-blue-400 {
    color: #f87171 !important;
}

body[data-theme="night"] .text-yellow-400 {
    color: #f87171 !important;
}

body[data-theme="night"] .text-red-400 {
    color: #f87171 !important;
}

body[data-theme="night"] .text-red-500 {
    color: #ef4444 !important;
}

body[data-theme="night"] .text-gray-300 {
    color: #d4a0a0 !important;
}

body[data-theme="night"] .text-gray-400 {
    color: #993333 !important;
}

/* --- Plans Details — hover text --- */
body[data-theme="night"] .hover\:text-blue-400:hover {
    color: #fca5a5 !important;
}

body[data-theme="night"] .hover\:text-yellow-300:hover {
    color: #fca5a5 !important;
}

body[data-theme="night"] .hover\:text-red-300:hover {
    color: #fca5a5 !important;
}

/* --- Plans Details — batch bar border --- */
body[data-theme="night"] .border-blue-500 {
    border-color: #7f1d1d !important;
}

/* --- Plans Details — table header hover --- */
body[data-theme="night"] .hover\:bg-gray-600:hover {
    background-color: #3d1010 !important;
}

/* --- Plans Details — table row hover --- */
body[data-theme="night"] .hover\:bg-gray-700:hover {
    background-color: #3d1010 !important;
}

/* --- Plans Details — divider --- */
body[data-theme="night"] .divide-gray-700 > :not([hidden]) ~ :not([hidden]) {
    border-color: #7f1d1d !important;
}

/* --- Plans Details — border-gray-700 --- */
body[data-theme="night"] .border-gray-700 {
    border-color: #7f1d1d !important;
}

/* --- Issue 5: Plans Details — object type badges --- */
body[data-theme="night"] .bg-yellow-700 {
    background-color: #7f1d1d !important;
}

body[data-theme="night"] .text-yellow-200 {
    color: #fca5a5 !important;
}

body[data-theme="night"] .bg-purple-700 {
    background-color: #7f1d1d !important;
}

body[data-theme="night"] .text-purple-200 {
    color: #fca5a5 !important;
}

body[data-theme="night"] .bg-pink-700 {
    background-color: #7f1d1d !important;
}

body[data-theme="night"] .text-pink-200 {
    color: #fca5a5 !important;
}

body[data-theme="night"] .bg-orange-700 {
    background-color: #7f1d1d !important;
}

body[data-theme="night"] .text-orange-200 {
    color: #fca5a5 !important;
}

/* --- Logo: turn blue ring and white text red in night mode --- */
body[data-theme="night"] img[src*="oblog-logo-wordmark"] {
    filter: brightness(0.6) sepia(1) hue-rotate(-30deg) saturate(3);
}

/* --- Issue 6: Catalog view — JS-generated colored type badges --- */
/* bg-*-900 backgrounds (catalog-new.js badges) */
body[data-theme="night"] .bg-cyan-900 {
    background-color: #2d0a0a !important;
}

body[data-theme="night"] .bg-amber-900 {
    background-color: #2d0a0a !important;
}

body[data-theme="night"] .bg-emerald-900 {
    background-color: #2d0a0a !important;
}

body[data-theme="night"] .bg-purple-900 {
    background-color: #2d0a0a !important;
}

body[data-theme="night"] .bg-teal-900 {
    background-color: #2d0a0a !important;
}

body[data-theme="night"] .bg-orange-900 {
    background-color: #2d0a0a !important;
}

body[data-theme="night"] .bg-indigo-900 {
    background-color: #2d0a0a !important;
}

body[data-theme="night"] .bg-yellow-900 {
    background-color: #2d0a0a !important;
}

body[data-theme="night"] .bg-red-900 {
    background-color: #2d0a0a !important;
}

body[data-theme="night"] .bg-pink-900 {
    background-color: #2d0a0a !important;
}

body[data-theme="night"] .bg-yellow-800 {
    background-color: #2d0a0a !important;
}

body[data-theme="night"] .bg-stone-700 {
    background-color: #2d0a0a !important;
}

/* text-*-300 text (catalog-new.js badges) */
body[data-theme="night"] .text-cyan-300,
body[data-theme="night"] .text-amber-300,
body[data-theme="night"] .text-emerald-300,
body[data-theme="night"] .text-purple-300,
body[data-theme="night"] .text-teal-300,
body[data-theme="night"] .text-orange-300,
body[data-theme="night"] .text-indigo-300,
body[data-theme="night"] .text-yellow-300,
body[data-theme="night"] .text-gray-200,
body[data-theme="night"] .text-stone-300 {
    color: #fca5a5 !important;
}

/* bg-gray-600 fallback badge */
body[data-theme="night"] .bg-gray-600 {
    background-color: #2d0a0a !important;
}

/* --- Catalog Details — inline-styled buttons (planet links, add-to-list/plan, finder chart) --- */
body[data-theme="night"] .btn[style*="background-color"] {
    background-color: #991b1b !important;
    color: #fca5a5 !important;
}

body[data-theme="night"] .btn[style*="background-color"]:hover {
    background-color: #7f1d1d !important;
}

/* --- Catalog Details — difficulty badges & visibility badges --- */
body[data-theme="night"] .bg-orange-500 {
    background-color: #7f1d1d !important;
}

body[data-theme="night"] .bg-red-500 {
    background-color: #991b1b !important;
}

body[data-theme="night"] .bg-red-100 {
    background-color: #2d0a0a !important;
}

body[data-theme="night"] .text-red-800 {
    color: #fca5a5 !important;
}

body[data-theme="night"] .bg-gray-100 {
    background-color: #2d0a0a !important;
}

body[data-theme="night"] .text-gray-800 {
    color: #fca5a5 !important;
}

body[data-theme="night"] .bg-emerald-600 {
    background-color: #991b1b !important;
}

body[data-theme="night"] .hover\:bg-emerald-500:hover,
body[data-theme="night"] .hover\:bg-emerald-800:hover {
    background-color: #7f1d1d !important;
}

body[data-theme="night"] .border-emerald-700 {
    border-color: #7f1d1d !important;
}

body[data-theme="night"] .hover\:text-emerald-200:hover {
    color: #fca5a5 !important;
}

/* --- Catalog Details — difficulty text-black on yellow badge --- */
body[data-theme="night"] .text-black {
    color: #fca5a5 !important;
}

/* Action buttons */
.catalog-action-btn {
    padding: 0.25rem 0.5rem;
}

@media (max-width: 768px) {
    .catalog-action-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 36px;
        min-height: 36px;
        padding: 0;
        font-size: 1rem;
    }
}

/* --- Plan Details — mobile action buttons (portrait + landscape) --- */
@media (max-width: 768px) {
    .plan-card-actions a,
    .plan-card-actions button {
        min-width: 36px;
        min-height: 36px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .plan-card-actions a,
    .plan-card-actions button {
        min-width: 40px;
        min-height: 40px;
        font-size: 1.2rem;
    }
}
