body { background: #F3F4F6; }

.panel-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 24px;
  background: var(--cr-navy);
  color: white;
}

.panel-nav-brand {
  font-weight: 800;
  font-size: 18px;
  margin-right: 18px;
}

.panel-nav a {
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
}

.panel-nav a:hover { color: white; background: rgba(255,255,255,0.08); }
.panel-nav a.is-active { color: var(--cr-navy); background: var(--cr-orange-2); }
.panel-nav-logout { margin-left: auto; }

.lang-switcher {
  position: fixed;
  top: 14px;
  right: 18px;
  z-index: 60;
  display: flex;
  gap: 4px;
}

.lang-link {
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-decoration: none;
  background: rgba(27,42,74,0.08);
  color: var(--cr-navy);
}

.lang-link.is-active { background: var(--cr-orange-2); color: var(--cr-navy); }

.panel-nav .lang-switcher { position: static; margin-left: 10px; }
.panel-nav .lang-link { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.85); }
.panel-nav .lang-link.is-active { background: var(--cr-orange-2); color: var(--cr-navy); }

.panel-main { padding: 24px 32px 60px; max-width: 1200px; margin: 0 auto; }

.panel-card {
  background: white;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(27,42,74,0.08);
  padding: 22px 24px;
  margin-bottom: 20px;
}

.panel-card h2 { margin-top: 0; font-size: 18px; color: var(--cr-navy); }
.panel-card h3 { font-size: 15px; color: var(--cr-navy); }

.panel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--cr-gray); margin-bottom: 4px; }
.field input[type=text], .field input[type=number], .field input[type=datetime-local], .field select {
  width: 100%; padding: 9px 11px; border: 1px solid #D8DCE3; border-radius: 8px; font-size: 14px; font-family: inherit;
}
.field input[type=color] { width: 60px; height: 36px; border: 1px solid #D8DCE3; border-radius: 8px; padding: 2px; }
.field-row { display: flex; gap: 14px; }
.field-row .field { flex: 1; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: 8px; border: none;
  font-weight: 700; font-size: 14px; cursor: pointer;
  background: var(--cr-navy); color: white;
}
.btn:hover { opacity: 0.9; }
.btn-orange { background: var(--cr-orange-2); color: var(--cr-navy); }
.btn-outline { background: white; color: var(--cr-navy); border: 1px solid #D8DCE3; }
.btn-danger { background: #E24C4C; color: white; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

table.data-table { width: 100%; border-collapse: collapse; }
table.data-table th { text-align: left; font-size: 12px; text-transform: uppercase; color: var(--cr-gray); padding: 10px 10px; border-bottom: 2px solid #EEF0F3; }
table.data-table td { padding: 10px 10px; border-bottom: 1px solid #EEF0F3; font-size: 14px; }
.swatch { display: inline-block; width: 18px; height: 18px; border-radius: 50%; vertical-align: middle; }

.login-wrap { max-width: 360px; margin: 90px auto 0; }
.login-wrap .panel-card { text-align: center; }
.error-text { color: #E24C4C; font-weight: 700; font-size: 13px; margin-top: 8px; }

.live-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.state-readout { font-size: 12px; color: var(--cr-gray); background: #F3F4F6; border-radius: 8px; padding: 10px 12px; white-space: pre-wrap; font-family: monospace; }
.toggle-row { display: flex; align-items: center; gap: 10px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; background: #EEF0F3; color: var(--cr-gray); }
.pill.on { background: #E7F6EC; color: #1E8E3E; }

.country-reference {
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
}

.country-reference #country-search {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #D8DCE3;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 4px;
}

.country-reference ul {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
  border-top: 1px solid #EEF0F3;
}

.country-reference li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 4px;
  border-bottom: 1px solid #F3F4F6;
  font-size: 13px;
  cursor: pointer;
}

.country-reference li:hover { background: #F8F9FB; }

.country-reference li img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
}

.country-reference .country-code {
  font-weight: 800;
  color: var(--cr-navy);
  text-transform: uppercase;
  width: 26px;
  flex: none;
}

.country-reference .country-name {
  color: var(--cr-gray);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
