﻿html {
    font-size: 16px;
}

@media (min-width: 768px) {
    html {
        font-size: 18px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

html, body {
    direction: rtl;
    text-align: right;
    overflow-x: hidden;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.navbar {
    height: 80px; /* Adjust the height as needed */
    display: flex;
    align-items: center; /* Ensures vertical alignment */
    justify-content: space-between; /* Adjusts spacing between items */
    padding: 10px 20px; /* Adds spacing inside navbar */
}

    .navbar img {
        max-height: 50px; /* Ensures images fit inside navbar */
        width: auto; /* Maintain aspect ratio */
    }

.navbar-center {
    flex-grow: 1; /* Pushes the center logo to the middle */
    display: flex;
    justify-content: center;
}

.navbar-nav {
    display: flex;
    flex-direction: row !important; /* מכריח את הכיוון להיות אופקי */
    align-items: center;
    justify-content: start; /* מתחיל את הפריטים מהשמאל (או ימין אם RTL) */
    gap: 15px; /* ריווח בין פריטים */
}

.nav-item {
    position: relative;
    margin-right: 15px; /* ריווח בין פריטים */
}

.nav-link {
    text-decoration: none;
    color: #007bff;
    font-size: 20px;
    padding: 10px;
    cursor: pointer;
    font-weight: bold;
}

    .nav-link:hover {
        background-color: #f0f0f0;
        border-radius: 5px;
    }

.navbar .main-logo {
    max-height: 70px; /* קובע גודל שונה ללוגו הראשי */
    width: auto;
}

.navbar .client-logo {
    max-height: 80px; /* קובע גודל שונה ללוגו המשני */
    width: auto;
}

@media (max-width: 767.98px) {
    .client-logo {
        width: 80px;
        height: auto;
    }
}

.user-fullname {
    font-weight: bold;
    font-size: 27px;
    color: #333; /* Adjust color */
    margin: auto;
}

.container {
    width: 100%;
    max-width: 100%;
    padding: 20px;
    margin: auto;
}


.nav-button {
    background-color: white;
    color: black;
    padding: 5px 7px;
    border-radius: 5px;
    border-color: white;
    cursor: pointer;
    font-size: 23px;
    transition: background-color 0.2s ease-in-out;
}

    .nav-button.active {
        background-color: #ffd700;
        letter-spacing: 1px;
    }

    .nav-button:hover {
        background-color: lightgray;
        font-size: 25px;
        font-weight: bold;
    }

.client-logo {
    max-height: 100px;
    height: auto;
}

@media (max-width: 767.98px) {
    .client-logo {
        max-height: 50px;
    }
}

.input-text {
    border: none;
    background: transparent;
    border-bottom: 1px solid #000;
    outline: none;
    height: 60px;
    width: 90%;
    font-size: 20px;
    color: black;
    font-weight: bold;
    font-weight: bold;
}

.required-star {
    color: red;
    font-size: 16px;
    margin-left: 5px;
    font-weight: bold;
}

h2 {
    font-size: 25px;
    color: darkblue;
}

strong {
    font-size: 22px;
    color: darkblue;

}
strongdata {
    font-size: 22px;
    color: darkgreen;
}
strongdatagreen {
    font-size: 22px;
    color: darkgreen;
    font-weight: bold;
}
strongdatared {
    font-size: 22px;
    color: red;
    font-weight: bold;
}


.card-header {
    border-bottom: 1px solid #eee;
    background-color: #fafafa;
}

canvas {
    max-height: 250px;
}


.card-header h2 {
    font-size: 22px;
    color: darkblue;
    font-weight: bold;
}

@media (max-width: 576px) {

    h2 {
        font-size: 20px;
        color: darkblue;
        font-weight: bold;
    }
}

h5 {
    font-size: 22px;
    color: black;
    font-weight: bold;
    text-align: center;
}

    h5 .colorBlue {
        color: darkblue;
        font-size: 32px;
    }

h6 {
    font-size: 25px;
    color: darkblue;
    font-weight: bold;
    text-align: center;
}

.h6 {
    color: darkblue;
    font-weight: bold;
    text-align: center;
}

.h3 {
    color: darkblue;
    font-weight: bold;
    text-align: center;
}

h6 .colorBlue {
    color: darkblue;
    font-size: 26px;
}

.h7 {
    font-size: 16px;
    color: darkblue;
    font-weight: bold;
}

table {
    font-family: "Varela Round", sans-serif;
    font-size: 19px;
    border-collapse: collapse;
    width: 100%;
}

th, td {
    text-align: center;
    padding: 12px;
    vertical-align: middle;
    border-left: 2px solid #ddd;
    font-size: 18px;
}

table .form-select {
    font: inherit; /* מוריש פונט + גודל מה-td */
    color: inherit;
    padding: 12px; /* כמו ה-td שלך */
    width: 100%; /* אם תרצי שימלא את התא */
    box-sizing: border-box;
    text-align: center; /* כרום/אדג' */
    text-align-last: center; /* פיירפוקס */
    font-size: 18px;
}

th {
    color: darkblue !important;
}

thead {
    background-color: #f8f9fa;
    font-weight: bold;
    border-bottom: 2px solid #dee2e6;
    font-size: 21px;
}

tbody tr:nth-child(even) {
    background-color: #f6f6f6;
}

tbody tr:hover {
    background-color: #e8f0ff;
}

.action-icons a {
    display: inline-block;
    margin: 0 6px;
    font-size: 20px;
    text-decoration: none;
}

    .action-icons a:hover {
        opacity: 0.8;
    }

@media (max-width: 768px) {
    table {
        font-size: 15px;
    }

        table td[data-label]::before {
            content: attr(data-label) ": ";
            font-weight: bold;
            display: none;
            color: #555;
        }

        table td {
            
        }

    thead {
        background-color: #f8f9fa;
        font-weight: bold;
        border-bottom: 2px solid #dee2e6;
        font-size: 15px;
    }

    .action-icons {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

        .action-icons a {
            font-size: 24px;
        }

    .label-text {
        display: none;
    }
}

/* גריד של עמודות רספונסיביות */
.permission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 100%;
    list-style: none;
    margin: 0;
}

/* כל קבוצה */
.permission-group {
    background-color: #f8f9fa;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 15px;
}

    /* כותרת קבוצה */
    .permission-group > label {
        font-weight: bold;
        font-size: 22px;
        margin-bottom: 10px;
        display: block;
    }

    /* כל פריט פנימי */
    .permission-group ul {
        padding-right: 20px;
        margin-top: 10px;
    }

        .permission-group ul li {
            list-style: none;
            margin-bottom: 5px;
        }

    .permission-group input[type="checkbox"] {
        margin-left: 10px;
        transform: scale(1.4);
    }

    .permission-group label {
        font-size: 22px;
        display: flex;
        align-items: center;
    }

    .permission-group span.toggle {
        margin-right: auto;
        cursor: pointer;
        font-size: 20px;
    }

.modal {
    z-index: 20000 !important;
}

.modal-backdrop {
    z-index: 19990 !important;
}

.modal-header .close {
    margin-top: -4px;
}

.close {
    font-size: 32px;
    color: black;
    font-weight: bold;
}

.modal-footer {
    padding: 10px 20px;
    margin-top: 0;
}

.modal-header {
    padding: 10px 15px;
}


/* כותרת טבלה קפואה */
.sticky-header thead th {
    position: sticky;
    top: 56px; /* התאם אם יש navbar דביק אחר */
    z-index: 2;
    background: #f8f9fa;
}

/* שמירת מספרים/תאריכים בשורה אחת */
.text-nowrap {
    white-space: nowrap;
}

.card-body {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 0 10px #95A5A6;
    padding: 15px;
    text-align: center;
    font-size: 20px;
    line-height: 40px;
}

.month-ddl {
    min-width: 10.5rem;
   
}

.year-ddl {
    min-width: 6.5rem;
    
}
/* במסכים צרים אפשר קצת להקטין */
@media (max-width: 576px) {
    .month-ddl {
        min-width: 9rem;
    }

    .year-ddl {
        min-width: 6rem;
    }
}

.card {
    width: 90%;
    margin: auto;
}

@media (max-width: 767.98px) {
    .card {
        width: 100%;
        margin: auto;
    }
}

.carddetails {
    width: 60%;
    margin: auto;
}

@media (max-width: 767.98px) {
    .carddetails {
        width: 100%;
        margin: auto;
    }
}

.form-label {
    font-size: 20px;
    color: darkgreen;
    font-weight: bold;
}

.form-check-label {
    font-size: 20px;
    color: darkgreen;
    font-weight: bold;
}

.form-control, .form-select, .form-check-input, .select2-selection__rendered .select2-container--default .select2-selection--single {
    font-size: 21px;
    color: darkblue;
    font-weight: bold;
    line-height: 40px;
}
/* קובע line-height וגובה ל-select2 */
.select2-container .select2-selection--single {
    height: 45px !important; /* גובה כללי */
    line-height: 45px !important; /* מרכז את הטקסט אנכית */
    font-size: 21px !important;
    color: darkblue !important;
    font-weight: bold !important;
    border: 1px solid #ced4da;
    border-radius: 6px;
}

/* כדי שגם הטקסט שבתוך הסלקט ייראה כמו בשאר השדות */
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 45px !important;
    color: darkblue !important;
    font-weight: bold !important;
}

/* חץ הבחירה */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 43px !important;
}


.page-title {
    white-space: nowrap
}

@media (max-width: 576px) {
    .page-title {
        font-size: 1.25rem
    }

    #projectSearch {
        width: 100%
    }


    .form-label {
        font-size: 18px;
        color: darkgreen;
        font-weight: bold;
    }

    .form-check-label {
        font-size: 18px;
        color: darkgreen;
        font-weight: bold;
    }


    .form-control {
        font-size: 18px;
        color: darkblue;
        font-weight: normal;
    }

    .form-select {
        font-size: 18px;
        color: darkblue;
        font-weight: normal;
    }

    .form-check-input {
        font-size: 18px;
        color: darkblue;
        font-weight: normal;
    }
}


/* ===== Documents mobile polish ===== */
@media (max-width: 767.98px) {
    /* פילטרים */
    .filters .form-select,
    .filters .form-control {
        width: 100% !important;
    }

    .filters .col-6, .filters .col-12 {
        padding-left: .25rem;
        padding-right: .25rem;
    }

    /* כפתורים – ערימה אנכית */
    .actions-inline {
        display: grid !important;
        grid-template-columns: 1fr;
    }

        .actions-inline .btn {
            width: 100%;
        }

    /* טבלה לכרטיסיות */
    .table-mobile thead {
        display: none;
    }

    .table-mobile tbody,
    .table-mobile tr,
    .table-mobile td {
        display: block;
        width: 100%;
    }

    .table-mobile tr {
        border: 1px solid var(--bs-border-color);
        border-radius: .75rem;
        margin-bottom: .75rem;
        padding: .25rem .5rem;
        background: #fff;
    }

    .table-mobile td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: .4rem .5rem;
        border: 0;
        border-bottom: 1px solid var(--bs-border-color);
    }

        .table-mobile td:last-child {
            border-bottom: 0;
        }

        .table-mobile td::before {
            content: attr(data-label);
            font-weight: 600;
            margin-right: 1rem;
            color: #333;
        }

    /* להחליש sticky header במובייל */
    .sticky-header {
        position: static !important;
    }
    /* למנוע מגבלת גובה אגרסיבית במובייל */
    .doc-table-wrap {
        max-height: none !important;
    }
}

/* Incomes – small polish for mobile */
@media (max-width: 576px) {
    .table .btn {
        font-size: .750rem;
        padding: .35rem .6rem
    }

    .card .h3 {
        font-size: 1.4rem
    }

    .table-responsive.mobile-friendly {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -8px; /* "מותח" מעט את המיכל */
        padding: 0 8px;
    }

    /* עמודת הפעולות – רוחב מינימלי שיכיל את הכפתורים */
    .mobile-friendly .col-actions {
        min-width: 130px; /* אפשר להגדיל מעט אם צריך */
    }

    /* לא לשבור את הטקסט בכפתורים לשתי שורות */
    .mobile-friendly .btn {
        white-space: nowrap;
    }

    /* קצת פחות ריווחים בתאים כדי להרוויח מקום */
    .mobile-friendly table.table td,
    .mobile-friendly table.table th {
        padding: .35rem .35rem;
        font-size: .750rem;
    }
}

.contact-pop-card {
    width: 420px;
    border-radius: 10px;
    --bs-popover-zindex: 5000;
    z-index: 5080;
}

/* פופ־אובר של כרטיס איש קשר – מעל מודל/באקרופ */
.contact-popover {
    --bs-popover-zindex: 5000; /* זה מה שבוטסטראפ קורא בפועל */
    z-index: 5000; /* fallback ליתר ביטחון */
}

.contact-popover {
    --bs-popover-bg: transparent;
    --bs-popover-border-color: transparent;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

    .contact-popover .popover-body {
        padding: 0 !important;
    }

    .contact-popover .popover-arrow,
    .contact-popover .popover-arrow::before,
    .contact-popover .popover-arrow::after {
        display: none !important;
    }





/* מעל מודלים רגילים */
.quickcard {
    width: 440px;
    border-radius: 14px;
}

.qc-avatar {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #e9ecef;
    font-size: 14px;
}

.qc-title {
    font-weight: 600;
}

.qc-subtitle {
    font-size: .875rem;
    color: var(--bs-secondary-color);
}

.qc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem 1.5rem;
}

.qc-field .label {
    font-size: .75rem;
    color: var(--bs-secondary-color);
    margin-bottom: .15rem;
}

.qc-field .value {
    font-size: .9rem;
}

.qc-value-empty {
    color: var(--bs-secondary-color);
    opacity: .7;
}

.qc-divider {
    border-top: 1px solid var(--bs-border-color);
    margin: .6rem 0 .8rem;
}

.qc-chips {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
}

.qc-chip {
    display: inline-flex;
    align-items: center;
    padding: .35rem .6rem;
    border: 1px solid var(--bs-border-color);
    border-radius: .55rem;
    background: var(--bs-light-bg-subtle, #f8f9fa);
    font-size: .85rem;
}
/* לכרטיסי ה-QuickCard שלנו */
.quickcard-popover {
    /* מבטלים מסגרת/רקע/צל של ה-popover */
    --bs-popover-bg: transparent;
    --bs-popover-border-color: transparent;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

    .quickcard-popover .popover-body {
        padding: 0 !important;
    }

    .quickcard-popover .popover-arrow,
    .quickcard-popover .popover-arrow::before,
    .quickcard-popover .popover-arrow::after {
        display: none !important;
    }

/* אופציונלי: מניעת טבעת פוקוס מכוערת על הלינק הטריגר (שיקולי נגישות!) */
[data-preview-kind]:focus {
    outline: none !important;
    box-shadow: none !important;
}
.table td.text-success {
    font-weight: 500;
}

.table td.text-primary {
    font-weight: 500;
}
.chat-window {
    background: #f0f2f5;
    padding: 15px;
    border-radius: 10px;
    max-height: 500px;
    overflow-y: auto;
}

.chat-bubble {
    position: relative;
    padding: 8px 12px;
    border-radius: 18px;
    margin-bottom: 6px;
    max-width: 75%;
    word-wrap: break-word;
    font-size: 0.95rem;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

    .chat-bubble.outgoing {
        background-color: #dcf8c6; /* ירוק בהיר */
        align-self: flex-end;
        border-bottom-right-radius: 0;
    }

    .chat-bubble.incoming {
        background-color: #fff;
        align-self: flex-start;
        border-bottom-left-radius: 0;
    }

.chat-time {
    font-size: 0.75rem;
    color: #777;
    margin-top: 3px;
    text-align: right;
}

.chat-message-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

/* סימון וי */
.chat-tick {
    font-size: 0.8rem;
    margin-left: 4px;
}

    .chat-tick.sent {
        color: gray;
    }

    .chat-tick.delivered {
        color: #4caf50;
    }

    .chat-tick.read {
        color: #2196f3;
    }

/* אזור הטקסט והכפתור */
#sendMessageForm {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

#msgText {
    flex: 1;
    border-radius: 10px;
    border: 1px solid #ccc;
    padding: 8px 12px;
}

    #msgText:focus {
        border-color: #4caf50;
        outline: none;
        box-shadow: 0 0 0 2px rgba(76,175,80,0.2);
    }

select.form-select-sm.w-auto {
    padding-inline-start: 1.8rem !important; /* ריווח מימין */
    padding-inline-end: 1.8rem !important; /* מקום לחץ */
    text-align-last: center; /* טקסט ממורכז */
    direction: rtl; /* תצוגת RTL */
    min-width: 90px; /* רוחב מינימלי */
    font-weight: 600;
}
.select2-results__option {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

input[type="date"], input[type="time"], input[type="datetime-local"] {
    direction: ltr;
    text-align: left;
    font-weight: 600;
    color: #001970;
}

    input[type="date"]::-webkit-calendar-picker-indicator {
        right: 6px;
        cursor: pointer;
    }

.summary-card-4 {
    flex: 0 0 calc(24.5% - 10px); /* 4 בכרך שורה אחת */
    background-color: white;
    border-radius: 12px;
  
    padding: 15px;
    min-width: 180px;
    text-align: center;

  
}

    .summary-card-4:hover {
        transform: translateY(-4px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

.summary-icon {
    font-size: 1.8rem;
    margin-bottom: 0.4rem;
}

.summary-title {
    font-size: 27px;
    font-weight: bold;
    color: black;
}

.summary-value {
    font-size: 40px;
    font-weight: bold;
    color: black;
}

.equal-height-card .summary-card-4 {
    height: 100%;
}

.summary-box {
    padding: 8px 14px 14px 14px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
    min-width: 130px;
}

#enrollForm .btn {
    min-width: 130px; /* אפשר להגדיל ל־140 לפי הצורך */
    white-space: nowrap; /* לא לשבור שורה */
}

    #enrollForm .btn i {
        margin-left: 4px; /* רווח קטן בין האייקון לטקסט */
    }

#isRecurring {
    transform: scale(1.3);
    margin-left: 6px;
    accent-color: #198754; /* ירוק Bootstrap */
}

label[for="isRecurring"] {
    font-weight: 600;
    color: #198754;
    margin-right: 4px;
}

input[type=checkbox] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}
