/**
 * portal-business.css — עיצוב פורטל חברה
 * BP.CSS | portal/business/assets/css/portal-business.css
 * CSS Variables בלבד — RTL
 */

/* ══ Layout — זהה לאדמין ══ */

/* header fixed — זהה לאדמין */
#gm-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
}

/* shell — מתחת לheader, flex row */
#gm-shell {
    position: fixed !important;
    top: var(--header-h, 64px) !important;
    left: 0 !important; right: 0 !important; bottom: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    overflow: hidden !important;
}

/* sidebar — עמוד שלם, ימין */
#gm-sidebar {
    height: 100% !important;
    flex-shrink: 0 !important;
}

/* content-wrap — ממלא את כל השטח */
.gm-content-wrap {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    overflow: hidden !important;
    height: 100% !important;
}

/* main — גלילה פנימית */
.gm-content-wrap main,
.gm-content-wrap .gm-main {
    flex: 1 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: var(--space-6, 1.5rem) !important;
}

/* ══ כרטיסי סטטיסטיקה ══ */
.bp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.bp-stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    transition: box-shadow 0.2s;
}
.bp-stat-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }

.bp-stat-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius-lg);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.bp-stat-icon--blue   { background: #dbeafe; color: #2563eb; }
.bp-stat-icon--green  { background: #dcfce7; color: #16a34a; }
.bp-stat-icon--orange { background: #ffedd5; color: #ea580c; }
.bp-stat-icon--purple { background: #f3e8ff; color: #9333ea; }

.bp-stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1;
}
.bp-stat-label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 4px;
}

/* ══ סקשן כללי ══ */
.bp-section {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin-bottom: var(--space-6);
}

.bp-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}

.bp-section-title {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

/* ══ טבלה ══ */
.bp-table-wrap { overflow-x: auto; }

.bp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.bp-table th {
    text-align: right;
    padding: var(--space-2) var(--space-3);
    border-bottom: 2px solid var(--color-border);
    color: var(--color-text-muted);
    font-weight: 600;
    white-space: nowrap;
}
.bp-table td {
    padding: var(--space-3);
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
}
.bp-table tr:last-child td { border-bottom: none; }
.bp-table tr:hover td { background: var(--color-bg); }

/* ══ badges ══ */
.bp-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.bp-badge-warning { background: #fff3cd; color: #856404; }
.bp-badge-info    { background: #cfe2ff; color: #0a58ca; }
.bp-badge-primary { background: #d1ecf1; color: #0c5460; }
.bp-badge-success { background: #d4edda; color: #155724; }
.bp-badge-danger  { background: #f8d7da; color: #721c24; }
.bp-badge-muted   { background: var(--color-border); color: var(--color-text-muted); }

/* ══ ETA badge ══ */
.bp-eta-badge {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: #dbeafe;
    color: #1e40af;
    padding: 4px 12px;
    border-radius: var(--radius-lg);
    font-size: 0.85rem;
}

/* ══ מפה ריקה ══ */
.bp-map-empty {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    padding: var(--space-3) 0 0;
}

/* ══ רספונסיביות ══ */
@media (max-width: 640px) {
    .bp-stats-grid { grid-template-columns: 1fr 1fr; }
    .bp-stat-value { font-size: 1.3rem; }
}
@media (max-width: 400px) {
    .bp-stats-grid { grid-template-columns: 1fr; }
}

/* ══ טופס הזמנה ══ */
.bp-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}
.bp-form-full { grid-column: 1 / -1; }

.bp-form-group { display: flex; flex-direction: column; gap: var(--space-2); }

.bp-label {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
}
.bp-label .material-symbols-outlined { font-size: 16px; color: var(--color-text-muted); }

.bp-input {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.bp-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb, 59,130,246), 0.15);
}
.bp-textarea { resize: vertical; min-height: 80px; }

.bp-checkbox-row { display: flex; gap: var(--space-5); flex-wrap: wrap; }
.bp-checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.875rem;
    cursor: pointer;
}
.bp-checkbox input { width: 16px; height: 16px; cursor: pointer; }

.bp-form-actions {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-6);
    padding-top: var(--space-5);
    border-top: 1px solid var(--color-border);
}

/* ══ alerts ══ */
.bp-alert {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-4);
    font-size: 0.9rem;
}
.bp-alert-danger  { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.bp-alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }

/* ══ רספונסיביות טופס ══ */
@media (max-width: 640px) {
    .bp-form-grid { grid-template-columns: 1fr; }
    .bp-form-full { grid-column: 1; }
    .bp-form-actions { flex-direction: column; }
}

/* ══ פילטרים ══ */
.bp-filters {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}
.bp-filter-select,
.bp-filter-date { max-width: 200px; }

/* ══ עימוד ══ */
.bp-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border);
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* ══ הדפסה ══ */
@media print {
    #gm-sidebar, #gm-header, .gm-page-header button,
    .bp-filters, .bp-pagination { display: none !important; }
    .gm-shell { display: block; }
    .gm-content-wrap { margin: 0; padding: 0; }
    .bp-section { box-shadow: none; border: 1px solid #ccc; }
}

/* ══ הסתרה ══ */
.bp-hidden { display: none !important; }

/* ══ settings grid ══ */
.bp-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

/* ══ info rows (קריאה בלבד) ══ */
.bp-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.875rem;
}
.bp-info-row:last-of-type { border-bottom: none; }
.bp-info-label { color: var(--color-text-muted); }
.bp-info-value { font-weight: 600; color: var(--color-text); }

.bp-readonly-note {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    margin-top: var(--space-3);
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-style: italic;
}

/* ══ רספונסיביות settings ══ */
@media (max-width: 768px) {
    .bp-settings-grid { grid-template-columns: 1fr; }
}

/* ══ כוכבי דירוג ══ */
.bp-stars { color: #f59e0b; font-size: 1.1rem; letter-spacing: 2px; }

.bp-star-input { display: flex; gap: 4px; }

.bp-star-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: #d1d5db;
    padding: 0;
    transition: color 0.1s;
    line-height: 1;
}
.bp-star-btn:hover,
.bp-star-active { color: #f59e0b; }

.bp-rate-form { display: flex; flex-direction: column; gap: 4px; }

/* ══ support grid ══ */
.bp-support-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-4);
}

@media (max-width: 768px) {
    .bp-support-grid { grid-template-columns: 1fr; }
}
