/* EAMC Portal – front end. Colours follow the existing EAMC blues. */
.eamc {
	--eamc-blue: #2569a9;
	--eamc-blue-dark: #114889;
	--eamc-sky: #73b1ce;
	--eamc-tint: #e7f0f8;
	--eamc-ink: #1c2b33;
	--eamc-slate: #50656e;
	--eamc-line: #d5dfe6;
	--eamc-ground: #f4f7fa;
	--eamc-paper: #fff;
	--eamc-red: #b8392f;
	--eamc-red-tint: #fbe9e7;
	--eamc-green: #23804a;
	--eamc-green-tint: #e2f2e8;
	--eamc-amber: #8a5a0b;
	--eamc-amber-tint: #f8eddb;
	--eamc-radius: 10px;
	color: var(--eamc-ink);
	font-size: 16px;
	line-height: 1.55;
}
.eamc *, .eamc *::before, .eamc *::after { box-sizing: border-box; }
.eamc [hidden] { display: none !important; }
.eamc h2, .eamc h3 { color: var(--eamc-ink); letter-spacing: -0.01em; margin: 0; }
.eamc p { margin: 0 0 0.75em; }
.eamc a { color: var(--eamc-blue); }
.eamc a:hover { color: var(--eamc-blue-dark); }
.eamc .screen-reader-text, .eamc-hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.eamc-small { font-size: 14px; color: var(--eamc-slate); }
.eamc-muted { color: var(--eamc-slate); }
.eamc-lede { font-size: 17px; color: var(--eamc-slate); max-width: 62ch; }
.eamc-nojs-only { }
.eamc-js .eamc-nojs-only { display: none; }

/* Buttons */
.eamc-btn, .eamc button.eamc-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	min-height: 42px; padding: 9px 18px; border-radius: 8px;
	border: 1px solid var(--eamc-line); background: var(--eamc-paper); color: var(--eamc-ink) !important;
	font: inherit; font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none !important; cursor: pointer;
	text-transform: none; letter-spacing: 0; box-shadow: none;
}
.eamc-btn:hover { border-color: var(--eamc-blue); color: var(--eamc-blue) !important; }
.eamc-btn--primary, .eamc button.eamc-btn--primary { background: var(--eamc-blue); border-color: var(--eamc-blue); color: #fff !important; }
.eamc-btn--primary:hover { background: var(--eamc-blue-dark); border-color: var(--eamc-blue-dark); color: #fff !important; }
.eamc-btn--small { min-height: 34px; padding: 6px 12px; font-size: 14px; }
.eamc-btn:focus-visible, .eamc a:focus-visible, .eamc input:focus-visible, .eamc textarea:focus-visible, .eamc summary:focus-visible, .eamc-chip:focus-visible {
	outline: 3px solid var(--eamc-sky); outline-offset: 2px;
}
.eamc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }

/* Cards, boxes, messages */
.eamc-card { background: var(--eamc-paper); border: 1px solid var(--eamc-line); border-radius: 12px; padding: 24px; margin: 0 0 20px; }
.eamc-box { border-left: 4px solid var(--eamc-blue); background: var(--eamc-tint); border-radius: 0 10px 10px 0; padding: 18px 20px; margin: 0 0 20px; }
.eamc-box h3 { font-size: 19px; margin-bottom: 6px; }
.eamc-box--warn { border-color: var(--eamc-amber); background: var(--eamc-amber-tint); }
.eamc-msg { border-radius: 8px; padding: 12px 16px; margin: 0 0 16px; font-weight: 600; }
.eamc-msg--error { background: var(--eamc-red-tint); color: var(--eamc-red); }
.eamc-msg--success { background: var(--eamc-green-tint); color: var(--eamc-green); }
.eamc-badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; padding: 4px 8px; border-radius: 5px; background: var(--eamc-tint); color: var(--eamc-blue-dark); vertical-align: middle; }
.eamc-badge--warn { background: var(--eamc-amber-tint); color: var(--eamc-amber); }
.eamc-badge--ok { background: var(--eamc-green-tint); color: var(--eamc-green); }
.eamc-badge--new { background: var(--eamc-red-tint); color: var(--eamc-red); }
.eamc-badge--brand { background: var(--eamc-blue); color: #fff; }
.eamc-empty { padding: 22px; border: 1px dashed var(--eamc-line); border-radius: 10px; text-align: center; color: var(--eamc-slate); }

/* Forms */
.eamc-form { display: grid; gap: 16px; max-width: 720px; }
.eamc-field { display: grid; gap: 6px; margin: 0; border: 0; padding: 0; min-width: 0; }
.eamc-field label, .eamc-field legend { font-weight: 600; font-size: 15px; padding: 0; }
.eamc-optional, .eamc-hint { font-weight: 400; color: var(--eamc-slate); font-size: 13px; }
.eamc input[type=text], .eamc input[type=email], .eamc input[type=tel], .eamc input[type=password], .eamc input[type=search], .eamc input[type=date], .eamc textarea, .eamc select {
	width: 100%; max-width: 100%; min-height: 44px; padding: 10px 12px; margin: 0;
	border: 1px solid #b9c7d1; border-radius: 8px; background: #fff; color: var(--eamc-ink);
	font: inherit; font-size: 16px; box-shadow: none;
}
.eamc textarea { min-height: 90px; resize: vertical; }
.eamc input:focus, .eamc textarea:focus { border-color: var(--eamc-blue); }
.eamc-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.eamc-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.eamc-row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.eamc-row--split { justify-content: space-between; }
.eamc-check { display: inline-flex; gap: 8px; align-items: center; font-weight: 400 !important; }
.eamc-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.eamc-choice { position: relative; display: block; cursor: pointer; }
.eamc-choice input { position: absolute; opacity: 0; }
.eamc-choice span { display: grid; gap: 2px; border: 1px solid var(--eamc-line); border-radius: 8px; padding: 10px 12px; height: 100%; }
.eamc-choice small { color: var(--eamc-slate); font-size: 13px; font-weight: 400; }
.eamc-choice input:checked + span { border-color: var(--eamc-blue); box-shadow: inset 0 0 0 1px var(--eamc-blue); background: var(--eamc-tint); }
.eamc-choice input:focus-visible + span { outline: 3px solid var(--eamc-sky); outline-offset: 2px; }

/* Tabs */
.eamc-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--eamc-line); margin: 0 0 20px; }
.eamc-tab { padding: 10px 18px; margin-bottom: -2px; border-bottom: 3px solid transparent; font-weight: 700; color: var(--eamc-slate) !important; text-decoration: none !important; }
.eamc-tab.is-active { color: var(--eamc-blue) !important; border-color: var(--eamc-blue); }

/* Pending steps */
.eamc-steps { list-style: none; margin: 18px 0; padding: 0; display: grid; gap: 0; }
.eamc-steps li { position: relative; padding: 0 0 16px 40px; display: grid; }
.eamc-steps li::before { content: ""; position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--eamc-ground); border: 2px solid var(--eamc-line); }
.eamc-steps li:not(:last-child)::after { content: ""; position: absolute; left: 12px; top: 28px; bottom: 2px; width: 2px; background: var(--eamc-line); }
.eamc-steps li.is-done::before { background: var(--eamc-green); border-color: var(--eamc-green); }
.eamc-steps li.is-now::before { background: var(--eamc-amber-tint); border-color: var(--eamc-amber); }
.eamc-steps span { color: var(--eamc-slate); font-size: 14px; }
.eamc-pending h2 { font-size: 24px; margin: 10px 0; }
.eamc-welcome-card h2 { font-size: 26px; margin: 8px 0 4px; }
.eamc-account summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.eamc-account summary::-webkit-details-marker { display: none; }
.eamc-account summary h2 { font-size: 20px; }
.eamc-account summary::after { content: "Show"; margin-left: auto; font-weight: 600; color: var(--eamc-blue); }
.eamc-account[open] summary::after { content: "Hide"; }
.eamc-account[open] summary { margin-bottom: 16px; }

/* Directory */
.eamc-dir-tools { display: grid; gap: 12px; margin: 0 0 8px; }
.eamc-dir-search { display: flex; gap: 8px; max-width: 520px; }
.eamc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.eamc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--eamc-line); background: #fff; color: var(--eamc-ink) !important; font-weight: 600; font-size: 14px; text-decoration: none !important; }
.eamc-chip:hover { border-color: var(--eamc-blue); }
.eamc-chip[aria-pressed="true"] { background: var(--eamc-blue); border-color: var(--eamc-blue); color: #fff !important; }
.eamc-chip-n { font-weight: 400; opacity: 0.7; }
.eamc-dir-count { color: var(--eamc-slate); font-size: 14px; margin: 4px 0 0; }
.eamc-floor { margin: 28px 0 0; }
.eamc-floor-head { display: flex; align-items: baseline; gap: 12px; padding-bottom: 8px; margin-bottom: 14px; border-bottom: 2px solid var(--eamc-blue); }
.eamc-floor-head h2 { font-size: 22px; font-weight: 700; }
.eamc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.eamc-listing { background: #fff; border: 1px solid var(--eamc-line); border-radius: var(--eamc-radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.eamc-listing--practice { border-top: 3px solid var(--eamc-blue); }
.eamc-listing-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.eamc-listing h3 { font-size: 16px; font-weight: 700; line-height: 1.3; }
.eamc-suite { flex: none; background: var(--eamc-tint); color: var(--eamc-blue-dark); border-radius: 5px; padding: 2px 8px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.eamc-specialty { color: var(--eamc-slate); font-size: 14px; margin: 0; }
.eamc-practice { font-size: 13px; color: var(--eamc-blue-dark); margin: 0; }
.eamc-listing-lines { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 3px; font-size: 14px; }
.eamc-listing-lines li { display: flex; gap: 8px; overflow-wrap: anywhere; margin: 0; }
.eamc-listing-lines a { text-decoration: none; }
.eamc-listing-lines a:hover { text-decoration: underline; }
.eamc-ico { flex: none; width: 16px; text-align: center; color: var(--eamc-sky); }
.eamc-listing-actions { margin-top: auto; padding-top: 10px; }
.eamc-dir-quicksearch { display: flex; flex-wrap: wrap; gap: 8px; max-width: 560px; margin: 16px 0 0; }
.eamc-dir-quicksearch input { flex: 1 1 240px; }

/* Tenant Information */
.eamc-staffbar { background: var(--eamc-amber-tint); border-radius: 8px; padding: 8px 14px; font-size: 14px; }
.eamc-notes { margin: 0 0 32px; display: grid; gap: 12px; }
.eamc-notes > h2, .eamc-docs-head h2 { font-size: 22px; }
.eamc-note { background: #fff; border: 1px solid var(--eamc-line); border-left: 4px solid var(--eamc-sky); border-radius: 0 10px 10px 0; padding: 14px 18px; }
.eamc-note.is-pinned { border-left-color: var(--eamc-blue); }
.eamc-note h3 { font-size: 17px; margin: 2px 0 6px; }
.eamc-note-meta { font-size: 13px; color: var(--eamc-slate); margin: 0; }
.eamc-note-body p:last-child { margin-bottom: 0; }
.eamc-docs-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.eamc-docs-head .eamc-dir-search { flex: 0 1 320px; }
.eamc-doc-group { background: #fff; border: 1px solid var(--eamc-line); border-radius: var(--eamc-radius); margin: 0 0 12px; scroll-margin-top: 90px; }
.eamc-doc-group > summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 10px; padding: 14px 18px; }
.eamc-doc-group > summary::-webkit-details-marker { display: none; }
.eamc-doc-group > summary::before { content: "▸"; color: var(--eamc-blue); transition: transform 0.15s; }
.eamc-doc-group[open] > summary::before { transform: rotate(90deg); }
.eamc-doc-group > summary h3 { font-size: 17px; }
.eamc-doc-list { list-style: none; margin: 0; padding: 0 0 6px; border-top: 1px solid var(--eamc-line); }
.eamc-doc { display: flex; align-items: center; gap: 14px; padding: 10px 18px; margin: 0; border-bottom: 1px solid #edf1f4; }
.eamc-doc:last-child { border-bottom: 0; }
.eamc-doc-main { flex: 1; min-width: 0; }
.eamc-doc-title { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.eamc-doc-desc { margin: 2px 0 0; font-size: 14px; color: var(--eamc-slate); }
.eamc-doc-meta { margin: 2px 0 0; font-size: 13px; color: var(--eamc-slate); font-variant-numeric: tabular-nums; }
.eamc-ftype { flex: none; width: 36px; height: 42px; border-radius: 4px; display: grid; place-items: end center; padding-bottom: 5px; font-size: 9px; font-weight: 800; letter-spacing: 0.04em; background: var(--eamc-red-tint); color: var(--eamc-red); clip-path: polygon(0 0, 70% 0, 100% 22%, 100% 100%, 0 100%); }
.eamc-ftype--doc, .eamc-ftype--docx { background: var(--eamc-tint); color: var(--eamc-blue-dark); }
.eamc-ftype--xls, .eamc-ftype--xlsx, .eamc-ftype--csv { background: var(--eamc-green-tint); color: var(--eamc-green); }

@media (max-width: 700px) {
	.eamc-grid-2, .eamc-grid-3, .eamc-choices { grid-template-columns: 1fr; }
	.eamc-card { padding: 18px; }
	.eamc-doc { flex-wrap: wrap; }
	.eamc-doc .eamc-btn { margin-left: 50px; }
	.eamc-tab { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
	.eamc * { transition: none !important; }
}
