/* ===================================
   MINIMAL FULL-SCREEN LAYOUT
   Layout ultra-minimalista per area riservata
   APPLICATO SOLO AL CONTAINER .minimal-layout-container
   =================================== */

/* Container principale full screen - SOLO per area riservata */
.minimal-layout-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #1a1a1a;
    background: #ffffff;
    z-index: 9999;
}

/* ===================================
   SIDEBAR - Fissa a sinistra
   =================================== */

.minimal-sidebar {
    width: 240px;
    height: 100vh;
    background: var(--brand-primary, #415e44) !important;
    border-right: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
}

/* Logo area */
.sidebar-logo {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.sidebar-logo img {
    height: 10vh;
    width: auto;
}

.sidebar-logo-text {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

/* Menu di navigazione */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
}

.sidebar-nav-section {
    margin-bottom: 24px;
}

.sidebar-nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.6);
    padding: 0 20px 8px 20px;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
}

.sidebar-nav-item i {
    width: 20px;
    font-size: 16px;
    margin-right: 12px;
    color: rgba(255,255,255,0.7);
}

.sidebar-nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: #ffffff;
}

.sidebar-nav-item:hover i {
    color: rgba(255,255,255,0.9);
}

.sidebar-nav-item.active {
    background: rgba(255,255,255,0.15);
    color: #ffffff;
    font-weight: 500;
}

.sidebar-nav-item.active i {
    color: #ffffff;
}

/* Sub-item (indentati) */
.sidebar-nav-item.sub-item {
    padding-left: 52px;
    font-size: 13px;
}

/* User info in fondo alla sidebar */
.sidebar-user {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.15s ease;
    position: relative;
}

.sidebar-user:hover {
    background: rgba(255,255,255,0.1);
}

.sidebar-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--brand-primary, #415e44);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 500;
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-role {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
}

.sidebar-user-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: var(--brand-primary, #415e44);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    margin-bottom: 8px;
    display: none;
}

.sidebar-user-dropdown.show {
    display: block;
}

.sidebar-user-dropdown-item {
    padding: 10px 16px;
    font-size: 13px;
    color: #ffffff;
    cursor: pointer;
    transition: background 0.15s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-user-dropdown-item:hover {
    background: rgba(255,255,255,0.1);
    color: #ffffff;
}

/* ===================================
   MAIN CONTENT AREA - Full screen
   =================================== */

.minimal-main-content {
    flex: 1;
    height: 100vh;
    margin-left: 240px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fafafa;
}

/* Top bar del contenuto */
.minimal-content-header {
    background: white;
    border-bottom: 1px solid #e8e8e8;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.minimal-content-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.minimal-content-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Sub-header con filtri/controls */
.minimal-content-subheader {
    background: white;
    border-bottom: 1px solid #e8e8e8;
    padding: 12px 32px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

/* Area contenuto scrollabile */
.minimal-content-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 32px;
}

/* ===================================
   BUTTONS & CONTROLS - Stile minimal
   =================================== */

.btn-minimal {
    padding: 6px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    color: #666;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-minimal:hover {
    background: #f8f8f8;
    border-color: #d0d0d0;
    color: #1a1a1a;
}

.btn-minimal:active {
    background: #f0f0f0;
}

.btn-minimal.primary {
    background: var(--brand-primary, #415e44);
    color: white;
    border-color: var(--brand-primary, #415e44);
}

.btn-minimal.primary:hover {
    background: #2f4431;
    border-color: #2f4431;
}

.btn-minimal i {
    font-size: 14px;
}

/* Icon buttons */
.btn-icon-minimal {
    width: 32px;
    height: 32px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    color: #666;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-minimal:hover {
    background: #f8f8f8;
    border-color: #d0d0d0;
    color: #1a1a1a;
}

/* Select e input minimal */
.select-minimal,
.input-minimal {
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    font-size: 13px;
    color: #1a1a1a;
    outline: none;
    transition: all 0.15s ease;
}

.select-minimal:focus,
.input-minimal:focus {
    border-color: #c0c0c0;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.02);
}

/* ===================================
   CALENDAR/WEEK GRID - Layout minimal
   =================================== */

.minimal-calendar-grid {
    display: grid;
    grid-template-columns: 200px repeat(7, 1fr);
    gap: 1px;
    background: #e8e8e8;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
}

.minimal-calendar-header {
    background: #fafafa;
    padding: 16px 12px;
    text-align: center;
    border-bottom: 1px solid #e8e8e8;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
}

.minimal-calendar-day-header {
    background: white;
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #e8e8e8;
}

.minimal-calendar-day-name {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
}

.minimal-calendar-day-number {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-top: 4px;
}

.minimal-calendar-day-header.today {
    background: #f0f7f0;
}

.minimal-calendar-day-header.today .minimal-calendar-day-number {
    color: var(--brand-primary, #415e44);
}

.minimal-calendar-cell {
    background: white;
    min-height: 120px;
    padding: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.minimal-calendar-cell:hover {
    background: #fafafa;
}

.minimal-calendar-row-header {
    background: #fafafa;
    padding: 12px;
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a;
    border-bottom: 1px solid #e8e8e8;
}

/* ===================================
   RESPONSIVE - Mobile e Tablet
   =================================== */

/* Hamburger menu (nascosto su desktop) */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 110;
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

@media (max-width: 768px) {
    /* Mobile: sidebar nascosta di default */
    .minimal-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 8px rgba(0,0,0,0.1);
        background: var(--brand-primary, #415e44) !important;
    }

    .minimal-sidebar.open {
        transform: translateX(0);
        background: var(--brand-primary, #415e44) !important;
        border-right: 1px solid rgba(255,255,255,0.2);
    }

    .sidebar-toggle {
        display: flex;
    }

    .minimal-main-content {
        margin-left: 0;
    }

    .minimal-content-header,
    .minimal-content-subheader,
    .minimal-content-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* Calendar diventa lista */
    .minimal-calendar-grid {
        grid-template-columns: 1fr;
    }

    .minimal-calendar-header {
        display: none;
    }

    .minimal-calendar-day-header {
        padding: 16px;
        text-align: left;
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .minimal-calendar-day-number {
        order: -1;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    /* Tablet: sidebar pił stretta */
    .minimal-sidebar {
        width: 200px;
    }

    .minimal-main-content {
        margin-left: 200px;
    }

    .sidebar-nav-section-title,
    .sidebar-nav-item,
    .sidebar-user-name {
        font-size: 12px;
    }

    .sidebar-logo-text {
        font-size: 14px;
    }
}

/* ===================================
   UTILITY CLASSES
   =================================== */

.whitespace-large {
    padding: 32px;
}

.whitespace-small {
    padding: 16px;
}

.divider-minimal {
    height: 1px;
    background: #e8e8e8;
    margin: 16px 0;
}

.text-subtle {
    color: #999;
    font-size: 12px;
}

.badge-minimal {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    background: #f0f0f0;
    color: #666;
}

/* Form labels minimal */
.form-label-minimal {
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 6px;
    display: block;
}

/* Forza colori leggibili su sidebar in tutti i breakpoint */
.minimal-sidebar .sidebar-nav-section-title { color: rgba(255,255,255,0.7) !important; }
.minimal-sidebar .sidebar-nav-item { color: rgba(255,255,255,0.95) !important; }
.minimal-sidebar .sidebar-nav-item i { color: rgba(255,255,255,0.9) !important; }
.minimal-sidebar .sidebar-user-name { color: #fff !important; }
.minimal-sidebar .sidebar-user-role { color: rgba(255,255,255,0.7) !important; }
.minimal-sidebar .sidebar-user-avatar { background: #fff !important; color: var(--brand-primary, #415e44) !important; }
