/* Modern dashboard styles — supports dark & light via .light-theme on body */
:root{
  --bg:#0b1220; --panel:#0f1724; --muted:#9aa4b2; --accent:#3b82f6; --danger:#ef4444;
  --card:#0b1228; --glass: rgba(255,255,255,0.03);
  --text:#e6eef8; --mono: Menlo, Monaco, 'Courier New', monospace;
}

*{box-sizing:border-box}
body{
  margin:0; font-family:Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: linear-gradient(180deg,#071024 0%, #071829 100%); color:var(--text); height:100vh; display:flex;
}

/* light theme override */
body.light-theme{
  --bg:#f3f7fb; --panel:#ffffff; --muted:#556170; --accent:#2563eb; --danger:#dc2626;
  --card:#ffffff; --glass: rgba(0,0,0,0.03); --text:#0b1220;
  background: linear-gradient(180deg,#f8fafc 0%, #eef2ff 100%);
}

.sidebar{
  width:280px; padding:18px; background:var(--panel); display:flex; flex-direction:column; gap:14px;
  border-right:1px solid rgba(255,255,255,0.03);
  min-height:100vh;
}
.brand{display:flex; gap:12px; align-items:center;}
.brand .logo{width:48px; height:48px; object-fit:contain; border-radius:8px; background:#fff2}
.brand h1{font-size:18px;margin:0}
.muted{color:var(--muted); margin:0; font-size:12px}

.controls{display:flex; flex-direction:column; gap:8px;}
.btn{background:transparent; border:1px solid rgba(255,255,255,0.06); color:var(--text); padding:8px 10px; border-radius:8px; cursor:pointer;}
.btn:hover{transform:translateY(-1px)}
.btn.primary{background:linear-gradient(90deg,var(--accent),#7dd3fc); color:#fff; border:none}
.btn.danger{background:var(--danger); color:#fff; border:none}

.thresholds{display:flex; flex-direction:column; gap:6px; margin-top:6px}
.thresholds label{font-size:13px; color:var(--muted)}
.thresholds input{width:100%; padding:6px; border-radius:6px; border:1px solid rgba(255,255,255,0.04); background:transparent; color:var(--text)}

.search input{width:100%; padding:8px; border-radius:8px; border:1px solid rgba(255,255,255,0.03); background:var(--card); color:var(--text)}
.sidebar-footer{margin-top:auto; font-size:12px; color:var(--muted); text-align:center}

/* main */
.main{flex:1; display:flex; flex-direction:column; min-height:100vh}
.topbar{display:flex; align-items:center; justify-content:space-between; padding:16px 22px; border-bottom:1px solid rgba(255,255,255,0.03); background: linear-gradient(90deg, rgba(255,255,255,0.02), transparent)}
.summary-cards{display:flex; gap:10px}
.card{background:var(--card); padding:10px 14px; border-radius:8px; min-width:110px}
.card-title{font-size:12px; color:var(--muted)}
.card-value{font-weight:700; font-size:20px}

/* workspace */
.workspace{display:flex; gap:12px; padding:16px; height:calc(100vh - 120px)}
.graph{flex:1; border-radius:12px; background:linear-gradient(180deg, rgba(255,255,255,0.01), transparent); border:1px solid rgba(255,255,255,0.03); position:relative; overflow:hidden}

/* right panel */
.right-panel{width:420px; display:flex; flex-direction:column; gap:12px}
.panel-section{background:var(--panel); padding:12px; border-radius:10px; border:1px solid rgba(255,255,255,0.02)}
.codebox{height:120px; background:rgba(0,0,0,0.04); padding:10px; border-radius:8px; overflow:auto; font-family:var(--mono); color:var(--text)}
.codeviewer{height:200px; overflow:auto; background:#020617; padding:10px; border-radius:8px; font-family:var(--mono); color:#dbeafe}
body.light-theme .codeviewer{background:#f8fafc; color:#0b1220}

.fileSelect{width:100%}
.code-actions{display:flex; gap:8px; margin-top:6px}
.modal{position:fixed; inset:0; display:none; align-items:center; justify-content:center; background:rgba(0,0,0,0.5)}
.modal-card{width:540px; background:var(--panel); padding:16px; border-radius:10px}
.modal-card textarea{height:180px; width:100%; border-radius:8px; margin-top:8px; padding:8px; background:transparent; border:1px solid rgba(255,255,255,0.04); color:var(--text)}
.modal-actions{display:flex; gap:8px; justify-content:flex-end; margin-top:8px}
select#fileSelect{width:100%; padding:8px; border-radius:8px; background:transparent; border:1px solid rgba(255,255,255,0.03); color:var(--text)}

/* responsive */
@media (max-width:1100px){
  .right-panel{display:none}
  .sidebar{width:220px}
}
/* Highlighted Upload Button */
.btn.highlight {
  background-color: #facc15; /* bright yellow */
  color: #1f2937; /* dark text */
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(250, 204, 21, 0.6);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn.highlight:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(250, 204, 21, 0.8);
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 rgba(250, 204, 21, 0.6); }
  50% { box-shadow: 0 0 20px rgba(250, 204, 21, 0.9); }
  100% { box-shadow: 0 0 0 rgba(250, 204, 21, 0.6); }
}

.btn.highlight {
  animation: pulse 2s infinite;
}

.deleted-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
  max-height: 100px;
  overflow-y: auto;
}

.deleted-list li {
  padding: 4px 8px;
  background-color: rgba(255, 0, 0, 0.1);
  border-radius: 4px;
  margin-bottom: 4px;
  font-size: 12px;
}
