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

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* Font convention (matches digitalwonderlab.com): Barlow for body copy, Barlow Condensed for headings */
body { font-family: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #F2F3F9; color: #000643; font-size: 15px; min-height: 100vh; }
h1, h2, h3, h4, h5, h6 { font-family: 'Barlow Condensed', sans-serif; }

/* Header — one shared bar for the overview, dashboard and admin views.
   Wraps instead of overflowing when the actions don't fit. */
.header { background: #000F9F; color: #fff; padding: 10px 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; row-gap: 6px; }
.header-logo { width: auto; height: 30px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.header-logo .header-logo-img { width: auto; height: 30px; display: block; }
.header h1 { font-family: 'Barlow Condensed', sans-serif; font-size: 20px; font-weight: 700; line-height: 1.3; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header .updated { font-size: 12.5px; color: rgba(255,255,255,0.85); }

/* Tab nav */
/* Tabs wrap onto extra rows instead of overflowing off-screen (clients can't
   discover a hidden horizontal scroll). */
.tab-nav { background: #fff; border-bottom: 1px solid #CCCFEC; padding: 0 12px; display: flex; flex-wrap: wrap; gap: 4px; white-space: nowrap; }
.tab-btn { padding: 11px 12px; font-size: 14px; font-weight: 500; color: #000643; border: none; background: none; cursor: pointer; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; flex-shrink: 0; font-family: 'Barlow', sans-serif; }
.tab-btn:hover { color: #000F9F; }
.tab-btn.active { color: #000F9F; border-bottom-color: #000F9F; font-weight: 700; }
.tab-btn.tab-on-hold { opacity: 0.6; }

/* Tab panels — single 24px inset, aligned with the first tab label (nav 12px + button 12px) */
.tab-panel { display: none; padding: 24px; }
.tab-panel.active { display: block; }

/* Summary strip */
.summary-strip { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.summary-card { background: #fff; border-radius: 8px; padding: 14px 18px; text-align: center; min-width: 90px; box-shadow: 0 1px 3px rgba(0,0,0,.07); }
.summary-card .num { font-size: 26px; font-weight: 700; line-height: 1; margin-bottom: 3px; color: #000F9F; }
.summary-card .lbl { font-size: 11px; color: #475569; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }

/* Section titles */
.section-title { font-size: 12px; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px; margin-top: 6px; display: flex; align-items: center; gap: 8px; }
.section-count { background: #e2e8f0; color: #475569; font-size: 11px; padding: 1px 6px; border-radius: 8px; font-weight: 700; }

/* Project cards */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 28px; }
.project-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 16px 18px; box-shadow: 0 1px 3px rgba(0,0,0,.06); border-left: 4px solid #e2e8f0; }
.project-card.active-delivery { border-left-color: #10b981; }
.project-card.pre-planning { border-left-color: #f59e0b; }
.project-card.over-budget { border-left-color: #ef4444; }
.project-name { font-weight: 700; font-size: 14px; margin-bottom: 8px; color: #000643; }
.project-name a { color: inherit; text-decoration: none; }
.project-name a:hover { text-decoration: underline; }
.project-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.project-detail { font-size: 13px; color: #475569; }
.project-po { font-size: 13px; color: #475569; margin-top: 5px; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.badge-green  { background: #dcfce7; color: #16a34a; }
.badge-amber  { background: #fef3c7; color: #d97706; }
.badge-red    { background: #fee2e2; color: #dc2626; }
.badge-blue   { background: rgba(0,15,159,0.1); color: #000F9F; }
.badge-purple { background: rgba(239,42,193,0.1); color: #C4208E; }
.badge-grey   { background: #F2F3F9; color: #475569; }
.badge-teal   { background: rgba(15,213,248,0.15); color: #0099b3; }
.badge-orange { background: rgba(255,171,77,0.2); color: #c47600; }

/* Card body extras */
.project-inline-meta { font-size: 12px; color: #475569; margin-bottom: 10px; }
.days-banner { border-radius: 6px; padding: 6px 12px; margin-bottom: 12px; font-size: 13px; font-weight: 500; display: inline-block; }
.days-banner .dn { font-weight: 700; font-size: 15px; }
.db-amber { background: #fef3c7; color: #d97706; }
.db-green { background: #dcfce7; color: #15803d; }
.db-red   { background: #fee2e2; color: #dc2626; }
.db-grey  { background: #F2F3F9; color: #475569; }
.days-banner-est { border-radius: 6px; padding: 4px 12px; margin-bottom: 12px; font-size: 12px; font-weight: 500; display: inline-block; margin-top: -8px; }
.days-banner-est .dn { font-weight: 700; font-size: 13px; }
.db-est      { background: rgba(0,15,159,0.08); color: #000F9F; }
.db-est-red  { background: #fee2e2; color: #dc2626; }

/* Hours tracking */
.hours-track { margin-bottom: 10px; }
.hours-track-labels { display: flex; justify-content: space-between; font-size: 12px; color: #475569; margin-bottom: 4px; }
.hours-track-bar { background: #e2e8f0; border-radius: 3px; height: 4px; overflow: hidden; }
.hours-track-fill { height: 100%; border-radius: 3px; }
.htf-amber { background: #f59e0b; }
.htf-green { background: #22c55e; }
.htf-red   { background: #ef4444; }
.htf-grey  { background: #cbd5e1; }
.hours-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; border-top: 1px solid #F2F3F9; padding-top: 10px; margin-top: 2px; }
.hours-cell { text-align: center; padding: 4px 2px; border: 1px solid #F2F3F9; border-radius: 5px; }
.hours-val { font-size: 13px; font-weight: 700; line-height: 1.2; }
.hv-blue  { color: #000F9F; }
.hv-grey  { color: #475569; }
.hv-dark  { color: #000643; }
.hv-green { color: #15803d; }
.hv-red   { color: #dc2626; }
.hours-lbl { font-size: 11px; color: #475569; margin-top: 2px; text-transform: uppercase; letter-spacing: .3px; }

/* Epics table */
.epics-wrap { background: #fff; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.07); overflow: hidden; margin-bottom: 18px; }
.epics-project-header { display: flex; justify-content: space-between; align-items: center; padding: 11px 16px; border-bottom: 1px solid #e2e8f0; background: #f8fafc; }
.epics-project-header a { font-weight: 700; font-size: 14px; color: #000643; text-decoration: none; }
.epics-project-header a:hover { text-decoration: underline; }
.epics-project-summary { font-size: 12px; color: #475569; display: flex; align-items: center; gap: 10px; }
.epics-table { width: 100%; border-collapse: collapse; }
.epics-table th { background: #f8fafc; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #475569; padding: 8px 14px; text-align: left; border-bottom: 1px solid #e2e8f0; }
.epics-table td { padding: 9px 14px; border-bottom: 1px solid #f8fafc; font-size: 12.5px; vertical-align: middle; }
.epics-table tr:last-child td { border-bottom: none; }
.epics-table tr:hover td { background: #fafbfc; }
.epics-table tr.total-row td { border-top: 1px solid #e2e8f0; border-bottom: none; background: #f8fafc; font-weight: 600; }
.epics-table tr.total-row:hover td { background: #f8fafc; }
.epic-bar-bg { background: #e2e8f0; height: 3px; border-radius: 2px; margin-top: 4px; width: 80px; display: block; }
.epic-bar-fill { height: 100%; background: #22c55e; border-radius: 2px; }
.stories-pill { background: #F2F3F9; color: #475569; font-size: 12px; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.logged-val { color: #000F9F; font-weight: 600; }
.remaining-val { color: #15803d; font-weight: 600; }
.remaining-val.neg { color: #dc2626; }

/* Status chips — all pill-shaped tags sit at 12px */
.status { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 8px; white-space: nowrap; display: inline-block; }
.s-active { background: rgba(0,15,159,0.1); color: #000F9F; }
.s-done { background: #dcfce7; color: #15803d; }
.s-blocked { background: #fee2e2; color: #dc2626; }
.s-todo { background: #F2F3F9; color: #475569; }
.s-needs { background: #fef9c3; color: #a16207; }
.s-deploy { background: rgba(239,42,193,0.1); color: #C4208E; }
.s-released { background: #dcfce7; color: #15803d; }
.s-overdue  { background: #fee2e2; color: #dc2626; }
.s-backlog { background: #F2F3F9; color: #475569; }
.s-upcoming { background: rgba(15,213,248,0.12); color: #0099b3; }

/* Release blocks */
.release-meta { font-size: 13px; color: #475569; display: flex; gap: 16px; flex-wrap: wrap; }
.release-meta span { display: flex; align-items: center; gap: 4px; }
.release-meta .lbl { font-weight: 600; color: #475569; text-transform: uppercase; font-size: 11px; letter-spacing: .4px; }

/* Priority chips */
.pri { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 8px; white-space: nowrap; display: inline-block; }
.pri-critical { background: #fee2e2; color: #dc2626; }
.pri-high { background: #fef9c3; color: #a16207; }
.pri-medium { background: rgba(0,15,159,0.1); color: #000F9F; }
.pri-low { background: #dcfce7; color: #15803d; }
.pri-none { color: #cbd5e1; font-size: 12px; }

/* Sprint blocks */
.sprints-wrap { margin-bottom: 6px; }
.sprint-block { background: #fff; border-radius: 10px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.07); overflow: hidden; }
.sprint-header { padding: 11px 16px; display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.sprint-header:hover { background: #fafbfc; }
.sprint-chevron { font-size: 11px; color: #475569; transition: transform .2s; flex-shrink: 0; display: inline-block; }
.sprint-chevron.open { transform: rotate(90deg); }
.sprint-name { font-weight: 700; font-size: 13px; }
.sprint-dates { font-size: 12px; color: #475569; }
.sprint-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.sprint-count { font-size: 12px; color: #475569; }
.sprint-stories-table { width: 100%; border-collapse: collapse; }
.sprint-stories-table th { background: #f8fafc; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #475569; padding: 7px 14px; text-align: left; border-bottom: 1px solid #e2e8f0; }
.sprint-stories-table td { padding: 8px 14px; border-bottom: 1px solid #f8fafc; font-size: 12px; vertical-align: middle; }
.sprint-stories-table tr:last-child td { border-bottom: none; }
.sprint-stories-table tr:hover td { background: #fafbfc; }
.epic-tag { font-size: 12px; background: rgba(239,42,193,0.08); color: #C4208E; border: 1px solid rgba(239,42,193,0.2); padding: 1px 7px; border-radius: 3px; font-weight: 600; white-space: nowrap; display: inline-block; max-width: 200px; overflow: hidden; text-overflow: ellipsis; }

/* Tickets */
/* Support contract hours summary (top of the Support tab) */
.support-contract:empty { display: none; }
.sc-card { background: #fff; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.07); padding: 16px 18px; margin-bottom: 20px; border-left: 3px solid #000F9F; }
.sc-card.sc-low { border-left-color: #ef4444; }
.sc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.sc-title { font-size: 13px; font-weight: 700; color: #000643; text-transform: uppercase; letter-spacing: .4px; }
.sc-meta { font-size: 13px; color: #94a3b8; }
.sc-figures { display: flex; gap: 28px; margin-bottom: 12px; }
.sc-figure { text-align: left; }
.sc-num { font-size: 22px; font-weight: 700; line-height: 1; color: #000643; margin-bottom: 3px; }
.sc-num.sc-remaining { color: #000F9F; }
.sc-card.sc-low .sc-num.sc-remaining { color: #ef4444; }
.sc-lbl { font-size: 11px; color: #475569; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.sc-bar { height: 8px; border-radius: 5px; background: #eef0f7; overflow: hidden; }
.sc-bar-fill { height: 100%; background: #000F9F; border-radius: 5px; transition: width 0.3s ease; }
.sc-card.sc-low .sc-bar-fill { background: #ef4444; }
.sc-expiry { margin-top: 12px; font-size: 13px; color: #334155; }
.sc-expiry-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: #475569; margin-right: 5px; }
.sc-expiry-rel { color: #94a3b8; }
.sc-expiry-urgent { color: #ef4444; font-weight: 600; }
.sc-expiry-urgent .sc-expiry-label, .sc-expiry-urgent .sc-expiry-rel { color: #ef4444; }

.tickets-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.ticket-stat { background: #fff; border-radius: 8px; padding: 12px 16px; text-align: center; min-width: 80px; box-shadow: 0 1px 3px rgba(0,0,0,.07); }
.ticket-stat .num { font-size: 22px; font-weight: 700; line-height: 1; margin-bottom: 2px; }
.ticket-stat .lbl { font-size: 11px; color: #475569; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.tickets-table-wrap { background: #fff; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.07); overflow: hidden; }
.tickets-table { width: 100%; border-collapse: collapse; }
.tickets-table th { background: #f8fafc; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #475569; padding: 9px 14px; text-align: left; border-bottom: 1px solid #e2e8f0; }
.tickets-table td { padding: 9px 14px; border-bottom: 1px solid #f8fafc; font-size: 12.5px; vertical-align: middle; }
.tickets-table tr:last-child td { border-bottom: none; }
.tickets-table tr:hover td { background: #fafbfc; }
.ticket-type { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 4px; }
.type-support { background: rgba(0,15,159,0.08); color: #000F9F; }
.type-change { background: #fef9c3; color: #a16207; }
.type-bug { background: #fee2e2; color: #dc2626; }
.type-question { background: #f0fdf4; color: #15803d; }

/* Placeholder */
.placeholder { background: #fff; border-radius: 10px; padding: 48px 24px; text-align: center; color: #475569; box-shadow: 0 1px 3px rgba(0,0,0,.07); }
.placeholder .icon { font-size: 36px; margin-bottom: 10px; }
.placeholder h3 { font-size: 16px; font-weight: 700; color: #475569; margin-bottom: 6px; }
.placeholder p { font-size: 13px; }

/* Auth gate — split screen: brand panel (left) + form (right) */
.auth-gate {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; display: flex; z-index: 2000;
  background: linear-gradient(74deg,
    #000f9f 0%, #2313a4 16.83%, #5919ab 29.37%, #871eb2 39.83%, #ac22b7 51.12%,
    #c925bb 58.65%, #de28be 69.11%, #ea29c0 79.99%, #ef2ac1 87.1%);
}
.auth-brand {
  width: 41.6%; flex-shrink: 0; padding: 64px;
  background: transparent;
  color: #fff;
  display: flex; flex-direction: column; justify-content: center;
}
.auth-brand-hero { transform: translateY(-7vh); }
.auth-brand-hero h1 { font-family: 'Barlow Condensed', sans-serif; font-size: 64px; font-weight: 700; line-height: 1.125; max-width: 400px; }
.auth-brand-hero p { font-family: 'Barlow Condensed', sans-serif; font-size: 24px; font-weight: 400; line-height: 1.333; color: rgba(255,255,255,.9); margin-top: 24px; max-width: 400px; }

.auth-panel { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px; background: #fff; }
.auth-panel-logo { position: absolute; top: 40px; right: 48px; width: 120px; }
.auth-panel-logo img { width: 100%; height: auto; display: block; }
.auth-box { width: 100%; max-width: 497px; }
.auth-box-logo { display: none; margin-bottom: 20px; }
.auth-box-logo img { width: 120px; height: auto; }
.auth-sub { font-size: 13px; color: #475569; margin-top: 4px; margin-bottom: 22px; }
.auth-box-heading { margin-bottom: 32px; }
.auth-box-heading h2 { font-family: 'Barlow Condensed', sans-serif; font-size: 45px; line-height: 1.18; font-weight: 700; color: #000F9F; }
.auth-box-subtitle { font-family: 'Barlow', sans-serif; font-size: 16px; line-height: 1.5; color: #000643; opacity: .9; margin-top: 12px; }

.auth-field { display: block; margin-bottom: 24px; }
.auth-field > span { display: block; font-family: 'Barlow Condensed', sans-serif; font-size: 16px; line-height: 1.5; font-weight: 700; color: #000F9F; margin-bottom: 4px; }
.auth-required { color: #EA424F; font-family: 'Barlow', sans-serif; font-weight: 400; margin-left: 2px; }
.auth-field input {
  width: 100%; height: 40px; padding: 4px 16px; border: 1px solid #000F9F; border-radius: 4px;
  font-size: 16px; outline: none; font-family: 'Barlow', sans-serif; color: #000643; background: #fff;
}
.auth-field input:focus { box-shadow: 0 0 0 3px rgba(0,15,159,.12); }
.auth-field-wrap { position: relative; }
.auth-field-wrap input { padding-right: 44px; }
.pw-toggle {
  position: absolute; right: 0; top: 0; bottom: 0; width: 40px;
  background: none; border: none; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
  color: #475569;
}
.pw-toggle:hover { color: #000F9F; }
.pw-toggle::before {
  content: '';
  display: block; width: 18px; height: 18px;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
}
.pw-toggle[aria-label="Hide password"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94'/%3E%3Cpath d='M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94'/%3E%3Cpath d='M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E");
}
.auth-box button[type="submit"] {
  display: inline-block; width: auto; padding: 12px 24px; background: #FFAB4D; color: #000F9F; border: none;
  border-radius: 4px; font-size: 16px; line-height: 1.5; font-weight: 700; cursor: pointer; font-family: 'Barlow', sans-serif; margin-top: 0;
}
.auth-box button[type="submit"]:hover { opacity: 0.9; }
.auth-box button[type="submit"]:disabled { opacity: .5; cursor: not-allowed; }
.auth-error { color: #dc2626; font-size: 13px; margin-top: 12px; min-height: 18px; }
#otp-code { font-size: 24px; letter-spacing: 8px; text-align: center; font-family: monospace; }
.otp-success-msg { color: #15803d; font-size: 13px; margin-top: 6px; }
.pw-requirements { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pw-req { font-size: 13px; color: #64748b; padding-left: 22px; position: relative; transition: color .15s; }
.pw-req::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; border-radius: 50%; border: 2px solid #cbd5e1; background: transparent; transition: background .15s, border-color .15s; }
.pw-req.met { color: #15803d; }
.pw-req.met::before { background: #15803d; border-color: #15803d; }
.pw-req.met::after { content: ''; position: absolute; left: 3px; top: 50%; transform: translateY(-60%) rotate(45deg); width: 4px; height: 7px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; }
.pw-match-msg { font-size: 13px; margin: 0 0 12px; min-height: 18px; }
.pw-match-msg.match { color: #15803d; }
.pw-match-msg.no-match { color: #dc2626; }
.auth-link-btn { background: none; border: none; padding: 0; font-size: 13px; color: #000F9F; cursor: pointer; text-decoration: underline; font-family: inherit; }
.auth-link-btn:hover { opacity: .75; }
.auth-forgot-link { margin-top: 16px; text-align: center; }
#forgot-pw-link-wrap { margin-top: 32px; text-align: left; }
#forgot-pw-link-wrap .auth-link-btn { font-size: 16px; font-family: 'Barlow', sans-serif; text-decoration: none; opacity: .9; }
#forgot-pw-link-wrap .auth-link-btn:hover { text-decoration: underline; }

/* Microsoft 365 sign-in button (full-width, pale blue) */
#ms-login-wrap { margin-top: 0; text-align: left; }
.ms-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 12px 24px; background: #F2F3F9; border: none; border-radius: 4px; cursor: pointer;
  font-family: 'Barlow', sans-serif; font-weight: 700; font-size: 16px; line-height: 1.5; color: #000F9F;
}
.ms-btn:hover { background: #E7E9F4; }
.ms-btn svg { width: 20px; height: 20px; flex-shrink: 0; display: block; }
.auth-forgot-heading { font-size: 18px; font-weight: 700; color: #000643; margin-bottom: 4px; }

@media (max-width: 768px) {
  .auth-brand { display: none; }
  .auth-box-logo { display: block; }
  .auth-panel-logo { display: none; }
  .auth-panel { padding: 32px; }
}

/* Clients overview (landing) */
.clients-overview { min-height: 100vh; background: #F2F3F9; }
.overview-main { max-width: none; margin: 0; padding: 32px; }
.overview-intro { margin-bottom: 28px; }
.overview-intro h2 { font-family: 'Barlow Condensed', sans-serif; font-size: 28px; font-weight: 700; line-height: 1.2; color: #000F9F; }
.overview-intro p { font-family: 'Barlow', sans-serif; font-size: 15px; line-height: 1.5; color: #000643; margin-top: 8px; }
.clients-grid { display: flex; flex-wrap: wrap; gap: 16px; }
.client-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 16px; text-align: left;
  background: #fff; border: 1px solid #CCCFEC; border-radius: 8px;
  padding: 20px; cursor: pointer; font-family: inherit; width: 300px; max-width: 100%;
  box-shadow: 0 1px 3px rgba(0,15,159,.06);
  transition: box-shadow .15s, transform .1s, border-color .15s;
}
.client-card:hover { box-shadow: 0 6px 20px rgba(0,15,159,.12); transform: translateY(-2px); border-color: #000F9F; }
.client-card-name { font-family: 'Barlow Condensed', sans-serif; font-size: 20px; font-weight: 700; line-height: 1.25; color: #000F9F; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-card-open {
  display: inline-flex; align-items: center; justify-content: center;
  background: #FFAB4D; color: #000F9F; font-family: 'Barlow', sans-serif; font-weight: 700; font-size: 13px; line-height: 18px;
  padding: 7px 14px; border-radius: 4px; margin-top: 0;
}
.client-card:hover .client-card-open { background: #F59E2E; }
.overview-empty { width: 100%; text-align: center; padding: 48px 20px; color: #475569; }
.overview-empty h3 { font-size: 16px; color: #000643; margin-bottom: 6px; }

/* Header actions + controls — one set, shared by all three views */
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-wrap: wrap; min-width: 0; }
.header .allclients-btn { background: transparent; border: none; color: #fff; font-family: 'Barlow', sans-serif; font-weight: 700; font-size: 13px; padding: 6px 8px; border-radius: 4px; cursor: pointer; }
.header .allclients-btn:hover { background: rgba(255,255,255,.14); }
.header .client-switcher { background: #fff; color: #000643; border: none; border-radius: 4px; padding: 6px 10px; font-family: 'Barlow', sans-serif; font-size: 13px; cursor: pointer; max-width: 200px; }
.header .admin-btn,
.header .refresh-btn { background: transparent; border: 1px solid rgba(255,255,255,.55); color: #fff; border-radius: 4px; padding: 6px 12px; font-family: 'Barlow', sans-serif; font-weight: 700; font-size: 13px; cursor: pointer; }
.header .admin-btn:hover,
.header .refresh-btn:hover { background: rgba(255,255,255,.15); }
.header .refresh-btn:disabled { opacity: .5; cursor: not-allowed; }
.header .signout-btn { background: #FFAB4D; color: #000F9F; border: none; border-radius: 4px; padding: 6px 12px; font-family: 'Barlow', sans-serif; font-weight: 700; font-size: 13px; cursor: pointer; }
.header .signout-btn:hover { background: #F59E2E; }

/* Tab badge */
.tab-count-badge {
  background: #EF2AC1; color: #fff; font-size: 11px; font-weight: 700;
  border-radius: 8px; padding: 1px 5px; margin-left: 3px;
}

/* Loading overlay */
.loading-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(242,243,249,.85); display: flex; flex-direction: column;
  align-items: center; justify-content: center; z-index: 1000;
  font-size: 14px; color: #475569;
}
.loading-spinner {
  width: 32px; height: 32px; border: 3px solid #e2e8f0;
  border-top-color: #000F9F; border-radius: 50%;
  animation: spin .8s linear infinite; margin-bottom: 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Error banner */
.error-banner {
  background: #fee2e2; color: #dc2626; padding: 10px 24px;
  font-size: 13px; font-weight: 500;
}

/* Section loading skeletons */
.section-skeleton {
  background: #fff; border-radius: 10px; padding: 20px;
  text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.07);
  min-height: 56px; display: flex; align-items: center; justify-content: center; gap: 10px;
}
.skeleton-spinner {
  width: 20px; height: 20px; border: 2px solid #e2e8f0;
  border-top-color: #000F9F; border-radius: 50%;
  animation: spin .8s linear infinite; flex-shrink: 0;
}
.skeleton-text { font-size: 13px; color: #475569; }

/* Refresh in progress: button spinner, progress strip, dimmed (still readable) data */
.btn-spinner {
  display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%;
  animation: spin .8s linear infinite;
}
.header .refresh-btn.is-busy:disabled { opacity: .85; cursor: progress; }
.refresh-status:not([hidden]) {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  padding: 8px 24px; background: #eef1ff; border-bottom: 1px solid #d9defa;
  font-size: 13px; color: #1e293b;
}
.refresh-status-lead { font-weight: 600; color: #000F9F; display: inline-flex; align-items: center; }
.refresh-status .btn-spinner { border-color: #c7cdf3; border-top-color: #000F9F; }
.refresh-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.refresh-chip {
  display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px;
  background: #fff; border: 1px solid #d9defa; color: #475569; font-size: 12px;
}
.refresh-chip .btn-spinner { width: 10px; height: 10px; margin-right: 5px; }
.refresh-chip-icon { margin-right: 5px; font-weight: 700; }
.refresh-chip.is-ok { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.refresh-chip.is-error { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
body.is-refreshing .dashboard-main { opacity: .55; transition: opacity .2s ease; }

/* Releases: "Show released" toggle switch */
.releases-toolbar { display: flex; justify-content: flex-end; margin: -8px 0 12px; }
.releases-toolbar:empty { display: none; }
.toggle-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: #1e293b; user-select: none; }
.toggle-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle-track { position: relative; width: 34px; height: 20px; border-radius: 999px; background: #cbd5e1; transition: background .15s ease; flex-shrink: 0; }
.toggle-thumb { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s ease; }
.toggle-switch input:checked + .toggle-track { background: #000F9F; }
.toggle-switch input:checked + .toggle-track .toggle-thumb { transform: translateX(14px); }
.toggle-switch input:focus-visible + .toggle-track { outline: 2px solid #EF2AC1; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .btn-spinner { animation-duration: 2s; }
}

/* Pulsing placeholder values in summary strip */
.loading-placeholder {
  color: #cbd5e1 !important;
  animation: pulse-text 1.5s ease-in-out infinite;
}
@keyframes pulse-text { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* Inline error for failed sections */
.section-error {
  background: #fff5f5; border: 1px solid #fecaca; border-radius: 8px;
  padding: 12px 16px; color: #dc2626; font-size: 13px; text-align: center;
}

/* Dashboard body layout */
.dashboard-body { display: flex; min-height: calc(100vh - 95px); }
.dashboard-main { flex: 1; min-width: 0; }

/* Actions sidebar */
.actions-panel { width: 320px; flex-shrink: 0; background: #fff; border-left: 1px solid #e2e8f0; overflow-y: auto; max-height: calc(100vh - 95px); position: sticky; top: 0; }
.actions-panel-header { padding: 16px 16px 12px; border-bottom: 1px solid #e2e8f0; display: flex; align-items: center; }
.actions-panel-header h3 { font-size: 14px; font-weight: 700; color: #000643; display: flex; align-items: center; gap: 8px; }
.actions-count-badge { font-size: 12px; font-weight: 600; background: #000F9F; color: #fff; border-radius: 10px; padding: 1px 8px; min-width: 20px; text-align: center; }
.actions-empty { padding: 40px 16px; text-align: center; color: #475569; font-size: 13px; }

.action-item { padding: 12px 16px; border-bottom: 1px solid #F2F3F9; transition: opacity 0.3s; }
.action-item:hover { background: #f8fafc; }
.action-item.action-priority-high { border-left: 3px solid #ef4444; }
.action-item-header { margin-bottom: 4px; }
.action-item-title { font-size: 13px; font-weight: 500; color: #000643; text-decoration: none; line-height: 1.4; display: block; }
.action-item-desc { font-size: 12px; color: #475569; line-height: 1.4; margin-bottom: 6px; }
.action-item-title:hover { color: #000F9F; }
.action-item-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.action-tag { font-size: 11px; padding: 2px 6px; border-radius: 4px; white-space: nowrap; }
.action-tag-epic { background: rgba(239,42,193,0.08); color: #C4208E; }
.action-tag-status { background: rgba(0,15,159,0.08); color: #000F9F; }
.action-item-footer { display: flex; align-items: center; justify-content: space-between; }
.action-due { font-size: 12px; color: #475569; }
.action-due.action-overdue { color: #ef4444; font-weight: 600; }
.action-due-label { font-weight: 600; text-transform: uppercase; letter-spacing: .4px; margin-right: 3px; }
.action-done-btn { font-size: 12px; padding: 4px 12px; border: 1px solid #d1d5db; border-radius: 6px; background: #fff; color: #374151; cursor: pointer; transition: all 0.15s; font-family: inherit; }
.action-done-btn:hover { background: #22c55e; color: #fff; border-color: #22c55e; }
.action-done-btn:disabled { opacity: 0.5; cursor: default; }

/* Support tickets: rows open the detail drawer */
.ticket-row { cursor: pointer; }
.ticket-row:focus-visible { outline: 2px solid #000F9F; outline-offset: -2px; }

/* Ticket detail drawer — same 320px width as the Your Actions panel */
.ticket-detail-backdrop { position: fixed; inset: 0; background: rgba(0,6,67,0.28); opacity: 0; visibility: hidden; transition: opacity 0.2s ease; z-index: 60; }
.ticket-detail-backdrop.open { opacity: 1; visibility: visible; }
.ticket-detail-panel { position: fixed; top: 0; right: 0; width: 640px; max-width: 100%; height: 100vh; background: #fff; border-left: 1px solid #e2e8f0; box-shadow: -4px 0 24px rgba(0,6,67,0.12); display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.25s ease; z-index: 61; }
.ticket-detail-panel.open { transform: translateX(0); }
.ticket-detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px; border-bottom: 1px solid #e2e8f0; flex-shrink: 0; }
.ticket-detail-header h3 { font-size: 16px; font-weight: 700; color: #000F9F; line-height: 1.35; }
.ticket-detail-close { background: none; border: none; font-size: 24px; line-height: 1; color: #94a3b8; cursor: pointer; padding: 0 2px; }
.ticket-detail-close:hover { color: #000643; }
.ticket-detail-body { padding: 20px 16px; overflow-y: auto; flex: 1; }
.td-section { margin-bottom: 22px; }
.td-section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #475569; margin-bottom: 10px; }
.td-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #F2F3F9; }
.td-row:last-child { border-bottom: none; }
.td-label { font-size: 13px; color: #475569; font-weight: 600; }
.td-value { font-size: 14px; color: #000643; text-align: right; }
.td-history { display: flex; flex-direction: column; gap: 14px; }
.td-history-item { border-left: 2px solid #e2e8f0; padding: 0 0 2px 10px; }
.td-history-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 3px; }
.td-history-author { font-size: 14px; font-weight: 700; color: #000643; }
.td-history-kind { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: #000F9F; background: rgba(0,15,159,0.08); border-radius: 4px; padding: 1px 6px; margin-left: 4px; vertical-align: middle; }
.td-history-form .td-history-kind { color: #C4208E; background: rgba(239,42,193,0.08); }
.td-history-date { font-size: 12px; color: #94a3b8; white-space: nowrap; }
.td-history-subject { font-size: 13px; font-weight: 600; color: #475569; margin-bottom: 3px; }
.td-history-text { font-size: 14px; color: #334155; line-height: 1.5; word-break: break-word; white-space: normal; }
.td-history-empty { font-size: 14px; color: #94a3b8; line-height: 1.5; }
.td-monday-link { display: inline-block; margin-top: 4px; font-size: 14px; font-weight: 600; color: #000F9F; text-decoration: none; }
.td-monday-link:hover { text-decoration: underline; }
.td-monday-link-top { margin-top: 0; margin-bottom: 16px; }
.td-signoff-btn { display: block; width: 100%; padding: 10px 14px; border: 1px solid #000F9F; border-radius: 8px; background: #fff; color: #000F9F; font-size: 14px; font-weight: 700; cursor: pointer; transition: background .15s, color .15s; }
.td-signoff-btn:hover { background: #eef0ff; }
.td-signoff-btn.armed { background: #00c875; border-color: #00b461; color: #fff; }
.td-signoff-btn:disabled { opacity: .6; cursor: default; }
.td-signoff-hint { margin-top: 8px; font-size: 12px; color: #94a3b8; line-height: 1.4; }
.td-signoff-done { padding: 10px 14px; border: 1px solid #00b461; border-radius: 8px; background: #ecfdf5; color: #047857; font-size: 14px; font-weight: 700; }
.td-signoff-warn { margin-top: 8px; font-size: 12px; color: #b45309; line-height: 1.4; }
.ticket-name { font-weight: 600; color: #000643; }

/* Uptime */
.uptime-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 16px 20px; margin-bottom: 12px; }
.uptime-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.uptime-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.uptime-dot-up { background: #22c55e; box-shadow: 0 0 6px #22c55e88; }
.uptime-dot-down { background: #ef4444; box-shadow: 0 0 6px #ef444488; }
.uptime-dot-paused { background: #94a3b8; }
.uptime-card-title { flex: 1; min-width: 0; }
.uptime-card-title strong { display: block; font-size: 14px; }
.uptime-domain { font-size: 12px; color: #475569; text-decoration: none; }
.uptime-domain:hover { color: #000F9F; text-decoration: underline; }
.uptime-status-label { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 12px; background: #dcfce7; color: #166534; }
.uptime-status-label-down { background: #fee2e2; color: #991b1b; }
.uptime-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.uptime-metric { text-align: center; padding: 8px 4px; background: #F2F3F9; border-radius: 6px; }
.uptime-metric-value { font-size: 16px; font-weight: 700; color: #000643; }
.uptime-metric-label { font-size: 13px; color: #475569; margin-top: 2px; }
.uptime-downtime { font-size: 13px; color: #475569; margin-top: 10px; text-align: center; }
/* "All sites operational" is words, not a numeral — its own display size + status colour
   (needs .summary-card .num specificity to beat the pink stat-number rule) */
.summary-card .num.uptime-status-up { font-size: 20px; font-family: 'Barlow Condensed', sans-serif; color: #15803d; }
.summary-card .num.uptime-status-down { font-size: 20px; font-family: 'Barlow Condensed', sans-serif; color: #ef4444; }

/* SEO Audit */
.audit-test-banner { width: 100%; background: #fef3c7; border: 1px solid #fcd34d; color: #92400e; font-size: 12px; font-weight: 600; padding: 8px 14px; border-radius: 8px; margin-bottom: 14px; }
.audit-meta { font-size: 12px; color: #475569; margin-bottom: 16px; }
.audit-score-prev { font-size: 12px; color: #475569; margin-top: 2px; }
.audit-score-diff { font-weight: 700; }
.audit-score-diff.up { color: #22c55e; }
.audit-score-diff.down { color: #ef4444; }
.audit-score-diff.same { color: #475569; }
.audit-categories { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.audit-category { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 16px; text-align: center; min-width: 80px; }
.audit-category-score { font-size: 20px; font-weight: 700; line-height: 1; }
.audit-category-label { font-size: 11px; color: #475569; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; margin-top: 4px; }
.audit-issue { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; }
.audit-issue-header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.audit-sev-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.audit-issue-title { font-size: 14px; flex: 1; min-width: 0; }
.audit-issue-badge { font-size: 11px; font-weight: 700; color: #fff; padding: 2px 8px; border-radius: 10px; text-transform: uppercase; letter-spacing: .3px; }
.audit-issue-cat { font-size: 13px; color: #475569; }
.audit-issue-count { font-size: 12px; font-weight: 700; color: #475569; background: #F2F3F9; border-radius: 10px; padding: 1px 9px; }
.audit-issue-desc { font-size: 13px; color: #475569; margin-top: 8px; }
.audit-issue-fix { font-size: 13px; color: #334155; margin-top: 6px; }
/* Plain-English issue guide from Wonderview */
.audit-guide { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; color: #334155; line-height: 1.5; }
.audit-guide p { margin: 0; }
.audit-guide-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 720px) { .audit-guide-cols { grid-template-columns: 1fr; } }
.audit-guide-label { display: block; font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 3px; }
.audit-guide-fix { background: #eef0ff; border: 1px solid #ccd0f5; border-radius: 6px; padding: 8px 12px; margin-top: 0; }
.audit-guide-fix ol { margin: 0; padding-left: 20px; }
.audit-guide-fix li + li { margin-top: 3px; }
.audit-guide-example { margin-top: 8px; }
.audit-guide-caption { font-size: 12px; color: #475569; margin-bottom: 4px !important; }
.audit-guide-example pre { margin: 0 0 6px; padding: 6px 8px; background: #fff; border: 1px solid #e2e8f0; border-radius: 4px; font-size: 12px; white-space: pre-wrap; word-break: break-word; }
.audit-guide-before { color: #b5701b; }
.audit-guide-after { color: #0788a0; }
.audit-guide-owner { font-size: 12px; color: #475569; }
.audit-issue-pages-section { margin-top: 10px; border-top: 1px solid #f1f5f9; padding-top: 10px; }
.audit-issue-pages-label { font-size: 12px; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 6px; cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; user-select: none; }
.audit-issue-pages-label::-webkit-details-marker { display: none; }
.audit-issue-pages-label::before { content: '▸'; font-size: 11px; transition: transform .15s; }
.audit-issue-pages-section[open] > .audit-issue-pages-label::before { transform: rotate(90deg); }
.audit-issue-pages { display: flex; flex-direction: column; gap: 5px; }
.audit-issue-page-row { display: flex; flex-direction: column; gap: 2px; }
.audit-issue-page { font-size: 13px; color: #000F9F; text-decoration: none; word-break: break-all; font-family: monospace; }
.audit-issue-page:hover { text-decoration: underline; }
.audit-issue-page-val { font-size: 13px; color: #475569; padding-left: 2px; }
.audit-role-badge { font-size: 11px; font-weight: 700; color: #fff; padding: 2px 8px; border-radius: 10px; text-transform: uppercase; letter-spacing: .3px; margin-left: auto; flex-shrink: 0; }
.audit-filter-bar { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.audit-filter-bar-sub { margin-bottom: 16px; }
.audit-filter-btn { font-size: 13px; font-weight: 600; padding: 4px 14px; border-radius: 20px; border: 1.5px solid #e2e8f0; background: #fff; color: #475569; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.audit-filter-btn:hover { border-color: #000F9F; color: #000F9F; }
.audit-filter-btn.active { background: #000F9F; color: #fff; border-color: #000F9F; }
.audit-role-btn { font-size: 13px; font-weight: 600; padding: 3px 12px; border-radius: 20px; border: 1.5px solid #e2e8f0; background: #fff; color: #475569; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.audit-role-btn:hover { border-color: #475569; color: #475569; }
.audit-role-btn.active { background: #475569; color: #fff; border-color: #475569; }

@media (max-width: 900px) {
  .dashboard-body { flex-direction: column; }
  .actions-panel { width: 100%; max-height: none; position: static; border-left: none; border-top: 1px solid #e2e8f0; }
}
@media (max-width: 700px) {
  .tab-panel { padding: 14px; }
  .cards-grid { grid-template-columns: 1fr; }
  .uptime-metrics { grid-template-columns: repeat(2, 1fr); }
  .header .updated { display: none; }
}

/* ── Auth divider ── */
.auth-divider { display: flex; align-items: center; gap: 16px; margin: 32px 0; color: #000643; opacity: .9; font-family: 'Barlow', sans-serif; font-size: 16px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: #000F9F; }

.client-switcher option { color: #000643; }

/* ── Admin overlay ── */
.admin-overlay {
  position: fixed; inset: 0; background: rgba(0,6,67,.55); display: flex;
  align-items: center; justify-content: center; z-index: 3000; padding: 24px;
}
.admin-modal {
  background: #fff; border-radius: 12px; width: 100%; max-width: 720px; max-height: 88vh;
  display: flex; flex-direction: column; box-shadow: 0 12px 48px rgba(0,0,0,.3); overflow: hidden;
}
.admin-modal-header {
  display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid #e2e8f0;
}
.admin-modal-header h2 { font-size: 16px; font-weight: 700; color: #000643; }
.admin-tabs { display: flex; gap: 4px; margin-left: 8px; }
.admin-tab {
  background: none; border: none; padding: 6px 12px; font-size: 13px; color: #475569;
  cursor: pointer; border-radius: 6px; font-family: inherit;
}
.admin-tab.active { background: rgba(0,15,159,.1); color: #000F9F; font-weight: 600; }
.admin-close { margin-left: auto; background: none; border: none; font-size: 24px; line-height: 1; color: #475569; cursor: pointer; }
.admin-close:hover { color: #475569; }
.admin-modal-body { padding: 20px; overflow-y: auto; }
.admin-loading { color: #475569; font-size: 14px; padding: 20px 0; }
.admin-toolbar { margin-bottom: 14px; }
/* White card table, like bugpin's project table */
.admin-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; background: #fff; border: 1px solid #CCCFEC; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,15,159,.06); }
.admin-table th { text-align: left; color: #000F9F; font-weight: 700; font-size: 12.5px; font-family: 'Barlow', sans-serif; text-transform: none; letter-spacing: 0; padding: 10px 12px; border-bottom: 1px solid #CCCFEC; }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:last-child td:first-child { border-bottom-left-radius: 8px; }
.admin-table tbody tr:last-child td:last-child { border-bottom-right-radius: 8px; }
.admin-table tbody tr:hover td { background: #F8F9FC; }
.admin-table code { background: #f1f5f9; padding: 1px 6px; border-radius: 4px; font-size: 12px; }
.admin-back { background: none; border: none; color: #000F9F; font-size: 14px; cursor: pointer; padding: 0; margin-bottom: 12px; font-family: inherit; }
.admin-back:focus-visible { outline: 3px solid #000F9F; outline-offset: 2px; border-radius: 2px; }
.admin-modal-body h3 { font-size: 15px; color: #000643; margin-bottom: 14px; }
.admin-field { margin-bottom: 12px; }
.admin-field label { display: block; font-family: 'Barlow', sans-serif; font-size: 14px; font-weight: 600; color: #000F9F; margin-bottom: 4px; }
.admin-field input, .admin-field select, .admin-field textarea {
  width: 100%; padding: 9px 12px; border: 1px solid #000F9F; border-radius: 4px;
  font-size: 14px; font-family: inherit; outline: none; box-sizing: border-box;
  background: #fff; color: #000643;
}
.admin-field input:focus, .admin-field select:focus, .admin-field textarea:focus { box-shadow: 0 0 0 3px rgba(0,15,159,.1); }
.admin-field select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%23000F9F' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px;
}
.admin-check input[type="checkbox"] {
  width: 18px; height: 18px; border: 1px solid #000F9F; border-radius: 2px;
  appearance: none; -webkit-appearance: none; background: #fff; cursor: pointer;
  flex-shrink: 0; position: relative; margin: 0;
}
.admin-check input[type="checkbox"]:checked {
  background: #000F9F;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 6l3 3 5-5' stroke='white' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}
.admin-check input[type="checkbox"]:focus { box-shadow: 0 0 0 3px rgba(0,15,159,.1); }
.admin-check label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.admin-check input { width: auto; }
.admin-fieldset { background: #fff; border: 1px solid #CCCFEC; border-radius: 8px; padding: 16px; margin: 16px 0; }
/* Floated legends render inside the box (not on the border) — used as a card heading */
.admin-fieldset legend { float: left; width: 100%; font-family: 'Barlow Condensed', sans-serif; font-size: 16px; font-weight: 700; color: #000F9F; padding: 0; margin-bottom: 12px; }
.admin-fieldset legend + * { clear: both; }
.admin-hint { font-size: 13px; color: #475569; margin-top: 8px; }
/* Intro/explainer paragraphs on the admin screens need breathing room before the next box */
p.admin-hint { margin: 2px 0 16px; }
.admin-autocomplete { position: relative; }
.admin-autocomplete-list {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 200;
  background: #fff; border: 1px solid #000F9F; border-top: none; border-radius: 0 0 4px 4px;
  max-height: 200px; overflow-y: auto; margin: 0; padding: 0; list-style: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}
.admin-autocomplete-list li {
  padding: 8px 12px; font-size: 13px; color: #000643; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
}
.admin-autocomplete-list li:hover, .admin-autocomplete-list li[aria-selected="true"] { background: #f0f3ff; }
.admin-autocomplete-list li .ac-count { font-size: 11px; color: #475569; }
.admin-row { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.admin-row input { flex: 1; }
.admin-row input, .admin-row select {
  padding: 9px 12px; border: 1px solid #000F9F; border-radius: 4px;
  font-size: 14px; font-family: inherit; outline: none; background: #fff; color: #000643;
}
.admin-row input:focus, .admin-row select:focus { box-shadow: 0 0 0 3px rgba(0,15,159,.1); }
.admin-row select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%23000F9F' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px;
}
.admin-sub { font-family: 'Barlow Condensed', sans-serif; font-size: 14px; font-weight: 700; color: #000F9F; margin-top: 14px; margin-bottom: 4px; }
.admin-role {
  padding: 7px 30px 7px 10px; border: 1px solid #000F9F; border-radius: 4px;
  font-size: 14px; font-family: inherit; outline: none; background: #fff; color: #000643;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%23000F9F' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
}
.admin-role:focus { box-shadow: 0 0 0 3px rgba(0,15,159,.1); }
.admin-member { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f1f5f9; font-size: 14px; }
/* Primary = DWL yellow with blue text, same as the rest of the app */
.admin-btn-primary { background: #FFAB4D; color: #000F9F; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; }
.admin-btn-primary:hover { background: #F59E2E; }
.admin-btn-primary:focus-visible { outline: 3px solid #000F9F; outline-offset: 2px; }
.admin-btn { background: #f1f5f9; color: #334155; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; }
.admin-btn:hover { background: #e2e8f0; }
.admin-btn:focus-visible { outline: 3px solid #000F9F; outline-offset: 2px; }
.admin-btn-danger { background: #fff; color: #dc2626; border: 1px solid #fecaca; border-radius: 6px; padding: 8px 16px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; }
.admin-btn-danger:hover { background: #fef2f2; }
.admin-btn-danger:focus-visible { outline: 3px solid #dc2626; outline-offset: 2px; }
.admin-link { background: none; border: none; color: #000F9F; font-size: 14px; cursor: pointer; padding: 0; font-family: inherit; }
.admin-link:hover { text-decoration: underline; }
.admin-link:focus-visible { outline: 3px solid #000F9F; outline-offset: 2px; border-radius: 2px; }
.admin-link-danger { color: #dc2626; }
.admin-msg { font-size: 14px; color: #16a34a; padding: 8px 0; }
.admin-msg.error { color: #dc2626; }

/* Admin — dedicated full screens (replaces the old modal). */
.admin-view { min-height: 100vh; background: #F2F3F9; }
.admin-main { max-width: 960px; margin: 0 auto; padding: 24px 20px 60px; }
.admin-main h3 { font-family: 'Barlow Condensed', sans-serif; font-size: 20px; color: #000F9F; margin-bottom: 14px; }
.admin-checklist { max-height: 320px; overflow-y: auto; background: #fff; border: 1px solid #CCCFEC; border-radius: 8px; padding: 6px; }
.admin-check-row { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 6px; font-size: 14px; cursor: pointer; }
.admin-check-row:hover { background: #f1f5f9; }
.admin-check-row input { width: auto; margin: 0; }
.admin-check-row span { font-weight: 600; color: #334155; }
.admin-check-row small { color: #475569; margin-left: auto; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-status { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.admin-status-invited { background: #fef3c7; color: #92400e; }
.admin-status-active { background: #dcfce7; color: #166534; }
.admin-status-admin { background: #e0e7ff; color: #000F9F; }
.admin-hint.admin-ok { color: #16a34a; }
.admin-hint.error { color: #dc2626; }
.admin-row select { flex: 1; }
.admin-sub { font-size: 13px; font-weight: 700; color: #475569; margin: 14px 0 2px; }
.admin-chip { display: inline-block; background: #f1f5f9; color: #334155; border-radius: 4px; padding: 1px 8px; font-size: 13px; margin: 1px 2px 1px 0; }

/* Toast — always-visible action feedback (success/error), anchored to the
   viewport so it can't be lost above the fold when saving from a long form. */
.admin-toast {
  position: fixed; bottom: 24px; left: 50%; z-index: 4000;
  transform: translateX(-50%) translateY(20px);
  background: #166534; color: #fff; font-size: 13px; font-weight: 600;
  padding: 10px 18px; border-radius: 8px; box-shadow: 0 8px 28px rgba(0,0,0,.25);
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.admin-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.admin-toast.error { background: #b91c1c; }

/* ==========================================================================
   Project Dashboard redesign (Figma node 9343-5117)
   Brand palette: DWL blue #000F9F, pink #EF2AC1, teal #00C9A7,
   yellow #FFAB4D, red #FF2A6D, lavender divider #CCCFEC, deep blue #000643
   ========================================================================== */

/* --- Header + tabs: styling lives in the shared .header / .tab-nav rules --- */

/* --- Pale blue canvas; the inset comes from .tab-panel alone --- */
#dashboard-app { background: #F2F3F9; }
.dashboard-body { background: #F2F3F9; }
.dashboard-main { padding: 0; }

/* --- Summary strip: pink numbers, blue labels, dividers --- */
.summary-strip { display: flex; gap: 0; row-gap: 14px; flex-wrap: wrap; margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid #CCCFEC; }
.summary-card { background: none; box-shadow: none; border-radius: 0; padding: 0 18px; min-width: 0; text-align: left; border-left: 1px solid #CCCFEC; }
.summary-card:first-child { padding-left: 0; border-left: none; }
.summary-card .num { font-family: 'Barlow Condensed', sans-serif; font-size: 28px; font-weight: 700; line-height: 1; margin-bottom: 2px; color: #EF2AC1; }
.summary-card .lbl { font-family: 'Barlow', sans-serif; font-size: 13px; font-weight: 400; color: #000F9F; text-transform: none; letter-spacing: 0; }

/* --- Section titles --- */
.section-title { font-family: 'Barlow Condensed', sans-serif; font-size: 20px; font-weight: 700; color: #000F9F; text-transform: none; letter-spacing: 0; margin-top: 8px; margin-bottom: 12px; gap: 8px; }
.section-count { background: #F2F3F9; color: #000F9F; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 8px; }

/* --- Project cards: white with a coloured status edge --- */
.cards-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 28px; }
.project-card { background: #fff; border: 1px solid #CCCFEC; border-left: 4px solid #00C9A7; border-radius: 8px; padding: 16px 18px; box-shadow: none; color: #000643; }
.project-card.active-delivery { border-left-color: #00C9A7; }
.project-card.pre-planning { border-left-color: #FFAB4D; }
.project-card.over-budget { border-left-color: #FF2A6D; }
.project-name { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 16px; line-height: 1.3; margin-bottom: 0; color: #000F9F; }
.project-name a { color: #000F9F; }
.project-inline-meta { font-family: 'Barlow', sans-serif; font-size: 13px; line-height: 1.5; color: #4D5690; margin-bottom: 12px; }
.project-card .project-meta { gap: 6px; margin-bottom: 12px; }
.project-card .badge { border-radius: 2px; padding: 3px 8px; font-family: 'Barlow Condensed', sans-serif; font-size: 12px; font-weight: 600; line-height: 17px; }
.project-card .badge::before { display: none; }
.project-card .badge-red { background: #FF2A6D; color: #fff; }
.project-card .badge-green,
.project-card .badge-amber,
.project-card .badge-blue,
.project-card .badge-purple,
.project-card .badge-grey,
.project-card .badge-teal,
.project-card .badge-orange { background: #CCCFEC; color: #000F9F; }
.project-card .days-banner { display: block; background: none; padding: 0; margin-bottom: 2px; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 15px; color: #00806B; }
.project-card .days-banner .dn { font-size: 15px; }
.project-card .days-banner.db-red { color: #D91E5B; }
.project-card .days-banner.db-amber { color: #B5701B; }
.project-card .days-banner.db-grey { color: #64748b; }
.project-card .days-banner-est { display: block; background: none; padding: 0; margin: 0 0 12px; color: #4D5690; font-size: 12.5px; }
.project-card .days-banner-est .dn { color: #000643; }
.project-card .hours-track { margin-bottom: 12px; }
.project-card .hours-track-labels { color: #4D5690; font-family: 'Barlow', sans-serif; font-size: 12.5px; margin-bottom: 5px; }
.project-card .hours-track-bar { background: #EFF0F6; height: 8px; border-radius: 100px; }
.project-card .hours-track-fill { background: #EF2AC1; border-radius: 100px; }
.project-card .hours-grid { border-top: none; padding-top: 0; margin-top: 0; margin-bottom: 4px; gap: 0; }
.project-card .hours-cell { border: none; border-left: 1px solid #E6E8F0; border-radius: 0; text-align: left; padding: 0 12px; }
.project-card .hours-cell:first-child { border-left: none; padding-left: 0; }
.project-card .hours-val { color: #000F9F; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 16px; line-height: 22px; }
.project-card .hours-lbl { color: #4D5690; font-family: 'Barlow', sans-serif; font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0; }
.project-card .project-monday-link { display: inline-block; margin-top: 12px; color: #000F9F; font-family: 'Barlow', sans-serif; font-size: 13.5px; text-decoration: underline; }
.project-card .project-monday-link:hover { color: #000643; }

/* --- Actions sidebar --- */
.actions-panel { width: 340px; border-left: 1px solid #CCCFEC; }
.actions-panel-header { padding: 18px 16px 6px; border-bottom: none; }
.actions-panel-header h3 { font-family: 'Barlow Condensed', sans-serif; font-size: 18px; font-weight: 700; color: #000F9F; gap: 8px; }
.actions-count-badge { background: #EF2AC1; }
.action-item { padding: 14px 16px; border-bottom: 1px solid #CCCFEC; }
.action-item:last-child { border-bottom: none; }
.action-item-title { font-family: 'Barlow Condensed', sans-serif; font-size: 15px; font-weight: 700; line-height: 1.35; color: #000F9F; }
.action-item-desc { font-family: 'Barlow', sans-serif; font-size: 13px; line-height: 1.5; color: #000643; margin: 4px 0 10px; }
.action-item-meta { gap: 6px; margin-bottom: 10px; }
.action-tag { font-family: 'Barlow Condensed', sans-serif; font-size: 12px; font-weight: 600; line-height: 18px; padding: 2px 7px; border-radius: 2px; }
.action-tag-epic,
.action-tag-status { background: #CCCFEC; color: #000F9F; }
.action-due { font-family: 'Barlow', sans-serif; font-size: 13px; font-weight: 500; color: #000F9F; }
.action-due-label { text-transform: none; letter-spacing: 0; font-weight: 500; margin-right: 4px; }
.action-done-btn { background: transparent; border: 2px solid #FFAB4D; color: #000643; border-radius: 4px; padding: 5px 12px; font-family: 'Barlow', sans-serif; font-weight: 700; font-size: 13px; line-height: 18px; }
.action-done-btn:hover { background: #FFAB4D; color: #000643; border-color: #FFAB4D; }

/* --- Epics / sprints tables: brand fonts, colours, spacing --- */
.epics-wrap,
.sprint-block { border: 1px solid #CCCFEC; box-shadow: none; border-radius: 8px; }
.epics-project-header { background: #fff; border-bottom: 1px solid #CCCFEC; padding: 12px 14px; }
.epics-project-header a { font-family: 'Barlow Condensed', sans-serif; font-size: 16px; color: #000F9F; }
.epics-project-summary { font-family: 'Barlow', sans-serif; font-size: 13px; color: #000643; }
.sprint-header { padding: 12px 14px; }
.sprint-name { font-family: 'Barlow Condensed', sans-serif; font-size: 16px; color: #000F9F; }
.sprint-dates,
.sprint-count { font-family: 'Barlow', sans-serif; font-size: 13px; color: #000643; }
.sprint-chevron { color: #000F9F; }
.epics-table th,
.sprint-stories-table th { background: #fff; color: #000F9F; font-family: 'Barlow', sans-serif; font-size: 12.5px; font-weight: 700; text-transform: none; letter-spacing: 0; padding: 9px 14px; border-bottom: 1px solid #CCCFEC; }
.epics-table td,
.sprint-stories-table td { font-family: 'Barlow', sans-serif; font-size: 14px; color: #000643; padding: 9px 14px; border-bottom: 1px solid #F2F3F9; }
.epics-table tr:hover td,
.sprint-stories-table tr:hover td { background: #F2F3F9; }

/* --- Support tab: "Log a new support ticket" bar (links out to support.digitalwonderlab.com) --- */
.new-ticket-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: #F2F3F9; border: 1px solid #CCCFEC; border-radius: 8px; padding: 16px 18px; margin-bottom: 20px; }
.new-ticket-title { font-family: 'Barlow Condensed', sans-serif; font-size: 20px; font-weight: 700; color: #000F9F; line-height: 1.1; }
.new-ticket-sub { font-family: 'Barlow', sans-serif; font-size: 14px; color: #000F9F; margin-top: 2px; }
.new-ticket-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 8px; background: #EF2AC1; color: #fff; font-family: 'Barlow Condensed', sans-serif; font-size: 18px; font-weight: 700; text-decoration: none; white-space: nowrap; box-shadow: 0 2px 6px rgba(239,42,193,.3); transition: background .15s, transform .15s; }
.new-ticket-btn:hover { background: #C4208E; transform: translateY(-1px); }
.new-ticket-btn:focus-visible { outline: 3px solid #000F9F; outline-offset: 2px; }
@media (max-width: 600px) { .new-ticket-btn { width: 100%; justify-content: center; } }

/* --- Support tab: contract card + ticket stats + table --- */
.sc-card { border: 1px solid #CCCFEC; border-left: 4px solid #000F9F; box-shadow: none; border-radius: 8px; }
.sc-title { font-family: 'Barlow Condensed', sans-serif; font-size: 16px; font-weight: 700; color: #000F9F; text-transform: none; letter-spacing: 0; }
.sc-num { font-family: 'Barlow Condensed', sans-serif; font-size: 22px; color: #EF2AC1; }
.sc-num.sc-remaining { color: #EF2AC1; }
.sc-lbl { font-family: 'Barlow', sans-serif; font-size: 14px; color: #000F9F; font-weight: 400; text-transform: none; letter-spacing: 0; }
.sc-bar { background: #F2F3F9; }
.sc-bar-fill { background: #EF2AC1; }

.tickets-stats { display: flex; gap: 0; row-gap: 14px; flex-wrap: wrap; margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid #CCCFEC; }
.ticket-stat { background: none; box-shadow: none; border-radius: 0; padding: 0 18px; min-width: 0; text-align: left; border-left: 1px solid #CCCFEC; }
.ticket-stat:first-child { padding-left: 0; border-left: none; }
.ticket-stat .num { font-family: 'Barlow Condensed', sans-serif; font-size: 28px; font-weight: 700; line-height: 1; color: #EF2AC1; margin-bottom: 2px; }
.ticket-stat .lbl { font-family: 'Barlow', sans-serif; font-size: 13px; color: #000F9F; font-weight: 400; text-transform: none; letter-spacing: 0; }

.tickets-table-wrap { border: 1px solid #CCCFEC; box-shadow: none; border-radius: 8px; }
.tickets-table th { background: #fff; color: #000F9F; font-family: 'Barlow', sans-serif; font-size: 12.5px; font-weight: 700; text-transform: none; letter-spacing: 0; padding: 9px 14px; border-bottom: 1px solid #CCCFEC; }
.tickets-table td { font-family: 'Barlow', sans-serif; font-size: 14px; color: #000643; padding: 9px 14px; border-bottom: 1px solid #F2F3F9; }
.tickets-table tr:hover td { background: #F2F3F9; }

/* --- Uptime tab --- */
.uptime-card { border: 1px solid #CCCFEC; border-radius: 8px; }
.uptime-card-title strong { font-family: 'Barlow Condensed', sans-serif; font-size: 16px; color: #000F9F; }
.uptime-domain { font-family: 'Barlow', sans-serif; font-size: 13px; color: #000643; }
.uptime-metric { background: #F2F3F9; border-radius: 6px; }
.uptime-metric-value { font-family: 'Barlow Condensed', sans-serif; font-size: 16px; color: #000643; }
.uptime-metric-label { font-family: 'Barlow', sans-serif; color: #000643; }

/* --- SEO Audit tab --- */
.audit-categories { gap: 12px; }
.audit-category { border: 1px solid #CCCFEC; border-radius: 8px; }
.audit-category-score { font-family: 'Barlow Condensed', sans-serif; }
.audit-category-label { font-family: 'Barlow', sans-serif; color: #000F9F; text-transform: none; letter-spacing: 0; }
.audit-issue { border: 1px solid #CCCFEC; box-shadow: none; border-radius: 8px; }
.audit-issue-title { font-family: 'Barlow Condensed', sans-serif; font-size: 16px; color: #000643; }
.audit-issue-cat,
.audit-issue-desc,
.audit-issue-fix { font-family: 'Barlow', sans-serif; color: #000643; }
.audit-issue-count { background: #CCCFEC; color: #000F9F; font-family: 'Barlow', sans-serif; }
.audit-meta { font-family: 'Barlow', sans-serif; font-size: 14px; color: #000643; }

/* Print / PDF button */
.audits-toolbar { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.audit-download-btn {
  background: #000F9F; color: #fff; border: none; border-radius: 4px;
  padding: 8px 16px; font-family: 'Barlow', sans-serif; font-weight: 700;
  font-size: 14px; cursor: pointer;
}
.audit-download-btn:hover { background: #000643; }

/* --- GEO (AI visibility) tab --- */
.geo-stale { font-size: 14px; color: #92400e; background: #fef3c7; border-radius: 6px; padding: 8px 12px; margin: 8px 0; }
.geo-engines td { vertical-align: middle; }
.geo-engine-off td { color: #6b7194; }
.geo-bar { display: flex; align-items: center; gap: 8px; min-width: 140px; }
.geo-bar-track { flex: 1; height: 8px; background: #E3E5F1; border-radius: 4px; overflow: hidden; }
.geo-bar-fill { display: block; height: 100%; border-radius: 4px; }
.geo-bar-val { font-variant-numeric: tabular-nums; min-width: 26px; text-align: right; color: #000643; }
.geo-chart { background: #fff; border-radius: 8px; padding: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.07); max-width: 720px; }
.geo-chart svg { display: block; width: 100%; height: auto; }
.geo-axis { font-family: 'Barlow', sans-serif; font-size: 11px; fill: #6b7194; }
.geo-val { font-family: 'Barlow', sans-serif; font-size: 12px; font-weight: 700; fill: #000643; }
.geo-col:hover path { opacity: .8; }

/* --- Print: SEO Audit → PDF ---------------------------------------------
   The user prints from the SEO Audit tab; only that panel is on-screen
   (others are display:none), so we hide the app chrome and let the audit
   flow onto A4. Colours are forced so severity dots/badges survive. */
@media print {
  @page { size: A4; margin: 14mm; }

  body { background: #fff !important; }

  /* App chrome + interactive controls we don't want in the PDF */
  .header, .tab-nav, .actions-panel, #loading-overlay, #error-banner,
  .ticket-detail-panel, .ticket-detail-backdrop,
  .audits-toolbar, .audit-filter-bar, .audit-filter-bar-sub { display: none !important; }

  .dashboard-body { display: block !important; }
  .tab-panel { padding: 0 !important; }

  /* Keep issue cards and category tiles from splitting across pages */
  .audit-issue, .audit-category, .summary-card { break-inside: avoid; }
  .audit-issue-pages-section summary { list-style: none; }

  /* Preserve brand + severity colours in the printout */
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
}

/* ---- "View as" mode bar (admin emulating a client login) ----
   Fixed to the top for the whole emulated session: not dismissible, not behind a
   menu, so the mode can't be left on without noticing. It is on screen during client
   screen shares, so it reads as a plain mode indicator rather than a warning. */
.view-as-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 7px 16px; background: #000643; color: #fff; font-size: 13px; font-weight: 500; line-height: 1.3; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.view-as-bar-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.view-as-bar-exit { flex-shrink: 0; background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.4); border-radius: 4px; padding: 3px 12px; font-family: 'Barlow', sans-serif; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.view-as-bar-exit:hover { background: rgba(255,255,255,.26); }
.view-as-bar-exit:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
/* Push the whole app down so the bar never covers the header. */
body.is-viewing-as { padding-top: 34px; }

/* ---- Fixed-price projects (burn-down hidden) ---- */

/* ---- Admin: project access matrix ----
   Logins down the side, projects across the top. Scrolls horizontally rather than
   squashing project names, since a client can have a lot of projects. */
.pa-scroll { overflow-x: auto; margin: 6px 0 10px; }
.pa-table { border-collapse: collapse; font-size: 13px; min-width: 100%; }
.pa-table th, .pa-table td { border: 1px solid #CCCFEC; padding: 7px 10px; text-align: left; vertical-align: middle; }
.pa-table thead th { background: #F2F3F9; font-family: 'Barlow', sans-serif; font-weight: 600; font-size: 12px; }
.pa-table th.pa-proj { min-width: 110px; max-width: 190px; white-space: normal; }
.pa-table th.pa-email { white-space: nowrap; font-weight: 600; background: #fff; }
.pa-table th.pa-email small { display: block; font-weight: 500; color: #475569; font-size: 11px; }
.pa-table td.pa-cell { text-align: center; }
.pa-table td.pa-cell input { width: 16px; height: 16px; cursor: pointer; }
.pa-table tfoot th, .pa-table tfoot td { background: #F2F3F9; }
.pa-all { color: #475569; }
