/* Interim styles for the foundation build. The polished Inertia/React UI replaces these in the MVP phase. */
:root { --ink:#141a2e; --muted:#5b6275; --line:#e2e4ea; --bg:#fbfaf6; --cobalt:#2443c4; --gold:#d6a31c; --red:#c43a2b; }
* { box-sizing: border-box; }
body { margin:0; font:15px/1.5 system-ui,-apple-system,"Segoe UI",sans-serif; color:var(--ink); background:var(--bg); }
.topbar { display:flex; justify-content:space-between; align-items:center; padding:12px 24px; border-bottom:1px solid var(--line); background:#fff; }
.brand { display:flex; align-items:center; gap:10px; text-decoration:none; }
.brand img { height:40px; width:auto; display:block; }
.brand-tag { font-size:12px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:#14183A; background:#F2C230; padding:4px 9px; border-radius:999px; }
.who { color:var(--muted); margin-right:8px; }
.container { max-width:1080px; margin:24px auto; padding:0 16px; }
.card { background:#fff; border:1px solid var(--line); border-radius:12px; padding:20px; margin:16px 0; }
.narrow { max-width:420px; margin:48px auto; }
h1 { font-size:22px; margin:0 0 8px; }
label { display:block; font-weight:600; margin:12px 0 4px; }
label.inline { font-weight:400; }
input, select, textarea { width:100%; padding:9px 11px; border:1px solid var(--line); border-radius:8px; font:inherit; background:#fff; }
input[type=checkbox] { width:auto; }
button, .button { display:inline-block; margin-top:14px; padding:9px 16px; border:0; border-radius:8px; background:var(--cobalt); color:#fff; font:inherit; font-weight:600; cursor:pointer; text-decoration:none; }
button.secondary { background:#fff; color:var(--ink); border:1px solid var(--line); }
button.link { background:none; color:var(--cobalt); padding:0; margin:0; }
.row { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
.muted { color:var(--muted); }
.notice { background:#e7f1fb; padding:10px 14px; border-radius:8px; }
.errors { background:#fbebeb; color:var(--red); padding:10px 14px; border-radius:8px; }
.errors p { margin:0; }
table.list { width:100%; border-collapse:collapse; background:#fff; border:1px solid var(--line); border-radius:12px; overflow:hidden; }
table.list th, table.list td { text-align:left; padding:10px 12px; border-bottom:1px solid var(--line); }
table.list th { font-size:13px; color:var(--muted); font-weight:600; }
.pill { display:inline-block; padding:2px 8px; border-radius:999px; font-size:12px; font-weight:600; background:#f0efec; }
.p-urgent { background:#fbebeb; color:var(--red); } .p-high { background:#f9eeda; }
.s-new, .s-open { background:#e7f1fb; } .s-waiting_on_client { background:#f9eeda; } .s-resolved { background:#e5f4e4; }
.tabs { display:flex; gap:4px; margin-bottom:16px; flex-wrap:wrap; }
.tabs a { padding:6px 12px; border-radius:8px; text-decoration:none; color:var(--muted); }
.tabs a.active { background:#fff; color:var(--ink); border:1px solid var(--line); font-weight:600; }
.message { background:#fff; border:1px solid var(--line); border-radius:12px; padding:14px 16px; margin:12px 0; }
.message.internal { background:#fdf8ea; border-color:#ecd9a0; }
.message header { display:flex; gap:10px; align-items:center; margin-bottom:6px; }
.message time { color:var(--muted); font-size:13px; margin-left:auto; }
.actions { display:flex; gap:24px; flex-wrap:wrap; }
.actions form { display:flex; gap:8px; align-items:end; flex-wrap:wrap; }
.actions select { width:auto; }
@media (max-width:640px) { table.list th:nth-child(3), table.list td:nth-child(3) { display:none; } }

.mainnav { display:flex; gap:4px; margin-right:auto; margin-left:24px; }
.mainnav a { padding:6px 12px; border-radius:8px; text-decoration:none; color:var(--muted); font-weight:600; }
.mainnav a.active { background:#eef1fc; color:var(--cobalt); }
h2 { font-size:17px; margin:12px 0 8px; }
.num { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.neg { color:var(--red); }
.stats { display:grid; grid-template-columns:repeat(auto-fit, minmax(200px, 1fr)); gap:12px; margin:16px 0; }
.stat { background:#fff; border:1px solid var(--line); border-radius:12px; padding:14px 16px; display:flex; flex-direction:column; gap:4px; }
.stat strong { font-size:22px; font-variant-numeric:tabular-nums; }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.grid3 { display:grid; grid-template-columns:repeat(auto-fit, minmax(280px, 1fr)); gap:16px; }
.grid3 .card { margin:0; }
.filters { display:flex; gap:12px; align-items:end; flex-wrap:wrap; margin:12px 0; }
.filters label { font-weight:600; margin:0; }
.filters input, .filters select { width:auto; }
.filters button, .filters .button { margin-top:0; }
.report tr.total td { font-weight:700; border-top:2px solid var(--ink); }
.report tr.grand td { font-size:17px; }
.inactive { opacity:.6; }
.actions-cell { display:flex; gap:12px; flex-wrap:wrap; }
.actions-cell form { margin:0; }
.right { text-align:right; }
table.lines td { padding:6px; }
details > summary { cursor:pointer; font-weight:600; }
@media (max-width:640px) {
  .grid2 { grid-template-columns:1fr; }
  .mainnav { margin-left:8px; }
  .topbar { flex-wrap:wrap; gap:8px; }
  table.list { display:block; overflow-x:auto; }
}
.report table.list { table-layout:fixed; }
.report table.list td.num { width:180px; }
.report table.list th.num { width:180px; }
.actions-cell { display:flex; gap:12px; flex-wrap:wrap; }

/* Branded sign-in screens */
.auth { display:grid; grid-template-columns:1.1fr 1fr; max-width:940px; margin:40px auto; border-radius:20px; overflow:hidden; background:#fff; border:1px solid var(--line); box-shadow:0 18px 50px rgba(20,24,58,.10); }
.auth-brand { background:#2340E0; color:#F7F3EA; padding:44px 40px; display:flex; flex-direction:column; gap:14px; position:relative; overflow:hidden; }
.auth-brand::before { content:""; position:absolute; inset:0; background-image:radial-gradient(rgba(247,243,234,.10) 1.2px, transparent 1.2px); background-size:20px 20px; }
.auth-brand > * { position:relative; }
.auth-brand img { width:220px; height:auto; }
.auth-eyebrow { align-self:flex-start; margin-top:18px; font-size:13px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; color:#14183A; background:#F2C230; padding:6px 12px; border-radius:999px; }
.auth-headline { margin:0; font-size:34px; line-height:1.05; font-weight:800; letter-spacing:-.02em; }
.auth-sub { margin:0; color:rgba(247,243,234,.85); }
.gold { color:#F2C230; }
.auth-card { padding:44px 40px; display:flex; flex-direction:column; justify-content:center; }
.auth-card h1 { font-size:24px; }
@media (max-width:760px) {
  .auth { grid-template-columns:1fr; margin:16px auto; }
  .auth-brand, .auth-card { padding:28px 24px; }
  .auth-headline { font-size:28px; }
  .brand img { height:28px; }
}

/* Photos, videos and screenshots */
.attach { margin-top:12px; }
.attach-drop { position:relative; display:flex; gap:12px; align-items:center; margin:0; padding:14px 16px; border:1.5px dashed #c9cfe0; border-radius:12px; background:#f8f9fd; cursor:pointer; font-weight:400; transition:border-color .15s, background .15s; }
.attach-drop:hover, .attach.is-dragging .attach-drop { border-color:var(--cobalt); background:#eef1fc; }
.attach-drop input[type=file] { position:absolute; width:1px; height:1px; opacity:0; }
.attach-drop:focus-within { outline:2px solid var(--cobalt); outline-offset:2px; }
.attach-icon { width:26px; height:26px; flex:none; color:var(--cobalt); }
.attach-text { display:flex; flex-direction:column; gap:2px; }
.attach-text .muted { font-size:13px; }
.attach-list { list-style:none; margin:10px 0 0; padding:0; display:grid; grid-template-columns:repeat(auto-fill, minmax(230px, 1fr)); gap:8px; }
.attach-list:empty { display:none; }
.attach-item { display:flex; gap:10px; align-items:center; padding:8px; border:1px solid var(--line); border-radius:10px; background:#fff; }
.attach-item.is-error { border-color:#efc2bd; background:#fdf4f3; }
.attach-item.is-error .attach-status { color:var(--red); }
.attach-thumb { width:52px; height:52px; flex:none; border-radius:8px; overflow:hidden; background:#eef0f5; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; color:var(--muted); }
.attach-thumb img, .attach-thumb video { width:100%; height:100%; object-fit:cover; display:block; }
.attach-meta { min-width:0; flex:1; display:flex; flex-direction:column; gap:3px; }
.attach-name { font-size:14px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.attach-status { font-size:12px; }
.attach-item.is-done .attach-status { color:#2b7a3d; }
.attach-bar { height:4px; border-radius:4px; background:#eef0f5; overflow:hidden; }
.attach-bar span { display:block; height:100%; width:0; background:var(--cobalt); transition:width .2s; }
.attach-item.is-done .attach-bar { display:none; }
.attach-remove { margin:0; padding:2px 9px; background:none; color:var(--muted); font-size:20px; line-height:1; }
.attach-remove:hover { color:var(--red); }
button:disabled { opacity:.6; cursor:progress; }

.files { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.file { margin:0; border:1px solid var(--line); border-radius:10px; overflow:hidden; background:#f6f7fa; }
.file-image { display:block; width:140px; height:105px; }
.file-image img { width:100%; height:100%; object-fit:cover; display:block; transition:transform .2s; }
.file-image:hover img { transform:scale(1.04); }
.file-video { width:min(420px, 100%); background:#000; }
.file-video video { width:100%; max-height:320px; display:block; background:#000; }
.file-video figcaption { padding:6px 10px; font-size:13px; background:#fff; color:var(--muted); }
.file-chip { display:flex; flex-direction:column; gap:2px; padding:10px 12px; text-decoration:none; color:var(--ink); max-width:260px; }
.file-name { font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:220px; display:inline-block; vertical-align:bottom; }
.file-chip .muted { font-size:12px; }

.lightbox { padding:0; border:0; border-radius:14px; max-width:min(1100px, 94vw); background:#0e1120; color:#fff; }
.lightbox::backdrop { background:rgba(10,12,24,.78); }
.lightbox img { display:block; max-width:100%; max-height:80vh; margin:0 auto; }
.lightbox-bar { display:flex; gap:16px; align-items:center; padding:10px 14px; flex-wrap:wrap; }
.lightbox-bar a { color:#F2C230; }
.lightbox-bar button { margin:0 0 0 auto; }
.lightbox-name { font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:50%; }
@media (max-width:640px) { .file-image { width:calc(50% - 4px); height:120px; } }
