/* TPS Frontend Styles */
.tps-fe-wrap { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; direction: rtl; max-width: 900px; margin: 0 auto; color: #1e293b; }
.tps-fe-title { font-size: 22px; font-weight: 700; margin-bottom: 16px; color: #1e293b; }
.tps-fe-notice { background: #fef9c3; border: 1px solid #fde047; padding: 12px 16px; border-radius: 8px; color: #713f12; }
.tps-fe-empty { color: #94a3b8; padding: 24px; text-align: center; }
.tps-fe-section { margin-bottom: 24px; }
.tps-fe-section-title { font-size: 15px; font-weight: 600; color: #475569; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid #e2e8f0; }
.tps-fe-summary { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px; padding: 10px 16px; margin-bottom: 20px; font-size: 14px; color: #1e40af; }

/* My Shifts */
.tps-fe-shift-row { display: grid; grid-template-columns: 160px 1fr auto; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 8px; border-right: 4px solid #e2e8f0; margin-bottom: 6px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.06); transition: opacity .2s; }
.tps-fe-past { opacity: .7; }
.tps-fe-shift-date { font-size: 13px; color: #64748b; }
.tps-fe-shift-name { font-size: 14px; font-weight: 600; }
.tps-fe-shift-time { font-size: 13px; color: #475569; white-space: nowrap; }
.tps-fe-dur { color: #94a3b8; font-size: 11px; }

/* Profile */
.tps-fe-profile-name { font-size: 20px; font-weight: 700; margin-bottom: 20px; }
.tps-fe-expiry-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.tps-fe-expiry-card { border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; border: 1px solid #e2e8f0; }
.tps-fe-ex-ok      { background: #f0fdf4; border-color: #86efac; }
.tps-fe-ex-warning { background: #fffbeb; border-color: #fcd34d; }
.tps-fe-ex-expired { background: #fef2f2; border-color: #fca5a5; }
.tps-fe-ex-none    { background: #f8fafc; color: #94a3b8; }
.tps-fe-ex-label   { font-size: 13px; font-weight: 600; }
.tps-fe-ex-date    { font-size: 15px; font-weight: 700; }
.tps-fe-ex-status  { font-size: 12px; }
.tps-fe-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tps-fe-tag { background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 20px; padding: 4px 12px; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.tps-fe-eq-icon { width: 18px; height: 18px; object-fit: contain; }

/* Calendar */
.tps-fe-cal-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.tps-fe-cal-nav, .tps-fe-cal-views { display: flex; align-items: center; gap: 8px; }
.tps-fe-cal-period { font-size: 15px; font-weight: 600; min-width: 180px; text-align: center; }
.tps-fe-btn { background: #fff; border: 1px solid #e2e8f0; border-radius: 6px; padding: 6px 12px; cursor: pointer; font-size: 13px; color: #475569; transition: all .15s; }
.tps-fe-btn:hover { background: #f1f5f9; }
.tps-fe-btn.active { background: #1e40af; color: #fff; border-color: #1e40af; }
.tps-fe-cal-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.tps-fe-cal-day { background: #f8fafc; border-radius: 10px; overflow: hidden; border: 1px solid #e2e8f0; }
.tps-fe-cal-day-header { background: #1e293b; color: #fff; padding: 8px 12px; display: flex; justify-content: space-between; align-items: center; }
.tps-fe-day-name { font-size: 13px; }
.tps-fe-day-num  { font-size: 20px; font-weight: 700; }
.tps-fe-cal-zone { padding: 8px; border-bottom: 1px solid #e2e8f0; }
.tps-fe-cal-zone:last-child { border-bottom: none; }
.tps-fe-cal-zone[data-zone="afternoon"],
.tps-fe-cal-zone[data-zone="night"] { border-top: 2px solid #000; }
.tps-fe-zone-header { display: flex; flex-direction: column; align-items: center; text-align: center; font-size: 13px; font-weight: 700; color: #64748b; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 3px double #d1d5db; }
.tps-fe-zone-cmd { color: #475569; font-weight: 400; }
.tps-fe-no-shifts { color: #cbd5e1; font-size: 12px; text-align: center; padding: 4px; }
.tps-fe-shift-card { background: #fff; border-radius: 8px; border: 3px solid #e2e8f0; border-right: 5px solid #e2e8f0; padding: 6px 8px; margin-bottom: 5px; font-size: 12px; box-shadow: 0 2px 6px rgba(0,0,0,.12); position: relative; overflow: hidden; }
.tps-fe-sc-name { font-weight: 600; margin-bottom: 2px; }
.tps-fe-sc-time { color: #64748b; margin-bottom: 4px; }
.tps-fe-exc { font-size: 11px; }
.tps-fe-member { display: flex; justify-content: space-between; align-items: center; font-size: 11px; padding: 2px 4px; border-radius: 6px; margin-bottom: 2px; }
.tps-fe-member-officer   { background: #dbeafe; color: #1e40af; }
.tps-fe-member-volunteer { background: #dcfce7; color: #166534; }
.tps-fe-icons { display: flex; gap: 2px; }
.tps-fe-icons img { width: 14px; height: 14px; object-fit: contain; }

.tps-fe-loading { text-align: center; padding: 40px; color: #94a3b8; font-size: 14px; }

@media (max-width: 600px) {
    .tps-fe-shift-row { grid-template-columns: 1fr; gap: 4px; }
    .tps-fe-expiry-grid { grid-template-columns: 1fr; gap: 6px; }
    .tps-fe-expiry-card {
        flex-direction: row !important;
        align-items: center;
        justify-content: space-between;
        padding: 10px 14px !important;
        gap: 8px;
    }
    .tps-fe-ex-label { font-size: 13px !important; flex-shrink: 0; }
    .tps-fe-ex-date  { font-size: 13px !important; font-weight: 700; }
    .tps-fe-ex-status { font-size: 12px !important; margin-top: 0 !important; flex-shrink: 0; }
}

/* ── Expiry cards — colored backgrounds ── */
.tps-fe-expiry-card {
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.tps-fe-ex-ok      { background: #dcfce7; color: #166534; }
.tps-fe-ex-warning { background: #fef9c3; color: #854d0e; }
.tps-fe-ex-expired { background: #fee2e2; color: #991b1b; }
.tps-fe-ex-none    { background: #f1f5f9; color: #64748b; }

.tps-fe-ex-label  { font-weight: 700; font-size: 14px; }
.tps-fe-ex-date   { font-size: 15px; font-weight: 600; }
.tps-fe-ex-status { font-size: 13px; margin-top: 2px; }

/* ── Personal details grid ── */
.tps-fe-details-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tps-fe-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.tps-fe-detail-label {
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
}
.tps-fe-detail-value {
    color: #1e293b;
    font-size: 14px;
    font-weight: 500;
}

/* ── Two-column top grid: details right, expiry left ── */
.tps-fe-top-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
}
@media (max-width: 640px) {
    .tps-fe-top-grid {
        grid-template-columns: 1fr;
    }
}

/* ── My Shifts — two-column layout ── */
.tps-fe-shifts-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}
/* RIGHT = shifts, LEFT = stats — in RTL right comes first in DOM */
.tps-fe-shifts-main  { order: 1; }
.tps-fe-shifts-stats { order: 2; }

/* Scrollable shift lists */
.tps-fe-shift-list {
    overflow-y: auto;
    max-height: 300px; /* ~4 shifts on desktop */
}
.tps-fe-shift-list::-webkit-scrollbar { width: 4px; }
.tps-fe-shift-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

@media (max-width: 640px) {
    .tps-fe-shifts-layout { grid-template-columns: 1fr; }
    .tps-fe-shifts-main  { order: 1; }
    .tps-fe-shifts-stats { order: 2; }
    .tps-fe-shift-list {
        max-height: 220px; /* ~3 shifts on mobile */
    }
}

/* Monthly stats */
.tps-fe-monthly-list { display: flex; flex-direction: column; gap: 8px; }
.tps-fe-month-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.tps-fe-month-row.tps-fe-month-current {
    background: #eff6ff;
    border-color: #bfdbfe;
    font-weight: 700;
}
.tps-fe-month-name  { font-size: 14px; color: #1e293b; }
.tps-fe-month-meta  { display: flex; gap: 12px; }
.tps-fe-month-shifts { font-size: 13px; color: #64748b; }
.tps-fe-month-hours  { font-size: 13px; font-weight: 700; color: #1e40af; }

/* Shift row — updated layout */
.tps-fe-shift-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.tps-fe-shift-day        { font-weight: 700; color: #1e293b; font-size: 14px; }
.tps-fe-shift-date-small { font-size: 12px; color: #64748b; }
.tps-fe-shift-time       { font-size: 13px; color: #475569; }
.tps-fe-dur              { color: #94a3b8; font-size: 12px; }

/* Partners */
.tps-fe-shift-partners {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 13px;
}
.tps-fe-partners-label { color: #64748b; font-weight: 600; }
.tps-fe-partners-list  { display: flex; flex-wrap: wrap; gap: 6px; }
.tps-fe-partner {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f1f5f9;
    border-radius: 20px;
    padding: 2px 10px 2px 6px;
    font-size: 13px;
}
/* WhatsApp button */
.tps-fe-wa-btn {
    display: inline-flex;
    align-items: center;
    color: #25d366;
    text-decoration: none;
    transition: opacity .15s;
}
.tps-fe-wa-btn:hover { opacity: .75; }
.tps-fe-wa-btn svg { width: 16px; height: 16px; }

/* ── Status history link ── */
.tps-fe-status-history-link {
    margin-right: 8px;
    color: #94a3b8;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
}
.tps-fe-status-history-link:hover { color: #475569; }

/* ── Modal ── */
.tps-fe-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tps-fe-modal-box {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    overflow: hidden;
    direction: rtl;
}
.tps-fe-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: #1e40af;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
}
.tps-fe-modal-close {
    cursor: pointer;
    font-size: 18px;
    opacity: .8;
}
.tps-fe-modal-close:hover { opacity: 1; }
.tps-fe-modal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.tps-fe-modal-table th,
.tps-fe-modal-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    text-align: right;
}
.tps-fe-modal-table thead th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 700;
    font-size: 12px;
}
.tps-fe-modal-table tbody tr:hover { background: #f8fafc; }



/* Toolbar — views on right, nav on left */
.tps-fe-cal-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: row-reverse;
    padding: 10px 0;
    gap: 12px;
}
.tps-fe-cal-views { display: flex; gap: 6px; }
.tps-fe-cal-nav   { display: flex; align-items: center; gap: 8px; flex-direction: row-reverse; }
.tps-fe-cal-period { font-weight: 600; font-size: 15px; color: #1e293b; }

/* Calendar body — all days in single row */
.tps-fe-cal-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    align-items: start;
    overflow-x: auto;
}
/* Day card outer — holds floating notes + card */
.tps-fe-cal-day-outer {
    position: relative;
    min-width: 0;
}
/* Day card */
.tps-fe-cal-day {
    min-width: 0;
    background: #f8fafc;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}
.tps-fe-cal-day-header {
    background: #1e293b;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 700;
}
.tps-fe-day-num  { font-size: 18px; font-weight: 800; }
.tps-fe-day-name { font-size: 12px; opacity: .85; }

/* Commander on shift card */
.tps-fe-sc-commander {
    font-size: 11px;
    color: #475569;
    margin-bottom: 3px;
}


/* ── Commander pill ── */
.tps-fe-cmd-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    padding: 2px 10px 2px 6px;
    font-size: 11px;
    margin-bottom: 4px;
    text-decoration: none !important;
    color: #1e40af;
    transition: background .15s;
}
.tps-fe-cmd-pill:hover { background: #dbeafe; }
.tps-fe-cmd-pill-nolink { cursor: default; }
.tps-fe-cmd-label { font-weight: 700; color: #64748b; }
.tps-fe-cmd-name  { color: #1e293b; }
.tps-fe-cmd-wa    { width: 13px; height: 13px; color: #25d366; flex-shrink: 0; }

/* ════════════════════════════════════════════════
   Full-bleed calendar — breaks out of Astra
   ════════════════════════════════════════════════ */
.tps-fe-fullbleed {
    width: 100%;
    position: static;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.tps-fe-fullbleed .entry-content,
.tps-fe-fullbleed ~ * { max-width: none; }

.page-id-111 .entry-content,
.page-id-111 .site-main,
.page-id-111 .content-area,
.page-id-111 .ast-container { max-width: 100% !important; width: 100% !important; }

.tps-fe-calendar {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
    margin-bottom: 50px;
}
.tps-fe-cal-body {
    width: 100% !important;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    box-sizing: border-box;
}
.tps-fe-cal-day { min-width: 0; width: 100%; }

/* ── Shift card — RTL alignment ── */
.tps-fe-shift-card {
    text-align: right;
    direction: rtl;
}
.tps-fe-sc-name,
.tps-fe-sc-time,
.tps-fe-sc-members,
.tps-fe-sc-location,
.tps-fe-sc-notes,
.tps-fe-member,
.tps-fe-member-name-row { text-align: right; direction: rtl; }

.tps-fe-sc-location {
    font-size: 11px;
    color: #475569;
    margin-top: 4px;
}
.tps-fe-sc-notes {
    font-size: 11px;
    color: #64748b;
    margin-top: 3px;
    font-style: italic;
}

/* ── Shift card border + RTL fix ── */
.tps-fe-shift-card {
    border: 1px solid #e2e8f0;
    border-right: 3px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.tps-fe-member {
    flex-direction: row-reverse;
    justify-content: flex-end;
    text-align: right;
}
.tps-fe-member-name-row {
    flex-direction: row-reverse;
    justify-content: flex-end;
    width: 100%;
    text-align: right;
}
.tps-fe-icons {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 3px;
    margin-top: 2px;
}

/* ── Member layout: שם + אייקונים RTL ── */
.tps-fe-sc-members { direction: rtl; text-align: right; }
.tps-fe-member {
    display: block !important;
    direction: rtl !important;
    text-align: right !important;
    padding: 3px 4px !important;
    margin-bottom: 3px !important;
    border-radius: 3px;
}
.tps-fe-member-name-row {
    display: block !important;
    direction: rtl !important;
    text-align: right !important;
    width: 100% !important;
    margin-bottom: 2px !important;
}
.tps-fe-member-name-row span { display: inline; }
.tps-fe-icons {
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-end !important;
    flex-wrap: wrap !important;
    gap: 3px !important;
    margin-top: 2px;
}

/* ── Zone commander row ── */
.tps-fe-zone-cmd {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 400;
    white-space: nowrap;
}
.tps-fe-zone-cmd-label { color: #64748b; font-weight: 400; }
.tps-fe-zone-cmd-name  { color: #1e293b; }
.tps-fe-zone-cmd-btn {
    display: inline-flex;
    align-items: center;
    text-decoration: none !important;
    opacity: .85;
    transition: opacity .15s;
}
.tps-fe-zone-cmd-btn:hover { opacity: 1; }

/* ════════════════════════════════════
   סלולר — תצוגה יומית ושבועית
   ════════════════════════════════════ */
@media (max-width: 767px) {

    /* הגדלת פונט ואייקונים */
    .tps-fe-cal-day * { font-size: 18px !important; }
    .tps-fe-zone-cmd { font-size: 14px !important; }
    .tps-fe-cal-day-header span { font-size: 16px !important; }
    .tps-fe-cal-day .tps-eq-icon { width: 22px !important; height: 22px !important; }
    .tps-fe-zone-cmd-btn svg { width: 22px !important; height: 22px !important; }
    .tps-fe-zone-cmd { gap: 10px !important; }

    /* שבועי — פריסה אופקית עם גלילה משותפת */
    .tps-fe-cal-body {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: scroll !important;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        gap: 8px !important;
        padding-bottom: 12px;
        grid-template-columns: none !important;
        align-items: flex-start;
        touch-action: pan-x pan-y pinch-zoom;
    }
    .tps-fe-cal-day-outer {
        flex: 0 0 80vw !important;
        width: 80vw !important;
        min-width: 80vw !important;
        scroll-snap-align: center;
    }
    .tps-fe-cal-day {
        /* no max-height — let page scroll handle vertical */
        overflow-y: visible;
    }

    /* zone header — שורה אחת */
    .tps-fe-zone-header {
        flex-wrap: nowrap;
        font-size: 12px;
    }
    .tps-fe-zone-cmd { font-size: 11px; }

    /* toolbar */
    .tps-fe-cal-toolbar { flex-wrap: wrap; gap: 6px; }
    /* spacing */
    .tps-fe-calendar { padding-top: 10px; padding-bottom: 40px; }
    .tps-fe-cal-period { margin-top: 5px; }
}

/* Court summons frontend */
.tps-fe-court-card {
    background:#eff6ff;border:1px solid #bfdbfe;border-radius:10px;
    padding:14px 16px;margin-bottom:12px;direction:rtl;
}
.tps-fe-court-row { font-size:14px;margin-bottom:4px;color:#1e3a8a; }
.tps-fe-court-label { font-weight:600;color:#1e40af; }

/* Court card inside expiry grid */
.tps-fe-court-expiry-card {
    background:#eff6ff;
    border:1px solid #bfdbfe;
    border-radius:12px;
    padding:14px 16px;
    text-align:right;
}
.tps-fe-court-expiry-card .tps-fe-expiry-label {
    font-size:12px;font-weight:600;color:#1e40af;margin-bottom:8px;
}
.tps-fe-court-line1 {
    font-size:14px;color:#1e3a8a;margin-bottom:6px;line-height:1.6;
}
.tps-fe-court-line2 {
    font-size:14px;color:#1e3a8a;margin-top:4px;line-height:1.5;
}
/* Full-width court card */
.tps-fe-court-full {
    grid-column: 1 / -1;
}

/* ---- Availability Modal ---- */
.tps-fe-modal {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.45); z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.tps-fe-modal-box {
    background: #fff; border-radius: 14px; width: 100%;
    padding: 24px; direction: rtl; max-height: 85vh; overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.tps-fe-modal-header {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 18px; font-weight: 700; color: #000; margin-bottom: 8px;
    background: #9ab3db; padding: 12px 16px; border-radius: 10px;
}
.tps-fe-modal-close {
    cursor: pointer; font-size: 20px; color: #9ca3af; padding: 4px 8px;
    border-radius: 6px; transition: background .15s;
}
.tps-fe-modal-close:hover { background: #f3f4f6; color: #374151; }
.tps-fe-avail-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}
.tps-fe-avail-item {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; border: 1px solid #e2e8f0; border-radius: 8px;
    cursor: pointer; font-size: 14px; color: #374151;
    transition: background .15s, border-color .15s;
}
.tps-fe-avail-item:hover { background: #f0fdf4; border-color: #86efac; }
.tps-fe-avail-item input:checked + span { font-weight: 600; color: #16a34a; }
.tps-fe-avail-item:has(input:checked) { background: #f0fdf4; border-color: #22c55e; }
@media (max-width: 600px) {
    .tps-fe-avail-grid { grid-template-columns: 1fr; }
    .tps-fe-modal-box { padding: 16px; }
}

/* ---- Stats Table + Bar Graph ---- */
.tps-stats-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tps-stats-table thead th { text-align: right; padding: 6px 10px; font-size: 12px; color: #6b7280; font-weight: 600; border-bottom: 2px solid #e2e8f0; }
.tps-stats-table tbody td { padding: 8px 10px; border-bottom: 1px solid #f1f5f9; }
.tps-stats-month { font-weight: 500; white-space: nowrap; color: #374151; }
.tps-stats-bar-cell { width: 50%; }
.tps-stats-bar-wrap { position: relative; background: #f1f5f9; border-radius: 6px; height: 22px; overflow: hidden; }
.tps-stats-bar { height: 100%; border-radius: 6px; min-width: 2px; transition: width .3s ease; }
.tps-stats-bar-num { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 700; color: #1e3a5f; }
.tps-stats-hours { text-align: center; color: #6b7280; font-size: 13px; white-space: nowrap; }
.tps-stats-current td { background: #eff6ff; }
.tps-stats-current .tps-stats-month { font-weight: 700; color: #1e40af; }

/* ---- Stats Average ---- */
.tps-stats-avg { background: #f0f9ff; border: 1px solid #bfdbfe; border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; text-align: center; }
.tps-stats-avg-label { display: block; font-size: 12px; color: #6b7280; margin-bottom: 2px; }
.tps-stats-avg-value { font-size: 16px; font-weight: 700; color: #1e40af; }
.tps-stats-shifts { text-align: center; font-weight: 600; color: #374151; width: 60px; }

/* ---- Phonebook ---- */
.tps-pb-search-wrap { margin-bottom: 16px; }
.tps-pb-search {
    width: 100%; padding: 12px 16px; font-size: 15px; border: 2px solid #e2e8f0;
    border-radius: 10px; direction: rtl; outline: none; transition: border-color .2s;
}
.tps-pb-search:focus { border-color: #3b82f6; }
.tps-pb-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tps-pb-tab {
    flex: 1; padding: 10px 16px; font-size: 15px; font-weight: 600; text-align: center;
    background: #e1e8f2; border: 2px solid #e1e8f2; border-radius: 10px;
    cursor: pointer; color: #000;
}
.tps-pb-tab-active { background: #9ab3db; border-color: #9ab3db; color: #000; }
.tps-pb-count { font-weight: 400; font-size: 13px; }
.tps-pb-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px;
}
.tps-pb-card {
    background: #fff; border: 2px solid #e2e8f0; border-radius: 10px;
    padding: 14px 16px;
}
.tps-pb-name { font-size: 16px; font-weight: 700; color: #1e3a5f; margin-bottom: 4px; }
.tps-pb-lead { font-weight: 400; font-size: 13px; color: #d97706; }
.tps-pb-rank { font-size: 13px; color: #6b7280; margin-bottom: 4px; }
.tps-pb-phone { font-size: 14px; color: #374151; margin-bottom: 8px; direction: ltr; text-align: right; }
.tps-pb-actions { display: flex; gap: 12px; align-items: center; }
.tps-pb-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%; text-decoration: none;
}
.tps-pb-icon-btn svg { width: 24px; height: 24px; }
.tps-pb-icon-call { background: #e8f0fe; }
.tps-pb-icon-call svg { fill: #2563eb; }
.tps-pb-icon-wa { background: #e6f9ee; }
.tps-pb-icon-wa svg { fill: #25D366; }
.tps-pb-no-results { text-align: center; color: #9ca3af; padding: 30px; font-size: 15px; }
@media (max-width: 600px) {
    .tps-pb-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .tps-pb-card { padding: 10px 12px; }
    .tps-pb-name { font-size: 14px; }
    .tps-pb-phone { font-size: 13px; }
    .tps-pb-icon-btn { width: 36px; height: 36px; }
    .tps-pb-icon-btn svg { width: 20px; height: 20px; }
}

/* ---- Phonebook Star ---- */
.tps-pb-card { position: relative; }
.tps-pb-star {
    position: absolute; left: 10px; top: 10px;
    font-size: 18px; cursor: pointer; opacity: .3;
    transition: opacity .15s; user-select: none; line-height: 1;
}
.tps-pb-star:hover { opacity: .7; }
.tps-pb-star-active { opacity: 1 !important; }

/* ---- Prevent auto-link on numbers ---- */
.tps-no-autolink { direction: ltr; unicode-bidi: bidi-override; }
.tps-no-autolink a { pointer-events: none; text-decoration: none; color: inherit; }

/* ---- Mobile font scaling for all shortcodes ---- */
@media (max-width: 768px) {
    .tps-fe-wrap { font-size: 130%; }
    .tps-fe-wrap .tps-fe-title { font-size: 1.4em; }
    .tps-fe-wrap .tps-fe-section-title { font-size: 1.1em; }
    .tps-fe-wrap .tps-fe-detail-label { font-size: 0.85em; }
    .tps-fe-wrap .tps-fe-detail-value { font-size: 0.95em; }
    .tps-fe-wrap .tps-fe-tag { font-size: 0.85em; }
    .tps-fe-wrap .tps-fe-expiry-label { font-size: 0.8em; }
    .tps-fe-wrap .tps-fe-expiry-value { font-size: 1em; }
    .tps-pb-name { font-size: 1.1em; }
    .tps-pb-phone { font-size: 1em; }
    .tps-pb-search { font-size: 1.1em; }
    .tps-pb-tab { font-size: 1em; }
    .tps-stats-table { font-size: 1em; }
    .tps-stats-avg-value { font-size: 1.1em; }
}

/* ---- Contact link in calendar ---- */
.tps-fe-contact-link { cursor: pointer; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 2px; }
.tps-fe-contact-link:hover { color: #2563eb; }

/* ---- Calendar desktop font scaling +30% ---- */
@media (min-width: 769px) {
    .tps-fe-cal-day-header { font-size: 17px; padding: 10px 12px; }
    .tps-fe-day-num { font-size: 23px; }
    .tps-fe-day-name { font-size: 16px; }
    .tps-fe-zone-header { font-size: 14px; }
    .tps-fe-shift-card { font-size: 16px; padding: 8px 10px; }
    .tps-fe-sc-name { font-size: 16px; }
    .tps-fe-sc-time { font-size: 14px; }
    .tps-fe-sc-commander { font-size: 14px; }
    .tps-fe-member { font-size: 14px; }
    .tps-fe-sc-location { font-size: 14px; }
    .tps-fe-sc-notes { font-size: 14px; }
    .tps-fe-no-shifts { font-size: 16px; }
    .tps-fe-zone-cmd-label { font-size: 16px; }
    .tps-fe-zone-cmd-name { font-size: 16px; }
}

/* ---- Commander Report ---- */
.tps-report-card { background: #fff; border: 2px solid #e2e8f0; border-radius: 12px; overflow: hidden; }
.tps-report-header { background: #1e293b; color: #fff; padding: 14px 18px; font-size: 18px; font-weight: 700; text-align: center; border-bottom: 4px double #475569; }
.tps-report-zone { border-bottom: none; padding: 14px 18px; border-top: 3px double #94a3b8; }
.tps-report-zone:first-child { border-top: none; }
.tps-report-zone-title { font-size: 16px; font-weight: 700; color: #1e3a5f; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 2px solid #e2e8f0; }
.tps-report-shift { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 14px; margin-bottom: 8px; }
.tps-report-shift-name { font-size: 15px; font-weight: 700; color: #1e3a5f; margin-bottom: 4px; }
.tps-report-line { font-size: 14px; color: #374151; padding: 2px 0; }
.tps-report-notes { color: #92400e; font-style: italic; }

/* ---- View buttons: mobile only ---- */
@media (min-width: 769px) {
    .tps-fe-daily-btn { display: none !important; }
    .tps-fe-weekly-btn { display: none !important; }
}

/* ---- Day view: full screen on mobile ---- */
@media (max-width: 768px) {
    .tps-fe-calendar[data-current-view="day"] .tps-fe-cal-body {
        display: block !important;
        overflow-x: visible !important;
    }
    .tps-fe-calendar[data-current-view="day"] .tps-fe-cal-day-outer {
        flex: none !important;
        width: 100% !important;
        min-width: 100% !important;
    }
    .tps-fe-calendar[data-current-view="day"] .tps-fe-cal-day {
        flex: none !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        max-height: none !important;
        overflow-y: visible !important;
    }
}

/* ---- Management toggle ---- */
.tps-fe-mgmt-toggle {
    font-size: 13px; color: #64748b; cursor: pointer;
    display: flex; align-items: center; gap: 4px; margin-right: 8px;
}
.tps-fe-mgmt-toggle input { cursor: pointer; }

/* ---- Management shifts toggle ---- */
.tps-fe-shift-mgmt { display: none; }
.tps-fe-mgmt-toggle {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 13px; color: #374151; cursor: pointer;
    padding: 4px 10px; border-radius: 6px; background: #f1f5f9;
}
.tps-fe-mgmt-toggle input { cursor: pointer; }
@media (max-width: 768px) {
    .tps-fe-mgmt-toggle { display: none !important; }
}

/* ---- Day Notes in frontend calendar ---- */
.tps-fe-day-notes-wrap {
    position: static;
    margin: 0 4px 4px;
    z-index: 10;
}
.tps-fe-day-note {
    background: #fff1b8; border: 1px solid #b8860b; border-radius: 4px;
    padding: 3px 8px; margin-bottom: 3px; font-size: 12px; color: #000;
    text-align: center; direction: rtl;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
@media (max-width: 768px) {
    .tps-fe-day-note {
        font-size: 16px;
        padding: 6px 12px;
        margin-bottom: 5px;
    }
}

/* ---- Training cards in profile ---- */
.tps-fe-training-card {
    background: #fff7ed; border: 1px solid #fed7aa; border-right: 5px solid #f59e0b;
    border-radius: 12px; padding: 12px 16px; margin-bottom: 10px;
    display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
    direction: rtl;
}
.tps-fe-training-right { flex: 1; min-width: 200px; }
.tps-fe-training-title { font-size: 16px; font-weight: 700; color: #1e3a5f; display: block; margin-bottom: 2px; }
.tps-fe-training-info { font-size: 14px; color: #6b7280; display: block; }
.tps-fe-training-loc { font-size: 13px; color: #6b7280; margin-top: 2px; }
.tps-fe-training-desc { font-size: 13px; color: #9ca3af; margin-top: 4px; }
.tps-fe-training-rsvp { display: flex; gap: 6px; flex-shrink: 0; }
.tps-fe-rsvp-btn {
    padding: 6px 12px; border: 2px solid #d1d5db; border-radius: 8px;
    background: #fff; color: #374151; font-size: 13px; font-weight: 600;
    cursor: pointer; transition: all .15s; white-space: nowrap;
}
.tps-fe-rsvp-btn:hover { background: #f9fafb; }
.tps-fe-rsvp-active-coming { background: #dcfce7 !important; border-color: #16a34a !important; color: #166534 !important; }
.tps-fe-rsvp-active-notcoming { background: #fee2e2 !important; border-color: #dc2626 !important; color: #991b1b !important; }
.tps-fe-rsvp-active-maybe { background: #fef9c3 !important; border-color: #ca8a04 !important; color: #854d0e !important; }
.tps-fe-training-locked { font-size: 13px; color: #6b7280; font-weight: 600; flex-shrink: 0; }
.tps-fe-training-counter { transition: transform .15s; }
.tps-fe-training-counter:hover { transform: scale(1.03); }
@media (max-width: 768px) {
    .tps-fe-training-card {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .tps-fe-training-right { min-width: 0; }
    .tps-fe-training-title { font-size: 17px; }
    .tps-fe-training-info { font-size: 15px; }
    .tps-fe-training-loc { font-size: 14px; }
    .tps-fe-training-rsvp {
        justify-content: center;
        width: 100%;
    }
    .tps-fe-rsvp-btn { flex: 1; text-align: center; padding: 8px 6px; }
}


/* ── Wanted Shifts — משמרות דרישה ── */
/* "דרוש מתנדב" row inside members list */
.tps-fe-still-needed {
    font-weight: 800;
    color: #92400e;
    font-size: 13px;
    font-style: italic;
    text-align: center;
    padding: 4px 0 0;
    width: 100%;
}

/* Keep normal shift colors — orange badge is enough */
.tps-fe-shift-wanted {
    /* no background override */
}
.tps-fe-wanted-badge {
    display: inline-block;
    background: #d97706;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}
