/* ============================================================
   Axia IT Connect — Design System
   Dark theme CSS custom properties and base utility classes.
   Fonts (Playfair Display + Manrope) are loaded in the
   Header web template. This file only defines the design
   tokens and structural styles.
   ============================================================ */

/* ── Color tokens ────────────────────────────────────────── */
:root {
  --dark:       #0e0f0d;
  --dark2:      #161714;
  --dark3:      #1e1f1c;
  --dark4:      #2a2b28;
  --border-d:   rgba(255, 255, 255, 0.09);
  --border-d2:  rgba(255, 255, 255, 0.16);
  --text-d:     #f0ede5;
  --text-d2:    #b8b6ae;
  --text-d3:    #7a7870;
  --accent-g:   #7dd4f0;
  --accent-gl:  rgba(125, 212, 240, 0.10);
  --accent-gl2: rgba(125, 212, 240, 0.20);
  --green:      #2d9e6b;
  --green-l:    rgba(45, 158, 107, 0.12);
  --amber:      #e09a2b;
  --amber-l:    rgba(224, 154, 43, 0.12);
  --red:        #e05252;
  --red-l:      rgba(224, 82, 82, 0.12);
  --violet:     #a78bfa;
  --violet-l:   rgba(167, 139, 250, 0.14);
}

/* ── Base reset for dark theme ───────────────────────────── */
body {
  background-color: var(--dark);
  color: var(--text-d);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent-g);
  text-decoration: none;
}
a:hover {
  color: var(--accent-g);
  opacity: 0.85;
}

/* ── Typography scale ────────────────────────────────────── */
.axia-page-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text-d);
}

.axia-stat-number {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 36px;
  font-weight: 400;
  color: var(--text-d);
  line-height: 1.1;
}

.axia-label {
  font-family: 'Manrope', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.axia-nav-item {
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── Topbar ──────────────────────────────────────────────── */
.axia-topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 52px;
  background: rgba(14, 15, 13, 0.98);
  border-bottom: 1px solid var(--border-d);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 24px;
}

/* Left section: logo + bell */
.axia-topbar-left {
  display: flex;
  align-items: center;
  gap: 4px;
}

.axia-topbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.axia-topbar-logo-mark {
  width: 26px;
  height: 26px;
  background: var(--accent-g);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--dark);
  flex-shrink: 0;
}

.axia-topbar-logo-img {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  flex-shrink: 0;
  object-fit: contain;
}

.axia-topbar-wordmark {
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-d);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.axia-topbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  padding: 0;
  margin: 0;
  justify-content: center;
}

.axia-topbar-nav a {
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-d3);
  text-decoration: none;
  padding: 0 14px;
  height: 52px;
  display: flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.axia-topbar-nav a:hover {
  color: var(--text-d2);
  opacity: 1;
}

.axia-topbar-nav a.active {
  color: var(--accent-g);
  border-bottom-color: var(--accent-g);
}

.axia-topbar-nav .nav-disabled {
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-d3);
  padding: 0 14px;
  height: 52px;
  display: flex;
  align-items: center;
  cursor: default;
  opacity: 0.4;
  position: relative;
}

.axia-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
}

/* Bell icon */
.axia-bell {
  position: relative;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-d3);
  transition: color 0.15s;
}
.axia-bell:hover { color: var(--text-d); }

.axia-bell-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  background: var(--red);
  border-radius: 50%;
  border: 1.5px solid var(--dark);
}

/* Company name pill */
.axia-company-name {
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-d2);
  letter-spacing: 0.02em;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Avatar */
.axia-avatar {
  width: 30px;
  height: 30px;
  background: var(--dark4);
  border: 1px solid var(--border-d2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-d2);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.axia-avatar:hover {
  background: var(--dark4);
  border-color: var(--accent-g);
  color: var(--accent-g);
}

/* Avatar dropdown */
.axia-avatar-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: var(--dark3);
  border: 1px solid var(--border-d2);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  display: none;
  z-index: 2000;
  overflow: hidden;
}
.axia-avatar-dropdown.open { display: block; }

.axia-dropdown-header {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border-d);
}

.axia-dropdown-name {
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-d);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.axia-dropdown-email {
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-d3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.axia-dropdown-item {
  display: block;
  padding: 10px 16px;
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-d2);
  text-decoration: none;
  transition: background 0.1s, color 0.1s;
}
.axia-dropdown-item:hover {
  background: var(--dark4);
  color: var(--text-d);
  opacity: 1;
}

.axia-dropdown-divider {
  height: 1px;
  background: var(--border-d);
  margin: 4px 0;
}

/* ── Subnav bar ──────────────────────────────────────────── */
.axia-subnav {
  height: 38px;
  background: var(--dark2);
  border-bottom: 1px solid var(--border-d);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 4px;
}

.axia-subnav-tab {
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-d3);
  text-decoration: none;
  padding: 0 12px;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.axia-subnav-tab:hover { color: var(--text-d2); }
.axia-subnav-tab.active {
  color: var(--accent-g);
  border-bottom-color: var(--accent-g);
}

.axia-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 16px;
  padding: 0 5px;
  background: var(--dark4);
  border-radius: 8px;
  font-family: 'Manrope', sans-serif;
  font-size: 9px;
  font-weight: 600;
  color: var(--text-d3);
}
.axia-subnav-tab.active .axia-badge {
  background: var(--accent-gl2);
  color: var(--accent-g);
}

/* ── Page content wrapper ────────────────────────────────── */
.axia-page {
  padding: 32px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ── Stat cards ──────────────────────────────────────────── */
.axia-stat-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .axia-stat-cards { grid-template-columns: 1fr; }
}

.axia-stat-card {
  background: var(--dark3);
  border: 1px solid var(--border-d);
  border-radius: 10px;
  padding: 20px 24px 18px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-decoration: none;
  display: block;
}
.axia-stat-card:hover {
  border-color: var(--border-d2);
  background: var(--dark4);
  opacity: 1;
}

.axia-stat-card-label {
  font-family: 'Manrope', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-d3);
  margin-bottom: 10px;
}

.axia-stat-card--amber { border-top: 2px solid var(--amber); }
.axia-stat-card--red   { border-top: 2px solid var(--red); }
.axia-stat-card--green { border-top: 2px solid var(--green); }

/* Numbers stay white (base color); colored top borders + small accents identify the card category */

.axia-stat-card-sub {
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-d3);
  margin-top: 4px;
}

/* ── News cards ──────────────────────────────────────────── */
.axia-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.axia-section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 16px;
  font-weight: 400;
  color: var(--text-d);
  letter-spacing: -0.01em;
}

.axia-section-link {
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: var(--accent-g);
  text-decoration: none;
  letter-spacing: 0.05em;
}
.axia-section-link:hover { opacity: 0.8; }

.axia-news-list { display: flex; flex-direction: column; gap: 8px; }

.axia-news-item {
  background: var(--dark3);
  border: 1px solid var(--border-d);
  border-radius: 8px;
  padding: 14px 16px 14px 20px;
  display: block;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
  overflow: hidden;
}
.axia-news-item:hover {
  border-color: var(--border-d2);
  background: var(--dark4);
  opacity: 1;
}

.axia-news-item--security    { border-left: 3px solid var(--red); }
.axia-news-item--important   { border-left: 3px solid var(--amber); }
.axia-news-item--info        { border-left: 3px solid var(--violet); }
.axia-news-item--maintenance { border-left: 3px solid var(--green); }
.axia-news-item--outage      { border-left: 3px solid var(--amber); }

.axia-news-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.axia-priority-tag {
  font-family: 'Manrope', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
}
.axia-priority-tag--security {
  background: var(--red-l);
  color: var(--red);
}
.axia-priority-tag--important {
  background: var(--amber-l);
  color: var(--amber);
}
.axia-priority-tag--info {
  background: var(--violet-l);
  color: var(--violet);
}
.axia-priority-tag--maintenance {
  background: var(--green-l);
  color: var(--green);
}
.axia-priority-tag--outage {
  background: var(--amber-l);
  color: var(--amber);
}

.axia-news-date {
  font-family: 'Manrope', sans-serif;
  font-size: 10px;
  font-weight: 400;
  color: var(--text-d3);
}

.axia-news-title {
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-d);
  margin-bottom: 4px;
  line-height: 1.4;
}

.axia-news-snippet {
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-d3);
  line-height: 1.5;
}

/* ── Case table ──────────────────────────────────────────── */
.axia-table {
  width: 100%;
  border-collapse: collapse;
}

.axia-table th {
  font-family: 'Manrope', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffffff;
  text-align: left;
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--border-d);
}

.axia-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--border-d);
  vertical-align: middle;
}

.axia-table tr:last-child td { border-bottom: none; }

.axia-table tbody tr {
  cursor: pointer;
  transition: background 0.1s;
}
.axia-table tbody tr:hover { background: var(--dark4); }

/* Priority dot */
.axia-priority-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.axia-priority-dot--high {
  background: var(--red);
  box-shadow: 0 0 6px var(--red);
}
.axia-priority-dot--medium { background: var(--amber); }
.axia-priority-dot--low    { background: var(--green); }

/* Status badges */
.axia-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: 'Manrope', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.axia-status-badge--active      { background: var(--accent-gl);            color: var(--accent-g); }
.axia-status-badge--inprogress  { background: var(--amber-l);              color: var(--amber); }
.axia-status-badge--waiting     { background: var(--red-l);                color: var(--red); }
.axia-status-badge--onhold      { background: var(--accent-gl);            color: var(--accent-g); }
.axia-status-badge--infosearch  { background: rgba(150,165,190,0.12);      color: #9fb3cc; }
.axia-status-badge--resolved    { background: var(--green-l);              color: var(--green); }

/* ── Filter pills ────────────────────────────────────────── */
.axia-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.axia-filter-pill {
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-d3);
  background: var(--dark3);
  border: 1px solid var(--border-d);
  border-radius: 20px;
  padding: 4px 14px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.axia-filter-pill:hover {
  border-color: var(--border-d2);
  color: var(--text-d2);
}
.axia-filter-pill.active {
  background: var(--accent-gl);
  border-color: var(--accent-g);
  color: var(--accent-g);
}

/* ── Buttons ─────────────────────────────────────────────── */
.axia-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: none;
  border-radius: 6px;
  padding: 9px 18px;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.axia-btn-primary {
  background: var(--accent-g);
  color: var(--dark);
}
.axia-btn-primary:hover {
  background: #91dcf4;
  color: var(--dark);
  opacity: 1;
}

.axia-btn-ghost {
  background: transparent;
  color: var(--text-d2);
  border: 1px solid var(--border-d2);
}
.axia-btn-ghost:hover {
  background: var(--dark4);
  color: var(--text-d);
  border-color: var(--border-d2);
  opacity: 1;
}

/* ── Settings toggles ────────────────────────────────────── */
.axia-setting-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-d);
  gap: 24px;
}
.axia-setting-row:last-child { border-bottom: none; }

.axia-setting-label {
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-d);
  margin-bottom: 3px;
}

.axia-setting-desc {
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-d3);
  line-height: 1.5;
}

/* Toggle switch */
.axia-toggle {
  position: relative;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}
.axia-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.axia-toggle-track {
  position: absolute;
  inset: 0;
  background: var(--dark4);
  border: 1px solid var(--border-d2);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.axia-toggle input:checked ~ .axia-toggle-track {
  background: var(--green);
  border-color: var(--green);
}
.axia-toggle-track::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: var(--text-d3);
  border-radius: 50%;
  transition: left 0.2s, background 0.2s;
}
.axia-toggle input:checked ~ .axia-toggle-track::after {
  left: 19px;
  background: white;
}
.axia-toggle--locked .axia-toggle-track {
  background: var(--red-l);
  border-color: var(--red);
  cursor: not-allowed;
}
.axia-toggle--locked .axia-toggle-track::after {
  left: 19px;
  background: var(--red);
}

/* ── Empty states ────────────────────────────────────────── */
.axia-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-d3);
}
.axia-empty-icon {
  font-size: 32px;
  margin-bottom: 12px;
  opacity: 0.4;
}
.axia-empty-text {
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-d3);
}

/* ── Greeting ────────────────────────────────────────────── */
.axia-greeting {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 26px;
  font-style: italic;
  margin-bottom: 28px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
#axia-greet-word {
  font-weight: 700;
  color: var(--text-d);
}
.axia-greeting em {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent-g);
}

/* ── Card section wrapper ────────────────────────────────── */
.axia-card {
  background: var(--dark3);
  border: 1px solid var(--border-d);
  border-radius: 10px;
  padding: 24px;
}

/* ── Utility ─────────────────────────────────────────────── */
.axia-text-muted  { color: var(--text-d3); }
.axia-text-sub    { color: var(--text-d2); }
.axia-text-accent { color: var(--accent-g); }
.axia-text-red    { color: var(--red); }
.axia-text-amber  { color: var(--amber); }
.axia-text-green  { color: var(--green); }

/* Override Bootstrap/portal default backgrounds on body+wrapper */
.wrapper-body,
.pageHeight,
.container[role="main"] {
  background: transparent !important;
}

/* Hide default portal header/footer — we replace them entirely */
.navbar,
footer[role="contentinfo"] {
  display: none !important;
}

/* ─── Axia IT Connect — silent auto-submit overlay (no flash between /redeem and Entra SSO) ─── */
html[data-axia-auto] body { visibility: hidden !important; }
html[data-axia-auto]::before {
  content: 'Loggar in…';
  position: fixed;
  inset: 0;
  background: #0d0d0d;
  color: rgba(255,255,255,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  letter-spacing: 0.3px;
  z-index: 2147483647;
  visibility: visible;
}

/* ─── Axia IT Connect — Invitation Redemption: full custom welcome UI ─── */
body[data-axia-redemption] .nav-tabs.nav-account,
body[data-axia-redemption] form,
body[data-axia-redemption] h2.login-heading-section,
body[data-axia-redemption] .page-copy,
body[data-axia-redemption] .validation-summary-valid,
body[data-axia-redemption] .portal-form {
  display: none !important;
}

body[data-axia-redemption] #content-container.wrapper-body {
  max-width: 520px;
  margin: 80px auto 40px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  font-family: 'Manrope', sans-serif;
}

body[data-axia-redemption] .axia-welcome {
  text-align: center;
  padding: 56px 40px;
  background: linear-gradient(145deg, rgba(26,27,24,0.98), rgba(18,19,17,0.98));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.55);
  color: #fff;
}

body[data-axia-redemption] .axia-welcome-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 30px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin: 0 0 16px;
  letter-spacing: -0.2px;
}

body[data-axia-redemption] .axia-welcome-sub {
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  color: rgba(255,255,255,0.72);
  line-height: 1.6;
  margin: 0 0 36px;
}

body[data-axia-redemption] .axia-welcome-btn {
  display: block;
  width: 100%;
  padding: 15px 24px;
  background: #3b9eff;
  border: none;
  color: #fff;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 15px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
  letter-spacing: 0.2px;
}
body[data-axia-redemption] .axia-welcome-btn:hover { background: #5aa8ff; }
body[data-axia-redemption] .axia-welcome-btn:active { transform: translateY(1px); }
body[data-axia-redemption] .axia-welcome-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}
