/* ============================================================
   OMSswiss Brick App — shared chrome (login, admin, account)
   The actual schema-browser / editor pages bring their own CSS.
   ============================================================ */

:root {
  --willers-deep-stone: #1B3133;
  --willers-dark-stone: #264245;
  --willers-teal:       #7AE3E3;
  --willers-yellow:     #FFEB52;
  --ink:   #1B3133;
  --ink2:  #264245;
  --paper: #ffffff;
  --bg:    #F5F7F7;
  --line:  #E2E8E8;
  --muted: #6B7B7C;
  --danger:#B23A48;
  --ok:    #2E7D5B;
  --font-sans: 'DM Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font-sans); color: var(--ink); background: var(--bg); }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.app-main  { flex: 1; padding: 1.5rem; max-width: 1280px; margin: 0 auto; width: 100%; }
.appfoot   { padding: 1rem 1.5rem; color: var(--muted); font-size: 12px; text-align: center; border-top: 1px solid var(--line); background: #fff; }

.topbar { background: var(--willers-deep-stone); color: #fff; }
.topbar-inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; gap: 1.5rem; padding: 0.6rem 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: #fff; text-decoration: none; font-weight: 600; }
.topnav { display: flex; gap: 1rem; }
.topnav a, .userbox a { color: #DDEAEA; text-decoration: none; font-size: 14px; }
.topnav a:hover, .userbox a:hover { color: var(--willers-teal); }
.userbox { margin-left: auto; display: flex; align-items: center; gap: 1rem; font-size: 13px; color: #DDEAEA; }
.who { color: #fff; }
.role-pill { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 500; background: var(--willers-dark-stone); color: var(--willers-teal); }
.role-admin      { background: var(--willers-yellow); color: var(--willers-deep-stone); }
.role-consultant { background: var(--willers-teal); color: var(--willers-deep-stone); }
.role-browser    { background: var(--willers-dark-stone); color: #fff; }

/* Cards / forms */
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1.5rem; box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
.card + .card { margin-top: 1rem; }
h1 { font-size: 1.4rem; margin: 0 0 1rem; }
h2 { font-size: 1.1rem; margin: 1.5rem 0 0.75rem; }
label { display: block; font-size: 13px; color: var(--ink2); margin-bottom: 0.25rem; }
input[type=email], input[type=password], input[type=text], select, textarea {
  width: 100%; padding: 0.55rem 0.75rem; font: inherit; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--willers-teal); outline-offset: 1px; border-color: var(--willers-teal); }
.field { margin-bottom: 0.9rem; }
.row { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { .row { grid-template-columns: 1fr; } }

.btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.55rem 1rem; border-radius: 8px;
       border: 1px solid var(--ink); background: var(--ink); color: #fff; font: inherit; font-weight: 500;
       cursor: pointer; text-decoration: none; }
.btn:hover    { background: var(--ink2); border-color: var(--ink2); }
.btn-ghost    { background: transparent; color: var(--ink); }
.btn-danger   { background: var(--danger); border-color: var(--danger); }
.btn-sm       { padding: 0.35rem 0.7rem; font-size: 13px; }

.alert { padding: 0.75rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: 14px; }
.alert-error { background: #FBEAEC; color: var(--danger); border: 1px solid #F1C7CD; }
.alert-ok    { background: #E8F4EE; color: var(--ok);     border: 1px solid #BFE0CD; }
.alert-info  { background: #E8F1F2; color: var(--ink);    border: 1px solid #C8DDE0; }
.muted { color: var(--muted); font-size: 13px; }

/* Login layout */
.center-box { max-width: 420px; margin: 4rem auto; }
.center-box .brand-row { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1rem; }

/* Tables (admin) */
table.data { width: 100%; border-collapse: collapse; margin-top: 0.5rem; font-size: 14px; }
table.data th, table.data td { padding: 0.55rem 0.75rem; text-align: left; border-bottom: 1px solid var(--line); }
table.data th { font-weight: 600; color: var(--ink2); background: #FAFBFB; }
table.data tr:hover td { background: #FAFCFC; }
.actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.tag { display:inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; background: var(--line); color: var(--ink2); }
.tag-pending  { background: #FFF4D6; color: #8A6D00; }
.tag-approved { background: #DCF1E5; color: var(--ok); }
.tag-rejected { background: #F7D9DC; color: var(--danger); }
.tag-active   { background: #DCF1E5; color: var(--ok); }
.tag-inactive { background: #EEE; color: var(--muted); }
