* { box-sizing: border-box; }
body { margin: 0; font-family: 'Assistant', sans-serif; direction: rtl; background: #f4f6fb; }

/* ── Login ─────────────────────────────────────────────────────────────────── */
.login-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f1629 60%, #1a3a5c 100%);
  padding: 20px;
}
.login-box { width: 100%; max-width: 400px; }
.login-icon { font-size: 3rem; color: #3b82f6; text-align: center; }
.login-title { color: #fff; font-size: 1.8rem; font-weight: 800; text-align: center; margin: 4px 0 2px; }
.login-sub { color: rgba(255,255,255,0.5); font-size: 0.85rem; text-align: center; margin-bottom: 0; }
.fw-700 { font-weight: 700 !important; }
.fw-800 { font-weight: 800 !important; }
.fw-600 { font-weight: 600 !important; }

/* ── Navbar ─────────────────────────────────────────────────────────────────── */
.app-navbar {
  background: #1A2332; color: #fff; height: 52px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; position: sticky; top: 0; z-index: 100;
}
.app-navbar .text-muted { color: #8b9ab0 !important; }

/* ── Filter bar ──────────────────────────────────────────────────────────────── */
.filter-bar {
  background: #fff; border-bottom: 1px solid #e2e8f0;
  padding: 10px 20px; position: sticky; top: 52px; z-index: 90;
}

/* ── Table ───────────────────────────────────────────────────────────────────── */
.table-wrapper { padding: 16px 20px; }
.wi-table { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.07); }
.wi-table thead th {
  background: #f8fafc; color: #64748b; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px; border-bottom: 2px solid #e2e8f0;
  padding: 10px 12px; white-space: nowrap;
}
.wi-table tbody td { padding: 10px 12px; vertical-align: middle; border-bottom: 1px solid #f1f5f9; }
.wi-table tbody tr.item-row { cursor: pointer; transition: background .1s; }
.wi-table tbody tr.item-row:hover { background: #f8fafc; }

.wi-title-cell { font-weight: 600; color: #1e293b; font-size: 14px; }

.badge-status {
  display: inline-block; font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px; white-space: nowrap;
}
.s-open        { background: #f1f5f9; color: #475569; }
.s-in_progress { background: #dbeafe; color: #1d4ed8; }
.s-blocked     { background: #fee2e2; color: #dc2626; }
.s-done        { background: #d1fae5; color: #065f46; }
.s-deleted     { background: #f9fafb; color: #cbd5e1; }

.btn-row-edit {
  border: none; background: none; color: #94a3b8;
  padding: 2px 6px; border-radius: 4px; transition: all .15s; font-size: 14px;
}
.btn-row-edit:hover { background: #e2e8f0; color: #1e293b; }

.table-empty { text-align: center; padding: 60px 20px; }

/* ── Breadcrumb ────────────────────────────────────────────────────────────── */
.breadcrumb-bar {
  background: #eff6ff; border-bottom: 1px solid #bfdbfe;
  padding: 7px 20px; display: flex; align-items: center; gap: 8px; font-size: 13px;
}
.bc-content { display: flex; align-items: center; gap: 4px; flex: 1; }
.bc-clickable { color: #1d4ed8; cursor: pointer; }
.bc-clickable:hover { text-decoration: underline; }
.bc-active { font-weight: 700; color: #1e3a5f; }
.bc-sep { color: #9ca3af; }

/* ── Detail view panels ───────────────────────────────────────────────────────── */
.detail-body { padding: 16px 20px; }
.panel-card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.07); overflow: hidden; }
.panel-header {
  background: #f8fafc; color: #1e293b; font-weight: 700; font-size: 13px;
  padding: 10px 14px; border-bottom: 1px solid #e2e8f0;
}
.panel-body { padding: 12px 14px; }

.expand-label { font-weight: 700; color: #1e3a5f; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.expand-text { white-space: pre-wrap; line-height: 1.6; }

.access-row {
  display: flex; align-items: center; gap: 10px; padding: 6px 4px;
  border-bottom: 1px solid #f1f5f9;
}
.access-row:last-child { border-bottom: none; }

.event-row {
  padding: 10px 14px; border-bottom: 1px solid #f1f5f9; cursor: pointer; transition: background .1s;
}
.event-row:hover { background: #f8fafc; }
.event-row.event-blocked { background: #fef2f2; }
.event-row.event-blocked:hover { background: #fee2e2; }
.caller-name { cursor: pointer; }
.caller-name:hover { text-decoration: underline; }

.json-block {
  background: #0f1629; color: #e2e8f0; padding: 10px 12px; border-radius: 8px;
  font-size: 12px; max-height: 240px; overflow: auto; white-space: pre-wrap; word-break: break-word;
}

/* ── OTP code input ────────────────────────────────────────────────────────── */
.otp-input {
  font-size: 2rem;
  font-family: monospace;
  letter-spacing: 0.5rem;
  text-align: center;
  padding: 14px 12px;
  color: #1e293b;
}

.event-select-cb {
  cursor: pointer;
}
