* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: #1e1e1e;
  color: #d4d4d4;
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

#tabs {
  display: flex;
  background: #252526;
  border-bottom: 1px solid #333;
}

.tab {
  background: none;
  border: none;
  color: #a0a0a0;
  padding: 10px 18px;
  cursor: pointer;
  font-size: 0.9rem;
}

.tab.active {
  color: #fff;
  border-bottom: 2px solid #4fa3ff;
}

.tab-panel {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  padding: 12px;
  overflow: auto;
}

.tab-panel.active {
  display: flex;
}

#tab-terminal {
  padding: 0;
  overflow: hidden;
}

#terminal-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid #333;
  flex: 0 0 auto;
}

#terminal {
  flex: 1;
  min-height: 0;
  padding: 4px 0 0 8px;
}

#terminal .xterm {
  height: 100%;
}

button, select {
  background: #333;
  color: #eee;
  border: 1px solid #555;
  border-radius: 4px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.85rem;
}

button:hover { background: #3f3f3f; }
button:disabled { opacity: 0.5; cursor: default; }

.hint {
  color: #999;
  font-size: 0.85rem;
  max-width: 60em;
}

#permissions-table {
  border-collapse: collapse;
  margin-top: 10px;
}

#permissions-table td, #permissions-table th {
  padding: 6px 14px 6px 0;
  text-align: left;
  border-bottom: 1px solid #333;
}

#files-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  gap: 12px;
}

#file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 240px;
  overflow: auto;
  border-right: 1px solid #333;
}

#file-list li {
  padding: 4px 8px;
  cursor: pointer;
  font-size: 0.85rem;
  white-space: nowrap;
}

#file-list li:hover, #file-list li.selected {
  background: #2a2d2e;
}

#file-editor {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

#file-editor-path {
  font-size: 0.8rem;
  color: #999;
  margin-bottom: 4px;
}

#file-editor-content {
  flex: 1;
  background: #1e1e1e;
  color: #d4d4d4;
  border: 1px solid #333;
  font-family: "SF Mono", Consolas, monospace;
  font-size: 0.85rem;
  padding: 8px;
  resize: none;
}

#session-status {
  color: #999;
  font-size: 0.85rem;
}

#tab-providers h3 {
  margin: 18px 0 6px;
  font-size: 0.95rem;
  color: #eee;
}

#tab-providers h3:first-of-type {
  margin-top: 4px;
}

.provider-field {
  margin-bottom: 10px;
  max-width: 40em;
}

.provider-field label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.field-row {
  display: flex;
  gap: 8px;
}

.field-row input {
  flex: 1;
}

input[type="text"], input[type="password"] {
  background: #2a2a2a;
  color: #eee;
  border: 1px solid #555;
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 0.85rem;
  min-width: 0;
}
