/* הגבלת רוחב התוכן המרכזי ומירכוז שלו במסכי מחשב */
#main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* עיצוב החלק העליון (Header) שיהיה ממורכז ותואם לתוכן */
.site-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* עיצוב החלק התחתון (Footer) */
.site-footer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}
/* עיצוב המבנה המקצועי רק למסכי מחשב */
.fp-dashboard-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    font-family: system-ui, -apple-system, sans-serif;
    background-color: #f4f6f9;
}

/* סרגל עליון קבוע */
.fp-top-header {
    background-color: #0f3d4a;
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 10;
}

.fp-logo {
    font-size: 1.4rem;
    font-weight: bold;
    letter-spacing: 0.5px;
}

/* פיצול המסך לתפריט ותוכן */
.fp-main-layout {
    display: flex;
    flex: 1;
    height: calc(100vh - 60px);
}

/* תפריט צד ימין קבוע */
.fp-sidebar-right {
    width: 260px;
    background-color: #ffffff;
    border-left: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    box-shadow: -2px 0 5px rgba(0,0,0,0.02);
}

/* קופסת משתמש עליונה בתפריט */
.fp-user-box {
    padding: 0 20px 15px 20px;
}

.fp-user-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
}

.fp-company-name {
    font-size: 0.85rem;
    color: #666;
    margin-top: 4px;
    margin-bottom: 12px;
}

.fp-logout-btn {
    width: 100%;
    padding: 6px 12px;
    background-color: #fff;
    color: #dc3545;
    border: 1px solid #dc3545;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}

.fp-logout-btn:hover {
    background-color: #dc3545;
    color: white;
}

.fp-divider {
    border: 0;
    border-top: 1px solid #eee;
    margin: 10px 0;
}

/* רשימת כפתורי הניווט */
.fp-side-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0 10px;
}

.fp-nav-item {
    width: 100%;
    text-align: right;
    padding: 12px 15px;
    background: none;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.fp-nav-item:hover {
    background-color: #f1f3f5;
    color: #0f3d4a;
}

.fp-nav-item.active {
    background-color: #e6f0f2;
    color: #0f3d4a;
    font-weight: bold;
}

/* אזור התוכן המרכזי עם הגלילה העצמאית */
.fp-content-area {
    flex: 1;
    padding: 30px;
    overflow-y: auto; /* כאן קורה קסם הגלילה העצמאית */
    background-color: #f8f9fa;
}

/* עיצוב משופר לכפתורי התפריט עם האייקונים */
.fp-side-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 15px;
}

.fp-nav-item {
    width: 100%;
    text-align: right;
    padding: 12px 18px;
    background: none;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.25s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.fp-nav-item:hover {
    background-color: #f7fafc;
    color: #0f3d4a;
    transform: translateX(-4px);
}

.fp-nav-item.active {
    background-color: #e6f0f2;
    color: #0f3d4a;
    font-weight: 600;
    border-right: 4px solid #0f3d4a;
    padding-right: 14px;
}

/* שינוי התפריט הימני לרקע כהה ויוקרתי */
.fp-sidebar-right {
    background-color: #0f3d4a !important;
    color: #ffffff !important;
    border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* התאמת קופסת המשתמש ברקע הכהה */
.fp-user-name {
    color: #ffffff !important;
}

.fp-company-name {
    color: #a0aec0 !important;
}

/* התאמת כפתור ההתנתקות לרקע הכהה */
.fp-logout-btn {
    background-color: transparent !important;
    color: #fc8181 !important;
    border: 1px solid #fc8181 !important;
}

.fp-logout-btn:hover {
    background-color: #dc3545 !important;
    color: white !important;
}

.fp-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* התאמת כפתורי הניווט והאייקונים לרקע הכהה */
.fp-nav-item {
    color: #e2e8f0 !important;
}

.fp-nav-item:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

/* עיצוב כפתור פעיל ברקע הכהה */
.fp-nav-item.active {
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    border-right: 4px solid #319795 !important; /* פס הדגשה בצבע טורקיז בהיר בולט */
}

/* ----- FacilityPro: Universal Mobile Flatten Fix ----- */
@media (max-width: 600px) {
    /* השטחת תיבות הבחירה והגדלת הטקסט החי */
    select, 
    input, 
    textarea,
    .form-control,
    [role="combobox"] {
        height: 38px !important;
        padding: 4px 12px !important;
        font-size: 16px !important;
        font-weight: bold !important;
    }

    /* פריסת שדות צפופים (מבנה, מחלקה, חדר) לרוחב מלא */
    form div, 
    .grid-container > div,
    .form-group,
    main div {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
    }
}
/* ----------------------------------------------------- */

/* ----- FacilityPro: Clean Mobile Layout ----- */
@media (max-width: 600px) {
    /* 1. הפיכת כל שדה למבנה אנכי - כותרת למעלה, תיבה למטה */
    .form-item, 
    .grid-container > div,
    [class*="-group"] {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        width: 100% !important;
        margin-bottom: 14px !important;
        height: auto !important;
    }

    /* 2. סידור הכותרת מעל התיבה */
    .form-item label,
    label {
        position: relative !important;
        transform: none !important;
        margin-bottom: 6px !important;
        font-size: 14px !important;
        font-weight: bold !important;
        color: #333 !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
    }

    /* 3. עיצוב התיבות עצמן - נקיות, ברורות ובגובה נוח */
    select, 
    input, 
    textarea,
    .form-control {
        width: 100% !important;
        height: 42px !important; /* גובה מושלם למגע אצבע */
        padding: 6px 12px !important;
        font-size: 15px !important;
        font-weight: normal !important;
        border: 1px solid #ccc !important;
        border-radius: 6px !important;
        background-color: #fff !important;
    }

    /* התאמה מיוחדת לתיבת הטקסט הגדולה של התיאור */
    textarea {
        height: 100px !important;
    }
}
/* ------------------------------------------- */

/* ----- FacilityPro: Clean Minimalist Mobile Layout ----- */
@media (max-width: 600px) {
    /* 1. ביטול הרקעים, הבלוקים והמסגרות המנופחות שמפריעות לעין */
    .form-item, 
    .grid-container > div,
    [class*="-group"],
    div[class*="container"] {
        background: none !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin-bottom: 20px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        position: relative !important;
        height: auto !important;
    }

    /* 2. הוצאת הכותרות (Labels) מהמיקום הצף והצבתן בראש השורה */
    .form-item label,
    label {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
        margin-bottom: 6px !important;
        font-size: 15px !important;
        font-weight: bold !important;
        color: #1e293b !important; /* צבע כהה וברור לכותרת */
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
    }

    /* 3. הפיכת השדות עצמם לתיבות שטוחות, נמוכות ונקיות מתחת לכותרת */
    select, 
    input, 
    textarea,
    .form-control {
        width: 100% !important;
        height: 40px !important; /* גובה נמוך ומהודק */
        background-color: #f8fafc !important; /* רקע אפרפר עדין ושטוח */
        border: 1px solid #cbd5e1 !important; /* מסגרת דקה בלבד */
        border-radius: 6px !important;
        padding: 4px 10px !important;
        font-size: 16px !important;
        color: #0f172a !important;
        box-shadow: none !important;
        text-align: right !important;
    }

    /* התאמה מיוחדת לתיבת הטקסט של התיאור */
    textarea {
        height: 120px !important;
        background-color: #f8fafc !important;
    }
}
/* ----------------------------------------------------- */
