@font-face {
  font-family: Estedad;
  src: url("/fonts/estedad-fa.woff2") format("woff2");
  font-display: swap;
  font-weight: 100 900;
}

:root {
  --ink: #172f3a;
  --muted: #50626a;
  --side: #15333e;
  --paper: #f4f7f7;
  --white: #fff;
  --line: #d4dfe0;
  --accent: #11635e;
  --tint: #e3f0ed;
  --warn: #824a1f;
  --radius: .65rem;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none!important;
}

body {
  margin: 0;
  font: 1rem/1.75 Estedad,system-ui,sans-serif;
  color: var(--ink);
  background: var(--paper);
}

a {
  color: var(--accent);
  text-underline-offset: .22em;
}

button,input,select,textarea {
  font: inherit;
  color: inherit;
}

button,a.primary,a.secondary {
  cursor: pointer;
}

button, .primary,.secondary {
  min-height: 2.55rem;
  padding: .4rem .9rem;
  border-radius: .45rem;
  font-weight: 620;
}

button:disabled {
  opacity: .58;
  cursor: wait;
}

.primary {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.secondary {
  border: 1px solid #b9c9cb;
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
}

.primary:hover {
  background: #084c47;
}

.secondary:hover {
  border-color: var(--accent);
  background: #f2f8f6;
}

:focus-visible {
  outline: 3px solid #bb701f;
  outline-offset: 3px;
}

.skip {
  position: fixed;
  inset-block-start: -8rem;
  background: white;
  padding: .5rem;
  z-index: 11;
}

.skip:focus {
  inset-block-start: 1rem;
}

.workspace {
  display: grid;
  grid-template-columns: 15.2rem minmax(0,1fr);
  min-height: 100svh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  color: #f5faf9;
  background: var(--side);
  padding: 1.55rem 1rem;
  overflow: auto;
}

.identity {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .2rem .35rem 1.55rem;
  border-block-end: 1px solid #47616a;
}

.identity img {
  background: #f6f0e7;
  padding: .25rem;
  border-radius: .45rem;
}

.identity strong,.identity small {
  display: block;
}

.identity strong {
  font-size: 1.17rem;
}

.identity small {
  color: #c2d3d6;
  font-size: .78rem;
}

.sidebar nav {
  display: grid;
  gap: .25rem;
  margin-block: 1.35rem;
}

.sidebar nav a {
  color: #e2edee;
  text-decoration: none;
  padding: .6rem .85rem;
  border-radius: .4rem;
  line-height: 1.5;
}

.sidebar nav a[aria-current=page] {
  background: #d4e8e2;
  color: #123f3c;
  font-weight: 720;
}

.sidebar nav a:hover {
  background: #284c55;
  color: #fff;
}

.mobile-toggle {
  display: none;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: .8rem clamp(1rem,3vw,3rem);
  background: var(--white);
  border-bottom: 1px solid var(--line);
  font-size: .89rem;
  color: var(--muted);
}

.account {
  display: flex;
  gap: .65rem;
  align-items: center;
  flex-wrap: wrap;
}

.account strong {
  color: var(--ink);
}

.account a {
  padding-inline-start: .5rem;
}

.inner {
  max-width: 90rem;
  margin: auto;
  padding: 1.6rem clamp(.9rem,3vw,3rem) 4rem;
}

.view-head,.section-head,.actions,.chips,.tool-row {
  display: flex;
  align-items: center;
  gap: .6rem 1rem;
  flex-wrap: wrap;
}

.view-head,.section-head {
  justify-content: space-between;
}

.view-head {
  margin-bottom: 1.45rem;
}

.view-head h1 {
  margin: 0;
  line-height: 1.4;
  font-size: clamp(1.65rem,3.1vw,2.45rem);
  letter-spacing: -.03em;
}

.view-head p,.muted {
  color: var(--muted);
}

.view-head p {
  margin: .2rem 0 0;
}

.box,.filters,.metric,.empty {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.box,.filters {
  padding: 1.1rem clamp(.85rem,2vw,1.4rem);
  margin-block-end: 1rem;
}

.box h2,.section-head h2 {
  font-size: 1.18rem;
  margin: 0;
}

.box h3 {
  font-size: 1rem;
  margin: .55rem 0;
}

.box p {
  margin: .45rem 0;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,10rem),1fr));
  gap: .75rem;
  margin: 1rem 0;
}

.metric {
  display: grid;
  color: var(--ink);
  text-decoration: none;
  padding: 1rem 1.05rem;
  gap: .38rem;
}

.metric strong {
  font-size: 1.75rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.metric span {
  color: var(--muted);
  font-size: .9rem;
}

a.metric:hover {
  border-color: var(--accent);
}

.metric.attention {
  border-block-start: 3px solid #ac6c32;
}

.pair {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 1rem;
  align-items: start;
}

.form-grid,.filters-main {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,10.2rem),1fr));
  align-items: end;
  gap: .7rem;
}

.filters .filters-main {
  margin-block: .3rem;
}

.filters details {
  margin-top: .6rem;
}

.filters details summary {
  cursor: pointer;
  color: var(--accent);
}

label {
  display: grid;
  gap: .2rem;
  font-size: .91rem;
  color: var(--muted);
}

input,textarea,select {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  border: 1px solid #acbdc0;
  border-radius: .4rem;
  background: #fff;
  padding: .42rem .62rem;
  line-height: 1.55;
}

textarea {
  resize: vertical;
  min-height: 5rem;
}

.actions {
  margin-block: .75rem .2rem;
}

.tool-row {
  justify-content: space-between;
  margin: .4rem 0 1rem;
}

.table-wrap {
  overflow-x: auto;
}

.table-wrap:focus-visible {
  outline-offset: -3px;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: start;
}

th,td {
  text-align: start;
  padding: .65rem .6rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: .87rem;
  font-weight: 600;
  white-space: nowrap;
}

td {
  font-size: .96rem;
}

.table-wrap tr:last-child td {
  border-bottom: 0;
}

.row-button,.text-button {
  border: 0;
  background: transparent;
  padding: .2rem 0;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: .22em;
  text-align: start;
}

.tag {
  display: inline-block;
  background: var(--tint);
  color: #15524c;
  font-size: .86rem;
  border-radius: .3rem;
  white-space: nowrap;
  padding: .09rem .5rem;
}

.tag.warm {
  background: #faecde;
  color: #794821;
}

.tag.quiet {
  background: #eaf0f1;
  color: #40555c;
}

.small,small {
  font-size: .86rem;
  color: var(--muted);
}

.stack {
  display: grid;
  gap: .55rem;
}

.empty {
  padding: 1.2rem;
  color: var(--muted);
}

.bars {
  display: grid;
  gap: .6rem;
  padding: 0;
  list-style: none;
}

.bars li {
  display: grid;
  grid-template-columns: minmax(5rem,1fr) minmax(3rem,2fr) auto;
  align-items: center;
  gap: .7rem;
}

.bars meter {
  width: 100%;
  height: .85rem;
  accent-color: var(--accent);
}

#notice:not(:empty),#dialog-notice:not(:empty) {
  padding: .65rem .9rem;
  margin-block: .5rem 1rem;
  border-inline-start: 3px solid var(--accent);
  background: var(--tint);
}

#notice[data-error=true],#dialog-notice[data-error=true] {
  background: #fbeae4;
  border-color: #a84d33;
  color: #77361f;
}

dialog {
  width: min(57rem,96vw);
  max-height: 92svh;
  border: 1px solid #a7b9be;
  border-radius: .8rem;
  padding: 0 1.15rem 1.1rem;
  color: var(--ink);
  background: var(--paper);
}

dialog::backdrop {
  background: #0f263b88;
}

.dialog-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .85rem 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  margin-bottom: .85rem;
}

.dialog-head h2 {
  margin: 0;
  font-size: 1.25rem;
}

.message {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.contact-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.timeline {
  list-style: none;
  margin: .6rem 0 0;
  padding: 0;
}

.timeline li {
  border-inline-start: 2px solid #b8c9ca;
  padding: .2rem .75rem .65rem;
  margin-block: .5rem;
}

.timeline li p {
  margin: .15rem 0;
}

.timeline .private {
  border-color: #bd894f;
}

.date-input {
  direction: ltr;
}

.locale-row {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-block: .6rem;
}

.locale-row button {
  border: 1px solid var(--line);
  background: white;
}

.locale-row button[aria-pressed=true] {
  background: var(--tint);
  border-color: var(--accent);
  color: var(--accent);
}

.editor-body {
  min-height: 10rem;
}

.danger {
  color: #873c2c;
}

.break {
  overflow-wrap: anywhere;
}

.page-load {
  color: var(--muted);
  padding: .75rem;
}

.sign-page {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: #edf3f2;
}

.sign-card {
  width: min(28rem,100%);
  background: #fff;
  padding: clamp(1.5rem,5vw,2.5rem);
  border: 1px solid var(--line);
  border-block-start: 5px solid var(--accent);
  border-radius: .9rem;
}

.sign-card p {
  color: var(--muted);
}

.sign-card h1 {
  font-size: 1.8rem;
  line-height: 1.55;
}

.back-home {
  display: inline-block;
  margin-inline-start: .8rem;
}

@media(max-width:940px) {
  .workspace {
    grid-template-columns: 12.5rem minmax(0,1fr);
  }
  .pair {
    grid-template-columns: 1fr;
  }
}

@media(max-width:700px) {
  .workspace {
    display: block;
  }
  .sidebar {
    position: relative;
    height: auto;
    padding: .6rem .9rem;
    overflow: visible;
  }
  .identity {
    padding: 0;
    border: 0;
  }
  .identity img {
    height: 36px;
    width: 31px;
  }
  .mobile-toggle {
    display: block;
    margin-inline-start: auto;
    min-height: 2.4rem;
    color: white;
    background: transparent;
    border: 1px solid #b4cbcd;
  }
  .sidebar nav {
    display: none;
    margin: .7rem 0 .25rem;
  }
  .sidebar nav.open { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; }
  .topbar {
    padding: .52rem .9rem;
    font-size: .82rem;
  }
  .inner {
    padding-top: 1rem;
  }
  .metrics {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .metric {
    padding: .75rem;
  }
  .table-wrap {
    margin-inline: -.35rem;
  }
  .account {
    gap: .35rem;
  }
  .dialog-head h2 {
    font-size: 1.05rem;
  }
}

.traffic-trend { display: flex; gap: .2rem; align-items: stretch; height: 7rem; border-block-end: 1px solid var(--line); }
.traffic-trend > div { flex: 1 1 0; min-width: 0; display: flex; justify-content: center; }
.traffic-trend meter { appearance: none; writing-mode: vertical-lr; direction: rtl; height: 100%; width: 100%; max-width: 1.6rem; background: transparent; }
.traffic-trend meter::-webkit-meter-bar { background: #f1f5f4; border: none; border-radius: .2rem; }
.traffic-trend meter::-webkit-meter-optimum-value { background: #32756c; }
.traffic-trend meter::-moz-meter-bar { background: #32756c; }
.trend-ends { display: flex; justify-content: space-between; color: var(--muted); font-size: .9rem; margin: .4rem 0 .65rem; }

.sidebar { background: #16333a; }
.identity { padding-block-end: 1rem; }
.nav-group { display: grid; margin-block-end: .6rem; gap: .12rem; }
.nav-group > span { margin: 0 .75rem .15rem; color: #a2c3c5; font-size: .81rem; }
.sidebar nav { margin-block: 1rem .5rem; }
.sidebar nav a { padding: .43rem .75rem; font-size: .94rem; }
.scope-picker { display: flex; align-items: center; gap: .75rem; font-size: .91rem; font-weight: 650; }
.scope-picker > span { white-space: nowrap; }
.scope-picker select {
  appearance: none; width: auto; min-width: 12.4rem; min-height: 2.65rem;
  padding-inline: .82rem 2.3rem; background-color: #f5f9f8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23284e53' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left .7rem center; color: #1e474b; border-color: #a4bfbb;
}
.account time { padding-inline-end: .8rem; border-inline-end: 1px solid var(--line); }
#scope-crumb:not(:empty) { display:flex; align-items:center; flex-wrap:wrap; gap:.48rem; color:var(--muted); margin-block-end:.55rem; font-size:.87rem; }
#scope-crumb > span { color: #748889; }
.public-site { font: .85rem/1.6 system-ui,sans-serif; }
.view-head { align-items: end; }
body[data-scope="sidra-studio"], [data-site="sidra-studio"] { --site-color: #735478; }
body[data-scope="sidra-property"], [data-site="sidra-property"] { --site-color: #58653d; }
body[data-scope="oman-gate"], [data-site="oman-gate"] { --site-color: #95703b; }
body[data-scope="oman-residency-hub"], [data-site="oman-residency-hub"] { --site-color: #27726a; }
body[data-scope]:not([data-scope="all"]) .scope-picker select { border-inline-start: 4px solid var(--site-color); }
.site-panel { margin-block: 1.7rem 1rem; }
.site-panel h2, .quick-links h2 { margin: 0; font-size: 1.15rem; }
.site-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .9rem; margin-top: .65rem; }
.site-tile { display: block; background: var(--white); border: 1px solid var(--line); border-inline-start: 4px solid var(--site-color); border-radius: var(--radius); padding: 1.05rem 1.25rem .8rem; color: var(--ink); text-decoration: none; }
.site-tile:hover { border-color: var(--site-color); box-shadow: 0 3px 13px #173c4010; }
.tile-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: .15rem .8rem; justify-content: space-between; }
.tile-head strong { font-size: 1.12rem; }
.tile-head bdi { color: var(--muted); font: .87rem/1.6 system-ui,sans-serif; }
.site-tile dl, .case-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin: .85rem 0 0; gap: .4rem .8rem; border-block-start: 1px solid #e1e9e7; padding-block-start: .65rem; }
.site-tile dt, .case-fields dt { color:var(--muted); font-size: .87rem; }
.site-tile dd { margin: 0; font-weight: 675; font-size: 1.18rem; }
.case-fields { margin-block: .75rem; }
.case-fields dd { margin: .1rem 0; overflow-wrap:anywhere; }
.overview-period { margin-block-start: 1.1rem; }
.overview-period summary, .channel-settings summary { cursor: pointer; font-weight: 580; color: var(--accent); }
.channel-settings { margin-block: .7rem; }
.quick-links { display:flex; gap:.6rem; align-items:center; flex-wrap:wrap; margin:1.25rem 0; }
.quick-links h2 { margin-inline-end:.4rem; }
.overview-period .period-filter { margin: .5rem 0 0; }
.period-filter .filters-main { display:flex; flex-wrap:wrap; align-items:end; }
.period-filter input { min-width: 8rem; direction:ltr; }
#workspace-main { min-width:0; }
@media(max-width: 1000px) {
  .tile-head { flex-direction:column; }
}
@media(max-width: 700px) {
  .identity { padding: 0; }
  .topbar { gap:.35rem .7rem; flex-wrap:wrap; }
  .scope-picker { flex: 0 1 auto; }
  .scope-picker select { min-width: 0; max-width: 100%; }
  .account time { display:none; }
  .site-grid { gap: .65rem; }
  .site-tile { padding: .8rem; }
  .tile-head { gap:0; }
  .nav-group { margin-block-end:.4rem; }
}
@media(max-width: 495px) {
  .topbar { align-items:center; }
  .scope-picker { gap:.4rem; }
  .scope-picker select { font-size:.88rem; }
  .account { font-size:.82rem; }
  .account #signed-role { display:none; }
  .site-grid { grid-template-columns:1fr; }
  .tile-head { flex-direction:row; }
  .site-tile dl { margin-block-start:.48rem; }
  .view-head { align-items:start; gap:.5rem; }
  .case-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

.content-sites{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(230px,100%),1fr));gap:1rem}
.site-content-card{display:grid;align-content:start;gap:.42rem;text-decoration:none;color:var(--ink, #18363d)}
.site-content-card:hover,.site-content-card:focus-visible{border-color:#42776a;background:#f1f7f5}
.site-content-card strong{font-size:1.12rem}.site-content-card span,.site-content-card bdi{font-size:.91rem}.site-content-card bdi{width:fit-content;color:#4d6e67}

.scope-links{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding-block-end:.65rem;margin-block-end:.75rem;border-bottom:1px solid #486168}
.sidebar nav .scope-links a{padding:.38rem .42rem;border:1px solid #567073;border-radius:.4rem;font-size:.86rem;line-height:1.55}
.scope-links a:first-child{grid-column:1/-1}.sidebar nav .scope-links a[aria-current=true]{background:#d6e7e1;color:#23453d;border-color:#d6e7e1;font-weight:700}
@media(min-width:701px){.topbar .scope-picker{display:none}.topbar .account{margin-inline-start:auto}}
@media(max-width:700px){.scope-links{grid-column:1/-1}.workspace:has(#desk-nav.open) .topbar .scope-picker{display:none}}
