/* ==========================================================================
   P. ZAFIROPOULOS WORKSPACE — UI v2 Δόση 2: Κοινό Κέλυφος
   Πάνω μπάρα, πλαϊνό μενού, ειδοποιήσεις, παράθυρα φορμών με σταθερό κάτω μέρος,
   μηνύματα/toast, διόρθωση αντίθεσης Safari & μεγέθη 34px σε PC/iPad Pro.
   - Οθόνες Πωλήσεις / Forecast: ΚΑΜΙΑ αλλαγή.
   - Εκτυπώσεις (@media print): ΚΑΜΙΑ αλλαγή.
   - Κινητό (≤760px): συμβατό με rc4-mobile.css.
   ========================================================================== */

/* ---------- 1. Βασική τυπογραφία & κύλιση κελύφους ---------- */
html {
  overflow-x: clip;
}

body {
  font-family: var(--ui-font-sans);
  font-size: var(--ui-text-base);
  line-height: var(--ui-lh-base);
  color: var(--ui-text);
  background: var(--ui-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* ---------- 2. Πλαϊνό μενού (#sidebar) ---------- */
@media (min-width: 901px) {
  .app:not(.sidebar-collapsed) {
    grid-template-columns: var(--ui-sidebar-w) minmax(0, 1fr);
  }
  .app:not(.sidebar-collapsed) #sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
}

#sidebar {
  background: var(--ui-nav-bg);
  color: var(--ui-nav-text);
  border-right: 1px solid #0c2036;
  padding: 12px 10px;
  gap: 10px;
}

#sidebar .collapse-btn {
  min-height: var(--ui-control-h);
  padding: 6px 10px;
  border-radius: var(--ui-radius-md);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  #sidebar .collapse-btn:hover {
    background: var(--ui-nav-bg-hover);
    border-color: rgba(255, 255, 255, 0.28);
    color: #ffffff;
  }
}

#sidebar .collapse-btn:focus-visible {
  outline: 2px solid var(--ui-nav-accent);
  outline-offset: 2px;
}

#sidebar .brand {
  padding: 4px 4px 12px;
  gap: 10px;
  border-bottom: 1px solid var(--ui-nav-border);
}

#sidebar .brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--ui-radius-md);
}

#sidebar .brand b {
  font-size: 13px;
  color: #ffffff;
  letter-spacing: 0.01em;
}

#sidebar .brand small {
  font-size: 11px;
  color: var(--ui-nav-text-muted);
  margin-top: 1px;
}

#sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#sidebar nav details {
  border-radius: var(--ui-radius-md);
}

#sidebar nav summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 10px !important; /* υπερισχύει workspace-friendly.css */
  min-height: var(--ui-control-h-sm);
  border-radius: var(--ui-radius-md);
  font-size: 12px;
  font-weight: 700;
  color: var(--ui-nav-text-muted);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#sidebar nav summary::-webkit-details-marker {
  display: none;
}

#sidebar nav summary::marker {
  content: "";
}

#sidebar nav summary::after {
  content: "▸";
  font-size: 11px;
  color: var(--ui-nav-text-muted);
  transition: transform 0.14s ease;
}

#sidebar nav details[open] > summary {
  color: #ffffff;
}

#sidebar nav details[open] > summary::after {
  transform: rotate(90deg);
  color: var(--ui-nav-accent);
}

@media (hover: hover) {
  #sidebar nav summary:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
  }
}

#sidebar nav details > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 0 6px 8px;
  margin-left: 8px;
  border-left: 1px solid var(--ui-nav-border);
}

#sidebar nav button {
  margin: 0;
  min-height: var(--ui-control-h) !important; /* υπερισχύει workspace-friendly/compact 44px */
  padding: 6px 10px !important;
  border: 1px solid transparent;
  border-radius: var(--ui-radius-md);
  background: transparent;
  color: var(--ui-nav-text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  #sidebar nav button:hover {
    background: var(--ui-nav-bg-hover);
    color: #ffffff;
    border-color: transparent;
  }
}

#sidebar nav button:active {
  background: var(--ui-nav-bg-active);
  color: #ffffff;
}

#sidebar nav button.active,
#sidebar nav button[aria-current="page"] {
  background: var(--ui-nav-bg-active);
  color: var(--ui-nav-text-active);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: inset 3px 0 0 var(--ui-nav-accent) !important;
  font-weight: 700;
}

@media (hover: hover) {
  #sidebar nav button.active:hover,
  #sidebar nav button[aria-current="page"]:hover {
    background: var(--ui-nav-bg-active);
    color: #ffffff;
  }
}

#sidebar nav button:focus-visible,
#sidebar nav summary:focus-visible {
  outline: 2px solid var(--ui-nav-accent);
  outline-offset: 1px;
}

#sidebar .userbox {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--ui-nav-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#sidebar #userName {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  overflow-wrap: anywhere;
}

#sidebar #logoutBtn {
  min-height: 32px !important;
  padding: 5px 10px;
  border-radius: var(--ui-radius-md);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #e2edf7;
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  #sidebar #logoutBtn:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.34);
    color: #ffffff;
  }
}

/* ---------- 3. Πάνω μπάρα (#app main > header) & Breadcrumb ---------- */
#app main {
  padding: 12px 18px 20px;
  min-width: 0;
  overflow-x: clip;
}

#app main > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px !important; /* υπερισχύει workspace-friendly/customer-workspace */
  min-height: var(--ui-topbar-h);
  padding: 8px 14px !important;
  margin: 0 0 8px !important;
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-lg);
  box-shadow: var(--ui-shadow-xs);
}

#app main > header h2#title {
  font-size: 18px !important;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ui-text);
  margin: 0 !important;
}

#app main > header .head-actions {
  display: flex;
  align-items: center;
  gap: 6px !important;
  flex-wrap: wrap;
  justify-content: flex-end;
}

#app main > header .head-actions > [hidden] {
  display: none !important;
}

@media (min-width: 901px) {
  #app main > header .head-actions #menuBtn {
    display: none;
  }
}

#app main > header .head-actions > button:not([hidden]):not(#menuBtn):not(.rc7-tabs-phone),
#app main > header .head-actions #rc2Navigation button,
#app main > header .head-actions #globalSearchBtn,
#app main > header .head-actions .notifications > summary {
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--ui-border-strong);
  border-radius: var(--ui-radius-md);
  background: var(--ui-surface);
  color: var(--ui-text);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}

/* Μέγεθος/κείμενο κουμπιών πάνω μπάρας μόνο σε PC/iPad (≥761px)· στο κινητό (≤760px) ισχύουν οι κανόνες εικονιδίων των workspace-friendly.css & rc4-mobile.css */
@media (min-width: 761px) {
  #app main > header .head-actions > button:not([hidden]):not(#menuBtn):not(.rc7-tabs-phone),
  #app main > header .head-actions #rc2Navigation button,
  #app main > header .head-actions #globalSearchBtn,
  #app main > header .head-actions .notifications > summary {
    display: inline-flex;
    min-height: var(--ui-control-h) !important; /* υπερισχύει workspace-friendly.css .head-actions button / workspace-compact.css pointer:coarse 44px */
    padding: 5px 10px !important; /* υπερισχύει workspace-friendly.css .head-actions button */
    font-size: 12.5px !important; /* υπερισχύει workspace-friendly.css .head-actions button */
  }
}

@media (max-width: 1000px) {
  #app main > header .head-actions > #flowDensity {
    display: none;
  }
}

@media (max-width: 900px) and (min-width: 761px) {
  #app main > header .head-actions #globalSearchBtn {
    font-size: 0 !important; /* διατηρεί workspace-friendly.css @media(max-width:900px) εικονίδιο αναζήτησης */
    padding: 6px !important; /* διατηρεί workspace-friendly.css @media(max-width:900px) */
  }
}

@media (hover: hover) {
  #app main > header .head-actions > button:hover:not(:disabled),
  #app main > header .head-actions #rc2Navigation button:hover:not(:disabled),
  #app main > header .head-actions #globalSearchBtn:hover:not(:disabled),
  #app main > header .head-actions .notifications > summary:hover {
    background: var(--ui-surface-hover);
    border-color: #9db0c7;
    color: var(--ui-text);
  }
}

#app main > header .head-actions > button:focus-visible,
#app main > header .head-actions #rc2Navigation button:focus-visible,
#app main > header .head-actions #globalSearchBtn:focus-visible,
#app main > header .head-actions .notifications > summary:focus-visible {
  outline: none;
  box-shadow: var(--ui-focus-ring);
}

#app main > header .head-actions .badge {
  background: var(--ui-primary-soft);
  color: var(--ui-primary);
  border: 1px solid var(--ui-primary-border);
  border-radius: var(--ui-radius-pill);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}

#app main > header .head-actions #periodBadge {
  font-size: 11.5px;
  font-weight: 600;
  border-radius: var(--ui-radius-pill);
  padding: 4px 10px;
}

#workspaceBreadcrumb {
  font-size: 12px !important;
  color: var(--ui-text-muted);
  margin: 0 0 8px !important;
  padding: 0 2px;
  line-height: 1.35;
}

/* ---------- 4. Ειδοποιήσεις (#nextNotifications / .notifications) ---------- */
#app .head-actions .notifications > summary {
  list-style: none;
  min-width: var(--ui-control-h);
}

#app .head-actions .notifications > summary::-webkit-details-marker {
  display: none;
}

#app .head-actions .notifications > summary::marker {
  content: "";
}

#app .head-actions .notifications[open] > summary {
  background: var(--ui-primary-soft);
  border-color: var(--ui-primary);
  color: var(--ui-primary);
}

#app .head-actions .notifications > div {
  top: calc(100% + 6px);
  width: min(380px, calc(100vw - 24px));
  max-height: 70vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: var(--ui-surface);
  border: 1px solid var(--ui-border-strong);
  border-radius: var(--ui-radius-lg);
  box-shadow: var(--ui-shadow-lg);
  padding: 8px;
  z-index: 1200;
}

#app .head-actions .notifications > div button {
  display: block;
  width: 100%;
  text-align: left;
  min-height: var(--ui-control-h) !important;
  padding: 8px 10px;
  margin: 4px 0;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-md);
  background: var(--ui-surface);
  color: var(--ui-text);
  font-size: 12.5px;
  line-height: 1.4;
  white-space: normal;
  -webkit-tap-highlight-color: transparent;
}

#app .head-actions .notifications > div button.unread {
  background: var(--ui-primary-soft);
  border-color: var(--ui-primary-border);
  border-left: 3px solid var(--ui-primary);
  color: var(--ui-text);
  font-weight: 600;
}

@media (hover: hover) {
  #app .head-actions .notifications > div button:hover {
    background: var(--ui-surface-hover);
    border-color: var(--ui-border-strong);
    color: var(--ui-text);
  }
}

#app .head-actions .notifications > div small {
  color: var(--ui-text-muted);
  font-size: 11.5px;
  font-weight: 400;
  margin-top: 3px;
}

#nextNotifications .rc7-clear-read {
  background: var(--ui-surface-subtle);
  border-color: var(--ui-border-strong);
  color: var(--ui-text-secondary);
  font-weight: 600;
  text-align: center;
}

/* ---------- 5. Παράθυρα φορμών με σταθερή κεφαλίδα & σταθερό κάτω μέρος ---------- */
dialog.crm-dialog[open],
dialog.team-dialog[open],
dialog.workflow-dialog[open] {
  padding: 0;
  border: 1px solid var(--ui-border-strong);
  border-radius: var(--ui-radius-lg);
  background: var(--ui-surface);
  color: var(--ui-text);
  box-shadow: var(--ui-shadow-lg);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

dialog.crm-dialog::backdrop,
dialog.team-dialog::backdrop,
dialog.workflow-dialog::backdrop {
  background: rgba(15, 29, 48, 0.45);
  backdrop-filter: blur(2px);
}

dialog.crm-dialog[open] > header,
dialog.team-dialog[open] > header,
dialog.workflow-dialog[open] > header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 18px;
  margin: 0 !important;
  background: var(--ui-surface);
  border-bottom: 1px solid var(--ui-border);
}

dialog.crm-dialog[open] > header h2,
dialog.team-dialog[open] > header h2,
dialog.workflow-dialog[open] > header h2 {
  font-size: 17px !important;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ui-text);
  margin: 0 !important;
}

dialog.crm-dialog[open] > header button,
dialog.team-dialog[open] > header button,
dialog.workflow-dialog[open] > header button {
  min-height: 32px !important;
  min-width: 32px;
  padding: 4px 10px;
  border: 1px solid var(--ui-border-strong);
  border-radius: var(--ui-radius-md);
  background: var(--ui-surface);
  color: var(--ui-text-secondary);
  font-weight: 600;
}

@media (hover: hover) {
  dialog.crm-dialog[open] > header button:hover,
  dialog.team-dialog[open] > header button:hover,
  dialog.workflow-dialog[open] > header button:hover {
    background: var(--ui-surface-hover);
    color: var(--ui-text);
  }
}

dialog.crm-dialog[open] > form,
dialog.team-dialog[open] > form,
dialog.workflow-dialog[open] > form {
  padding: 16px 18px 0;
  margin: 0;
}

dialog.crm-dialog[open] > :not(header):not(form),
dialog.team-dialog[open] > :not(header):not(form),
dialog.workflow-dialog[open] > :not(header):not(form) {
  padding-left: 18px;
  padding-right: 18px;
}

dialog.crm-dialog[open] .crm-form label,
dialog.team-dialog[open] .crm-form label {
  font-size: 12px !important;
  font-weight: 600;
  color: var(--ui-text-secondary);
}

dialog.crm-dialog[open] .crm-form input:not([type="checkbox"]):not([type="radio"]),
dialog.crm-dialog[open] .crm-form select,
dialog.crm-dialog[open] .crm-form textarea,
dialog.team-dialog[open] .crm-form input:not([type="checkbox"]):not([type="radio"]),
dialog.team-dialog[open] .crm-form select,
dialog.team-dialog[open] .crm-form textarea {
  min-height: var(--ui-control-h);
  padding: 6px 10px;
  border: 1px solid var(--ui-border-strong);
  border-radius: var(--ui-radius-md);
  background: var(--ui-surface);
  color: var(--ui-text);
  font-family: var(--ui-font-sans);
  font-size: var(--ui-text-md);
  line-height: 1.35;
}

dialog.crm-dialog[open] .crm-form input:focus,
dialog.crm-dialog[open] .crm-form select:focus,
dialog.crm-dialog[open] .crm-form textarea:focus,
dialog.team-dialog[open] .crm-form input:focus,
dialog.team-dialog[open] .crm-form select:focus,
dialog.team-dialog[open] .crm-form textarea:focus {
  outline: none;
  border-color: var(--ui-primary);
  box-shadow: var(--ui-focus-ring);
}

/* Σταθερό κάτω μέρος σε κάθε φόρμα διαλόγου — «Αποθήκευση» / «Υποβολή» πάντα ορατά */
dialog.crm-dialog[open] .crm-form-footer,
dialog.team-dialog[open] .crm-form-footer,
dialog.workflow-dialog[open] .crm-form-footer {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  background: var(--ui-surface-subtle);
  border-top: 1px solid var(--ui-border);
  margin: 16px -18px 0 !important; /* υπερισχύει workspace-friendly.css */
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
}

dialog .crm-form-footer > button[type="submit"] {
  min-height: var(--ui-control-h) !important;
  padding: 6px 14px;
  border: 1px solid var(--ui-primary) !important;
  border-radius: var(--ui-radius-md);
  background: var(--ui-primary) !important;
  color: #ffffff !important;
  font-weight: 600;
}

@media (hover: hover) {
  dialog .crm-form-footer > button[type="submit"]:hover:not(:disabled) {
    background: var(--ui-primary-hover) !important;
    border-color: var(--ui-primary-hover) !important;
    color: #ffffff !important;
  }
}

dialog .crm-form-footer > button:not([type="submit"]) {
  min-height: var(--ui-control-h) !important;
  padding: 6px 12px;
  border: 1px solid var(--ui-border-strong);
  border-radius: var(--ui-radius-md);
  background: var(--ui-surface);
  color: var(--ui-text);
  font-weight: 600;
}

@media (hover: hover) {
  dialog .crm-form-footer > button:not([type="submit"]):hover:not(:disabled) {
    background: var(--ui-surface-hover);
    border-color: #9db0c7;
    color: var(--ui-text);
  }
}

/* ---------- 6. Μηνύματα (Toast & σφάλματα φόρμας) ---------- */
.toast {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 1400;
  max-width: min(440px, calc(100vw - 32px));
  background: var(--ui-nav-bg);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-left: 4px solid var(--ui-nav-accent);
  border-radius: var(--ui-radius-md);
  padding: 10px 14px;
  font-family: var(--ui-font-sans);
  font-size: var(--ui-text-base);
  font-weight: 600;
  line-height: 1.4;
  box-shadow: var(--ui-shadow-md);
}

.crm-form-status:not(:empty) {
  flex-basis: 100%;
  margin: 4px 0 0;
  padding: 6px 10px;
  border-radius: var(--ui-radius-sm);
  background: var(--ui-danger-bg);
  border: 1px solid var(--ui-danger-border);
  color: var(--ui-danger-text);
  font-size: 12.5px;
  font-weight: 600;
}

/* ---------- 7. Διόρθωση αντίθεσης Safari (ποτέ λευκά γράμματα σε ανοιχτό φόντο) ---------- */
@media (hover: hover) {
  #app .primary:hover:not(:disabled),
  #app .crm-form button[type="submit"]:hover:not(:disabled),
  #app button[data-crm-action^="new-"]:hover:not(:disabled),
  #app button[data-team="new-task"]:hover:not(:disabled),
  #app .crm-tabs button[aria-selected="true"]:hover,
  #app .cw-customer-tabs button[aria-selected="true"]:hover,
  #app .rc3-tabs button.active:hover,
  #app .rc5-views button.selected:hover,
  #app .team-filter-bar .selected:hover,
  #app .team-tabs .selected:hover,
  #app .svc-primary:hover:not(:disabled),
  #app .svc-tabs button[aria-selected="true"]:hover,
  #app .gf-quick button[aria-pressed="true"]:hover {
    background: var(--ui-primary-hover) !important;
    border-color: var(--ui-primary-hover) !important;
    color: #ffffff !important;
  }

  #app .danger:hover:not(:disabled),
  #app .svc-danger:hover:not(:disabled) {
    background: var(--ui-danger-bg) !important;
    border-color: var(--ui-danger) !important;
    color: var(--ui-danger-text) !important;
  }
}

#app .crm-tabs button[aria-selected="true"]:active,
#app .cw-customer-tabs button[aria-selected="true"]:active,
#app .rc3-tabs button.active:active,
#app .rc5-views button.selected:active,
#app .svc-tabs button[aria-selected="true"]:active,
#app .gf-quick button[aria-pressed="true"]:active {
  background: var(--ui-primary-active) !important;
  color: #ffffff !important;
}

/* ---------- 8. iPad Pro (pointer: coarse + πλάτος ≥761px): κανονικά μεγέθη 34px, ΟΧΙ 44px ---------- */
@media (pointer: coarse) and (min-width: 761px) {
  #sidebar nav button,
  #sidebar .collapse-btn,
  #app main > header .head-actions > button,
  #app main > header .head-actions #rc2Navigation button,
  #app main > header .head-actions #globalSearchBtn,
  #app main > header .head-actions .notifications > summary,
  dialog.crm-dialog[open] .crm-form button,
  dialog.team-dialog[open] .crm-form button {
    min-height: var(--ui-control-h) !important;
  }

  dialog.crm-dialog[open] .crm-form input:not([type="checkbox"]):not([type="radio"]),
  dialog.crm-dialog[open] .crm-form select,
  dialog.crm-dialog[open] .crm-form textarea,
  dialog.team-dialog[open] .crm-form input:not([type="checkbox"]):not([type="radio"]),
  dialog.team-dialog[open] .crm-form select,
  dialog.team-dialog[open] .crm-form textarea {
    min-height: var(--ui-control-h) !important;
    font-size: var(--ui-text-md) !important;
  }
}

/* ---------- 9. Κινητό (≤760px): συμβατότητα με rc4-mobile.css & sticky footer φορμών ---------- */
@media (max-width: 760px) {
  #app main {
    padding: 8px 10px 14px;
  }

  #app main > header {
    gap: 6px !important; /* διατηρεί rc4-mobile.css @media(max-width:760px) */
    padding: 6px 8px !important; /* υπερισχύει workspace-friendly.css main>header padding:0!important */
    min-height: 48px;
    border-radius: var(--ui-radius-md);
  }

  #app main > header .head-actions {
    gap: 4px !important; /* διατηρεί rc4-mobile.css @media(max-width:760px) */
    flex-wrap: nowrap !important; /* διατηρεί rc4-mobile.css @media(max-width:760px) */
  }

  dialog.crm-dialog[open] > form,
  dialog.team-dialog[open] > form {
    padding: 12px 0 0;
  }

  dialog.crm-dialog[open] .crm-form-footer,
  dialog.team-dialog[open] .crm-form-footer {
    position: sticky !important; /* υπερισχύει workspace-friendly.css position:static σε ≤600px */
    bottom: 0;
    margin: 12px -12px 0 !important;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
  }

  dialog.crm-dialog[open] .crm-form input:not([type="checkbox"]):not([type="radio"]),
  dialog.crm-dialog[open] .crm-form select,
  dialog.crm-dialog[open] .crm-form textarea,
  dialog.team-dialog[open] .crm-form input:not([type="checkbox"]):not([type="radio"]),
  dialog.team-dialog[open] .crm-form select,
  dialog.team-dialog[open] .crm-form textarea {
    font-size: 16px !important;
    min-height: 40px;
  }
}

/* ---------- 10. Εκτύπωση: το κέλυφος δεν επηρεάζει καμία εκτύπωση ---------- */
@media print {
  .toast {
    display: none !important;
  }
}

/* ---------- 10. Κινητό (≤760px): ΟΛΑ τα κουμπιά της πάνω μπάρας και το ☰ Μενού ΠΑΝΤΑ ορατά (αναφορά χρήστη 22/11/2026, iPhone) ----------
   Αιτία: τα κουμπιά-κείμενα «Κοινές επισκέψεις (N)» / «Αιτήματα (N)» έσπρωχναν το ☰ έξω από την οθόνη και ο τίτλος χανόταν.
   Λύση: τίτλος στην 1η γραμμή, κουμπιά στη 2η (αναδιπλώνονται αν χρειαστεί), ☰ τελευταίο δεξιά· οι δύο προσκλήσεις γίνονται
   εικονίδιο + αριθμός (ίδια λειτουργία, ίδιο κείμενο στο title). */
@media (max-width: 760px) {
  #app main > header { flex-wrap: wrap !important; row-gap: 6px !important; justify-content: flex-start !important; align-items: center !important; }
  #app main > header > div:first-child { order: 0; flex: 1 1 calc(100% - 52px) !important; min-width: 0 !important; }
  /* τα κουμπιά γίνονται στοιχεία της μπάρας: ☰ στην 1η γραμμή δεξιά του τίτλου, τα υπόλοιπα στη 2η */
  #app main > header .head-actions { display: contents !important; }
  #app main > header .head-actions #menuBtn { order: 1; margin-left: auto !important; }
  #app main > header .head-actions > *:not(#menuBtn) { order: 2; }
  #app main > header .head-actions > .notifications { margin-left: 0 !important; }
  #app main > header .head-actions #cwAlerts,
  #app main > header .head-actions #cwRequestAlerts {
    font-size: 0 !important;
    width: auto !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 8px !important;
    white-space: nowrap;
  }
  #app main > header .head-actions #cwAlerts::before { content: "👥 " attr(data-count); font-size: 13px; font-weight: 700; }
  #app main > header .head-actions #cwRequestAlerts::before { content: "📝 " attr(data-count); font-size: 13px; font-weight: 700; }
}
