/* ================= My CVs ================= */
.topbar.compact .inner { height: 72px; }
.topbar.compact .logo-word { font-size: 32px; }
.topbar.compact .logo-mark { width: 30px; height: 32px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.btn.sm { width: auto; height: 38px; font-size: 14px; padding: 0 14px; }
.btn svg { width: 18px; height: 18px; }
.btn-light { background: var(--white); color: var(--primary-text); border-color: #e3e5e8; font-weight: 600; }

.mc-main { max-width: 1280px; margin: 0 auto; padding: 40px 24px 80px; }
.mc-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.mc-head h1 { font-size: 32px; font-weight: 700; }
.mc-head p { color: var(--tertiary-text); font-size: 16px; margin-top: 6px; }
.mc-new-btn { width: auto; }

.mc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.mc-card { background: var(--white); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; border: 1px solid #eceef1; transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s, opacity .22s; animation: stepIn .4s cubic-bezier(.2,.7,.2,1) both; }
.mc-card:hover { transform: translateY(-4px); box-shadow: 0 22px 46px -22px rgba(253,97,27,.55); }
.mc-card.is-leaving { opacity: 0; transform: scale(.96); }
.mc-grid .mc-card:nth-child(2) { animation-delay: .04s; } .mc-grid .mc-card:nth-child(3) { animation-delay: .08s; } .mc-grid .mc-card:nth-child(4) { animation-delay: .12s; }

.mc-thumb { position: relative; display: block; aspect-ratio: 794 / 820; overflow: hidden; background: #f4f6f8; border-bottom: 1px solid #eceef1; }
.mc-thumb iframe { position: absolute; top: 0; left: 0; width: 794px; height: 1123px; border: 0; transform-origin: top left; pointer-events: none; background: #fff; }
[dir="rtl"] .mc-thumb iframe { left: auto; right: 0; transform-origin: top right; }
.mc-thumb-hover { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; background: rgba(13,12,11,.55); color: #fff; font-weight: 700; opacity: 0; transition: opacity .25s; }
.mc-thumb-hover svg { width: 20px; height: 20px; }
.mc-card:hover .mc-thumb-hover { opacity: 1; }

.mc-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.mc-title { font-size: 16px; font-weight: 700; line-height: 1.4; }
.mc-title a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mc-title a:hover { color: var(--orange); }
.mc-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted-text); }
.mc-tpl { background: rgba(253,97,27,.1); color: #c24d12; font-weight: 600; font-size: 12px; padding: 2px 9px; border-radius: 20px; }
.mc-actions { display: flex; align-items: center; gap: 4px; margin-top: auto; padding-top: 10px; }
.mc-actions .btn { margin-inline-end: auto; }
.mc-icon { width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: var(--tertiary-text); display: grid; place-items: center; cursor: pointer; transition: background .2s, color .2s; }
.mc-icon svg { width: 18px; height: 18px; }
.mc-icon:hover, .mc-icon:focus-visible { background: #f1f2f4; color: var(--primary-text); outline: none; }
.mc-icon.danger:hover { background: rgba(229,72,77,.1); color: #e5484d; }

.mc-rename { display: flex; flex-direction: column; gap: 8px; }
.mc-rename .input { height: 40px; font-size: 15px; }
.mc-rename-btns { display: flex; gap: 6px; }

/* "Create new" card */
.mc-add { align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 28px; min-height: 320px; border: 2px dashed rgba(253,97,27,.45); background: rgba(253,97,27,.03); color: var(--primary-text); }
.mc-add:hover { border-color: var(--orange); background: rgba(253,97,27,.07); }
.mc-add-ico { width: 60px; height: 60px; border-radius: 18px; background: var(--orange); color: #fff; display: grid; place-items: center; box-shadow: 0 12px 26px -10px rgba(253,97,27,.9); margin-bottom: 8px; transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.mc-add:hover .mc-add-ico { transform: scale(1.08) rotate(90deg); }
.mc-add-ico svg { width: 28px; height: 28px; }
.mc-add b { font-size: 17px; }
.mc-add small { font-size: 14px; color: var(--muted-text); }

/* Empty state */
.mc-empty { grid-column: 1 / -1; background: var(--white); border-radius: 20px; padding: 56px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.mc-empty-ico { width: 84px; height: 84px; border-radius: 24px; background: rgba(253,97,27,.1); color: var(--orange); display: grid; place-items: center; margin-bottom: 8px; }
.mc-empty-ico svg { width: 42px; height: 42px; }
.mc-empty h2 { font-size: 22px; }
.mc-empty p { color: var(--tertiary-text); max-width: 420px; line-height: 1.6; margin-bottom: 10px; }
.mc-empty .btn { width: auto; }

/* Toast */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); background: var(--primary-text); color: var(--white); padding: 12px 18px; border-radius: 12px; font-size: 14px; box-shadow: 0 16px 40px -12px rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; z-index: 200; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-act { margin-inline-start: 12px; background: none; border: 0; color: #fd8a55; font-weight: 700; cursor: pointer; }

@media (max-width: 600px) {
  .mc-main { padding: 24px 16px 64px; }
  .mc-head h1 { font-size: 26px; }
  .mc-new-btn { width: 100%; }
  .mc-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .mc-add { min-height: 220px; padding: 16px; }
  .mc-add small { display: none; }
  .mc-body { padding: 12px; }
  .mc-actions .btn span { display: none; }
  .mc-actions { flex-wrap: wrap; }
  .topbar.compact .inner { padding: 0 16px; }
}

/* Account section + delete confirmation */
.mc-account { margin-top: 56px; padding-top: 24px; border-top: 1px solid #e6e8eb; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.mc-account h2 { font-size: 17px; font-weight: 700; }
.mc-account p { font-size: 14px; color: var(--muted-text); margin-top: 4px; }
.mc-account a { color: var(--primary-text); text-decoration: underline; text-underline-offset: 3px; }
.mc-account a:hover { color: var(--orange); }
.mc-danger-btn { width: auto; background: transparent; border-color: #f1c2c4; color: #c9353b; font-weight: 600; }
.mc-danger-btn:hover { background: rgba(229,72,77,.06); border-color: #e5484d; }
.mc-modal { position: fixed; inset: 0; z-index: 300; background: rgba(13,12,11,.6); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; }
.mc-modal[hidden] { display: none; }
.mc-modal-card { width: 100%; max-width: 440px; background: var(--white); border-radius: 20px; padding: 26px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); animation: stepIn .3s cubic-bezier(.2,.7,.2,1) both; }
.mc-modal-ico { width: 52px; height: 52px; border-radius: 14px; background: rgba(229,72,77,.1); color: #e5484d; display: grid; place-items: center; }
.mc-modal-ico svg { width: 26px; height: 26px; }
.mc-modal-card h2 { font-size: 21px; font-weight: 700; }
.mc-modal-card p { color: var(--tertiary-text); font-size: 15px; line-height: 1.6; }
.mc-confirm-label { font-size: 14px; color: var(--secondary-text); margin-top: 6px; }
.mc-confirm-label b { color: #c9353b; }
.mc-del-error { color: #e5484d; font-size: 14px; min-height: 0; }
.mc-modal-btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.mc-modal-btns .btn { width: auto; }
.mc-danger-solid { background: #e5484d; color: #fff; }
.mc-danger-solid:hover { background: #cf3a3f; }
.mc-danger-solid:disabled { opacity: .45; cursor: not-allowed; transform: none; }