@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        hsl(240, 2%, 10%);
  --surface:   hsl(240, 2%, 15%);
  --surface-2: hsl(240, 2%, 20%);
  --border:    hsl(0, 0%, 22%);
  --text:      hsl(0, 0%, 84%);
  --text-dim:  hsl(0, 0%, 52%);
  --accent:    hsl(45, 100%, 72%);
  --accent-dk: hsl(35, 100%, 62%);
  --danger:    hsl(0, 55%, 58%);
  --white:     hsl(0, 0%, 98%);
  --ff:        'Poppins', sans-serif;
}

html, body { height: 100%; }

body {
  font-family: var(--ff);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  overflow: hidden;
}

img, ion-icon, a, button, span { display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: var(--ff); }
input, select, textarea { font-family: var(--ff); font-size: 13px; color: var(--text); }

/* ═══════════════════════════════════════════════════════
   LOGIN
═══════════════════════════════════════════════════════ */
.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: radial-gradient(ellipse at 60% 40%, hsl(240,2%,14%) 0%, hsl(240,2%,9%) 100%);
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 30px 70px hsla(0,0%,0%,.55);
}

.login-logo { text-align: center; font-size: 52px; color: var(--accent); margin-bottom: 14px; }
.login-title { text-align: center; font-size: 22px; font-weight: 600; color: var(--white); margin-bottom: 4px; }
.login-subtitle { text-align: center; color: var(--text-dim); font-size: 13px; margin-bottom: 32px; }

.login-form .field-group { margin-bottom: 18px; }

.field-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.input-icon-wrap { position: relative; display: flex; align-items: center; }
.input-icon-wrap ion-icon { position: absolute; left: 13px; font-size: 16px; color: var(--text-dim); pointer-events: none; }
.input-icon-wrap input {
  width: 100%;
  padding: 12px 13px 12px 40px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  transition: border-color .2s;
}
.input-icon-wrap input:focus { outline: none; border-color: var(--accent); }

.login-error { color: hsl(0,60%,65%); font-size: 12px; min-height: 18px; margin-bottom: 10px; }

.login-btn {
  width: 100%;
  padding: 13px;
  background: var(--accent);
  color: hsl(240,2%,12%);
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  transition: background .2s;
  margin-top: 4px;
}
.login-btn:hover { background: var(--accent-dk); }

/* ═══════════════════════════════════════════════════════
   DASHBOARD SHELL
═══════════════════════════════════════════════════════ */
.dashboard { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.admin-brand { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; color: var(--white); }
.admin-brand ion-icon { font-size: 22px; color: var(--accent); }

/* Mode tabs */
.admin-mode-tabs {
  display: flex;
  gap: 3px;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 4px;
}
.mode-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 18px;
  border-radius: 7px;
  border: none;
  background: none;
  color: var(--text-dim);
  font-size: 13px;
  font-family: var(--ff);
  cursor: pointer;
  transition: .2s;
}
.mode-tab ion-icon { font-size: 15px; }
.mode-tab.active {
  background: var(--bg);
  color: var(--accent);
  box-shadow: 0 1px 4px hsla(0,0%,0%,.25);
}

.admin-header-actions { display: flex; align-items: center; gap: 10px; }

.header-link {
  display: flex; align-items: center; gap: 6px;
  color: var(--text-dim); font-size: 13px;
  padding: 7px 14px; border-radius: 8px; border: 1px solid var(--border); transition: .2s;
}
.header-link:hover { color: var(--text); border-color: hsl(0,0%,36%); }

.logout-btn {
  display: flex; align-items: center; gap: 6px;
  background: none; border: 1px solid var(--border);
  color: var(--text-dim); font-size: 13px; padding: 7px 14px; border-radius: 8px; transition: .2s;
}
.logout-btn:hover { color: var(--danger); border-color: var(--danger); }

.admin-layout { display: flex; flex: 1; overflow: hidden; }

/* ═══════════════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════════════ */
.admin-sidebar {
  width: 268px; flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden;
}

.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.sidebar-header h3 { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--text-dim); }

.new-post-btn {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent); color: hsl(240,2%,12%); border: none;
  font-size: 20px; display: flex; align-items: center; justify-content: center; transition: .2s;
}
.new-post-btn:hover { background: var(--accent-dk); }

.posts-list { list-style: none; overflow-y: auto; flex: 1; padding: 8px; }
.posts-list::-webkit-scrollbar { width: 4px; }
.posts-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.no-posts-msg { color: var(--text-dim); font-size: 12px; padding: 24px 10px; text-align: center; line-height: 1.6; }

.post-list-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
  transition: background .15s; border: 1px solid transparent; margin-bottom: 2px;
}
.post-list-item:hover { background: var(--surface-2); }
.post-list-item.active { background: hsla(45,100%,72%,.1); border-color: hsla(45,100%,72%,.28); }

.post-list-icon { font-size: 16px; color: var(--text-dim); flex-shrink: 0; }
.post-list-item.active .post-list-icon { color: var(--accent); }

.post-list-info { display: flex; flex-direction: column; gap: 2px; overflow: hidden; min-width: 0; flex: 1; }
.post-list-title { font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-list-meta { display: flex; gap: 6px; font-size: 11px; color: var(--text-dim); }

.post-list-actions { display: flex; gap: 4px; flex-shrink: 0; opacity: 0; transition: opacity .15s; }
.post-list-item:hover .post-list-actions,
.post-list-item.active .post-list-actions { opacity: 1; }

.post-list-action-btn {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 6px; border: none;
  background: none; color: var(--text-dim); font-size: 14px; cursor: pointer;
  transition: background .15s, color .15s;
}
.post-list-action-btn:hover { background: var(--bg); color: var(--text); }
.post-list-action-btn.del:hover { color: var(--danger); }

/* ═══════════════════════════════════════════════════════
   MAIN FORM
═══════════════════════════════════════════════════════ */
.admin-main { flex: 1; overflow-y: auto; padding: 28px 32px 48px; background: var(--bg); }
.admin-main::-webkit-scrollbar { width: 5px; }
.admin-main::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.form-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.form-header h2 { font-size: 20px; font-weight: 600; color: var(--white); }

.delete-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; background: none; border: 1px solid hsla(0,55%,58%,.5);
  color: var(--danger); border-radius: 8px; font-size: 13px; transition: .2s;
}
.delete-btn:hover { background: hsla(0,55%,58%,.1); border-color: var(--danger); }

/* ─── Form Sections ──────────────────────────────────── */
.form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 18px;
}

.section-heading { font-size: 14px; font-weight: 600; color: var(--white); margin-bottom: 3px; }
.section-sub { font-size: 12px; color: var(--text-dim); margin-bottom: 20px; line-height: 1.5; }

.field-group { margin-bottom: 16px; }
.field-group:last-child { margin-bottom: 0; }

.field-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.field-row .field-group { flex: 1; min-width: 150px; margin-bottom: 0; }
.field-row .field-sm { flex: 0 0 155px; }

input[type="text"], input[type="url"], input[type="date"], select, textarea {
  width: 100%; padding: 10px 13px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 9px; color: var(--text); font-size: 13px;
  transition: border-color .2s; resize: vertical;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
select option { background: var(--surface); }

.image-source-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.img-tab {
  padding: 5px 14px; border-radius: 7px; border: 1px solid var(--border);
  background: none; color: var(--text-dim); font-size: 12px; transition: .2s;
}
.img-tab.active { background: hsla(45,100%,72%,.12); border-color: var(--accent); color: var(--accent); }

.file-upload-label {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 20px; border: 2px dashed var(--border); border-radius: 10px;
  cursor: pointer; color: var(--text-dim); font-size: 13px; transition: .2s; width: 100%;
}
.file-upload-label:hover { border-color: var(--accent); color: var(--accent); }
.file-upload-label ion-icon { font-size: 24px; flex-shrink: 0; }

#imgPreviewWrap,
#projImgPreviewWrap {
  margin-top: 12px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border); max-height: 180px;
}
#imgPreview,
#projImgPreview {
  width: 100%; height: 180px; object-fit: cover; display: block;
}

.radio-tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-tab { cursor: pointer; }
.radio-tab input { display: none; }
.radio-tab span {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 20px; border: 1px solid var(--border); border-radius: 10px;
  color: var(--text-dim); font-size: 13px; transition: .2s; white-space: nowrap;
}
.radio-tab span ion-icon { font-size: 17px; }
.radio-tab input:checked + span { background: hsla(45,100%,72%,.12); border-color: var(--accent); color: var(--accent); font-weight: 500; }

.file-hint { font-size: 12px; margin-top: 8px; line-height: 1.5; }
.current-pdf-label { font-size: 12px; color: var(--text-dim); margin-top: 10px; }
.current-pdf-label span { color: var(--accent); font-weight: 500; }

.form-actions { display: flex; justify-content: flex-end; padding-top: 6px; }
.save-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 30px; background: var(--accent); color: hsl(240,2%,12%);
  border: none; border-radius: 10px; font-size: 14px; font-weight: 600; transition: background .2s;
}
.save-btn:hover { background: var(--accent-dk); }

/* ═══════════════════════════════════════════════════════
   BLOCK BUILDER
═══════════════════════════════════════════════════════ */

/* Toolbar */
.block-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 14px;
  background: var(--surface-2);
  border-radius: 12px;
  margin-bottom: 14px;
}

.toolbar-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 500;
  margin-right: 4px;
}

.add-block-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 12px; background: none;
  border: 1px solid var(--border); border-radius: 7px;
  color: var(--text-dim); font-size: 12px; transition: .15s;
}
.add-block-btn ion-icon { font-size: 14px; }
.add-block-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Empty state */
.blocks-empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 36px 20px; text-align: center;
  border: 2px dashed var(--border); border-radius: 12px;
  color: var(--text-dim); font-size: 13px;
}
.blocks-empty ion-icon { font-size: 32px; }

/* Block item */
.block-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 8px;
  background: var(--surface-2);
  overflow: hidden;
  transition: border-color .15s;
}
.block-item:hover { border-color: hsl(0,0%,32%); }

.block-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 13px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.block-label-wrap {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 500; color: var(--text-dim);
}
.block-label-wrap ion-icon { font-size: 15px; color: var(--accent); }

.block-ctrl-btns { display: flex; gap: 4px; }

.blk-ctrl-btn {
  width: 26px; height: 26px; border-radius: 6px;
  border: 1px solid var(--border); background: none;
  color: var(--text-dim); font-size: 12px;
  display: flex; align-items: center; justify-content: center; transition: .15s;
}
.blk-ctrl-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.blk-ctrl-btn.danger:hover:not(:disabled) { border-color: var(--danger); color: var(--danger); }
.blk-ctrl-btn:disabled { opacity: .3; cursor: not-allowed; }

.block-body { padding: 13px; display: flex; flex-direction: column; gap: 8px; }

/* shared block inputs */
.blk-input {
  width: 100%; padding: 9px 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 13px;
  font-family: var(--ff); transition: border-color .2s;
}
.blk-input:focus { outline: none; border-color: var(--accent); }

.blk-textarea {
  width: 100%; padding: 10px 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 13px;
  font-family: var(--ff); resize: vertical; transition: border-color .2s; line-height: 1.6;
}
.blk-textarea:focus { outline: none; border-color: var(--accent); }

.html-code-textarea {
  width: 100%; padding: 14px 16px;
  background: hsl(240, 2%, 10%);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: hsl(140, 60%, 70%);
  font-family: 'Consolas', 'Fira Code', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.65;
  resize: vertical;
  transition: border-color .2s;
  tab-size: 2;
}
.html-code-textarea:focus { outline: none; border-color: var(--accent); }

/* Heading */
.heading-row { display: flex; gap: 8px; }
.heading-row select { flex: 0 0 145px; padding: 9px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-family: var(--ff); }
.heading-row select:focus { outline: none; border-color: var(--accent); }
.heading-row .blk-input { flex: 1; }

/* Image input */
.bi-tabs { display: flex; gap: 5px; }
.bi-tab {
  padding: 4px 11px; font-size: 11px; border-radius: 6px;
  border: 1px solid var(--border); background: none; color: var(--text-dim);
  font-family: var(--ff); transition: .15s;
}
.bi-tab.active { border-color: var(--accent); color: var(--accent); }

.bi-file-label {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 16px; border: 1px dashed var(--border); border-radius: 8px;
  cursor: pointer; color: var(--text-dim); font-size: 12px; transition: .15s;
}
.bi-file-label:hover { border-color: var(--accent); color: var(--accent); }
.bi-file-label ion-icon { font-size: 18px; }

.bi-preview {
  width: 100%; max-height: 160px; object-fit: cover;
  border-radius: 8px; display: block; margin-top: 4px;
}
.bi-empty {
  display: flex; align-items: center; justify-content: center;
  height: 72px; background: var(--surface);
  border: 1px dashed var(--border); border-radius: 8px;
  color: var(--text-dim); font-size: 12px; margin-top: 4px;
}

/* Image + Text */
.pit-pos-row { display: flex; gap: 6px; }
.pos-btn {
  padding: 5px 13px; font-size: 12px; border-radius: 7px;
  border: 1px solid var(--border); background: none;
  color: var(--text-dim); font-family: var(--ff); transition: .15s;
}
.pos-btn.active { border-color: var(--accent); color: var(--accent); }

.pit-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pit-img-col, .pit-txt-col { display: flex; flex-direction: column; gap: 8px; }

/* Quote */
.quote-wrap { display: flex; gap: 10px; align-items: flex-start; }
.quote-icon { font-size: 32px; color: var(--accent); line-height: 1; padding-top: 4px; flex-shrink: 0; font-weight: 600; }

/* List */
.list-type-row { display: flex; gap: 6px; }
.list-type-btn {
  padding: 5px 13px; font-size: 12px; border-radius: 7px;
  border: 1px solid var(--border); background: none;
  color: var(--text-dim); font-family: var(--ff); transition: .15s;
}
.list-type-btn.active { border-color: var(--accent); color: var(--accent); }

.list-items-wrap { display: flex; flex-direction: column; gap: 5px; }
.list-item-row { display: flex; align-items: center; gap: 7px; }
.list-bullet { color: var(--accent); font-size: 14px; min-width: 20px; flex-shrink: 0; font-weight: 600; }
.list-item-row .blk-input { flex: 1; }

.list-item-del {
  width: 24px; height: 24px; border-radius: 5px;
  border: 1px solid var(--border); background: none;
  color: var(--text-dim); font-size: 11px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: .15s;
}
.list-item-del:hover:not(:disabled) { border-color: var(--danger); color: var(--danger); }
.list-item-del:disabled { opacity: .3; cursor: not-allowed; }

.add-list-item-btn {
  padding: 5px 12px; border-radius: 7px;
  border: 1px dashed var(--border); background: none;
  color: var(--text-dim); font-size: 12px;
  font-family: var(--ff); align-self: flex-start; transition: .15s;
}
.add-list-item-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Divider */
.divider-preview hr { border: none; height: 2px; background: var(--border); border-radius: 2px; }

/* Builder actions */
.block-builder-actions { display: flex; gap: 10px; margin-top: 14px; }

.preview-btn {
  flex: 1; padding: 10px; border-radius: 9px;
  border: 1px solid var(--accent); background: none; color: var(--accent);
  font-size: 13px; font-family: var(--ff);
  display: flex; align-items: center; justify-content: center; gap: 7px; transition: .2s;
}
.preview-btn:hover { background: hsla(45,100%,72%,.1); }

.clear-blocks-btn {
  padding: 10px 18px; border-radius: 9px;
  border: 1px solid var(--border); background: none;
  color: var(--text-dim); font-size: 13px; font-family: var(--ff); transition: .2s;
}
.clear-blocks-btn:hover { border-color: var(--danger); color: var(--danger); }

/* ═══════════════════════════════════════════════════════
   PREVIEW OVERLAY
═══════════════════════════════════════════════════════ */
.preview-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: hsla(0,0%,0%,.82);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}

.preview-modal {
  background: hsl(240,2%,14%);
  border-radius: 20px;
  width: 100%; max-width: 740px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 70px hsla(0,0%,0%,.6);
}
.preview-modal::-webkit-scrollbar { width: 5px; }
.preview-modal::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.preview-modal-header {
  position: sticky; top: 0; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px;
  background: hsl(240,2%,14%);
  border-bottom: 1px solid var(--border);
}
.preview-modal-header h3 {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 600; color: var(--white);
}
.preview-modal-header ion-icon { color: var(--accent); font-size: 17px; }

.preview-close-btn {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--border); background: none;
  color: var(--text); font-size: 16px;
  display: flex; align-items: center; justify-content: center; transition: .2s;
}
.preview-close-btn:hover { background: var(--accent); color: hsl(240,2%,12%); border-color: var(--accent); }

/* Preview body - mirrors blog-post.html styles */
.preview-body { }

.prev-cover {
  position: relative; width: 100%; height: 280px; overflow: hidden;
  border-radius: 20px 20px 0 0;
}
.prev-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prev-cover-fade {
  position: absolute; bottom: 0; left: 0; right: 0; height: 120px;
  background: linear-gradient(to bottom, transparent, hsl(240,2%,14%));
}

.prev-container { padding: 22px 28px 32px; }

.prev-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.prev-cat {
  padding: 4px 13px; background: hsla(45,100%,72%,.13); color: var(--accent);
  border-radius: 20px; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .07em;
}
.prev-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text-dim); }
.prev-meta time { font-size: 13px; color: var(--text-dim); }

.prev-title { font-size: 26px; font-weight: 600; color: var(--white); line-height: 1.3; margin-bottom: 12px; }
.prev-excerpt { font-size: 14px; color: var(--text-dim); line-height: 1.7; margin-bottom: 22px; }
.prev-rule { border: none; height: 1px; background: var(--border); margin-bottom: 26px; }

/* Preview block styles */
.prev-content { }
.prev-h   { color: var(--white); font-weight: 600; margin: 22px 0 10px; line-height: 1.3; }
h2.prev-h { font-size: 22px; }
h3.prev-h { font-size: 18px; }
h4.prev-h { font-size: 15px; }
.prev-p   { font-size: 14px; color: var(--text); line-height: 1.85; margin-bottom: 14px; }
.prev-fig { margin: 18px 0; }
.prev-fig img { width: 100%; border-radius: 10px; object-fit: cover; }
.prev-fig figcaption { text-align: center; font-size: 11px; color: var(--text-dim); margin-top: 7px; }
.prev-pit { display: grid; gap: 18px; align-items: center; margin: 18px 0; }
.prev-pit.pit-left  { grid-template-columns: 1fr 1fr; }
.prev-pit.pit-right { grid-template-columns: 1fr 1fr; direction: rtl; }
.prev-pit.pit-right > * { direction: ltr; }
.pit-i img { width: 100%; border-radius: 10px; object-fit: cover; max-height: 200px; }
.prev-quote { border-left: 3px solid var(--accent); padding: 8px 18px; margin: 16px 0; color: var(--text-dim); font-style: italic; font-size: 14px; }
.prev-list { padding-left: 22px; margin-bottom: 14px; }
.prev-list li { display: list-item; font-size: 14px; color: var(--text); line-height: 1.8; margin-bottom: 5px; }
.prev-hr { border: none; height: 1px; background: var(--border); margin: 24px 0; }
.prev-link-wrap { display: flex; justify-content: center; padding: 16px 0 4px; }
.prev-visit-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 26px; background: var(--accent); color: hsl(240,2%,12%);
  border-radius: 10px; font-size: 13px; font-weight: 600; text-decoration: none; transition: .2s;
}
.prev-visit-btn:hover { background: var(--accent-dk); }

/* ═══════════════════════════════════════════════════════
   TOAST
═══════════════════════════════════════════════════════ */
#toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); padding: 12px 22px; border-radius: 10px;
  font-size: 13px; box-shadow: 0 8px 28px hsla(0,0%,0%,.45);
  opacity: 0; transform: translateY(12px);
  transition: opacity .3s, transform .3s; pointer-events: none; z-index: 999;
}
#toast.show { opacity: 1; transform: translateY(0); }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════ */
@media (max-width: 720px) {
  .admin-sidebar { width: 220px; }
  .admin-main { padding: 20px 18px 36px; }
  .field-row { flex-direction: column; }
  .field-row .field-sm { flex: 1; }
  .pit-cols { grid-template-columns: 1fr; }
  .prev-pit.pit-left, .prev-pit.pit-right { grid-template-columns: 1fr; direction: ltr; }
}

@media (max-width: 520px) {
  body { overflow: auto; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; max-height: 220px; border-right: none; border-bottom: 1px solid var(--border); }
}

/* ═══════════════════════════════════════════════════════
   RESUME ADMIN
═══════════════════════════════════════════════════════ */

/* CV upload card */
.cv-upload-card { margin-bottom: 28px; border: 1px solid var(--jet); border-radius: 12px; padding: 20px; }
.cv-status-text { font-size: 13px; margin-bottom: 14px; }
.cv-file-input  { padding: 6px 10px; cursor: pointer; }

/* Section sidebar items */
.rs-section-item { gap: 8px; align-items: center; }

.rs-reorder { display: flex; flex-direction: column; gap: 1px; flex-shrink: 0; }
.rs-reorder .blk-ctrl-btn { width: 20px; height: 18px; font-size: 10px; padding: 0; }

/* Toggle switch */
.rs-toggle-wrap { flex-shrink: 0; display: flex; align-items: center; cursor: pointer; }
.rs-toggle-input { display: none; }
.rs-toggle-track {
  width: 36px; height: 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  position: relative;
  transition: background .2s, border-color .2s;
}
.rs-toggle-track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--text-dim);
  transition: transform .2s, background .2s;
}
.rs-toggle-input:checked + .rs-toggle-track { background: hsla(45,100%,72%,.2); border-color: var(--accent); }
.rs-toggle-input:checked + .rs-toggle-track::after { transform: translateX(16px); background: var(--accent); }

/* Resume items list */
.resume-item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.ric-info { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.ric-title { font-size: 13px; font-weight: 500; color: var(--text); }
.ric-sub   { font-size: 12px; color: var(--text-dim); }
.ric-date  { font-size: 11px; color: var(--accent); }

.ric-actions { display: flex; gap: 4px; flex-shrink: 0; }

/* "Currently ongoing" checkbox label */
.ri-check-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-dim); cursor: pointer;
}
.ri-check-label input[type="checkbox"] { width: 14px; height: 14px; accent-color: var(--accent); cursor: pointer; }
