:root {
  --bg: #eef3f8;
  --surface: #ffffff;
  --border: #d5e0ec;
  --text: #102033;
  --muted: #57677c;
  --primary: #0b63d8;
  --danger: #b42318;
  font-family: Segoe UI, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

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

button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  color: #ffffff;
  background: var(--primary);
  cursor: pointer;
}

button.secondary {
  color: var(--text);
  background: #e8f0f8;
  border: 1px solid var(--border);
}

button.danger {
  background: var(--danger);
}

button.full {
  width: 100%;
}

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 320px 1fr;
}

.sidebar {
  padding: 22px;
  color: #ffffff;
  background: #102033;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--primary);
  font-weight: 700;
}

.brand span {
  display: block;
  margin-top: 4px;
  color: #c7d4e4;
  font-size: 13px;
}

.client-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.client-item {
  width: 100%;
  text-align: left;
  padding: 12px;
  border-radius: 6px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.client-item.active {
  background: var(--primary);
}

.client-item small {
  display: block;
  margin-top: 4px;
  color: #d9e7f6;
}

.content {
  padding: 28px;
}

.panel {
  max-width: 1180px;
  margin-bottom: 20px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(16, 32, 51, 0.06);
}

.panel.login {
  max-width: 460px;
}

h1,
h2,
p {
  margin-top: 0;
}

.topbar,
.panel-header,
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#sessionInfo {
  margin-bottom: 0;
  color: var(--muted);
}

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

.grid.wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text);
  background: #ffffff;
}

textarea {
  resize: vertical;
  font-family: Consolas, Monaco, monospace;
  line-height: 1.45;
}

.span-all {
  grid-column: 1 / -1;
}

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

.upload-box {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fbfe;
}

.sync-info {
  display: grid;
  gap: 8px;
}

.sync-info div {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
}

.sync-info dt {
  font-weight: 700;
  color: var(--muted);
}

.sync-info dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 420px;
  border-radius: 8px;
  padding: 12px 14px;
  color: #ffffff;
  background: #0f766e;
  box-shadow: 0 12px 32px rgba(16, 32, 51, 0.2);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  background: var(--danger);
}

@media (max-width: 920px) {
  .layout,
  .grid,
  .grid.wide,
  .asset-grid {
    grid-template-columns: 1fr;
  }
}
