:root{
    --app-bg: #0b1220;
    --card-bg: #ffffff;
    --muted: rgba(255,255,255,0.65);
    --shadow: 0 10px 30px rgba(0,0,0,.10);
    --radius: 16px;
  
    --accent: #6ea8fe;
    --accent-2: #a78bfa;
  
    --started: #0d6efd;
    --waiting: #6c757d;
    --finished: #198754;
    --running: #ffc107;
  }
  
  body{
    background:
      radial-gradient(900px 400px at 10% 0%, rgba(110,168,254,.18), transparent 55%),
      radial-gradient(900px 400px at 90% 0%, rgba(167,139,250,.18), transparent 55%),
      #f6f7fb;
  }
  
  /* Navbar */
  .app-navbar{
    background: linear-gradient(90deg, #0b1220, #111b2e);
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .navbar .brand-mark{
    width: 34px; height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0b1220;
    box-shadow: 0 10px 20px rgba(0,0,0,.18);
  }
  
  /* Cards */
  .card{
    border: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }
  .card .card-title{
    font-weight: 700;
    letter-spacing: .2px;
  }
  
  /* Section headers */
  .section-header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
  }
  .section-title{
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .section-title i{
    font-size: 1.1rem;
  }
  .section-chip{
    font-size: .85rem;
    padding: .35rem .6rem;
    border-radius: 999px;
    background: rgba(0,0,0,.05);
  }
  
  /* Status pill */
  .status-pill{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: .35rem .6rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: .82rem;
  }
  .status-pill.started{ background: rgba(13,110,253,.12); color: var(--started); }
  .status-pill.waiting{ background: rgba(108,117,125,.12); color: var(--waiting); }
  .status-pill.finished{ background: rgba(25,135,84,.12); color: var(--finished); }
  .status-pill.running{ background: rgba(255,193,7,.18); color: #8a6d00; }
  
  /* Table */
  .table td, .table th { vertical-align: middle; }
  .table thead th{
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: rgba(0,0,0,.55);
  }
  
  /* Mobile task cards */
  .task-card{
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,.06);
    background: #fff;
    padding: 12px;
  }
  .task-card + .task-card{ margin-top: 10px; }
  .task-title{
    font-weight: 700;
    line-height: 1.25;
  }
  .task-meta{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    margin-top: 10px;
    font-size: .9rem;
  }
  .task-meta .label{
    color: rgba(0,0,0,.55);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
  }
  .task-meta .value{
    font-weight: 600;
  }
  .task-actions{
    display: flex;
    gap: 8px;
    margin-top: 12px;
  }
  .task-actions form{ margin: 0; }
  .task-actions .btn{
    border-radius: 12px;
  }
  
  /* Slightly tighter on small screens */
  @media (max-width: 576px){
    .container{ padding-left: 14px; padding-right: 14px; }
    .card .card-body{ padding: 14px; }
    .task-meta{ grid-template-columns: 1fr; }
  }
  


  /* =========================
   DARK MODE
========================= */

body.dark {
    background:
      radial-gradient(900px 400px at 10% 0%, rgba(110,168,254,.15), transparent 55%),
      radial-gradient(900px 400px at 90% 0%, rgba(167,139,250,.15), transparent 55%),
      #0b1220;
    color: #e5e7eb;
  }
  
  /* Navbar */
  body.dark .app-navbar {
    background: linear-gradient(90deg, #060b17, #0b1220);
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  
  /* Cards */
  body.dark .card {
    background: #111827;
    color: #e5e7eb;
    box-shadow: 0 20px 40px rgba(0,0,0,.45);
  }
  
  body.dark .card-title {
    color: #f9fafb;
  }
  
  /* Tables */
  body.dark .table {
    color: #e5e7eb;
  }
  
  body.dark .table thead th {
    color: rgba(255,255,255,.55);
    border-bottom-color: rgba(255,255,255,.12);
  }
  
  body.dark .table td,
  body.dark .table th {
    border-top-color: rgba(255,255,255,.08);
  }
  
  body.dark .table-warning {
    background-color: rgba(255,193,7,.12) !important;
  }
  
  /* Inputs */
  body.dark .form-control,
  body.dark .input-group-text {
    background: #0b1220;
    border-color: rgba(255,255,255,.15);
    color: #e5e7eb;
  }
  
  body.dark .form-control::placeholder {
    color: rgba(255,255,255,.45);
  }
  
  /* Tabs */
  body.dark .nav-tabs .nav-link {
    color: rgba(255,255,255,.65);
  }
  
  body.dark .nav-tabs .nav-link.active {
    background: #111827;
    border-color: rgba(255,255,255,.12);
    color: #fff;
  }
  
  /* Task cards (mobile) */
  body.dark .task-card {
    background: #111827;
    border-color: rgba(255,255,255,.12);
  }
  
  /* Status pills */
  body.dark .status-pill.started {
    background: rgba(13,110,253,.2);
  }
  body.dark .status-pill.waiting {
    background: rgba(108,117,125,.25);
  }
  body.dark .status-pill.finished {
    background: rgba(25,135,84,.25);
  }
  body.dark .status-pill.running {
    background: rgba(255,193,7,.25);
  }
  
  /* Alerts */
  body.dark .alert {
    background: #0b1220;
    border-color: rgba(255,255,255,.15);
    color: #e5e7eb;
  }


  /* ===== Dark mode table fix (desktop) ===== */
body.dark .table-responsive {
    background: transparent;
  }
  
  body.dark table.table {
    background: #111827 !important;
    color: #e5e7eb !important;
    border-color: rgba(255,255,255,.10) !important;
  }
  
  body.dark table.table thead,
  body.dark table.table thead th {
    background: #0b1220 !important;
    color: rgba(255,255,255,.70) !important;
    border-bottom-color: rgba(255,255,255,.12) !important;
  }
  
  body.dark table.table tbody tr {
    background: transparent !important;
  }
  
  body.dark table.table td,
  body.dark table.table th {
    background: transparent !important;
    border-top-color: rgba(255,255,255,.08) !important;
    color: #e5e7eb !important;
  }
  
  /* If you ever enable hover/striped later */
  body.dark .table-hover tbody tr:hover {
    background-color: rgba(255,255,255,.04) !important;
  }
  body.dark .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(255,255,255,.03) !important;
  }

  /* ===== Dark mode mobile card labels fix ===== */
body.dark .task-card .label {
    color: rgba(255,255,255,.60) !important;
  }
  
  body.dark .task-card .value {
    color: #f3f4f6 !important;
  }
  
  body.dark .task-card .task-title {
    color: #ffffff !important;
  }

  

  body.dark .text-muted {
    color: rgba(255,255,255,.55) !important;
  }
  
  /* =========================
   DARK MODE - MODAL FIX
========================= */

body.dark .modal-backdrop.show {
    opacity: .75;
  }
  
  body.dark .modal-content {
    background: #111827 !important;
    color: #e5e7eb !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0,0,0,.60);
  }
  
  body.dark .modal-header,
  body.dark .modal-footer {
    border-color: rgba(255,255,255,.10) !important;
  }
  
  body.dark .modal-title {
    color: #ffffff !important;
  }
  
  body.dark .btn-close {
    filter: invert(1) grayscale(100%);
    opacity: .8;
  }
  body.dark .btn-close:hover {
    opacity: 1;
  }
  
  /* Inputs inside modal */
  body.dark .modal-content .form-control,
  body.dark .modal-content .input-group-text {
    background: #0b1220 !important;
    color: #e5e7eb !important;
    border-color: rgba(255,255,255,.14) !important;
  }
  
  body.dark .modal-content .form-control:focus {
    border-color: rgba(110,168,254,.60) !important;
    box-shadow: 0 0 0 .2rem rgba(110,168,254,.18) !important;
  }
  
  body.dark .modal-content .form-label {
    color: rgba(255,255,255,.70) !important;
  }
  
  /* Optional: muted text inside modal */
  body.dark .modal-content .text-muted {
    color: rgba(255,255,255,.55) !important;
  }
  
  /* ===== Last 24h rocket highlight ===== */
.last-24h {
    color: #f97316; /* orange */
  }
  
  .last-24h-icon {
    color: #f97316;
    font-size: .9rem;
    margin-top: -1px;
  }
  
  /* Dark mode */
  body.dark .last-24h,
  body.dark .last-24h-icon {
    color: #fb923c;
  }
  
  /* Optional: very subtle pulse (safe) */
  @keyframes rocketPulse {
    0%   { transform: translateY(0);   opacity: .85; }
    50%  { transform: translateY(-1px); opacity: 1; }
    100% { transform: translateY(0);   opacity: .85; }
  }
  
  .last-24h-icon {
    animation: rocketPulse 1.8s ease-in-out infinite;
  }
  
  .last-24h {
    color: #f97316;
  }
  
  .last-24h-icon {
    color: #f97316;
    font-size: .85rem;
    margin-top: -1px;
  }
  
  body.dark .last-24h,
  body.dark .last-24h-icon {
    color: #fb923c;
  }
  