/* base.css — design tokens and generic elements.
   Nothing in here knows anything about LinkedIn or Odoo; it is the part
   another Office Everywhere tool could drop in unchanged. */

:root {
  --bg:        #0f1115;
  --surface:   #171a21;
  --surface-2: #1e222b;
  --line:      #2a2f3a;
  --text:      #e6e8ec;
  --muted:     #98a0ae;
  --accent:    #4a8cff;
  --ok:        #3fbf7f;
  --warn:      #e0a02e;
  --danger:    #e2564d;
  --radius:    10px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:        #f5f6f8;
    --surface:   #ffffff;
    --surface-2: #f0f2f5;
    --line:      #dde1e7;
    --text:      #1b1f27;
    --muted:     #5d6673;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.hidden { display: none !important; }
.muted  { color: var(--muted); }
.small  { font-size: 13px; }
.error  { color: var(--danger); font-weight: 500; }

code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }

/* --------------------------------------------------------------- layout */

main, .view { max-width: 1080px; margin: 20px auto; padding: 0 20px; }
.centred { max-width: 460px; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; margin-bottom: 18px;
}
.card h2 { margin: 0 0 6px; font-size: 17px; }
.card h3 { margin: 20px 0 8px; font-size: 14px; text-transform: uppercase;
           letter-spacing: .05em; color: var(--muted); }

.tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tab {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  padding: 7px 14px; border-radius: var(--radius); cursor: pointer; font-size: 14px;
}
.tab.active { background: var(--surface); color: var(--text); border-color: var(--accent); }
.panel { display: none; }
.panel.active { display: block; }

/* --------------------------------------------------------------- forms */

label { display: block; margin: 12px 0 5px; font-size: 13px; font-weight: 600; }
input[type=text], input[type=password], input[type=number], input[type=file], select {
  width: 100%; max-width: 420px; padding: 9px 11px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; font-size: 14px;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; font-weight: 400; }
.check input { width: auto; margin-top: 3px; flex: none; }

.btn {
  display: inline-block; margin-top: 14px; margin-right: 8px;
  padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text);
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn:hover:not(:disabled) { border-color: var(--accent); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-danger  { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-ghost   { background: transparent; }

/* --------------------------------------------------------------- tables */

.scroll { max-height: 460px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td {
  text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line);
  vertical-align: top; white-space: nowrap;
}
.table th { position: sticky; top: 0; background: var(--surface-2); z-index: 1; font-weight: 600; }
.table tr:last-child td { border-bottom: none; }
.table td.wrap { white-space: normal; max-width: 320px; }

.pill { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.pill-create { background: rgba(63,191,127,.16); color: var(--ok); }
.pill-update { background: rgba(74,140,255,.16); color: var(--accent); }
.pill-skip   { background: rgba(152,160,174,.16); color: var(--muted); }
.pill-failed { background: rgba(226,86,77,.16); color: var(--danger); }

/* --------------------------------------------------------------- spinner */

.spinner {
  display: inline-block; width: 15px; height: 15px; margin-right: 8px;
  vertical-align: -2px; border: 2px solid var(--line);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

pre {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 12px; overflow: auto; max-height: 400px;
}

.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 18px; }
.foot a { color: var(--muted); }

