/* Enzo, 2026-11-13: the front end at http://localhost:2010 (Michael: "copy the socialize the front end. make it localhost 2010").
   Same screen layout as his reference: a top bar, a left menu with a workspace card, two action buttons and
   menu groups, and the page on the right. Written by us: our own code, logo, name, font, colors and wording.
   Loaded by the four new pages (home, calendar, media, accounts) and, on port 2010 only, by shell.js for the
   six older pages. Port 1010 does not load this file. */
:root {
  --bg: #f6f7f9; --card: #ffffff; --line: #e3e7ec; --ink: #101828; --muted: #5b6676;
  --accent: #F68620; --accent-dark: #9a3412; --accent-soft: #fff1e0; --on-accent: #1a1206;
  --ok: #15803d; --bad: #b42318; --top: 60px; --side: 248px;
}
body.mt2 { margin: 0; padding: var(--top) 0 0 0 !important; background: var(--bg); color: var(--ink);
  font: 15px/1.45 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; }
body.mt2 * { box-sizing: border-box; }
body.mt2 header > img, body.mt2 a.back, body.mt2 #mt-side { display: none !important; }

/* Top bar */
#mt2-top { position: fixed; top: 0; left: 0; right: 0; height: var(--top); z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 0 18px; background: var(--card); border-bottom: 1px solid var(--line); }
#mt2-top .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
#mt2-top .brand img { width: 34px; height: 34px; }
#mt2-top .grow { flex: 1; }
#mt2-top .hello { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#mt2-top .hello b { color: var(--ink); font-weight: 600; }
#mt2-top a.pill, #mt2-top button.pill { font: inherit; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; min-height: 38px;
  padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background-color .16s ease; }
#mt2-top a.pill:hover, #mt2-top button.pill:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16, 24, 40, .10); }
#mt2-top a.pill.main { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
#mt2-top a.pill.main:hover { box-shadow: 0 6px 18px rgba(246, 134, 32, .40); }
#mt2-top #mt2-menu { display: none; padding: 0; width: 40px; justify-content: center; }

/* Left menu */
#mt2-side { position: fixed; top: var(--top); bottom: 0; left: 0; width: var(--side); z-index: 15; display: flex; flex-direction: column;
  padding: 14px 12px 16px; background: var(--card); border-right: 1px solid var(--line); overflow-y: auto; }
#mt2-side .space-card { width: 100%; font: inherit; color: inherit; text-align: left; background: var(--card); cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
#mt2-side .space-card img { width: 36px; height: 36px; border-radius: 10px; flex: none; }
#mt2-side .space-card .n { font-weight: 700; font-size: 14px; line-height: 1.2; overflow-wrap: anywhere; }
#mt2-side .space-card .s { font-size: 12px; color: var(--muted); }
#mt2-side .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 14px; }
#mt2-side .acts a { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; border-radius: 999px; font-weight: 700; font-size: 14px;
  text-decoration: none; border: 1px solid var(--line); color: var(--ink); background: var(--card);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
#mt2-side .acts a.main { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
#mt2-side .acts a:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16, 24, 40, .10); border-color: var(--accent); }
#mt2-side .acts a.main:hover { box-shadow: 0 6px 18px rgba(246, 134, 32, .40); }
#mt2-side .group { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 12px; margin: 16px 0 4px; }
#mt2-side a.item { position: relative; display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 8px 12px; margin-bottom: 2px; border-radius: 10px;
  color: #4b5563; font-weight: 600; font-size: 14px; text-decoration: none; transition: background-color .18s ease, color .18s ease, transform .18s ease; }
#mt2-side a.item svg { flex: none; transition: transform .18s ease; }
#mt2-side a.item:hover { background: var(--accent-soft); color: var(--accent-dark); transform: translateX(3px); }
#mt2-side a.item:hover svg { transform: scale(1.12); }
#mt2-side a.item[aria-current=page] { background: var(--accent-soft); color: var(--accent-dark); }
#mt2-side a.item[aria-current=page]::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--accent); }
#mt2-side .fill { flex: 1; min-height: 14px; }
#mt2-side .foot { font-size: 12px; color: var(--muted); padding: 0 12px; }
#mt2-shade { display: none; }

@media (min-width: 1000px) { body.mt2 { padding-left: var(--side) !important; } }
@media (max-width: 999px) {
  #mt2-top #mt2-menu { display: inline-flex; }
  #mt2-top .hello { display: none; }
  #mt2-side { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 12px 32px rgba(16, 24, 40, .18); }
  body.mt2-open #mt2-side { transform: none; }
  body.mt2-open #mt2-shade { display: block; position: fixed; inset: var(--top) 0 0 0; z-index: 12; background: rgba(16, 24, 40, .35); }
}
:focus-visible { outline: 3px solid rgba(246, 134, 32, .55); outline-offset: 2px; }

/* Page parts used by the four new pages (class names start with p-). */
.p-wrap { max-width: 1240px; margin: 0 auto; padding: 26px 22px 48px; }
.p-head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.p-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -.01em; margin: 0; flex: 1; min-width: 200px; }
.p-head h1 small { display: block; font-size: 14px; font-weight: 400; color: var(--muted); letter-spacing: 0; margin-top: 2px; }
.p-btn { font: inherit; font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 18px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background-color .16s ease; }
.p-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16, 24, 40, .10); border-color: var(--accent); }
.p-btn:active:not(:disabled) { transform: scale(.98); box-shadow: none; }
.p-btn.main { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.p-btn.main:hover { box-shadow: 0 6px 18px rgba(246, 134, 32, .40); }
.p-btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-dark); }
.p-btn.small { min-height: 34px; padding: 0 14px; font-weight: 600; }
.p-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease; }
a.p-card { display: block; color: inherit; text-decoration: none; }
a.p-card:hover, .p-card.lift:hover { box-shadow: 0 8px 22px rgba(16, 24, 40, .09); transform: translateY(-2px); border-color: var(--accent); }
.p-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.p-tile .n { font-size: 30px; font-weight: 700; margin: 4px 0 0; font-variant-numeric: tabular-nums; }
.p-muted { color: var(--muted); font-size: 13px; }
.p-h2 { font-size: 17px; font-weight: 700; margin: 26px 0 10px; }
.p-badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; border-radius: 6px; padding: 1px 7px; background: #eef1f4; color: #414b5a; vertical-align: middle; }
.p-badge.demo { background: var(--accent-soft); color: var(--accent-dark); }
.p-badge.ok { background: #dcfce7; color: #166534; }
.p-badge.bad { background: #fee4e2; color: var(--bad); }
.p-badge.wait { background: #e0edff; color: #1d4ed8; }
.p-badge.review { background: #fff1e0; color: #9a3412; }
.p-rows { display: grid; gap: 8px; }
.p-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.p-row .when { font-variant-numeric: tabular-nums; min-width: 150px; color: var(--muted); font-size: 13px; }
.p-row .what { flex: 1; min-width: 200px; overflow-wrap: anywhere; }
.p-empty { text-align: center; padding: 44px 16px; color: var(--muted); }
.p-empty .big { font-size: 19px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.p-error { color: var(--bad); margin: 10px 0; }
.p-chips { display: flex; gap: 8px; flex-wrap: wrap; }

/* Movement only, never opacity: a page opened in a hidden tab must still be readable. */
@keyframes mt2-rise { from { transform: translateY(8px); } to { transform: none; } }
.p-wrap > * { animation: mt2-rise .28s ease both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .p-btn:hover, a.p-card:hover, .p-card.lift:hover, #mt2-side a.item:hover, #mt2-side .acts a:hover, #mt2-top .pill:hover { transform: none !important; }
}

/* Enzo, 2026-11-13: account switch under the workspace card, and Sign out at the foot of the menu. */
#mt2-side .space-card:disabled { cursor: default; }
#mt2-side .space-card:not(:disabled):hover { border-color: var(--accent); }
#mt2-orgs { display: grid; gap: 4px; margin-top: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); box-shadow: 0 8px 22px rgba(16, 24, 40, .09); }
#mt2-orgs[hidden] { display: none; }
#mt2-orgs button { font: inherit; font-size: 14px; font-weight: 600; text-align: left; min-height: 38px; padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; }
#mt2-orgs button:hover { background: var(--accent-soft); color: var(--accent-dark); }
#mt2-orgs button.on { color: var(--accent-dark); }
#mt2-side button.out { font: inherit; font-size: 13px; font-weight: 600; text-align: left; min-height: 36px; padding: 6px 12px; margin-bottom: 6px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
#mt2-side button.out:hover { background: #fee4e2; color: var(--bad); }

/* Enzo, 2026-11-16 (Python version): form fields of our own pages (New post, Settings, Accounts). */
.p-form { display: grid; gap: 14px; max-width: 760px; }
.p-form label, .p-form legend { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.p-form fieldset { border: 0; padding: 0; margin: 0; }
.p-input { font: inherit; width: 100%; min-height: 42px; padding: 8px 12px; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
textarea.p-input { min-height: 140px; resize: vertical; }
.p-input:focus-visible { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
.p-checks { display: flex; gap: 8px; flex-wrap: wrap; }
.p-checks label { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; margin: 0; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; }
.p-note { background: var(--accent-soft); color: var(--accent-dark); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.p-ok { color: #166534; margin: 10px 0; }

/* the hidden attribute wins over the display of buttons and forms */
.p-btn[hidden], .p-form[hidden], .p-card[hidden] { display: none; }
