/* Technician Portal – field tools & installers */

:root {
  --bg: #0f1419;
  --bg-card: #1a2332;
  --bg-input: #243447;
  --border: #2d3d52;
  --text: #e7e9ea;
  --text-muted: #8b98a5;
  --primary: #1d9bf0;
  --primary-hover: #1a8cd8;
  --error: #f4212e;
  --radius: 12px;
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

/* Auth cards (login, 2FA) */
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.auth-card--wide {
  max-width: 420px;
}

.auth-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.auth-header h1 {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
  font-weight: 600;
}

.auth-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.auth-form label {
  display: block;
  margin: 1rem 0 0.35rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.auth-form input[type="text"],
.auth-form input[type="password"],
.auth-form input[type="file"] {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(29, 155, 240, 0.25);
}

.auth-form .btn {
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  transition: background 0.15s;
}

.auth-error {
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(244, 33, 46, 0.15);
  color: var(--error);
  border-radius: 8px;
  font-size: 0.9rem;
}

.auth-muted {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.auth-muted a {
  color: var(--primary);
  text-decoration: none;
}

.auth-muted a:hover {
  text-decoration: underline;
}

.secret-code {
  font-size: 0.8rem;
  word-break: break-all;
  background: var(--bg-input);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.qr-wrap {
  text-align: center;
  margin: 1rem 0;
}

.qr-wrap img {
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.btn-download {
  background: var(--primary);
  color: #fff;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
}

.btn-download:hover {
  background: var(--primary-hover);
}

/* Dashboard */
.dashboard {
  width: 100%;
  max-width: 720px;
}

.dashboard .page {
  align-items: flex-start;
  justify-content: flex-start;
}

.dashboard-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.dashboard-header h1 {
  margin: 0 0 0.2rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.dashboard-sub {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.dashboard-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.files-section h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
}

.files-empty {
  color: var(--text-muted);
  padding: 2rem;
  text-align: center;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.file-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.file-name {
  font-weight: 500;
  flex: 1 1 200px;
  word-break: break-all;
}

.file-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.upload-form {
  max-width: 400px;
}

.upload-form input[type="file"] {
  padding: 0.5rem;
}
