/* Mediagraam Client Portal — web app styles */
:root {
	--navy: #0A2342; --deep: #061529; --orange: #F7941D; --orange-2: #FFB347; --orange-d: #E07B00;
	--ink: #13213C; --muted: #66758C; --line: #E4E9F1; --soft: #F4F6FA; --card: #fff;
	--grad: linear-gradient(135deg, #F7941D, #FFB347);
	--f-head: "Outfit", system-ui, sans-serif; --f-body: "Inter", system-ui, sans-serif;
	--r: 16px; --shadow: 0 18px 40px -22px rgba(10,35,66,.35);
}
* { box-sizing: border-box; }
html, body.mgp-body { margin: 0; background: var(--soft); color: var(--ink); font: 15px/1.55 var(--f-body); -webkit-font-smoothing: antialiased; }
body.mgp-body { min-height: 100vh; display: flex; flex-direction: column; }
.mgp-body a { color: inherit; text-decoration: none; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 6px; }

/* Buttons */
.mgp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: 999px; border: 0; background: var(--grad); color: #fff !important; font: 600 14px var(--f-head); box-shadow: 0 10px 22px -12px rgba(247,148,29,.9); white-space: nowrap; transition: transform .2s; }
.mgp-btn:hover { transform: translateY(-1px); }
.mgp-btn--ghost { background: #fff; color: var(--navy) !important; border: 1.5px solid var(--line); box-shadow: none; }
.mgp-btn--green { background: #1A9E5C; box-shadow: 0 10px 22px -12px rgba(26,158,92,.9); }
.mgp-btn--red { background: #fff; color: #C62828 !important; border: 1.5px solid #F3C1C3; box-shadow: none; }
.mgp-btn[disabled] { opacity: .6; pointer-events: none; }
.mgp-iconbtn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-size: 20px; color: var(--navy); }
.mgp-chipbtn { padding: 7px 14px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font: 600 13px var(--f-head); color: var(--navy); }
.mgp-link { font-weight: 600; font-size: 13px; color: rgba(255,255,255,.8) !important; }
.mgp-link:hover { color: var(--orange-2) !important; }

/* Top bar */
.mgp-app { flex: 1; display: flex; flex-direction: column; }
.mgp-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px clamp(14px, 3vw, 28px); background: var(--navy); color: #fff; box-shadow: 0 6px 20px -12px rgba(0,0,0,.5); }
.mgp-top__brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.mgp-logo { display: flex; align-items: center; background: #fff; border-radius: 10px; padding: 4px 8px; }
.mgp-logo img, .mgp-logo-img, .mgp-logo .custom-logo { height: 34px; width: auto; display: block; }
.mgp-wordmark { font: 800 18px var(--f-head); color: var(--navy); letter-spacing: .02em; }
.mgp-wordmark b { color: var(--orange); }
.mgp-top__title { font: 600 15px var(--f-head); opacity: .9; white-space: nowrap; }
.mgp-top__user { display: flex; align-items: center; gap: 14px; }
.mgp-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); font: 700 15px var(--f-head); color: #fff; }
.mgp-top__name { display: flex; flex-direction: column; line-height: 1.2; font-weight: 600; font-size: 14px; }
.mgp-top__name small { font-weight: 400; opacity: .7; font-size: 12px; }

/* Toolbar */
.mgp-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 20px clamp(14px, 3vw, 28px) 10px; }
.mgp-bar__left, .mgp-bar__right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mgp-month { margin: 0; font: 800 clamp(22px, 3vw, 30px)/1.1 var(--f-head); color: var(--navy); letter-spacing: -.02em; min-width: 190px; }
.mgp-nav { display: flex; gap: 6px; align-items: center; }
.mgp-clientsel select { appearance: none; padding: 9px 36px 9px 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%230A2342' stroke-width='1.8' fill='none'/%3E%3C/svg%3E") right 12px center no-repeat; font: 600 14px var(--f-head); color: var(--navy); max-width: 280px; }
.mgp-clientpill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font: 600 14px var(--f-head); color: var(--navy); }
.mgp-clientpill::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.mgp-toggle { display: flex; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.mgp-toggle button { border: 0; background: none; padding: 6px 14px; border-radius: 8px; font: 600 13px var(--f-head); color: var(--muted); }
.mgp-toggle button.is-active { background: var(--navy); color: #fff; }

/* Status + platform filters */
.mgp-stats, .mgp-plats { display: flex; gap: 8px; overflow-x: auto; padding: 4px clamp(14px, 3vw, 28px); scrollbar-width: none; }
.mgp-stats::-webkit-scrollbar, .mgp-plats::-webkit-scrollbar { display: none; }
.mgp-stat { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font: 500 13px var(--f-body); color: var(--ink); }
.mgp-stat i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.mgp-stat b { font: 700 14px var(--f-head); color: var(--navy); }
.mgp-stat.is-active { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.mgp-plats { padding-bottom: 14px; }
.mgp-plat { flex: none; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 12px; font-weight: 600; color: var(--muted); }
.mgp-plat::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 6px; }
.mgp-plat.is-active { background: var(--c); border-color: var(--c); color: #fff; }
.mgp-plat.is-active::before { background: #fff; }

/* Layout */
.mgp-main { display: grid; grid-template-columns: 1fr 300px; gap: 20px; padding: 0 clamp(14px, 3vw, 28px) 28px; align-items: start; }
.mgp-cal { min-width: 0; }

/* Month grid */
.mgp-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--line); gap: 1px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.mgp-dow { background: var(--navy); color: #fff; font: 600 12px var(--f-head); text-transform: uppercase; letter-spacing: .1em; text-align: center; padding: 10px 4px; }
.mgp-day { background: #fff; min-height: 128px; padding: 8px 6px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.mgp-day.is-out { background: #FAFBFD; }
.mgp-day.is-past .mgp-day__head span { color: #A7B1C2; }
.mgp-day__head { display: flex; justify-content: space-between; align-items: center; }
.mgp-day__head span { font: 700 13px var(--f-head); color: var(--navy); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.mgp-day.is-today .mgp-day__head span { background: var(--orange); color: #fff; }
.mgp-add { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; color: var(--muted); font-weight: 700; opacity: 0; transition: .2s; }
.mgp-day:hover .mgp-add { opacity: 1; background: var(--soft); }
.mgp-add:hover { background: var(--orange) !important; color: #fff; }

/* Post chips */
.mgp-chip { position: relative; display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; border: 0; border-radius: 8px; padding: 5px 7px 5px 10px; background: color-mix(in srgb, var(--s) 10%, #fff); color: var(--ink); font-size: 12px; line-height: 1.3; transition: transform .15s, box-shadow .15s; overflow: hidden; }
.mgp-chip::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--s); }
.mgp-chip:hover { transform: translateY(-1px); box-shadow: 0 6px 14px -8px rgba(10,35,66,.5); }
.mgp-chip__top { display: flex; justify-content: space-between; gap: 4px; align-items: center; }
.mgp-chip__time { font-weight: 600; color: var(--muted); font-size: 11px; white-space: nowrap; }
.mgp-chip__plats { display: flex; gap: 2px; }
.mgp-chip__plats i { font-style: normal; font: 700 9px/1 var(--f-head); color: #fff; background: var(--p); border-radius: 4px; padding: 3px 3px; }
.mgp-chip__title { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mgp-chip.is-wide { padding: 10px 12px 10px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); font-size: 13.5px; }
.mgp-chip.is-wide .mgp-chip__title { font-size: 14px; -webkit-line-clamp: 3; }
.mgp-chip__meta { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 3px; }
.mgp-chip__meta em { font-style: normal; font-weight: 600; color: #fff; background: var(--s); padding: 1px 8px; border-radius: 999px; font-size: 11px; }
.mgp-chip.is-hidden { display: none; }

/* List view */
.mgp-list { display: grid; gap: 12px; }
.mgp-agenda { display: grid; grid-template-columns: 64px 1fr; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px; box-shadow: var(--shadow); }
.mgp-agenda.is-hidden { display: none; }
.mgp-agenda__date { text-align: center; background: var(--soft); border-radius: 12px; padding: 8px 4px; align-self: start; }
.mgp-agenda__date b { display: block; font: 800 24px/1 var(--f-head); color: var(--navy); }
.mgp-agenda__date span { font-size: 12px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.mgp-agenda__items { display: grid; gap: 8px; }
.mgp-none { padding: 40px; text-align: center; color: var(--muted); background: #fff; border-radius: var(--r); border: 1px dashed var(--line); }

/* Sidebar */
.mgp-side { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); position: sticky; top: 76px; display: grid; gap: 10px; }
.mgp-side h2 { margin: 8px 0 2px; font: 700 13px var(--f-head); text-transform: uppercase; letter-spacing: .12em; color: var(--orange-d); }
.mgp-side h2:first-child { margin-top: 0; }
.mgp-muted { color: var(--muted); font-size: 13px; margin: 0; }
.mgp-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mgp-feed li { font-size: 13px; border-left: 2px solid var(--line); padding-left: 10px; }
.mgp-feed a:hover { color: var(--orange-d); }
.mgp-feed small { display: block; color: var(--muted); font-size: 11.5px; }
.mgp-legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 12px; color: var(--muted); }
.mgp-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); margin-right: 6px; vertical-align: -1px; }

/* Modal */
.mgp-modal { position: fixed; inset: 0; z-index: 100; display: flex; justify-content: flex-end; }
.mgp-modal[hidden] { display: none; }
.mgp-modal__backdrop { position: absolute; inset: 0; background: rgba(6,21,41,.55); animation: mgpFade .2s; }
.mgp-modal__panel { position: relative; width: min(560px, 100%); height: 100%; background: #fff; overflow-y: auto; box-shadow: -20px 0 50px -20px rgba(0,0,0,.5); animation: mgpSlide .28s cubic-bezier(.2,.7,.2,1); }
.mgp-modal__x { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--soft); font-size: 22px; color: var(--navy); z-index: 2; }
.mgp-modal__body { padding: 26px 26px 40px; }
@keyframes mgpFade { from { opacity: 0; } }
@keyframes mgpSlide { from { transform: translateX(40px); opacity: 0; } }
.mgp-d-client { display: inline-flex; align-items: center; gap: 8px; font: 600 13px var(--f-head); color: var(--muted); }
.mgp-d-client::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.mgp-d-title { margin: 8px 40px 6px 0; font: 800 24px/1.2 var(--f-head); color: var(--navy); }
.mgp-d-when { color: var(--muted); font-weight: 500; margin: 0 0 14px; }
.mgp-d-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.mgp-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--soft); color: var(--ink); }
.mgp-badge--status { background: var(--s); color: #fff; }
.mgp-badge--plat { background: var(--p); color: #fff; }
.mgp-d-thumb { width: 100%; border-radius: 14px; margin-bottom: 16px; display: block; }
.mgp-d-sec { margin: 18px 0 0; }
.mgp-d-sec h3 { margin: 0 0 8px; font: 700 12px var(--f-head); text-transform: uppercase; letter-spacing: .12em; color: var(--orange-d); }
.mgp-d-caption { white-space: pre-wrap; background: var(--soft); border-radius: 12px; padding: 14px 16px; margin: 0; font-size: 14.5px; }
.mgp-d-tags { color: #2D6CDF; font-weight: 500; margin: 8px 0 0; }
.mgp-d-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 13px; }
.mgp-d-meta div { background: var(--soft); border-radius: 10px; padding: 10px 12px; }
.mgp-d-meta b { display: block; font: 600 11px var(--f-head); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.mgp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; padding: 16px; border-radius: 14px; background: color-mix(in srgb, var(--orange) 8%, #fff); border: 1px solid color-mix(in srgb, var(--orange) 30%, #fff); }
.mgp-actions p { width: 100%; margin: 0; font-weight: 600; color: var(--navy); }
.mgp-actions select { padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); font: 600 14px var(--f-head); }
.mgp-comments { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mgp-comments li { background: var(--soft); border-radius: 12px 12px 12px 4px; padding: 10px 14px; font-size: 14px; max-width: 92%; }
.mgp-comments li.is-team { background: color-mix(in srgb, var(--navy) 8%, #fff); justify-self: end; border-radius: 12px 12px 4px 12px; }
.mgp-comments small { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 2px; font-weight: 600; }
.mgp-comments p { margin: 0; white-space: pre-wrap; }
.mgp-reply { display: grid; gap: 8px; margin-top: 10px; }
.mgp-reply textarea { width: 100%; min-height: 84px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); font: inherit; resize: vertical; }
.mgp-reply textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(247,148,29,.15); }
.mgp-reply__row { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.mgp-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13px; }
.mgp-log li { border-left: 2px solid var(--line); padding-left: 10px; }
.mgp-log small { color: var(--muted); display: block; }
.mgp-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 12px; font-weight: 600; z-index: 200; box-shadow: var(--shadow); }
.mgp-toast.is-error { background: #C62828; }

/* Login */
.mgp-login { flex: 1; display: grid; place-items: center; padding: 40px 16px; background: radial-gradient(900px 500px at 85% -10%, rgba(247,148,29,.28), transparent 60%), linear-gradient(160deg, var(--navy), var(--deep)); }
.mgp-login__card { width: min(420px, 100%); background: #fff; border-radius: 22px; padding: 34px 30px; box-shadow: 0 40px 80px -30px rgba(0,0,0,.6); }
.mgp-login__logo { display: flex; justify-content: center; margin-bottom: 14px; }
.mgp-login__logo img { height: 56px; width: auto; }
.mgp-login h1 { text-align: center; margin: 0 0 6px; font: 800 26px var(--f-head); color: var(--navy); }
.mgp-login__card > p { text-align: center; color: var(--muted); margin: 0 0 20px; }
.mgp-login form p { margin: 0 0 14px; }
.mgp-login label { display: block; font: 600 13px var(--f-head); color: var(--navy); margin-bottom: 5px; }
.mgp-login input[type=text], .mgp-login input[type=password] { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--soft); font: inherit; }
.mgp-login input:focus { outline: none; border-color: var(--orange); background: #fff; }
.mgp-login .login-remember label { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.mgp-login input[type=submit] { width: 100%; padding: 13px; border: 0; border-radius: 999px; background: var(--grad); color: #fff; font: 700 15px var(--f-head); cursor: pointer; }
.mgp-login__help { text-align: center; font-size: 13px; margin: 6px 0 0 !important; }
.mgp-login__help a { color: var(--orange-d); font-weight: 600; }
.mgp-empty-state { max-width: 520px; margin: 80px auto; text-align: center; background: #fff; padding: 40px; border-radius: 22px; box-shadow: var(--shadow); }
.mgp-foot { text-align: center; font-size: 12px; color: var(--muted); padding: 14px; }
.mgp-foot a { color: var(--orange-d); font-weight: 600; }
.mgp-install { display: none; }
.mgp-install.is-ready { display: inline-flex; }

/* Responsive */
@media (max-width: 1100px) {
	.mgp-main { grid-template-columns: 1fr; }
	.mgp-side { position: static; }
}
@media (max-width: 760px) {
	.mgp-top__title, .mgp-top__name small { display: none; }
	.mgp-top__name { font-size: 13px; }
	.mgp-logo img, .mgp-logo-img, .mgp-logo .custom-logo { height: 28px; }
	.mgp-month { min-width: 0; }
	/* Phones: agenda list instead of month grid */
	.mgp-grid { display: none !important; }
	.mgp-list { display: grid !important; }
	.mgp-toggle { display: none; }
	.mgp-modal__body { padding: 22px 18px 36px; }
	.mgp-d-meta { grid-template-columns: 1fr; }
}
