/* =====================================================================
   ZIV — Design System
   ---------------------------------------------------------------------
   עיצוב אחיד: קווים דקים, צבעים עקביים, אייקונים ברורים.
   פלטה ראשית: כחול (#009ef7) כצבע ראשי, אפור-כהה (#5e6278) כצבע משני.
   ===================================================================== */


:root {
    --ziv-primary:     #009ef7;
    --ziv-success:     #50cd89;
    --ziv-danger:      #f1416c;
    --ziv-warning:     #ffc700;
    --ziv-info:        #7239ea;
    --ziv-dark:        #181c32;
    --ziv-gray-900:    #181c32;
    --ziv-gray-700:    #3f4254;
    --ziv-gray-600:    #5e6278;
    --ziv-gray-500:    #7e8299;
    --ziv-gray-300:    #e1e3ea;
    --ziv-gray-200:    #ebedf3;
    --ziv-gray-100:    #f4f6f9;
    --ziv-border:      #e4e6ef;
    --ziv-bg-soft:     #f9f9fb;
}


/* ===== טקסט ===== */
body { color: var(--ziv-gray-900) !important; }

.text-muted,
.fw-semibold.text-muted,
.text-gray-500, .text-gray-600, .text-gray-700,
small.text-muted, .small.text-muted {
    color: var(--ziv-gray-600) !important;
}

h1, h2, h3, h4, h5, h6,
.fw-bold, .fw-bolder,
label, .form-label {
    color: var(--ziv-gray-900) !important;
}


/* =====================================================================
   כפתורים — קווים דקים, עיצוב נקי
   ===================================================================== */
.btn {
    font-weight: 500;
    border-radius: 6px;
    border-width: 1px !important;
    transition: all 0.15s ease;
}

.btn i, .btn .bi, .btn .ki-duotone,
.btn i[class*="text-"], .btn .bi[class*="text-"] {
    color: inherit !important;
}

.btn i .path1, .btn i .path2, .btn i .path3,
.btn i .path4, .btn i .path5 { fill: currentColor !important; }

/* solid — טקסט לבן */
.btn-primary, .btn-primary i, .btn-primary .bi,
.btn-success, .btn-success i, .btn-success .bi,
.btn-danger,  .btn-danger i,  .btn-danger .bi,
.btn-info,    .btn-info i,    .btn-info .bi,
.btn-dark,    .btn-dark i,    .btn-dark .bi,
.btn-secondary, .btn-secondary i, .btn-secondary .bi {
    color: #ffffff !important;
}

.btn-warning, .btn-warning i, .btn-warning .bi {
    color: var(--ziv-gray-900) !important;
}

/* outline — קווים דקים בצבע הכפתור */
.btn-outline-primary,
.btn-outline-primary i, .btn-outline-primary .bi {
    color: var(--ziv-primary) !important;
    border: 1px solid var(--ziv-primary) !important;
    background: #fff !important;
}
.btn-outline-success,
.btn-outline-success i, .btn-outline-success .bi {
    color: var(--ziv-success) !important;
    border: 1px solid var(--ziv-success) !important;
    background: #fff !important;
}
.btn-outline-danger,
.btn-outline-danger i, .btn-outline-danger .bi {
    color: var(--ziv-danger) !important;
    border: 1px solid var(--ziv-danger) !important;
    background: #fff !important;
}
.btn-outline-warning,
.btn-outline-warning i, .btn-outline-warning .bi {
    color: #b58a00 !important;
    border: 1px solid var(--ziv-warning) !important;
    background: #fff !important;
}
.btn-outline-info,
.btn-outline-info i, .btn-outline-info .bi {
    color: var(--ziv-info) !important;
    border: 1px solid var(--ziv-info) !important;
    background: #fff !important;
}
.btn-outline-secondary,
.btn-outline-secondary i, .btn-outline-secondary .bi {
    color: var(--ziv-gray-700) !important;
    border: 1px solid var(--ziv-gray-300) !important;
    background: #fff !important;
}
.btn-outline-dark,
.btn-outline-dark i, .btn-outline-dark .bi {
    color: var(--ziv-gray-900) !important;
    border: 1px solid var(--ziv-gray-900) !important;
    background: #fff !important;
}

/* outline active/hover */
.btn-outline-primary:hover, .btn-outline-primary.active,
.btn-outline-primary:hover i, .btn-outline-primary.active i,
.btn-outline-primary:hover .bi, .btn-outline-primary.active .bi {
    color: #fff !important;
    background: var(--ziv-primary) !important;
    border-color: var(--ziv-primary) !important;
}
.btn-outline-success:hover, .btn-outline-success.active,
.btn-outline-success:hover i, .btn-outline-success.active i,
.btn-outline-success:hover .bi, .btn-outline-success.active .bi {
    color: #fff !important;
    background: var(--ziv-success) !important;
    border-color: var(--ziv-success) !important;
}
.btn-outline-danger:hover, .btn-outline-danger.active,
.btn-outline-danger:hover i, .btn-outline-danger.active i,
.btn-outline-danger:hover .bi, .btn-outline-danger.active .bi {
    color: #fff !important;
    background: var(--ziv-danger) !important;
    border-color: var(--ziv-danger) !important;
}
.btn-outline-warning:hover, .btn-outline-warning.active,
.btn-outline-warning:hover i, .btn-outline-warning.active i,
.btn-outline-warning:hover .bi, .btn-outline-warning.active .bi {
    color: var(--ziv-gray-900) !important;
    background: var(--ziv-warning) !important;
    border-color: var(--ziv-warning) !important;
}
.btn-outline-secondary:hover, .btn-outline-secondary.active,
.btn-outline-secondary:hover i, .btn-outline-secondary.active i,
.btn-outline-secondary:hover .bi, .btn-outline-secondary.active .bi {
    color: #fff !important;
    background: var(--ziv-gray-600) !important;
    border-color: var(--ziv-gray-600) !important;
}


/* =====================================================================
   Badges — נקיים
   ===================================================================== */
.badge {
    font-weight: 500;
    padding: 0.4em 0.65em;
    border-radius: 4px;
}

.badge.bg-light, .badge.bg-white,
.badge.bg-light-primary, .badge.bg-light-success,
.badge.bg-light-warning, .badge.bg-light-danger, .badge.bg-light-info,
.badge[class*="bg-primary-subtle"], .badge[class*="bg-success-subtle"],
.badge[class*="bg-warning-subtle"], .badge[class*="bg-info-subtle"] {
    color: var(--ziv-gray-900) !important;
}

.badge.bg-primary, .badge.bg-success, .badge.bg-danger,
.badge.bg-info, .badge.bg-dark, .badge.bg-secondary {
    color: #ffffff !important;
}

.badge.bg-primary i,   .badge.bg-primary .bi,
.badge.bg-success i,   .badge.bg-success .bi,
.badge.bg-danger i,    .badge.bg-danger .bi,
.badge.bg-info i,      .badge.bg-info .bi,
.badge.bg-dark i,      .badge.bg-dark .bi,
.badge.bg-secondary i, .badge.bg-secondary .bi {
    color: #ffffff !important;
}

.badge.bg-warning i, .badge.bg-warning .bi {
    color: var(--ziv-gray-900) !important;
}

.badge.bg-warning {
    color: var(--ziv-gray-900) !important;
}


/* =====================================================================
   Cards — קווים דקים אחידים
   ===================================================================== */
.card {
    color: var(--ziv-gray-900);
    border: 1px solid var(--ziv-border) !important;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}

.card-header {
    background: #fff !important;
    border-bottom: 1px solid var(--ziv-border) !important;
    padding: 0.875rem 1rem;
}

.card-header[class*="bg-light"] {
    background: var(--ziv-bg-soft) !important;
}

.card-footer {
    background: var(--ziv-bg-soft) !important;
    border-top: 1px solid var(--ziv-border) !important;
}

.card-title,
.card-header h1, .card-header h2, .card-header h3,
.card-header h4, .card-header h5, .card-header h6 {
    color: var(--ziv-gray-900) !important;
}

.card-header[class*="bg-"] i {
    color: inherit !important;
}

/* כרטיסיות עם פס צד צבעוני - במקום border עבה בכל הכרטיס */
.card.border-primary,
.card.border-success,
.card.border-warning,
.card.border-danger,
.card.border-info,
.card.border-secondary {
    border: 1px solid var(--ziv-border) !important;
    border-right-width: 3px !important;
}
.card.border-primary    { border-right-color: var(--ziv-primary) !important; }
.card.border-success    { border-right-color: var(--ziv-success) !important; }
.card.border-warning    { border-right-color: var(--ziv-warning) !important; }
.card.border-danger     { border-right-color: var(--ziv-danger) !important; }
.card.border-info       { border-right-color: var(--ziv-info) !important; }
.card.border-secondary  { border-right-color: var(--ziv-gray-600) !important; }

/* כרטיסי הלוג עם border-start - להפוך לפס צד דק */
.card.border-start.border-primary,
.card.border-start.border-success,
.card.border-start.border-warning,
.card.border-start.border-danger,
.card.border-start.border-info {
    border: 1px solid var(--ziv-border) !important;
    border-right-width: 3px !important;
}


/* =====================================================================
   Form inputs
   ===================================================================== */
.form-control, .form-select {
    color: var(--ziv-gray-900) !important;
    border: 1px solid var(--ziv-border) !important;
    border-radius: 6px;
}
.form-control:focus, .form-select:focus {
    border-color: var(--ziv-primary) !important;
    box-shadow: 0 0 0 3px rgba(0, 158, 247, 0.12) !important;
}
.form-control::placeholder {
    color: var(--ziv-gray-500) !important;
    opacity: 1;
}


/* =====================================================================
   Tables — קווים דקים, כותרות ברורות
   ===================================================================== */
.table {
    color: var(--ziv-gray-900);
    border-color: var(--ziv-border);
}
.table > :not(caption) > * > * {
    border-bottom-color: var(--ziv-border) !important;
}

/* כותרות טבלה - כל אחת בצבע שלה */
.table thead.bg-secondary,
.table thead.bg-secondary th {
    color: #ffffff !important;
    background-color: var(--ziv-gray-600) !important;
    border-color: var(--ziv-gray-600) !important;
    font-weight: 500;
}

.table thead.bg-primary,
.table thead.bg-primary th {
    color: #ffffff !important;
    background-color: var(--ziv-primary) !important;
    border-color: var(--ziv-primary) !important;
    font-weight: 500;
}

.table thead.bg-success,
.table thead.bg-success th {
    color: #ffffff !important;
    background-color: var(--ziv-success) !important;
    border-color: var(--ziv-success) !important;
    font-weight: 500;
}

.table thead.bg-dark,
.table thead.bg-dark th {
    color: #ffffff !important;
    background-color: var(--ziv-gray-900) !important;
    border-color: var(--ziv-gray-900) !important;
    font-weight: 500;
}

.table thead.bg-info,
.table thead.bg-info th {
    color: #ffffff !important;
    background-color: var(--ziv-info) !important;
    border-color: var(--ziv-info) !important;
    font-weight: 500;
}

.table tbody td {
    color: var(--ziv-gray-900);
    vertical-align: middle;
}

.table-bordered {
    border: 1px solid var(--ziv-border) !important;
}
.table-bordered > :not(caption) > * > * {
    border: 1px solid var(--ziv-border) !important;
}

.table-hover tbody tr:hover {
    background-color: var(--ziv-bg-soft) !important;
}


/* =====================================================================
   Modal
   ===================================================================== */
.modal-content {
    border: 1px solid var(--ziv-border);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}
.modal-header {
    border-bottom: 1px solid var(--ziv-border);
    padding: 1rem 1.25rem;
}
.modal-footer {
    border-top: 1px solid var(--ziv-border);
}
.modal-header, .modal-footer { color: var(--ziv-gray-900); }


/* =====================================================================
   Tabs
   ===================================================================== */
.nav-tabs { border-bottom: 1px solid var(--ziv-border); }
.nav-tabs .nav-link {
    color: var(--ziv-gray-600) !important;
    border: 1px solid transparent;
    border-bottom: none;
}
.nav-tabs .nav-link i { color: inherit !important; }
.nav-tabs .nav-link:hover { color: var(--ziv-primary) !important; }
.nav-tabs .nav-link.active {
    color: var(--ziv-primary) !important;
    border-color: var(--ziv-border) var(--ziv-border) #fff;
    background: #fff;
}


/* =====================================================================
   Progress bar
   ===================================================================== */
.progress {
    background-color: var(--ziv-gray-200);
    border-radius: 100px;
    height: 6px !important;
}
.progress-bar { border-radius: 100px; }


/* =====================================================================
   Tooltip
   ===================================================================== */
.tooltip-inner {
    background-color: var(--ziv-gray-900) !important;
    color: #ffffff !important;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 12px;
}


/* =====================================================================
   "לא נמצאו תוצאות"
   ===================================================================== */
.text-center.text-muted {
    color: var(--ziv-gray-600) !important;
}


/* =====================================================================
   רכיבי נתונים קטנים בתוך כרטיסיות (חוזה / לתשלום / מצטבר / וכו')
   האחדה: רקע אפור-בהיר עם border דק. בלי צבעי משנה.
   ===================================================================== */
.card-body .bg-light,
.card-body .bg-primary-subtle,
.card-body .bg-info-subtle,
.card-body .bg-warning-subtle,
.card-body .bg-success-subtle {
    background: var(--ziv-bg-soft) !important;
    border: 1px solid var(--ziv-border) !important;
    border-radius: 6px;
}


/* =====================================================================
   Hover לכרטיסיי חשבון
   ===================================================================== */
.hm-card {
    transition: all 0.15s ease;
}
.hm-card:hover {
    border-color: var(--ziv-primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 158, 247, 0.15) !important;
}


/* =====================================================================
   border-dashed
   ===================================================================== */
.border-dashed {
    border-style: dashed !important;
    border-color: var(--ziv-border) !important;
}


/* =====================================================================
   סרגל סינון — בלי מסגרות
   ===================================================================== */
.filter-group {
    gap: 4px;
    border: none !important;
    background: transparent;
}

.filter-btn-flush {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--ziv-gray-600) !important;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.filter-btn-flush .ki-duotone {
    color: var(--ziv-gray-600) !important;
    line-height: 1;
}

.filter-btn-flush:hover {
    background: var(--ziv-bg-soft) !important;
    color: var(--ziv-gray-900) !important;
}
.filter-btn-flush:hover .ki-duotone {
    color: var(--ziv-gray-900) !important;
}

.filter-btn-flush.active[data-status="all"] {
    background: var(--ziv-primary) !important;
    color: #fff !important;
}
.filter-btn-flush.active[data-status="all"] .ki-duotone {
    color: #fff !important;
}

.filter-btn-flush.active[data-status="myRespo"] {
    background: var(--ziv-warning) !important;
    color: var(--ziv-gray-900) !important;
}
.filter-btn-flush.active[data-status="myRespo"] .ki-duotone {
    color: var(--ziv-gray-900) !important;
}

.filter-btn-flush.active[data-status="myHandel"] {
    background: var(--ziv-success) !important;
    color: #fff !important;
}
.filter-btn-flush.active[data-status="myHandel"] .ki-duotone {
    color: #fff !important;
}

/* =====================================================================
   שדות תאריך - input type=date מקוריים
   ===================================================================== */
.date-input-group {
    border: 1px solid var(--ziv-border);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.date-input-group .input-group-text {
    background: #fff !important;
    border: none !important;
    padding: 0 12px;
    font-size: 14px;
}
.date-input-group .input-group-text:not(:first-child) {
    border-right: 1px solid var(--ziv-border) !important;
}
.date-input-group .form-control[type="date"] {
    border: none !important;
    box-shadow: none !important;
    background: #fff !important;
    padding: 10px 12px;
    font-size: 14px;
    cursor: pointer;
    color: var(--ziv-gray-900) !important;
    font-family: 'Heebo', sans-serif !important;
    direction: ltr;
    text-align: right;
}
.date-input-group .form-control[type="date"]:focus {
    box-shadow: none !important;
    background: #fff !important;
}

/* האייקון של ה-calendar בדפדפן */
.date-input-group .form-control[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.55;
    padding: 4px;
    transition: opacity 0.15s;
}
.date-input-group .form-control[type="date"]:hover::-webkit-calendar-picker-indicator {
    opacity: 1;
}

/* כפתורי preset */
.date-presets .btn {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
}


.spinner-border { border-width: 2px; }