/* UPMED CV Maker: the app screen, in the UPMED colours (same as UPMED LMS). */
:root {
	--brand: #00aeef;
	--brand-dark: #0077a8;
	--brand-deep: #005f87;
	--brand-soft: #e8f7fd;
	--surface: #f7fafc;
	--ink: #2b2727;
	--muted: #726868;
	--line: #e4eaee;
	--danger: #b3261e;
	--warn-soft: #fff6e0;
	--radius: 14px;
	--shadow: 0 1px 2px rgba(16, 40, 60, .05), 0 6px 20px rgba(16, 40, 60, .06);
	--sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--serif: Lora, Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.cv-body { margin: 0; min-height: 100vh; background: var(--surface); color: var(--ink); font: 16px/1.55 var(--sans); }
.cv-body a { color: var(--brand-dark); }
.cv-body h1, .cv-body h2 { font-family: var(--serif); line-height: 1.25; margin: 0 0 .4rem; font-weight: 600; }
.cv-body .cv-sheet h1, .cv-body .cv-sheet h2 { font-family: inherit; line-height: inherit; margin: 0; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cv-ic { flex: none; vertical-align: -4px; }
.cv-muted { color: var(--muted); }
.cv-small { font-size: .85rem; }
.cv-loading { text-align: center; padding: 4rem 1rem; color: var(--muted); }

/* Buttons */
.cv-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: 600 .95rem/1.2 var(--sans); padding: .65rem 1.15rem; border-radius: 999px; border: 1px solid var(--brand-dark); background: var(--brand-dark); color: #fff !important; text-decoration: none; cursor: pointer; white-space: nowrap; }
.cv-btn:hover { background: var(--brand-deep); border-color: var(--brand-deep); }
.cv-btn.is-ghost { background: #fff; color: var(--brand-dark) !important; border-color: var(--line); }
.cv-btn.is-ghost:hover { border-color: var(--brand-dark); background: var(--brand-soft); }
.cv-btn.is-small { padding: .45rem .85rem; font-size: .88rem; }
.cv-btn[disabled] { opacity: .5; cursor: not-allowed; }
.cv-btn.is-busy { opacity: .7; cursor: progress; }
.cv-btn:focus-visible, .cv-ibtn:focus-visible, .cv-acc-btn:focus-visible, .cv-tpl:focus-visible, .cv-card-open:focus-visible { outline: 3px solid rgba(0, 174, 239, .45); outline-offset: 2px; }
.cv-ibtn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; }
.cv-ibtn:hover { background: var(--brand-soft); color: var(--brand-dark); }
.cv-ibtn.is-danger:hover { background: #fdecea; color: var(--danger); }
.cv-ibtn[disabled] { opacity: .3; pointer-events: none; }
.cv-lock { display: inline-flex; align-items: center; gap: .2rem; color: #a26a00; font-size: .8rem; font-weight: 600; }
.cv-lock .cv-ic { width: 15px; height: 15px; }
.cv-btn .cv-lock { color: inherit; }

/* Messages and notes */
.cv-note { background: var(--warn-soft); border: 1px solid #f3dfa9; border-radius: 12px; padding: .7rem 1rem; font-size: .92rem; margin: .8rem 0; }
.cv-hint { color: var(--muted); font-size: .88rem; margin: 0 0 .8rem; }
.cv-msg { max-width: 560px; margin: 4rem auto; padding: 2rem 1.5rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-align: center; box-shadow: var(--shadow); }
.cv-toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 90; background: #1f2a33; color: #fff; padding: .7rem 1.1rem; border-radius: 12px; font-size: .92rem; box-shadow: var(--shadow); max-width: calc(100vw - 32px); transition: opacity .4s; }
.cv-toast.is-out { opacity: 0; }
.cv-modal { position: fixed; inset: 0; z-index: 95; background: rgba(15, 30, 40, .45); display: grid; place-items: center; padding: 16px; }
.cv-modal-box { background: #fff; border-radius: 18px; padding: 1.8rem 1.5rem 1.4rem; max-width: 460px; width: 100%; text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.cv-modal-box h2 { font-size: 1.25rem; }
.cv-modal-box p { color: var(--muted); }
.cv-modal-ic, .cv-promo-ic { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); }
.cv-modal-act { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin-top: 1.2rem; }

/* Landing */
.cv-landing { max-width: 1080px; margin: 0 auto; padding: 3rem 20px 4rem; }
.cv-hero { text-align: center; max-width: 720px; margin: 0 auto 2.5rem; }
.cv-kicker { color: var(--brand-dark); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .82rem; margin: 0 0 .5rem; }
.cv-hero h1 { font-size: clamp(1.8rem, 1.2rem + 2.2vw, 2.7rem); }
.cv-note-strong { display: inline-block; margin: 0 0 .6rem; padding: .45rem 1rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand-deep); font-weight: 700; }
.cv-lead { font-size: 1.12rem; color: var(--muted); }
.cv-hero-actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin: 1.5rem 0 1rem; }
.cv-feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.cv-feat { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: var(--radius); padding: 1.2rem 1.3rem; }
.cv-feat h2 { font-size: 1.08rem; }
.cv-feat p { margin: 0; color: var(--muted); font-size: .95rem; }

/* My CVs */
.cv-wrap { max-width: 1080px; margin: 0 auto; padding: 2rem 20px 4rem; }
.cv-list-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.cv-list-head p { margin: 0; }
.cv-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.cv-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.cv-card-open { display: flex; flex-direction: column; gap: .15rem; text-align: left; padding: 1rem; background: none; border: 0; font: inherit; color: inherit; cursor: pointer; flex: 1; }
.cv-card-open strong { margin-top: .6rem; font-size: 1.02rem; }
.cv-card-act { display: flex; justify-content: flex-end; gap: 2px; padding: .3rem .5rem; border-top: 1px solid var(--line); }
.cv-card-thumb { position: relative; display: block; height: 120px; border-radius: 8px; background: #fff; border: 1px solid var(--line); overflow: hidden; }
.cv-card-thumb span { position: absolute; left: 14%; right: 14%; height: 6px; border-radius: 3px; background: #dfe6ea; }
.cv-card-thumb span:nth-child(1) { top: 16%; height: 10px; right: 40%; background: #1f2a33; }
.cv-card-thumb span:nth-child(2) { top: 38%; }
.cv-card-thumb span:nth-child(3) { top: 56%; right: 26%; }
.cv-card-thumb span:nth-child(4) { top: 74%; right: 34%; }
.cv-thumb-modern::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 30%; background: #0f4c6e; }
.cv-thumb-modern span { left: 38%; }
.cv-thumb-modern span:nth-child(1) { background: #0077a8; }
.cv-thumb-nhs span:nth-child(1) { background: #005eb8; }
.cv-thumb-nhs::before { content: ""; position: absolute; left: 14%; right: 14%; top: 30%; height: 2px; background: #005eb8; }
.cv-thumb-gulf::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 32%; background: var(--brand-soft); border-bottom: 2px solid #0077a8; }
.cv-thumb-gulf::after { content: ""; position: absolute; right: 12%; top: 8%; width: 18%; height: 22%; border-radius: 3px; background: #c9d6dd; }
.cv-thumb-gulf span:nth-child(1) { background: #0077a8; }
.cv-thumb-classic::after { content: ""; position: absolute; left: 14%; right: 14%; top: 30%; border-top: 3px double #1f2a33; }
.cv-thumb-academic span { left: 22%; right: 22%; }
.cv-thumb-academic span:nth-child(1) { left: 30%; right: 30%; background: #7a1f2b; }
.cv-thumb-academic::after { content: ""; position: absolute; left: 40%; right: 40%; top: 32%; border-top: 2px solid #7a1f2b; }
.cv-thumb-timeline::before { content: ""; position: absolute; left: 34%; top: 34%; bottom: 8%; border-left: 2px solid #c9d6e2; }
.cv-thumb-timeline::after { content: ""; position: absolute; left: 10%; width: 18%; top: 38%; height: 5px; border-radius: 3px; background: #1f4e79; box-shadow: 0 18px 0 #1f4e79, 0 36px 0 #1f4e79; }
.cv-thumb-timeline span { left: 40%; }
.cv-thumb-timeline span:nth-child(1) { left: 10%; background: #1f4e79; }
.cv-thumb-banner::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 34%; background: #0f2d4a; }
.cv-thumb-banner::after { content: ""; position: absolute; right: 10%; top: 6%; width: 16%; aspect-ratio: 1; border-radius: 50%; background: #c9d6dd; border: 2px solid #fff; }
.cv-thumb-banner span:nth-child(1) { background: #fff; top: 13%; }
.cv-thumb-banner span:nth-child(n+2) { left: 18%; }
.cv-thumb-compact span { height: 4px; }
.cv-thumb-compact span:nth-child(1) { height: 7px; background: #0077a8; top: 12%; }
.cv-thumb-compact::after { content: ""; position: absolute; left: 14%; right: 14%; top: 28%; height: 4px; border-radius: 2px; background: #dfe6ea; box-shadow: 0 10px 0 #dfe6ea, 0 20px 0 #dfe6ea, 0 30px 0 #dfe6ea, 0 40px 0 #dfe6ea, 0 50px 0 #dfe6ea, 0 60px 0 #dfe6ea; }
.cv-thumb-international span { left: 20%; right: 20%; }
.cv-thumb-international span:nth-child(1) { left: 28%; right: 28%; }
.cv-thumb-international::after { content: ""; position: absolute; left: 14%; right: 14%; top: 30%; border-top: 2px solid #1f2a33; }
.cv-promo { display: flex; align-items: center; gap: 1rem; margin-top: 2rem; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); }
.cv-promo p { margin: .2rem 0 0; color: var(--muted); font-size: .92rem; }
.cv-promo > div { flex: 1; }
.cv-promo.is-col { flex-direction: column; text-align: center; margin-top: 0; }

/* Editor */
.cv-ed { max-width: 1440px; margin: 0 auto; padding: 0 16px 90px; }
.cv-bar { position: sticky; top: var(--site-h, 0px); z-index: 30; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .7rem 0; background: var(--surface); border-bottom: 1px solid var(--line); }
body:not(.has-site-bar) .cv-bar { top: 0; }
.cv-name-in { flex: 1 1 200px; min-width: 0; }
.cv-name-in input { width: 100%; font: 600 1.05rem/1.3 var(--serif); border: 1px solid transparent; border-radius: 10px; padding: .45rem .6rem; background: transparent; color: var(--ink); }
.cv-name-in input:hover { border-color: var(--line); background: #fff; }
.cv-name-in input:focus { border-color: var(--brand); background: #fff; outline: none; }
.cv-status { font-size: .85rem; color: var(--muted); white-space: nowrap; }
.cv-status.is-err { color: var(--danger); white-space: normal; }
.cv-bar-act { display: flex; gap: .4rem; }
.cv-ed-in { display: grid; grid-template-columns: minmax(380px, 520px) 1fr; gap: 24px; align-items: start; padding-top: 16px; }
.cv-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.cv-tabs { display: flex; border-bottom: 1px solid var(--line); padding: 0 .5rem; }
.cv-tabs button { flex: 1; font: 600 .93rem/1.2 var(--sans); padding: .9rem .4rem .8rem; background: none; border: 0; border-bottom: 3px solid transparent; color: var(--muted); cursor: pointer; }
.cv-tabs button[aria-selected="true"] { color: var(--brand-dark); border-bottom-color: var(--brand); }
.cv-panel-body { padding: 1rem; }

.cv-acc { border: 1px solid var(--line); border-radius: 12px; margin-bottom: .6rem; background: #fff; }
.cv-acc.is-open { border-color: #bfe6f6; box-shadow: 0 0 0 3px var(--brand-soft); }
.cv-acc.is-off .cv-acc-btn span:not(.cv-off-tag) { color: var(--muted); }
.cv-acc-head { display: flex; align-items: center; gap: .3rem; padding-right: .3rem; }
.cv-acc-btn { flex: 1; display: flex; align-items: center; gap: .55rem; padding: .75rem .8rem; background: none; border: 0; font: 600 .97rem/1.3 var(--sans); color: var(--ink); text-align: left; cursor: pointer; min-width: 0; }
.cv-acc-btn .cv-ic { color: var(--muted); transform: rotate(-90deg); transition: transform .15s; }
.cv-acc.is-open .cv-acc-btn .cv-ic { transform: none; color: var(--brand-dark); }
.cv-acc-tools { display: flex; }
.cv-badge { font-size: .75rem; font-weight: 700; color: var(--brand-dark); background: var(--brand-soft); border-radius: 999px; padding: .05rem .5rem; }
.cv-off-tag { font-size: .72rem; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 .45rem; }
.cv-acc-body { padding: .2rem .9rem 1rem; }

.cv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem .8rem; }
.cv-f { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.cv-f.is-wide { grid-column: 1 / -1; }
.cv-f.is-muted { opacity: .55; }
.cv-f label { font-size: .82rem; font-weight: 600; color: #4b4545; }
.cv-f input, .cv-f textarea, .cv-f select, .cv-import input { width: 100%; font: 15px/1.45 var(--sans); color: var(--ink); background: #fff; border: 1px solid #d5dde2; border-radius: 10px; padding: .55rem .7rem; }
.cv-f textarea { resize: vertical; min-height: 4.4em; }
.cv-f input:focus, .cv-f textarea:focus, .cv-f select:focus, .cv-import input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0, 174, 239, .18); }
.cv-f ::placeholder, .cv-import ::placeholder { color: #a8a1a1; }
.cv-check { display: flex; gap: .5rem; align-items: center; font-size: .92rem; margin: .2rem 0 .9rem; }
.cv-check input { width: 18px; height: 18px; accent-color: var(--brand-dark); }

.cv-ent-ed { border: 1px solid var(--line); border-radius: 12px; padding: .7rem .8rem .9rem; margin-bottom: .7rem; background: #fcfdfe; }
.cv-ent-ed-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.cv-ent-ed-head strong { font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cv-ent-ed-head span { display: flex; flex: none; }
.cv-add { width: 100%; border-style: dashed !important; }

.cv-photo-row { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.cv-photo-row img, .cv-photo-none { width: 72px; height: 90px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); flex: none; }
.cv-photo-none { display: grid; place-items: center; background: var(--surface); color: var(--muted); }
.cv-photo-row .cv-hint { margin: .4rem 0 0; }
.cv-file { position: relative; overflow: hidden; }
.cv-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.cv-import { background: var(--brand-soft); border-radius: 12px; padding: .7rem .8rem; margin-bottom: .9rem; }
.cv-import label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .35rem; }
.cv-import-row { display: flex; gap: .5rem; }
.cv-import input[disabled] { background: #f1f4f6; }

.cv-fontbox { border: 1px solid var(--line); border-radius: 12px; padding: .8rem .9rem .2rem; margin-bottom: 1rem; background: #fcfdfe; }
.cv-fontbox > strong { display: block; margin-bottom: .5rem; }
.cv-fontbox .cv-hint { margin: .5rem 0 .6rem; }
.cv-tpls { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-bottom: 1rem; }
.cv-tpl { display: flex; flex-direction: column; gap: .3rem; text-align: left; padding: .7rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; color: inherit; cursor: pointer; }
.cv-tpl:hover { border-color: #bfe6f6; }
.cv-tpl.is-on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.cv-tpl strong { display: flex; align-items: center; gap: .35rem; margin-top: .3rem; }
.cv-tpl .cv-card-thumb { height: 96px; }
.cv-on { color: var(--brand-dark); display: inline-flex; margin-left: auto; }
.cv-letter-act { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .8rem; }

/* Demo mode */
.cv-demo { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-top: 12px; padding: .7rem 1rem; border-radius: 12px; background: var(--warn-soft); border: 1px solid #f3dfa9; font-size: .92rem; }
.cv-demo > span:nth-child(2) { flex: 1 1 280px; }
.cv-demo-tag { flex: none; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: #a26a00; border-radius: 999px; padding: .2rem .6rem; }
.cv-demo-act { display: flex; gap: .4rem; }
.cv-preview-in .cv-wm { color: rgba(0, 119, 168, .09); font-size: 30pt; }

/* Preview */
.cv-preview { position: sticky; top: calc(var(--site-h, 0px) + 74px); min-width: 0; }
body:not(.has-site-bar) .cv-preview { top: 74px; }
.cv-preview-note { margin-bottom: .6rem; padding: .55rem .9rem; border-radius: 10px; background: var(--warn-soft); border: 1px solid #f3dfa9; font-size: .88rem; }
.cv-preview-note .cv-ic { width: 16px; height: 16px; color: #a26a00; }
.cv-preview-box { position: relative; overflow: hidden; margin: 0 auto; max-width: 100%; border-radius: 6px; box-shadow: 0 2px 18px rgba(16, 40, 60, .14); background: #fff; }
.cv-preview-in { transform-origin: 0 0; }
.cv-preview-in .cv-sheet { min-height: 297mm; }
.cv-switch { display: none; }

@media (max-width: 960px) {
	.cv-ed-in { grid-template-columns: 1fr; }
	.cv-ed[data-pane="edit"] .cv-preview { display: none; }
	.cv-ed[data-pane="preview"] .cv-panel { display: none; }
	.cv-preview { position: static; }
	.cv-switch { display: flex; position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 40; background: #1f2a33; border-radius: 999px; padding: 4px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
	.cv-switch button { display: inline-flex; align-items: center; gap: .35rem; font: 600 .92rem/1 var(--sans); color: #fff; background: none; border: 0; padding: .7rem 1.1rem; border-radius: 999px; cursor: pointer; }
	.cv-switch button[aria-pressed="true"] { background: #fff; color: #1f2a33; }
}
@media (max-width: 560px) {
	.cv-ed { padding: 0 10px 90px; }
	.cv-bar { gap: .4rem; }
	.cv-name-in { order: 3; flex-basis: 100%; }
	.cv-status { order: 4; flex-basis: 100%; }
	.cv-bar-act { margin-left: auto; }
	.cv-grid, .cv-tpls { grid-template-columns: 1fr; }
	.cv-panel-body { padding: .7rem; }
	.cv-acc-body { padding: .2rem .6rem .9rem; }
	.cv-promo { flex-direction: column; text-align: center; }
	.cv-import-row { flex-direction: column; }
}
