示例工程 31-notifications-taskbar

31-notifications-taskbar/app/src/styles/app.css

css · 5.4 KB

.app {
  min-height: 100vh;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand h1 {
  margin: 0 8px 0 0;
  font-size: 15px;
}

.pill {
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
}

.actions {
  display: flex;
  gap: 6px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 16px;
  padding: 16px 20px 24px;
}

.column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.pad {
  padding: 14px;
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.card h2 {
  margin: 0;
  font-size: 13px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
  font-size: 12px;
}

.field > span {
  color: var(--muted);
}

.field input[type="text"],
.field input:not([type]),
.field textarea,
.field select {
  width: 100%;
}

.field input,
.field textarea,
.field select {
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  outline: none;
}

.field textarea {
  resize: vertical;
  line-height: 1.6;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--primary);
}

.field.inline {
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
}

.field.inline input[data-testid="badge-input"] {
  width: 60px;
}

.row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
}

.check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.check select {
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
}

.redacted {
  padding: 10px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--panel);
  font-size: 12px;
}

.redacted strong {
  display: block;
  margin-bottom: 4px;
}

.redacted p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.hits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.hit {
  padding: 1px 8px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 10px;
}

.toast {
  display: flex;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.app-icon {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.toast-body {
  min-width: 0;
}

.toast-body strong {
  font-size: 12px;
}

.toast-body p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.toast-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.toast-action {
  padding: 2px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--primary);
  font-size: 11px;
}

.dock-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dock-icon {
  position: relative;
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, #eff6ff, #dbeafe);
  color: var(--primary);
  font-size: 18px;
  font-weight: 800;
}

.dock-icon::after {
  content: "XW";
}

.badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 18px;
  text-align: center;
}

.badge:empty {
  display: none;
}

.dock-progress {
  position: absolute;
  right: 6px;
  bottom: 6px;
  left: 6px;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.18);
}

.dock-progress > span {
  display: block;
  height: 100%;
  background: var(--primary);
}

.dock-progress > span[data-mode="indeterminate"] {
  width: 40% !important;
  animation: slide 1.2s linear infinite;
}

.dock-progress > span[data-mode="error"] {
  background: var(--danger);
}

.dock-progress > span[data-mode="paused"] {
  background: #b45309;
}

@keyframes slide {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(250%);
  }
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.capabilities {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 12px;
  margin: 12px 0 0;
  padding: 10px 0 0;
  border-top: 1px solid var(--border);
  list-style: none;
  font-size: 11px;
  color: var(--muted);
}

.capabilities li {
  display: flex;
  gap: 6px;
}

.capabilities .on {
  color: #166534;
}

.capabilities .off {
  color: #b45309;
}

.log-card {
  min-height: 160px;
}

.log {
  max-height: 170px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
  font-size: 11px;
}

.log li {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 3px 0;
  border-bottom: 1px solid var(--border);
}

.small {
  font-size: 11px;
}

.muted {
  color: var(--muted);
}