* { 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;
}
.filter-select { width: auto; min-width: 150px; }
.filter-search { width: auto; min-width: 200px; }

/* ── 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-table tbody tr.item-row.expanded { background: #f0f7ff; }
.wi-table tbody tr.item-row.deep-link-highlight { animation: deepLinkFlash 2s ease-out; }
@keyframes deepLinkFlash {
  0%   { background: #fef08a; }
  100% { background: transparent; }
}

/* Expand row */
.wi-table tbody tr.expand-row td { background: #f8fafc; padding: 0; border-bottom: 2px solid #dbeafe; }
.expand-inner { padding: 14px 16px; font-size: 13px; color: #374151; }
.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; }
.expand-summary { background: #ecfdf5; border-right: 3px solid #10b981; padding: 8px 12px; border-radius: 0 6px 6px 0; margin-top: 10px; }

/* Title in table */
.wi-title-cell { font-weight: 600; color: #1e293b; font-size: 14px; }
.wi-title-cell.done { color: #94a3b8; font-weight: 400; }
.wi-sub { font-size: 11px; color: #94a3b8; margin-top: 2px; }

/* Status badges */
.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; }

/* Type badges */
.type-badge { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.type-project { background: #ede9fe; color: #5b21b6; }
.type-plan    { background: #e0f2fe; color: #0369a1; }
.type-task    { background: #f0fdf4; color: #15803d; }
.type-mini    { background: #fef3c7; color: #92400e; }

/* Project filter panel */
.project-panel {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 200;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,.1); padding: 10px; min-width: 220px; max-height: 320px;
  overflow-y: auto;
}
.proj-option {
  padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: 13px;
  transition: background .1s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.proj-option:hover  { background: #f1f5f9; }
.proj-option.active { background: #dbeafe; color: #1d4ed8; font-weight: 600; }

/* Version chip */
.version-chip {
  font-size: 10px; font-family: monospace; background: #f1f5f9;
  color: #475569; padding: 2px 6px; border-radius: 4px;
}

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

/* Empty / loading state */
.table-empty { text-align: center; padding: 60px 20px; }

/* Action button row expand indicator */
.expand-indicator { color: #94a3b8; font-size: 12px; transition: transform .2s; }
.item-row.expanded .expand-indicator { transform: rotate(180deg); }

/* Breadcrumb navigation bar */
.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; }
.bc-clear {
  border: none; background: none; color: #6b7280; font-size: 12px;
  cursor: pointer; padding: 2px 10px; border-radius: 4px; margin-right: auto;
}
.bc-clear:hover { background: #dbeafe; color: #1d4ed8; }

/* Expand navigation link */
.expand-nav-link { font-size: 12px; color: #1d4ed8; text-decoration: none; }
.expand-nav-link:hover { text-decoration: underline; }

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