.chart-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
}

.chart-container {
    position: relative;
}


.chart-center-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 30px;
    font-weight: bold;
    pointer-events: none;
    z-index: 0;
}

.chart-container canvas {
    position: relative;
    z-index: 1;
}

.chart-legend {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(3, auto); /* massimo 3 righe per colonna */
    font-size: 18px;
    gap: 8px 20px; /* riga-colonna */
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    display: inline-block;
}

.legend-label {
    font-weight: 500;
    flex: 1;
}

.legend-value {
    font-weight: bold;
}

.charts-row {
    display: flex;
    gap: 50px; /* spazio tra i due chart */
    align-items: center;
    justify-content: flex-end;
}

body:has(div.login) {
    background-image: url('../../img/img_1.png');
}

.detail-auth-list {
    width: 300px;
}

/* External App Credentials */
.detail-auth-list .second-col {
  word-break: break-all;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.ext_state {
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 20px;
}

.deployed {
    background-color: deepskyblue;
    color: black;
}

.unavailable {
    background-color: lightgray;
    color: black;
}

.available {
    background-color: lightgreen;
    color: black;
}

.suspended {
    background-color: orange;
    color: black;
}

.prepared {
    background-color: yellow;
    color: black;
}

.removed {
    background-color: red;
    color: white;
}

a:has(i.disabled) {
  pointer-events: none;
  cursor: default;
}

/* Credentials Archives */
.status-badge {
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-left: 20px;
}

.status-badge.status-success {
    background-color: lightgreen;
    color: black;
}

.status-badge.status-issuing {
    background-color: lightblue;
    color: black;
}

.status-badge.status-revoked {
    background-color: red;
    color: white;
}

.status-badge.status-created {
    background-color: #cfe8ff;
    color: #0b3d73;
}

.status-badge.status-pending {
    background-color: #fff3cd;
    color: #7a5a00;
}

.status-badge.status-requested {
    background-color: #e5e5ff;
    color: #3b3b7a;
}

.status-badge.status-failed {
    background-color: #f8d7da;
    color: #7a1f23;
}

.credentials-table-wrapper {
    background: #ffffff;
    border: 1px solid #e2e6ea;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    padding: 8px;
}

.credentials-table {
    margin: 0;
}

.credentials-table .part-number-row td {
    background: #f7f9fb;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.credentials-table .part-number-row:hover td {
    background: #eef3f7;
}

.credentials-table .collapse-icon,
.panel-heading-custom .collapse-icon {
    display: inline-block;
    transition: transform 0.2s ease;
    margin-right: 6px;
}

.credentials-table .part-number-row[aria-expanded="true"] .collapse-icon,
.panel-heading-custom a[aria-expanded="true"] .collapse-icon {
    transform: rotate(180deg);
}

.inner-table-wrapper {
    background: #ffffff;
    padding: 12px;
}

.credentials-inner-table th {
    background: #f0f2f5;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.04em;
}

.credentials-inner-table td {
    vertical-align: top;
}

.panel-group-custom {
    margin: 0;
}

.panel-custom {
    border: 1px solid #e2e6ea;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.panel-heading-custom {
    padding: 8px 12px;
    background: #f7f9fb;
    border-bottom: 1px solid #e2e6ea;
    border-radius: 8px 8px 0 0;
}

.panel-heading-custom h5 {
    margin: 0;
    font-size: 13px;
}

.panel-heading-custom a {
    color: #333333;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.panel-heading-custom a:hover,
.panel-heading-custom a:focus {
    text-decoration: none;
    color: #111111;
}

.panel-body-custom {
    padding: 10px 12px;
}

.detail-list {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4px 12px;
}

.detail-label {
    font-weight: 600;
    color: #555555;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.detail-value {
    color: #222222;
    word-break: break-all;
}

.resources-column {
    width: 45%;
}

.hid_part_number {
    font-weight: 700;
}

.hid_credential_id {
    font-weight: 700;
}

.select2-search--inline {
    width: 100%;
}

/* HERO SECTION */
.hero-section {
    background: #f7faff;
}
.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 48px;
}
.hero-title {
    color: #4c6ef5;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 12px;
}
.hero-main-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a2340;
    margin-bottom: 18px;
}
.hero-description {
    font-size: 1.15rem;
    color: #3d4a6b;
    margin-bottom: 32px;
}
.hero-image {
    width: 100%;
    max-width: 520px;
}

/* PORTALS SECTION */
.portals-section {
    background: #fff;
}
.portals-container {
    max-width: 1200px;
    margin: 0 auto;
}
.portals-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: #1a2340;
}
.portal-cards {
    display: flex;
    gap: 28px;
    justify-content: center;
}
.portal-card {
    border-radius: 16px;
    flex: 1;
    padding: 32px 28px;
    box-shadow: 0 2px 12px rgba(44, 62, 80, 0.04);
}
.portal-card.iot {
    background: rgba(1, 86, 203, 0.1);
    box-shadow: 5px 10px #0156CB ;
}
.portal-card.people {
    background: rgba(2, 36, 82, 0.1);
    box-shadow: 5px 10px #022452 ;
}
.portal-card.credential {
    background: rgb(254, 149, 33, 0.1);
    box-shadow: 5px 10px #FE9521 ;
}
.portal-icon.iot {
    background: #0156CB;
    color: #fff;
}
.portal-icon.people {
    background: #022452;
    color: #fff;
}
.portal-icon.credential {
    background: #FE9521;
    color: #fff;
}
.portal-icon {
    border-radius: 50%;
    padding: 8px;
    font-size: 1.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.portal-title.iot {
    color: #0156CB;
}
.portal-title.people {
    color: #022452;
}
.portal-title.credential {
    color: #FE9521;
}
.portal-title {
    font-weight: 700;
    font-size: 1.15rem;
    margin-left: 10px;
}
.portal-link.iot {
    color: #0156CB;
}
.portal-link.people {
    color: #022452;
}
.portal-link.credential {
    color: #FE9521;
}
.portal-link {
    font-weight: 600;
    text-decoration: none;
}

/* CTA SECTION */
.cta-section {
    background: #f7faff;
    padding: 25px 0;
    margin-top: 25px;
}
.cta-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}
.cta-row {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: center;
    margin-bottom: 18px;
}
.cta-icon {
    background: #e7f0ff;
    border-radius: 50%;
    padding: 10px;
    font-size: 1.3rem;
    color: #4c6ef5;
}
.cta-title {
    font-weight: 700;
    font-size: 1.15rem;
    color: #2d3a5a;
}
