.ftth-client-panel {
  display:grid;
  gap:14px;
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid var(--border);
}

.ftth-client-header {
  position:relative;
  display:grid;
  grid-template-columns:50px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  padding:13px;
  overflow:hidden;
  border:1px solid color-mix(
    in srgb,
    var(--accent) 25%,
    var(--border)
  );
  border-radius:14px;
  background:
    radial-gradient(
      circle at 100% 0,
      color-mix(in srgb,var(--accent) 15%,transparent),
      transparent 45%
    ),
    var(--panel);
}

.ftth-client-avatar {
  display:grid;
  place-items:center;
  width:50px;
  height:50px;
  border-radius:14px;
  background:linear-gradient(145deg,var(--accent),#10a9df);
  box-shadow:0 7px 16px color-mix(
    in srgb,
    var(--accent) 28%,
    transparent
  );
  color:white;
  font-size:21px;
  font-weight:800;
}

.ftth-client-title {
  min-width:0;
}

.ftth-client-title small,
.ftth-client-title span {
  display:block;
  color:var(--muted);
  font-size:10px;
}

.ftth-client-title h3 {
  margin:2px 0;
  overflow:hidden;
  color:var(--text);
  font-size:15px;
  text-overflow:ellipsis;
}

.ftth-client-badge {
  padding:5px 8px;
  border-radius:20px;
  background:rgba(16,163,111,.12);
  color:#079060;
  font-size:9px;
  font-weight:800;
}

.ftth-client-route {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  align-items:center;
  gap:7px;
  padding:10px;
  border:1px dashed var(--border);
  border-radius:11px;
  background:var(--bg);
}

.ftth-client-route div {
  min-width:0;
}

.ftth-client-route small,
.ftth-client-route b {
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
}

.ftth-client-route small {
  color:var(--muted);
  font-size:9px;
}

.ftth-client-route b {
  margin-top:2px;
  font-size:11px;
}

.ftth-client-route > span {
  color:var(--accent);
  font-size:18px;
}

.ftth-client-link,
.ftth-client-connection,
.ftth-client-data {
  display:grid;
  gap:10px;
  padding:13px;
  border:1px solid var(--border);
  border-radius:13px;
  background:var(--panel);
}

.ftth-client-section-title {
  display:flex;
  align-items:center;
  gap:9px;
}

.ftth-client-section-title h4 {
  margin:2px 0 0;
  color:var(--accent);
  font-size:13px;
}

.ftth-client-section-title small {
  color:var(--muted);
  font-size:9px;
}

.ftth-client-section-icon {
  display:grid;
  place-items:center;
  width:31px;
  height:31px;
  border-radius:9px;
  background:rgba(109,93,251,.12);
  color:var(--accent);
  font-size:16px;
  font-weight:800;
}

.ftth-client-section-icon.connection {
  background:rgba(16,169,223,.12);
  color:#098ab8;
}

.ftth-client-section-icon.data {
  background:rgba(16,163,111,.12);
  color:#07875c;
}

.ftth-client-panel label {
  display:grid;
  gap:5px;
  color:var(--muted);
  font-size:10px;
  font-weight:650;
}

.ftth-client-panel input,
.ftth-client-panel select,
.ftth-client-panel textarea {
  width:100%;
  box-sizing:border-box;
  min-height:40px;
  margin:0;
  padding:8px 10px;
  border:1px solid var(--border);
  border-radius:9px;
  outline:none;
  background:var(--bg);
  color:var(--text);
  font:inherit;
  font-size:12px;
}

.ftth-client-panel input:focus,
.ftth-client-panel select:focus,
.ftth-client-panel textarea:focus {
  border-color:var(--accent);
  box-shadow:0 0 0 3px color-mix(
    in srgb,
    var(--accent) 14%,
    transparent
  );
}

.ftth-client-panel textarea {
  min-height:62px;
  resize:vertical;
}

.ftth-client-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}

.ftth-client-status-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px;
}

.ftth-client-status-grid > div {
  min-width:0;
  padding:9px;
  border:1px solid var(--border);
  border-radius:9px;
  background:var(--bg);
}

.ftth-client-status-grid small,
.ftth-client-status-grid strong {
  display:block;
}

.ftth-client-status-grid small {
  color:var(--muted);
  font-size:9px;
}

.ftth-client-status-grid strong {
  margin-top:3px;
  overflow:hidden;
  font-size:11px;
  text-overflow:ellipsis;
}

.ftth-client-status-grid .good,
.ftth-client-status-grid .online {
  color:#079060;
}

.ftth-client-status-grid .bad,
.ftth-client-status-grid .offline {
  color:#e5484d;
}

.ftth-client-status-grid .unknown {
  color:var(--muted);
}

.ftth-client-power-input {
  position:relative;
}

.ftth-client-power-input input {
  padding-right:43px;
}

.ftth-client-power-input span {
  position:absolute;
  top:50%;
  right:9px;
  transform:translateY(-50%);
  color:var(--muted);
  font-size:9px;
  pointer-events:none;
}

.ftth-client-empty-fiber {
  padding:9px;
  border:1px dashed #e9a23b;
  border-radius:9px;
  background:rgba(233,162,59,.08);
  color:var(--muted);
  font-size:10px;
  line-height:1.45;
}

.ftth-client-save {
  width:100%;
  min-height:42px;
}

@media (max-width:450px) {
  .ftth-client-header {
    grid-template-columns:44px minmax(0,1fr);
  }

  .ftth-client-avatar {
    width:44px;
    height:44px;
  }

  .ftth-client-badge {
    grid-column:1/-1;
    width:max-content;
  }

  .ftth-client-grid {
    grid-template-columns:1fr;
  }
}
