/* TPS Frontend Styles */
.tps-fe-wrap { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; direction: rtl; 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-wrap .tps-fe-section-title { font-size: 15px; font-weight: 600; color: #475569; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid #e2e8f0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.4; }
.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: 19px; font-weight: 600; color: #1e293b; margin-bottom: 4px; }
.tps-fe-wrap.tps-fe-profile { padding-top: 16px; }

/* ── Profile header ── */
.tps-fe-profile-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: nowrap;
}
.tps-fe-profile-header > div:nth-child(2) { flex: 1; display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.tps-fe-profile-header-name-block { flex: 1; }
.tps-fe-profile-header-btns { display: flex; gap: 8px; flex-shrink: 0; }
.tps-fe-profile-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.tps-fe-profile-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 500; }
.tps-fe-profile-badge-green { background: #EAF3DE; color: #3B6D11; }
.tps-fe-profile-badge-blue  { background: #E6F1FB; color: #185FA5; }

/* ── Avatar ── */
.tps-fe-profile-avatar-wrap { position: relative; flex-shrink: 0; }
.tps-fe-profile-avatar-img  { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; border: 2.5px solid #B5D4F4; display: block; }
.tps-fe-profile-avatar-placeholder { width: 76px; height: 76px; border-radius: 50%; background: #E6F1FB; border: 2.5px solid #B5D4F4; display: flex; align-items: center; justify-content: center; font-size: 30px; }
.tps-fe-profile-avatar-edit { position: absolute; bottom: 0; left: 0; width: 22px; height: 22px; background: #1e40af; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #fff; }

/* ── 3-column grid ── */
.tps-fe-profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
@media (max-width: 700px) { .tps-fe-profile-grid { grid-template-columns: 1fr; } }
.tps-fe-profile-col {}

/* ── Section title ── */
.tps-fe-profile-sec-title {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 0.5px solid #e2e8f0;
}

/* ── Detail rows ── */
.tps-fe-profile-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: #f1f5f9;
    border-radius: 7px;
    font-size: 12px;
    margin-bottom: 4px;
    color: #64748b;
}
.tps-fe-profile-row span:last-child { color: #1e293b; font-weight: 500; }

/* ── Expiry row (3 cards inline) ── */
.tps-fe-profile-expiry-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 5px;
    margin-bottom: 0;
}

/* ── Availability grid ── */
.tps-fe-profile-avail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}
.tps-fe-profile-avail-item {
    font-size: 11px;
    padding: 4px 8px;
    background: #EAF3DE;
    border-radius: 5px;
    color: #3B6D11;
}

/* ── Bottom: past trainings ── */
.tps-fe-profile-bottom {
    border-top: 0.5px solid #e2e8f0;
    padding-top: 14px;
}
.tps-fe-profile-past-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 24px;
}
.tps-fe-profile-past-item {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
    padding: 5px 0;
    border-bottom: 0.5px solid #f1f5f9;
}
.tps-fe-profile-past-item:last-child { border: none; }
@media (max-width: 700px) { .tps-fe-profile-past-grid { grid-template-columns: 1fr; } }

/* ── Court card inside expiry col ── */
.tps-fe-court-expiry-card.tps-fe-court-full {
    background: #FCEBEB;
    border: 0.5px solid #F7C1C1;
    border-radius: 9px;
    padding: 10px 12px;
    margin-top: 8px;
    font-size: 12px;
}
.tps-fe-court-line1 { margin-bottom: 3px; color: #374151; }
.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: column !important;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 10px 6px !important;
        gap: 3px;
    }
    .tps-fe-ex-label { font-size: 13px !important; }
    .tps-fe-ex-date  { font-size: 16px !important; font-weight: 700; }
    .tps-fe-ex-status { font-size: 13px !important; }
}

/* ── 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: 13px; }
.tps-fe-ex-date   { font-size: 14px; font-weight: 600; }
.tps-fe-ex-status { font-size: 12px; margin-top: 2px; }

/* ── Personal details grid ── */


/* ── 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: 720px; /* ~9 shifts on desktop */
}
.tps-fe-shifts-past .tps-fe-shift-list {
    max-height: 500px;
}
.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: none; /* no scroll on mobile — show all */
        overflow-y: visible;
    }
}

/* 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; }

/* נטרול קונטיינר התמה בעמודי הפלאגין */
body:has(.tps-fe-wrap) .ast-container {
    --container-max: none;
    max-width: none !important;
}

.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; }

/* ════════════════════════════════════
.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-month { font-size: 13px; font-weight: 500; color: #1e293b; width: 90px; min-width: 90px; max-width: 90px; white-space: nowrap; flex-shrink: 0; }

.tps-stats-bar-wrap { flex: 1; background: #e2e8f0; border-radius: 20px; height: 20px; overflow: hidden; }
.tps-stats-bar { height: 100%; border-radius: 20px; display: flex; align-items: center; justify-content: flex-end; padding-left: 8px; min-width: 32px; }
.tps-stats-bar-lbl { font-size: 12px; color: #fff; font-weight: 600; white-space: nowrap; }

.tps-stats-card { background: #f1f5f9; border-radius: 12px; padding: 14px 16px; }
.tps-stats-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 0.5px solid #f1f5f9; }
.tps-stats-row:last-child { border: none; }
.tps-stats-count { font-size: 13px; color: #64748b; min-width: 24px; text-align: center; }
.tps-stats-row.tps-stats-current .tps-stats-month { color: #1e40af; font-weight: 600; }


.tps-stats-avg-label { font-size: 12px; color: #64748b; display: block; margin-bottom: 4px; }
.tps-stats-avg-value { font-size: 18px; font-weight: 500; color: #1e293b; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 0.5px solid #e2e8f0; display: block; }


/* ---- Phonebook ---- */
.tps-fe-wrap.tps-fe-phonebook { padding-top: 16px; }
.tps-pb-search-wrap { margin-bottom: 14px; }
.tps-pb-search {
    width: 25%; padding: 8px 12px; border: .5px solid #e2e8f0; border-radius: 10px;
    font-size: 13px; background: #f8fafc; outline: none; direction: rtl; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.tps-pb-search:focus { border-color: #3b82f6; }
.tps-pb-tabs { display: flex; gap: 0; border-bottom: 1px solid #e2e8f0; margin-bottom: 16px; }
.tps-pb-tab {
    flex: 1; padding: 9px 8px; border: none; border-bottom: 2px solid transparent;
    background: transparent; cursor: pointer; font-size: 13px; font-weight: 400;
    color: #64748b; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; text-align: center;
}
.tps-pb-tab-active { color: #1e40af; border-bottom-color: #1e40af; font-weight: 500; }
.tps-pb-count { font-weight: 400; font-size: 12px; color: #94a3b8; }
.tps-pb-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px;
}
.tps-pb-card {
    background: #fff; border: .5px solid #e2e8f0; border-radius: 12px;
    padding: 12px 14px; display: flex; align-items: center; gap: 12px;
    justify-content: center; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.tps-pb-card-info { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.tps-pb-name { font-size: 14px; font-weight: 500; color: #1e293b; margin-bottom: 2px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.tps-pb-lead { font-weight: 400; font-size: 11px; color: #d97706; }
.tps-pb-rank { font-size: 12px; color: #64748b; margin-bottom: 4px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.tps-pb-phone { font-size: 13px; color: #64748b; margin-bottom: 8px; direction: ltr; text-align: left; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.tps-pb-actions { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.tps-pb-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%; text-decoration: none;
    border: none; cursor: pointer;
}
.tps-pb-icon-call { background: #EFF6FF; color: #1e40af; }
.tps-pb-icon-wa   { background: rgba(37,211,102,.15); color: #16a34a; }
.tps-pb-no-results { text-align: center; color: #9ca3af; padding: 30px; font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
@media (max-width: 600px) {
    .tps-fe-wrap.tps-fe-phonebook { padding: 14px 14px 0 !important; }
    .tps-pb-search-wrap { display: flex; justify-content: flex-end; }
    .tps-pb-search { width: 100% !important; box-sizing: border-box !important; font-size: 14px !important; padding: 8px 12px !important; }
    .tps-pb-count { display: none !important; }
    .tps-pb-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .tps-pb-card {
        text-align: right !important; display: flex !important; align-items: center !important;
        gap: 10px !important; padding: 10px 12px !important; border-radius: 10px !important;
        margin-bottom: 0;
    }
    .tps-pb-photo { flex-shrink: 0 !important; margin: 0 !important; }
    .tps-pb-photo img { width: 53px !important; height: 53px !important; margin: 0 !important; }
    .tps-pb-photo span { width: 53px !important; height: 53px !important; font-size: 22px !important; }
    .tps-pb-name { font-size: 14px !important; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important; }
    .tps-pb-rank { font-size: 12px !important; margin-bottom: 1px !important; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important; }
    .tps-pb-phone { font-size: 13px !important; margin-bottom: 0 !important; text-align: left !important; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important; }
    .tps-pb-actions { margin-top: 0 !important; flex-shrink: 0; gap: 6px; }
    .tps-pb-icon-btn { width: 36px !important; height: 36px !important; }
    .tps-pb-tab { font-size: 13px !important; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important; }
}

/* ---- Phonebook Star ---- */
.tps-pb-star {
    position: absolute; top: -2px; right: -2px;
    font-size: 16px; cursor: pointer; opacity: .35;
    transition: opacity .15s; user-select: none; line-height: 1;
}
.tps-pb-star::before { content: '⭐'; }
.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%; }
    /* לוח משמרות — פונטים קבועים, לא מושפעים מה-130% */
    .tps-fe-wrap .tps-fe-zone-header > span:first-child,
    .tps-fe-wrap .tps-fe-zone-cmd-name,
    .tps-fe-wrap .tps-fe-zone-cmd-label { font-size: 13px !important; }
    .tps-fe-wrap .tps-fe-zone-cmd-label { font-size: 13px !important; color: #94a3b8 !important; }
    .tps-fe-wrap .tps-fe-title { font-size: 1.4em; }
    .tps-fe-wrap .tps-fe-section-title { font-size: 15px !important; }
    .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: 12px;
        padding: 3px 8px;
        margin-bottom: 3px;
    }
}

/* ---- Training cards in profile ---- */
.tps-fe-wrap .tps-fe-training-card {
    background: #fff; border: 1px solid #e2e8f0; border-right: 4px solid #f59e0b;
    border-radius: 8px; padding: 10px 14px; margin-bottom: 8px;
    display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; height: auto;
    direction: rtl; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px; line-height: 1.5;
}
.tps-fe-wrap .tps-fe-training-right { flex: 1; min-width: 0; overflow: hidden; }
.tps-fe-wrap .tps-fe-training-title { font-size: 14px; font-weight: 700; color: #1e3a5f; display: block; margin-bottom: 2px; font-family: inherit; }
.tps-fe-wrap .tps-fe-training-info { font-size: 13px; color: #64748b; display: block; font-family: inherit; }
.tps-fe-wrap .tps-fe-training-loc { font-size: 12px; color: #64748b; margin-top: 2px; font-family: inherit; }
.tps-fe-wrap .tps-fe-training-desc { font-size: 12px; color: #94a3b8; margin-top: 4px; word-break: break-word; overflow-wrap: break-word; white-space: normal; font-family: inherit; }
.tps-fe-wrap .tps-fe-training-rsvp { display: flex; gap: 5px; flex-shrink: 0; align-items: center; }
.tps-fe-wrap .tps-fe-rsvp-btn {
    padding: 4px 10px; border: 1px solid #d1d5db; border-radius: 6px;
    background: #f8fafc; color: #374151; font-size: 12px; font-weight: 600;
    cursor: pointer; transition: all .15s; white-space: nowrap;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.4;
}
.tps-fe-wrap .tps-fe-rsvp-btn:hover { background: #f1f5f9; border-color: #94a3b8; }
.tps-fe-wrap .tps-fe-rsvp-active-coming { background: #dcfce7 !important; border-color: #16a34a !important; color: #166534 !important; }
.tps-fe-wrap .tps-fe-rsvp-active-notcoming { background: #fee2e2 !important; border-color: #dc2626 !important; color: #991b1b !important; }
.tps-fe-wrap .tps-fe-rsvp-active-maybe { background: #fef9c3 !important; border-color: #ca8a04 !important; color: #854d0e !important; }

/* RSVP buttons inside ticker popup (outside .tps-fe-wrap) */
#tps-ticker-item-popup .tps-fe-rsvp-btn {
    padding: 4px 10px; border: 1px solid #d1d5db; border-radius: 6px;
    background: #f8fafc; color: #374151; font-size: 12px; font-weight: 600;
    cursor: pointer; transition: all .15s; white-space: nowrap;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.4;
}
#tps-ticker-item-popup .tps-fe-rsvp-btn:hover { background: #f1f5f9; border-color: #94a3b8; }
#tps-ticker-item-popup .tps-fe-rsvp-active-coming { background: #dcfce7 !important; border-color: #16a34a !important; color: #166534 !important; }
#tps-ticker-item-popup .tps-fe-rsvp-active-notcoming { background: #fee2e2 !important; border-color: #dc2626 !important; color: #991b1b !important; }
#tps-ticker-item-popup .tps-fe-rsvp-active-maybe { background: #fef9c3 !important; border-color: #ca8a04 !important; color: #854d0e !important; }
#tps-ticker-item-popup .tps-fe-training-rsvp { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
#tps-ticker-item-popup .tps-fe-training-card { border-right: 3px solid #f59e0b; padding: 14px; border-radius: 10px; background: #fff; }
.tps-fe-wrap .tps-fe-training-locked { font-size: 12px; color: #6b7280; font-weight: 600; flex-shrink: 0; padding-top: 2px; font-family: inherit; }
.tps-fe-training-counter { transition: transform .15s; }
.tps-fe-training-counter:hover { transform: scale(1.03); }
@media (max-width: 600px) {
    .tps-fe-wrap .tps-fe-training-card { flex-direction: column; align-items: stretch; gap: 8px; }
    .tps-fe-wrap .tps-fe-training-rsvp { justify-content: flex-end; }
    .tps-fe-wrap .tps-fe-rsvp-btn { flex: 1; text-align: center; }
}


/* ── 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;
}


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

    /* ── Layout: סרגל ימים + גוף ── */
    .tps-fe-cal-body-wrap {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        width: 100%;
    }

    /* ── סרגל ימים ── */
    .tps-fe-day-sidebar {
        width: 60px;
        flex-shrink: 0;
        background: #fff;
        border-left: 1px solid #e2e8f0;
        display: flex;
        flex-direction: column;
        padding: 6px 0;
        gap: 4px;
        position: sticky;
        top: 128px;
        align-self: flex-start;
        min-height: calc(100vh - 128px);
    }
    .tps-fe-day-pip {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 5px 4px;
        margin: 0 4px;
        border-radius: 8px;
        cursor: pointer;
        text-decoration: none;
    }
    .tps-fe-day-pip-name {
        font-size: 11px;
        color: #94a3b8;
        margin-bottom: 1px;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    }
    .tps-fe-day-pip-num {
        font-size: 15px;
        font-weight: 500;
        color: #1e293b;
        width: 34px;
        height: 34px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    }
    .tps-fe-day-pip.is-today .tps-fe-day-pip-num {
        background: #1e3a5f;
        color: #fff;
    }
    .tps-fe-day-pip.is-active .tps-fe-day-pip-num {
        background: #e0e7ef;
        color: #1e3a5f;
        font-weight: 600;
    }
    .tps-fe-day-pip-dot {
        width: 80%;
        height: 1px;
        border-radius: 0;
        margin-top: 4px;
        background: #e2e8f0;
    }
    .tps-fe-day-pip.has-shifts .tps-fe-day-pip-dot {
        background: #cbd5e1;
    }

    /* ── גוף הלוח — גלילה אנכית ── */
    .tps-fe-cal-body,
    .tps-fe-cal-body.tps-fe-cal-body-inner {
        flex: 1 !important;
        min-width: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        padding: 8px !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
        scroll-snap-type: none !important;
        -webkit-overflow-scrolling: auto !important;
        touch-action: auto !important;
        grid-template-columns: none !important;
        align-items: stretch !important;
    }

    /* ── כרטיס יום ── */
    .tps-fe-cal-day-outer {
        flex: none !important;
        width: 100% !important;
        min-width: 0 !important;
        scroll-snap-align: none !important;
    }
    .tps-fe-cal-day {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        overflow: hidden !important;
        overflow-y: visible !important;
        border-radius: 14px !important;
        border: 1px solid #e2e8f0 !important;
        background: #fff !important;
        padding-bottom: 6px !important;
    }

    /* ── כותרת יום ── */
    .tps-fe-cal-day-header {
        background: #1e293b !important;
        padding: 9px 14px !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    .tps-fe-day-num {
        font-size: 22px !important;
        font-weight: 500 !important;
        color: #fff !important;
    }
    .tps-fe-day-name {
        font-size: 12px !important;
        font-weight: 400 !important;
        color: rgba(255,255,255,0.75) !important;
    }

    /* ── Zone block — מסגרת ── */
    .tps-fe-cal-zone {
        margin: 6px 8px !important;
        border-radius: 10px !important;
        border: 1px solid #e2e8f0 !important;
        overflow: hidden !important;
        padding: 0 !important;
        background: #fff !important;
    }
    .tps-fe-cal-zone[data-zone="afternoon"],
    .tps-fe-cal-zone[data-zone="night"] {
        border-top: 1px solid #e2e8f0 !important;
    }

    /* ── Zone header ── */
    .tps-fe-zone-header {
        background: #f1f5f9 !important;
        border-bottom: 1px solid #e2e8f0 !important;
        padding: 7px 10px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
        gap: 6px !important;
        min-height: 0 !important;
        text-align: right !important;
        border-top: none !important;
        border-radius: 0 !important;
        font-size: 12px !important;
        font-weight: 500 !important;
    }
    /* שם zone */
    .tps-fe-zone-header > span:first-child {
        font-size: 13px !important;
        font-weight: 500 !important;
        color: #475569 !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        line-height: 1 !important;
    }

    /* ── רמ"ש pill ── */
    .tps-fe-zone-cmd {
        display: inline-flex !important;
        align-items: center !important;
        background: #fff !important;
        border: 1px solid #cbd5e1 !important;
        border-radius: 20px !important;
        padding: 2px 10px !important;
        overflow: hidden !important;
        flex-shrink: 1 !important;
        min-width: 0 !important;
        max-width: 65% !important;
        gap: 4px !important;
        line-height: 1 !important;
    }
    .tps-fe-zone-cmd-label {
        font-size: 13px !important;
        font-weight: 400 !important;
        color: #94a3b8 !important;
        flex-shrink: 0 !important;
        white-space: nowrap !important;
    }
    .tps-fe-zone-cmd-name {
        font-size: 13px !important;
        font-weight: 500 !important;
        color: #1e293b !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        min-width: 0 !important;
    }
    .tps-fe-zone-cmd-btn svg {
        width: 14px !important;
        height: 14px !important;
        flex-shrink: 0 !important;
    }

    /* ── אזור משמרות בתוך zone ── */
    .tps-fe-cal-zone > *:not(.tps-fe-zone-header) {
        padding: 5px 6px 6px !important;
    }
    .tps-fe-no-shifts {
        font-size: 12px !important;
        color: #cbd5e1 !important;
        text-align: center !important;
        padding: 8px !important;
    }

    /* ── כרטיס משמרת ── */
    .tps-fe-shift-card {
        font-size: 13px !important;
        padding: 8px 10px !important;
        border-radius: 8px !important;
        margin-bottom: 5px !important;
        line-height: 1.4 !important;
    }
    .tps-fe-sc-name {
        font-size: 13px !important;
        font-weight: 500 !important;
        color: #1e293b !important;
        margin-bottom: 2px !important;
    }
    .tps-fe-sc-time {
        font-size: 12px !important;
        color: #475569 !important;
        margin-bottom: 4px !important;
        font-weight: 700 !important;
    }
    .tps-fe-dur {
        font-size: 11px !important;
        color: #94a3b8 !important;
        font-weight: 400 !important;
    }
    .tps-fe-member {
        font-size: 12px !important;
        padding: 3px 7px !important;
        border-radius: 6px !important;
        margin-bottom: 2px !important;
        display: block !important;
    }
    .tps-fe-member-officer   { background: #dbeafe !important; color: #1e3a8a !important; }
    .tps-fe-member-volunteer { background: #dcfce7 !important; color: #166534 !important; }
    .tps-fe-sc-location {
        font-size: 11px !important;
        color: #64748b !important;
        margin-top: 4px !important;
    }
    .tps-fe-sc-notes {
        font-size: 11px !important;
        margin-top: 3px !important;
    }
    .tps-fe-wanted-badge {
        font-size: 10px !important;
        padding: 2px 8px !important;
        margin-bottom: 4px !important;
    }

    /* ── הסתרת כפתורי view ישנים שאין בהם צורך ── */
    .tps-fe-cal-day * {
        font-size: inherit !important;
    }

    /* ── toolbar ── */
    .tps-fe-cal-toolbar { flex-wrap: wrap; gap: 6px; }
    .tps-fe-calendar { padding-top: 10px; padding-bottom: 40px; }
    .tps-fe-mgmt-toggle { display: none !important; }
}

/* ── הערת יום — מוסתרת מחוץ לכרטיס במובייל ── */
@media (max-width: 767px) {
    /* notes-wrap נמצא לפני ה-day-card ב-DOM — מסתירים אותו ומציגים דמה בתוך הכרטיס */
    .tps-fe-day-notes-wrap {
        display: none !important;
    }
    /* הצג הערות בתוך ה-day-card דרך JS (ראה buildDaySidebar) */
    .tps-fe-day-notes-inline {
        margin: 6px 8px 4px;
    }
    .tps-fe-cal-day .tps-fe-day-notes-inline .tps-fe-day-note,
    .tps-fe-day-notes-inline .tps-fe-day-note {
        font-size: 13px !important;
        padding: 3px 8px !important;
        margin-bottom: 3px !important;
        background: #fff1b8 !important;
        border: 1px solid #b8860b !important;
        border-radius: 6px !important;
        color: #000 !important;
        text-align: center !important;
        line-height: 1.4 !important;
    }
    /* הסתר כפתורי view במובייל */
    .tps-fe-cal-views { display: none !important; }
    /* toolbar נעול */
    .tps-fe-cal-toolbar {
        position: sticky !important;
        top: 76px !important;
        background: #fff !important;
        z-index: 100 !important;
        border-bottom: 1px solid #e2e8f0 !important;
        padding: 8px 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
    }
    .tps-fe-cal-toolbar .tps-fe-cal-period {
        direction: ltr !important;
        unicode-bidi: embed !important;
    }
}

/* Expiry cards inside profile grid — compact */
.tps-fe-profile-expiry-row .tps-fe-expiry-card { padding: 9px 10px; }
.tps-fe-profile-expiry-row .tps-fe-ex-label  { font-size: 13px !important; }
.tps-fe-profile-expiry-row .tps-fe-ex-date   { font-size: 16px !important; }
.tps-fe-profile-expiry-row .tps-fe-ex-status { font-size: 13px !important; }

/* ── Profile page mobile overrides ── */
@media (max-width: 600px) {
    .tps-fe-wrap.tps-fe-profile { padding-top: 12px; padding-left: 12px; padding-right: 12px; }

    /* Smaller header buttons */
    .tps-fe-profile-header-btns button { font-size: 11px !important; padding: 5px 10px !important; }

    /* Avatar on mobile */
    .tps-fe-profile-avatar-img,
    .tps-fe-profile-avatar-placeholder { width: 86px !important; height: 86px !important; font-size: 34px !important; }
    .tps-fe-profile-avatar-edit { width: 24px !important; height: 24px !important; }
    .tps-fe-profile-name { font-size: 18px !important; }
    .tps-fe-profile-badge { font-size: 14px !important; padding: 5px 12px !important; }

    /* Expiry row: 3 columns, cards vertical */
    .tps-fe-profile-expiry-row { grid-template-columns: 1fr 1fr 1fr; }
    .tps-fe-profile-expiry-row .tps-fe-expiry-card { flex-direction: column !important; align-items: center !important; text-align: center !important; padding: 10px 6px !important; }

    /* Smaller skill tags */
    .tps-fe-tag { font-size: 11px !important; padding: 3px 9px !important; }

    /* Tighter section title */
    .tps-fe-profile-sec-title { font-size: 11px; margin-bottom: 6px; padding-bottom: 4px; }

    /* Rows */
    .tps-fe-profile-row { font-size: 15px !important; padding: 9px 10px !important; }
    .tps-fe-profile-sec-title { font-size: 15px !important; }
    .tps-fe-tag { font-size: 13px !important; padding: 5px 12px !important; }
    .tps-fe-profile-avail-item { font-size: 14px !important; padding: 7px 8px !important; }
}

/* ── Profile actions section ── */
.tps-fe-profile-bottom-wrap {
    max-width: 33%;
}
.tps-fe-profile-actions {
    border-top: 0.5px solid #e2e8f0;
    padding-top: 14px;
    margin-bottom: 14px;
}
.tps-fe-profile-actions-grid {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
}
.tps-fe-action-btn {
    flex: 1;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    text-align: center;
    white-space: nowrap;
}
.tps-fe-action-btn-primary {
    background: #fff;
    color: #1e40af;
    border-color: #1e40af;
}
@media (max-width: 600px) {
    .tps-fe-action-btn { font-size: 14px !important; padding: 10px 4px !important; }
}

/* ── Court summons section ── */
.tps-fe-profile-court-section {
    border-top: 0.5px solid #e2e8f0;
    padding-top: 14px;
    margin-bottom: 14px;
}
.tps-fe-profile-court-standalone {
    max-width: 100%;
}
.tps-fe-court-layout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.tps-fe-court-future { flex: 2; min-width: 0; }
.tps-fe-court-future-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tps-fe-court-past { flex: 1; min-width: 0; }
.tps-fe-court-card-blue {
    background: #E6F1FB;
    border: 0.5px solid #B5D4F4;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 8px;
    direction: rtl;
}
.tps-fe-court-blue-line {
    font-size: 15px;
    color: #0C447C;
    margin-bottom: 4px;
    line-height: 1.5;
}
.tps-fe-court-blue-line:last-child { margin-bottom: 0; }
.tps-fe-court-blue-addr { color: #185FA5; }
.tps-fe-court-addr-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.tps-fe-court-waze-icon { display: none; align-items: center; flex-shrink: 0; }
.tps-fe-court-waze-icon img { display: block; }
@media (max-width: 600px) { .tps-fe-court-waze-icon { display: flex; } }

/* Equipment icons under badges */
.tps-fe-profile-eq-icons { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; align-items: center; }
.tps-fe-profile-eq-pill { font-size: 11px; padding: 2px 8px; background: #f1f5f9; border-radius: 20px; color: #374151; border: 0.5px solid #e2e8f0; }

/* Mobile: court section above expiry via flex order */
.tps-fe-profile-main-area { display: block; }
@media (max-width: 600px) {
    .tps-fe-profile-main-area { display: flex; flex-direction: column; }
    .tps-fe-profile-grid { order: 1; }
    .tps-fe-profile-court-standalone { order: 2; border-top: none; padding-top: 0; margin-top: 0; margin-bottom: 14px; max-width: 100%; }
    .tps-fe-court-layout { flex-direction: column; }
    .tps-fe-court-future { width: 100%; }
    .tps-fe-court-future-grid { grid-template-columns: 1fr; }
    .tps-fe-court-past { width: 100%; }
    .tps-fe-profile-bottom-wrap { max-width: 100%; }
}

/* ── My Shifts mobile layout ── */
@media (max-width: 600px) {
    .tps-fe-wrap.tps-my-shifts { padding: 14px 14px 0 14px !important; }
    .tps-fe-shifts-layout { display: flex !important; flex-direction: column !important; gap: 0 !important; width: 100%; }
    .tps-fe-shifts-stats-col { order: 0; padding: 0 0 14px 0; width: 100%; }
    .tps-fe-shifts-main-col { display: flex; flex-direction: column; width: 100%; }
    .tps-fe-shifts-future { order: 1; padding-bottom: 14px; width: 100%; }
    .tps-fe-shifts-past   { order: 2; padding-bottom: 14px; width: 100%; }
    /* Stats card full width */
    .tps-fe-shifts-stats-col .tps-stats-card { border-radius: 12px; }
    /* Font sizes matching profile page */
    .tps-fe-shifts-stats-col .tps-stats-month { font-size: 15px !important; width: 82px !important; min-width: 82px !important; max-width: 82px !important; white-space: nowrap; flex-shrink: 0; }
    .tps-fe-shifts-stats-col .tps-stats-count { font-size: 15px !important; width: 24px !important; min-width: 24px !important; max-width: 24px !important; text-align: center; flex-shrink: 0; }
    .tps-fe-shifts-stats-col .tps-stats-row { gap: 6px !important; }
    .tps-fe-shifts-stats-col .tps-stats-card { padding: 12px 10px !important; width: 100%; box-sizing: border-box; }
    .tps-fe-shifts-stats-col .tps-stats-bar-wrap { flex: 1 !important; min-width: 0 !important; overflow: hidden; }
    .tps-fe-shifts-stats-col .tps-stats-bar { min-width: 28px; }
    .tps-fe-shifts-stats-col .tps-stats-bar-lbl { font-size: 13px !important; }
    .tps-fe-shifts-stats-col .tps-stats-avg-label { font-size: 13px !important; }
    .tps-fe-shifts-stats-col .tps-stats-avg-value { font-size: 20px !important; }
    .tps-fe-shifts-stats-col .tps-fe-profile-sec-title { font-size: 15px !important; }
    /* Shift rows */
    .tps-fe-shift-date-small { font-size: 15px !important; }
    .tps-fe-shift-time { font-size: 15px !important; }
    .tps-fe-shift-name { font-size: 17px !important; }
    .tps-fe-partners-label, .tps-fe-partner { font-size: 15px !important; }
    .tps-fe-dur { font-size: 13px !important; }
    .tps-fe-shifts-main-col .tps-fe-profile-sec-title { font-size: 15px !important; }
}
.tps-fe-shift-notes { font-size: 12px; color: #64748b; margin-top: 4px; font-style: italic; }

/* ── Events & Trainings page ── */
.tps-fe-wrap.tps-fe-events {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.tps-fe-wrap.tps-fe-events .tps-fe-profile-sec-title {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-size: 15px !important;
}
.tps-fe-ev-card div,
.tps-fe-ev-card a,
.tps-fe-ev-card span:not(.ti),
.tps-fe-ev-title,
.tps-fe-ev-info,
.tps-fe-ev-loc,
.tps-fe-ev-desc,
.tps-fe-ev-maplink,
.tps-fe-rsvp-btn {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}
.tps-fe-ev-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}
@media (max-width: 900px) { .tps-fe-ev-grid { grid-template-columns: 1fr; gap: 0; } }
.tps-fe-ev-col {}
.tps-fe-ev-card {
    background: #fff;
    border: 0.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 8px;
    border-right: 3px solid #ccc;
}
.tps-fe-ev-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    border: 0.5px solid;
    margin-bottom: 6px;
}
.tps-fe-ev-title { font-size: 16px; font-weight: 500; color: #1e293b; margin-bottom: 4px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.tps-fe-ev-info  { font-size: 15px; color: #64748b; margin-bottom: 3px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.tps-fe-ev-loc   { font-size: 14px; color: #64748b; margin-bottom: 3px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.tps-fe-ev-desc  { font-size: 14px; color: #64748b; margin-top: 4px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.tps-fe-ev-badge { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.tps-fe-rsvp-btn { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.tps-fe-ev-maplink { color: #1e40af; font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-weight: 500; text-decoration: none; }
.tps-fe-ev-past { border-top: 0.5px solid var(--color-border-tertiary); padding-top: 14px; }
.tps-fe-ev-past-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.tps-fe-ev-past-item { display: flex; gap: 6px; font-size: 13px; color: #64748b; padding: 5px 0; border-bottom: 0.5px solid #e2e8f0; }
.tps-fe-ev-past-item:last-child { border: none; }
.tps-fe-ev-empty-title,
.tps-fe-ev-empty-sub { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important; }

/* Mobile */
@media (max-width: 600px) {
    .tps-fe-wrap.tps-fe-events { padding: 14px 14px 0 !important; }
    .tps-fe-ev-grid { grid-template-columns: 1fr; gap: 0; }
    .tps-fe-ev-title { font-size: 16px; }
    .tps-fe-ev-info  { font-size: 14px; }
    .tps-fe-ev-loc   { font-size: 13px; }
    .tps-fe-ev-badge { font-size: 12px; }
    .tps-fe-rsvp-btn { font-size: 13px !important; }
    .tps-fe-ev-past-grid { grid-template-columns: 1fr; }
    .tps-fe-ev-col { margin-bottom: 14px; }
}

/* ── Shift Request Popup: Flatpickr altInput styling ── */
#tps-fe-shift-request-popup .flatpickr-input.flatpickr-input[readonly] { display: none; }
#tps-fe-shift-request-popup .flatpickr-input.input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    box-sizing: border-box;
    cursor: pointer;
    background: #fff;
    color: #1e293b;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
#tps-fe-shift-request-popup .flatpickr-input.input:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 2px rgba(30,64,175,0.15);
}
