:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #e6eee7;
  background: #0d1411;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid #35463b;
  border-radius: 9px;
  background: #1e2b23;
  color: #e7f0e8;
  padding: 9px 13px;
}
button:hover {
  border-color: #79b395;
  background: #263a2d;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
button.primary {
  background: #98ceb0;
  color: #102218;
  border-color: #98ceb0;
  font-weight: 700;
}
button.primary:hover {
  background: #b2dec3;
}
button.danger {
  color: #eea1a1;
}
a {
  color: #a5d8b7;
  text-decoration: none;
}
a:hover {
  color: #c5efd2;
}
input,
select,
textarea {
  background: #111b15;
  color: #ecf2ec;
  border: 1px solid #384a3e;
  border-radius: 8px;
  padding: 10px 12px;
  width: 100%;
}
input::placeholder,
textarea::placeholder {
  color: #82958a;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #77ad8e;
  outline-offset: 1px;
}
textarea {
  min-height: 180px;
}
label {
  display: block;
  color: #b9c9bd;
  font-size: 13px;
  margin: 12px 0 5px;
}
.layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}
.layout > .sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #26362c;
  padding: 22px 14px 14px;
  background: #111916;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  margin-bottom: 34px;
  font-size: 19px;
  font-weight: 800;
  color: #edf5ee;
}
.brand img {
  display: block;
  width: 38px;
  height: 38px;
  flex: none;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(80%) sepia(19%) saturate(630%)
    hue-rotate(89deg) brightness(89%) contrast(92%);
}
.brand span {
  color: #abd9ba;
}
.brand small {
  display: block;
  margin-top: 2px;
  color: #83978a;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1px;
}
.signin-brand {
  padding: 0;
  margin-bottom: 8px;
}
.signin-brand img {
  width: 56px;
  height: 56px;
}
.nav-label {
  padding: 0 13px;
  margin-bottom: 8px;
  color: #74887a;
  font-size: 11px;
  letter-spacing: 1px;
}
nav {
  min-height: 0;
  overflow-y: auto;
}
nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 3px 0;
  padding: 10px 12px;
  border: 1px solid transparent;
  background: transparent;
  color: #a9b9ad;
  text-align: left;
  font-size: 13px;
}
nav button.active {
  background: #213a2c;
  border-color: #365740;
  color: #e5f4e8;
  font-weight: 700;
}
nav button:hover {
  border-color: #365740;
}
.nav-icon {
  width: 19px;
  text-align: center;
  font-size: 17px;
  color: #9dbba7;
}
.nav-dot {
  width: 5px;
  height: 5px;
  margin-left: auto;
  border-radius: 50%;
  background: #8acda2;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #26362c;
  min-width: 0;
}
.user-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 31px;
  height: 31px;
  border-radius: 8px;
  background: #254334;
  color: #cce8d2;
  font-weight: 700;
}
.sidebar-user > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.sidebar-user strong,
.sidebar-user small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-user strong {
  font-size: 11px;
}
.sidebar-user small {
  margin-top: 2px;
  color: #889a8c;
  font-size: 10px;
}
.sidebar-user button {
  padding: 5px 8px;
}
.layout main {
  min-width: 0;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  padding: 0 46px;
  border-bottom: 1px solid #27362b;
  color: #b5c4b8;
  font-size: 13px;
}
.topbar b {
  margin: 0 12px;
  color: #627567;
  font-weight: 400;
}
.topbar #lang {
  padding: 5px 8px;
  background: transparent;
  border-color: #2b3d31;
  font-size: 11px;
}
.workspace-badge {
  padding: 5px 10px;
  border: 1px solid #314638;
  border-radius: 20px;
  color: #a8d8b9;
  font-size: 11px;
}
.account-menu {
  position: relative;
  flex: none;
}
.account-menu summary {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #41604a;
  border-radius: 50%;
  background: #254334;
  color: #d7f0df;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.account-menu summary::-webkit-details-marker {
  display: none;
}
.account-menu summary:hover,
.account-menu summary:focus-visible {
  border-color: #98ceb0;
}
.account-menu-panel {
  position: absolute;
  z-index: 8;
  top: calc(100% + 10px);
  right: 0;
  width: min(260px, calc(100vw - 32px));
  padding: 8px;
  border: 1px solid #3b5141;
  border-radius: 12px;
  background: #17231b;
  box-shadow: 0 18px 40px #0008;
}
.account-menu-panel strong {
  display: block;
  padding: 10px;
  overflow: hidden;
  color: #afc5b5;
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
}
.account-menu-panel button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
}
.account-menu-panel button:hover,
.account-menu-panel button:focus-visible {
  background: #29402f;
}
.page-main {
  max-width: 1496px;
  margin: 0 auto;
  padding: 32px 46px 64px;
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.page-header button {
  background: #1b2920;
  color: #aab9ad;
}
h1 {
  font-size: 34px;
  line-height: 1.2;
  margin: 0;
}
h2 {
  font-size: 18px;
  margin: 0 0 10px;
}
.muted {
  color: #98aa9c;
}
.card {
  background: #171f1b;
  border: 1px solid #2b3b31;
  border-radius: 14px;
  padding: 20px;
  margin: 14px 0;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.between {
  justify-content: space-between;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.stat {
  font-size: 32px;
  font-weight: 750;
  margin: 10px 0;
}
.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 650px;
}
.table th,
.table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid #28382e;
  font-size: 13px;
  vertical-align: middle;
}
.table th {
  color: #aebfb2;
  background: #1d2b22;
  font-size: 12px;
  font-weight: 650;
}
.table tr:last-child td {
  border-bottom: 0;
}
.table td button {
  padding: 5px 8px;
  background: transparent;
  border: 0;
  color: #a7d7b6;
  font-size: 12px;
}
.table td button:hover {
  background: #263a2c;
}
.ns-target {
  display: grid;
  gap: 5px;
  width: max-content;
}
.ns-target-line {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.table td .ns-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  border-radius: 5px;
}
.ns-copy svg {
  width: 15px;
  height: 15px;
}
.scroll {
  overflow-x: auto;
}
.pill {
  display: inline-block;
  border-radius: 6px;
  padding: 4px 7px;
  background: #203a2b;
  color: #a3d5b2;
  font-size: 11px;
}
.modalback {
  position: fixed;
  inset: 0;
  background: #020805c4;
  display: grid;
  place-items: center;
  padding: 18px;
  z-index: 10;
}
.modal {
  width: min(700px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: #17231c;
  border: 1px solid #3a5943;
  border-radius: 16px;
  padding: 26px;
}
.rule-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.rule-group {
  border: 1px solid #345065;
  border-radius: 12px;
  padding: 14px;
  background: #112131;
}
.rule-group h3 {
  margin: 0 0 12px;
  font-size: 15px;
}
.rule-group-head {
  display: block;
}
.rule-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.rule-group-title h3 {
  margin: 0;
}
.rule-select-all {
  margin: 0;
  cursor: pointer;
}
.rule-select-all input {
  width: 20px;
  height: 20px;
  accent-color: #44dcce;
}
.rule-group-actions {
  display: flex;
  gap: 5px;
  margin: 10px 0;
}
.rule-group-actions button {
  padding: 5px 7px;
  font-size: 11px;
}
.rule-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid #345065;
  border-radius: 9px;
  margin: 8px 0;
  color: #e7f2f8;
}
.rule-check small {
  display: block;
  color: #9db2c5;
  margin-top: 5px;
  line-height: 1.4;
}
.rule-check input {
  width: auto;
  accent-color: #44dcce;
}
.rule-check-pending {
  color: #74889a;
  border-style: dashed;
  background: #101b29;
  cursor: not-allowed;
}
.rule-check-pending small {
  color: #6f8395;
}
.rule-pending-badge {
  flex: none;
  border-radius: 20px;
  padding: 4px 7px;
  background: #283746;
  color: #a6b4c0;
  font-size: 11px;
}
#ruleform .twocol {
  margin-top: 12px;
}
.rule-settings {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}
.country-picker > details,
.ios-version-picker {
  border: 1px solid #345065;
  border-radius: 10px;
  padding: 12px;
  background: #112131;
}
.country-picker > strong {
  display: block;
  margin-bottom: 12px;
}
.country-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}
.country-chip {
  border-radius: 20px;
  padding: 6px 10px;
  color: #b5f5ed;
  background: #0d3435;
  border-color: #216b68;
}
.country-list {
  max-height: 210px;
  overflow: auto;
  margin-top: 10px;
  border: 1px solid #345065;
  border-radius: 9px;
  background: #0b1522;
}
.country-list label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  cursor: pointer;
}
.country-list label:has(input:checked) {
  background: #0d3435;
}
.country-list label[hidden] {
  display: none;
}
.country-list input {
  width: auto;
  accent-color: #44dcce;
}
.country-list small {
  color: #8ca6b9;
}
.country-picker summary {
  cursor: pointer;
  font-weight: 700;
}
.country-picker summary span {
  color: #8ca6b9;
  font-weight: 400;
}
.country-continent {
  margin: 10px 0;
  padding: 10px;
  border: 1px solid #345065;
  border-radius: 8px;
}
.country-all,
.country-options label,
.ios-version-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  cursor: pointer;
}
.country-all input,
.country-options input,
.ios-version-options input {
  width: auto;
  accent-color: #44dcce;
}
.country-options,
.ios-version-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0 12px;
}
.country-options small {
  color: #8ca6b9;
}
.ios-version-picker > label {
  margin: 0;
  font-weight: 700;
}
.default-safety-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.default-safety-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px;
  border: 1px solid #345065;
  border-radius: 10px;
}
.live-log-card h2 {
  margin-bottom: 6px;
}
.live-log-tools {
  gap: 10px;
  margin: 20px 0;
}
.live-log-tools select {
  width: auto;
  min-width: 140px;
}
.log-decision {
  display: inline-block;
  border-radius: 7px;
  padding: 5px 8px;
  white-space: nowrap;
}
.log-allowed {
  color: #7ee1c4;
  background: #143c34;
}
.log-blocked {
  color: #f3a6c1;
  background: #423040;
}
.log-link {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.log-detail {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
}
.log-detail dt {
  color: #8ca6b9;
}
.log-detail dd {
  margin: 0;
  overflow-wrap: anywhere;
}
#ruleform {
  min-width: min(900px, 100%);
}
.modal:has(#ruleform) {
  width: min(1050px, 100%);
}
.modal .actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
}
.link-guidance {
  padding: 12px 14px;
  border: 1px solid #345065;
  border-radius: 9px;
  color: #b8cddd;
  background: #112131;
  line-height: 1.5;
}
.link-modal {
  width: min(1180px, 100%);
  height: min(780px, 92vh);
  max-height: 92vh;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #121d18;
  border-color: #3d5b4d;
  border-radius: 18px;
  color: #e9f1eb;
}
.link-modal-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: none;
  padding: 18px 22px;
  background: linear-gradient(110deg, #203b2e, #14211b);
  border-bottom: 1px solid #334d3e;
}
.link-modal-head h2 {
  margin: 0 0 5px;
  font-size: 20px;
}
.link-modal-head p {
  margin: 0;
  color: #a8baad;
}
.link-modal-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid #4b8066;
  border-radius: 12px;
  background: #294d3b;
  color: #aedcc0;
  font-size: 24px;
}
.link-modal-tabs {
  display: flex;
  gap: 4px;
  margin-left: auto;
  padding: 4px;
  border: 1px solid #41604d;
  border-radius: 12px;
}
.link-modal-tabs button {
  background: transparent;
  border: 0;
  color: #b2c0b5;
  white-space: nowrap;
}
.link-modal-tabs button.active {
  background: #2c4d3d;
  color: #eff8f0;
}
.link-modal-close {
  font-size: 28px;
  line-height: 1;
  padding: 8px 14px;
  background: #213329;
  border-color: #344c3c;
}
.link-modal form {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}
.link-modal-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 18px 20px;
}
.link-modal [hidden] {
  display: none !important;
}
.link-modal label {
  color: #dce8de;
  font-size: 15px;
  font-weight: 650;
}
.link-modal input,
.link-modal select {
  background: #101b16;
  border-color: #3b5544;
  color: #e8f1e9;
}
.link-modal input::placeholder {
  color: #82958a;
}
.link-modal input:focus,
.link-modal select:focus {
  outline: 2px solid #74ae8e;
  outline-offset: 1px;
}
.link-settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 272px;
  gap: 16px;
  align-items: start;
}
.link-settings-main {
  display: grid;
  gap: 12px;
}
.link-section,
.link-rule-column {
  padding: 16px;
  border: 1px solid #344b3d;
  border-radius: 14px;
  background: #17231c;
}
.link-section h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  font-size: 16px;
}
.link-section h3 span {
  padding: 4px 8px;
  border-radius: 6px;
  background: #2d4b3a;
  color: #b6dcc4;
  font-size: 14px;
}
.link-section .twocol {
  gap: 18px;
}
.link-section label {
  margin-top: 12px;
}
.link-help {
  margin: 10px 0 0;
  color: #99aa9e;
  font-size: 13px;
}
.link-platforms {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.link-platform {
  display: flex !important;
  align-items: flex-start;
  gap: 8px;
  min-height: 74px;
  margin: 4px 0 0 !important;
  padding: 10px;
  border: 1px solid #3b5444;
  border-radius: 12px;
  cursor: pointer;
}
.link-platform:has(input:checked) {
  background: #274536;
  border-color: #74a88a;
}
.link-platform input {
  width: auto;
  margin: 3px 0 0;
  accent-color: #91c5a7;
}
.link-platform span {
  min-width: 0;
}
.link-platform strong {
  display: block;
}
.link-platform small {
  display: block;
  margin-top: 6px;
  color: #a7b8aa;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
}
.link-region-details {
  margin-top: 6px;
  padding: 12px 14px;
  border: 1px solid #3b5544;
  border-radius: 10px;
  background: #101b16;
}
.link-region-details summary {
  cursor: pointer;
}
.link-region-details .country-picker {
  margin-top: 15px;
}
.link-region-details .country-list {
  background: #101b16;
}
.link-summary {
  position: sticky;
  top: 0;
  padding: 16px;
  border: 1px solid #4a6b53;
  border-radius: 14px;
  background: linear-gradient(140deg, #233a2c, #1b3024);
}
.link-summary h3 {
  margin: 0 0 12px;
  font-size: 16px;
}
.link-summary dl {
  margin: 0;
}
.link-summary dl div {
  padding: 10px 0;
  border-top: 1px solid #45614c;
}
.link-summary dt {
  color: #a9bbad;
  font-size: 14px;
}
.link-summary dd {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
}
.link-summary > p {
  color: #add8bc;
  font-size: 13px;
}
.link-rules-layout {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}
.link-rule-column {
  min-width: 0;
}
.link-rule-column header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}
.link-rule-column h3 {
  margin: 0;
  font-size: 15px;
}
.link-rule-column header span {
  flex: none;
  padding: 5px 7px;
  border-radius: 6px;
  background: #294637;
  color: #abd8bb;
  font-size: 11px;
}
.link-rule-column header h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.link-rule-column header .link-rule-icon {
  display: inline-grid;
  place-items: center;
  width: 27px;
  height: 27px;
  padding: 0;
  border: 1px solid #54806a;
  border-radius: 7px;
  font-size: 17px;
}
.link-rule-column header > span {
  white-space: nowrap;
}
.link-rule-column > p {
  color: #a0b0a3;
  font-size: 13px;
}
.link-rule-core {
  background: linear-gradient(150deg, #254031, #1b2d23);
  border-color: #50725a;
}
.link-rule-fixed {
  padding: 14px 0;
  border-top: 1px solid #4d6d56;
}
.link-rule-library {
  padding: 12px;
  border: 1px solid #527a60;
  border-radius: 10px;
  background: #284736;
}
.link-rule-library > p {
  margin: 7px 0 12px 20px;
  color: #aec4b3;
  font-size: 12px;
}
.link-rule-library-list {
  max-height: 200px;
  overflow: auto;
  padding: 6px;
  border: 1px solid #4b7159;
  border-radius: 9px;
}
.link-rule-library-list div {
  margin-bottom: 6px;
  padding: 10px 6px;
  border: 1px solid #4b7159;
  border-radius: 7px;
  color: #95b7a0;
  font-size: 11px;
  letter-spacing: 1px;
}
.link-section-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.link-section-bottom span {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}
.link-section-bottom button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #acd9ba;
  font-size: 13px;
}
.link-modal .ios-version-picker {
  margin-top: 12px;
  padding: 10px;
  background: #17261c;
  border-color: #41614b;
}
.link-modal .ios-version-picker strong {
  font-size: 13px;
}
.link-modal .ios-version-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 4px;
}
.link-modal .ios-version-options label {
  margin: 6px 0;
  font-size: 12px;
}
.link-modal .ios-version-picker p {
  margin: 6px 0 0;
  color: #a4b8a8;
  font-size: 11px;
}
.link-rule-fixed strong,
.link-rule-fixed small {
  display: block;
}
.link-rule-fixed small {
  margin: 6px 0 0 20px;
  color: #aac0ae;
  line-height: 1.4;
}
.link-rule-note {
  padding: 14px;
  border: 1px solid #50725a;
  border-radius: 10px;
  line-height: 1.5;
}
.link-rule-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.link-rule-actions button {
  padding: 8px 10px;
  background: #21342a;
  border-color: #344b3a;
  font-size: 13px;
}
.link-rule-toggle {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 10px;
  margin: 8px 0 !important;
  border: 1px solid #3a5945;
  border-radius: 12px;
  background: #121f18;
  cursor: pointer;
}
.link-rule-toggle > span:first-child {
  flex: 1;
  min-width: 0;
}
.link-rule-toggle strong,
.link-rule-toggle small {
  display: block;
}
.link-rule-toggle small {
  margin-top: 5px;
  color: #a5b4a7;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}
.link-rule-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.link-switch {
  position: relative;
  flex: none;
  width: 42px;
  height: 24px;
  border: 1px solid #648371;
  border-radius: 20px;
  background: #30483a;
}
.link-switch::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #d8e5db;
  transition: transform 0.15s;
}
.link-rule-toggle input:checked + .link-switch {
  background: #5b9773;
}
.link-rule-toggle input:checked + .link-switch::before {
  transform: translateX(17px);
}
.link-rule-toggle input:focus-visible + .link-switch {
  outline: 2px solid #b2e7c3;
  outline-offset: 2px;
}
.link-rule-extra {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 18px;
  margin-top: 18px;
  padding: 20px;
  border: 1px solid #344b3d;
  border-radius: 14px;
}
.link-rule-extra label {
  margin: 0;
}
.link-rule-extra input {
  grid-row: 2;
}
.link-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: none;
  padding: 12px 20px;
  border-top: 1px solid #334b3b;
  background: #1a2d21;
}
.link-modal-footer span {
  margin-right: 4px;
  color: #a6b4a7;
  font-size: 13px;
}
.link-modal-footer button.primary {
  background: #719c82;
  color: #112219;
}
@media (max-width: 1200px) {
  .link-settings-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
  }
  .link-platforms {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .link-rules-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 800px) {
  .link-modal {
    height: 96vh;
    max-height: 96vh;
  }
  .link-modal-head {
    padding: 16px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .link-modal-head h2 {
    font-size: 20px;
  }
  .link-modal-icon {
    width: 42px;
    height: 42px;
    font-size: 22px;
  }
  .link-modal-tabs {
    order: 3;
    width: 100%;
    margin-left: 0;
  }
  .link-modal-tabs button {
    flex: 1;
  }
  .link-modal-body {
    padding: 16px;
  }
  .link-settings-layout,
  .link-rules-layout,
  .link-rule-extra {
    grid-template-columns: 1fr;
  }
  .link-summary {
    position: static;
  }
  .link-platforms {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .link-rule-extra input {
    grid-row: auto;
  }
  .link-modal-footer {
    padding: 12px 16px;
  }
  .link-modal-footer span {
    margin-right: auto;
  }
}
.twocol {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.alert {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: #173b3d;
  color: #e7fffd;
  border: 1px solid #3ddbc8;
  border-radius: 10px;
  padding: 12px 20px;
  z-index: 30;
}
.error {
  background: #4b2029;
  border-color: #ff7575;
}
.editor {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 210px;
  gap: 16px;
}
.canvas {
  margin: auto;
  background: white;
  color: #1a2732;
  min-height: 360px;
  padding: 25px;
  border-radius: 8px;
}
.canvas[contenteditable] {
  outline: 2px solid #25d7cb;
}
.tabs button {
  margin-right: 8px;
}
.inspector {
  border-left: 1px solid #294056;
  padding-left: 14px;
}
.inspector button {
  width: 100%;
  text-align: left;
  margin: 3px 0;
}
.palette button {
  cursor: grab;
}
.component-tree {
  max-height: 210px;
  overflow: auto;
}
.component-tree button {
  font-size: 12px;
}
.signin {
  max-width: 420px;
  margin: 12vh auto;
}
.totp-qr {
  display: block;
  width: 220px;
  max-width: 100%;
  margin: 18px auto;
  border-radius: 12px;
}
.totp-secret {
  display: block;
  overflow-wrap: anywhere;
  margin: 8px 0 18px;
  color: #a9d8bd;
}
.chart {
  display: flex;
  align-items: end;
  height: 180px;
  gap: 15px;
}
.bar {
  flex: 1;
  background: linear-gradient(#44dcce, #218eae);
  border-radius: 5px 5px 0 0;
  min-height: 2px;
}
.tiny {
  font-size: 12px;
  color: #8ca6b9;
  word-break: break-all;
}
@media (max-width: 850px) {
  .layout {
    grid-template-columns: 1fr;
  }
  aside {
    position: static;
  }
  nav {
    display: flex;
    overflow: auto;
  }
  nav button {
    width: auto;
    white-space: nowrap;
  }
  .grid,
  .editor {
    grid-template-columns: 1fr;
  }
  main {
    padding: 20px;
  }
  .twocol {
    grid-template-columns: 1fr;
  }
  .rule-grid {
    grid-template-columns: 1fr;
  }
}

/* Shared workspace surfaces */
.overview-hero {
  position: relative;
  overflow: hidden;
  min-height: 207px;
  padding: 36px;
  border: 1px solid #395743;
  border-radius: 15px;
  background:
    radial-gradient(circle at 80% 10%, #2d533b, transparent 42%),
    linear-gradient(110deg, #172a1e, #234632);
}
.overview-hero h2 {
  font-size: 28px;
  margin-bottom: 12px;
}
.overview-hero p {
  margin: 0 0 20px;
  color: #b8ccbd;
}
.overview-hero > span {
  position: absolute;
  right: 36px;
  top: -30px;
  color: #91c39a22;
  font-size: 180px;
  font-weight: 800;
  pointer-events: none;
}
.overview-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.overview-stats .card {
  margin: 14px 0 0;
  min-height: 132px;
}
.overview-stats small {
  color: #a2b2a5;
  font-size: 12px;
}
.overview-stats .stat {
  font-size: 29px;
  margin: 12px 0;
  overflow-wrap: anywhere;
}
.overview-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(260px, 1fr);
  gap: 14px;
}
.overview-bottom > .card {
  min-height: 262px;
  margin-top: 14px;
}
.overview-bottom .muted {
  margin: 0;
  font-size: 12px;
}
.overview-bottom .chart {
  display: flex;
  height: 178px;
  gap: 8px;
  margin-top: 12px;
  border-bottom: 1px solid #344439;
  background: repeating-linear-gradient(
    to top,
    transparent 0 43px,
    #29392f 44px 45px
  );
}
.chart-day {
  display: flex;
  align-items: center;
  justify-content: end;
  flex-direction: column;
  flex: 1;
  height: 100%;
  min-width: 0;
}
.chart-day .bar {
  width: 100%;
  max-width: 28px;
  flex: none;
  background: linear-gradient(#9fd8b5, #416b4f);
}
.chart-day small {
  margin: 5px 0 2px;
  color: #849889;
  font-size: 9px;
  white-space: nowrap;
}
.quick-links button {
  display: block;
  position: relative;
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid #314339;
  background: #18221b;
  text-align: left;
  font-weight: 700;
}
.quick-links button small {
  display: block;
  margin-top: 4px;
  color: #95a99a;
  font-size: 11px;
  font-weight: 400;
}
.quick-links button > span {
  position: absolute;
  right: 12px;
  top: 18px;
  color: #a8d8b6;
}
.data-card {
  padding: 0;
  overflow: hidden;
}
.data-card > h2,
.data-card > p,
.data-card > .row,
.data-card > .tabs {
  margin-left: 18px;
  margin-right: 18px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px;
}
.section-head h2 {
  margin: 0 0 5px;
}
.section-head p {
  margin: 0;
  font-size: 12px;
}
.section-note {
  margin: 0 !important;
  padding: 0 18px 16px;
  color: #98aa9c;
  font-size: 12px;
}
.list-tools {
  padding: 0 18px 16px;
}
.list-tools input {
  width: min(360px, 100%);
}
.data-card .table {
  margin: 0;
}
.data-card .table td:first-child {
  font-weight: 600;
}
.billing-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 118px;
  padding: 20px;
  background: linear-gradient(100deg, #20382a, #18221c);
}
.billing-balance h2 {
  color: #b9cbbd;
  font-size: 14px;
  font-weight: 500;
}
.billing-balance .stat {
  margin: 4px 0;
}
.billing-balance .stat small {
  font-size: 14px;
  color: #b9cbbd;
}
.billing-balance p {
  margin: 0;
  font-size: 12px;
}
.data-card .tabs {
  padding-top: 4px;
  border-bottom: 1px solid #2b3b31;
}
.data-card .tabs button {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #aebcaf;
}
.data-card .tabs button.active {
  color: #a9d9b8;
  border-bottom: 2px solid #8bbc9c;
}
.data-card #billingTable > p {
  padding: 0 18px 18px;
}
.live-log-card > .row:first-child {
  padding: 18px 18px 0;
  margin: 0;
}
.live-log-card > .row:first-child h2 {
  margin-bottom: 4px;
}
.live-log-card > .row:first-child p {
  margin: 0;
  font-size: 12px;
}
.live-log-card .live-log-tools {
  margin: 0;
  padding: 14px 18px;
}
.live-log-card .live-log-tools select {
  background: #111b15;
}
.log-allowed {
  background: #21412c;
  color: #a9dcb8;
}
.log-blocked {
  background: #3b2630;
  color: #ebb7c8;
}
.rule-group,
.country-picker > details,
.ios-version-picker,
.default-safety-item {
  background: #1b2a20;
  border-color: #395341;
}
.default-safety-item {
  background: #18231b;
}
.inspector {
  border-color: #395341;
}
.tiny {
  color: #92a697;
}
.link-modal {
  box-shadow: 0 24px 70px #0008;
}
.link-modal:has([data-link-panel="rules"][hidden]) {
  width: min(1040px, 100%);
}
@media (max-width: 1150px) {
  .overview-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .overview-bottom {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 850px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .layout main {
    padding: 0;
  }
  .layout > .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 12px;
  }
  .sidebar .brand,
  .sidebar .nav-label {
    display: none;
  }
  .sidebar-user {
    margin: 8px 0 0;
    padding: 4px 0 0;
    border-top: 1px solid #26362c;
  }
  .sidebar nav {
    display: flex;
    gap: 4px;
    overflow-x: auto;
  }
  .sidebar nav button {
    width: auto;
    white-space: nowrap;
  }
  .topbar {
    min-height: 46px;
    padding: 0 16px;
  }
  .topbar .workspace-badge {
    display: none;
  }
  .page-main {
    padding: 24px 16px 40px;
  }
  .overview-hero {
    padding: 24px;
  }
  .overview-hero > span {
    font-size: 90px;
    top: 20px;
  }
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 520px) {
  h1 {
    font-size: 28px;
  }
  .overview-stats {
    grid-template-columns: 1fr;
  }
  .overview-hero > span {
    display: none;
  }
  .page-header button {
    padding: 7px;
    font-size: 11px;
  }
  .workspace-badge {
    display: none;
  }
}
