/* ============================================================
   BASE24-eps Simulator — Eclipse IDE Theme
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%; width: 100%;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 12px; color: #1a1a1a;
  background: #1C1C1C;
  overflow: hidden;
}
a { color: inherit; text-decoration: none; }

/* ===================== ECLIPSE WINDOW ===================== */
.eclipse-window {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: #F0F0F0;
}

/* ===================== TITLE BAR ===================== */
.eclipse-titlebar {
  height: 28px; flex-shrink: 0;
  display: flex; align-items: center; padding: 0 8px;
  background: #2B2D3A;
  color: #D4D4D4; font-size: 12px; user-select: none;
}
.eclipse-titlebar .eclipse-logo {
  background: #E05C00; color: #fff; font-weight: bold; font-size: 10px;
  padding: 1px 6px; margin-right: 8px; border-radius: 2px; letter-spacing: .5px;
}
.eclipse-titlebar .title-text { flex: 1; font-size: 12px; }
.eclipse-titlebar .winbtn {
  width: 18px; height: 18px; margin-left: 4px;
  border: none; background: transparent;
  color: #aaa; font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: default; border-radius: 2px; line-height: 1;
}
.eclipse-titlebar .winbtn:hover { background: rgba(255,255,255,.15); color: #fff; }
.eclipse-titlebar .winbtn.close:hover { background: #C42B1C; color: #fff; }

/* ===================== MENU BAR ===================== */
.eclipse-menubar {
  height: 24px; flex-shrink: 0;
  display: flex; align-items: stretch;
  background: #F0F0F0;
  border-bottom: 1px solid #CCCCCC;
  padding: 0 2px;
}
.eclipse-menubar .mi {
  padding: 0 10px;
  display: flex; align-items: center;
  font-size: 12px; cursor: default; color: #1a1a1a;
}
.eclipse-menubar .mi:hover { background: #CCE4F7; }
.eclipse-menubar .mi u { text-decoration: underline; }

/* ===================== TOOLBAR ===================== */
.eclipse-toolbar {
  height: 30px; flex-shrink: 0;
  display: flex; align-items: center; gap: 1px;
  background: #EBEBEB;
  border-bottom: 1px solid #C8C8C8;
  padding: 0 4px;
}
.eclipse-toolbar .tb {
  width: 26px; height: 24px;
  border: 1px solid transparent; border-radius: 2px;
  background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; cursor: default; color: #333;
}
.eclipse-toolbar .tb:hover { background: #CCE4F7; border-color: #82BDDB; }
.eclipse-toolbar .sep { width: 1px; height: 20px; background: #C8C8C8; margin: 0 4px; }
.eclipse-toolbar .tb-spacer { flex: 1; }
.persp-bar {
  display: flex; align-items: center; gap: 1px;
  border-left: 1px solid #C8C8C8; padding-left: 6px; margin-left: 4px;
}
.persp-bar .persp {
  width: 26px; height: 24px;
  border: 1px solid transparent; border-radius: 2px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; cursor: default;
}
.persp-bar .persp.active { background: #CCE4F7; border-color: #82BDDB; }

/* ===================== WORKBENCH ===================== */
.eclipse-workbench {
  flex: 1; display: flex;
  overflow: hidden;
  background: #BCBCBC;
  gap: 1px; min-height: 0;
}

/* ===================== SIDEBAR ===================== */
.eclipse-sidebar {
  width: 220px; flex-shrink: 0;
  display: flex; flex-direction: column;
  background: #F5F5F5;
}
.view-header {
  height: 22px; flex-shrink: 0;
  display: flex; align-items: center; padding: 0 4px 0 6px;
  background: linear-gradient(#EAEAEA, #DCDCDC);
  border-bottom: 1px solid #C4C4C4;
  font-size: 11px; font-weight: bold; color: #444; user-select: none;
}
.view-header .view-title { flex: 1; }
.view-header .view-btn {
  width: 18px; height: 18px; font-size: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #666; cursor: default; border-radius: 2px;
}
.view-header .view-btn:hover { background: #CCE4F7; }

.view-content { flex: 1; overflow-y: auto; }

.tree-group {
  display: flex; align-items: center;
  padding: 5px 8px 2px;
  font-size: 10px; font-weight: bold; color: #888; text-transform: uppercase;
  letter-spacing: .5px; border-top: 1px solid #E8E8E8; margin-top: 2px;
}
.tree-project {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 8px;
  font-size: 11px; font-weight: bold; color: #1a1a1a;
  cursor: default; border-bottom: 1px solid #E4E4E4;
  background: #EFEFEF;
}
.tree-item {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 8px 4px 20px;
  font-size: 11px; color: #333; cursor: default;
}
.tree-item:hover { background: #E1EFFE; }
.tree-item.active { background: #3B78C4; color: #fff; }
.tree-item .ico { font-size: 12px; }

/* ===================== EDITOR AREA ===================== */
.eclipse-editor-area {
  flex: 1; display: flex; flex-direction: column;
  background: #fff; overflow: hidden; min-width: 0;
}

/* Editor Tab Strip */
.editor-tabstrip {
  display: flex; align-items: flex-end;
  background: #EEEEEE;
  border-bottom: 2px solid #C8C8C8;
  padding: 4px 4px 0;
  flex-shrink: 0; min-height: 28px;
  gap: 2px;
}
.editor-tab {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px 3px;
  font-size: 11px; color: #555;
  background: #D4D4D4;
  border: 1px solid #C0C0C0; border-bottom: none;
  border-radius: 3px 3px 0 0;
  white-space: nowrap; cursor: default;
  position: relative; bottom: -2px;
}
.editor-tab.active {
  background: #fff; color: #1a1a1a; font-weight: bold;
  border-color: #C8C8C8; border-bottom: 2px solid #fff;
}
.editor-tab .tab-close {
  font-size: 9px; color: #999;
  width: 14px; height: 14px; border-radius: 2px;
  display: inline-flex; align-items: center; justify-content: center;
}
.editor-tab.active .tab-close:hover { background: #F4A0A0; color: #800; }

/* Editor Content */
.editor-content {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  background: #fff;
}

/* ===================== BOTTOM CONSOLE PANEL ===================== */
.eclipse-bottom {
  height: 150px; min-height: 90px; flex-shrink: 0;
  display: flex; flex-direction: column;
  border-top: 1px solid #BCBCBC;
}
.bottom-tabstrip {
  display: flex; align-items: center;
  background: #EEEEEE;
  border-bottom: 1px solid #C8C8C8;
  padding: 0 4px; flex-shrink: 0; height: 26px;
}
.bottom-tab {
  padding: 3px 12px;
  font-size: 11px; color: #555; cursor: default;
  border: 1px solid transparent;
  border-radius: 3px 3px 0 0;
}
.bottom-tab.active {
  background: #1E1E1E; color: #ccc; font-weight: bold;
  border-color: #555;
}
.bottom-content {
  flex: 1; overflow-y: auto; padding: 5px 10px;
  font-family: Consolas, "Courier New", monospace; font-size: 11px;
  background: #1E1E1E; color: #CCCCCC;
}
.bottom-content .log-line { margin: 1px 0; line-height: 1.6; }
.bottom-content .log-ok   { color: #4EC94E; }
.bottom-content .log-err  { color: #F48771; }
.bottom-content .log-info { color: #9CDCFE; }
.bottom-content .log-warn { color: #CE9178; }

/* ===================== STATUS BAR ===================== */
.eclipse-statusbar {
  height: 20px; flex-shrink: 0;
  display: flex; align-items: center;
  background: #DCDCDC;
  border-top: 1px solid #C0C0C0;
  font-size: 11px; color: #444;
}
.eclipse-statusbar .status-main { flex: 1; padding: 0 8px; }
.eclipse-statusbar .status-seg {
  padding: 0 10px; border-left: 1px solid #C0C0C0;
  height: 100%; display: flex; align-items: center;
  white-space: nowrap;
}

/* ===================== MDI WINDOW (restyled as Eclipse panel) ===================== */
.mdi-window {
  background: #fff;
  border: none; border-bottom: 1px solid #E0E0E0;
  box-shadow: none;
  margin: 0; max-width: none !important;
}
.mdi-title {
  height: 26px;
  display: flex; align-items: center; padding: 0 6px;
  background: linear-gradient(#EAEAEA, #DCDCDC);
  border-bottom: 1px solid #C8C8C8;
  color: #333; font-weight: bold; font-size: 12px;
  flex-shrink: 0;
}
.mdi-title .ico { margin-right: 6px; font-size: 14px; }
.mdi-title .spacer { flex: 1; }
.mini-win {
  width: 16px; height: 15px; border: 1px solid #C4C4C4;
  border-radius: 2px; margin-left: 2px;
  background: #E8E8E8; text-align: center;
  color: #666; font-size: 10px; line-height: 13px; cursor: default;
  display: inline-flex; align-items: center; justify-content: center;
}
.mini-win:hover { background: #CCE4F7; border-color: #82BDDB; }
.mini-win.close:hover { background: #F4A0A0; border-color: #C16060; color: #800; }

.mdi-toolbar {
  display: flex; gap: 2px; padding: 3px 6px;
  border-bottom: 1px solid #E4E4E4; background: #F4F4F4; flex-shrink: 0;
}
.mdi-toolbar .tb {
  width: 22px; height: 22px; border: 1px solid transparent; border-radius: 2px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: default; font-size: 13px; background: none;
}
.mdi-toolbar .tb:hover { border-color: #82BDDB; background: #CCE4F7; }

.mdi-body { padding: 12px 14px; }

/* ===================== FORM FIELDS ===================== */
.form-row { display: flex; align-items: center; margin-bottom: 6px; gap: 6px; }
.form-row label { min-width: 130px; color: #333; font-size: 11px; }
.form-row.req label { color: #0451A5; font-weight: bold; }

input[type=text], select, textarea {
  border: 1px solid #BABABA; padding: 2px 4px;
  font-family: inherit; font-size: 11px;
  background: #fff; height: 22px; color: #1a1a1a;
  border-radius: 0;
}
input[type=text]:focus, select:focus {
  outline: none; border-color: #0078D4;
  box-shadow: 0 0 0 1px #0078D4;
}
input.long  { width: 260px; } input.med { width: 150px; } input.short { width: 70px; }
select.long { width: 268px; } select.med { width: 156px; }
textarea { height: auto; width: 100%; }

/* Group border */
fieldset.group {
  border: 1px solid #D4D4D4; margin: 8px 0; padding: 8px 10px 12px;
  background: #FAFAFA;
}
fieldset.group > legend { color: #0451A5; padding: 0 4px; font-size: 11px; }

/* ===================== TABS (within content) ===================== */
.tabstrip {
  display: flex; flex-wrap: wrap; border-bottom: 1px solid #C8C8C8; margin-top: 8px;
}
.tabstrip a {
  padding: 5px 14px; margin-right: 2px;
  text-decoration: none; font-size: 11px; color: #555;
  border: 1px solid transparent; border-bottom: none;
  border-radius: 3px 3px 0 0;
  background: #EBEBEB; position: relative; top: 1px;
}
.tabstrip a.active {
  background: #fff; color: #1a1a1a; font-weight: bold;
  border-color: #C8C8C8; border-bottom-color: #fff;
}
.tabstrip a.disabled { color: #BBBBBB; pointer-events: none; }
.tab-pane { border: 1px solid #C8C8C8; border-top: none; background: #fff; padding: 12px 14px; }

/* ===================== DATA GRID ===================== */
table.grid { border-collapse: collapse; width: 100%; background: #fff; font-size: 11px; }
table.grid th {
  background: #F0F0F0; border: 1px solid #D4D4D4;
  padding: 4px 8px; text-align: left; font-weight: bold; color: #444;
}
table.grid td { border: 1px solid #E4E4E4; padding: 4px 8px; color: #333; }
table.grid tr:hover td { background: #EAF3FD; }

/* ===================== STATUS LINE INSIDE PANEL ===================== */
.mdi-status {
  height: 22px; display: flex; align-items: center; padding: 0 8px;
  background: #F0F0F0; border-top: 1px solid #D8D8D8;
  color: #444; font-size: 11px;
}
.mdi-status .ico { color: #167516; margin-right: 6px; }
.app-status { display: none; }

/* ===================== BUTTONS ===================== */
.btn {
  border: 1px solid #C0C0C0; background: #E8E8E8;
  padding: 4px 16px; font-family: inherit; font-size: 11px;
  cursor: pointer; color: #1a1a1a; border-radius: 2px;
}
.btn:hover { background: #CCE4F7; border-color: #82BDDB; }
.btn:active { background: #A8CCDF; }
.btn.primary { border-color: #0070C8; background: #EBF4FF; color: #0451A5; font-weight: bold; }
.btn.primary:hover { background: #CCE4F7; }
.btn.danger { border-color: #C05050; }
.actions { margin-top: 12px; display: flex; gap: 6px; }

/* ===================== DESKTOP LAUNCHER ===================== */
.launcher {
  display: grid; grid-template-columns: repeat(auto-fill, 148px);
  gap: 14px; padding: 20px;
}
.launch-ico {
  width: 148px; padding: 14px 10px; text-align: center;
  color: #333; cursor: default;
  border: 1px solid #D8D8D8; background: #FAFAFA; border-radius: 2px;
}
.launch-ico:hover { background: #EBF4FF; border-color: #82BDDB; }
.launch-ico .glyph { font-size: 30px; display: block; }
.launch-ico .lbl { display: block; margin-top: 8px; font-weight: bold; font-size: 11px; color: #333; }
.launch-ico .cnt { font-size: 10px; color: #777; display: block; margin-top: 2px; }

/* ===================== SIMULATOR / TRACE ===================== */
.trace {
  background: #1E1E1E; color: #D4D4D4;
  font-family: Consolas, monospace; font-size: 11px;
  padding: 10px 12px; border: 1px solid #444;
  white-space: pre-wrap; line-height: 1.6;
}
.badge { display: inline-block; padding: 2px 8px; border-radius: 2px; font-weight: bold; color: #fff; }
.badge.ok { background: #167516; } .badge.no { background: #C01515; } .badge.warn { background: #A06000; color:#fff; }
.hint { color: #777; margin: 4px 0 0; font-size: 11px; }
.pill {
  display: inline-block; background: #EBF4FF; border: 1px solid #82BDDB;
  border-radius: 10px; padding: 0 8px; margin: 2px; font-size: 10px; color: #333;
}

/* ===================== ALERTS ===================== */
.alert {
  padding: 7px 12px; margin-bottom: 10px; font-size: 11px; border-radius: 2px;
}
.alert-ok  { background: #F0FFF0; border: 1px solid #82C882; color: #1a5c1a; }
.alert-err { background: #FFF2F2; border: 1px solid #F4A0A0; color: #C01515; }

/* ===================== GUIDE PANEL (right) ===================== */
.eclipse-guide {
  width: 272px; flex-shrink: 0;
  display: flex; flex-direction: column;
  background: #F5F5F5;
  border-left: 1px solid #BCBCBC;
  overflow: hidden;
  transition: width 0.18s ease;
}
.eclipse-guide.collapsed { width: 24px; }
.eclipse-guide.collapsed .guide-body { display: none; }
.eclipse-guide.collapsed .guide-header-title,
.eclipse-guide.collapsed .guide-header-icon { display: none; }
.eclipse-guide.collapsed .guide-toggle-btn { transform: scaleX(-1); }

.guide-header {
  height: 22px; flex-shrink: 0;
  display: flex; align-items: center; padding: 0 4px 0 6px; gap: 4px;
  background: linear-gradient(#EAEAEA, #DCDCDC);
  border-bottom: 1px solid #C4C4C4;
  font-size: 11px; font-weight: bold; color: #444; user-select: none;
  white-space: nowrap; overflow: hidden;
}
.guide-header-icon { font-size: 13px; flex-shrink: 0; }
.guide-header-title { flex: 1; overflow: hidden; }
.guide-toggle-btn {
  width: 18px; height: 18px; font-size: 10px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: #666; cursor: pointer; border-radius: 2px;
  transition: transform 0.18s;
}
.guide-toggle-btn:hover { background: #CCE4F7; color: #333; }

/* Body splits into two flex sections */
.guide-body {
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden; min-height: 0;
}
.guide-section {
  display: flex; flex-direction: column; overflow: hidden; min-height: 0;
}
.guide-tutorial  { flex: 1.15; }
.guide-checklist { flex: 1; }

.guide-section-header {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 4px;
  padding: 4px 8px 3px;
  font-size: 10px; font-weight: bold; color: #0451A5;
  background: #EBF4FF; border-bottom: 1px solid #C8D8ED;
  user-select: none;
}

.guide-steps {
  flex: 1; overflow-y: auto; padding: 8px 10px 10px;
}
.guide-steps::-webkit-scrollbar { width: 5px; }
.guide-steps::-webkit-scrollbar-thumb { background: #C8C8C8; border-radius: 3px; }

.guide-desc {
  font-size: 10.5px; color: #555; line-height: 1.5; margin-bottom: 7px;
}
.guide-steps ol {
  padding-left: 15px; margin: 0; display: flex; flex-direction: column; gap: 4px;
}
.guide-steps ol li {
  font-size: 10.5px; color: #333; line-height: 1.55;
}
.guide-steps ol li strong { color: #0451A5; }
.guide-steps ol li em { color: #5A3E00; font-style: normal; font-weight: bold; }
.guide-steps ol li code {
  background: #EBF4FF; border: 1px solid #C4D8EE; border-radius: 2px;
  padding: 0 3px; font-family: Consolas, monospace; font-size: 9.5px; color: #0451A5;
}

.guide-tip {
  margin-top: 9px; padding: 5px 8px;
  background: #FFFCEE; border: 1px solid #E0CA50; border-left: 3px solid #C8A800;
  border-radius: 2px; font-size: 10px; color: #5A4000; line-height: 1.5;
}

.guide-divider { height: 1px; background: #D0D0D0; flex-shrink: 0; }

/* ─── Checklist ─── */
.guide-check-list { list-style: none; padding: 0; margin: 4px 0 0; }
.guide-check-list li {
  display: flex; align-items: baseline; gap: 5px;
  padding: 3px 0; font-size: 10.5px; color: #444;
  border-bottom: 1px solid #EEEEEE; line-height: 1.4;
}
.guide-check-list li.done { color: #1A5C1A; }
.guide-check-list li.done a { color: #167516; }
.guide-check-list li a { color: #0451A5; }
.guide-check-list li a:hover { text-decoration: underline; }

.chk {
  font-size: 11px; flex-shrink: 0; width: 14px;
  color: #AAAAAA; font-weight: bold;
}
.guide-check-list li.done .chk { color: #167516; }
.chk-hint { font-size: 9.5px; color: #888; font-style: italic; }

/* Progress bar */
.guide-progress-bar-wrap {
  height: 5px; background: #E0E0E0; border-radius: 3px;
  margin: 9px 0 3px; overflow: hidden;
}
.guide-progress-bar {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, #167516, #2DA52D);
  transition: width 0.5s ease;
}
.guide-progress-label {
  font-size: 10px; color: #666; text-align: right; margin-bottom: 2px;
}

/* ===================== LOGIN PAGE ===================== */
body.login-bg {
  background: #2B2D3A;
  display: flex; align-items: center; justify-content: center;
  height: 100vh; overflow: hidden;
}
.login-dialog {
  width: 400px;
  background: #F0F0F0;
  border: 1px solid #555;
  box-shadow: 0 10px 40px rgba(0,0,0,.7);
  font-family: "Segoe UI", Arial, sans-serif;
}
.login-titlebar {
  height: 28px; display: flex; align-items: center; padding: 0 10px;
  background: #2B2D3A; color: #D4D4D4; font-size: 12px; user-select: none;
  gap: 6px;
}
.login-title-logo { font-size: 14px; }
.login-close { color: #888; cursor: default; margin-left: auto; }
.login-close:hover { color: #fff; }

.login-banner {
  background: #1E2030; padding: 18px 20px;
  display: flex; align-items: center; gap: 14px;
}
.login-badge {
  background: #E05C00; color: #fff; font-weight: bold;
  font-size: 15px; padding: 6px 14px; letter-spacing: .5px; white-space: nowrap;
}
.login-banner-text { color: #D4D4D4; font-size: 12px; line-height: 1.6; }
.login-banner-text small { color: #888; font-size: 11px; }

.login-body { padding: 20px 24px 16px; }

.login-error {
  background: #FFF2F2; border: 1px solid #F4A0A0;
  padding: 7px 10px; font-size: 11px; color: #C01515; margin-bottom: 14px;
}
.login-field { margin-bottom: 12px; }
.login-field label {
  display: block; font-size: 11px; color: #333; margin-bottom: 4px; font-weight: bold;
}
.login-field input {
  width: 100%; border: 1px solid #BABABA; padding: 5px 8px;
  font-size: 12px; background: #fff; height: 28px;
  font-family: inherit;
}
.login-field input:focus {
  outline: none; border-color: #0078D4; box-shadow: 0 0 0 1px #0078D4;
}
.login-btn {
  width: 100%; padding: 8px; margin-top: 4px;
  background: #0070C8; color: #fff; border: 1px solid #0058A6;
  font-size: 12px; font-weight: bold; cursor: pointer; font-family: inherit;
}
.login-btn:hover { background: #0058A6; }
.login-footer {
  height: 24px; background: #DCDCDC; border-top: 1px solid #C0C0C0;
  display: flex; align-items: center; padding: 0 12px;
  font-size: 10px; color: #666;
}
