:root {
  --bg-main: #333333;
  --bg-titlebar: #2a2a2a;
  --text-primary: #ffffff;
  --text-secondary: #cccccc;
  --text-muted: #999999;
  --btn-gap: 12px;
  --btn-radius: 12px;

  --color-print: #4c4491;
  --color-dialog: #009600;
  --color-clone: #f37321;
  --color-tui: #00b000;
  --color-gui: #007a00;
  --color-base: #d4af37;
  --color-shredhdd: #ff5733;
  --color-iso: #4c4491;
  --color-boot: #00008b;
  --color-wipessd: #ff5733;
  --color-clean: #8b008b;
  --color-maj: #000080;
}

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

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg-main);
  min-height: 100vh;
}

.window {
  display: flex;
  flex-direction: column;
  width: 960px;
  height: 600px;
  background: var(--bg-main);
  border: 1px solid #1a1a1a;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transition: width 0.2s, height 0.2s;
}

.window--maximized {
  width: 100vw;
  height: 100vh;
  border: none;
  box-shadow: none;
}

.window--minimized {
  height: auto;
}

.window--minimized .content {
  display: none;
}

/* Titlebar */
.titlebar {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 36px;
  background: var(--bg-titlebar);
  flex-shrink: 0;
  user-select: none;
}

.titlebar__title {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.titlebar__controls {
  position: absolute;
  right: 0;
  top: 0;
  display: flex;
  height: 100%;
}

.titlebar__btn {
  width: 46px;
  height: 100%;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.titlebar__btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.titlebar__btn--close:hover {
  background: #c42b1c;
  color: #fff;
}

/* Content */
.content {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.panel-left {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.panel-left--sheet {
  padding: 12px;
  background: #3a3a3a;
}

.panel-left--logs {
  padding: 16px;
}

.print-sheet {
  background: #f0f0eb;
  min-height: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.print-sheet__content {
  margin: 0;
  padding: 20px 24px 32px;
  font-family: "Courier New", Courier, monospace;
  font-size: 11px;
  line-height: 1.4;
  color: #111;
  white-space: pre-wrap;
  word-wrap: break-word;
  background: transparent;
  border: none;
}

.panel-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 32px 16px;
  gap: 20px;
}

/* Prereq button */
.prereq-btn {
  align-self: center;
  padding: 10px 28px;
  border: none;
  border-radius: 999px;
  background: #555555;
  color: var(--text-secondary);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.prereq-btn:hover:not(:disabled) {
  background: #666666;
}

.prereq-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.prereq-btn--loading {
  opacity: 0.7;
  cursor: wait;
}

/* Tool grid */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: var(--btn-gap);
  flex: 1;
}

.tool-btn {
  border: none;
  border-radius: var(--btn-radius);
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: filter 0.15s, opacity 0.15s;
  min-height: 80px;
}

.tool-btn:hover:not(:disabled):not(.tool-btn--locked):not([aria-disabled="true"]) {
  filter: brightness(1.1);
}

.tool-btn:active:not(:disabled):not(.tool-btn--locked):not([aria-disabled="true"]) {
  filter: brightness(0.95);
}

.tool-btn:disabled,
.tool-btn--locked,
.tool-btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}

.tool-btn[data-tool="PRINT"] { background: var(--color-print); }
.tool-btn[data-tool="DIALOG"] { background: var(--color-dialog); }
.tool-btn[data-tool="CLONE"] { background: var(--color-clone); }
.tool-btn[data-tool="TUI"] { background: var(--color-tui); }
.tool-btn[data-tool="GUI"] { background: var(--color-gui); }
.tool-btn[data-tool="BASE"] { background: var(--color-base); }
.tool-btn[data-tool="SHREDHDD"] { background: var(--color-shredhdd); }
.tool-btn[data-tool="ISO"] { background: var(--color-iso); }
.tool-btn[data-tool="BOOT"] { background: var(--color-boot); }
.tool-btn[data-tool="WIPESSD"] { background: var(--color-wipessd); }
.tool-btn[data-tool="CLEAN"] { background: var(--color-clean); }
.tool-btn[data-tool="MAJ"] { background: var(--color-maj); }

/* Footer */
.footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--btn-gap);
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding-top: 4px;
}

.footer__clock,
.footer__timer {
  font-variant-numeric: tabular-nums;
}

.footer__copyright {
  font-size: 11px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay[hidden] {
  display: none;
}

.modal {
  background: #3a3a3a;
  border: 1px solid #555;
  border-radius: 8px;
  padding: 24px 28px;
  min-width: 320px;
  max-width: 420px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.modal__title {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}

.modal__message {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 20px;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal__btn {
  padding: 8px 20px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: filter 0.15s;
}

.modal__btn:hover {
  filter: brightness(1.15);
}

.modal__btn--primary {
  background: #0078d4;
  color: #fff;
}

.modal__btn--secondary {
  background: #555;
  color: var(--text-secondary);
}

.modal__btn--danger {
  background: #c42b1c;
  color: #fff;
}

/* Log entries */
.log-entry {
  margin-bottom: 2px;
}

.log-entry .log-time {
  color: var(--text-muted);
}

.log-entry .log-tool {
  color: #7ec8e3;
  font-weight: 600;
}

/* Dialog menu (ncurses style) */
.panel-left--dialog {
  padding: 0;
  background: #c0c0c0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.dialog-box {
  width: 92%;
  max-width: 520px;
  background: #c0c0c0;
  border: 1px solid #808080;
  box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #404040;
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  color: #000;
  padding: 4px 8px 10px;
}

.dialog-box__title {
  text-align: center;
  color: #000080;
  font-weight: normal;
  margin-bottom: 6px;
  padding-top: 2px;
}

.dialog-box__instructions {
  color: #404040;
  line-height: 1.35;
  margin-bottom: 8px;
  padding: 0 4px;
}

.dialog-list-wrapper {
  border: 1px solid #808080;
  box-shadow: inset 1px 1px 0 #404040, inset -1px -1px 0 #dfdfdf;
  background: #c0c0c0;
  margin: 0 4px;
  position: relative;
}

.dialog-list {
  height: 200px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 0;
  scrollbar-width: none;
}

.dialog-list::-webkit-scrollbar {
  display: none;
}

.dialog-item {
  display: block;
  width: 100%;
  padding: 0 6px;
  border: none;
  background: transparent;
  text-align: left;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  white-space: nowrap;
  color: #000080;
  line-height: 1.45;
}

.dialog-item__key {
  color: #aa0000;
}

.dialog-item__label {
  color: #000080;
}

.dialog-item--selected {
  background: #0000aa;
}

.dialog-item--selected .dialog-item__key {
  color: #aa0000;
}

.dialog-item--selected .dialog-item__label {
  color: #ffff55;
}

.dialog-list__scroll-hint {
  display: flex;
  justify-content: space-between;
  padding: 2px 8px 4px;
  font-size: 12px;
  pointer-events: none;
}

.dialog-list__scroll-down {
  color: #00aa00;
}

.dialog-list__scroll-pct {
  color: #5555ff;
}

.dialog-footer {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 10px;
  padding: 0 4px;
}

.dialog-btn {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: inherit;
  color: #000080;
  cursor: pointer;
  padding: 2px 4px;
}

.dialog-btn__key {
  color: inherit;
}

.dialog-btn--focused {
  background: #0000aa;
  color: #c0c0c0;
}

.dialog-btn--focused .dialog-btn__key {
  color: #ffff55;
}

/* System info graph */
.panel-left--sysinfo {
  padding: 12px;
  background: #2a2a2a;
  overflow-y: auto;
}

.sysinfo {
  background: #f5f5f0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: #222;
  min-height: 100%;
  overflow: hidden;
}

.sysinfo__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: linear-gradient(180deg, #5a6a7a 0%, #4a5a6a 100%);
  color: #fff;
}

.sysinfo__title {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}

.sysinfo__live {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #b8d4b8;
}

.sysinfo__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5cb85c;
  animation: sysinfo-pulse 1.5s ease-in-out infinite;
}

@keyframes sysinfo-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.sysinfo__close {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.sysinfo__close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.sysinfo__machine {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #e8e8e3;
  border-bottom: 1px solid #ccc;
}

.sysinfo__machine-icon {
  font-size: 28px;
}

.sysinfo__machine-name {
  font-size: 14px;
  font-weight: 600;
}

.sysinfo__machine-sn {
  font-size: 11px;
  color: #666;
  margin-top: 2px;
}

.sysinfo__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px;
}

.sysinfo-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px 12px;
}

.sysinfo-card--disk {
  grid-column: 1 / -1;
}

.sysinfo-card__title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #555;
  margin: 0 0 6px;
}

.sysinfo-card__subtitle {
  font-size: 12px;
  font-weight: 500;
  margin: 0 0 3px;
  line-height: 1.3;
}

.sysinfo-card__meta {
  font-size: 10px;
  color: #777;
  margin: 0 0 8px;
}

.sysinfo-card__meta--muted {
  color: #999;
  font-style: italic;
}

.sysinfo-card__warn {
  font-size: 10px;
  color: #c9302c;
  font-weight: 600;
  margin: 4px 0 0;
}

.sysinfo-card__meter-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sysinfo-card__meter {
  flex: 1;
}

.sysinfo-meter {
  height: 10px;
  background: #e8e8e8;
  border-radius: 5px;
  overflow: hidden;
}

.sysinfo-meter__fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.6s ease;
}

.sysinfo-card__pct {
  font-size: 12px;
  font-weight: 700;
  color: #444;
  min-width: 32px;
  text-align: right;
}

.sysinfo-card__disk-layout {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sysinfo-donut {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sysinfo-donut span {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #444;
}

.sysinfo-card__status {
  font-size: 11px;
  font-weight: 600;
  margin-top: 4px;
}

.sysinfo-card__status--ok {
  color: #3c763d;
}

/* Monitor test */
.panel-left--monitest {
  padding: 16px;
  background: #2a2a2a;
  overflow-y: auto;
}

.monitest-output {
  margin: 0;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  line-height: 1.6;
  color: #ccc;
  white-space: pre-wrap;
}

.monitest-line {
  margin-bottom: 2px;
}

.monitest-line--head {
  color: #7ec8e3;
  font-weight: 600;
}

.monitest-line--pass {
  color: #5cb85c;
  font-weight: 600;
  margin-top: 6px;
}

/* Keyboard test */
.panel-left--keytest {
  padding: 16px;
  background: #2a2a2a;
  overflow-y: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.keytest-screen {
  width: 100%;
  max-width: 420px;
  font-family: "Courier New", Courier, monospace;
  color: #ccc;
}

.keytest-header {
  font-size: 13px;
  color: #7ec8e3;
  font-weight: 600;
  margin-bottom: 16px;
  text-align: center;
}

.keytest-keyboard {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.keytest-row {
  display: flex;
  gap: 4px;
  justify-content: center;
}

.keytest-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 32px;
  padding: 0 6px;
  background: #444;
  border: 1px solid #666;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #ddd;
  user-select: none;
  transition: background 0.08s, border-color 0.08s, color 0.08s;
}

.keytest-key--active {
  background: #d4a017;
  border-color: #f0c040;
  color: #1a1a1a;
}

.keytest-key--tested {
  background: #2d6a2d;
  border-color: #5cb85c;
  color: #e8ffe8;
}

.keytest-key--active.keytest-key--tested {
  background: #d4a017;
  border-color: #f0c040;
  color: #1a1a1a;
}

.keytest-stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  margin-bottom: 14px;
  text-align: center;
}

.keytest-finish {
  display: block;
  margin: 0 auto;
  padding: 6px 16px;
  border: 1px solid #555;
  border-radius: 4px;
  background: #3a3a3a;
  color: #7ec8e3;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.keytest-finish:hover {
  background: #4a4a4a;
}

/* TUI msgbox (whiptail/dialog style) */
.panel-left--tui {
  padding: 0;
  background: #0000aa;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}

.tui-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #0000aa;
  min-height: 100%;
}

.tui-screen__title {
  padding: 4px 8px;
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  color: #00ffff;
  background: #0000aa;
}

.tui-msgbox-shadow {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
}

.tui-msgbox-shadow::after {
  content: "";
  position: absolute;
  width: calc(100% - 48px);
  max-width: 472px;
  height: 100%;
  max-height: 320px;
  background: #000;
  transform: translate(6px, 6px);
  z-index: 0;
}

.tui-msgbox {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  background: #c0c0c0;
  border: 1px solid #808080;
  box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #404040;
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  padding: 4px 8px 12px;
}

.tui-msgbox__title {
  text-align: center;
  color: #000080;
  margin-bottom: 8px;
  padding-top: 2px;
}

.tui-msgbox__content {
  margin: 0 4px 12px;
  padding: 8px 10px;
  background: #c0c0c0;
  border: 1px solid #808080;
  box-shadow: inset 1px 1px 0 #404040, inset -1px -1px 0 #dfdfdf;
  font-family: inherit;
  font-size: inherit;
  color: #000;
  line-height: 1.4;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.tui-msgbox__footer {
  display: flex;
  justify-content: center;
  padding-top: 4px;
}

.tui-msgbox__btn {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: inherit;
  color: #000080;
  cursor: pointer;
  padding: 2px 6px;
}

.tui-msgbox__btn--focused {
  background: #0000aa;
  color: #c0c0c0;
}

.tui-msgbox__btn-key {
  color: #ffff55;
}

.tui-msgbox-shadow--disk::after {
  max-width: 520px;
  max-height: 280px;
}

.tui-msgbox--wide {
  max-width: 500px;
}

.tui-disk__prompt {
  margin: 0 4px 8px;
  padding: 0 4px;
  color: #000;
  font-family: inherit;
  font-size: inherit;
}

.tui-radiolist {
  margin: 0 4px 12px;
  padding: 4px 0;
  min-height: 120px;
  background: #c0c0c0;
  border: 1px solid #808080;
  box-shadow: inset 1px 1px 0 #404040, inset -1px -1px 0 #dfdfdf;
}

.tui-radiolist__item {
  display: block;
  width: 100%;
  padding: 0 8px;
  border: none;
  background: transparent;
  text-align: left;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  line-height: 1.5;
  color: #000080;
}

.tui-radiolist__key {
  color: #aa0000;
}

.tui-radiolist__label {
  color: #000080;
}

.tui-radiolist__item--selected {
  background: #0000aa;
}

.tui-radiolist__item--selected .tui-radiolist__label {
  color: #ffff55;
}

.tui-msgbox__footer--split {
  justify-content: space-between;
  padding: 4px 12px 0;
}

.tui-disk-analysis {
  margin: 0 4px 8px;
  padding: 8px 10px;
  min-height: 200px;
  max-height: 240px;
  overflow-y: auto;
  background: #c0c0c0;
  border: 1px solid #808080;
  box-shadow: inset 1px 1px 0 #404040, inset -1px -1px 0 #dfdfdf;
  font-family: inherit;
  font-size: inherit;
  color: #000;
  line-height: 1.45;
}

.tui-disk-analysis__line {
  margin-bottom: 2px;
}

.tui-disk-analysis__line--warn {
  color: #aa0000;
  font-weight: 600;
}

.tui-disk-analysis__line--done {
  color: #006400;
  font-weight: 600;
  margin-top: 6px;
}

.tui-scrollbox-wrapper {
  position: relative;
  margin: 0 4px 8px;
}

.tui-scrollbox {
  margin: 0;
  padding: 8px 10px 20px;
  height: 220px;
  overflow-y: auto;
  background: #c0c0c0;
  border: 1px solid #808080;
  box-shadow: inset 1px 1px 0 #404040, inset -1px -1px 0 #dfdfdf;
  font-family: inherit;
  font-size: 12px;
  color: #000;
  line-height: 1.35;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.tui-scrollbox__pct {
  position: absolute;
  right: 12px;
  bottom: 6px;
  font-size: 12px;
  color: #5555ff;
  pointer-events: none;
  background: #c0c0c0;
  padding: 0 2px;
}

/* CPU stress test */
.tui-screen--stress {
  background: #808080;
}

.tui-msgbox-shadow--stress::after {
  max-width: 520px;
  max-height: 260px;
}

.tui-msgbox--stress {
  max-width: 500px;
  min-height: 200px;
}

.tui-msgbox__content--stress {
  min-height: 80px;
  margin-bottom: 8px;
}

.tui-gauge {
  margin: 0 4px 8px;
  padding: 0 2px;
}

.tui-gauge__track {
  position: relative;
  height: 22px;
  background: #a8a8a8;
  border: 1px solid #404040;
  box-shadow: inset 1px 1px 0 #606060;
  overflow: hidden;
}

.tui-gauge__fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: #0000aa;
  transition: width 0.15s linear;
}

.tui-gauge__label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  color: #5555ff;
  z-index: 1;
}

/* Internet connection test */
.tui-msgbox--internet {
  min-height: 220px;
}

.internet-test__log {
  margin: 0 4px 8px;
  padding: 8px 10px;
  min-height: 120px;
  max-height: 140px;
  overflow-y: auto;
  background: #c0c0c0;
  border: 1px solid #808080;
  box-shadow: inset 1px 1px 0 #404040, inset -1px -1px 0 #dfdfdf;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  color: #000;
  line-height: 1.45;
}

.internet-test__line {
  margin-bottom: 2px;
}

.internet-test__line--head {
  color: #000080;
  font-weight: 600;
}

.internet-test__line--pass {
  color: #006400;
  font-weight: 600;
  margin-top: 6px;
}

.internet-test__line--pkg {
  color: #333;
  padding-left: 8px;
}

/* Clone disk window */
.clone-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
}

.clone-overlay[hidden] {
  display: none;
}

.clone-window {
  width: 620px;
  max-width: 92vw;
  background: #1a1a1a;
  border: 1px solid #0d0d0d;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.clone-window__titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 32px;
  padding: 0 12px;
  background: #141414;
  border-bottom: 1px solid #2a2a2a;
  color: #bbb;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3px;
  user-select: none;
}

.clone-window__close {
  width: 32px;
  height: 26px;
  border: none;
  background: transparent;
  color: #aaa;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.clone-window__close:hover {
  background: #c42b1c;
  color: #fff;
}

.clone-window__body {
  padding: 0;
  background: #2b2b2b;
  min-height: 380px;
}

.clone-terminal {
  padding: 28px 32px 32px;
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  line-height: 1.55;
  color: #c8c8c8;
  min-height: 380px;
  display: flex;
  flex-direction: column;
}

.clone-terminal__title {
  text-align: center;
  margin-bottom: 28px;
  color: #d8d8d8;
}

.clone-terminal__disk-info {
  margin: 0 auto 24px;
  width: 100%;
  max-width: 420px;
}

.clone-terminal__row {
  display: flex;
  white-space: pre;
}

.clone-terminal__label {
  width: 16ch;
  text-align: right;
  flex-shrink: 0;
}

.clone-terminal__sep {
  padding: 0 1ch 0 0.5ch;
  flex-shrink: 0;
}

.clone-terminal__value {
  flex: 1;
}

.clone-terminal__ok {
  text-align: center;
  margin: 20px 0 28px;
  font-size: 15px;
  color: #d8d8d8;
}

.clone-terminal__ok--bottom {
  margin: 16px 0 12px;
}

.clone-terminal__ok-icon {
  color: #4caf50;
}

.clone-terminal__prompt-label {
  text-align: center;
  margin-bottom: 20px;
  color: #c0c0c0;
}

.clone-terminal__input-line {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  min-height: 24px;
}

.clone-terminal__input-prefix {
  color: #c8c8c8;
}

.clone-terminal__input-value {
  color: #fff;
  min-width: 1ch;
}

.clone-terminal__cursor {
  display: inline-block;
  width: 10px;
  height: 18px;
  background: #e8e8e8;
  margin-left: 1px;
  animation: clone-cursor-blink 1s step-end infinite;
}

@keyframes clone-cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.clone-terminal--progress {
  padding-top: 24px;
}

.clone-terminal__log {
  flex: 1;
  max-height: 260px;
  overflow-y: auto;
  margin: 0 auto 16px;
  width: 100%;
  max-width: 500px;
  padding: 0 8px;
}

.clone-terminal__log-line {
  margin-bottom: 4px;
  color: #b8b8b8;
}

.clone-terminal__progress-bar {
  text-align: center;
  font-size: 13px;
  color: #9ecb9e;
  letter-spacing: 0.5px;
  margin-top: 8px;
}

.shred-terminal {
  padding: 24px 26px 30px;
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  line-height: 1.5;
  color: #ddd;
  min-height: 380px;
}

.shred-terminal__banner {
  background: #cc0000;
  color: #fff;
  font-weight: 700;
  padding: 4px 8px;
  margin-bottom: 8px;
}

.shred-terminal__banner--prompt {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  margin-bottom: 6px;
}

.shred-terminal__example {
  margin-left: 8px;
}

.shred-terminal__disk-list {
  background: #ffff00;
  color: #cc0000;
  padding: 6px 10px;
}

.shred-terminal__disk-line {
  white-space: nowrap;
}

.shred-terminal__disk-line--error {
  white-space: normal;
  word-break: break-word;
}

.shred-terminal__hint {
  color: #d0d0d0;
  margin-bottom: 16px;
}

.shred-terminal__input-line {
  display: flex;
  align-items: center;
  min-height: 24px;
}

.shred-terminal__arrow {
  color: #dcdcdc;
  margin-right: 6px;
}

.shred-terminal__device-prefix {
  color: #dcdcdc;
}

.shred-terminal__input-value {
  color: #fff;
  min-width: 1ch;
}

.shred-terminal__cursor {
  display: inline-block;
  width: 10px;
  height: 18px;
  background: #e8e8e8;
  margin-left: 1px;
  animation: clone-cursor-blink 1s step-end infinite;
}

.shred-terminal--progress {
  display: flex;
  flex-direction: column;
}

.shred-terminal__log {
  margin-top: 6px;
  flex: 1;
  max-height: 270px;
  overflow-y: auto;
  color: #bfbfbf;
  padding-right: 4px;
}

.shred-terminal__log-line {
  margin-bottom: 3px;
}

.shred-terminal__progress-bar {
  color: #9ecb9e;
  margin-top: 10px;
}

.shred-terminal__done {
  color: #9ecb9e;
  margin-top: 10px;
}

.clean-terminal {
  padding: 20px 22px 22px;
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  line-height: 1.45;
  color: #d6d6d6;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  background: #2b2b2b;
}

.clean-terminal__log {
  flex: 1;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 6px;
}

.clean-terminal__line {
  margin-bottom: 3px;
  white-space: pre-wrap;
  word-break: break-word;
  color: #c8c8c8;
}

.clean-terminal__line--head {
  color: #ececec;
}

.clean-terminal__line--ok {
  color: #b7e3bf;
}

.clean-terminal__line--done {
  color: #9ecb9e;
  font-weight: 600;
}

.clean-terminal__status {
  margin-top: 10px;
  color: #c9d8cc;
  letter-spacing: 0.2px;
}

.clean-terminal__status--done {
  color: #b7e3bf;
}

.maj-terminal {
  padding: 20px 22px 22px;
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  line-height: 1.45;
  color: #d6d6d6;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  background: #2b2b2b;
}

.maj-terminal__log {
  flex: 1;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 6px;
}

.maj-terminal__line {
  margin-bottom: 3px;
  white-space: pre-wrap;
  word-break: break-word;
  color: #c8c8c8;
}

.maj-terminal__line--head {
  color: #ececec;
}

.maj-terminal__line--info {
  color: #b8b8b8;
}

.maj-terminal__line--ok {
  color: #9ecb9e;
}

.maj-terminal__line--done {
  color: #9ecb9e;
  font-weight: 600;
}

.maj-terminal__status {
  margin-top: 10px;
  color: #c9d8cc;
  letter-spacing: 0.2px;
}

.maj-terminal__status--done {
  color: #b7e3bf;
}

.iso-terminal {
  padding: 18px 20px 24px;
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  line-height: 1.45;
  color: #d6d6d6;
  min-height: 420px;
  display: flex;
  flex-direction: column;
}

.iso-terminal__log {
  flex: 1;
  max-height: 440px;
  overflow-y: auto;
  padding-right: 4px;
}

.iso-terminal__line {
  margin-bottom: 2px;
  white-space: pre-wrap;
  word-break: break-word;
}

.iso-terminal__title {
  text-align: center;
  color: #ececec;
  margin: 10px 0 8px;
  font-weight: 600;
}

.iso-terminal__ok {
  text-align: center;
  margin: 12px 0;
  color: #d8d8d8;
}

.iso-terminal__ok-icon {
  color: #4caf50;
}

.iso-terminal__brand {
  margin: 12px 0 16px;
}

.iso-terminal__slogan {
  text-align: center;
  margin-bottom: 10px;
  color: #e8e8e8;
}

.iso-terminal__brand-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  max-width: 460px;
  margin: 0 auto;
}

.iso-terminal__brand-cell {
  text-align: center;
  padding: 6px 8px;
  font-weight: 700;
  color: #fff;
}

.iso-terminal__brand-cell--green {
  background: #2e7d32;
}

.iso-terminal__brand-cell--grey {
  background: #cfd8dc;
  color: #1565c0;
}

.iso-terminal__brand-cell--red {
  background: #c62828;
}

.iso-terminal__brand-cell--dark {
  background: #424242;
}

.iso-terminal__progress {
  color: #9ecb9e;
  letter-spacing: 0.3px;
}

.iso-terminal__line--done {
  color: #9ecb9e;
  font-weight: 600;
}

.iso-terminal__done {
  text-align: center;
  color: #9ecb9e;
  margin-top: 10px;
}

.boot-terminal__prompt-line {
  display: flex;
  align-items: center;
  min-height: 20px;
  margin-top: 4px;
}

.boot-terminal__cursor {
  display: inline-block;
  width: 10px;
  height: 16px;
  background: #e8e8e8;
  animation: clone-cursor-blink 1s step-end infinite;
}

/* TUI color menu */
.panel-left--tuimenu {
  padding: 0;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.tuimenu-box {
  width: 92%;
  max-width: 480px;
  border: 2px solid #ffffff;
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
}

.tuimenu-box__header,
.tuimenu-box__footer {
  background: #c0c0c0;
  color: #000;
  text-align: center;
  padding: 6px 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.tuimenu-box__list {
  display: flex;
  flex-direction: column;
  max-height: 420px;
  overflow-y: auto;
}

.tuimenu-item {
  display: flex;
  width: 100%;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  text-align: center;
  min-height: 28px;
  line-height: 28px;
  transition: filter 0.1s;
}

.tuimenu-item:hover {
  filter: brightness(1.12);
  z-index: 1;
  position: relative;
}

.tuimenu-item--selected {
  filter: brightness(1.2);
  outline: 3px solid #ffff00;
  outline-offset: -3px;
  box-shadow: inset 0 0 0 2px #000;
  z-index: 2;
  position: relative;
}

.tuimenu-item__label {
  display: block;
  width: 100%;
  padding: 2px 8px;
}

.tuimenu-item__part {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  white-space: nowrap;
}

.tuimenu-item__part--left {
  justify-content: flex-end;
}

.tuimenu-item__part--right {
  justify-content: flex-start;
}

.panel-left--capsule {
  padding: 0;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.capsule-process {
  width: 92%;
  max-width: 480px;
  border: 2px solid #ffffff;
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.capsule-process__header,
.capsule-process__footer {
  background: #c0c0c0;
  color: #000;
  text-align: center;
  padding: 6px 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.capsule-process__band {
  text-align: center;
  padding: 6px 8px;
  min-height: 28px;
  line-height: 1.3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.capsule-process__band--split {
  display: flex;
  padding: 0;
}

.capsule-process__band-part {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  min-height: 28px;
}

.capsule-process__band-part--left {
  justify-content: flex-end;
}

.capsule-process__band-part--right {
  justify-content: flex-start;
}

.capsule-process__body {
  background: #1a1a1a;
  color: #e8e8e8;
  min-height: 200px;
  max-height: 340px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.capsule-process__log {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.45;
}

.capsule-process__content {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.45;
}

.capsule-process__line {
  margin-bottom: 3px;
  color: #d8d8d8;
}

.capsule-process__line--head {
  color: #ffffff;
}

.capsule-process__line--pass {
  color: #9ec8e8;
  font-weight: 700;
}

.capsule-process__line--warn {
  color: #ffaa66;
}

.capsule-process__line--pkg {
  padding-left: 8px;
  color: #c0c0c0;
}

.capsule-process__message {
  margin: 0 0 12px;
  white-space: pre-wrap;
  font-family: inherit;
  color: #e8e8e8;
}

.capsule-process__subtitle {
  margin-bottom: 8px;
  color: #ffffff;
  font-weight: 700;
}

.capsule-process__actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.capsule-process__btn {
  border: 2px solid #ffffff;
  background: #4a4a4a;
  color: #ffffff;
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 10px;
}

.capsule-process__btn--focused {
  background: #cc0000;
  outline: 2px solid #ffff00;
}

.capsule-gauge {
  margin: 10px 0;
}

.capsule-gauge__track {
  position: relative;
  height: 22px;
  background: #333;
  border: 2px solid #888;
}

.capsule-gauge__fill {
  height: 100%;
  background: linear-gradient(90deg, #cc0000, #ff6600);
  transition: width 0.15s ease;
}

.capsule-gauge__label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.capsule-radiolist__item {
  display: block;
  width: 100%;
  padding: 4px 8px;
  border: none;
  background: transparent;
  color: #e8e8e8;
  text-align: left;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

.capsule-radiolist__item--selected {
  background: #cc0000;
  color: #fff;
}

.capsule-scrollbox {
  max-height: 220px;
  overflow-y: auto;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 12px;
  color: #e0e0e0;
  margin-bottom: 8px;
}

.capsule-sysinfo-wrap .sysinfo {
  transform: scale(0.92);
  transform-origin: top center;
}

.netmonitor-box {
  max-width: 460px;
}

.netmonitor-content {
  min-height: 200px;
  font-size: 12px;
  line-height: 1.45;
}
