/* Medialab theme — the look of the MediaLaboratory FileMaker solution, carried into the web:
   black navigation column on the left, black bar on top, white work area with hairline frames,
   Helvetica throughout, and the coloured monospace medium badges (IMAGE yellow, VIDEO red, TEXT green).
   Loaded after app.css (core). Only project styling lives here. */

:root {
  --f: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, "Courier New", monospace;
  --bar: #000;            /* sidebar and top bar */
  --bar-2: #1c1c1c;       /* hover in the bars */
  --bar-text: #f2f2f2;
  --bar-muted: #9a9a9a;
  --accent: #46d2b0;      /* the green-blue of "Click here to select" in FileMaker */
  --frame: #000;          /* frames around panes */
  --hair: #d4d4d4;        /* rows inside panes */
  --wash: #f4f4f2;        /* quiet backgrounds */
  --m-image: #f5b400; --m-image-ink: #000;
  --m-video: #e0322b; --m-video-ink: #fff;
  --m-text:  #1d9a50; --m-text-ink:  #fff;
  --m-audio: #2a66d9; --m-audio-ink: #fff;
  --sidebar: 212px;
  --topbar: 60px;
}

body { font: 400 14px/1.45 var(--f); letter-spacing: 0; }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.005em; }
h1 { font-size: 26px; }
h2 { font-size: 19px; }
h3 { font-size: 14px; }
code, .mono { font-family: var(--mono); font-size: .92em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- shell */
body.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  background: var(--bar); color: var(--bar-text);
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column;
}
.wordmark {
  display: flex; align-items: center; gap: 10px; height: var(--topbar); padding: 0 20px;
  font-weight: 700; font-size: 17px; letter-spacing: -0.01em; white-space: nowrap;
}
.wordmark:hover { text-decoration: none; }
.wordmark .burger { font-size: 20px; line-height: 1; font-weight: 400; }
.sidenav { display: flex; flex-direction: column; padding: 14px 0 20px; }
.sidenav .group { padding: 16px 20px 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--bar-muted); }
.sidenav a { display: block; padding: 6px 20px 6px 17px; border-left: 3px solid transparent; font-size: 13.5px; }
.sidenav a:hover { background: var(--bar-2); text-decoration: none; }
.sidenav a[aria-current="page"] { border-left-color: var(--accent); color: var(--accent); font-weight: 700; }
.sidefoot { margin-top: auto; padding: 16px 20px 20px; border-top: 1px solid #262626; font-size: 12.5px; color: var(--bar-muted); }
.sidefoot .who { color: var(--bar-text); font-weight: 700; margin-bottom: 6px; }
.sidefoot a { display: block; padding: 3px 0; }
.sidefoot a[aria-current="page"] { color: var(--accent); }
.sidefoot .version { margin-top: 10px; font-family: var(--mono); font-size: 11px; color: #6c6c6c; }

.workspace { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  background: var(--bar); color: var(--bar-text); height: var(--topbar);
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 28px; padding: 0 24px;
}
.topbar .section-title { font-size: 18px; font-weight: 700; margin: 0; white-space: nowrap; min-width: 170px; }
.gsearch { flex: 0 1 340px; position: relative; }
.gsearch input {
  width: 100%; height: 32px; padding: 0 30px 0 32px; border: 1px solid #bdbdbd; border-radius: 3px;
  background: #000; color: #fff; font: 13px var(--f);
}
.gsearch input::placeholder { color: #9a9a9a; }
.gsearch input:focus { outline: none; border-color: var(--accent); }
.gsearch .icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: #bdbdbd; pointer-events: none; }
.cursel { margin-left: auto; text-align: right; font-size: 12px; line-height: 1.35; }
.cursel b { display: block; color: var(--bar-text); }
.cursel a { color: var(--accent); }
.menu-btn { display: none; background: none; border: 0; color: #fff; font-size: 22px; padding: 0; cursor: pointer; }

.flash { background: var(--accent); color: #000; padding: 10px 24px; font-weight: 700; border: 0; }
.workspace .page { padding: 28px 32px 40px; }

/* ---------------------------------------------------------------- panes (the framed boxes of the FileMaker layouts) */
.pane-title { font-size: 19px; font-weight: 700; margin: 0 0 6px; }
.pane { border: 1px solid var(--frame); background: #fff; }
.pane + .pane-title { margin-top: 28px; }
.pane .row { display: flex; align-items: center; gap: 14px; padding: 9px 12px; border-bottom: 1px solid var(--hair); }
.pane .row:last-child { border-bottom: 0; }
.pane .row .n { margin-left: auto; font-family: var(--mono); font-weight: 700; }
.pane .note { padding: 12px; color: var(--ink-2); font-size: 13px; }

/* ---------------------------------------------------------------- medium badges */
.badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 54px; height: 20px; padding: 0 6px;
  font: 700 11px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase;
  background: #e6e6e6; color: #000;
}
.badge.image { background: var(--m-image); color: var(--m-image-ink); }
.badge.video { background: var(--m-video); color: var(--m-video-ink); }
.badge.text  { background: var(--m-text);  color: var(--m-text-ink); }
.badge.audio { background: var(--m-audio); color: var(--m-audio-ink); }
.code { font-family: var(--mono); font-weight: 700; font-size: 13px; }   /* MLB-1, PPL-3, CIN-7, RSS-2 */

/* ---------------------------------------------------------------- controls (FileMaker style: square black buttons, framed fields) */
.btn { border-radius: 0; font: 700 13px var(--f); padding: 9px 18px; }
.btn.ghost { border: 1px solid #000; }
.field label { font-size: 12px; font-weight: 700; color: #000; margin-bottom: 4px; }
input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=search], input[type=number], select, textarea {
  background: #fff; border: 1px solid #8c8c8c; border-radius: 2px; font: 14px var(--f);
}
input[type=text]:focus, input[type=password]:focus, input[type=email]:focus, input[type=url]:focus, input[type=search]:focus, select:focus, textarea:focus {
  border-color: #000; box-shadow: 0 0 0 2px var(--accent); outline: none;
}
.pagehead { border-bottom: 0; padding-bottom: 0; margin-bottom: 18px; }
.empty { border: 1px dashed #000; background: var(--wash); }

/* ---------------------------------------------------------------- start page */
.home-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: start; max-width: 1100px; }
.media-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--frame); }
.media-tiles > div { padding: 14px 12px 12px; border-right: 1px solid var(--hair); }
.media-tiles > div:last-child { border-right: 0; }
.media-tiles .big { display: block; font: 700 30px/1.1 var(--mono); margin-top: 12px; }

/* ---------------------------------------------------------------- login */
.login-ml { min-height: 100vh; background: var(--bar); color: var(--bar-text); display: grid; grid-template-rows: auto 1fr auto; padding: 0 0 0 0; }
.login-ml header { height: var(--topbar); display: flex; align-items: center; gap: 10px; padding: 0 28px; font-weight: 700; font-size: 17px; }
.login-ml header .burger { font-size: 20px; font-weight: 400; }
.login-ml .center { display: grid; place-items: center; padding: 24px 20px 64px; }
.login-ml .center form { width: 100%; max-width: 400px; }
.login-ml form { background: #fff; color: #000; padding: 28px 28px 30px; border-top: 4px solid var(--accent); }
.login-ml form h2 { margin-bottom: 18px; }
.login-ml form input[type=text], .login-ml form input[type=password] { width: 100%; height: 38px; padding: 0 10px; }
.login-ml form .btn { width: 100%; margin-top: 6px; padding: 11px; }
.login-ml footer { padding: 16px 28px; font-size: 12px; color: #6c6c6c; border-top: 1px solid #1f1f1f; }

/* ---------------------------------------------------------------- import page */
.import-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; align-items: start; max-width: 1200px; }
.pane.pad { padding: 16px 16px 6px; margin-bottom: 28px; }
.pane .kv { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--hair); }
.warnbox { display: block; background: #fff6d6; border: 1px solid var(--m-image); padding: 8px 10px; margin: 4px 0 12px; }
.report ul { margin: 6px 0 14px; padding-left: 18px; } .report li { margin: 3px 0; } .report h3 { margin-top: 6px; }
.pane .row .code { min-width: 74px; }
@media (max-width: 1100px) { .import-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- installer (no menu yet) */
.bare-top { background: var(--bar); color: var(--bar-text); height: var(--topbar); display: flex; align-items: center; gap: 24px; padding: 0 28px; }
.bare-top .wm { font-weight: 700; font-size: 17px; }
.bare-top .here { color: var(--bar-muted); }
.bare-top a.lang { margin-left: auto; color: var(--accent); font-size: 13px; }
.bare-main { padding: 32px 28px 48px; max-width: 900px; }
.bare-main .pagehead { border-bottom: 1px solid #000; padding-bottom: 14px; }
.bare-main table.list td { padding: 9px 12px 9px 0; }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 1100px) {
  .home-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  body.shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; }
  .sidebar.open::after { content: ""; position: fixed; top: 0; bottom: 0; left: 260px; width: 100vw; background: rgba(0,0,0,.45); }
  .topbar { z-index: 30; }
  .menu-btn { display: block; }
  .topbar { gap: 14px; padding: 0 16px; }
  .topbar .section-title { min-width: 0; font-size: 16px; }
  .cursel { display: none; }
  .gsearch { flex: 1 1 auto; }
  .workspace .page { padding: 20px 16px 32px; }
  .media-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .media-tiles > div:nth-child(2) { border-right: 0; }
  .media-tiles > div:nth-child(-n+2) { border-bottom: 1px solid var(--hair); }
}
