/* CSS Variable Definition matching GlooboBiz Styleguide */
:root {
    --brand-color: #1ca74d;     /* Slimy Green / GlooboBiz primary */
    --blue-ribbon: #1758ff;     /* Accent Blue */
    --concrete: #f3f3f3;        /* Background Gray */
    --white: #ffffff;
    --black: #000000;
    --gray: #757575;
    --gray-nurse: #e9e9e9;
    --alto: #d9d9d9;
    --red: #ff0000;
    --text-color: #333333;
    
    --font-family-rubik: "Rubik", sans-serif;
    --font-family-karla: "Karla", sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--concrete);
    font-family: var(--font-family-karla);
    color: var(--text-color);
    font-size: 16px;
    line-height: 1.5;
}

/* Page Layout */
.page-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Sinistra style matching Menu_Left_Pro.css */
.menu-left {
    width: 250px;
    background-color: #1c2229; /* Dark gray/black background of sidebar */
    color: var(--white);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-right: 1px solid #2a313a;
}

.logoAlto {
    width: 170px;
    height: auto;
    margin: 20px auto;
    display: block;
    object-fit: contain;
}

.elementoMenuPresentazione {
    height: 1px;
    background-color: #2a313a;
    margin: 10px 0 20px 0;
}

.elementoMenu, .elementoMenuSelected {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

.elementoMenu:hover {
    background-color: #242b34;
}

.elementoMenuSelected {
    background-color: var(--brand-color);
}

.iconLeftMenu {
    width: 24px;
    height: 24px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-menu {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1); /* Rende le icone bianche */
}

.testoMenu a, .testoMenu span {
    color: var(--white);
    text-decoration: none;
    font-family: var(--font-family-rubik);
    font-weight: 500;
    font-size: 14px;
}

.mano-menu-selected {
    font-weight: 700;
}

.imagePanel {
    margin-left: auto;
}

.menuLeftDiscesa {
    width: 12px;
    height: 12px;
    filter: brightness(0) invert(1);
}

/* Sottomenu collassabile */
.div-collassabile {
    background-color: #151a20;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.div-collassabile.active {
    max-height: 200px;
}

.elemento-menu-secondario {
    padding: 10px 20px 10px 40px;
}

.pos-secondario {
    display: flex;
    align-items: center;
}

.image-menu-secondario {
    width: 10px;
    height: 10px;
    margin-right: 10px;
    opacity: 0.5;
    filter: brightness(0) invert(1);
}

.testoMenu-secondario a {
    color: #a0aab5;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.testoMenu-secondario a:hover, .testoMenu-secondario a.selected {
    color: var(--white);
}

/* Global Right Container */
.global-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Top Account Menu style matching Menu_Top.css */
.menu-account {
    height: 60px;
    background-color: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    border-bottom: 1px solid var(--gray-nurse);
}

.api-key-input {
    width: 300px;
    padding: 8px 12px;
    border: 1px solid var(--alto);
    border-radius: 4px;
    font-size: 13px;
    font-family: var(--font-family-karla);
    outline: none;
    transition: border-color 0.2s;
}

.api-key-input:focus {
    border-color: var(--blue-ribbon);
}

.panel-esci {
    display: flex;
    align-items: center;
}

/* Buttons style matching Styleguide.css */
.button-green, .button-blue {
    font-family: var(--font-family-rubik);
    font-weight: 500;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    cursor: pointer;
    color: var(--white);
    transition: opacity 0.2s, background-color 0.2s;
    font-size: 14px;
}

.button-green {
    background-color: var(--brand-color);
}

.button-green:hover {
    background-color: #178a3f;
}

.button-blue {
    background-color: var(--blue-ribbon);
}

.button-blue:hover {
    background-color: #0b45db;
}

/* Inner Login Container containing the Main Content */
.login-container {
    padding: 30px;
    flex-grow: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.login-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Tabs Navigation group */
.panel-row-near {
    margin-bottom: 10px;
}

.panel-buttons-faq {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.panel-buttons-faq button {
    font-size: 15px;
    padding: 12px 24px;
    border-radius: 4px;
    background-color: #e2e8f0;
    color: #4a5568;
    border: 1px solid var(--alto);
}

.panel-buttons-faq button:hover {
    background-color: #cbd5e1;
}

.panel-buttons-faq button.active {
    background-color: var(--brand-color);
    color: var(--white);
    border-color: var(--brand-color);
}

/* Section Header Panel */
.panel-content {
    background-color: var(--white);
    border-radius: 6px;
    padding: 20px;
    border: 1px solid var(--gray-nurse);
}

.h4-headline {
    font-family: var(--font-family-rubik);
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 12px;
}

.panel-content-text p {
    font-size: 15px;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* Tab panes styling */
.tab-pane {
    display: none;
    flex-direction: column;
    gap: 20px;
}

.tab-pane.active {
    display: flex;
}

/* Panel Row White Card shape matching logged-in dashboard */
.panel-row {
    background-color: var(--white);
    border-radius: 6px;
    border: 1px solid var(--gray-nurse);
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.panel-content-horizontal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gray-nurse);
    padding-bottom: 15px;
    margin-bottom: 5px;
}

.body-big {
    font-family: var(--font-family-rubik);
    font-size: 15px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
}

.body-1-gray {
    font-size: 15px;
    color: var(--gray);
    font-family: var(--font-family-karla);
}

/* Customer details grid */
.customer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    padding: 10px 0;
}

.grid-item {
    font-size: 15px;
    color: #2d3748;
}

.status-badge {
    background-color: #d1fae5;
    color: #065f46;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

/* Text Inputs styles matching logged-in form fields */
.text-input-multicolumn {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--alto);
    border-radius: 4px;
    font-family: var(--font-family-karla);
    font-size: 15px;
    color: var(--text-color);
    outline: none;
    resize: vertical;
    line-height: 1.5;
}

.text-input-multicolumn:focus, .text-input-single:focus {
    border-color: var(--blue-ribbon);
}

.text-input-single {
    width: 100%;
    max-width: 500px;
    padding: 12px;
    border: 1px solid var(--alto);
    border-radius: 4px;
    font-family: var(--font-family-karla);
    font-size: 15px;
    color: var(--text-color);
    outline: none;
}

select.text-input-single {
    background-color: var(--white) !important;
    color: #1a202c !important;
}

select.text-input-single option {
    background-color: var(--white) !important;
    color: #1a202c !important;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}

.input-helper {
    font-size: 12px;
    color: var(--gray);
}

/* Drag Drop File Upload */
.drag-drop-zone {
    border: 2px dashed var(--brand-color);
    background-color: #f6fdf9;
    border-radius: 6px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.drag-drop-zone:hover {
    background-color: #edfcf2;
}

.browse-link {
    color: var(--brand-color);
    text-decoration: underline;
    font-weight: 700;
}

.file-list {
    margin-top: 15px;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8fafc;
    border: 1px solid var(--gray-nurse);
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 14px;
}

.file-remove {
    color: var(--red);
    cursor: pointer;
    font-weight: 700;
}

/* Calling Overlay/Spinner */
.calling-container, .success-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 0;
    gap: 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #e2e8f0;
    border-top: 5px solid var(--blue-ribbon);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.info-box-success {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 15px;
    border-radius: 6px;
    text-align: left;
    margin-top: 15px;
    width: 100%;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
}

/* Data Table and History Layout */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: left;
}

.data-table th, .data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--gray-nurse);
}

.data-table th {
    background-color: #f8fafc;
    font-weight: 700;
    color: #475569;
}

.data-table tr:hover {
    background-color: #f1f5f9;
}

/* Footer Section */
.footer {
    background-color: #1c2229;
    color: var(--white);
    padding: 40px 30px;
    margin-top: auto;
}

.footer-layout-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.cella-footer {
    display: block;
    color: #a0aab5;
    text-decoration: none;
    margin-bottom: 10px;
    font-size: 14px;
}

.cella-footer.rubik-bold-white-18px {
    font-family: var(--font-family-rubik);
    font-weight: 700;
    color: var(--white);
    margin-bottom: 15px;
    font-size: 16px;
}

.cella-footer.body-1:hover {
    color: var(--white);
}

.testo-colonna {
    color: #a0aab5;
    font-size: 14px;
}

/* Alert Overlay Modal */
.alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.alert-box {
    background-color: var(--white);
    border-radius: 6px;
    padding: 25px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .page-container {
        flex-direction: column;
    }
    .menu-left {
        width: 100%;
    }
    .menu-account {
        flex-direction: column;
        height: auto;
        padding: 15px;
        gap: 10px;
    }
    .api-key-input {
        width: 100%;
    }
}
