@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f4f5f7;
    color: #1f2937;
}

body {
    min-width: 320px;
}

a {
    color: inherit;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #c62828;
}

.validation-message {
    color: #c62828;
}

.button-link {
    text-decoration: none;
}

#blazor-error-ui {
    background: #fff4cc;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,.2);
    display: none;
    left: 0;
    padding: .6rem 1.25rem .7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

/* =========================================================
   SISTEM INSPECTOR - LAYOUT V1
   Ispirazione: console RMM compatta, senza copiare Tactical.
   ========================================================= */

.si-shell {
    height: 100vh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f4f5f7;
}

.si-topbar {
    flex: 0 0 auto;
    min-height: 58px;
    background: #2f3338;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 18px;
    border-top: 4px solid #e84b43;
    box-sizing: border-box;
}

.si-brand-area {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.si-brand-link {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    color: #fff;
    text-decoration: none;
}

.si-brand-icon {
    width: 31px;
    height: 31px;
    object-fit: contain;
    flex: 0 0 auto;
}

.si-brand-company {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: .04em;
}

.si-brand-app {
    font-size: 1.05rem;
    font-weight: 500;
    white-space: nowrap;
}

.si-version {
    background: #4a4f55;
    border: 1px solid #636970;
    border-radius: 10px;
    padding: 2px 7px;
    font-size: .72rem;
    color: #e6e8eb;
}

.si-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.si-customer-context {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 320px;
    padding: 5px 10px;
    border: 1px solid #555c63;
    border-radius: 5px;
    background: #262a2f;
    color: #f4f6f7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: .82rem;
}

.si-customer-context-label {
    color: #9ba4ac;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.si-customer-context strong {
    overflow: hidden;
    text-overflow: ellipsis;
}

.si-user-link {
    display: flex;
    align-items: center;
    gap: 7px;
    max-width: 260px;
    color: #f2f4f7;
    text-decoration: none;
    font-size: .88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.si-user-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #5bc071;
    flex: 0 0 auto;
}

.si-logout-form {
    margin: 0;
}

.si-topbar-button {
    border: 1px solid #5a6067;
    background: #3b4046;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: .82rem;
    text-decoration: none;
    cursor: pointer;
}

.si-topbar-button:hover {
    background: #474d54;
}

/* MENU ORIZZONTALE */

.si-menubar {
    flex: 0 0 auto;
    background: #3c4147;
    border-top: 1px solid #50565d;
    border-bottom: 1px solid #24282c;
    min-height: 35px;
    display: flex;
    align-items: stretch;
    padding: 0 14px;
    position: relative;
    z-index: 100;
}

.si-menu {
    display: flex;
    align-items: stretch;
    gap: 0;
    min-width: 0;
}

.si-menu-link,
.si-menu-trigger {
    height: 35px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 5px;
    border: 0;
    border-right: 1px solid #4b5157;
    background: transparent;
    color: #f6f7f8;
    font: inherit;
    font-size: .84rem;
    font-weight: 600;
    padding: 0 13px;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.si-menu-link:first-child {
    border-left: 1px solid #4b5157;
}

.si-menu-link:hover,
.si-menu-trigger:hover,
.si-menu-link.active {
    background: #50565d;
    color: #fff;
}

.si-menu-arrow {
    font-size: .68rem;
    opacity: .8;
}

.si-menu-dropdown {
    position: relative;
}

.si-menu-popup {
    position: absolute;
    display: none;
    top: 100%;
    left: 0;
    width: 215px;
    background: #34393f;
    border: 1px solid #24282c;
    box-shadow: 0 7px 18px rgba(0,0,0,.28);
    padding: 5px 0;
    z-index: 1000;
}

.si-menu-popup-right {
    left: auto;
    right: 0;
}

.si-menu-dropdown:hover > .si-menu-popup,
.si-menu-dropdown:focus-within > .si-menu-popup {
    display: block;
}

.si-menu-popup-link {
    display: block;
    padding: 8px 13px;
    color: #f4f5f6;
    text-decoration: none;
    font-size: .84rem;
    white-space: nowrap;
}

.si-menu-popup-link:hover,
.si-menu-popup-link.active {
    background: #50565d;
    color: #fff;
}

/* PAGE BAR */

.si-pagebar {
    flex: 0 0 auto;
    min-height: 44px;
    background: #fff;
    border-bottom: 1px solid #d9dde3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 18px;
}

.si-page-title {
    font-size: 1rem;
    font-weight: 700;
    color: #30343b;
}

.si-page-path {
    color: #7a828d;
    font-size: .77rem;
}

/* CONTENT */

.si-content {
    flex: 1 1 auto;
    min-height: 0;
    padding: 16px 18px 26px;
    overflow: auto;
}

.si-footer {
    flex: 0 0 auto;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2f3338;
    color: #bfc5cb;
    border-top: 1px solid #202428;
    font-size: .72rem;
}

/* Existing shared utility styles */

.title {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding-bottom: .625rem;
}

.title-header-text {
    font-size: 2rem;
    line-height: 2.4rem;
    font-weight: 600;
}

.title-content-text {
    font-size: 1.5rem;
    font-weight: 400;
}

.main-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100%;
    width: 100%;
}

.block-content {
    width: 31.25rem;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: .625rem;
    max-width: 100%;
}

.icon {
    width: var(--icon-width);
    height: var(--icon-height);
    background-color: currentcolor;
    mask-position: center center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-image: var(--icon-mask-image);
    mask-image: var(--icon-mask-image);
}

.display-desktop {
    display: block;
}

.display-mobile {
    display: none;
}

@media (max-width: 900px) {
    .si-topbar {
        padding: 0 10px;
    }

    .si-brand-company {
        display: none;
    }

    .si-brand-app {
        font-size: .95rem;
    }

    .si-version {
        display: none;
    }

    .si-user-link {
        max-width: 120px;
    }

    .si-menubar {
        padding: 0;
        overflow-x: auto;
        overflow-y: visible;
    }

    .si-menu-link,
    .si-menu-trigger {
        padding: 0 10px;
    }

    .si-content {
        padding: 12px 10px 20px;
    }

    .si-pagebar {
        padding: 0 10px;
    }

    .si-page-path {
        display: none;
    }
}

@media (max-width: 600px) {
    .si-topbar-right .si-user-link {
        display: none;
    }

    .si-customer-context-label {
        display: none;
    }

    .si-customer-context {
        max-width: 190px;
    }

    .si-brand-icon {
        width: 27px;
        height: 27px;
    }

    .si-menu-popup {
        position: fixed;
        top: auto;
    }

    .display-desktop {
        display: none;
    }

    .display-mobile {
        display: block;
    }
}
