*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: #151133;
}

/* ── Toolbar (single row) ── */
#toolbar {
  display: flex;
  align-items: center;
  height: 42px;
  background: #151133;
  padding: 0 8px;
  gap: 4px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

/* ── Nav buttons ── */
.nav-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 0;
  transition: background 0.15s;
  flex-shrink: 0;
}

.nav-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.nav-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.nav-btn:focus-visible {
  outline: 2px solid #D04E20;
  outline-offset: 2px;
}

/* ── Page title ── */
#page-title {
  margin-left: 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: system-ui, -apple-system, sans-serif;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

/* ── Clear cache button (right side) ── */
#btn-clear-cache {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border: none;
  border-radius: 6px;
  background: rgba(208, 78, 32, 0.15);
  color: #D04E20;
  font-size: 12px;
  font-weight: 600;
  font-family: system-ui, -apple-system, sans-serif;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}

#btn-clear-cache:hover {
  background: rgba(208, 78, 32, 0.25);
}

#btn-clear-cache:focus-visible {
  outline: 2px solid #D04E20;
  outline-offset: 2px;
}

/* ── Confirmation modal ── */
.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

.confirm-overlay.hidden {
  display: none;
}

.confirm-dialog {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px 28px;
  max-width: 380px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.confirm-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  font-family: system-ui, -apple-system, sans-serif;
  color: #151133;
}

.confirm-message {
  margin: 0 0 20px;
  font-size: 14px;
  font-family: system-ui, -apple-system, sans-serif;
  color: #718096;
  line-height: 1.4;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.confirm-btn {
  height: 36px;
  padding: 0 16px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  font-family: system-ui, -apple-system, sans-serif;
  cursor: pointer;
  transition: background 0.15s;
}

.confirm-btn:focus-visible {
  outline: 2px solid #D04E20;
  outline-offset: 2px;
}

.confirm-btn-cancel {
  background: #F4F5FB;
  color: #151133;
}

.confirm-btn-cancel:hover {
  background: #E2E4ED;
}

.confirm-btn-proceed {
  background: #D04E20;
  color: #ffffff;
}

.confirm-btn-proceed:hover {
  background: #b8431b;
}

/* ── Content area ── */
#iframe-container {
  position: fixed;
  top: 42px;
  left: 0;
  right: 0;
  bottom: 0;
}

#iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}
