.lmd {
	--red: #F7384F; --yellow: #FDC74B; --teal: #03B9C7; --green: #16A37F;
	--ink: #3B2A1E; --soft: #7a6b60; --line: #f0e7d8; --cream: #FFF8E6;
	font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
	color: var(--ink); max-width: 1280px; margin: 16px 20px 40px 0;
}
.lmd, .lmd * { box-sizing: border-box; }
.lmd a { text-decoration: none; }
.lmd h2, .lmd h4 { font-family: inherit; color: var(--ink); }

/* top bar */
.lmd-top { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; background: #fff; border-radius: 20px; padding: .8rem 1.2rem; margin-bottom: 1.2rem; box-shadow: 0 2px 10px rgba(59,42,30,.06); border-bottom: 4px solid var(--yellow); }
.lmd-brand { display: flex; align-items: center; gap: .7rem; }
.lmd-brand img { mix-blend-mode: multiply; border-radius: 12px; }
.lmd-brand strong { display: block; font-size: 1.25rem; font-weight: 900; color: var(--teal); line-height: 1.1; }
.lmd-brand span { font-size: .8rem; font-weight: 700; color: var(--red); }
.lmd-tabs { display: flex; flex-wrap: wrap; gap: .3rem; margin-left: auto; }
.lmd-tabs a { padding: .5em 1.1em; border-radius: 999px; font-weight: 800; color: var(--soft); }
.lmd-tabs a:hover { background: var(--cream); color: var(--ink); }
.lmd-tabs a.on { background: var(--teal); color: #fff; }
.lmd-lang { background: var(--yellow); color: var(--ink); font-weight: 900; border-radius: 999px; padding: .4em 1em; }
.lmd-lang:hover { color: var(--ink); filter: brightness(.95); }

/* stat cards */
.lmd-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.lmd-card { display: flex; align-items: center; gap: 1rem; padding: 1.3rem 1.2rem; border-radius: 20px; color: #fff; box-shadow: 0 6px 14px rgba(59,42,30,.14); transition: transform .15s; }
a.lmd-card:hover { transform: translateY(-3px); color: #fff; }
.lmd-card i { font-style: normal; font-size: 1.7rem; width: 54px; height: 54px; border-radius: 16px; background: rgba(255,255,255,.25); display: grid; place-items: center; flex: none; }
.lmd-card b { display: block; font-size: 2rem; font-weight: 900; line-height: 1; }
.lmd-card span { display: block; margin-top: .35rem; font-weight: 800; font-size: .85rem; opacity: .95; }
.lmd-teal   { background: linear-gradient(135deg, #03B9C7, #028f9b); }
.lmd-red    { background: linear-gradient(135deg, #F7384F, #d02640); }
.lmd-yellow { background: linear-gradient(135deg, #FDC74B, #e6a617); color: var(--ink); }
.lmd-yellow:hover { color: var(--ink) !important; }
.lmd-sky    { background: linear-gradient(135deg, #4aa8e8, #2f7bbf); }
.lmd-green  { background: linear-gradient(135deg, #1fbf94, #118568); }
.lmd-ink    { background: linear-gradient(135deg, #6b4a34, #3B2A1E); }

/* boxes */
.lmd-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.lmd-box { background: #fff; border-radius: 20px; padding: 1.4rem; margin-bottom: 1rem; box-shadow: 0 2px 10px rgba(59,42,30,.06); }
.lmd-row .lmd-box { margin-bottom: 0; }
.lmd-box h2 { margin: 0 0 1rem; font-size: 1.1rem; font-weight: 900; }
.lmd-box-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .8rem; margin-bottom: 1rem; }
.lmd-box-head h2 { margin: 0; }

/* bar chart */
.lmd-bars { display: flex; align-items: flex-end; gap: .8rem; height: 190px; padding-top: 1rem; }
.lmd-bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.lmd-bar em { font-style: normal; font-weight: 900; font-size: .85rem; margin-bottom: .2rem; }
.lmd-bar-fill { width: 100%; max-width: 46px; min-height: 4px; border-radius: 10px 10px 4px 4px; background: linear-gradient(180deg, var(--teal), #6fdbe3); }
.lmd-bar:last-child .lmd-bar-fill { background: linear-gradient(180deg, var(--red), #ff8d9b); }
.lmd-bar span { margin-top: .4rem; font-size: .78rem; font-weight: 800; color: var(--soft); }

.lmd-hbar { display: grid; grid-template-columns: 56px 1fr 28px; align-items: center; gap: .6rem; margin-bottom: .7rem; font-weight: 800; font-size: .9rem; }
.lmd-hbar div { background: var(--cream); border-radius: 999px; height: 14px; overflow: hidden; }
.lmd-hbar i { display: block; height: 100%; background: var(--yellow); border-radius: 999px; }
.lmd-hbar b { text-align: right; }

.lmd-pipe { list-style: none; margin: 0; padding: 0; }
.lmd-pipe a { display: flex; align-items: center; justify-content: space-between; padding: .5rem .2rem; border-bottom: 1px dashed var(--line); color: var(--ink); }
.lmd-pipe li:last-child a { border: 0; }
.lmd-pipe b { font-size: 1.1rem; }

/* badge */
.lmd-badge { display: inline-block; padding: .2em .8em; border-radius: 999px; font-weight: 800; font-size: .8rem; color: #fff; background: var(--c); }

/* buttons */
.lmd-btn { display: inline-block; border: 0; cursor: pointer; background: var(--red); color: #fff !important; padding: .6em 1.3em; border-radius: 999px; font: inherit; font-weight: 800; box-shadow: 0 3px 0 #c9243a; }
.lmd-btn:hover { filter: brightness(1.05); }
.lmd-btn-soft { background: var(--cream); color: var(--ink) !important; box-shadow: none; border: 2px solid var(--yellow); }
.lmd-btn-sm { padding: .4em 1em; font-size: .85rem; margin-top: .5rem; }
.lmd-link { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-weight: 800; color: var(--teal); margin-right: .8rem; }
.lmd-link:hover { color: var(--red); }
.lmd-del { color: #9a8f88; }

/* filters / search */
.lmd-filters { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.lmd-filters a { display: inline-flex; gap: .4rem; align-items: center; padding: .4em 1em; border-radius: 999px; font-weight: 800; color: var(--soft); background: var(--cream); border: 2px solid transparent; }
.lmd-filters a b { background: #fff; border-radius: 999px; padding: 0 .5em; font-size: .8rem; color: var(--ink); }
.lmd-filters a.on { background: var(--c, var(--teal)); color: #fff; }
.lmd-search { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.lmd-search input[type=search] { flex: 1; min-width: 220px; }
.lmd-search input, .lmd-search select, .lmd-detail textarea { border: 2px solid var(--line); border-radius: 12px; padding: .45em .9em; font: inherit; font-weight: 600; background: #fff; }
.lmd-search input:focus, .lmd-search select:focus, .lmd-detail textarea:focus { border-color: var(--teal); outline: 0; box-shadow: none; }

/* table */
.lmd-scroll { overflow-x: auto; }
.lmd-table { width: 100%; border-collapse: collapse; }
.lmd-table th { text-align: left; font-size: .78rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: var(--soft); padding: .6rem .8rem; border-bottom: 2px solid var(--line); }
.lmd-table td { padding: .8rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.lmd-table td small { display: block; color: var(--soft); font-size: .75rem; }
.lmd-table a { color: var(--teal); font-weight: 700; }
.lmd-row-main.is-new { background: #fff6f7; box-shadow: inset 4px 0 0 var(--red); }
.lmd-act { white-space: nowrap; text-align: right; }
.lmd-status { border: 2px solid var(--c); color: var(--c); font-weight: 800; border-radius: 999px; padding: .25em 1.6em .25em .8em; background-color: #fff; font-family: inherit; }
.lmd-detail td { background: var(--cream); }
.lmd-detail-in { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; padding: .4rem .4rem .8rem; }
.lmd-detail h4 { margin: 0 0 .4rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--soft); }
.lmd-detail p { margin: 0; }
.lmd-detail textarea { width: 100%; }
.lmd-empty { text-align: center; color: var(--soft); font-weight: 700; padding: 2rem 0; margin: 0; }
.lmd-pager { margin-top: 1rem; display: flex; gap: .3rem; flex-wrap: wrap; }
.lmd-pager .page-numbers { padding: .3em .8em; border-radius: 10px; background: var(--cream); font-weight: 800; color: var(--ink); }
.lmd-pager .current { background: var(--teal); color: #fff; }

.lmd-toast { position: fixed; right: 24px; bottom: 24px; background: var(--ink); color: #fff; font-weight: 800; padding: .7em 1.3em; border-radius: 999px; opacity: 0; transform: translateY(10px); transition: .25s; pointer-events: none; z-index: 99999; }
.lmd-toast.show { opacity: 1; transform: none; }

@media (max-width: 1100px) { .lmd-row { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
	.lmd-tabs { margin-left: 0; }
	.lmd-detail-in { grid-template-columns: 1fr; }
}

/* ---- standalone portal (/admin) ---- */
body.lm-portal { margin: 0; background: #FFF8E6; min-height: 100vh; font-family: 'Inter', system-ui, sans-serif; }
body.lm-portal .lmd { max-width: 1280px; margin: 0 auto; padding: 20px; }

.lm-login-page { display: grid; place-items: center; padding: 20px; }
.lmd-login { width: min(420px, 100%); background: #fff; border-radius: 28px; padding: 2rem 2rem 1.6rem; text-align: center; box-shadow: 0 12px 40px rgba(59,42,30,.12); border-top: 8px solid #03B9C7; color: #3B2A1E; }
.lmd-login img { margin: 0 auto .4rem; mix-blend-mode: multiply; }
.lmd-login h1 { margin: 0; font-size: 1.8rem; font-weight: 900; color: #03B9C7; }
.lmd-login-sub { margin: .2rem 0 1.4rem; font-weight: 700; color: #F7384F; }
.lmd-login form { text-align: left; }
.lmd-login label { display: block; font-weight: 800; font-size: .92rem; margin-bottom: 1rem; }
.lmd-login input[type=text], .lmd-login input[type=password] { display: block; width: 100%; margin-top: .3rem; padding: .75em 1em; font: inherit; font-weight: 600; border: 2px solid #f0e7d8; border-radius: 14px; background: #fff; color: #3B2A1E; }
.lmd-login input:focus { outline: 0; border-color: #F7384F; }
.lmd-login .lmd-check { display: flex; gap: .5rem; align-items: center; font-weight: 700; }
.lmd-login .lmd-btn { width: 100%; font-size: 1.05rem; padding: .85em; }
.lmd-login-err { background: #ffe9ec; color: #c9243a; font-weight: 800; padding: .7em 1em; border-radius: 14px; margin-bottom: 1rem; text-align: left; }
.lmd-login-links { display: flex; justify-content: space-between; margin-top: 1.2rem; font-weight: 800; font-size: .9rem; }
.lmd-login-links a { color: #03B9C7; text-decoration: none; }
.lmd-login-links a:hover { color: #F7384F; }

/* settings form */
.lmd-settings { max-width: 720px; }
.lmd-settings label { display: block; margin-bottom: 1rem; font-weight: 800; font-size: .92rem; }
.lmd-settings label span { display: block; margin-bottom: .3rem; }
.lmd-settings input[type=text], .lmd-settings input[type=email], .lmd-settings input[type=url], .lmd-settings select { width: 100%; padding: .65em 1em; font: inherit; font-weight: 600; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); }
.lmd-settings input:focus, .lmd-settings select:focus { outline: 0; border-color: var(--teal); box-shadow: none; }
.lmd-settings .lmd-check { display: flex; gap: .6rem; align-items: center; }
.lmd-settings .lmd-check span { margin: 0; }
.lmd-notice { background: #e3f8f0; color: #0b7a5c; font-weight: 800; padding: .8em 1.2em; border-radius: 14px; margin-bottom: 1rem; }

/* ---- left sidebar layout ---- */
.lmd { display: grid; grid-template-columns: 260px minmax(0, 1fr); column-gap: 1.5rem; align-items: start; max-width: 1560px; }
.lmd > * { grid-column: 2; min-width: 0; }
.lmd > .lmd-side { grid-column: 1; grid-row: 1 / span 40; position: sticky; top: 48px; align-self: start; }
body.lm-portal .lmd > .lmd-side { top: 20px; }
.lmd-cards { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.lmd-side { display: flex; flex-direction: column; gap: 1rem; min-height: calc(100vh - 110px); padding: 1.3rem 1rem 1rem; border-radius: 24px; color: #fff; background: linear-gradient(180deg, #03B9C7 0%, #028a96 100%); box-shadow: 0 8px 24px rgba(3,185,199,.28); }
.lmd-side .lmd-brand { display: flex; align-items: center; gap: .7rem; padding: 0 .4rem 1rem; border-bottom: 1px solid rgba(255,255,255,.25); }
.lmd-side .lmd-brand img { background: #fff; border-radius: 14px; padding: 2px; mix-blend-mode: normal; }
.lmd-side .lmd-brand strong { color: #fff; font-size: 1.15rem; }
.lmd-side .lmd-brand span { color: #FDC74B; }
.lmd-menu { display: flex; flex-direction: column; gap: .3rem; }
.lmd-menu-bottom { margin-top: auto; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.25); }
.lmd-menu a { display: flex; align-items: center; gap: .8rem; padding: .7em .9em; border-radius: 14px; color: #fff; font-weight: 800; transition: background .15s; }
.lmd-menu a:hover { background: rgba(255,255,255,.18); color: #fff; }
.lmd-menu a.on { background: #fff; color: #028a96; box-shadow: 0 4px 10px rgba(0,0,0,.12); }
.lmd-menu i { font-style: normal; width: 1.6rem; text-align: center; font-size: 1.15rem; }
.lmd-menu span { flex: 1; }
.lmd-menu em { font-style: normal; background: #F7384F; color: #fff; font-size: .75rem; font-weight: 900; border-radius: 999px; padding: .05em .6em; }
.lmd-menu a.lmd-lang { margin-top: .4rem; background: #FDC74B; color: #3B2A1E; justify-content: center; border-radius: 999px; }
.lmd-menu a.lmd-lang:hover { filter: brightness(.95); color: #3B2A1E; }

.lmd-notice-err { background: #ffe9ec; color: #c9243a; }
.lmd-settings input[type=date], .lmd-settings input[type=tel], .lmd-settings textarea { width: 100%; padding: .65em 1em; font: inherit; font-weight: 600; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); }
.lmd-settings input[type=date]:focus, .lmd-settings input[type=tel]:focus, .lmd-settings textarea:focus { outline: 0; border-color: var(--teal); box-shadow: none; }
.lmd-settings .lmd-btn { margin-right: .5rem; }

@media (max-width: 900px) {
	.lmd { grid-template-columns: 1fr; }
	.lmd > * { grid-column: 1; }
	.lmd > .lmd-side, body.lm-portal .lmd > .lmd-side { grid-column: 1; grid-row: auto; position: static; min-height: 0; margin-bottom: 1rem; }
	.lmd-menu { flex-direction: row; flex-wrap: wrap; }
	.lmd-menu-bottom { margin-top: 0; }
	.lmd-menu span { flex: none; }
}

/* =================================================================
 * Refined / professional theme (overrides above)
 * Flat surfaces, neutral slate palette, brand colour as accent only.
 * ================================================================= */
.lmd {
	--red: #D9374B; --yellow: #C98A0B; --teal: #0E8F9B; --green: #1B8A6B;
	--ink: #1F2937; --soft: #6B7280; --line: #E5E7EB; --cream: #F3F4F6; --brand: #0E8F9B;
	--radius: 10px;
	font-size: 14px; line-height: 1.5; letter-spacing: -.003em;
	-webkit-font-smoothing: antialiased;
}
body.lm-portal { background: #F5F6F8; }
.lmd-ico { display: block; flex: none; }

/* sidebar: dark slate instead of bright teal */
.lmd-side { background: #111827; box-shadow: none; border-radius: 14px; color: #E5E7EB; }
.lmd-side .lmd-brand { border-bottom: 1px solid rgba(255,255,255,.08); }
.lmd-side .lmd-brand img { border-radius: 10px; }
.lmd-side .lmd-brand strong { font-size: 1rem; font-weight: 700; letter-spacing: .01em; }
.lmd-side .lmd-brand span { color: #9CA3AF; font-weight: 500; font-size: .75rem; }
.lmd-menu-bottom { border-top: 1px solid rgba(255,255,255,.08); }
.lmd-menu a { color: #D1D5DB; font-weight: 500; border-radius: 8px; padding: .6em .8em; gap: .7rem; }
.lmd-menu a:hover { background: rgba(255,255,255,.07); color: #fff; }
.lmd-menu a.on { background: rgba(255,255,255,.1); color: #fff; box-shadow: inset 3px 0 0 var(--brand); border-radius: 8px; }
.lmd-menu i { width: 20px; height: 20px; display: grid; place-items: center; font-size: 0; opacity: .85; }
.lmd-menu a.on i { opacity: 1; }
.lmd-menu em { background: var(--red); font-weight: 600; font-size: .7rem; padding: .05em .55em; }
.lmd-menu a.lmd-lang { background: transparent; color: #D1D5DB; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; font-weight: 500; font-size: .85rem; margin-top: .5rem; }
.lmd-menu a.lmd-lang:hover { background: rgba(255,255,255,.07); color: #fff; filter: none; }

/* stat cards: white, flat, thin accent */
.lmd-cards { gap: .9rem; }
.lmd-card { background: #fff !important; color: var(--ink) !important; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(16,24,40,.04); padding: 1.1rem 1.2rem; gap: .9rem; position: relative; overflow: hidden; }
.lmd-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--ac, var(--teal)); }
a.lmd-card:hover { transform: none; border-color: #D1D5DB; box-shadow: 0 2px 8px rgba(16,24,40,.08); color: var(--ink) !important; }
.lmd-card i { width: 40px; height: 40px; border-radius: 8px; background: color-mix(in srgb, var(--ac, var(--teal)) 10%, #fff); color: var(--ac, var(--teal)); font-size: 0; }
.lmd-card b { font-size: 1.6rem; font-weight: 650; letter-spacing: -.02em; color: var(--ink); }
.lmd-card span { margin-top: .3rem; font-weight: 500; font-size: .8rem; color: var(--soft); opacity: 1; }
.lmd-teal { --ac: #0E8F9B; } .lmd-red { --ac: #D9374B; } .lmd-yellow { --ac: #C98A0B; }
.lmd-sky { --ac: #2F6FB0; } .lmd-green { --ac: #1B8A6B; } .lmd-ink { --ac: #4B5563; }
.lmd-teal, .lmd-red, .lmd-yellow, .lmd-sky, .lmd-green, .lmd-ink { background: #fff; }

/* boxes */
.lmd-box { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(16,24,40,.04); padding: 1.2rem 1.3rem; }
.lmd-box h2 { font-size: .95rem; font-weight: 600; }

/* charts */
.lmd-bar em { font-weight: 600; font-size: .8rem; color: var(--ink); }
.lmd-bar-fill { max-width: 36px; border-radius: 4px 4px 0 0; background: #9CD5DB; }
.lmd-bar:last-child .lmd-bar-fill { background: var(--teal); }
.lmd-bar span { font-weight: 500; font-size: .75rem; }
.lmd-hbar { font-weight: 500; font-size: .85rem; }
.lmd-hbar div { height: 8px; background: var(--cream); border-radius: 4px; }
.lmd-hbar i { background: var(--teal); border-radius: 4px; }
.lmd-hbar b { font-weight: 600; }
.lmd-pipe a { border-bottom: 1px solid var(--line); border-bottom-style: solid; padding: .55rem .1rem; }
.lmd-pipe b { font-size: 1rem; font-weight: 600; }

/* badges, status */
.lmd-badge { border-radius: 6px; font-weight: 600; font-size: .72rem; padding: .2em .65em; background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 28%, #fff); }
.lmd-status { border: 1px solid color-mix(in srgb, var(--c) 40%, #fff); color: var(--c); border-radius: 6px; font-weight: 600; font-size: .82rem; padding: .3em 1.6em .3em .7em; background-color: color-mix(in srgb, var(--c) 6%, #fff); }

/* buttons: flat, rounded-rect */
.lmd-btn { display: inline-flex; align-items: center; gap: .45rem; background: var(--brand); border-radius: 8px; box-shadow: none; font-weight: 600; font-size: .85rem; padding: .55em 1.1em; }
.lmd-btn:hover { filter: none; background: #0b7882; }
.lmd-btn .lmd-ico { width: 16px; height: 16px; }
.lmd-btn-soft { background: #fff; color: var(--ink) !important; border: 1px solid #D1D5DB; }
.lmd-btn-soft:hover { background: var(--cream); }
.lmd-btn-sm { padding: .4em .9em; font-size: .8rem; }
.lmd-link { font-weight: 600; color: var(--brand); }
.lmd-link:hover { color: #0b7882; text-decoration: underline; }

/* filters, inputs */
.lmd-filters a { border-radius: 6px; font-weight: 500; font-size: .85rem; background: #fff; border: 1px solid var(--line); padding: .35em .8em; }
.lmd-filters a:hover { background: var(--cream); }
.lmd-filters a b { background: var(--cream); border-radius: 4px; font-weight: 600; }
.lmd-filters a.on { background: var(--c, var(--brand)); border-color: var(--c, var(--brand)); color: #fff; }
.lmd-filters a.on b { background: rgba(255,255,255,.22); color: #fff; }
.lmd-search input, .lmd-search select, .lmd-detail textarea,
.lmd-settings input[type=text], .lmd-settings input[type=email], .lmd-settings input[type=url], .lmd-settings input[type=date], .lmd-settings input[type=tel], .lmd-settings select, .lmd-settings textarea { border: 1px solid #D1D5DB; border-radius: 8px; font-weight: 400; padding: .5em .8em; }
.lmd-search input:focus, .lmd-search select:focus, .lmd-detail textarea:focus,
.lmd-settings input:focus, .lmd-settings select:focus, .lmd-settings textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(14,143,155,.15); }
.lmd-settings label { font-weight: 600; font-size: .85rem; }

/* tables */
.lmd-table th { font-size: .7rem; font-weight: 600; letter-spacing: .06em; background: #F9FAFB; border-bottom: 1px solid var(--line); }
.lmd-table td { padding: .75rem .8rem; }
.lmd-table tbody tr:hover td { background: #FAFAFB; }
.lmd-table a { color: var(--brand); font-weight: 500; }
.lmd-row-main.is-new { background: #FEF7F8; box-shadow: inset 3px 0 0 var(--red); }
.lmd-detail td { background: #F9FAFB; }
.lmd-detail h4 { font-weight: 600; }
.lmd-pager .page-numbers { border-radius: 6px; background: #fff; border: 1px solid var(--line); font-weight: 500; }
.lmd-pager .current { background: var(--brand); border-color: var(--brand); color: #fff; }
.lmd-empty { font-weight: 500; }
.lmd-notice { background: #ECFDF5; color: #067647; border: 1px solid #A7F3D0; border-radius: 8px; font-weight: 500; }
.lmd-notice-err { background: #FEF3F2; color: #B42318; border-color: #FECDCA; }
.lmd-toast { border-radius: 8px; font-weight: 500; background: #111827; }

/* login */
.lmd-login { border-radius: 14px; border-top: 4px solid #0E8F9B; box-shadow: 0 8px 30px rgba(16,24,40,.1); color: #1F2937; }
.lmd-login h1 { font-size: 1.5rem; font-weight: 700; color: #111827; }
.lmd-login-sub { color: #6B7280; font-weight: 500; }
.lmd-login label { font-weight: 600; }
.lmd-login input[type=text], .lmd-login input[type=password] { border: 1px solid #D1D5DB; border-radius: 8px; font-weight: 400; }
.lmd-login input:focus { border-color: #0E8F9B; box-shadow: 0 0 0 3px rgba(14,143,155,.15); }
.lmd-login .lmd-btn { justify-content: center; font-size: .95rem; padding: .75em; }
.lmd-login-err { background: #FEF3F2; color: #B42318; border-radius: 8px; font-weight: 500; }
.lmd-login-links a { color: #0E8F9B; font-weight: 600; }
.lmd-login-links a:hover { color: #0b7882; }

@media (max-width: 900px) { .lmd-menu a.on { box-shadow: none; } }

/* registration details in the inquiry row */
.lmd-reg { grid-column: 1 / -1; padding-bottom: .8rem; border-bottom: 1px solid var(--line); }
.lmd-reg dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .6rem 1.5rem; }
.lmd-reg dt { font-size: .72rem; color: var(--soft); text-transform: uppercase; letter-spacing: .05em; }
.lmd-reg dd { margin: 0; font-weight: 500; word-break: break-word; }

/* payments */
.lmd-inl { display: inline !important; margin: 0 !important; font: inherit !important; opacity: 1 !important; color: inherit !important; }
.lmd-card span em { font-style: normal; }
.lmd-pay-table td small { display: block; color: var(--soft); font-size: .78rem; }
.lmd-pay-hist { width: 100%; border-collapse: collapse; font-size: .88rem; }
.lmd-pay-hist td { padding: .45rem .4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.lmd-pay-hist td small { display: block; color: var(--soft); }
.lmd-pay-receipt { margin-top: .6rem !important; }
.lmd-pay-form { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .6rem; margin-bottom: .4rem; }
.lmd-pay-form label { display: block; font-size: .78rem; font-weight: 600; color: var(--soft); }
.lmd-pay-form label span { display: block; margin-bottom: .2rem; }
.lmd-pay-wide { grid-column: 1 / -1; }
.lmd-pay-form input, .lmd-pay-form select, .lmd-pay-due input { width: 100%; border: 1px solid #D1D5DB; border-radius: 8px; padding: .45em .7em; font: inherit; color: var(--ink); background: #fff; }
.lmd-pay-due { display: flex; gap: .5rem; align-items: center; }
.lmd-pay-due input { max-width: 180px; }
.lmd-pay-due .lmd-btn { margin-top: 0; }
.lmd-pay-forms .lmd-btn { margin-right: .4rem; }
@media (max-width: 640px) { .lmd-pay-form { grid-template-columns: 1fr; } }

/* invoice panel */
.lmd-pay-top { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .7rem 1rem; align-items: center; padding-bottom: .8rem; border-bottom: 1px solid var(--line); }
.lmd-pay-top .lmd-btn { margin-top: 0; }
.lmd-pay-mail { display: inline-flex; gap: .4rem; align-items: center; }
.lmd-pay-mail input { border: 1px solid #D1D5DB; border-radius: 8px; padding: .4em .7em; font: inherit; min-width: 220px; background: #fff; }
.lmd-pay-sum { margin-left: auto; color: var(--soft); font-size: .88rem; }
.lmd-pay-sum b { color: var(--ink); }
.lmd-pay-col { min-width: 0; }
.lmd-neg { color: #16A37F; }
.lmd-charge-total { display: block; padding: .45em 0; font-weight: 700; }
.lmd-pay-form input[type=date] { min-width: 0; }
@media (max-width: 640px) { .lmd-pay-sum { margin-left: 0; width: 100%; } .lmd-pay-mail { width: 100%; } .lmd-pay-mail input { flex: 1; min-width: 0; } }

/* Byl payment link (inside a child's account panel) */
.lmd-byl { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .5rem .7rem; align-items: center; padding: .7rem .9rem; margin: .1rem 0 .3rem; background: #F5F3FF; border: 1px solid #DDD6FE; border-radius: 10px; }
.lmd-byl .lmd-btn { margin-top: 0; }
.lmd-byl-tag { background: #7C3AED; color: #fff; border-radius: 6px; padding: .15em .6em; font-size: .8rem; letter-spacing: .02em; }
.lmd-byl-info { font-size: .88rem; color: var(--soft); }
.lmd-byl-info b { color: var(--ink); }
.lmd-byl-ok { color: #067647; font-weight: 600; }
.lmd-byl-url { flex: 1 1 240px; min-width: 0; border: 1px solid #D1D5DB; border-radius: 8px; padding: .4em .7em; font: inherit; font-size: .85rem; background: #fff; }
.lmd-byl-new { display: inline-flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.lmd-byl-new input { width: 9.5em; border: 1px solid #D1D5DB; border-radius: 8px; padding: .4em .7em; font: inherit; background: #fff; }

/* add payment / invoice dialog */
.lmd-head-actions { display: inline-flex; gap: .5rem; flex-wrap: wrap; }
.lmd-btn[disabled] { opacity: .5; cursor: not-allowed; }
.lmd-modal { position: fixed; inset: 0; z-index: 100000; background: rgba(17,24,39,.5); display: flex; align-items: center; justify-content: center; padding: 16px; }
.lmd-modal[hidden] { display: none; }
.lmd-modal-card { background: #fff; border-radius: 12px; width: min(580px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 1.3rem 1.4rem; box-shadow: 0 20px 50px rgba(16,24,40,.28); }
.lmd-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.lmd-modal-head h3 { margin: 0; font-size: 1.05rem; font-weight: 650; color: var(--ink); }
.lmd-modal-head h3 small { color: var(--soft); font-weight: 500; font-size: .8rem; margin-left: .4rem; }
.lmd-modal-x { border: 0; background: none; font-size: 1.6rem; line-height: 1; color: var(--soft); cursor: pointer; padding: 0 .3rem; }
.lmd-modal-x:hover { color: var(--ink); }
.lmd-m-field { display: block; margin-bottom: .8rem; font-size: .78rem; font-weight: 600; color: var(--soft); }
.lmd-m-field span { display: block; margin-bottom: .2rem; }
.lmd-m-field select, .lmd-modal .lmd-pay-form select { width: 100%; border: 1px solid #D1D5DB; border-radius: 8px; padding: .5em .7em; font: inherit; color: var(--ink); background: #fff; }
.lmd-m-sum { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; padding: .6rem .8rem; margin-bottom: .9rem; background: #F9FAFB; border: 1px solid var(--line); border-radius: 8px; font-size: .85rem; color: var(--soft); }
.lmd-m-sum[hidden] { display: none; }
.lmd-m-sum b { color: var(--ink); }
.lmd-seg { display: flex; gap: 2px; padding: 3px; background: var(--cream); border-radius: 9px; margin-bottom: 1rem; }
.lmd-seg button { flex: 1; border: 0; background: transparent; padding: .5em .8em; border-radius: 7px; font: inherit; font-weight: 600; font-size: .85rem; color: var(--soft); cursor: pointer; }
.lmd-seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(16,24,40,.12); }
.lmd-m-pane[hidden] { display: none; }
.lmd-m-hint { margin: 0 0 .7rem; color: var(--soft); font-size: .82rem; }
.lmd-modal-foot { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.lmd-modal-foot .lmd-btn[hidden] { display: none; }
.lmd-modal-spacer { flex: 1; }
body.lmd-modal-open { overflow: hidden; }
.lmd-toast { z-index: 100001; }
@media (max-width: 640px) { .lmd-modal-foot .lmd-btn { flex: 1; justify-content: center; } .lmd-modal-spacer { display: none; } }

/* bulk upload */
.lmd-imp { max-width: 820px; }
.lmd-imp-steps { margin: 0 0 1.2rem 1.1rem; padding: 0; color: var(--ink); }
.lmd-imp-steps li { margin-bottom: .8rem; }
.lmd-imp input[type=file] { display: block; width: 100%; padding: .9rem; border: 2px dashed #D1D5DB; border-radius: 10px; background: #F9FAFB; font: inherit; }
.lmd-imp-h { margin: 1.6rem 0 .4rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--soft); }
.lmd-imp-cols td:first-child { white-space: nowrap; width: 190px; }
.lmd-imp-req { color: var(--red); font-weight: 700; }
.lmd-imp-more { color: var(--soft); font-size: .82rem; margin: .8rem 0 0; }
.lmd-imp-file { color: var(--soft); font-weight: 500; font-size: .8rem; margin-left: .5rem; }
.lmd-imp-sum { margin-bottom: 1rem; }
.lmd-imp-sum span { display: inline-flex; gap: .4rem; align-items: center; padding: .35em .8em; border-radius: 6px; font-size: .85rem; font-weight: 500; background: color-mix(in srgb, var(--c) 10%, #fff); border: 1px solid color-mix(in srgb, var(--c) 30%, #fff); color: var(--ink); }
.lmd-imp-sum b { font-weight: 700; }
.lmd-imp-err { color: #B42318 !important; margin-top: .25rem; }
.lmd-imp-confirm { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.lmd-imp-confirm fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
.lmd-imp-confirm legend { font-weight: 600; margin-bottom: .4rem; padding: 0; }
.lmd-imp-confirm fieldset label { display: block; margin-bottom: .3rem; }

/* School year switcher on the dashboard */
.lmd-yearbar { display: flex; align-items: center; gap: .6rem; margin: 0 0 1rem; }
.lmd-yearbar label { font-weight: 800; font-size: .92rem; }
.lmd-yearbar select { padding: .5em 1em; font: inherit; font-weight: 700; border: 2px solid var(--line, #e5e7eb); border-radius: 12px; background: #fff; color: var(--ink, #111); }

/* Student name link + detail page */
.lmd-table a.lmd-name { color: inherit; text-decoration: none; }
.lmd-table a.lmd-name:hover strong { color: var(--teal); text-decoration: underline; }
.lmd-box > .lmd-reg { margin-top: 1rem; }

/* Student / staff pictures */
.lmd-avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 50%; overflow: hidden; background: #e6f4f4; color: var(--teal, #0e8a96); font-weight: 800; line-height: 1; }
.lmd-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lmd-person { display: flex; align-items: center; gap: .7rem; }
.lmd-table td.lmd-person { display: table-cell; }
.lmd-table td.lmd-person > .lmd-avatar { vertical-align: middle; margin-right: .7rem; float: left; }
.lmd-table td.lmd-person > div { overflow: hidden; }
.lmd-person-lg { gap: 1rem; }
.lmd-photo-row { display: flex; align-items: center; gap: 1rem; }
.lmd-photo-row small { display: block; margin-top: .3rem; font-weight: 500; color: var(--soft, #667); }
.lmd-photo-rm { display: block; margin-top: .4rem; font-weight: 600; font-size: .86rem; }
.lmd-settings .lmd-photo-row input[type=file] { width: auto; max-width: 100%; padding: 0; border: 0; background: none; }

/* Siblings */
.lmd-sibs { margin-top: 1rem; }
.lmd-sibs h4 { margin: 0 0 .4rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--soft); }
.lmd-sibs ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.lmd-sibs li { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.lmd-sibs li > div { flex: 1; min-width: 140px; }
.lmd-sibs li small { display: block; color: var(--soft); }
.lmd-sibs a.lmd-name { color: inherit; text-decoration: none; }
.lmd-sibs a.lmd-name:hover strong { color: var(--teal); text-decoration: underline; }
.lmd-sibfield { margin-bottom: 1rem; }
.lmd-sibfield > span { display: block; margin-bottom: .3rem; font-weight: 800; font-size: .92rem; }
.lmd-sibpick { max-height: 190px; overflow: auto; border: 2px solid var(--line); border-radius: 12px; padding: .5rem .8rem; background: #fff; }
.lmd-sibpick label { display: flex !important; gap: .5rem; align-items: center; margin: 0 !important; padding: .25rem 0; font-weight: 600 !important; }
.lmd-sibpick small { color: var(--soft); font-weight: 500; }
.lmd-hint { margin: .3rem 0 0; font-size: .82rem; color: var(--soft); font-weight: 500; }

.lmd-sibsearch { width: 100%; margin-bottom: .4rem; }
.lmd-sibnew { display: grid; gap: .5rem; margin: .6rem 0; }
.lmd-sibrow { display: grid; grid-template-columns: 1fr 150px 1fr auto; gap: .5rem; align-items: center; }
.lmd-sibdel { border: 0; background: #f1f3f6; border-radius: 10px; width: 36px; height: 36px; font-size: 1.2rem; cursor: pointer; color: var(--soft); }
.lmd-sibdel:hover { background: #fde3e3; color: #c0392b; }
@media (max-width: 700px) { .lmd-sibrow { grid-template-columns: 1fr 1fr; } .lmd-sibrow input[type=text] { grid-column: 1 / -1; } }

/* Cloud kitchen */
.lmd-settings input[type=time] { width: 100%; padding: .5em .8em; font: inherit; border: 1px solid #D1D5DB; border-radius: 8px; background: #fff; color: var(--ink); }
.lmd-itemrow { display: grid; grid-template-columns: 1fr 70px auto; gap: .5rem; align-items: center; }
.lmd-itemrow select, .lmd-itemrow input { width: 100%; }
.lmd-ko-total { margin: .2rem 0 1rem; font-size: 1.05rem; }
.lmd-person small { display: block; color: var(--soft); }

.lmd-share { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; align-items: start; }
.lmd-share-card { max-width: none; }
.lmd-share-card h3 { margin: 0 0 .5rem; }
.lmd-linkrow { display: flex; gap: .5rem; margin: .8rem 0; }
.lmd-linkrow input { flex: 1; min-width: 0; padding: .55em .8em; border: 1px solid #D1D5DB; border-radius: 8px; font: inherit; background: #F9FAFB; }
.lmd-qrbox { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; margin-top: 1rem; }
.lmd-qrbox canvas { border: 1px solid var(--line); border-radius: 12px; max-width: 100%; }

/* Cloud kitchen: categories + stock */
.lmd-catform { max-width: 860px; }
.lmd-catrow { display: grid; grid-template-columns: auto 1fr 1fr 190px auto; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.lmd-catrow input[type=text], .lmd-catrow select { width: 100%; padding: .5em .8em; border: 1px solid #D1D5DB; border-radius: 8px; font: inherit; background: #fff; }
.lmd-catmove { display: flex; flex-direction: column; gap: 2px; }
.lmd-catmove button { border: 0; background: #f1f3f6; border-radius: 4px; font-size: .6rem; line-height: 1; padding: .3em .55em; cursor: pointer; color: var(--soft); }
.lmd-catmove button:hover { background: #e2e8f0; color: var(--ink); }
.lmd-catact { display: flex; align-items: center; gap: .6rem; min-width: 90px; }
.lmd-catact small { color: var(--soft); }
.lmd-catdel { margin: 0 !important; display: flex !important; gap: .3rem; align-items: center; font-weight: 500 !important; color: #c0392b; font-size: .85rem; }
.lmd-catrow:has(input[name="c_del[]"]:checked) input[type=text], .lmd-catrow:has(input[name="c_del[]"]:checked) select { text-decoration: line-through; opacity: .45; }
@media (max-width: 760px) { .lmd-catrow { grid-template-columns: auto 1fr; } .lmd-catrow select, .lmd-catact { grid-column: 2; } }

/* Cloud kitchen: record payment from the orders list */
.lmd-paycell { min-width: 150px; }
.lmd-paycell small { display: block; margin: .25rem 0; }
.lmd-payrow { display: flex; flex-direction: column; gap: .35rem; margin-top: .4rem; }
.lmd-paymethod { font: inherit; font-size: .8rem; padding: .3em .5em; border: 1px solid #D1D5DB; border-radius: 6px; background: #fff; }
.lmd-btn-sm { padding: .3em .8em; font-size: .8rem; }

/* Cloud kitchen: tiny POS */
.lmd-pos { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; }
.lmd-pos-tools { display: flex; gap: .5rem; margin-bottom: .8rem; }
.lmd-pos-tools input { flex: 1; min-width: 0; padding: .55em .8em; border: 1px solid #D1D5DB; border-radius: 8px; font: inherit; }
.lmd-pos-tools select { font: inherit; padding: .5em; border: 1px solid #D1D5DB; border-radius: 8px; background: #fff; }
.lmd-pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; }
.lmd-pos-dish { display: flex; flex-direction: column; justify-content: space-between; gap: .4rem; min-height: 78px; text-align: left; padding: .7rem; border: 1px solid #E5E7EB; border-radius: 10px; background: #fff; font: inherit; cursor: pointer; }
.lmd-pos-dish:hover, .lmd-pos-dish:active { border-color: var(--brand, #0e8f9a); background: #F0FAFB; }
.lmd-pos-dish b { font-weight: 700; line-height: 1.25; }
.lmd-pos-dish span { color: var(--brand, #0e8f9a); font-weight: 700; font-size: .9rem; }
.lmd-pos-cart { position: sticky; top: 1rem; padding: 1rem; display: flex; flex-direction: column; gap: .7rem; }
.lmd-pos-cart h3 { margin: 0; }
.lmd-pos-cart label { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; }
.lmd-pos-cart input[type=text], .lmd-pos-cart select { font: inherit; padding: .5em .7em; border: 1px solid #D1D5DB; border-radius: 8px; background: #fff; }
.lmd-pos-line { display: grid; grid-template-columns: 1fr auto auto; gap: .5rem; align-items: center; padding: .4rem 0; border-bottom: 1px solid #F0F0F0; }
.lmd-pos-line .nm small { display: block; color: #6B7280; }
.lmd-pos-line .qty { display: inline-flex; align-items: center; gap: .35rem; }
.lmd-pos-line .qty button { width: 28px; height: 28px; border: 1px solid #D1D5DB; border-radius: 6px; background: #fff; cursor: pointer; font-size: 1rem; line-height: 1; }
.lmd-pos-empty { color: #6B7280; margin: 0; }
.lmd-pos-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.15rem; }
.lmd-pos-total strong { font-size: 1.5rem; }
.lmd-pos-change { margin: 0; }
.lmd-pos-charge { padding: .8em 1em; font-size: 1rem; }
.lmd-pos-charge:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 900px) { .lmd-pos { grid-template-columns: 1fr; } .lmd-pos-cart { position: static; } }

/* Bulk select */
.lmd-table th.lmd-chk, .lmd-table td.lmd-chk { width: 36px; padding-right: 0; text-align: center; }
.lmd-chk input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--brand, #0e8f9a); vertical-align: middle; }
.lmd-table tr.is-selected > td { background: #F0FAFB; }
.lmd-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .55rem .8rem; margin-bottom: .6rem; border: 1px solid #BDE6EA; border-radius: 10px; background: #F0FAFB; position: sticky; top: 0; z-index: 5; }
.lmd-bulk[hidden] { display: none; }
.lmd-bulk-n { font-weight: 600; margin-right: .3rem; }
.lmd-bulk select { font: inherit; font-size: .8rem; padding: .3em .5em; border: 1px solid #D1D5DB; border-radius: 6px; background: #fff; }
.lmd-bulk .lmd-bulk-del { background: #F7384F; border-color: #F7384F; color: #fff; }
.lmd-bulk .lmd-link { margin: 0 0 0 auto; }

/* =================================================================
 * Mobile bottom tab bar (dashboard / portal)
 * ================================================================= */
.lmd-tabbar, .lmd-more { display: none; }
@media (max-width: 900px) {
	body.lm-portal, body.wp-admin { --lmd-bar: calc(64px + env(safe-area-inset-bottom)); }
	.lmd { margin-right: 12px; margin-bottom: calc(var(--lmd-bar, 64px) + 24px); }
	body.lm-portal .lmd { margin: 12px 12px calc(var(--lmd-bar, 64px) + 24px); }

	/* the sidebar collapses to a brand header; its links live in the tab bar */
	.lmd-side { padding: .7rem .9rem; gap: 0; }
	.lmd-side .lmd-brand { padding: 0; border: 0; }
	.lmd-side .lmd-menu { display: none; }

	.lmd-tabbar {
		display: flex; position: fixed; z-index: 9990; left: 0; right: 0; bottom: 0;
		padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); gap: 2px;
		background: rgba(255,255,255,.97); backdrop-filter: blur(10px);
		border-top: 1px solid #E5E7EB; box-shadow: 0 -4px 20px rgba(16,24,40,.08);
	}
	.lmd-tabbar a, .lmd-tabbar-more {
		flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px;
		padding: 6px 2px 4px; border: 0; border-radius: 12px; background: none; cursor: pointer;
		color: #6B7280; font: inherit; font-size: 11px; font-weight: 600; line-height: 1.2; text-align: center;
		-webkit-tap-highlight-color: transparent; transition: background .15s, color .15s;
	}
	.lmd-tabbar span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.lmd-tabbar i, .lmd-more-grid i { position: relative; font-style: normal; display: grid; place-items: center; }
	.lmd-tabbar em, .lmd-more-grid em { position: absolute; top: -5px; left: 55%; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #D9374B; color: #fff; font-style: normal; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }
	.lmd-tabbar a.on, .lmd-tabbar-more.on { background: #E6F4F5; color: #0E8F9B; }
	.lmd-tabbar a:active, .lmd-tabbar-more:active { background: #F3F4F6; }

	.lmd-more { position: fixed; inset: 0; z-index: 9995; display: block; }
	.lmd-more[hidden] { display: none; }
	.lmd-more-back { position: absolute; inset: 0; background: rgba(17,24,39,.45); animation: lmd-fade .18s ease-out; }
	.lmd-more-sheet {
		position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 18px 18px 0 0;
		padding: 10px 14px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(16,24,40,.2);
		animation: lmd-rise .22s ease-out;
	}
	.lmd-more-grip { display: block; width: 38px; height: 4px; border-radius: 4px; background: #D1D5DB; margin: 0 auto 14px; }
	.lmd-more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
	.lmd-more-grid a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: 14px; background: #F9FAFB; color: #1F2937; font-size: 12px; font-weight: 600; text-align: center; }
	.lmd-more-grid a.on { background: #E6F4F5; color: #0E8F9B; }
	.lmd-more-grid .lmd-ico { width: 24px; height: 24px; }
	.lmd-more-lang { display: block; margin-top: 12px; padding: .75em; border-radius: 12px; background: #F3F4F6; color: #1F2937; font-weight: 700; text-align: center; }
	@keyframes lmd-rise { from { transform: translateY(100%); } }
	@keyframes lmd-fade { from { opacity: 0; } }
}
@media (max-width: 900px) and (prefers-reduced-motion: reduce) { .lmd-more-back, .lmd-more-sheet { animation: none; } }

/* Announcements */
.lmd-an-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.lmd-an-list a { display: block; padding: .65rem .8rem; border-radius: 8px; color: #1F2937; background: #F9FAFB; }
.lmd-an-list a:hover { background: #F3F4F6; }
.lmd-an-list strong { display: block; font-weight: 600; }
.lmd-an-list small { color: #6B7280; }
.lmd-an-form textarea { resize: vertical; }
.lmd-an-opt { border: 1px solid #E5E7EB; border-radius: 10px; padding: .8rem 1rem 1rem; margin: 1rem 0; min-width: 0; }
.lmd-an-opt legend { font-weight: 700; padding: 0 .4rem; }
.lmd-an-opt .lmd-check { margin: .4rem 0; }
.lmd-an-aud { margin: .4rem 0 0 1.6rem; display: grid; gap: .1rem; }
.lmd-an-aud[hidden] { display: none; }
.lmd-an-aud input[type=radio] { width: auto; }
.lmd-an-until { display: block; margin-top: .6rem; }
.lmd-an-en { margin: .6rem 0 0; }
.lmd-an-en summary { cursor: pointer; font-weight: 600; color: #0E8F9B; padding: .4rem 0; }

/* Events */
.lmd-ev-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 1rem; }
.lmd-ev-thumb { display: block; width: 64px; height: 48px; object-fit: cover; border-radius: 8px; background: #F3F4F6; }
.lmd-ev-thumb-ph { display: grid; place-items: center; color: #9CA3AF; }
.lmd-ev-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.lmd-ev-img { border: 1px solid #E5E7EB; border-radius: 10px; padding: .5rem; background: #F9FAFB; }
.lmd-ev-img img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; margin-bottom: .4rem; }
.lmd-ev-img .lmd-check { margin: 0 0 .2rem; font-size: .8rem; }
.lmd-ev-rm span { color: #B42318; }
.lmd-settings .lmd-ev-up input[type=file] { width: 100%; padding: .5em 0; border: 0; background: none; }
.lmd-ev-up small { display: block; margin-top: .3rem; font-weight: 400; color: #6B7280; }
@media (max-width: 520px) { .lmd-ev-row { grid-template-columns: 1fr; } }

/* Home page CMS */
.lmd-cms { max-width: 920px; }
.lmd-cms-group > summary { cursor: pointer; list-style: none; }
.lmd-cms-group > summary::-webkit-details-marker { display: none; }
.lmd-cms-group > summary h2 { margin: 0; display: flex; align-items: center; justify-content: space-between; }
.lmd-cms-group > summary h2::after { content: "+"; font-weight: 400; font-size: 1.3rem; color: #6B7280; }
.lmd-cms-group[open] > summary h2::after { content: "−"; }
.lmd-cms-group[open] > summary { margin-bottom: 1rem; }
.lmd-cms-field { border: 0; border-top: 1px solid #F0F1F3; margin: 0; padding: .8rem 0 .2rem; min-width: 0; }
.lmd-cms-field legend { padding: 0; font-weight: 600; font-size: .85rem; color: #1F2937; }
.lmd-cms-field label { margin-bottom: .6rem; }
.lmd-cms-field textarea { resize: vertical; }
.lmd-cms-mod { font-style: normal; font-weight: 600; font-size: .72rem; color: #0E8F9B; background: #E1F7F9; border-radius: 999px; padding: .1em .6em; margin-left: .4rem; }
.lmd-cms-reset { margin-top: .8rem; padding-top: .8rem; border-top: 1px dashed #E5E7EB; font-weight: 500 !important; }
.lmd-cms-photos .lmd-ev-img input[type=file] { width: 100%; font-size: .75rem; }
.lmd-cms > .lmd-btn { margin-top: .4rem; }

/* event registration */
.lmd-settings input[type=number] { width: 100%; padding: .5em .8em; font: inherit; border: 1px solid #D1D5DB; border-radius: 8px; background: #fff; color: var(--ink); }
.lmd-settings input[type=number]:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(14,143,155,.15); }
.lmd-ev-reg-opts { margin-top: .8rem; padding-top: .8rem; border-top: 1px dashed #E5E7EB; }
.lmd-ev-reg-opts[hidden] { display: none; }
.lmd-ev-linklabel { display: block; margin: .2rem 0 .35rem; font-weight: 600; font-size: .85rem; }
.lmd-ev-link { display: flex; gap: .5rem; align-items: stretch; flex-wrap: wrap; }
.lmd-settings .lmd-ev-link input[type=text], .lmd-ev-link input[type=text] { flex: 1 1 260px; min-width: 0; margin: 0; padding: .5em .8em; font: inherit; font-size: .88rem; border: 1px solid #D1D5DB; border-radius: 8px; background: #F9FAFB; color: var(--ink); }
.lmd-ev-link .lmd-btn { white-space: nowrap; }


/* ---- Roles & access ---- */
.lmd-settings.lmd-wide { max-width: none; }
.lmd-settings input[type=password] { width: 100%; padding: .65em 1em; font: inherit; font-weight: 500; border: 1px solid #D1D5DB; border-radius: 8px; background: #fff; box-sizing: border-box; }
.lmd-settings input[type=password]:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(14,143,155,.15); }
.lmd-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 1rem; margin-bottom: .4rem; }
.lmd-roles-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1rem; align-items: start; }
.lmd-roles-cols > .lmd-box { margin-bottom: 1rem; }
.lmd-inline-form { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: 0; }
.lmd-inline-form select { padding: .4em .7em; font: inherit; font-size: .85rem; border: 1px solid #D1D5DB; border-radius: 8px; background: #fff; }
.lmd-inline-form .lmd-btn-sm { margin-top: 0; }
.lmd-matrix th, .lmd-matrix td { text-align: center; }
.lmd-matrix th:first-child, .lmd-matrix td:first-child { text-align: left; }
.lmd-matrix th small { display: block; font-weight: 500; text-transform: none; letter-spacing: 0; color: #6B7280; margin-top: .15rem; }
.lmd-matrix input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; accent-color: var(--brand, #0e8f9a); }
.lmd-matrix tfoot td { border-bottom: 0; }
.lmd-role-secs { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .1rem 1rem; margin: .2rem 0 1rem; }
.lmd-role-secs .lmd-check { margin-bottom: .5rem; }
.lmd-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .8rem; }
.lmd-tiles a { display: flex; align-items: center; gap: .7rem; padding: 1rem 1.1rem; border: 1px solid #E5E7EB; border-radius: 12px; background: #fff; color: var(--ink, #111827); font-weight: 600; text-decoration: none; }
.lmd-tiles a:hover { border-color: var(--brand, #0e8f9a); background: #F0FAFB; }
.lmd-tiles i { display: inline-flex; color: var(--brand, #0e8f9a); }

/* ---- Upcoming birthdays ---- */
.lmd-bd-range { margin-left: .5rem; font-size: .75rem; font-weight: 500; color: #6B7280; }
.lmd-bd-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .5rem; }
.lmd-bd-list a { display: flex; align-items: center; gap: .8rem; padding: .6rem .8rem; border-radius: 10px; background: #F9FAFB; color: #1F2937; text-decoration: none; }
.lmd-bd-list a:hover { background: #F3F4F6; }
.lmd-bd-list li.is-today a { background: #FFF8E1; box-shadow: inset 3px 0 0 #E9A800; }
.lmd-bd-date { flex: none; width: 46px; padding: .3rem 0; text-align: center; border-radius: 8px; background: #fff; border: 1px solid #E5E7EB; line-height: 1.1; }
.lmd-bd-date b { display: block; font-size: 1.1rem; font-weight: 700; }
.lmd-bd-date em { display: block; font-style: normal; font-size: .68rem; font-weight: 600; text-transform: uppercase; color: #6B7280; }
.lmd-bd-who { flex: 1; min-width: 0; }
.lmd-bd-who strong { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lmd-bd-who small { display: block; color: #6B7280; font-size: .75rem; }
.lmd-bd-when { flex: none; font-size: .75rem; font-weight: 600; color: #0E8F9B; white-space: nowrap; }
.lmd-bd-list li.is-today .lmd-bd-when { color: #B07A00; }
.lmd-bd-more { margin: .6rem 0 0; font-size: .8rem; color: #6B7280; }

.lmd-periods { margin: .4rem 0 .6rem; }
.lmd-period-sum small { margin-left: .2rem; }

/* Event detail */
.lmd-ev-open { display: block; }
.lmd-ev-open:hover .lmd-ev-thumb { outline: 2px solid var(--teal, #0E8F9B); outline-offset: 2px; }
.lmd-ev-name { color: inherit; text-decoration: none; }
.lmd-ev-name:hover strong { color: var(--teal, #0E8F9B); text-decoration: underline; }
.lmd-evv { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 1.6rem; align-items: start; }
.lmd-evv-main { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: #F3F4F6; }
.lmd-evv-ph { display: grid; place-items: center; color: #9CA3AF; }
.lmd-evv-thumbs { display: flex; gap: .5rem; margin-top: .6rem; overflow-x: auto; }
.lmd-evv-thumbs button { flex: none; width: 72px; height: 54px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: none; opacity: .75; }
.lmd-evv-thumbs button.on { border-color: var(--teal, #0E8F9B); opacity: 1; }
.lmd-evv-thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lmd-evv-title { margin: .5rem 0 0; font-size: 1.4rem; }
.lmd-evv-sub { margin: .2rem 0 0; color: var(--soft, #6B7280); font-weight: 500; }
.lmd-evv-facts { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1rem; margin: 1rem 0; }
.lmd-evv-facts dt { color: var(--soft, #6B7280); font-weight: 600; font-size: .85rem; }
.lmd-evv-facts dd { margin: 0; font-weight: 600; }
.lmd-evv-desc { margin: 0 0 .8rem; white-space: normal; overflow-wrap: anywhere; }
.lmd-evv-desc-en { color: var(--soft, #6B7280); }
.lmd-evv-share { margin: 1.2rem 0; padding: 1rem; border: 1px solid #E5E7EB; border-radius: 12px; background: #F9FAFB; }
.lmd-evv-share h3 { margin: 0 0 .6rem; font-size: 1rem; }
.lmd-evv-linkrow { display: flex; gap: .5rem; margin-bottom: .7rem; }
.lmd-evv-linkrow input { flex: 1; min-width: 0; padding: .55em .8em; border: 1px solid #D1D5DB; border-radius: 8px; font: inherit; font-size: .85rem; background: #fff; }
.lmd-evv-btns { display: flex; flex-wrap: wrap; gap: .5rem; }
.lmd-evv-fb { background: #1877F2 !important; display: inline-flex; align-items: center; gap: .5rem; }
.lmd-evv-fb:hover { background: #0F5FCC !important; }
.lmd-evv-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
@media (max-width: 820px) { .lmd-evv { grid-template-columns: 1fr; } }

/* Blog */
.lmd-blog-body p { margin: 0 0 .7rem; }
.lmd-blog-body h2 { font-size: 1.05rem; margin: 1rem 0 .4rem; }
.lmd-blog-form textarea[name="body"], .lmd-blog-form textarea[name="body_en"] { min-height: 220px; }
