/* ============================================================
   Atlas — style.css
   Foundations: design tokens, base/reset, header, toolbar.
   Load order: style.css → components.css → responsive.css
   ============================================================ */

:root {
  --bg: #f4f4f2;
  --card: #ffffff;
  --ink: #171715;
  --ink-soft: #46453f;
  --muted: #8c8c84;
  --muted-2: #b6b6ad;
  --hair: #ecece7;
  --hair-2: #dcdcd4;
  --yellow: #ffb71b;
  --yellow-soft: #fff4da;
  --yellow-line: #f2d89a;
  --yellow-ink: #5c4200;
  --critical: #e0392b;
  --critical-soft: #fcecea;
  --critical-line: #f2c9c4;
  --radius: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --font:
    "IBM Plex Sans Arabic", system-ui, -apple-system, Segoe UI, sans-serif;
  --maxw: 1340px;
  --shadow:
    0 1px 2px rgba(23, 23, 21, 0.04), 0 8px 24px rgba(23, 23, 21, 0.05);
  --shadow-pop: 0 16px 40px rgba(23, 23, 21, 0.12);
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button {
  font-family: inherit;
  cursor: pointer;
}
input,
textarea {
  font-family: inherit;
}
::selection {
  background: var(--yellow);
  color: var(--ink);
}
.eyebrow {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* header */
header.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 244, 242, 0.9);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--hair);
}
.top-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 15px 26px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.brand-logo {
  height: 24px;
  width: auto;
  display: block;
  flex: 0 0 auto;
}
.divider-v {
  width: 1px;
  height: 28px;
  background: var(--hair-2);
  flex: 0 0 auto;
}
.sys-id {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sys-name {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  line-height: 1;
}
.sys-tag {
  font-size: 12px;
  color: var(--muted);
}
.top-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.sync-state {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
}
.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3cb371;
}
.sync-dot.busy {
  background: var(--muted-2);
}
.sync-dot.err {
  background: var(--critical);
}
.icon-btn {
  border: 1px solid var(--hair-2);
  background: var(--card);
  color: var(--ink);
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: border-color 0.15s;
}
.icon-btn:hover {
  border-color: var(--ink);
}
.icon-btn svg {
  width: 15px;
  height: 15px;
}

/* toolbar */
.toolbar-wrap {
  position: sticky;
  top: 55px;
  z-index: 40;
  background: rgba(244, 244, 242, 0.9);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--hair);
}
.toolbar {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 13px 26px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.seg {
  display: inline-flex;
  border: 1px solid var(--hair-2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--card);
  flex: 0 0 auto;
}
.seg button {
  padding: 0 15px;
  height: 42px;
  font-size: 13px;
  font-weight: 500;
  background: none;
  border: none;
  color: var(--muted);
  transition: 0.15s;
}
.seg button + button {
  border-left: 1px solid var(--hair-2);
}
.seg button.active {
  background: var(--yellow);
  color: var(--ink);
  font-weight: 600;
}
.search {
  position: relative;
  flex: 1 1 280px;
  min-width: 220px;
}
.search > svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}
.search input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--hair-2);
  border-radius: var(--radius-sm);
  padding: 0 38px;
  background: var(--card);
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: 0.15s;
}
.search input:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px var(--yellow-soft);
}
.search .clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border: none;
  background: none;
  color: var(--muted);
  border-radius: 6px;
  display: none;
  align-items: center;
  justify-content: center;
}
.search .clear:hover {
  background: var(--hair);
  color: var(--ink);
}
.search .clear.show {
  display: inline-flex;
}
.dropdown {
  position: absolute;
  top: 48px;
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--hair-2);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-pop);
  z-index: 30;
  overflow: hidden;
  display: none;
}
.dropdown.show {
  display: block;
}
.dropdown .dd-head {
  padding: 8px 14px 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.dropdown button {
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  background: none;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--ink);
}
.dropdown button:hover,
.dropdown button.kbd {
  background: var(--yellow-soft);
}
.dropdown .sug-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dropdown .sug-meta {
  font-size: 11px;
  color: var(--muted);
  flex: 0 0 auto;
}
.dropdown .dd-empty {
  padding: 12px 14px;
  color: var(--muted);
  font-size: 13px;
}
.recent-btn {
  height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hair-2);
  background: var(--card);
  padding: 0 15px;
  font-weight: 500;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  transition: 0.15s;
  flex: 0 0 auto;
}
.recent-btn svg {
  width: 15px;
  height: 15px;
}
.recent-btn:hover {
  border-color: var(--ink);
}
.recent-btn.active {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--ink);
  font-weight: 600;
}
.recent-btn .badge {
  background: var(--ink);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  border-radius: 20px;
  padding: 1px 7px;
}
.recent-btn.active .badge {
  color: var(--yellow);
}
.add-client-btn {
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--yellow);
  color: var(--ink);
  border: 1px solid var(--yellow);
  font-weight: 600;
  font-size: 13px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.15s;
  flex: 0 0 auto;
  margin-left: auto;
}
.add-client-btn:hover {
  opacity: 0.9;
}
.add-client-btn svg {
  width: 16px;
  height: 16px;
}

