/* Story Icon TLV — portal brand styles (shared by client + admin pages).
   Brand: Navy #213951 · Turquoise #17A2B8 · Rubik · RTL Hebrew-first. */
:root {
  --navy: #213951;
  --turq: #17A2B8;
  --line: #e7ebed;
  --ink: #1c2b38;
  --muted: #6a7b86;
  --bg: #f6f8f9;
  --ok-bg: #e6f5f8;
  --warn-bg: #fff5d6;
  --warn-ink: #8a6d00;
  --bad-bg: #fde8e8;
  --bad-ink: #b03434;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Rubik, Arial, sans-serif; color: var(--navy); background: var(--bg); }
.wrap { max-width: 980px; margin: 0 auto; padding: 20px; }
header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 20px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
header img { height: 40px; }
header .head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.center { min-height: 90vh; display: grid; place-items: center; text-align: center; padding: 24px; background: radial-gradient(120% 80% at 50% -10%, #fff, #eef1f2); }
.login-card { max-width: 392px; width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 38px 30px; box-shadow: 0 20px 50px rgba(22, 39, 58, .10); }
.logo-big { width: 170px; margin: 0 auto 8px; }

.btn { background: var(--navy); color: #fff; border: 1px solid var(--navy); border-radius: 11px; padding: 13px 22px; font-size: 16px; font-family: inherit; cursor: pointer; transition: .15s; }
.btn:hover { background: var(--turq); border-color: var(--turq); }
.btn.g { background: #fff; color: var(--ink); border: 1px solid #dfe4e7; display: inline-flex; gap: 10px; align-items: center; justify-content: center; width: 100%; font-weight: 500; box-shadow: 0 6px 18px rgba(33, 57, 81, .10); }
.btn.g:hover { background: #fff; border-color: var(--turq); }
.btn.ghost { background: transparent; color: var(--navy); }
.btn.sm { padding: 7px 14px; font-size: 13px; border-radius: 9px; }
.btn.ok { background: var(--turq); border-color: var(--turq); }
.btn.no { background: #fff; color: var(--navy); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row .btn { flex: 1 1 auto; min-width: 0; }

.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin: 14px 0; box-shadow: 0 3px 12px rgba(22, 39, 58, .05); }
.card.pend { border: 2px solid var(--turq); background: #f2fbfc; }
.muted { color: var(--muted); }
.avatar { width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--navy); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }

input, textarea, select { width: 100%; padding: 11px; border: 1px solid var(--navy); border-radius: 9px; font-family: inherit; font-size: 15px; margin: 6px 0; color: var(--navy); background: #fff; }
label { font-size: 14px; font-weight: 600; }

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
td, th { padding: 8px 7px; border-bottom: 1px solid var(--line); text-align: right; font-size: 13px; }
th { color: var(--muted); }
h1 { font-weight: 700; letter-spacing: 1px; }
h2, h3 { margin: .2em 0; }

.tag { display: inline-block; border-radius: 20px; padding: 3px 11px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.tag.approved, .tag.live, .tag.done { background: var(--ok-bg); color: var(--turq); }
.tag.pending, .tag.review, .tag.in_progress, .tag.new { background: var(--warn-bg); color: var(--warn-ink); }
.tag.rejected, .tag.paused { background: var(--bad-bg); color: var(--bad-ink); }
.tag.discovery { background: #eef1f2; color: var(--muted); }
.big-ico { font-size: 40px; }

/* ——— project cards + timeline ——— */
.proj-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.proj-svc { font-size: 13px; color: var(--muted); }
.timeline { margin: 10px 0 0; padding: 0 14px 0 0; list-style: none; border-right: 2px solid var(--line); }
.timeline li { position: relative; padding: 4px 12px 10px 0; font-size: 13.5px; }
.timeline li::before { content: ""; position: absolute; right: -19px; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--turq); }
.timeline .when { color: var(--muted); font-size: 12px; margin-inline-start: 6px; }

/* ——— files ——— */
.file-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f0f3f4; flex-wrap: wrap; }
.file-name { font-weight: 500; word-break: break-word; }
.file-meta { font-size: 12px; color: var(--muted); }

/* ——— metric cards ——— */
.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.metric-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-align: center; }
.metric-card .val { font-size: 26px; font-weight: 700; color: var(--navy); }
.metric-card .lbl { font-size: 13px; color: var(--muted); margin-top: 2px; }
.metric-card .delta { font-size: 12px; font-weight: 600; color: var(--turq); }

/* ——— chat ——— */
.chat-thread { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.chat-me, .chat-bot { max-width: 85%; padding: 9px 12px; border-radius: 13px; font-size: 14px; line-height: 1.55; white-space: pre-wrap; word-wrap: break-word; }
.chat-me { align-self: flex-end; background: var(--navy); color: #fff; }
.chat-bot { align-self: flex-start; background: #f2f7f8; border: 1px solid var(--line); }
.chat-send-row { display: flex; gap: 8px; }
.chat-send-row input { margin: 0; }
.chat-send-row .btn { flex: none; }

/* ——— admin tabs ——— */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 4px; }
.tabs button { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 8px 18px; font-family: inherit; font-size: 14px; font-weight: 500; color: var(--navy); cursor: pointer; }
.tabs button.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 10px; background: var(--turq); color: #fff; font-size: 12px; padding: 0 6px; margin-inline-start: 6px; }

/* ——— admin client-detail drawer ——— */
.client-detail { border: 2px solid var(--turq); }
.detail-section { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.inline-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; align-items: end; }
.inline-form .full { grid-column: 1 / -1; }

.toast { position: fixed; bottom: 18px; inset-inline-start: 50%; transform: translateX(50%); background: var(--navy); color: #fff; border-radius: 12px; padding: 10px 22px; font-size: 14px; box-shadow: 0 10px 26px rgba(22, 39, 58, .25); z-index: 50; }

@media (max-width: 480px) {
  .wrap { padding: 12px; }
  header { padding: 10px 12px; }
}
