/* ─── Standalone Lab App Styles ─────────────────────────────────────────
   These pages look like "real" corporate apps the student is testing.
   Separate aesthetic from the lab dashboard framework.
   ──────────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Fira+Code:wght@400;500&display=swap');

:root {
  --app-bg: #0c0f16;
  --app-surface: #151921;
  --app-surface-2: #1c2130;
  --app-border: rgba(255,255,255,0.07);
  --app-accent: #3b82f6;
  --app-accent-hover: #60a5fa;
  --app-text: #e4e4e7;
  --app-text-muted: #71717a;
  --app-text-dim: #52525b;
  --app-danger: #ef4444;
  --app-success: #22c55e;
  --app-radius: 8px;
  --app-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --app-mono: 'Fira Code', monospace;
}

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

body {
  font-family: var(--app-font);
  background: var(--app-bg);
  color: var(--app-text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ─── App Shell ───────────────────────────────────────────────────────── */

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  background: var(--app-surface);
  border-bottom: 1px solid var(--app-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--app-text);
  text-decoration: none;
}

.app-brand svg { width: 22px; height: 22px; }

.app-brand-dot {
  width: 8px;
  height: 8px;
  background: var(--app-accent);
  border-radius: 50%;
  display: inline-block;
}

.app-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.82rem;
}

.app-role {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--app-border);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--app-text-muted);
}

.app-user {
  color: var(--app-text-muted);
  font-size: 0.82rem;
}

.back-to-labs {
  color: var(--app-text-dim);
  text-decoration: none;
  font-size: 0.75rem;
  transition: color 0.2s;
}

.back-to-labs:hover { color: var(--app-accent); }

/* ─── Main Content ────────────────────────────────────────────────────── */

.app-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 24px;
}

.app-main-wide {
  max-width: 860px;
}

/* ─── Login Screen ────────────────────────────────────────────────────── */

.login-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 56px);
  text-align: center;
  padding: 24px;
}

.login-box {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 12px;
  padding: 40px;
  max-width: 380px;
  width: 100%;
}

.login-box h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.login-box p {
  color: var(--app-text-muted);
  font-size: 0.85rem;
  margin-bottom: 24px;
}

/* ─── Buttons ─────────────────────────────────────────────────────────── */

.app-btn {
  font-family: var(--app-font);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 9px 18px;
  border: none;
  border-radius: var(--app-radius);
  cursor: pointer;
  transition: all 0.15s;
}

.app-btn-primary {
  background: var(--app-accent);
  color: #fff;
}
.app-btn-primary:hover { background: var(--app-accent-hover); }

.app-btn-secondary {
  background: rgba(255,255,255,0.06);
  color: var(--app-text);
  border: 1px solid var(--app-border);
}
.app-btn-secondary:hover { background: rgba(255,255,255,0.1); }

.app-btn-danger {
  background: rgba(239, 68, 68, 0.12);
  color: var(--app-danger);
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.app-btn-danger:hover { background: rgba(239, 68, 68, 0.25); }

.app-btn-sm { padding: 5px 12px; font-size: 0.75rem; }

.app-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ─── Card / Panel ────────────────────────────────────────────────────── */

.app-card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 12px;
  padding: 24px;
}

.app-card + .app-card { margin-top: 16px; }

/* ─── Profile / Details ───────────────────────────────────────────────── */

.profile-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  flex-shrink: 0;
}

.profile-banner h1 { font-size: 1.25rem; font-weight: 600; }
.profile-banner .subtitle { color: var(--app-text-muted); font-size: 0.85rem; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.detail-item {
  background: var(--app-surface-2);
  padding: 12px 16px;
  border-radius: var(--app-radius);
}

.detail-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--app-text-dim);
  margin-bottom: 3px;
}

.detail-value { font-size: 0.9rem; }

/* ─── Notes List ──────────────────────────────────────────────────────── */

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

.notes-header h2 { font-size: 1rem; font-weight: 600; }

.note-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background: var(--app-surface-2);
  border-radius: var(--app-radius);
  margin-bottom: 8px;
}

.note-row h3 { font-size: 0.88rem; font-weight: 500; margin-bottom: 4px; }
.note-row p { font-size: 0.8rem; color: var(--app-text-muted); }

.note-actions { display: flex; gap: 6px; flex-shrink: 0; }

.add-note-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--app-border);
}

.add-note-section h3 {
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--app-text-muted);
}

.form-row { margin-bottom: 8px; }

.form-row input, .form-row textarea {
  width: 100%;
  font-family: var(--app-font);
  font-size: 0.85rem;
  background: var(--app-bg);
  color: var(--app-text);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  padding: 9px 12px;
}

.form-row textarea { resize: vertical; min-height: 60px; }
.form-row input:focus, .form-row textarea:focus { outline: none; border-color: var(--app-accent); }

/* ─── Search ──────────────────────────────────────────────────────────── */

.search-form {
  display: flex;
  gap: 8px;
}

.search-form input {
  flex: 1;
  font-family: var(--app-font);
  font-size: 0.88rem;
  background: var(--app-bg);
  color: var(--app-text);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  padding: 10px 14px;
}

.search-form input:focus { outline: none; border-color: var(--app-accent); }

/* ─── Danger Zone ─────────────────────────────────────────────────────── */

.danger-zone {
  border: 1px solid rgba(239, 68, 68, 0.2);
  background: rgba(239, 68, 68, 0.04);
  border-radius: var(--app-radius);
  padding: 20px;
  margin-top: 24px;
}

.danger-zone h3 {
  color: var(--app-danger);
  font-size: 0.88rem;
  margin-bottom: 6px;
}

.danger-zone p {
  color: var(--app-text-muted);
  font-size: 0.82rem;
  margin-bottom: 14px;
}

/* ─── Session Bar ─────────────────────────────────────────────────────── */

.session-bar {
  background: var(--app-surface-2);
  border-radius: var(--app-radius);
  padding: 8px 14px;
  font-size: 0.75rem;
  color: var(--app-text-dim);
  margin-bottom: 20px;
  font-family: var(--app-mono);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ─── Toast ───────────────────────────────────────────────────────────── */

.toast-box {
  position: fixed;
  top: 68px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast-msg {
  background: var(--app-surface);
  border: 1px solid var(--app-success);
  color: var(--app-success);
  padding: 10px 18px;
  border-radius: var(--app-radius);
  font-size: 0.82rem;
  animation: tSlide 0.25s ease, tFade 0.3s ease 2.5s forwards;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

.toast-msg.error { border-color: var(--app-danger); color: var(--app-danger); }

@keyframes tSlide { from { transform: translateX(80px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes tFade { to { opacity: 0; } }

/* ─── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .app-main { padding: 20px 16px; }
  .detail-grid { grid-template-columns: 1fr; }
  .profile-banner { flex-direction: column; text-align: center; }
  .search-form { flex-direction: column; }
}
