/* The mast, the nav, the user bar, the role badge and the preview switch are ALL provided by
 * base-styles.css, which this page loads first. They were duplicated here and the copies
 * drifted, so they were removed. Do not reinstate them: if a nav change is needed it belongs
 * in base-styles.css so all four pages get it.
 *
 * testing/frontend/test-css-contract.mjs fails if any of them reappears here. */
/* ---- undo the builder's fixed-viewport layout ---------------------------------------
   shared-styles.css is the Form Builder stylesheet and is written for a fixed-height
   application: `html, body { height:100%; overflow:hidden }`. These pages are ordinary
   documents, so inheriting that stops them scrolling entirely. Adding the shared
   stylesheet without this override broke both pages on 26 September 2026.
   If chat-styles.css is ever split into a shared base and a chat layout, this block
   should go with the chat layout and be deleted from here. */
html, body {
    height: auto;
    min-height: 100%;
    overflow: auto;
}
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');
* { box-sizing: border-box; margin: 0; padding: 0; }

:root { --bg: #f3f2f1; --surface: #fff; --border: #b1b4b6; --text: #0b0c0c; --text-muted: #505a5f; --accent: #386193; --input-bg: #fff; --heading: #0e335b; --error: #d32f2f; --file-bg: #fafafa; }
[data-theme="dark"] { --bg: #181b20; --surface: #2d333b; --border: #444c56; --text: #f0f3f6; --text-muted: #b1bac4; --accent: #7ba7d4; --input-bg: #2a2f37; --heading: #7ba7d4; --error: #f85149; --file-bg: #2d333b; color-scheme:dark; }
[data-theme="dark"] #mast { box-shadow:0 2px 4px rgba(0,0,0,.3); }
[data-theme="dark"] h2 { color:#7ba7d4; }
[data-theme="dark"] .btn-primary { background:#7ba7d4; color:#181b20; }
[data-theme="dark"] .btn-secondary { background:#2d333b; color:#f0f3f6; border-color:#444c56; }

body {
  font-family: 'Roboto', sans-serif;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background 0.2s, color 0.2s;
}

img { max-width: 100%; height: 60px; display: block; }





main { max-width: 1400px; margin: 32px auto; padding: 0 24px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 32px;
}

.card h2 { color: var(--heading); margin-bottom: 8px; font-size: 1.3rem; }
.card p { color: var(--text-muted); margin-bottom: 16px; line-height: 1.5; }

.input-group { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.input-group label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 4px; width: 100%; color: var(--text); }
.input-group input {
  flex: 1;
  min-width: 200px;
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: 4px;
  font-size: 1rem;
  font-family: monospace;
  background: var(--input-bg);
  color: var(--text);
}
.input-group input:focus { outline: 3px solid #e2ca76; border-color: var(--accent); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary:hover { opacity: 0.9; }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
}
.btn-secondary:hover { opacity: 0.8; }

.error { color: var(--error); font-size: 0.9rem; margin-top: 8px; }

.files-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 16px; }

.files-list { display: flex; flex-direction: column; gap: 12px; }

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--file-bg);
}

.file-item .file-name {
  font-weight: 500;
  word-break: break-all;
  flex: 1;
}
.file-item .file-size { color: var(--text-muted); font-size: 0.85rem; margin: 0 16px; white-space: nowrap; }

.file-actions { display: flex; gap: 8px; }
.file-actions a {
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  text-decoration: none;
  border: 1px solid var(--accent);
  color: var(--accent);
}
.file-actions a:hover { background: var(--accent); color: #fff; }

.loading { text-align: center; padding: 24px; color: var(--text-muted); }

.theme-toggle { background:none; border:none; cursor:pointer; font-size:1.2em; padding:0 4px; line-height:1 }
.theme-toggle:hover { opacity:0.7 }


/* Signed out panel. Shown instead of bouncing the user straight back into sign-in, which is what
   used to happen because Entra ID keeps its own session after Cognito ends hers. */
.signed-out-panel {
    max-width: 34rem;
    margin: 4rem auto;
    padding: 2rem;
    text-align: center;
}

.signed-out-panel h1 {
    margin-top: 0;
}

.signed-out-note {
    font-size: 0.9rem;
    opacity: 0.8;
}