/* v0.8.1 RC4 — Κινητό & Ειδοποιήσεις. Φορτώνεται τελευταίο.
   Ό,τι είναι μέσα σε @media(max-width:760px) αφορά ΜΟΝΟ κινητό· iPad/PC δεν αλλάζουν.
   Εκτός media: μόνο το κουμπί «← Λίστα» κρυμμένο και ο αριθμός ειδοποιήσεων. */

.rc4-back,.rc4-filter-toggle{display:none}
#nextNotifications>summary[data-rc4-busy]{opacity:.6}

@media(max-width:760px){
 /* Πάνω μπάρα: τίτλος σε μία γραμμή, ίδια κουμπιά */
 #app main>header{flex-wrap:nowrap!important;align-items:center!important;gap:6px!important;margin-bottom:4px!important}
 #app main>header>div:first-child{flex:1 1 auto!important;min-width:0!important;width:auto!important}
 #app main>header h2#title{font-size:17px!important;line-height:1.25!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 #app main>header .head-actions{flex:0 0 auto!important;width:auto!important;gap:4px!important;flex-wrap:nowrap!important;justify-content:flex-end!important}
 #app main>header .head-actions>.notifications>summary,
 #app main>header .head-actions #rc2Navigation button,
 #app main>header .head-actions #globalSearchBtn,
 #app main>header .head-actions #menuBtn{box-sizing:border-box;width:40px!important;min-width:40px!important;height:40px!important;min-height:40px!important;padding:0!important;margin:0!important;display:flex!important;align-items:center;justify-content:center;background:#fff!important;border:1px solid #ccdbe4!important;border-radius:10px!important;box-shadow:none!important;color:#173e78}
 #app main>header .head-actions #rc2Navigation{display:flex;gap:4px}
 #app main>header .head-actions #rc2Navigation [role=status]:empty{display:none}
 #workspaceBreadcrumb{font-size:11px!important;margin:0 0 4px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

 /* Ειδοποιήσεις: αριθμός στο καμπανάκι, λίστα σε όλο το πλάτος της οθόνης */
 #app .head-actions .notifications{position:static!important}
 #app .head-actions .notifications>summary{position:relative;list-style:none;overflow:visible!important;max-width:none!important}
 #app .head-actions .notifications>summary::-webkit-details-marker{display:none}
 #app .head-actions .notifications>summary[data-count]:not([data-count="0"])::before{content:attr(data-count);position:absolute;top:-6px;right:-6px;min-width:18px;height:18px;padding:0 4px;box-sizing:border-box;border-radius:9px;background:#c0392b;color:#fff;font:700 11px/18px system-ui,-apple-system,sans-serif;text-align:center}
 #app .head-actions .notifications>div{position:fixed!important;left:8px!important;right:8px!important;top:calc(env(safe-area-inset-top,0px) + 64px)!important;width:auto!important;max-width:none!important;max-height:calc(100dvh - 90px)!important;overflow:auto!important;-webkit-overflow-scrolling:touch;z-index:1200!important;box-sizing:border-box}
 #app .head-actions .notifications button{font-size:14px;padding:10px 12px;min-height:48px}

 /* Λίστα ή εγγραφή: όταν είναι ανοιχτή εγγραφή, κρύβονται λίστα και φίλτρα */
 .rc4-back{display:inline-flex;align-items:center;gap:4px;margin:0 0 10px;min-height:40px;padding:0 14px;border:1px solid #cad8eb;border-radius:8px;background:#e9f0fa;color:#173e78;font-weight:700}
 body.rc4-detail #workRoot .work-split>.work-list,
 body.rc4-detail #workRoot>.work-toolbar,
 body.rc4-detail #workRoot>.work-filters,
 body.rc4-detail #workRoot>.hub-filters,
 body.rc4-detail #workRoot>.cw-filters,
 body.rc4-detail #workRoot>.rc2-status-filters,
 body.rc4-detail #teamRoot .team-work-layout>.team-list,
 body.rc4-detail #teamRoot>.team-page-heading,
 body.rc4-detail #teamRoot>.team-filter-bar,
 body.rc4-detail #teamRoot>.team-toolbar,
 body.rc4-detail #teamRoot>.team-extra-filters{display:none!important}
 #app .work-split,#app .team-work-layout{display:block!important}
 #app .work-split>.work-list{position:static!important;max-height:none!important;overflow:visible!important}
 #app .work-detail,#app .team-detail{padding:12px!important;border-radius:10px!important}
 body:not(.rc4-detail) #workRoot .work-split>.work-detail:has(>.work-empty:only-child),
 body:not(.rc4-detail) #workRoot .work-split>.work-detail:has(>p:only-child){display:none!important}

 /* Φίλτρα: μία στήλη, κρυμμένα πίσω από «Φίλτρα (N)» — η αναζήτηση μένει ορατή */
 #app .hub-filters,#app .crm-filters,#app .work-filters,#app .cw-filters{grid-template-columns:minmax(0,1fr)!important;gap:8px!important}
 #app .rc4-filterable>:not(.rc4-filter-toggle){display:none!important}
 #app .rc4-filterable>:has(input[type=search]),
 #app .rc4-filterable>:has(input[type=text]),
 #app .rc4-filterable>:has(input:not([type])),
 #app .rc4-filterable.rc4-open>*{display:grid!important}
 #app .rc4-filterable.rc4-open>button:not(.rc4-filter-toggle){display:inline-flex!important}
 #app .rc4-filter-toggle{display:inline-flex!important;align-items:center;justify-self:start;min-height:40px;padding:0 14px;border:1px solid #cad8eb;border-radius:8px;background:#fff;color:#173e78;font-weight:600}
 #app .rc4-filter-toggle.rc4-active{background:#e9f0fa;border-color:#173e78}

 /* Καρτέλες έργου σε μία γραμμή που σύρεται οριζόντια */
 #crmRoot .crm-tabs{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto;-webkit-overflow-scrolling:touch;gap:6px;padding-bottom:4px;scrollbar-width:none}
 #crmRoot .crm-tabs::-webkit-scrollbar{display:none}
 #crmRoot .crm-tabs>button{flex:0 0 auto;white-space:nowrap}
 #crmRoot>.crm-actions:has(>[data-crm-action=back]){position:sticky;top:0;z-index:5;background:#f3f6fa;padding:4px 0;margin:0}

 /* Πίνακες ως κάρτες «Ετικέτα: τιμή» (μόνο πίνακες χωρίς πεδία επεξεργασίας, ποτέ ο πίνακας Πωλήσεων) */
 #app .crm-table-scroll:has(table.rc4-cards){overflow:visible!important;border:0!important;background:transparent!important}
 #app table.rc4-cards{display:block!important;min-width:0!important;width:100%!important;border:0}
 #app table.rc4-cards thead{display:none!important}
 #app table.rc4-cards tbody{display:grid!important;gap:8px}
 #app table.rc4-cards tr{display:block!important;background:#fff;border:1px solid #d7e0ed;border-radius:10px;padding:8px 10px}
 #app table.rc4-cards td{display:grid!important;grid-template-columns:minmax(90px,38%) minmax(0,1fr);gap:8px;min-width:0!important;max-width:none!important;width:auto!important;padding:5px 0!important;border:0!important;border-bottom:1px solid #eef2f7!important;overflow-wrap:anywhere;text-align:left!important;position:static!important}
 #app table.rc4-cards td:last-child{border-bottom:0!important}
 #app table.rc4-cards td::before{content:attr(data-label);font-size:12px;font-weight:600;color:#587083;overflow-wrap:anywhere;min-width:0}
 #app table.rc4-cards td:not([data-label])::before,#app table.rc4-cards td[data-label=""]::before{content:none}
 #app table.rc4-cards td:not([data-label]),#app table.rc4-cards td[data-label=""]{grid-template-columns:minmax(0,1fr)}

 /* Κουμπιά ενεργειών: τυλίγονται, δεν βγαίνουν από την οθόνη */
 #app .crm-actions{flex-wrap:wrap!important}
 #app .crm-actions>button{max-width:100%;white-space:normal}

 /* Φόρμες: πλήρης οθόνη, τίτλος/κλείσιμο πάνω και αποθήκευση κάτω πάντα ορατά */
 dialog.crm-dialog[open],dialog.team-dialog[open]{width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;margin:0!important;border:0!important;border-radius:0!important;padding:0 12px!important;box-sizing:border-box}
 dialog.crm-dialog[open]>header,dialog.team-dialog[open]>header{position:sticky;top:0;z-index:3;background:#fff;padding-top:calc(env(safe-area-inset-top,0px) + 8px)!important;padding-bottom:6px!important;margin:0 -12px!important;padding-left:12px!important;padding-right:12px!important;border-bottom:1px solid #e2e8f2}
 dialog.crm-dialog[open]>header h2,dialog.team-dialog[open]>header h2{font-size:17px!important;line-height:1.25}
 dialog.crm-dialog[open] .crm-form-footer,dialog.team-dialog[open] .crm-form-footer{position:sticky;bottom:0;z-index:3;background:#fff;margin:0 -12px!important;padding:8px 12px calc(env(safe-area-inset-bottom,0px) + 8px)!important;border-top:1px solid #e2e8f2}
 dialog input,dialog select,dialog textarea{font-size:16px!important}

 /* Χωρίς οριζόντιο scroll σελίδας */
 #app main,#workRoot,#teamRoot,#crmRoot,#homeRoot{overflow-x:hidden}
 #app img,#app video{max-width:100%;height:auto}
}
