/* BEAM Toolkit backend UI (login, clients, sync, follow-up) */

/* ---- Login overlay ---- */
#btm-login {
  display: none; position: fixed; inset: 0; z-index: 400;
  background: rgba(15, 23, 42, 0.82); backdrop-filter: blur(4px);
  place-items: center; padding: 20px;
}
#btm-login.show { display: grid; }
.btm-login-card {
  width: min(400px, 100%); background: #fff; border-radius: 18px; padding: 26px 24px;
  box-shadow: 0 30px 80px rgba(15,23,42,.45); color: #1e293b;
}
.btm-login-card h2 { margin: 12px 0 6px; font-size: 1.25rem; }
.btm-login-card .hint { color: #64748b; font-size: .85rem; margin: 0 0 16px; }
.btm-login-card label { display: block; font-size: .8rem; font-weight: 700; color: #475569; margin-bottom: 10px; }
.btm-login-card input {
  width: 100%; margin-top: 4px; padding: .6rem .7rem; border: 1px solid #cbd5e1;
  border-radius: 9px; font-size: .95rem;
}
.btm-login-card input:focus { outline: 2px solid #38bdf8; border-color: #38bdf8; }
.btm-login-card .btn-main {
  width: 100%; margin-top: 6px; padding: .7rem; border: 0; border-radius: 10px;
  background: #0f172a; color: #fff; font-weight: 700; cursor: pointer;
}
.btm-login-card .btn-main:disabled { opacity: .6; cursor: wait; }
.btm-login-card .btn-link {
  width: 100%; margin-top: 10px; background: none; border: 0; color: #2563eb;
  font-size: .82rem; cursor: pointer; text-decoration: underline;
}
.btm-login-foot { margin-top: 16px; text-align: center; font-size: .7rem; color: #94a3b8; }

/* ---- User badge (μέσα στο sidebar footer) ---- */
#btm-user-badge {
  display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
  margin: 0 0 .5rem; padding: .45rem .55rem;
  background: #0f172a; color: #e2e8f0; border: 1px solid #334155;
  border-radius: 10px; font-size: .74rem; font-weight: 700;
}
#btm-user-badge .uname { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#btm-user-badge .role { color: #34d399; font-size: .62rem; letter-spacing: .06em; flex: 0 0 auto; }
#btm-user-badge button {
  background: #1e293b; border: 1px solid #334155; color: #cbd5e1;
  border-radius: 8px; width: 26px; height: 26px; cursor: pointer; flex: 0 0 auto;
}

/* ---- Follow-up / status row ---- */
.btm-follow {
  display: flex; flex-wrap: wrap; gap: .6rem; align-items: end;
  margin-top: .6rem; padding-top: .6rem; border-top: 1px dashed #e2e8f0;
  font-size: .75rem; color: #64748b;
}
.btm-follow label { display: grid; gap: 2px; font-weight: 700; font-size: .68rem; letter-spacing: .02em; }
.btm-follow select, .btm-follow input {
  padding: .3rem .45rem; border: 1px solid #cbd5e1; border-radius: 7px; font-size: .78rem; color: #1e293b;
}

/* ---- Clients modal ---- */
#btm-clients {
  display: none; position: fixed; inset: 0; z-index: 350;
  background: rgba(15,23,42,.7); place-items: center; padding: 20px;
}
#btm-clients.show { display: grid; }
.btm-modal-card {
  width: min(640px, 100%); max-height: 86vh; overflow: auto; background: #fff;
  border-radius: 16px; padding: 20px; color: #1e293b;
  box-shadow: 0 30px 80px rgba(15,23,42,.4);
}
.btm-modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.btm-modal-head h2 { margin: 0; font-size: 1.15rem; }
.btm-modal-head button { background: #f1f5f9; border: 0; border-radius: 8px; width: 32px; height: 32px; cursor: pointer; }
.btm-client-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .5rem; margin-bottom: 14px; }
.btm-client-form input { padding: .45rem .55rem; border: 1px solid #cbd5e1; border-radius: 8px; font-size: .85rem; }
.btm-client-form button {
  border: 0; border-radius: 8px; background: #2563eb; color: #fff; font-weight: 700; cursor: pointer; padding: .45rem;
}
.btm-client-row {
  display: flex; justify-content: space-between; align-items: center; gap: .6rem;
  padding: .5rem 0; border-bottom: 1px solid #e2e8f0;
}
.btm-client-row strong { font-size: .9rem; display: block; }
.btm-client-row span { font-size: .74rem; color: #64748b; }
.btm-client-row button { background: none; border: 0; cursor: pointer; font-size: 1rem; }

/* ---- Print ---- */
@media print {
  #btm-login, #btm-clients, #btm-user-badge, .btm-follow { display: none !important; }
}

/* ---- Mobile ---- */
@media (max-width: 900px) {
  .btm-modal-card { padding: 14px; }
}

/* Πιο σφιχτό sidebar footer στο Toolkit */
.btm-mode-box { grid-template-columns: 1fr 1fr; gap: 0.3rem !important; }
.btm-mode-box .btm-mode-btn { font-size: 0.68rem; padding: 0.35rem 0.4rem; min-height: 34px; }
.btm-mode-box #btm-clients-btn { grid-column: 1 / -1; font-size: 0.74rem; }
.sidebar-footer .partner-tier-card { margin-bottom: 0.4rem; }
.sidebar-footer .partner-tier-card > div { margin-top: 0.35rem !important; }
@media (max-width: 900px) {
  .btm-mode-box { grid-template-columns: 1fr 1fr; }
}

/* Embedded: μήνυμα ληγμένης συνεδρίας (αντί login form) */
#btm-session-notice {
  display: none; position: fixed; inset: 0; z-index: 400;
  background: rgba(15,23,42,.82); place-items: center; padding: 20px;
}
.btm-session-card {
  max-width: 380px; background: #fff; border-radius: 16px; padding: 24px;
  color: #1e293b; box-shadow: 0 30px 80px rgba(15,23,42,.45); text-align: center;
}
.btm-session-card strong { display: block; font-size: 1.1rem; margin-bottom: 6px; }
.btm-session-card p { font-size: .86rem; color: #64748b; margin: 0 0 14px; }
.btm-session-card a {
  display: inline-block; background: #0f172a; color: #fff; text-decoration: none;
  padding: .55rem 1rem; border-radius: 10px; font-weight: 700; font-size: .85rem;
}

/* Clients v2: assignment/reminder chips + actions */
.btm-client-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .25rem; }
.btm-chip { background: #eef2ff; color: #3730a3; border-radius: 999px; padding: 2px 8px; font-size: .68rem; font-weight: 700; }
.btm-chip.rem { background: #f1f5f9; color: #475569; }
.btm-chip.rem.today { background: #fef3c7; color: #92400e; }
.btm-chip.rem.late { background: #fee2e2; color: #b91c1c; }
.btm-client-actions { display: flex; gap: .35rem; flex: 0 0 auto; }
.btm-client-actions button { background: #f1f5f9; border: 0; border-radius: 8px; width: 30px; height: 30px; cursor: pointer; }
.btm-client-form { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.btm-client-form select, .btm-client-form input[type="date"] {
  padding: .45rem .55rem; border: 1px solid #cbd5e1; border-radius: 8px; font-size: .85rem; background: #fff;
}
