/* =========================
       Apple-ish Light UI (MVP)
       ========================= */
    :root{
      /* core */
      --bg: #f5f5f7;
      --bg2:#ffffff;
      --text:#111827;
      --muted:#6b7280;
      --line: rgba(17,24,39,.12);

      /* surfaces */
      --card: rgba(255,255,255,.82);
      --cardSolid: #ffffff;
      --shadow: 0 10px 30px rgba(0,0,0,.08);
      --shadow2: 0 4px 14px rgba(0,0,0,.06);
      --radius: 18px;

      /* brand */
      --accent:#007aff;          /* Apple blue */
      --accent2:#0a84ff;
      --ok:#34c759;              /* Apple green */
      --warn:#ff9f0a;            /* Apple orange */
      --bad:#ff3b30;             /* Apple red */

      /* controls */
      --btn:#ffffff;
      --btnHover:#f2f3f5;
      --btnText:#111827;

      --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
      --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
    }

    *{box-sizing:border-box}
    html, body{height:100%}
    body{
      margin:0;
      font-family:var(--sans);
      color:var(--text);
      background:
        radial-gradient(1200px 600px at 20% -10%, rgba(0,122,255,.10), transparent 60%),
        radial-gradient(900px 500px at 90% 0%, rgba(52,199,89,.08), transparent 60%),
        linear-gradient(180deg, var(--bg) 0%, #eef0f3 100%);
    }

    header{
      position:sticky; top:0; z-index:10;
      background: rgba(245,245,247,.78);
      backdrop-filter: blur(14px);
      border-bottom: 1px solid var(--line);
    }

    .wrap{max-width:1200px; margin:0 auto; padding:18px}
    .topbar{display:flex; gap:12px; align-items:center; justify-content:space-between}

    .brand{display:flex; align-items:center; gap:12px; min-width:0}
    .logo{
      width:38px; height:38px; border-radius:14px;
      background:
        radial-gradient(circle at 35% 30%, #7cc4ff, #2f86ff 45%, #0d4aa3 100%);
      box-shadow: var(--shadow2);
      flex:0 0 auto;
    }
    .title{font-weight:750; letter-spacing:.2px}
    .subtitle{color:var(--muted); font-size:13px; margin-top:2px}

    .controls{display:flex; gap:10px; flex-wrap:wrap; align-items:center; justify-content:flex-end}

    .pill{
      display:flex; gap:8px; align-items:center;
      border:1px solid var(--line);
      background: rgba(255,255,255,.65);
      padding:10px 12px;
      border-radius:999px;
      box-shadow: 0 1px 0 rgba(0,0,0,.03);
    }

    select, input, button, textarea{font:inherit}
    select, input, textarea{
      border:1px solid var(--line);
      background: rgba(255,255,255,.85);
      color:var(--text);
      border-radius:14px;
      padding:10px 12px;
      outline:none;
      box-shadow: 0 1px 0 rgba(0,0,0,.03);
    }
    select:focus, input:focus, textarea:focus{
      border-color: rgba(0,122,255,.35);
      box-shadow: 0 0 0 4px rgba(0,122,255,.12);
    }
    input::placeholder, textarea::placeholder{color:#9aa3af}

    button{
      border:1px solid var(--line);
      background: var(--btn);
      color: var(--btnText);
      border-radius:14px;
      padding:10px 12px;
      cursor:pointer;
      transition:.15s transform, .15s background, .15s box-shadow;
      box-shadow: 0 1px 0 rgba(0,0,0,.03);
    }
    button:hover{transform: translateY(-1px); background: var(--btnHover); box-shadow: var(--shadow2)}
    button:active{transform: translateY(0px)}
    button:disabled{opacity:.5; cursor:not-allowed; transform:none; box-shadow:none}

    .btn-accent{
      border-color: rgba(0,122,255,.22);
      background: rgba(0,122,255,.10);
    }
    .btn-ok{border-color: rgba(52,199,89,.25); background: rgba(52,199,89,.12)}
    .btn-warn{border-color: rgba(255,159,10,.28); background: rgba(255,159,10,.14)}
    .btn-bad{border-color: rgba(255,59,48,.28); background: rgba(255,59,48,.12)}
    .btn-ghost{background: transparent}

    main{padding:18px 0 46px}
    .grid{
      display:grid;
      grid-template-columns: repeat(12, 1fr);
      gap:16px;
    }

    .card{
      grid-column: span 4;
      background: var(--card);
      border:1px solid var(--line);
      border-radius: var(--radius);
      padding:16px;
      box-shadow: var(--shadow);
      min-height: 270px;
    }
    @media (max-width: 980px){ .card{grid-column: span 6} }
    @media (max-width: 640px){ .card{grid-column: span 12} }

    .card-head{display:flex; align-items:flex-start; justify-content:space-between; gap:10px}
    .card-title{display:flex; flex-direction:column; gap:6px; min-width:0;}
    .jobname{display:flex; gap:8px; align-items:center}
    .jobname strong{font-size:15px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width: 240px}
    .status{font-size:12px; color:var(--muted)}
    .small{font-size:12px; color:var(--muted)}

    .clock-area{
      margin-top:12px;
      display:flex; align-items:center; justify-content:center;
      border-radius: 16px;
      border:1px solid rgba(17,24,39,.10);
      background:
        linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.55));
      padding:14px;
      min-height: 130px;
      box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
    }

    .digital{
      font-family: var(--mono);
      font-size: 34px;
      letter-spacing: 1px;
      color: #0f172a;
    }
    canvas{max-width:150px; max-height:150px}

    .btnrow{display:flex; gap:10px; margin-top:12px}
    .btnrow button{flex:1}

    /* BIG GAP between clocks and dashboard */
    .dashboard-gap{height:26px}

    .bottom{
      grid-column: span 12;
      background: var(--cardSolid);
      border:1px solid var(--line);
      border-radius: var(--radius);
      padding:16px;
      box-shadow: var(--shadow);
    }

    .bottom-head{
      display:flex; justify-content:space-between; align-items:flex-start;
      gap:12px; flex-wrap:wrap;
      margin-bottom:12px;
    }

    .filters{
      display:flex; gap:10px; flex-wrap:wrap; align-items:center;
    }

    .tablewrap{
      overflow:auto;
      border:1px solid var(--line);
      border-radius: 16px;
      background: rgba(255,255,255,.70);
      box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
    }

    table{
      width:100%;
      border-collapse:collapse;
      min-width: 980px;
      background: transparent;
    }

    th, td{
      border-bottom:1px solid rgba(17,24,39,.10);
      padding:10px 10px;
      text-align:left;
      vertical-align:top;
    }

    th{
      position:sticky; top:0;
      background: rgba(245,245,247,.95);
      font-size:12px; color:var(--muted);
      z-index:1;
      backdrop-filter: blur(10px);
    }

    td{font-size:13px}

    td input, td textarea{
      width:100%;
      min-width: 120px;
      background: rgba(255,255,255,.9);
      border:1px solid rgba(17,24,39,.12);
      padding:8px 10px;
      border-radius: 12px;
      box-shadow: 0 1px 0 rgba(0,0,0,.02);
    }

    td textarea{min-height: 34px; resize:vertical}

    .row-actions{display:flex; gap:8px}
    .kpi{
      display:flex; gap:10px; flex-wrap:wrap; align-items:center;
      color:var(--muted); font-size:12px
    }
    .kpi strong{color:var(--text)}
    .divider{height:1px; background:rgba(17,24,39,.10); margin:12px 0}
    .note{color:var(--muted); font-size:12px; line-height:1.5}

    /* ---------- analog clock updated colors (light) ---------- */
    /* nothing here; handled via JS canvas drawing */
