/* ═══════════════════════════════════════════════════════════════
   CloudLabs — portal.css
   Design: AWS Console · Azure Fluent · GCP Material
═══════════════════════════════════════════════════════════════ */

/* ── Global tokens ── */
:root {
  /* AWS */
  --aws-navy:    #232F3E;
  --aws-navy2:   #1A2332;
  --aws-orange:  #FF9900;
  --aws-orange2: #EC7211;
  --aws-blue:    #0073BB;
  --aws-blue2:   #005EA6;
  --aws-teal:    #00A591;
  --aws-green:   #1D8348;
  --aws-red:     #D13212;
  /* Neutral */
  --bg:          #F2F3F3;
  --white:       #FFFFFF;
  --border:      #D5DBDB;
  --border2:     #AAB7B8;
  --text:        #16191F;
  --text2:       #545B64;
  --text3:       #879596;
  /* Radii */
  --r-sm:  4px;
  --r-md:  8px;
  --r-lg:  12px;
  --r-xl:  16px;
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,.10), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 16px 40px rgba(0,0,0,.14), 0 4px 8px rgba(0,0,0,.06);
  /* Layout */
  --header-h: 56px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  background: var(--bg); color: var(--text);
  font-size: 14px; line-height: 1.5;
}

/* ════════════════════════════════════════════════════════════════
   HEADER — base (AWS dark, default for all pages)
════════════════════════════════════════════════════════════════ */
.top-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--aws-navy);
  display: flex; align-items: center;
  padding: 0 20px; z-index: 200;
  border-bottom: 1px solid #3A4B5C;
  gap: 0;
  transition: background .2s, border-color .2s, box-shadow .2s;
}

/* ── Header title / logo ── */
.header-title {
  color: #E8EDF0; font-size: 13px; font-weight: 600;
  padding: 0 14px 0 0; border-right: 1px solid #3A4B5C;
  margin-right: 0; flex-shrink: 0;
}
.hdr-title-emoji { /* shown on AWS, hidden on Azure/GCP via base.html skin CSS */ }
.hdr-title-labs  { /* coloured blue on GCP via base.html skin CSS */ }

/* ── Shared hidden elements (Azure badge, GCP chip/divider, logo-box) ── */
/* These are display:none by default; shown via .provider-azure/gcp classes in base.html */
.hdr-logo-box,
.hdr-azure-badge,
.hdr-gcp-divider,
.hdr-gcp-chip { display: none; }

/* ── Provider tabs (AWS homepage only) ── */
.header-provider-tabs {
  display: flex; align-items: center; gap: 2px;
  flex: 1; padding: 0 16px;
}
.hdr-tab {
  height: 32px; padding: 0 16px;
  border-radius: 6px; border: 1px solid transparent;
  font-size: 12px; font-weight: 600; cursor: pointer;
  color: #E0E8F0; background: transparent;
  font-family: inherit; transition: all .15s; white-space: nowrap;
  letter-spacing: .2px;
}

.hdr-tab:hover { background: rgba(255,255,255,.12); color: #fff; }
.hdr-tab.aws.active   { background: #FF9900; color: #000; border-color: #FF9900; }
.hdr-tab.azure.active { background: #0078D4; color: #fff; border-color: #0078D4; }
.hdr-tab.gcp.active   { background: #4285F4; color: #fff; border-color: #4285F4; }

/* GCP white header — inactive tabs need dark text to be visible */
.top-header.provider-gcp .hdr-tab { color: #5F6368; }
.top-header.provider-gcp .hdr-tab:hover { background: #F1F3F4; color: #202124; }

/* Azure blue header — inactive tabs need white text */
.top-header.provider-azure .hdr-tab { color: rgba(255,255,255,.75); }
.top-header.provider-azure .hdr-tab:hover { background: rgba(255,255,255,.15); color: #fff; }

/* ── Header search (AWS default) ── */
.header-search-wrap { position: relative; margin-right: 8px; }
.header-search-box {
  display: flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.08); border: 1px solid #3A4B5C;
  border-radius: 6px; padding: 0 12px; height: 32px;
  width: 220px; transition: border-color .2s, background .2s,
    border-radius .2s, box-shadow .2s;
}
.header-search-box:focus-within {
  border-color: var(--aws-orange); background: rgba(255,255,255,.11);
}
.header-search-icon { font-size: 12px; color: #8CA0B3; flex-shrink: 0; }
.header-search-box input {
  border: none; outline: none; flex: 1;
  font-size: 12px; font-family: inherit;
  color: #E8EDF0; background: transparent;
}
.header-search-box input::placeholder { color: #8CA0B3; }

/* ── Header search dropdown (AWS default) ── */
.header-search-drop {
  display: none; position: absolute; top: calc(100% + 6px); right: 0;
  width: 300px; background: var(--aws-navy2);
  border: 1px solid #3A4B5C; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  overflow: hidden; z-index: 500;
}
.hdr-search-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; text-decoration: none;
  color: #E8EDF0; transition: background .1s;
}
.hdr-search-item:hover { background: rgba(255,255,255,.08); }
.hdr-si-icon  { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }
.hdr-si-name  { font-size: 13px; font-weight: 500; flex: 1; }
.hdr-si-group { font-size: 10px; color: #8CA0B3; white-space: nowrap; }
.hdr-search-empty { padding: 12px 14px; font-size: 12px; color: #8CA0B3; text-align: center; }

/* ── Breadcrumb (non-home pages) ── */
.header-breadcrumb {
  color: #6B7E91; font-size: 12px;
  display: none; align-items: center; gap: 4px; flex: 1;
}
.header-breadcrumb a { color: #B0BEC5; }
.header-breadcrumb span { color: #B0BEC5; }
.header-breadcrumb span:last-child { color: #E8EDF0; font-weight: 500; }

/* ── Header right ── */
.header-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ── Header user area ── */
.header-user {
  display: flex; align-items: center; gap: 6px;
  color: #B0BEC5; font-size: 12px; cursor: pointer;
  padding: 5px 10px; border-radius: var(--r-md);
  border: 1px solid transparent; transition: border-color .15s;
}
.header-user:hover { border-color: #3A4B5C; }

.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--aws-blue); display: flex; align-items: center;
  justify-content: center; color: #fff; font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}
.top-header.provider-azure .user-avatar {
  background: #fff;
  color: #0078D4;
}

/* ── Header logout button ── */
.hdr-logout-btn {
  background: none;
  border: 1px solid rgba(255,255,255,.2);
  color: #B0BEC5;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  padding: 3px 10px;
  border-radius: 5px;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
  margin-left: 4px;
  flex-shrink: 0;
}
.hdr-logout-btn:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
  border-color: rgba(255,255,255,.4);
}
.top-header.provider-gcp .hdr-logout-btn {
  border-color: #DADCE0;
  color: #202124;
}
.top-header.provider-gcp .hdr-logout-btn:hover {
  background: #F1F3F4;
  color: #202124;
  border-color: #BDC1C6;
}


/* ── Header admin buttons (Users / Admin) ── */
.hdr-admin-btn {
  color: #B0BEC5;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid #3A4B5C;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
  flex-shrink: 0;
}
.hdr-admin-btn:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}
.top-header.provider-azure .hdr-admin-btn {
  color: rgba(255,255,255,.85);
  border-color: rgba(255,255,255,.35);
}
.top-header.provider-azure .hdr-admin-btn:hover {
  background: rgba(255,255,255,.18);
  color: #fff;
  border-color: rgba(255,255,255,.6);
}
.top-header.provider-gcp .hdr-admin-btn {
  color: #202124;
  border-color: #DADCE0;
}
.top-header.provider-gcp .hdr-admin-btn:hover {
  background: #F1F3F4;
  color: #202124;
  border-color: #DADCE0;
}


/* ── Misc legacy header classes (kept for backward compat) ── */
.header-logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; padding: 0 14px 0 0;
  border-right: 1px solid #3A4B5C; margin-right: 14px; flex-shrink: 0;
}
.logo-aws { font-size: 18px; font-weight: 800; color: var(--aws-orange); letter-spacing: -1px; line-height: 1; }
.logo-sub { color: #B0BEC5; font-size: 11px; font-weight: 500; margin-top: 2px; }
.admin-toggle-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--r-md);
  font-size: 12px; font-weight: 600; cursor: pointer;
  border: 1px solid #3A4B5C; background: transparent;
  color: #B0BEC5; transition: all .15s; font-family: inherit;
}
.admin-toggle-btn:hover { background: #3A4B5C; color: #fff; }
.admin-toggle-btn.on { background: var(--aws-orange); border-color: var(--aws-orange2); color: #000; }

/* ════════════════════════════════════════════════════════════════
   HEADER SKIN — AZURE
   Applied when JS sets: header.className = 'top-header provider-azure'
════════════════════════════════════════════════════════════════ */
.top-header.provider-azure {
  background: #0078D4;
  border-bottom: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

/* Azure: logo */
.top-header.provider-azure .header-title {
  color: #fff; font-size: 16px; font-weight: 700;
  border-right: none; padding-right: 0; letter-spacing: -.3px;
}
.top-header.provider-azure .hdr-title-emoji { display: none; }
.top-header.provider-azure .hdr-logo-box {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; background: rgba(255,255,255,.15);
  border-radius: 4px; font-size: 16px; margin-right: 6px; flex-shrink: 0;
}

/* Azure: hide tabs, show badge */
.top-header.provider-azure .header-provider-tabs { display: none; }
.top-header.provider-azure .hdr-azure-badge {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.18); border-radius: 2px;
  padding: 4px 10px; font-size: 12px; font-weight: 700;
  color: #fff; letter-spacing: .5px; white-space: nowrap; flex-shrink: 0;
}

/* Azure: search */
.top-header.provider-azure .header-search-box {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 2px; width: 260px;
}
.top-header.provider-azure .header-search-box:focus-within {
  background: #fff; border-color: #fff;
}
.top-header.provider-azure .header-search-box:focus-within .header-search-icon { color: #0078D4; }
.top-header.provider-azure .header-search-box:focus-within input { color: #323130; }
.top-header.provider-azure .header-search-icon { color: rgba(255,255,255,.7); }
.top-header.provider-azure .header-search-box input { color: #fff; font-size: 13px; }
.top-header.provider-azure .header-search-box input::placeholder { color: rgba(255,255,255,.65); }

/* Azure: search dropdown */
.top-header.provider-azure .header-search-drop {
  background: #fff; border: 1px solid #D2D0CE;
  border-radius: 2px; box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.top-header.provider-azure .hdr-search-item { color: #323130; }
.top-header.provider-azure .hdr-search-item:hover { background: #EFF6FC; }
.top-header.provider-azure .hdr-si-group { color: #8A8886; }
.top-header.provider-azure .hdr-search-empty { color: #8A8886; }

/* Azure: user area */
.top-header.provider-azure .header-user { color: #fff; border-color: transparent; }
.top-header.provider-azure .header-user:hover { border-color: rgba(255,255,255,.3); }
.top-header.provider-azure .user-avatar { background: rgba(255,255,255,.25); }
.top-header.provider-azure .header-user span:not(.user-avatar) { color: #fff; }
.top-header.provider-azure .header-user a { color: #fff !important; opacity: .9; font-size: 12px !important; font-weight: 600 !important; }
.top-header.provider-azure .header-user a:hover { opacity: 1; text-decoration: underline; }
.top-header.provider-azure .header-user button { color: rgba(255,255,255,.7) !important; }

/* ════════════════════════════════════════════════════════════════
   HEADER SKIN — GCP
   Applied when JS sets: header.className = 'top-header provider-gcp'
════════════════════════════════════════════════════════════════ */
.top-header.provider-gcp {
  background: #fff;
  border-bottom: 1px solid #DADCE0;
  box-shadow: 0 1px 3px rgba(60,64,67,.15);
}

/* GCP: logo */
.top-header.provider-gcp .header-title {
  color: #3C4043; font-size: 18px; font-weight: 500;
  font-family: 'Google Sans', 'Roboto', sans-serif;
  border-right: none; padding-right: 0; letter-spacing: -.2px;
}
.top-header.provider-gcp .hdr-title-emoji { display: none; }
.top-header.provider-gcp .hdr-title-labs  { color: #1A73E8; }
.top-header.provider-gcp .hdr-logo-box {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; font-size: 22px;
  margin-right: 2px; flex-shrink: 0;
  background: none; border-radius: 0;
}

/* GCP: divider */
.top-header.provider-gcp .hdr-gcp-divider {
  display: block; width: 1px; height: 24px;
  background: #DADCE0; flex-shrink: 0;
}

/* GCP: chip */
.top-header.provider-gcp .hdr-gcp-chip {
  display: flex; align-items: center; gap: 6px;
  background: #E8F0FE; border-radius: 16px;
  padding: 4px 12px; font-size: 13px; font-weight: 500;
  color: #1A73E8; white-space: nowrap;
  border: 1px solid #AECBFA; flex-shrink: 0;
}
.hdr-gcp-chip-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(135deg, #4285F4 25%, #EA4335 25% 50%, #FBBC04 50% 75%, #34A853 75%);
  flex-shrink: 0;
}

/* GCP: hide tabs */
.top-header.provider-gcp .header-provider-tabs { display: none; }

/* GCP: search — pill shape */
.top-header.provider-gcp .header-search-box {
  background: #F1F3F4; border: 1px solid #E8EAED;
  border-radius: 24px; width: 280px; height: 36px; padding: 0 16px;
}
.top-header.provider-gcp .header-search-box:focus-within {
  background: #fff; border-color: #1A73E8;
  box-shadow: 0 0 0 2px rgba(26,115,232,.15);
}
.top-header.provider-gcp .header-search-icon { color: #80868B; font-size: 15px; }
.top-header.provider-gcp .header-search-box input {
  color: #202124; font-family: 'Roboto', sans-serif; font-size: 14px;
}
.top-header.provider-gcp .header-search-box input::placeholder { color: #80868B; }

/* GCP: search dropdown */
.top-header.provider-gcp .header-search-drop {
  background: #fff; border: none; border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,.18);
}
.top-header.provider-gcp .hdr-search-item { color: #202124; }
.top-header.provider-gcp .hdr-search-item:hover { background: #F1F3F4; }
.top-header.provider-gcp .hdr-si-group {
  background: #F1F3F4; border-radius: 10px;
  padding: 2px 8px; color: #80868B;
}
.top-header.provider-gcp .hdr-search-empty { color: #80868B; }

/* GCP: user area */
.top-header.provider-gcp .header-user { color: #3C4043; border-color: transparent; }
.top-header.provider-gcp .header-user:hover { border-color: #E8EAED; }
.top-header.provider-gcp .user-avatar {
  background: linear-gradient(135deg, #4285F4, #34A853);
}
.top-header.provider-gcp .header-user span:not(.user-avatar) { color: #3C4043; }
.top-header.provider-gcp .header-user a {
  color: #1A73E8 !important; font-size: 13px !important; font-weight: 500 !important;
  padding: 6px 12px; border: 1px solid #1A73E8;
  border-radius: 4px; transition: background .15s;
}
.top-header.provider-gcp .header-user a:hover { background: #E8F0FE; }
.top-header.provider-gcp .header-user button { color: #202124 !important; }

/* ── Breadcrumb on non-home pages keeps AWS dark look ── */
/* (header stays provider-aws on service pages) */

/* ════════════════════════════════════════════════════════════════
   SERVICE PAGE LAYOUT
════════════════════════════════════════════════════════════════ */
.svc-page { padding-top: var(--header-h); min-height: 100vh; background: var(--bg); }
.svc-main { max-width: 1100px; margin: 0 auto; padding: 28px 24px 60px; }

.svc-banner {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 20px 24px; margin-bottom: 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  box-shadow: var(--shadow-sm);
}
.svc-banner-left { display: flex; flex-direction: column; gap: 10px; }
.svc-back-link {
  font-size: 12px; color: var(--aws-blue); text-decoration: none;
  font-weight: 500; display: inline-flex; align-items: center; gap: 4px;
}
.svc-back-link:hover { text-decoration: underline; }
.svc-banner-identity { display: flex; align-items: center; gap: 14px; }
.svc-banner-icon { font-size: 32px; }
.svc-banner-name { font-size: 20px; font-weight: 700; color: var(--text); }
.svc-banner-sub  { font-size: 12px; color: var(--text3); margin-top: 2px; }
.svc-banner-stats { display: flex; gap: 24px; flex-shrink: 0; }
.svc-bstat { text-align: center; }
.svc-bstat-val   { font-size: 20px; font-weight: 800; color: var(--aws-orange); display: block; }
.svc-bstat-label { font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: .5px; }

/* Provider-tinted banner accent */
.svc-page.provider-azure .svc-bstat-val { color: #0078D4; }
.svc-page.provider-azure .svc-back-link { color: #0078D4; }
.svc-page.provider-gcp   .svc-bstat-val { color: #1A73E8; }
.svc-page.provider-gcp   .svc-back-link { color: #1A73E8; }

/* ════════════════════════════════════════════════════════════════
   ADMIN
════════════════════════════════════════════════════════════════ */
.admin-notice {
  display: none; background: #FFF8E1; border: 1px solid #FFE082;
  border-radius: var(--r-md); padding: 10px 16px; margin-bottom: 16px;
  font-size: 13px; color: #7B6000; align-items: center; gap: 8px;
}
.admin-mode .admin-notice { display: flex; }
.add-lab-form {
  display: none; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 20px 24px; margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.admin-mode .add-lab-form { display: block; }
.form-title { font-size: 14px; font-weight: 700; color: var(--aws-navy); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.form-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }
.form-label { font-size: 12px; font-weight: 600; color: var(--text2); }
.form-input, .form-select {
  border: 1px solid var(--border2); border-radius: var(--r-md);
  padding: 8px 10px; font-size: 13px; font-family: inherit;
  color: var(--text); background: var(--white); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.form-input:focus, .form-select:focus {
  border-color: var(--aws-blue); box-shadow: 0 0 0 3px rgba(0,115,187,.15);
}
.form-actions { display: flex; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.admin-only { display: none; }
.admin-mode .admin-only { display: block; }

/* ════════════════════════════════════════════════════════════════
   FILTER BAR (service page)
════════════════════════════════════════════════════════════════ */
.filter-bar {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 10px 16px; box-shadow: var(--shadow-sm);
}
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--border2);
  border-radius: var(--r-md); padding: 7px 12px;
  flex: 1; min-width: 200px; transition: border-color .15s;
}
.search-box:focus-within { border-color: var(--aws-blue); box-shadow: 0 0 0 3px rgba(0,115,187,.12); }
.search-box input { border: none; outline: none; flex: 1; font-size: 13px; font-family: inherit; color: var(--text); background: transparent; }
.search-box input::placeholder { color: var(--text3); }
.filter-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-pill {
  padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 600;
  cursor: pointer; border: 1.5px solid var(--border2);
  background: var(--white); color: var(--text2);
  transition: all .15s; font-family: inherit; white-space: nowrap;
}
.filter-pill:hover { border-color: var(--text2); color: var(--text); }
.filter-pill.active           { background: var(--aws-navy); border-color: var(--aws-navy); color: #fff; }
.filter-pill.beginner.active  { background: #1D8348; border-color: #1D8348; }
.filter-pill.intermediate.active { background: #9A7D0A; border-color: #9A7D0A; }
.filter-pill.advanced.active  { background: #922B21; border-color: #922B21; }
.filter-pdf-group .filter-select {
  font-size: 12px; padding: 5px 10px; border-radius: var(--r-md);
  border: 1.5px solid var(--border2); background: var(--white);
  color: var(--text); cursor: pointer; font-family: inherit;
}
.count-bar  { margin-bottom: 12px; }
.count-text { font-size: 13px; color: var(--text2); }
.count-text strong { color: var(--text); }

/* ════════════════════════════════════════════════════════════════
   DIFFICULTY SECTIONS
════════════════════════════════════════════════════════════════ */
.difficulty-section {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-lg); margin-bottom: 16px;
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.difficulty-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; cursor: pointer; transition: background .12s; user-select: none;
}
.difficulty-header:hover { background: #F8F9FA; }
.difficulty-header-left { display: flex; align-items: center; gap: 10px; }
.difficulty-accent  { width: 4px; height: 20px; border-radius: 2px; flex-shrink: 0; }
.difficulty-label   { font-size: 14px; font-weight: 700; }
.difficulty-count   { font-size: 11px; font-weight: 700; border: 1px solid; border-radius: 12px; padding: 2px 9px; }
.difficulty-chevron { color: var(--text3); font-size: 16px; }

/* ════════════════════════════════════════════════════════════════
   LAB TABLE
════════════════════════════════════════════════════════════════ */
.lab-table { border-top: 1px solid var(--border); }
.lab-row {
  display: grid; grid-template-columns: 52px 1fr auto auto;
  align-items: center; gap: 0;
  border-bottom: 1px solid var(--border);
  transition: background .1s; min-height: 54px;
}
.lab-row:last-child { border-bottom: none; }
.lab-row:hover { background: #F8FAFB; }
.lab-row-num {
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: var(--text3); padding: 12px 6px;
  border-right: 1px solid var(--border); align-self: stretch;
}
.lab-row-info  { padding: 10px 16px; min-width: 0; }
.lab-row-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; line-height: 1.4; }
.lab-row-tags  { display: flex; gap: 4px; flex-wrap: wrap; }
.lab-tag {
  display: inline-block; background: #EBF5FB; border: 1px solid #A9CCE3;
  color: var(--aws-blue2); font-size: 10px; border-radius: var(--r-sm);
  padding: 1px 6px; font-family: 'JetBrains Mono', monospace;
}
.pdf-indicator {
  display: inline-flex; align-items: center; gap: 3px;
  background: #EAFAF1; border: 1px solid #A9DFBF;
  color: #196F3D; font-size: 10px; border-radius: var(--r-sm);
  padding: 1px 6px; font-weight: 600;
}
.lab-row-time    { padding: 10px 12px; color: var(--text3); font-size: 12px; white-space: nowrap; }
.lab-row-actions { padding: 10px 12px; display: flex; align-items: center; gap: 6px; justify-content: flex-end; }

/* ════════════════════════════════════════════════════════════════
   BUTTONS
════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 16px; border-radius: var(--r-md); border: none;
  font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: all .15s; text-decoration: none; white-space: nowrap;
}
.btn-primary         { background: var(--aws-orange); color: #000; border: 1px solid var(--aws-orange2); }
.btn-primary:hover   { background: var(--aws-orange2); }
.btn-secondary       { background: var(--white); color: var(--text); border: 1px solid var(--border2); }
.btn-secondary:hover { background: var(--bg); border-color: var(--text2); }
.btn-danger          { background: var(--white); color: var(--aws-red); border: 1px solid #e0a0a0; }
.btn-danger:hover    { background: #FFF5F5; border-color: var(--aws-red); }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* Provider console button colours */
.btn-console-azure       { background: #0078D4; color: #fff; border-color: #005A9E; }
.btn-console-azure:hover { background: #005A9E; }
.btn-console-gcp         { background: #4285F4; color: #fff; border-color: #1A56DB; }
.btn-console-gcp:hover   { background: #1A56DB; }

/* ════════════════════════════════════════════════════════════════
   EMPTY STATES
════════════════════════════════════════════════════════════════ */
.empty-state {
  text-align: center; padding: 56px 24px; color: var(--text3);
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.empty-icon  { font-size: 36px; margin-bottom: 12px; }
.empty-title { font-size: 15px; font-weight: 700; color: var(--text2); margin-bottom: 6px; }
.empty-sub   { font-size: 13px; }

.svc-empty-state {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 60px 40px;
  text-align: center; box-shadow: var(--shadow-sm);
}
.svc-empty-icon  { font-size: 56px; margin-bottom: 16px; }
.svc-empty-title { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.svc-empty-sub   { font-size: 14px; color: var(--text2); max-width: 500px; margin: 0 auto 28px; line-height: 1.7; }
.svc-empty-checklist {
  display: inline-flex; flex-direction: column; gap: 8px; text-align: left;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 18px 24px; margin-bottom: 28px;
}
.svc-empty-check { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text2); }
.svc-empty-check span { color: var(--aws-green); font-size: 16px; font-weight: 700; }
.svc-empty-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ════════════════════════════════════════════════════════════════
   MODAL
════════════════════════════════════════════════════════════════ */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.45);
  align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white); border-radius: var(--r-xl);
  width: 100%; max-width: 700px;
  box-shadow: var(--shadow-lg); animation: modalIn .2s ease; margin: auto;
}
@keyframes modalIn {
  from { opacity:0; transform: translateY(-12px) scale(.98); }
  to   { opacity:1; transform: translateY(0)      scale(1); }
}
.modal-header {
  background: var(--aws-navy); padding: 18px 24px;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; border-radius: var(--r-xl) var(--r-xl) 0 0;
}
/* Azure modal header */
.modal[data-provider="azure"] .modal-header { background: #0078D4; }
.modal[data-provider="azure"] .modal-lab-id { color: #A8D4F5; }
.modal[data-provider="azure"] .modal-tab.active { color: #0078D4; border-bottom-color: #0078D4; }
/* GCP modal header */
.modal[data-provider="gcp"]   .modal-header { background: #1A2332; border-top: 3px solid #4285F4; }
.modal[data-provider="gcp"]   .modal-lab-id { color: #A8C4F8; }
.modal[data-provider="gcp"]   .modal-tab.active { color: #4285F4; border-bottom-color: #4285F4; }

.modal-lab-id  { font-size: 11px; color: var(--aws-orange); font-family: 'JetBrains Mono', monospace; margin-bottom: 4px; }
.modal-title   { font-size: 16px; font-weight: 700; color: #fff; line-height: 1.3; }
.modal-close {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  color: #fff; width: 30px; height: 30px; border-radius: var(--r-md);
  cursor: pointer; font-size: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; transition: background .15s;
}
.modal-close:hover { background: rgba(255,255,255,.25); }
.modal-tabs {
  display: flex; border-bottom: 1px solid var(--border);
  background: var(--bg); padding: 0 24px;
}
.modal-tab {
  padding: 11px 16px; font-size: 13px; font-weight: 500;
  color: var(--text2); cursor: pointer; border-bottom: 2px solid transparent;
  transition: all .15s; margin-bottom: -1px; user-select: none;
}
.modal-tab:hover { color: var(--text); }
.modal-tab.active { color: var(--aws-orange2); border-bottom-color: var(--aws-orange); font-weight: 600; }
.modal-body { padding: 24px; }
.modal-tab-content { display: none; }
.modal-tab-content.active { display: block; }
.modal-footer {
  padding: 14px 24px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border-radius: 0 0 var(--r-xl) var(--r-xl);
}

/* ════════════════════════════════════════════════════════════════
   MODAL BODY CONTENT
════════════════════════════════════════════════════════════════ */
.info-section { margin-bottom: 20px; }
.info-section:last-child { margin-bottom: 0; }
.info-section-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--aws-navy); margin-bottom: 10px;
  padding-bottom: 6px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 6px;
}
.objective-item {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px; line-height: 1.5; color: var(--text2);
  padding: 4px 0; border-bottom: 1px solid #F5F7F8;
}
.objective-item:last-child { border-bottom: none; }
.obj-bullet { color: var(--aws-orange); font-size: 10px; margin-top: 4px; flex-shrink: 0; }
.prereq-chip {
  display: inline-flex; align-items: center;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 4px 10px;
  font-size: 12px; color: var(--text2); font-family: 'JetBrains Mono', monospace;
}
.step-item { display: flex; gap: 14px; margin-bottom: 16px; }
.step-num-circle {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--aws-navy); color: #fff;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.step-body-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.step-body-desc  { font-size: 12px; color: var(--text2); line-height: 1.6; }
.diff-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.diff-badge.beginner     { background: #E9F7EF; color: #196F3D; border: 1px solid #A9DFBF; }
.diff-badge.intermediate { background: #FEF9E7; color: #9A7D0A; border: 1px solid #F9E79F; }
.diff-badge.advanced     { background: #FDEDEC; color: #922B21; border: 1px solid #F1948A; }
.code-block {
  background: var(--aws-navy); border-radius: var(--r-md);
  padding: 16px 18px; font-family: 'JetBrains Mono', monospace;
  font-size: 12px; color: #A8DADC; line-height: 1.9; overflow-x: auto; margin-top: 10px;
}
.code-block .comment { color: #546E7A; }
.code-block .cmd     { color: #80CBC4; }
.code-block .flag    { color: #CE93D8; }
.code-block .val     { color: #FFB74D; }

/* ════════════════════════════════════════════════════════════════
   PDF
════════════════════════════════════════════════════════════════ */
.pdf-drop-zone {
  border: 2px dashed var(--border2); border-radius: var(--r-lg);
  padding: 36px 20px; text-align: center; cursor: pointer;
  transition: all .2s; background: var(--bg); display: block;
}
.pdf-drop-zone:hover, .pdf-drop-zone.drag { border-color: var(--aws-blue); background: #EBF5FB; }
.pdf-drop-icon  { font-size: 36px; margin-bottom: 10px; }
.pdf-drop-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.pdf-drop-sub   { font-size: 12px; color: var(--text3); }
.pdf-drop-zone input[type=file] { display: none; }
.pdf-card         { border: 1px solid var(--border); border-radius: var(--r-lg); margin-bottom: 12px; overflow: hidden; box-shadow: var(--shadow-sm); }
.pdf-card-header  { background: var(--bg); border-bottom: 1px solid var(--border); padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; }
.pdf-card-name    { font-size: 13px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 6px; }
.pdf-card-actions { display: flex; gap: 8px; }
.pdf-frame        { width: 100%; height: 400px; border: none; display: block; }

/* ════════════════════════════════════════════════════════════════
   TOAST
════════════════════════════════════════════════════════════════ */
.toast {
  position: fixed; bottom: 20px; left: 20px; z-index: 999;
  background: var(--aws-navy); color: #fff;
  padding: 12px 18px; border-radius: var(--r-lg);
  font-size: 13px; display: flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow-md); animation: toastIn .3s ease;
  max-width: 360px; border-left: 4px solid var(--aws-orange);
}
@keyframes toastIn { from { opacity:0; transform:translateX(-16px); } to { opacity:1; transform:translateX(0); } }
.toast.success { border-left-color: var(--aws-teal); }
.toast.error   { border-left-color: var(--aws-red); }

/* ════════════════════════════════════════════════════════════════
   CONFIRM DIALOG
════════════════════════════════════════════════════════════════ */
.confirm-overlay { display: none; position: fixed; inset: 0; z-index: 600; background: rgba(0,0,0,.4); align-items: center; justify-content: center; }
.confirm-overlay.open { display: flex; }
.confirm-box     { background: var(--white); border-radius: var(--r-xl); padding: 28px; max-width: 400px; width: calc(100% - 32px); box-shadow: var(--shadow-lg); animation: modalIn .2s ease; }
.confirm-title   { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.confirm-msg     { font-size: 13px; color: var(--text2); line-height: 1.6; margin-bottom: 24px; }
.confirm-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ════════════════════════════════════════════════════════════════
   SCROLLBAR
════════════════════════════════════════════════════════════════ */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

/* ════════════════════════════════════════════════════════════════
   PROVIDER PANELS (homepage)
════════════════════════════════════════════════════════════════ */
.provider-panel        { display: none; }
.provider-panel.active { display: block; }

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE — tablet  ≤ 900px
════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .header-search-box { width: 160px; }
  .svc-main { padding: 16px 16px 40px; }
  .svc-banner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .svc-banner-stats { width: 100%; justify-content: space-around; }
  .filter-bar { flex-direction: column; align-items: stretch; gap: 8px; }
  .search-box { min-width: 0; }
  .lab-row { grid-template-columns: 44px 1fr auto; }
  .lab-row-time { display: none; }
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal { max-width: 100%; border-radius: var(--r-xl) var(--r-xl) 0 0; max-height: 92vh; display: flex; flex-direction: column; }
  .modal-header { border-radius: var(--r-xl) var(--r-xl) 0 0; }
  .modal-body   { overflow-y: auto; flex: 1; padding: 16px; }
  .modal-footer { flex-wrap: wrap; gap: 8px; padding: 10px 16px; }
  .modal-footer .btn { flex: 1; justify-content: center; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: 1; }
}

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE — phone  ≤ 540px
════════════════════════════════════════════════════════════════ */
@media (max-width: 540px) {
  .header-title  { display: none; }
  .header-user span:not(.user-avatar) { display: none; }
  #adminBtnLabel { display: none; }
  .header-search-wrap { display: none; }
  .top-header { padding: 0 10px; }
  .header-logo { padding: 0 10px 0 0; margin-right: 8px; }
  .hdr-tab { padding: 0 10px; font-size: 11px; }
  .svc-main { padding: 10px 10px 32px; }
  .svc-banner { padding: 14px 16px; }
  .svc-banner-name { font-size: 17px; }
  .svc-bstat { flex: 1; padding: 8px 0; }
  .filter-pills { gap: 4px; }
  .filter-pill  { padding: 4px 10px; font-size: 11px; }
  .lab-row { grid-template-columns: 36px 1fr auto; min-height: 48px; }
  .lab-row-num  { font-size: 9px; padding: 8px 4px; }
  .lab-row-info { padding: 8px 10px; }
  .lab-row-title { font-size: 12px; }
  .lab-row-tags  { display: none; }
  .lab-row-actions { padding: 6px; gap: 4px; }
  .lab-row-actions .btn-danger, .pdf-indicator { display: none; }
  .modal-overlay { padding: 0; align-items: stretch; }
  .modal         { border-radius: 0; max-height: 100vh; height: 100vh; }
  .modal-header  { border-radius: 0; }
  .modal-tabs    { overflow-x: auto; }
  .modal-tabs::-webkit-scrollbar { display: none; }
  .modal-tab     { white-space: nowrap; padding: 10px 12px; }
  .modal-footer  { flex-direction: column; }
  .modal-footer .btn { width: 100%; justify-content: center; }
  .pdf-drop-zone { padding: 24px 12px; }
  .pdf-drop-icon { font-size: 28px; margin-bottom: 8px; }
  .toast { left: 10px; right: 10px; bottom: 10px; max-width: unset; }
  .svc-empty-state { padding: 40px 20px; }
  .svc-empty-checklist { min-width: unset; width: 100%; }
  .svc-empty-actions { flex-direction: column; }
  .svc-empty-actions .btn { width: 100%; justify-content: center; }
  /* GCP stats banner stacks on phone */
  .gcp-stats-banner { flex-wrap: wrap; }
  .gcp-stat-cell    { min-width: 50%; }
  /* Azure stats bar stacks on phone */
  .az-stats-bar { flex-direction: column; gap: 6px; }
}