:root {
  --bg: #ffffff;
  --card-bg: #ffffff;
  --text: #222222;
  --muted: #666666;
  --primary: #2d7; 
  --primary-contrast: #ffffff;
  --danger: #e74c3c;
  --border: #e6e6e6;
  --input-bg: #ffffff;
  --modal-overlay: rgba(0,0,0,0.35);
  --modal-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.body-theme-light, body.light {
  --bg: #ffffff;
  --card-bg: #ffffff;
  --text: #222222;
  --muted: #666666;
  --primary: #2d7;
  --primary-contrast: #ffffff;
  --danger: #e74c3c;
  --border: #e6e6e6;
  --input-bg: #ffffff;
  --modal-overlay: rgba(0,0,0,0.35);
  --modal-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

body.dark, .body-theme-dark {
  --bg: #0f1113;
  --card-bg: #121417;
  --text: #e6eef3;
  --muted: #98a2ad;
  --primary: #3fbf7f;
  --primary-contrast: #072018;
  --danger: #ff6b6b;
  --border: #1f2428;
  --input-bg: #0b0d0f;
  --modal-overlay: rgba(0,0,0,0.6);
  --modal-shadow: 0 8px 30px rgba(0,0,0,0.6);
}

.admin-panel { padding:16px; max-width:1100px; margin:0 auto; background:transparent; color:var(--text); }
.admin-actions { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:12px; }
.btn { padding:8px 12px; border-radius:6px; background:var(--primary); color:var(--primary-contrast); border:0; cursor:pointer; }
.btn-ghost { background:transparent; border:1px solid var(--border); color:var(--text); }
.btn-danger { background:var(--danger); color:#fff; }
.input { width:100%; padding:8px; border-radius:6px; border:1px solid var(--border); background:var(--input-bg); color:var(--text); }
.form-grid { display:grid; gap:8px; }
.checkbox-list { display:flex; flex-direction:column; gap:6px; max-height:200px; overflow:auto; padding:6px; border:1px solid var(--border); border-radius:6px; background:var(--card-bg); }
.ap-modal-overlay { position:fixed; inset:0; background:var(--modal-overlay); display:flex; align-items:center; justify-content:center; z-index:9999; }
.ap-modal { width:95%; max-width:940px; background:var(--card-bg); border-radius:8px; padding:12px; box-shadow:var(--modal-shadow); color:var(--text); }
.ap-modal-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.upload-modal { max-width:720px; padding:18px; border-radius:12px; }
.upload-modal .file-row { display:flex; gap:8px; align-items:center; }
.upload-modal input[type=file] { flex:1; border-radius:8px; }
.upload-modal .hint { font-size:12px; color:var(--muted); margin-top:6px; }
.material-list { display:flex; flex-direction:column; gap:6px; margin-top:8px; }
.material-item { display:flex; justify-content:space-between; gap:12px; padding:8px; border:1px solid var(--border); border-radius:8px; background:var(--card-bg); }
.btn-download-pdf { background: linear-gradient(90deg,var(--primary), #39b77a); color:var(--primary-contrast); padding:8px 12px; border-radius:8px; border:0; cursor:pointer; }
.small { font-size:13px; color:var(--muted); }
.search-results { max-height:180px; overflow:auto; margin-top:8px; }
.search-item, .list-row, .row { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:8px 4px; border-bottom:1px solid var(--border); }

.card { background:var(--card-bg); border:1px solid var(--border); border-radius:8px; padding:12px; color:var(--text); }
.muted { color:var(--muted); }

@media (max-width:720px) {
  .admin-actions { flex-direction:column; }
  .ap-modal { width:95%; padding:10px; }
}
