/* Marketing Maatwerk — Web Terminal */
:root {
  --mm-orange: #E17F38;
  --mm-orange-dark: #CC6633;
  --mm-blue: #3F485A;
  --mm-dark-blue: #22374A;
  --mm-teal: #2EC4B6;
  --mm-grey: #DBDDE0;
  --mm-light-grey: #F5F7FA;
  --mm-body-text: #333333;
  --mm-white: #FFFFFF;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--mm-dark-blue);
  color: var(--mm-body-text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Login Page */
.login-container {
  background: var(--mm-white);
  border-radius: 12px;
  padding: 40px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo img {
  max-width: 240px;
  height: auto;
}

.login-title {
  color: var(--mm-blue);
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}

.login-subtitle {
  color: #6b7280;
  font-size: 0.9rem;
  text-align: center;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  color: var(--mm-blue);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--mm-grey);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
  outline: none;
}

.form-group input:focus {
  border-color: var(--mm-orange);
}

.btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--mm-orange);
  color: white;
}

.btn-primary:hover { background: var(--mm-orange-dark); }

.btn-secondary {
  background: var(--mm-blue);
  color: white;
  margin-top: 8px;
}

.btn-secondary:hover { background: var(--mm-dark-blue); }

.btn-danger {
  background: #dc2626;
  color: white;
  padding: 8px 16px;
  width: auto;
  font-size: 0.85rem;
}

.error-msg {
  background: #fef2f2;
  color: #dc2626;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: none;
}

.error-msg.visible { display: block; }

.qr-container {
  text-align: center;
  margin: 16px 0;
}

.qr-container img {
  max-width: 200px;
  border-radius: 8px;
}

.qr-container p {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 8px;
}

/* Terminal Page */
.terminal-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  background: var(--mm-dark-blue);
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--mm-blue);
  border-bottom: 2px solid var(--mm-orange);
}

.terminal-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.terminal-header img {
  height: 24px;
}

.terminal-header h1 {
  color: var(--mm-white);
  font-size: 0.9rem;
  font-weight: 600;
}

.terminal-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--mm-grey);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
}

.status-dot.disconnected { background: #dc2626; }

.terminal-actions {
  display: flex;
  gap: 8px;
}

.terminal-actions a, .terminal-actions button {
  color: var(--mm-grey);
  text-decoration: none;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 4px;
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  cursor: pointer;
  transition: background 0.2s;
}

.terminal-actions a:hover, .terminal-actions button:hover {
  background: rgba(255,255,255,0.1);
}

#terminal-container {
  flex: 1;
  padding: 4px;
  overflow: hidden;
}

/* Devices Page */
.devices-page {
  background: var(--mm-light-grey);
  min-height: 100vh;
  padding: 20px;
}

.devices-container {
  max-width: 600px;
  margin: 0 auto;
}

.devices-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.devices-header h1 {
  color: var(--mm-blue);
  font-size: 1.3rem;
}

.devices-header a {
  color: var(--mm-orange);
  text-decoration: none;
  font-size: 0.9rem;
}

.device-card {
  background: var(--mm-white);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.device-info h3 {
  color: var(--mm-blue);
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.device-info p {
  color: #6b7280;
  font-size: 0.8rem;
}

.device-info .teal { color: var(--mm-teal); }

/* Mobile */
@media (max-width: 480px) {
  .login-container { padding: 24px; }
  .terminal-header { padding: 6px 10px; }
  .terminal-header h1 { font-size: 0.8rem; }
  .terminal-actions { gap: 4px; }
}
