/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

/* Dark theme tokens */
.dark {
  --bg: #0b0c10;
  --card-bg: #1f2833;
  --text: #c5c6c7;
  --heading: #66fcf1;
  --input-bg: #0b0c10;
  --input-border: #45a29e;
  --accent: #45a29e;
  --accent-hover: #66fcf1;
  --error: #ff6b6b;
  --legal: #6c757d;
}

body.dark {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

/* Login */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}

.login-card {
  background: var(--card-bg);
  border: 1px solid rgba(102, 252, 241, 0.15);
  border-radius: 12px;
  padding: 2rem;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.login-card h1 {
  margin: 0 0 1.25rem;
  font-size: 1.25rem;
  color: var(--heading);
  text-align: center;
  letter-spacing: 0.5px;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
  color: var(--text);
}

.field input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  background: var(--input-bg);
  border: 1px solid rgba(69, 162, 158, 0.4);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus {
  border-color: var(--accent-hover);
  box-shadow: 0 0 0 3px rgba(102, 252, 241, 0.15);
}

.error {
  min-height: 1.25rem;
  color: var(--error);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.btn-primary {
  width: 100%;
  padding: 0.75rem;
  background: var(--accent);
  color: #0b0c10;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.legal {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--legal);
}

.legal a {
  color: var(--legal);
  text-decoration: none;
}

.legal a:hover {
  color: var(--text);
  text-decoration: underline;
}

.sep {
  margin: 0 0.4rem;
  opacity: 0.6;
}

/* Terminal */
.terminal-body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: rgba(31, 40, 51, 0.8);
  border-bottom: 1px solid rgba(102, 252, 241, 0.1);
  backdrop-filter: blur(6px);
}

.terminal-title {
  font-size: 0.875rem;
  color: var(--heading);
  font-weight: 500;
}

.btn-logout {
  padding: 0.35rem 0.65rem;
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(69, 162, 158, 0.4);
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.btn-logout:hover {
  border-color: var(--accent-hover);
  color: var(--accent-hover);
}

.terminal-main {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.terminal-main iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
