/* Πρόγραμμα (/manage/calendar/) — iOS look, scoped to .cal-ios (owner 15/10). */
.cal-ios {
    --ios-bg: #f2f2f7;
    --ios-card: #ffffff;
    --ios-ink: #1c1c1e;
    --ios-sub: #8e8e93;
    --ios-sep: rgba(60, 60, 67, .14);
    --ios-blue: #0a84ff;
    --ios-red: #ff3b30;
    --ios-green: #34c759;
    --ios-orange: #ff9500;
    --ios-fill: rgba(118, 118, 128, .12);
    --fc-border-color: var(--ios-sep);
    --fc-today-bg-color: rgba(10, 132, 255, .05);
    --fc-now-indicator-color: var(--ios-red);
    --fc-neutral-bg-color: #fff;
    --fc-page-bg-color: #fff;
    color: var(--ios-ink);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
    max-width: 100%;
}

.cal-ios .cal-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 0 14px; }
.cal-ios .cal-title { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; margin: 0; line-height: 1.1; }
.cal-ios .cal-sub { color: var(--ios-sub); font-size: .85rem; margin: 4px 0 0; }

.cal-ios .cal-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 12px; padding: 9px 16px; font-weight: 600; font-size: .95rem; cursor: pointer; white-space: nowrap; }
.cal-ios .cal-btn-pri { background: var(--ios-blue); color: #fff; }
.cal-ios .cal-btn-pri:hover { filter: brightness(.95); }
.cal-ios .cal-btn-ghost { background: var(--ios-fill); color: var(--ios-blue); }
.cal-ios .cal-btn-danger { background: rgba(255, 59, 48, .12); color: var(--ios-red); }
.cal-ios .cal-btn-dark { background: var(--ios-ink); color: #fff; }
.cal-ios .cal-btn-ok { background: var(--ios-green); color: #fff; }
.cal-ios .cal-btn-warn { background: rgba(255, 149, 0, .14); color: #b45f00; }
.cal-ios .cal-btn[disabled] { opacity: .55; cursor: default; }
.cal-ios .cal-btn.armed { background: var(--ios-red); color: #fff; }

.cal-ios .cal-bar { background: var(--ios-card); border-radius: 16px; padding: 10px 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 10px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.cal-ios .cal-nav { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cal-ios .cal-ibtn { width: 36px; height: 36px; border-radius: 10px; border: 0; background: var(--ios-fill); color: var(--ios-blue); display: inline-flex; align-items: center; justify-content: center; flex: none; cursor: pointer; }
.cal-ios .cal-ibtn.armed { background: var(--ios-red); color: #fff; }
.cal-ios .cal-today { border: 0; background: var(--ios-fill); color: var(--ios-blue); font-weight: 600; border-radius: 10px; height: 36px; padding: 0 12px; cursor: pointer; }
.cal-ios .cal-range { position: relative; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 1.05rem; padding: 0 6px; margin: 0; cursor: pointer; min-width: 0; }
.cal-ios .cal-range span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ios .cal-range i { color: var(--ios-sub); font-size: .8rem; }
.cal-ios .cal-range input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }

.cal-ios .cal-seg { display: inline-flex; background: var(--ios-fill); border-radius: 10px; padding: 2px; margin-left: auto; }
.cal-ios .cal-seg button { border: 0; background: transparent; color: var(--ios-ink); font-weight: 600; font-size: .88rem; padding: 6px 14px; border-radius: 8px; cursor: pointer; }
.cal-ios .cal-seg button.on { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }

.cal-ios .cal-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-ios .cal-sel { display: inline-flex; align-items: center; gap: 6px; background: var(--ios-fill); border-radius: 10px; padding: 0 8px; height: 36px; margin: 0; color: var(--ios-sub); max-width: 230px; }
.cal-ios .cal-sel select { border: 0; background: transparent; font-weight: 600; color: var(--ios-ink); min-width: 0; max-width: 190px; outline: none; font-size: .9rem; }

.cal-ios .cal-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--ios-sub); font-size: .78rem; margin: 0 4px 10px; }
.cal-ios .cal-legend span { display: inline-flex; align-items: center; gap: 5px; }
.cal-ios .cal-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

.cal-ios .cal-main { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 12px; align-items: start; }
.cal-ios .cal-card { background: var(--ios-card); border-radius: 16px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); overflow: hidden; }
.cal-ios .cal-grid { height: calc(100vh - 250px); min-height: 560px; }
.cal-ios .cal-grid #calendar { height: 100%; }
.cal-ios .cal-wait { position: sticky; top: 80px; }
.cal-ios .cal-wait-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 8px; font-weight: 700; }
.cal-ios .cal-wait-head i { color: var(--ios-orange); margin-right: 6px; }
.cal-ios #waitlistQueuePanel { max-height: calc(100vh - 250px); overflow-y: auto; padding: 0 14px 10px; }
.cal-ios .cal-wl { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: .5px solid var(--ios-sep); font-size: .85rem; }
.cal-ios .cal-wl-n { width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 149, 0, .16); color: #b45f00; font-weight: 700; font-size: .72rem; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.cal-ios .cal-wl-b { flex: 1; min-width: 0; }
.cal-ios .cal-wl-b strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ios .cal-wl-b small { color: var(--ios-sub); }
.cal-ios .cal-wl-r { text-align: right; font-size: .75rem; }
.cal-ios .cal-wl-r button { margin-top: 3px; border: 0; background: rgba(52, 199, 89, .14); color: #1f8a3a; font-weight: 600; border-radius: 8px; padding: 2px 8px; font-size: .72rem; cursor: pointer; }
.cal-ios .cal-empty { color: var(--ios-sub); font-size: .85rem; text-align: center; padding: 12px 0; }

/* FullCalendar inside */
.cal-ios .fc { font-family: inherit; }
.cal-ios .fc .fc-scrollgrid { border: 0; }
.cal-ios .fc-theme-standard td, .cal-ios .fc-theme-standard th { border-color: var(--ios-sep); }
.cal-ios .fc .fc-col-header-cell { background: #fafafa; }
.cal-ios .fc .fc-col-header-cell-cushion { color: var(--ios-sub); text-decoration: none; font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .02em; padding: 8px 4px; }
.cal-ios .fc .fc-timegrid-slot-label-cushion { color: var(--ios-sub); font-size: .75rem; }
.cal-ios .fc .fc-timegrid-slot { height: 2.6em; }
.cal-ios .fc .fc-daygrid-day-number { color: var(--ios-ink); text-decoration: none; }
.cal-ios .fc-v-event, .cal-ios .fc-timegrid-event { background: transparent !important; border: 0 !important; box-shadow: none !important; }
.cal-ios .fc-timegrid-event-harness-inset .fc-timegrid-event { box-shadow: 0 0 0 1px #fff !important; border-radius: 8px; }
.cal-ios .fc-event:focus-visible { outline: 2px solid var(--ios-blue); }

.cal-ios .cal-chip { position: relative; height: 100%; width: 100%; overflow: hidden; border-radius: 8px; background: var(--cbg, #eef4ff); border-left: 3px solid var(--c, var(--ios-blue)); padding: 3px 6px 3px 7px; color: var(--ios-ink); line-height: 1.2; cursor: pointer; }
.cal-ios .cal-chip.dashed { border-left-style: dashed; }
.cal-ios .cal-chip.dotted { border-left-style: dotted; }
.cal-ios .cal-chip::after { content: ""; position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--st, transparent); }
.cal-ios .cal-chip-t { font-size: .66rem; font-weight: 600; color: rgba(28, 28, 30, .65); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 10px; }
.cal-ios .cal-chip-n { font-size: .78rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ios .cal-chip-g { font-weight: 400; opacity: .7; }
.cal-ios .cal-tag { display: inline-block; font-size: .56rem; font-weight: 700; border-radius: 4px; padding: 0 4px; margin-left: 3px; vertical-align: 1px; }
.cal-ios .cal-tag.open { background: #ffd60a; color: #000; }
.cal-ios .cal-tag.wait { background: #5ac8fa; color: #fff; }
.cal-ios .cal-tag.unas { background: var(--ios-orange); color: #fff; animation: cal-pulse 1.5s infinite; }
@keyframes cal-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

.cal-ios .fc-list { border: 0; }
.cal-ios .fc .fc-list-day-cushion { background: var(--ios-bg) !important; padding: 8px 14px; }
.cal-ios .fc .fc-list-day-text, .cal-ios .fc .fc-list-day-side-text { color: var(--ios-ink); text-decoration: none; font-weight: 700; font-size: .88rem; }
.cal-ios .fc .fc-list-table td { padding: 10px 14px; vertical-align: middle; border-color: var(--ios-sep); }
.cal-ios .fc .fc-list-event-time { color: var(--ios-sub); font-size: .85rem; white-space: nowrap; }
.cal-ios .fc .fc-list-event:hover td { background: rgba(10, 132, 255, .04) !important; cursor: pointer; }
.cal-ios .fc .fc-list-empty { background: #fff; color: var(--ios-sub); padding: 3rem 1rem; }
.cal-ios .cal-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cal-ios .cal-row-b { flex: 1; min-width: 0; }
.cal-ios .cal-row-b strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ios .cal-row-b small { color: var(--ios-sub); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ios .cal-pill { font-size: .7rem; font-weight: 600; border-radius: 999px; padding: 2px 8px; white-space: nowrap; color: #fff; background: var(--pc, #8e8e93); flex: none; }

/* Sheets (the modals) */
.cal-ios .cal-sheet .modal-content { border: 0; border-radius: 18px; background: var(--ios-bg); overflow: hidden; }
.cal-ios .cal-sheet .modal-header { border: 0; background: var(--ios-bg); padding: 16px 18px 6px; }
.cal-ios .cal-sheet .modal-title { font-weight: 800; font-size: 1.15rem; }
.cal-ios .cal-sheet .modal-body { padding: 6px 14px 16px; }
.cal-ios .cal-sheet .modal-footer { border: 0; background: var(--ios-bg); padding: 0 14px 16px; }
.cal-ios .cal-group { background: #fff; border-radius: 12px; padding: 4px 12px; margin-bottom: 12px; }
.cal-ios .cal-field { padding: 9px 0; border-bottom: .5px solid var(--ios-sep); }
.cal-ios .cal-field:last-child { border-bottom: 0; }
.cal-ios .cal-field > label { display: block; font-size: .72rem; font-weight: 600; color: var(--ios-sub); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 3px; }
.cal-ios .cal-field input, .cal-ios .cal-field select, .cal-ios .cal-field textarea { width: 100%; border: 0; background: transparent; font-size: .98rem; padding: 2px 0; outline: none; color: var(--ios-ink); box-sizing: border-box; }
.cal-ios .cal-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.cal-ios .cal-row3 { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 0 12px; }
.cal-ios .cal-who { background: #fff; border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.cal-ios .cal-who h3 { font-size: 1.25rem; font-weight: 800; margin: 0 0 6px; }
.cal-ios .cal-actions { display: grid; gap: 8px; }
.cal-ios .cal-actions-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cal-ios .cal-actions .cal-btn, .cal-ios .cal-actions-2 .cal-btn { justify-content: center; width: 100%; padding: 11px 14px; }
.cal-ios .cal-note { font-size: .82rem; margin-top: 8px; }
.cal-ios .searchable-dropdown { position: relative; }
.cal-ios .sd-list { max-height: 220px; overflow-y: auto; border-radius: 12px; border: 0; box-shadow: 0 8px 24px rgba(0, 0, 0, .14); padding: 0; }
.cal-ios .sd-option small { display: block; color: var(--ios-sub); font-size: .72rem; }
.cal-ios .sd-hint { padding: 8px 12px; color: var(--ios-sub); font-size: .8rem; }

/* In-page dialog (no native confirm/alert — some WebViews never show them) */
.cal-ios .cal-dlg { position: fixed; inset: 0; z-index: 10070; background: rgba(0, 0, 0, .35); display: none; align-items: center; justify-content: center; padding: 16px; }
.cal-ios .cal-dlg.open { display: flex; }
.cal-ios .cal-dlg-box { background: rgba(250, 250, 252, .98); border-radius: 14px; width: 100%; max-width: 300px; text-align: center; overflow: hidden; box-shadow: 0 12px 40px rgba(0, 0, 0, .25); }
.cal-ios .cal-dlg-msg { padding: 18px 16px; font-size: .95rem; white-space: pre-line; }
.cal-ios .cal-dlg-acts { display: flex; border-top: .5px solid var(--ios-sep); }
.cal-ios .cal-dlg-acts button { flex: 1; border: 0; background: transparent; padding: 12px; font-size: 1rem; color: var(--ios-blue); cursor: pointer; }
.cal-ios .cal-dlg-acts button + button { border-left: .5px solid var(--ios-sep); font-weight: 600; }
.cal-ios .cal-dlg-acts button.danger { color: var(--ios-red); }
.cal-ios .cal-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: rgba(28, 28, 30, .92); color: #fff; border-radius: 12px; padding: 10px 16px; font-size: .88rem; z-index: 10080; max-width: calc(100% - 32px); }

@media (max-width: 991.98px) {
    .cal-ios .cal-main { grid-template-columns: minmax(0, 1fr); }
    .cal-ios .cal-wait { position: static; }
    .cal-ios #waitlistQueuePanel { max-height: none; }
}
@media (max-width: 767.98px) {
    .cal-ios .cal-title { font-size: 1.7rem; }
    .cal-ios .cal-head .cal-btn span { display: none; }
    .cal-ios .cal-head .cal-btn { padding: 9px 12px; }
    .cal-ios .cal-bar { padding: 8px; gap: 8px; }
    .cal-ios .cal-nav { width: 100%; }
    .cal-ios .cal-range { flex: 1; justify-content: center; font-size: .98rem; }
    .cal-ios .cal-seg { width: 100%; margin-left: 0; }
    .cal-ios .cal-seg button { flex: 1; padding: 6px 4px; }
    .cal-ios .cal-filters { width: 100%; }
    .cal-ios .cal-sel { flex: 1 1 0; max-width: none; }
    .cal-ios .cal-sel select { max-width: 100%; width: 100%; }
    .cal-ios .cal-grid { height: calc(100vh - 230px); min-height: 460px; border-radius: 14px; }
    .cal-ios .fc .fc-list-table td { padding: 9px 10px; }
    .cal-ios .cal-row3 { grid-template-columns: 1fr 1fr; }
    .cal-ios .cal-row3 > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 575.98px) {
    .cal-ios .cal-sheet .modal-dialog { margin: 0; position: fixed; left: 0; right: 0; bottom: 0; max-width: none; width: 100%; transform: none; display: block; min-height: 0; }
    .cal-ios .cal-sheet.fade .modal-dialog { transform: translateY(30px); transition: transform .2s ease-out; }
    .cal-ios .cal-sheet.show .modal-dialog { transform: none; }
    .cal-ios .cal-sheet .modal-content { border-radius: 18px 18px 0 0; max-height: 92vh; overflow-y: auto; }
    .cal-ios .cal-legend { display: none; }
    .cal-ios .cal-row2:has(input[type="datetime-local"]) { grid-template-columns: 1fr; }
}
body.modal-open .ai-chat-fab { display: none !important; }
