/* Άγγελος Καϊάφας: Η εγκεκριμένη πύλη εργασίας εφαρμόζεται μόνο μετά την πιστοποίηση. */
@font-face {
  font-family: "Portal Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/noto-sans-greek-variable.woff2") format("woff2");
  unicode-range: U+0370-03FF;
}

@font-face {
  font-family: "Portal Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/noto-sans-latin-variable.woff2") format("woff2");
  unicode-range: U+0000-036F, U+1E00-1EFF, U+2000-206F, U+20A0-20CF;
}

.workspace-nav,
.workspace-profile {
  width: 100%;
}

/* Άγγελος Καϊάφας: Οι μη επιλεγμένες ενότητες παραμένουν κρυφές ακόμη με display:grid. */
#provider-catalog[hidden],
#personal-dashboard[hidden] {
  display: none;
}

body.is-authenticated {
  --workspace-sidebar: 272px;
  --workspace-ink: #132b46;
  --workspace-muted: #526c85;
  font-family: "Portal Sans", "Segoe UI", sans-serif;
  background: var(--portal-shell-color, #153451);
  color: var(--workspace-ink);
}

.is-authenticated .shell {
  min-height: 100dvh;
}

.is-authenticated .side {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--workspace-sidebar);
  padding: 30px 22px 22px;
  overflow-y: auto;
  background: var(--portal-shell-color, #153451);
  border: 0;
  z-index: 4;
}

.is-authenticated .side__eyebrow {
  display: none;
}

.side__brand {
  display: contents;
}

.is-authenticated .side__brand {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  column-gap: 10px;
}

.is-authenticated .side__tree {
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: stretch;
  width: 144px;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  margin: 0 0 0 -24px;
}

.is-authenticated .side__name {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  font-family: inherit;
  font-size: 25px;
}

.is-authenticated .side__desc {
  grid-column: 2;
  grid-row: 2;
  margin: 6px 0 0;
  font-size: 9px;
  line-height: 1.5;
  text-transform: uppercase;
  color: #c6d7e5;
}

.is-authenticated .side .pill {
  grid-column: 1 / -1;
  grid-row: 3;
  order: 1;
  align-self: stretch;
  margin: 26px 0 25px;
}

/* Άγγελος Καϊάφας: Ευανάγνωστη κίτρινη σήμανση υπηρεσιών, κεντραρισμένη και στα δύο θέματα. */
.side .pill--services {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid #f4d36f;
  border-radius: 999px;
  background: linear-gradient(#fff1ad, #f0c95c);
  box-shadow: inset 0 1px 1px #ffffffc7, 0 4px 10px #00000025;
  color: #3e3211;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: .035em;
}

.workspace-nav {
  order: 2;
  display: grid;
  gap: 6px;
  margin-bottom: 36px;
}

.workspace-nav__label {
  margin: 15px 10px 2px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .13em;
  color: #a7bbcf;
}

.workspace-nav__link {
  padding: 11px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #e6eef7;
  font-size: 13px;
  text-decoration: none;
}

.workspace-nav__link:hover,
.workspace-nav__link:focus-visible,
.workspace-nav__link--active {
  background: linear-gradient(#345b7e, #1d3e64);
  border-color: #6689a780;
  box-shadow: inset 0 1px 0 #ffffff30;
  color: white;
}

.is-authenticated .side__support {
  order: 3;
  width: 100%;
  margin-top: auto;
}

.is-authenticated .side__stat-value {
  font-size: 23px;
}

.is-authenticated .side__stat-label {
  font-size: 8px;
}

.workspace-profile {
  order: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 11px;
  border: 1px solid #ffffff18;
  border-radius: 14px;
  background: #ffffff09;
  color: #f0f7ff;
}

.workspace-avatar {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  flex: 0 0 37px;
  border-radius: 50%;
  background: linear-gradient(145deg, #b1f3ff, #63b7f7);
  box-shadow: inset 0 1px 0 white, 0 4px 10px #00000018;
  color: #113853;
  font-size: 13px;
  font-weight: 800;
}

.workspace-profile__name {
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 700;
}

.workspace-profile__caption {
  margin-top: 3px;
  font-size: 10px;
  color: #bbcede;
}

.is-authenticated .main {
  width: calc(100% - var(--workspace-sidebar));
  min-height: 100dvh;
  margin-left: var(--workspace-sidebar);
  padding: 0 0 75px;
  background: var(--portal-main-background);
}

.is-authenticated .content {
  display: block;
  width: 100%;
  max-width: none;
  padding: 24px clamp(22px, 3vw, 52px) 0;
}

.is-authenticated #catalog-view,
.is-authenticated .catalog {
  width: 100%;
  max-width: none;
  margin: 0;
}

.workspace-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 26px;
}

.workspace-breadcrumb {
  font-size: 12px;
  color: var(--workspace-muted);
}

.workspace-session-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.workspace-session-status {
  font-size: 12px;
  color: #376047;
}

.workspace-session-actions .logout {
  width: auto;
  min-height: 34px;
  padding: 7px 16px;
  border: 0;
  border-radius: 30px;
  background: #14283f;
  color: white;
  font-size: 12px;
}

.workspace-session-actions .logout:hover {
  background: #a53843;
  color: white;
}

.workspace-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.workspace-heading > div:first-child {
  flex: 1 1 350px;
  min-width: 0;
}

.is-authenticated h1 {
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: none;
  font: 800 clamp(24px, 2.2vw, 34px)/1.3 "Portal Sans", "Segoe UI", sans-serif;
  color: var(--workspace-ink);
}

.workspace-subtitle {
  margin: 7px 0 0;
  font-size: 13px;
  color: var(--workspace-muted);
}

.workspace-identity {
  display: flex;
  align-items: center;
  gap: 13px;
  max-width: 100%;
  margin-left: auto;
  padding: 12px 17px;
  border: 1px solid #ffffffce;
  border-radius: 16px;
  background: #ffffffbd;
  box-shadow: 0 8px 22px #173b6320;
}

.workspace-identity__details {
  font-size: 12px;
}

.workspace-identity__details strong {
  display: block;
  overflow-wrap: anywhere;
}

.workspace-identity__details span {
  display: block;
  margin-top: 4px;
  color: var(--workspace-muted);
  font-size: 10px;
}

.workspace-identity__metric {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding-left: 16px;
  border-left: 1px solid #31557520;
}

.workspace-identity__metric strong {
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.workspace-identity__metric span {
  font-size: 9px;
  color: var(--workspace-muted);
}

.provider-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  scroll-margin-top: 20px;
}

.provider-panel {
  display: flex;
  flex-direction: column;
  height: 292px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #ffffffd9;
  border-radius: 18px;
  background: linear-gradient(150deg, #ffffffec, #f0f7fde0);
  box-shadow: 0 14px 34px #193c6422, 0 2px 6px #193c6410, inset 0 1px 0 white;
}

.provider-panel__header {
  display: flex;
  align-items: center;
  flex: 0 0 65px;
  gap: 15px;
  min-width: 0;
  padding: 12px 18px;
  border-bottom: 1px solid #3155751a;
  background: linear-gradient(90deg, #13243f08, transparent);
}

.provider-panel__header .brand-logo--intraway {
  width: 112px;
  max-width: 26%;
  height: auto;
}

.provider-panel__header .brand-logo--qnr {
  width: 54px;
  height: auto;
}

.provider-panel__title {
  flex: 1;
  min-width: 0;
  padding-left: 14px;
  border-left: 1px solid #31557520;
}

.provider-panel__title h2 {
  margin: 0;
  padding: 0;
  font: 700 13px/1.4 "Portal Sans", "Segoe UI", sans-serif;
  color: var(--workspace-ink);
}

.provider-panel__title p {
  margin: 3px 0 0;
  font-size: 10px;
  color: var(--workspace-muted);
}

.provider-panel__header button {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid #31557535;
  border-radius: 8px;
  background: transparent;
  color: var(--workspace-ink);
  font: 600 10px "Portal Sans", "Segoe UI", sans-serif;
  cursor: pointer;
}

.provider-panel__header button:hover {
  background: #dcecf8;
}

.provider-panel__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #4e719b80 transparent;
}

.provider-panel__body:focus-visible {
  outline: 2px solid #2f91c7;
  outline-offset: -3px;
}

.provider-app {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 67px;
  padding: 12px 15px;
  border-bottom: 1px solid #31557518;
}

.provider-app:last-child {
  border-bottom: 0;
}

.provider-app__icon {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  flex: 0 0 37px;
  border: 1px solid #ffffff90;
  border-radius: 10px;
  background: linear-gradient(150deg, #4bd8fa, #2083d1 65%, #356ad3);
  box-shadow: inset 0 1px 0 #ffffff90, 0 4px 10px #338ccc40;
  color: white;
}

.provider-app--documents .provider-app__icon,
.provider-app--qnr .provider-app__icon {
  background: linear-gradient(150deg, #b594ff, #8760de 55%, #6846bc);
  box-shadow: inset 0 1px 0 #ffffff90, 0 4px 10px #8061ca35;
}

.provider-app--inactive .provider-app__icon {
  background: linear-gradient(150deg, #c5d1de, #8295ab);
  box-shadow: inset 0 1px 0 #ffffff90, 0 4px 10px #65778b25;
}

.provider-app__icon svg {
  width: 19px;
  height: 19px;
}

.provider-app__details {
  flex: 1;
  min-width: 0;
}

.provider-app__details h3 {
  margin: 0;
  font: 700 13px/1.45 "Portal Sans", "Segoe UI", sans-serif;
  color: var(--workspace-ink);
  overflow-wrap: anywhere;
}

.provider-app__details p {
  margin: 3px 0 0;
  font-size: 10px;
  color: var(--workspace-muted);
  overflow-wrap: anywhere;
}

.provider-app .status-pill {
  flex: 0 0 auto;
  margin: 0;
  padding: 3px 7px;
  font-size: 8px;
  white-space: nowrap;
}

.provider-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 7px;
  min-width: 85px;
  min-height: 31px;
  padding: 7px 10px;
  border: 1px solid #ffffff80;
  border-radius: 9px;
  background: linear-gradient(#3b6b98, #1b3c63);
  box-shadow: inset 0 1px 0 #ffffff50, 0 5px 11px #16385d30;
  color: white;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.provider-entry:hover {
  background: linear-gradient(#4583b3, #245480);
  color: white;
}

.provider-entry[aria-disabled="true"] {
  border: 1px dashed #a9bdce;
  background: transparent;
  box-shadow: none;
  color: #74899d;
}

.provider-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  gap: 8px;
  padding: 22px;
  text-align: center;
}

.provider-empty strong {
  font-size: 12px;
}

.provider-empty p {
  max-width: 340px;
  margin: 0;
  font-size: 11px;
  line-height: 1.7;
  color: var(--workspace-muted);
}

.provider-empty__icon {
  margin-bottom: 5px;
  padding: 10px;
  border: 1px dashed #9fb6c8;
  border-radius: 12px;
  color: #6e859c;
}

.provider-empty__icon svg {
  width: 21px;
  height: 21px;
  display: block;
}

.personal-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 2.8fr) minmax(210px, 1fr);
  gap: 18px;
  margin-top: 18px;
  scroll-margin-top: 20px;
}

.usage-panel {
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid #ffffff88;
  border-radius: 18px;
  background: linear-gradient(150deg, #ffffff94, #dcecf959);
  box-shadow: 0 12px 30px #193c6416, inset 0 1px 0 #ffffff65;
}

.usage-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}

.usage-panel h2 {
  margin: 0;
  font: 700 14px/1.4 "Portal Sans", "Segoe UI", sans-serif;
}

.usage-panel__caption,
.usage-note {
  margin: 5px 0 0;
  color: #4b657d;
  font-size: 10px;
  line-height: 1.6;
}

.usage-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 2px 0;
  font-size: 10px;
}

.usage-legend__item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.usage-legend__swatch {
  width: 18px;
  height: 3px;
  border-radius: 3px;
  background: #11b8eb;
}

.usage-legend__swatch--documents {
  background: #9565ee;
}

.usage-legend__swatch--debtors {
  background: #e48d52;
}

.usage-legend__swatch--qnr {
  background: #2b9c8b;
}

.usage-chart {
  display: block;
  width: 100%;
  height: 220px;
  overflow: visible;
}

.usage-chart text {
  font-family: "Portal Sans", "Segoe UI", sans-serif;
  font-size: 10px;
  fill: #365775;
}

.usage-chart__grid {
  stroke: #40638625;
  stroke-dasharray: 3 5;
}

.usage-chart__line {
  fill: none;
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
  filter: drop-shadow(0 3px 3px #4373ad40);
}

.usage-chart__point {
  fill: #effaff;
  stroke-width: 1.5;
}

.usage-summary__heading {
  margin: 0 0 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  color: #4b657d;
}

.usage-summary__row {
  margin-top: 17px;
}

.usage-summary__label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  font-size: 12px;
}

.usage-summary__track {
  height: 7px;
  overflow: hidden;
  border-radius: 10px;
  background: #24476919;
}

.usage-summary__fill {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, #25c7ec, #62d9fb);
}

.usage-summary__fill--documents {
  background: linear-gradient(90deg, #9565ee, #b597ff);
}

.usage-summary__fill--debtors {
  background: #e48d52;
}

.usage-summary__fill--qnr {
  background: #2b9c8b;
}

.usage-summary__empty {
  margin: 20px 0;
  font-size: 12px;
  line-height: 1.8;
  color: var(--workspace-muted);
}

.workspace-footer {
  position: fixed;
  inset: auto 0 0 var(--workspace-sidebar);
  z-index: 5;
  padding: 12px;
  background: var(--portal-shell-color, #153451);
  color: #d6e4f2;
  text-align: center;
  font: 11px "Portal Sans", "Segoe UI", sans-serif;
}

.workspace-footer a {
  color: #7fe3f7;
  font-weight: 700;
  text-decoration: none;
}

.is-authenticated a:focus-visible,
.is-authenticated button:focus-visible {
  outline: 3px solid #2f91c7;
  outline-offset: 3px;
}

/* Άγγελος Καϊάφας: Σε μικρότερα παράθυρα αλλάζει μόνο η διάταξη, όχι οι διαθέσιμες ενέργειες. */
@media (max-width: 1250px) {
  body.is-authenticated {
    --workspace-sidebar: 235px;
  }

  .is-authenticated .side {
    padding-inline: 17px;
  }

  .provider-app {
    flex-wrap: wrap;
    gap: 8px;
  }

  .provider-app__details {
    flex-basis: calc(100% - 55px);
  }

  .provider-app .status-pill {
    margin-left: 45px;
  }

  .provider-entry {
    margin-left: auto;
  }

  .provider-panel {
    height: 355px;
  }

  .workspace-heading {
    align-items: flex-start;
  }
}

@media (max-width: 950px) {
  .workspace-heading {
    flex-direction: column;
  }

  .workspace-heading > div:first-child {
    flex: 0 1 auto;
  }

  .provider-grid,
  .personal-dashboard {
    grid-template-columns: minmax(0, 1fr);
  }

  .provider-panel {
    height: 292px;
  }

  .provider-app {
    flex-wrap: nowrap;
  }

  .provider-app__details {
    flex-basis: auto;
  }

  .provider-app .status-pill {
    margin-left: 0;
  }
}

@media (max-width: 650px) {
  .is-authenticated .shell {
    display: block;
  }

  .is-authenticated .side {
    position: relative;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 18px;
  }

  .is-authenticated .side .pill,
  .is-authenticated .side__desc,
  .is-authenticated .side__support,
  .workspace-profile,
  .workspace-nav__label {
    display: none;
  }

  .is-authenticated .side__name {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
  }

  .is-authenticated .side__tree {
    grid-column: 1;
    grid-row: 1;
    width: 42px;
    height: auto;
    margin: 0;
  }

  .is-authenticated .side__brand {
    grid-column: 1 / -1;
    grid-row: 1;
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .workspace-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 16px 0 0;
  }

  .workspace-nav__link {
    padding: 8px 10px;
    font-size: 11px;
  }

  .is-authenticated .main {
    width: 100%;
    margin-left: 0;
  }

  .is-authenticated .content {
    padding: 20px 15px 0;
  }

  .workspace-footer {
    left: 0;
  }

  .workspace-identity {
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
  }

  .workspace-identity__details {
    flex: 1;
  }

  .workspace-identity__metric {
    flex: 1 0 40%;
    padding: 9px 0 0;
    border: 0;
    border-top: 1px solid #31557520;
  }

  .workspace-topbar {
    align-items: flex-start;
    margin-bottom: 22px;
  }

  .workspace-session-actions {
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 6px;
  }

  .provider-panel__header {
    padding-inline: 12px;
    gap: 10px;
  }

  .provider-app {
    flex-wrap: wrap;
  }

  .provider-app__details {
    flex-basis: calc(100% - 55px);
  }

  .provider-app .status-pill {
    margin-left: 45px;
  }

  .provider-panel {
    height: 355px;
  }

  .usage-panel {
    padding: 16px 12px;
  }

  .usage-chart {
    height: 190px;
  }
}
