/* Zahra Academy Portal — the three desks, the office console and the public forms.
   Colours follow the academy's green and gold. */

.zp-portal,
.zp-admin {
	--zp-green: #0f5132;
	--zp-green-2: #157347;
	--zp-gold: #c8a04a;
	--zp-gold-soft: #f6efdc;
	--zp-ink: #14251d;
	--zp-muted: #5d6b64;
	--zp-line: #dfe6e1;
	--zp-bg: #f7faf8;
	--zp-radius: 14px;
	color: var(--zp-ink);
	line-height: 1.6;
}

.zp-portal {
	max-width: 1080px;
	margin: 0 auto;
	padding: 8px 0 48px;
	font-size: 16px;
}

.zp-portal[dir="rtl"] { text-align: right; }

/* ---------------------------------------------------------------- headings */

.zp-h2, .zp-h3, .zp-h4, .zp-h5 { color: var(--zp-green); font-weight: 700; line-height: 1.25; margin: 1.6em 0 .5em; }
.zp-h2 { font-size: 1.6rem; }
.zp-h3 { font-size: 1.25rem; }
.zp-h4 { font-size: 1.08rem; }
.zp-h5 { font-size: 1rem; }
.zp-lede { color: var(--zp-muted); max-width: 68ch; margin: 0 0 1.2em; }
.zp-meta { color: var(--zp-muted); font-size: .875rem; margin: .2em 0; }
.zp-empty { background: var(--zp-bg); border: 1px dashed var(--zp-line); border-radius: var(--zp-radius); color: var(--zp-muted); padding: 1.1em 1.2em; }

/* ------------------------------------------------------------------ header */

.zp-head {
	align-items: center;
	background: linear-gradient(135deg, var(--zp-green), var(--zp-green-2));
	border-radius: var(--zp-radius);
	color: #fff;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	justify-content: space-between;
	padding: 1.2rem 1.4rem;
}
.zp-head h2 { color: #fff; font-size: 1.35rem; margin: 0; }
.zp-head .zp-meta { color: rgba(255,255,255,.82); margin: 0; }
.zp-head__who { align-items: center; display: flex; gap: .9rem; }
.zp-head__actions { align-items: center; display: flex; flex-wrap: wrap; gap: .6rem; }
.zp-avatar {
	align-items: center;
	background: var(--zp-gold);
	border-radius: 50%;
	color: #241c05;
	display: inline-flex;
	font-weight: 700;
	height: 2.75rem;
	justify-content: center;
	letter-spacing: .03em;
	width: 2.75rem;
}

/* -------------------------------------------------------------------- tabs */

.zp-tabs {
	border-bottom: 1px solid var(--zp-line);
	display: flex;
	gap: .25rem;
	margin: 1.4rem 0 1.6rem;
	overflow-x: auto;
	padding-bottom: 2px;
	scrollbar-width: thin;
}
.zp-tab {
	align-items: center;
	border-radius: 10px 10px 0 0;
	color: var(--zp-muted);
	display: inline-flex;
	font-size: .94rem;
	font-weight: 600;
	gap: .4rem;
	padding: .6rem .85rem;
	text-decoration: none;
	white-space: nowrap;
}
.zp-tab:hover { background: var(--zp-bg); color: var(--zp-green); }
.zp-tab.is-active { background: var(--zp-gold-soft); color: var(--zp-green); box-shadow: inset 0 -3px 0 var(--zp-gold); }
.zp-badge { background: var(--zp-green); border-radius: 999px; color: #fff; font-size: .72rem; font-weight: 700; min-width: 1.35rem; padding: .1rem .4rem; text-align: center; }
.zp-count { background: var(--zp-gold-soft); border-radius: 999px; color: var(--zp-green); font-size: .8rem; padding: .1rem .55rem; }

/* ------------------------------------------------------------------- cards */

.zp-cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.zp-card {
	background: #fff;
	border: 1px solid var(--zp-line);
	border-radius: var(--zp-radius);
	display: flex;
	flex-direction: column;
	gap: .6rem;
	padding: 1.1rem 1.2rem;
}
.zp-card > header { align-items: flex-start; display: flex; gap: .7rem; justify-content: space-between; }
.zp-card h4 { color: var(--zp-green); font-size: 1.05rem; margin: 0; }
.zp-card .zp-body { font-size: .95rem; }
.zp-card .zp-body p { margin: .4em 0; }
.zp-card.is-done { border-left: 4px solid var(--zp-green-2); }
.zp-card.is-sent { border-left: 4px solid var(--zp-gold); }
.zp-card.is-open { border-left: 4px solid var(--zp-line); }
.zp-card.is-revoked { opacity: .68; }
.zp-chip { background: var(--zp-gold-soft); border-radius: 999px; color: #6b5316; flex: none; font-size: .75rem; font-weight: 700; letter-spacing: .02em; padding: .22rem .6rem; text-transform: uppercase; }
.zp-mark { color: var(--zp-green); font-size: 1.05rem; }
.zp-mark strong { font-size: 1.5rem; }
.zp-feedback, .zp-reply { background: var(--zp-bg); border-left: 3px solid var(--zp-gold); border-radius: 8px; padding: .7em .9em; }
.zp-feedback p, .zp-reply p { margin: .3em 0; }
.zp-reply { border-left-color: var(--zp-green-2); }
.zp-scoreline { margin: .2em 0; }
.zp-banner { background: var(--zp-gold-soft); border: 1px solid var(--zp-gold); border-radius: var(--zp-radius); margin-bottom: 1.2rem; padding: 1rem 1.2rem; }
.zp-banner strong { color: var(--zp-green); display: block; margin-bottom: .3em; }
.zp-banner p { margin: .4em 0; }

/* ------------------------------------------------------------------- stats */

.zp-stats { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 1.2rem 0 1.6rem; }
.zp-stats--tight { margin: .6rem 0 1rem; }
.zp-stat { background: #fff; border: 1px solid var(--zp-line); border-radius: 12px; display: flex; flex-direction: column; gap: .15rem; padding: .85rem 1rem; }
.zp-stat__value { color: var(--zp-green); font-size: 1.4rem; font-weight: 700; line-height: 1.15; }
.zp-stat__label { color: var(--zp-muted); font-size: .82rem; }
.zp-stat--warn { background: #fdf3f2; border-color: #e6b8b3; }
.zp-stat--warn .zp-stat__value { color: #a5342a; }

/* ------------------------------------------------------------------ tables */

.zp-scroll { overflow-x: auto; }
.zp-table { border-collapse: collapse; font-size: .93rem; margin: .6rem 0 1.2rem; width: 100%; }
.zp-table th, .zp-table td { border-bottom: 1px solid var(--zp-line); padding: .6rem .7rem; text-align: left; vertical-align: top; }
.zp-table thead th { background: var(--zp-bg); color: var(--zp-green); font-size: .82rem; letter-spacing: .02em; text-transform: uppercase; }
.zp-table tbody tr:hover { background: #fbfdfb; }
.zp-register th, .zp-register td { text-align: center; }
.zp-register th:first-child, .zp-register td:first-child { text-align: left; }

/* ------------------------------------------------------------------- forms */

.zp-form { margin: 0 0 1.4rem; }
.zp-form label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: .9rem; }
.zp-form input[type="text"], .zp-form input[type="email"], .zp-form input[type="tel"],
.zp-form input[type="url"], .zp-form input[type="number"], .zp-form input[type="date"],
.zp-form input[type="time"], .zp-form input[type="datetime-local"], .zp-form select,
.zp-form textarea {
	background: #fff;
	border: 1px solid var(--zp-line);
	border-radius: 10px;
	display: block;
	font: inherit;
	font-weight: 400;
	margin-top: .3rem;
	max-width: 100%;
	padding: .55rem .7rem;
	width: 100%;
}
.zp-form input:focus, .zp-form select:focus, .zp-form textarea:focus { border-color: var(--zp-green-2); box-shadow: 0 0 0 3px rgba(21,115,71,.13); outline: none; }
.zp-form textarea { resize: vertical; }
.zp-form .zp-check { align-items: flex-start; display: flex; font-weight: 400; gap: .5rem; }
.zp-form .zp-check input { margin-top: .3rem; width: auto; }
.zp-grid { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.zp-grid .zp-span2 { grid-column: 1 / -1; }
.zp-form--inline { align-items: flex-end; display: flex; flex-wrap: wrap; gap: .7rem; }
.zp-form--inline label { flex: 1 1 220px; margin-bottom: 0; }
.zp-form--inline .zp-grow { flex: 2 1 280px; }
.zp-inline-form { display: inline; }
.zp-hp { left: -9999px; position: absolute; }
.zp-visually-hidden { clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }

.zp-btn {
	background: var(--zp-green);
	border: 1px solid var(--zp-green);
	border-radius: 10px;
	color: #fff;
	cursor: pointer;
	display: inline-block;
	font: inherit;
	font-weight: 600;
	line-height: 1.3;
	padding: .55rem 1rem;
	text-decoration: none;
}
.zp-btn:hover { background: var(--zp-green-2); color: #fff; }
.zp-btn--quiet { background: #fff; border-color: var(--zp-line); color: var(--zp-green); }
.zp-btn--quiet:hover { background: var(--zp-gold-soft); color: var(--zp-green); }
.zp-btn--small { font-size: .85rem; padding: .35rem .7rem; }
.zp-link { background: none; border: 0; color: var(--zp-green-2); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }
.zp-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: .8rem 0; }

/* ------------------------------------------------------------------ notices */

.zp-note { border-radius: 10px; margin: 0 0 1rem; padding: .8rem 1rem; }
.zp-note--ok { background: #eaf6ee; border: 1px solid #b6dfc3; color: #14532d; }
.zp-note--error { background: #fdeceb; border: 1px solid #f0c2bd; color: #8f2b21; }
.zp-note--info { background: var(--zp-bg); border: 1px solid var(--zp-line); color: var(--zp-muted); }
.zp-notices { display: flex; flex-direction: column; gap: .6rem; list-style: none; margin: 0; padding: 0; }
.zp-notice { background: #fff; border: 1px solid var(--zp-line); border-radius: 12px; padding: .85rem 1rem; }
.zp-notice.is-new { background: #fbfaf4; border-left: 4px solid var(--zp-gold); }
.zp-notice__head { align-items: baseline; display: flex; flex-wrap: wrap; gap: .6rem; justify-content: space-between; }
.zp-notice p { margin: .35em 0; }

/* --------------------------------------------------------------- progress */

.zp-bar { background: var(--zp-line); border-radius: 999px; display: inline-block; height: 9px; overflow: hidden; vertical-align: middle; width: 130px; }
.zp-bar__fill { background: linear-gradient(90deg, var(--zp-green-2), var(--zp-gold)); display: block; height: 100%; }
.zp-bar__text { color: var(--zp-muted); font-size: .85rem; margin-left: .5rem; vertical-align: middle; }
.zp-progressline { margin: .3rem 0; }
.zp-list { list-style: none; margin: .4rem 0 1rem; padding: 0; }
.zp-list li { align-items: center; border-bottom: 1px solid var(--zp-line); display: flex; flex-wrap: wrap; gap: .6rem; justify-content: space-between; padding: .5rem 0; }
.zp-list__right { color: var(--zp-muted); font-size: .88rem; }
.zp-dl { display: grid; gap: .3rem .8rem; grid-template-columns: max-content 1fr; margin: .8rem 0; }
.zp-dl dt { color: var(--zp-muted); font-size: .85rem; }
.zp-dl dd { margin: 0; font-weight: 600; }
.zp-due.is-late { color: #a5342a; font-weight: 600; }

/* --------------------------------------------------------------- quizzes */

.zp-quiz .zp-question { border: 1px solid var(--zp-line); border-radius: 12px; margin: 0 0 1rem; padding: .9rem 1.1rem; }
.zp-question legend { color: var(--zp-green); font-weight: 600; padding: 0 .3rem; }
.zp-qnum { background: var(--zp-gold-soft); border-radius: 999px; color: var(--zp-green); display: inline-block; font-size: .8rem; margin-right: .4rem; min-width: 1.5rem; text-align: center; }
.zp-choice { align-items: flex-start; display: flex; font-weight: 400; gap: .55rem; margin: .4rem 0; }
.zp-choice input { margin-top: .3rem; }
.zp-example { background: var(--zp-bg); border: 1px solid var(--zp-line); border-radius: 10px; font-size: .85rem; overflow-x: auto; padding: .8rem 1rem; white-space: pre; }

/* ------------------------------------------------------------- certificate */

.zp-certificate { background: #fff; border: 1px solid var(--zp-line); margin: 1rem auto; max-width: 820px; padding: 14px; }
.zp-certificate__border { border: 3px double var(--zp-gold); padding: 2.4rem 2rem; text-align: center; }
.zp-certificate__academy { color: var(--zp-green); font-size: 1.1rem; font-weight: 700; letter-spacing: .06em; margin: 0; text-transform: uppercase; }
.zp-certificate__place { color: var(--zp-muted); font-size: .82rem; margin: .2rem 0 1.6rem; }
.zp-certificate__title { color: var(--zp-green); font-size: 2rem; margin: 0 0 1.4rem; }
.zp-certificate__lead { color: var(--zp-muted); font-size: .9rem; margin: .3rem 0; }
.zp-certificate__name { color: var(--zp-ink); font-size: 1.9rem; font-weight: 700; margin: .3rem 0 1rem; }
.zp-certificate__course { color: var(--zp-green-2); font-size: 1.35rem; font-weight: 600; margin: .3rem 0 1rem; }
.zp-certificate__date { color: var(--zp-muted); font-size: .9rem; }
.zp-certificate__foot { align-items: flex-end; display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; margin-top: 2.4rem; text-align: left; }
.zp-certificate__line { border-top: 1px solid var(--zp-ink); display: block; width: 190px; }
.zp-certificate__role { color: var(--zp-muted); font-size: .85rem; }
.zp-certificate__code { text-align: right; }
.zp-certificate__code span { color: var(--zp-muted); display: block; font-size: .75rem; text-transform: uppercase; }
.zp-certificate__verify { color: var(--zp-muted); font-size: .78rem; margin-top: 1.6rem; }
.zp-verified { background: #eaf6ee; border: 1px solid #b6dfc3; border-radius: var(--zp-radius); padding: 1.2rem 1.4rem; }
.zp-verified__tick { background: var(--zp-green); border-radius: 50%; color: #fff; display: inline-flex; font-size: 1.1rem; height: 2rem; align-items: center; justify-content: center; margin: 0 0 .4rem; width: 2rem; }
.zp-seal { align-items: center; background: var(--zp-gold-soft); border: 2px solid var(--zp-gold); border-radius: 50%; color: var(--zp-green); display: inline-flex; font-weight: 700; height: 2.6rem; justify-content: center; width: 2.6rem; }

/* --------------------------------------------------------------- invoices */

.zp-invoice { background: #fff; border: 1px solid var(--zp-line); border-radius: var(--zp-radius); margin: 1rem auto; max-width: 780px; padding: 1.6rem 1.8rem; }
.zp-invoice__head { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }
.zp-invoice__head h2 { color: var(--zp-green); margin: 0 0 .4rem; }
.zp-invoice__meta p { display: flex; gap: .8rem; justify-content: space-between; margin: .2rem 0; }
.zp-invoice__meta span { color: var(--zp-muted); font-size: .85rem; }
.zp-invoice__to { border-top: 1px solid var(--zp-line); margin-top: 1rem; padding-top: .8rem; }
.zp-invoice__to span { color: var(--zp-muted); display: block; font-size: .8rem; text-transform: uppercase; }
.zp-invoice__lines tfoot th { border-top: 2px solid var(--zp-line); }
.zp-status--paid { color: var(--zp-green-2); }
.zp-status--pending { color: #a5722a; }

/* ------------------------------------------------------------- newsletter */

.zp-newsletter .zp-form--inline { display: flex; flex-wrap: wrap; gap: .6rem; }
.zp-newsletter input[type="email"] { flex: 1 1 220px; margin: 0; }

/* --------------------------------------------------------------- language */

.zp-lang { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35); border-radius: 999px; display: inline-flex; overflow: hidden; }
.zp-lang__option { color: inherit; font-size: .82rem; font-weight: 600; padding: .3rem .8rem; text-decoration: none; }
.zp-lang__option.is-active { background: var(--zp-gold); color: #241c05; }
.zp-lang-float { bottom: 18px; left: 18px; position: fixed; z-index: 9998; }
.zp-lang--float { background: #fff; border: 1px solid var(--zp-line); box-shadow: 0 6px 20px rgba(0,0,0,.13); color: var(--zp-green); }
.zp-lang--float .zp-lang__option { padding: .38rem .85rem; }

/* --------------------------------------------------------------- printing */

@media print {
	header, footer, nav, .zp-head, .zp-tabs, .zp-noprint, .zp-lang-float, .zp-btn { display: none !important; }
	.zp-certificate, .zp-invoice { border: 0; margin: 0; max-width: none; padding: 0; }
	.zp-certificate__border { border-color: #9a7b2c; }
	body { background: #fff !important; }
}

/* ----------------------------------------------------------------- mobile */

@media (max-width: 640px) {
	.zp-portal { padding: 0 0 32px; }
	.zp-head { padding: 1rem; }
	.zp-head h2 { font-size: 1.15rem; }
	.zp-cards { grid-template-columns: 1fr; }
	.zp-certificate__border { padding: 1.4rem 1rem; }
	.zp-certificate__title { font-size: 1.4rem; }
	.zp-certificate__name { font-size: 1.3rem; }
	.zp-table thead { display: none; }
	.zp-table, .zp-table tbody, .zp-table tr, .zp-table td { display: block; width: 100%; }
	.zp-table tr { border-bottom: 1px solid var(--zp-line); margin-bottom: .5rem; padding-bottom: .4rem; }
	.zp-table td { border: 0; display: flex; gap: .8rem; justify-content: space-between; padding: .3rem 0; }
	.zp-table td::before { color: var(--zp-muted); content: attr(data-label); font-size: .78rem; font-weight: 600; text-transform: uppercase; }
	.zp-register td { justify-content: flex-start; }
	.zp-form--inline { display: block; }
	.zp-form--inline label { margin-bottom: .8rem; }
	.zp-lang-float { bottom: 12px; left: 12px; }
}

/* --------------------------------------------------------- office console */

.zp-admin__actions { float: right; font-size: .9rem; }
.zp-admin__cards { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin: 1rem 0 1.6rem; }
.zp-admin__card { background: #fff; border: 1px solid #dcdcde; border-left: 4px solid #157347; border-radius: 10px; display: flex; flex-direction: column; gap: .2rem; padding: .9rem 1rem; text-decoration: none; }
.zp-admin__card:hover { background: #f6f7f7; }
.zp-admin__card.is-money { border-left-color: #c8a04a; }
.zp-admin__card.is-warn { border-left-color: #a5342a; }
.zp-admin__num { color: #0f5132; font-size: 1.5rem; font-weight: 700; }
.zp-admin__label { color: #50575e; font-size: .84rem; }
.zp-admin__split { display: grid; gap: 1.6rem; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
@media (max-width: 900px) { .zp-admin__split { grid-template-columns: 1fr; } }
.zp-admin .zp-form { background: #fff; border: 1px solid #dcdcde; border-radius: 10px; padding: 1rem 1.2rem 1.2rem; max-width: 760px; }
.zp-admin .zp-table { background: #fff; }
.zp-admin .zp-card { border-color: #dcdcde; }
.zp-admin .zp-lede { color: #50575e; }
