/* ==========================================================================
   iSync Attendance System — Component Styles
   ========================================================================== */

/* ---------- Login Screen ---------- */
#login-screen.active {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  padding: 42px 36px 36px;
  position: relative;
  border-radius: var(--radius-md);
  animation: fadeIn 0.4s var(--ease-spring);
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--brand-primary);
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  height: 28px;
  width: auto;
  max-width: 140px;
  display: block;
  object-fit: contain;
  transition: opacity var(--transition-fast);
}

.login-card .brand-mark {
  margin-bottom: 24px;
}

.login-card .brand-logo {
  height: 40px;
  max-width: 180px;
}

.logo-light {
  display: block;
}

.logo-dark {
  display: none;
}

[data-theme="dark"] .logo-light {
  display: none !important;
}

[data-theme="dark"] .logo-dark {
  display: block !important;
}

.login-card h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 28px;
  margin-bottom: 6px;
}

.login-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 28px;
}

.login-note {
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  border-top: 1px solid var(--border-light);
  padding-top: 16px;
}

.demo-credentials {
  margin-top: 12px;
  padding: 10px 12px;
  background-color: var(--bg-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-soft);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ---------- Header / Appbar ---------- */
header.appbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(20px, 3.5vw, 48px);
  background-color: var(--bg-surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 2000;
}

.who {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-primary-tint);
  color: var(--brand-primary-dark);
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--brand-primary);
}

.who-meta {
  text-align: right;
}

.who-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.who-role {
  font-size: 12px;
  color: var(--text-muted);
}

.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  cursor: pointer;
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  background-color: var(--bg-subtle);
  color: var(--text-main);
  border-color: var(--border-strong);
}

/* ---------- Main Container & Full-Screen Dashboard Grid ---------- */
#app-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main.app-main {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 32px clamp(20px, 3.5vw, 48px) 60px;
  flex: 1;
}

.dashboard-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 1024px) {
  .dashboard-columns {
    grid-template-columns: minmax(380px, 480px) minmax(0, 1fr);
    gap: 36px;
    align-items: start;
  }

  .block-today, .block-history {
    margin-top: 0 !important;
  }
}

/* ---------- Hero Clock Card (Full Width) ---------- */
.hero {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 32px clamp(20px, 3vw, 44px);
  position: relative;
  margin-bottom: 32px;
  animation: fadeIn 0.3s var(--ease-spring);
}

.hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--brand-primary);
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
}

.hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.hero-date {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
}

.hero-sync-tag {
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--success);
}

.hero-content-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.hero-clock-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-clock {
  font-family: var(--font-mono);
  font-size: clamp(48px, 6vw, 68px);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-main);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.hero-clock span.ampm {
  color: var(--brand-primary);
  font-size: 0.52em;
  font-weight: 600;
  margin-left: 6px;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-medium);
  background-color: var(--bg-subtle);
  color: var(--text-soft);
  transition: all var(--transition-fast);
}

.status-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text-faint);
}

.status-pill.on {
  background-color: var(--success-tint);
  border-color: var(--success-border);
  color: var(--success);
}

.status-pill.on .dot {
  background-color: var(--success);
  animation: pulseDot 2s infinite;
}

.hero-actions-col {
  display: flex;
  align-items: center;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-actions .btn {
  min-width: 160px;
  padding: 12px 24px;
  font-size: 14.5px;
}

.hero-loc-note {
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  font-size: 12.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---------- Content Section Blocks ---------- */
section.block {
  margin-top: 36px;
}

.dashboard-left .hero {
  margin-bottom: 0;
}

.dashboard-left .block-today {
  margin-top: 0;
}

.block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}

.block-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.history-badge {
  font-size: 11.5px;
  font-family: var(--font-mono);
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-medium);
  color: var(--text-soft);
}

.block-head h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 21px;
}

.block-head .hint {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ---------- Today Card ---------- */
.entry-today {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.entry-today .empty {
  padding: 30px 24px;
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}

.punch {
  display: flex;
  gap: 18px;
  padding: 20px 24px;
  align-items: flex-start;
  transition: background-color var(--transition-fast);
}

.punch + .punch {
  border-top: 1px solid var(--border-light);
}

.punch:hover {
  background-color: var(--bg-subtle);
}

.punch-time {
  font-family: var(--font-mono);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-main);
  min-width: 76px;
  padding-top: 2px;
}

.punch-body {
  flex: 1;
}

.punch-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-primary);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.punch-note {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-soft);
  word-break: break-word;
}

.punch-loc {
  margin-top: 8px;
  font-size: 12.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-light);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  max-width: 100%;
}

.loc-address {
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--text-soft);
}

.loc-coords {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
}

.punch-edit {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  transition: all var(--transition-fast);
}

.punch-edit:hover {
  color: var(--brand-primary);
  background-color: var(--brand-primary-light);
}

.punch-total {
  padding: 14px 24px;
  border-top: 1px solid var(--border-light);
  background: var(--success-tint);
  font-size: 13.5px;
  color: var(--success);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.punch-total span {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14.5px;
}

/* ---------- History Ledger ---------- */
.ledger {
  border-left: 2px solid var(--border-medium);
  margin-left: 10px;
}

.ledger-day {
  position: relative;
  padding: 0 0 0 28px;
  margin-bottom: 8px;
}

.ledger-day::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 22px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2.5px solid var(--border-strong);
  transition: border-color var(--transition-fast);
}

.ledger-day:hover::before {
  border-color: var(--brand-primary);
}

.ledger-row {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  cursor: pointer;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.ledger-row:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
}

.ledger-row summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  user-select: none;
}

.ledger-row summary::-webkit-details-marker {
  display: none;
}

.ledger-caret {
  color: var(--text-muted);
  font-size: 11px;
  transition: transform var(--transition-fast);
}

.ledger-row[open] .ledger-caret {
  transform: rotate(90deg);
}

.ledger-date {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 500;
  min-width: 120px;
}

.ledger-times {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-soft);
  min-width: 140px;
}

.ledger-duration {
  font-size: 13px;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-muted);
  margin-left: auto;
}

.ledger-detail {
  border-top: 1px solid var(--border-light);
  padding: 18px 20px;
  background-color: var(--bg-subtle);
  border-bottom-left-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
}

.ledger-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.ledger-detail-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.app-footer {
  margin-top: 48px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}

.empty-state {
  padding: 36px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-md);
}

/* ---------- Modals & Overlays ---------- */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(18, 25, 38, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  z-index: 100;
  opacity: 0;
  overflow-y: auto;
  transition: opacity var(--transition-fast);
}

.overlay.active {
  display: flex;
  opacity: 1;
}

.modal {
  background: var(--bg-surface);
  width: 100%;
  max-width: 540px;
  position: relative;
  padding: 32px 30px 26px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-modal);
  margin: auto;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  animation: modalPop 0.25s var(--ease-spring);
}

.modal-checkout {
  max-width: 580px;
}

.modal::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--brand-primary);
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
}

.modal h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 22px;
  margin-bottom: 6px;
}

.modal .modal-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

.modal textarea {
  width: 100%;
  min-height: 110px;
  padding: 12px 14px;
  border: 1px solid var(--border-medium);
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.modal textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  background-color: var(--bg-surface);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.modal-loc {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-soft);
  margin-top: 14px;
  font-family: var(--font-mono);
  line-height: 1.4;
  word-break: break-word;
}

.loc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  flex: none;
}

.loc-dot.pending {
  background: var(--brand-primary);
  animation: pulseDot 1.5s infinite;
}

.loc-dot.denied {
  background: var(--danger);
}

.hours-worked {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  background: var(--success-tint);
  border: 1px solid var(--success-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 18px;
}

.hours-worked-label {
  font-size: 13px;
  color: var(--success);
  font-weight: 600;
}

.hours-worked-value {
  font-family: var(--font-mono);
  font-size: 19px;
  color: var(--success);
  font-weight: 600;
}

/* ---------- Checkout Target Quota & Warning Card ---------- */
.checkout-quota-card {
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
  border: 1px solid var(--border-medium);
}

.checkout-quota-card.warning-state {
  background: var(--warning-tint);
  border-color: var(--warning-border);
}

.checkout-quota-card.completed-state {
  background: var(--success-tint);
  border-color: var(--success-border);
}

.quota-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.quota-status-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.quota-icon {
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.quota-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.warning-state .quota-title {
  color: var(--warning-dark);
}

[data-theme="dark"] .warning-state .quota-title {
  color: hsl(38, 95%, 68%);
}

.completed-state .quota-title {
  color: var(--success);
}

.quota-target-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: hsla(0, 0%, 100%, 0.6);
  color: var(--text-soft);
  border: 1px solid var(--border-light);
  white-space: nowrap;
  flex-shrink: 0;
}

[data-theme="dark"] .quota-target-pill {
  background: hsla(0, 0%, 0%, 0.25);
  border-color: var(--border-medium);
}

.quota-message {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-main);
  margin-bottom: 12px;
}

.quota-message strong {
  font-weight: 600;
}

.quota-progress-track {
  width: 100%;
  height: 8px;
  border-radius: var(--radius-full);
  background: hsla(0, 0%, 0%, 0.08);
  overflow: hidden;
  margin-bottom: 8px;
}

[data-theme="dark"] .quota-progress-track {
  background: hsla(0, 0%, 100%, 0.1);
}

.quota-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.warning-state .quota-progress-fill {
  background: linear-gradient(90deg, var(--warning), hsl(28, 95%, 50%));
}

.completed-state .quota-progress-fill {
  background: var(--success);
}

.quota-progress-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
}

.early-confirm-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: hsla(0, 0%, 100%, 0.6);
  border: 1px dashed var(--warning-border);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-top: 14px;
  cursor: pointer;
  user-select: none;
  transition: background-color var(--transition-fast);
}

[data-theme="dark"] .early-confirm-wrap {
  background: hsla(0, 0%, 0%, 0.25);
}

.early-confirm-wrap input[type="checkbox"] {
  margin-top: 3px;
  cursor: pointer;
  accent-color: var(--warning-dark);
  width: 16px;
  height: 16px;
}

.early-confirm-label {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--text-soft);
  cursor: pointer;
  font-weight: 500;
}

@keyframes shakeWarning {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.shake-attention {
  animation: shakeWarning 0.4s ease;
}

.btn-warning-action {
  background-color: var(--warning-dark) !important;
  color: #fff !important;
  border: none !important;
}

.btn-warning-action:hover {
  background-color: hsl(38, 92%, 28%) !important;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.modal-actions.modal-actions-split {
  justify-content: space-between;
  align-items: center;
}

.modal-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-danger-text {
  background: transparent;
  color: var(--danger);
  border: 1px solid transparent;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-danger-text:hover:not(:disabled) {
  background-color: var(--danger-tint);
  border-color: var(--danger-border);
  color: var(--danger);
}

.btn-danger-text:active:not(:disabled) {
  transform: translateY(1px);
}

.btn-danger-text:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- Toasts ---------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 420px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: fadeIn 0.3s var(--ease-spring);
  color: var(--text-main);
}

.toast.success {
  border-left: 4px solid var(--success);
}

.toast.warning {
  border-left: 4px solid var(--warning);
}

.toast.error {
  border-left: 4px solid var(--danger);
}

.toast.info {
  border-left: 4px solid var(--brand-primary);
}

.toast-message {
  flex: 1;
  line-height: 1.4;
}

/* ---------- Note Character Counter ---------- */
.note-char-counter {
  display: flex;
  justify-content: flex-end;
  font-size: 11.5px;
  font-weight: 500;
  margin-top: 4px;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  transition: color var(--transition-fast);
}

.note-char-counter.invalid {
  color: var(--warning-text, #d97706);
}

.note-char-counter.valid {
  color: var(--success, #16a34a);
}

/* ---------- Profile Modal & Header Profile Button ---------- */
/* ---------- Profile Modal (Custom Template) ---------- */
.profile-settings-modal {
  width:100%;
  max-width:520px;
  background:var(--bg-surface);
  border-radius:10px;
  box-shadow:var(--shadow-xl);
  overflow:hidden;
  border:1px solid var(--border-medium);
  margin: auto;
}

.profile-modal-header {
  padding:28px 32px 24px;
  display:flex;
  align-items:center;
  gap:16px;
  border-bottom:1px solid var(--border-medium);
}

.profile-avatar {
  width:52px;
  height:52px;
  border-radius:50%;
  background:var(--brand-primary);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:var(--font-mono);
  font-size:16px;
  font-weight:500;
  letter-spacing:0.02em;
  flex-shrink:0;
}

.profile-header-text h1 {
  font-size:22px;
  font-weight:600;
  margin:0 0 6px;
  letter-spacing:-0.01em;
  color:var(--text-main);
}

.profile-target-pill {
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-family:var(--font-mono);
  font-size:12px;
  color:var(--text-muted);
  background:var(--bg-subtle);
  border:1px solid var(--border-medium);
  padding:3px 10px;
  border-radius:100px;
}
.profile-target-pill svg { width:11px; height:11px; opacity:0.7; }

/* Body */
.profile-modal-body {
  padding:8px 32px 4px;
  max-height:62vh;
  overflow-y:auto;
}

.profile-section {
  padding:22px 0;
  border-bottom:1px solid var(--border-medium);
}
.profile-section:last-child { border-bottom:none; }

.profile-section-label {
  display:flex;
  align-items:center;
  gap:8px;
  font-size:13px;
  font-weight:500;
  color:var(--text-muted);
  margin-bottom:16px;
}
.profile-bar {
  width:3px;
  height:13px;
  background:var(--brand-primary);
  border-radius:2px;
  flex-shrink:0;
}
.profile-hint {
  font-size:11px;
  color:var(--text-muted);
  font-weight:400;
}

.profile-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:9px 0;
  gap:16px;
}
.profile-field-label {
  font-size:14px;
  color:var(--text-muted);
  flex-shrink:0;
}
.profile-value {
  font-family:var(--font-mono);
  font-size:13px;
  color:var(--text-main);
  text-align:right;
  word-break:break-all;
}

.profile-field {
  margin-bottom:14px;
}
.profile-field:last-child { margin-bottom:0; }
.profile-field label {
  display:block;
  font-size:13px;
  color:var(--text-muted);
  margin-bottom:6px;
}

.profile-input-wrap { position:relative; }

.profile-settings-modal input[type="text"],
.profile-settings-modal input[type="password"] {
  width:100%;
  padding:10px 12px;
  font-size:14px;
  font-family:var(--font-main);
  color:var(--text-main);
  background:var(--bg-canvas);
  border:1px solid var(--border-medium);
  border-radius:7px;
  outline:none;
  transition:border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.profile-settings-modal input::placeholder { color:var(--text-muted); }

.profile-settings-modal input:focus {
  border-color:var(--brand-primary);
  box-shadow:0 0 0 3px var(--brand-tint);
  background:var(--bg-surface);
}

.profile-settings-modal input[type="password"] { padding-right:38px; }

.profile-toggle-visibility {
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
  background:none;
  border:none;
  cursor:pointer;
  color:var(--text-muted);
  display:flex;
  padding:4px;
  border-radius:4px;
}
.profile-toggle-visibility:hover { color:var(--text-main); }
.profile-toggle-visibility svg { width:16px; height:16px; }

.profile-field-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

.profile-match-note {
  font-size:12px;
  margin-top:6px;
  display:none;
  align-items:center;
  gap:5px;
}
.profile-match-note.show { display:flex; }
.profile-match-note.ok { color:#4F8A5B; }
.profile-match-note.bad { color:var(--danger); }
.profile-match-note svg { width:12px; height:12px; }

.profile-pref-row {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
}
.profile-pref-title {
  font-size:14px;
  font-weight:500;
  color:var(--text-main);
  margin-bottom:3px;
}
.profile-pref-desc {
  font-size:12.5px;
  color:var(--text-muted);
  line-height:1.5;
}

.profile-switch {
  position:relative;
  width:42px;
  height:24px;
  flex-shrink:0;
  background:var(--border-medium);
  border-radius:100px;
  border:none;
  cursor:pointer;
  padding:0;
  transition:background 0.2s ease;
}
.profile-switch::after {
  content:'';
  position:absolute;
  top:3px;
  left:3px;
  width:18px;
  height:18px;
  background:#fff;
  border-radius:50%;
  transition:transform 0.2s ease;
  box-shadow:0 1px 2px rgba(0,0,0,0.2);
}
.profile-switch[aria-checked="true"] { background:var(--brand-primary); }
.profile-switch[aria-checked="true"]::after { transform:translateX(18px); }

.profile-modal-footer {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:20px 32px;
  background:var(--bg-canvas);
  border-top:1px solid var(--border-medium);
}

.profile-signout {
  display:inline-flex;
  align-items:center;
  gap:6px;
  background:none;
  border:none;
  color:var(--danger);
  font-size:13.5px;
  font-family:var(--font-main);
  cursor:pointer;
  padding:8px 10px 8px 4px;
  border-radius:6px;
  transition:background 0.15s ease;
}
.profile-signout:hover { background:var(--danger-tint, #FBEEE9); }
[data-theme="dark"] .profile-signout:hover { background: rgba(225, 121, 93, 0.15); }
.profile-signout svg { width:15px; height:15px; }

.profile-footer-actions {
  display:flex;
  gap:10px;
}

.profile-btn {
  font-family:var(--font-main);
  font-size:13.5px;
  font-weight:500;
  padding:9px 18px;
  border-radius:7px;
  cursor:pointer;
  transition:background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}
.profile-btn:active { transform:translateY(1px); }

.profile-btn-secondary {
  background:var(--bg-surface);
  color:var(--text-muted);
  border:1px solid var(--border-medium);
}
.profile-btn-secondary:hover { border-color:var(--text-muted); color:var(--text-main); }

.profile-btn-primary {
  background:var(--brand-primary);
  color:#fff;
  border:1px solid var(--brand-primary);
}
.profile-btn-primary:hover { background:var(--brand-primary-dark); border-color:var(--brand-primary-dark); }

.profile-settings-modal input:focus-visible, 
.profile-switch:focus-visible, 
.profile-btn:focus-visible, 
.profile-signout:focus-visible, 
.profile-toggle-visibility:focus-visible {
  outline:2px solid var(--brand-primary);
  outline-offset:2px;
}

@media (max-width:480px){
  .profile-modal-header, .profile-modal-body, .profile-modal-footer { padding-left:20px; padding-right:20px; }
  .profile-field-grid { grid-template-columns:1fr; }
  .profile-row .profile-value { font-size:12px; }
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.who-interactive:hover .who-name {
  color: var(--brand-primary);
}

.avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 0 0 2px var(--brand-primary);
}

/* ---------- Tab Navigation & Header Bar ---------- */
.header-left {
  display: flex;
  align-items: center;
  gap: 28px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-subtle);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.nav-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-soft);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.nav-tab-btn:hover {
  color: var(--text-main);
  background: var(--bg-surface);
}

.nav-tab-btn.active {
  color: var(--brand-primary-dark);
  background: var(--bg-surface);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .nav-tab-btn.active {
  color: var(--text-main);
  background: var(--bg-surface-elevated);
}

.nav-tab-btn svg {
  opacity: 0.75;
  transition: opacity var(--transition-fast);
}

.nav-tab-btn.active svg {
  opacity: 1;
  stroke: var(--brand-primary);
}

.nav-badge {
  background: var(--brand-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
}

/* ---------- Tab Panes ---------- */
.tab-pane {
  display: none;
  animation: fadeIn 0.25s var(--ease-spring);
}

.tab-pane.active {
  display: block;
}

/* ---------- Dashboard View ---------- */
.dash-greeting-compact {
  margin-bottom: 20px;
  padding: 4px 0 2px 0;
}

.dash-hero-title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.dash-hero-title .highlight-name {
  color: var(--brand-primary);
}

/* Dashboard KPI Grid */
.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.kpi-icon.icon-tasks {
  background: hsla(209, 61%, 48%, 0.12);
  color: var(--brand-primary);
}

.kpi-icon.icon-progress {
  background: hsla(38, 92%, 50%, 0.12);
  color: var(--warning-dark);
}

.kpi-icon.icon-alert {
  background: hsla(6, 62%, 50%, 0.12);
  color: var(--danger);
}

.kpi-icon.icon-done {
  background: hsla(164, 53%, 36%, 0.12);
  color: var(--success);
}

.kpi-info {
  margin-bottom: 12px;
}

.kpi-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.1;
  margin-bottom: 4px;
}

.kpi-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
}

.kpi-tag {
  align-self: flex-start;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.kpi-tag.neutral {
  background: var(--bg-subtle);
  color: var(--text-soft);
}

.kpi-tag.progress {
  background: var(--warning-tint);
  color: var(--warning-dark);
  border: 1px solid var(--warning-border);
}

.kpi-tag.warning {
  background: var(--warning-tint);
  color: var(--warning-dark);
  border: 1px solid var(--warning-border);
}

.kpi-tag.danger {
  background: var(--danger-tint);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.kpi-tag.success {
  background: var(--success-tint);
  color: var(--success-dark);
  border: 1px solid var(--success-border);
}

.kpi-danger-alert {
  border-color: var(--danger-border);
}

/* Dashboard Columns */
.dash-columns {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 24px;
}

.dash-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.dash-side-column .dash-section {
  margin-bottom: 24px;
}

.dash-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}

.dash-header-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-header-title-wrap h2 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
}

.count-pill {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-soft);
}

/* Dashboard Task Items */
.dash-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dash-task-item {
  background: var(--bg-page);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.dash-task-item:hover {
  border-color: var(--brand-primary);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  transform: translateX(3px);
}

.dash-task-meta-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.dash-task-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.dash-task-desc {
  font-size: 13px;
  color: var(--text-soft);
  margin: 0;
  line-height: 1.4;
}

.dash-task-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
  font-size: 12.5px;
}

.dash-task-due {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
}

.dash-task-due.due-soon {
  color: var(--warning-dark);
  font-weight: 600;
}

.dash-task-due.overdue {
  color: var(--danger);
  font-weight: 600;
}

.dash-task-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-task-action {
  background: none;
  border: none;
  color: var(--brand-primary);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 4px;
}

/* Dashboard App Cards */
.dash-apps-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dash-app-card {
  background: var(--bg-page);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 16px;
  transition: all var(--transition-fast);
}

.dash-app-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-surface);
}

.dash-app-top {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.dash-app-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-app-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dash-app-fallback-img {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-primary);
}

.dash-app-meta {
  flex: 1;
  min-width: 0;
}

.dash-app-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.dash-app-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-app-platform {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
}

.dash-app-desc {
  font-size: 12.5px;
  color: var(--text-soft);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dash-app-links-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}

.dash-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: var(--radius-xs);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.dash-link-btn.admin {
  background: hsla(270, 50%, 50%, 0.1);
  color: hsl(270, 60%, 45%);
  border: 1px solid hsla(270, 50%, 50%, 0.25);
}

.dash-link-btn.admin:hover {
  background: hsla(270, 50%, 50%, 0.2);
}

.dash-link-btn.primary {
  background: var(--brand-primary-light);
  color: var(--brand-primary-dark);
  border: 1px solid hsla(209, 61%, 48%, 0.25);
}

.dash-link-btn.primary:hover {
  background: var(--brand-primary-tint);
}

.dash-link-btn.extra {
  background: var(--bg-subtle);
  color: var(--text-soft);
  border: 1px solid var(--border-medium);
}

.dash-link-btn.extra:hover {
  background: var(--border-light);
  color: var(--text-main);
}

/* Dashboard App Card TODO Tasks Section */
.dash-app-todos {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.dash-app-todos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}

.dash-app-todos-title-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
}

.dash-app-todos-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-soft);
}

.dash-app-todos-count {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-full);
}

.dash-app-todos-count.has-todos {
  background: hsla(209, 85%, 50%, 0.12);
  color: var(--brand-primary);
  border: 1px solid hsla(209, 85%, 50%, 0.25);
}

.dash-app-todos-count.zero-todos {
  background: hsla(142, 60%, 45%, 0.12);
  color: hsl(142, 70%, 36%);
  border: 1px solid hsla(142, 60%, 45%, 0.25);
}

.dash-app-open-board {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--brand-primary);
  cursor: pointer;
  padding: 0;
  background: none;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all var(--transition-fast);
}

.dash-app-open-board:hover {
  text-decoration: underline;
  transform: translateX(2px);
}

.dash-app-todo-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dash-app-todo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  padding: 8px 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.dash-app-todo-item:hover {
  border-color: var(--brand-primary);
  background: var(--bg-surface-elevated);
  transform: translateX(2px);
  box-shadow: 0 2px 6px hsla(0, 0%, 0%, 0.05);
}

.dash-app-todo-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.dash-app-todo-item-left .todo-item-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-primary);
  flex-shrink: 0;
}

.dash-app-todo-item-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-app-todo-item-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.todo-due-mini {
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: var(--radius-xs);
}

.todo-due-mini.overdue {
  background: hsla(0, 84%, 60%, 0.12);
  color: hsl(0, 75%, 45%);
  border: 1px solid hsla(0, 84%, 60%, 0.25);
}

.dash-app-todo-more {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--brand-primary);
  padding: 4px 6px;
  cursor: pointer;
  text-align: right;
  transition: all var(--transition-fast);
}

.dash-app-todo-more:hover {
  text-decoration: underline;
}

.dash-app-todo-empty {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 11px;
  background: hsla(142, 60%, 45%, 0.06);
  border: 1px dashed hsla(142, 60%, 45%, 0.25);
  border-radius: var(--radius-xs);
  color: var(--text-soft);
  font-size: 12.5px;
}

.dash-app-todo-empty .todo-empty-check {
  color: hsl(142, 70%, 36%);
  flex-shrink: 0;
}

[data-theme="dark"] .dash-app-todos-count.has-todos {
  background: hsla(209, 85%, 55%, 0.2);
  color: hsl(209, 90%, 65%);
}

[data-theme="dark"] .dash-app-todos-count.zero-todos {
  background: hsla(142, 60%, 45%, 0.2);
  color: hsl(142, 70%, 55%);
}

[data-theme="dark"] .dash-app-todo-item {
  background: var(--bg-surface-elevated);
  border-color: var(--border-medium);
}

[data-theme="dark"] .dash-app-todo-item:hover {
  background: var(--bg-page);
  border-color: var(--brand-primary);
}

[data-theme="dark"] .dash-app-todo-empty {
  background: hsla(142, 60%, 45%, 0.1);
  border-color: hsla(142, 60%, 45%, 0.3);
  color: var(--text-soft);
}

/* Dashboard Attendance Widget */
.widget-unpunched {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.widget-unpunched-text h4 {
  font-size: 14.5px;
  font-weight: 600;
  margin-bottom: 4px;
}

.widget-unpunched-text p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.widget-punched.active {
  background: hsla(209, 61%, 48%, 0.05);
  border: 1px solid hsla(209, 61%, 48%, 0.2);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.widget-punched.completed {
  background: hsla(164, 53%, 36%, 0.06);
  border: 1px solid hsla(164, 53%, 36%, 0.25);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.widget-punch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.widget-status-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.punch-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulseDot 2s infinite;
}

.widget-badge {
  font-size: 12px;
  font-weight: 600;
}

.badge-active {
  color: var(--brand-primary);
}

.badge-success {
  color: var(--success-dark);
}

.widget-punch-details {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12.5px;
  color: var(--text-soft);
}

/* ---------- Apps Hub View ---------- */
.apps-hub-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.apps-hub-title-group h1 {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 500;
  margin-bottom: 6px;
}

.apps-hub-sub {
  color: var(--text-muted);
  font-size: 14.5px;
  margin: 0;
  max-width: 650px;
}

.apps-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.apps-search-wrap, .tasks-search-wrap {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.apps-search-field, .tasks-search-field {
  width: 100%;
  padding: 10px 14px 10px 36px;
  font-family: var(--font-sans);
  font-size: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.apps-search-field:focus, .tasks-search-field:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.apps-platform-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  padding: 4px;
  border-radius: var(--radius-sm);
}

.platform-filter-btn {
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.platform-filter-btn:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

.platform-filter-btn.active {
  background: var(--brand-primary-light);
  color: var(--brand-primary-dark);
  font-weight: 600;
}

[data-theme="dark"] .platform-filter-btn.active {
  background: var(--brand-primary-light);
  color: var(--text-main);
}

/* Apps Grid */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.app-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--transition-fast);
}

.app-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-medium);
}

.app-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

.app-card-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-card-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-card-fallback-icon {
  font-size: 18px;
  font-weight: 700;
  color: var(--brand-primary);
}

.app-card-title-group {
  flex: 1;
  min-width: 0;
}

.app-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.app-card-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-status-badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.app-status-badge.status-active {
  background: var(--success-tint);
  color: var(--success-dark);
  border: 1px solid var(--success-border);
}

.app-status-badge.status-in_development {
  background: var(--warning-tint);
  color: var(--warning-dark);
  border: 1px solid var(--warning-border);
}

.app-status-badge.status-maintenance {
  background: var(--danger-tint);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.app-card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.app-platform-pill {
  font-size: 11.5px;
  color: var(--text-soft);
  background: var(--bg-subtle);
  padding: 1px 7px;
  border-radius: var(--radius-xs);
}

.app-slug-pill {
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: var(--brand-primary);
  background: var(--brand-primary-light);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
}

.app-card-menu {
  position: relative;
}

.btn-card-more {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-card-more:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.app-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 4px;
  min-width: 130px;
  z-index: 50;
  display: none;
}

.app-menu-dropdown.show {
  display: block;
}

.dropdown-item {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--text-main);
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dropdown-item:hover {
  background: var(--bg-subtle);
}

.dropdown-item.text-danger {
  color: var(--danger);
}

.dropdown-item.text-danger:hover {
  background: var(--danger-tint);
}

.app-card-desc {
  font-size: 13.5px;
  color: var(--text-soft);
  line-height: 1.45;
  margin: 0 0 16px;
  flex: 1;
}

/* Primary Console and Store Links */
.app-card-primary-links {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.app-link-pill {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--radius-xs);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.app-link-pill.admin {
  background: hsla(270, 50%, 50%, 0.1);
  color: hsl(270, 60%, 45%);
  border: 1px solid hsla(270, 50%, 50%, 0.25);
}

.app-link-pill.admin:hover {
  background: hsla(270, 50%, 50%, 0.18);
  transform: translateY(-1px);
}

.app-link-pill.primary {
  background: var(--brand-primary-light);
  color: var(--brand-primary-dark);
  border: 1px solid hsla(209, 61%, 48%, 0.25);
}

.app-link-pill.primary:hover {
  background: var(--brand-primary-tint);
  transform: translateY(-1px);
}

/* Extra Links */
.app-card-extra-links {
  margin-bottom: 14px;
  padding: 10px 12px;
  background: var(--bg-page);
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-light);
}

.extra-links-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.extra-links-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.extra-link-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--text-soft);
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.extra-link-chip:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

/* App Card Footer */
.app-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
  margin-top: auto;
}

.app-team-stack {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-team-label {
  font-size: 11.5px;
  color: var(--text-muted);
}

.avatar-stack {
  display: flex;
  align-items: center;
}

.avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-surface);
  margin-left: -7px;
  box-shadow: var(--shadow-sm);
}

.avatar-circle:first-child {
  margin-left: 0;
}

.avatar-circle.more {
  background: var(--border-strong);
  color: var(--text-main);
  font-size: 10px;
}

.avatar-circle-sm {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-surface);
  margin-left: -5px;
}

.avatar-circle-sm:first-child {
  margin-left: 0;
}

.app-tasks-badge-btn {
  background: none;
  border: 1px solid var(--border-medium);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--text-soft);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.app-tasks-badge-btn:hover {
  background: var(--brand-primary-light);
  border-color: var(--brand-primary);
  color: var(--brand-primary-dark);
}

/* ---------- Kanban Task Board ---------- */
.tasks-hub-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.tasks-hub-title-group h1 {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 500;
  margin-bottom: 6px;
}

.tasks-hub-sub {
  color: var(--text-muted);
  font-size: 14.5px;
  margin: 0;
  max-width: 650px;
}

.tasks-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  position: relative;
  z-index: 100;
}

.tasks-filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-select {
  padding: 8px 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  cursor: pointer;
  transition: border-color var(--transition-fast);
  min-height: 38px;
}

.filter-select:focus {
  outline: none;
  border-color: var(--brand-primary);
}

/* Custom App Filter Dropdown */
.custom-app-dropdown-wrap {
  position: relative;
  display: inline-block;
}

.custom-app-dropdown-wrap.is-open {
  z-index: 1100;
}

.custom-app-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 38px;
  box-shadow: var(--shadow-sm);
}

.custom-app-filter-btn:hover {
  border-color: var(--brand-primary);
  background: var(--bg-surface-elevated);
}

.custom-app-filter-btn:focus-visible {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.custom-app-dropdown-wrap.is-open .custom-app-filter-btn {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-glow);
  background: var(--bg-surface-elevated);
}

.custom-app-filter-btn.has-selection {
  border-color: var(--brand-primary);
  background: var(--brand-primary-light);
}

[data-theme="dark"] .custom-app-filter-btn.has-selection {
  background: var(--brand-primary-tint);
}

.app-btn-main {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 190px;
}

.app-btn-icon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-light);
}

.app-btn-icon-fallback {
  font-size: 14px;
  line-height: 1;
  display: inline-block;
  flex-shrink: 0;
}

.app-btn-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-btn-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.app-btn-todo-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
}

.app-btn-todo-badge.badge-has-todo {
  background: hsla(209, 61%, 48%, 0.14);
  color: var(--brand-primary);
  border: 1px solid hsla(209, 61%, 48%, 0.25);
}

.app-btn-todo-badge.badge-zero-todo {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}

.app-btn-chevron {
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.custom-app-dropdown-wrap.is-open .app-btn-chevron {
  transform: rotate(180deg);
  color: var(--brand-primary);
}

/* Dropdown Menu Flyout */
.custom-app-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 300px;
  max-width: 360px;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1050;
  overflow: hidden;
  animation: appDropdownIn 0.16s var(--ease-spring);
}

@keyframes appDropdownIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.custom-app-dropdown-wrap.is-open .custom-app-dropdown-menu {
  display: block;
}

.app-dropdown-header {
  padding: 10px 14px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-dropdown-header-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.app-dropdown-header-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-primary);
}

.app-dropdown-list {
  max-height: 310px;
  overflow-y: auto;
  padding: 6px;
}

.app-dropdown-divider {
  height: 1px;
  background: var(--border-light);
  margin: 4px 6px;
}

.app-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.app-dropdown-item:hover {
  background: var(--bg-subtle);
}

.app-dropdown-item.is-selected {
  background: hsla(209, 61%, 48%, 0.09);
}

[data-theme="dark"] .app-dropdown-item.is-selected {
  background: hsla(209, 61%, 48%, 0.18);
}

.item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.item-app-img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-light);
  background: var(--bg-subtle);
}

.item-icon-box {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.item-icon-box.item-icon-all {
  background: hsla(209, 61%, 48%, 0.1);
  color: var(--brand-primary);
}

.item-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
}

.app-default-pill {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  background: hsla(209, 61%, 48%, 0.15);
  color: var(--brand-primary);
  border: 1px solid hsla(209, 61%, 48%, 0.3);
  margin-left: 6px;
}

.item-desc {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.item-todo-chip {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
  line-height: 1.3;
}

.item-todo-chip.chip-has-todo {
  background: hsla(38, 92%, 50%, 0.15);
  color: #b45309;
  border: 1px solid hsla(38, 92%, 50%, 0.35);
}

[data-theme="dark"] .item-todo-chip.chip-has-todo {
  background: hsla(38, 92%, 50%, 0.2);
  color: #fcd34d;
  border-color: hsla(38, 92%, 50%, 0.4);
}

.item-todo-chip.chip-zero-todo {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}

.item-check-icon {
  color: var(--brand-primary);
  flex-shrink: 0;
}

.btn-clear-filters {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  text-decoration: underline;
}

/* Kanban Columns Board */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(280px, 1fr));
  gap: 18px;
  align-items: flex-start;
  overflow-x: auto;
  padding-bottom: 24px;
}

.kanban-column {
  background: #f1f2f4;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 8px 6px 8px;
  display: flex;
  flex-direction: column;
  min-height: 480px;
  max-height: calc(100vh - 215px);
  box-shadow: 0 1px 1px rgba(9, 30, 66, 0.08);
}

[data-theme="dark"] .kanban-column {
  background: #181c20;
  border-color: rgba(255, 255, 255, 0.07);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
}

.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 8px 8px;
  margin-bottom: 2px;
}

.kanban-column-title-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.column-icon {
  font-size: 15px;
  opacity: 0.85;
}

.column-title {
  font-size: 14px;
  font-weight: 600;
  color: #172b4d;
  letter-spacing: -0.01em;
}

[data-theme="dark"] .column-title {
  color: #b6c2cf;
}

.column-counter {
  font-size: 12px;
  font-weight: 600;
  color: #626f86;
  background: transparent;
  padding: 0;
  border: none;
  margin-left: 2px;
}

[data-theme="dark"] .column-counter {
  color: #8c9bab;
}

.btn-quick-add {
  background: transparent;
  border: none;
  color: #626f86;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.btn-quick-add:hover {
  background: rgba(9, 30, 66, 0.08);
  color: #172b4d;
}

[data-theme="dark"] .btn-quick-add:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.kanban-cards-container {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
  padding: 2px 2px 6px 2px;
  border-radius: 8px;
  transition: background-color var(--transition-fast);
}

.kanban-cards-container.drag-over {
  background: rgba(9, 30, 66, 0.06);
  border-radius: 8px;
}

[data-theme="dark"] .kanban-cards-container.drag-over {
  background: rgba(255, 255, 255, 0.06);
}

.column-empty-placeholder {
  height: 100%;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 12.5px;
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-sm);
}

/* Trello-style Inline Card Composer */
.trello-inline-composer {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 8px 8px 10px 8px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  animation: trelloComposerIn 0.16s cubic-bezier(0.2, 0, 0, 1);
}

@keyframes trelloComposerIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.trello-inline-textarea {
  width: 100%;
  min-height: 56px;
  max-height: 160px;
  resize: vertical;
  background: var(--bg-page);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  padding: 8px 10px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.45;
  outline: none;
  box-sizing: border-box;
  display: block;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.trello-inline-textarea:focus {
  border-color: var(--brand-primary);
  background: var(--bg-surface);
  box-shadow: 0 0 0 2px hsla(209, 61%, 48%, 0.2);
}

.trello-inline-textarea::placeholder {
  color: var(--text-muted);
}

.trello-inline-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.btn-trello-add {
  background: var(--brand-primary);
  color: #ffffff;
  border: none;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background-color var(--transition-fast), transform 0.05s;
}

.btn-trello-add:hover {
  background: var(--brand-primary-dark);
}

.btn-trello-add:active {
  transform: scale(0.97);
}

.btn-trello-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: transparent;
  color: var(--text-soft);
  border: none;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-trello-cancel:hover {
  background: var(--border-light);
  color: var(--text-main);
}

.btn-trello-detail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-left: auto;
  background: var(--bg-subtle);
  color: var(--text-soft);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-trello-detail:hover {
  background: var(--brand-primary-light);
  color: var(--brand-primary-dark);
  border-color: var(--brand-primary);
  transform: scale(1.08);
}

/* Column footer add card button (like Trello) */
.btn-column-footer-add {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 8px 10px;
  margin-top: 8px;
  background: transparent;
  border: none;
  border-radius: var(--radius-xs);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
}

.btn-column-footer-add:hover {
  background: var(--bg-surface);
  color: var(--text-main);
  box-shadow: var(--shadow-xs);
}

[data-theme="dark"] .trello-inline-composer {
  background: var(--bg-surface-elevated);
  border-color: var(--border-strong);
}

[data-theme="dark"] .trello-inline-textarea {
  background: var(--bg-page);
  border-color: var(--border-medium);
}

[data-theme="dark"] .btn-trello-detail {
  background: var(--bg-surface);
  border-color: var(--border-medium);
}

/* Kanban Cards - Trello Style */
.kanban-card {
  position: relative;
  background: #ffffff;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 10px 6px 10px;
  box-shadow: 0 1px 1px rgba(9, 30, 66, 0.25), 0 0 1px rgba(9, 30, 66, 0.31);
  cursor: pointer;
  user-select: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
}

.kanban-card:hover {
  background: #ffffff;
  border-color: #85b8ff;
  box-shadow: 0 1px 3px rgba(9, 30, 66, 0.25), 0 0 1px rgba(9, 30, 66, 0.3);
}

[data-theme="dark"] .kanban-card {
  background: #22272b;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.5), 0 0 1px rgba(0, 0, 0, 0.6);
  border-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .kanban-card:hover {
  background: #282e33;
  border-color: #579dff;
}

.kanban-card:active {
  cursor: grabbing;
}

.kanban-card.is-dragging {
  opacity: 0.45;
  transform: rotate(2deg) scale(0.97);
}

/* Card Highlight & Pulse Effect when navigated from Dashboard */
@keyframes cardHighlightPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 hsla(209, 61%, 48%, 0.7), 0 0 20px hsla(209, 61%, 48%, 0.5);
    border-color: var(--brand-primary);
  }
  20% {
    transform: scale(1.045);
    box-shadow: 0 0 0 6px hsla(209, 61%, 48%, 0.5), 0 0 35px hsla(209, 61%, 48%, 0.65);
    border-color: var(--brand-primary);
  }
  40% {
    transform: scale(1.02);
    box-shadow: 0 0 0 12px hsla(209, 61%, 48%, 0.2), 0 0 25px hsla(209, 61%, 48%, 0.4);
    border-color: var(--brand-primary);
  }
  65% {
    transform: scale(1.04);
    box-shadow: 0 0 0 7px hsla(209, 61%, 48%, 0.4), 0 0 30px hsla(209, 61%, 48%, 0.5);
    border-color: var(--brand-primary);
  }
  100% {
    transform: scale(1);
    box-shadow: var(--shadow-sm);
    border-color: var(--border-medium);
  }
}

.kanban-card.card-highlight-pulse {
  animation: cardHighlightPulse 3.8s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
  z-index: 50 !important;
  position: relative !important;
  border-width: 2px !important;
  border-color: var(--brand-primary) !important;
  background: var(--bg-surface-elevated) !important;
}

[data-theme="dark"] .kanban-card.card-highlight-pulse {
  box-shadow: 0 0 0 6px hsla(209, 80%, 55%, 0.6), 0 0 40px hsla(209, 80%, 55%, 0.6) !important;
}

.card-highlight-beacon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, hsl(209, 85%, 45%), hsl(209, 90%, 35%));
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
  box-shadow: 0 2px 8px hsla(209, 85%, 45%, 0.4);
  animation: beaconFadeIn 0.3s var(--ease-spring);
  width: fit-content;
}

.card-highlight-beacon .beacon-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 6px #34d399;
  animation: liveDotPulse 1.2s infinite;
}

@keyframes beaconFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.card-apps-stack {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  max-width: 68%;
}

.task-details-apps-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.card-app-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-medium);
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  max-width: 160px;
}

.card-app-icon {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  object-fit: cover;
  flex-shrink: 0;
}

.card-app-name {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-priority-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}

.priority-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.task-priority-badge.priority-urgent {
  background: var(--danger-tint);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.task-priority-badge.priority-urgent .priority-dot {
  background: var(--danger);
  animation: pulseDot 1.5s infinite;
}

.task-priority-badge.priority-high {
  background: var(--warning-tint);
  color: var(--warning-dark);
  border: 1px solid var(--warning-border);
}

.task-priority-badge.priority-high .priority-dot {
  background: var(--warning);
}

.task-priority-badge.priority-medium {
  background: var(--brand-primary-light);
  color: var(--brand-primary-dark);
  border: 1px solid hsla(209, 61%, 48%, 0.25);
}

.task-priority-badge.priority-medium .priority-dot {
  background: var(--brand-primary);
}

.task-priority-badge.priority-low {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-medium);
}

.task-priority-badge.priority-low .priority-dot {
  background: var(--text-faint);
}

/* ---------- Trello Card Details & Sub-elements ---------- */

/* Quick-edit Pencil Button (appears on card hover, exactly like Trello) */
.trello-card-edit-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #f1f2f4;
  border: 1px solid rgba(9, 30, 66, 0.12);
  color: #44546f;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background-color 0.15s ease, color 0.15s ease;
  z-index: 5;
  box-shadow: 0 1px 2px rgba(9, 30, 66, 0.12);
}

.kanban-card:hover .trello-card-edit-btn,
.kanban-card.has-quick-menu-open .trello-card-edit-btn {
  opacity: 1;
}

.trello-card-edit-btn:hover {
  background: #e9ecef;
  color: #172b4d;
}

[data-theme="dark"] .trello-card-edit-btn {
  background: #2c333a;
  border-color: rgba(255, 255, 255, 0.12);
  color: #9fadbc;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .trello-card-edit-btn:hover {
  background: #38414a;
  color: #ffffff;
}

/* Trello Card Labels Row */
.trello-card-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
  padding-right: 22px; /* ensure clearance for edit pencil button */
}

.trello-card-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 18px;
  border-radius: 4px;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: none;
  cursor: default;
  transition: filter 0.15s ease;
}

.trello-card-label:hover {
  filter: brightness(0.95);
}

.trello-label-icon {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  object-fit: cover;
  flex-shrink: 0;
}

.trello-label-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Authentic Trello Signature Label Colors */
.trello-label-green {
  background-color: #baf3db;
  color: #164b35;
}
.trello-label-yellow {
  background-color: #f8e6a0;
  color: #533f04;
}
.trello-label-orange {
  background-color: #fedec8;
  color: #702e00;
}
.trello-label-red {
  background-color: #ffd5d2;
  color: #ae2a19;
}
.trello-label-purple {
  background-color: #dfd8fd;
  color: #352c63;
}
.trello-label-blue {
  background-color: #cce0ff;
  color: #0c66e4;
}
.trello-label-teal {
  background-color: #c1f0f5;
  color: #206b83;
}

/* Dark Mode Label Colors */
[data-theme="dark"] .trello-label-green {
  background-color: #216e4e;
  color: #baf3db;
}
[data-theme="dark"] .trello-label-yellow {
  background-color: #7f5f01;
  color: #f8e6a0;
}
[data-theme="dark"] .trello-label-orange {
  background-color: #a54800;
  color: #fedec8;
}
[data-theme="dark"] .trello-label-red {
  background-color: #ae2a19;
  color: #ffd5d2;
}
[data-theme="dark"] .trello-label-purple {
  background-color: #5e4db2;
  color: #dfd8fd;
}
[data-theme="dark"] .trello-label-blue {
  background-color: #0c66e4;
  color: #cce0ff;
}
[data-theme="dark"] .trello-label-teal {
  background-color: #206b83;
  color: #c1f0f5;
}

/* Main Card Content / Title */
.trello-card-text {
  font-size: 14px;
  line-height: 20px;
  color: #172b4d;
  font-weight: 400;
  word-break: break-word;
  padding-right: 18px; /* space for pencil button */
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

[data-theme="dark"] .trello-card-text {
  color: #b6c2cf;
}

.kanban-card.is-completed .trello-card-text {
  color: #626f86;
}

[data-theme="dark"] .kanban-card.is-completed .trello-card-text {
  color: #8c9bab;
}

.trello-card-check-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #22a06b;
  color: #ffffff;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Card Bottom Badges Row */
.trello-card-badges {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 6px;
  min-height: 22px;
  flex-wrap: wrap;
}

.trello-badges-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.trello-badges-right {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.trello-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  border-radius: 3px;
  padding: 0 5px;
  font-size: 11.5px;
  font-weight: 500;
  color: #626f86;
  user-select: none;
}

[data-theme="dark"] .trello-badge {
  color: #9fadbc;
}

.trello-badge-icon-only {
  padding: 0 3px;
}

.trello-badge-due {
  background: #091e420f;
  color: #44546f;
}

.trello-badge-due.is-overdue {
  background: #ffd5d2;
  color: #ae2a19;
  font-weight: 600;
}

.trello-badge-due.is-due-soon {
  background: #f8e6a0;
  color: #533f04;
  font-weight: 600;
}

.trello-badge-due.is-done {
  background: #baf3db;
  color: #164b35;
  font-weight: 600;
}

[data-theme="dark"] .trello-badge-due {
  background: rgba(255, 255, 255, 0.08);
  color: #9fadbc;
}
[data-theme="dark"] .trello-badge-due.is-overdue {
  background: #ae2a19;
  color: #ffd5d2;
}
[data-theme="dark"] .trello-badge-due.is-due-soon {
  background: #7f5f01;
  color: #f8e6a0;
}
[data-theme="dark"] .trello-badge-due.is-done {
  background: #216e4e;
  color: #baf3db;
}

/* Avatar Stack */
.trello-member-stack {
  display: flex;
  align-items: center;
  padding-left: 4px;
}

.trello-member-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #0c66e4;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  margin-left: -5px;
  box-shadow: 0 1px 2px rgba(9, 30, 66, 0.12);
  user-select: none;
}

.trello-member-avatar:first-child {
  margin-left: 0;
}

.trello-member-avatar.more {
  background: #44546f;
  font-size: 9px;
}

[data-theme="dark"] .trello-member-avatar {
  border-color: #22272b;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* ---------- Trello Quick Menu Popover (Screenshot 2) ---------- */
.trello-quick-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(1px);
  z-index: 9998;
}

.trello-quick-menu-container {
  position: fixed;
  z-index: 9999;
  animation: trelloPopIn 0.15s ease-out;
}

@keyframes trelloPopIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-4px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.trello-quick-menu {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 8px 24px -4px rgba(9, 30, 66, 0.25), 0 0 0 1px rgba(9, 30, 66, 0.08);
  padding: 6px;
  width: 236px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

[data-theme="dark"] .trello-quick-menu {
  background: #282e33;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.trello-quick-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border-radius: 6px;
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 500;
  color: #172b4d;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.12s ease;
  font-family: inherit;
}

.trello-quick-item svg {
  color: #44546f;
  flex-shrink: 0;
}

.trello-quick-item:hover {
  background: #091e420f;
  color: #172b4d;
}

[data-theme="dark"] .trello-quick-item {
  color: #b6c2cf;
}

[data-theme="dark"] .trello-quick-item svg {
  color: #9fadbc;
}

[data-theme="dark"] .trello-quick-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.trello-quick-item.item-danger {
  color: #ae2a19;
}

.trello-quick-item.item-danger svg {
  color: #ae2a19;
}

.trello-quick-item.item-danger:hover {
  background: #ffd5d2;
  color: #ae2a19;
}

[data-theme="dark"] .trello-quick-item.item-danger:hover {
  background: #ae2a19;
  color: #ffd5d2;
}

.trello-quick-section {
  padding: 6px 8px;
  margin: 2px 0;
  border-radius: 6px;
  background: #091e4208;
}

[data-theme="dark"] .trello-quick-section {
  background: rgba(255, 255, 255, 0.04);
}

.trello-quick-section-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #626f86;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 5px;
}

.trello-quick-chips-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.trello-chip {
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 6px;
  border-radius: 4px;
  border: 1px solid rgba(9, 30, 66, 0.12);
  background: #ffffff;
  color: #172b4d;
  cursor: pointer;
  text-align: center;
  transition: all 0.12s ease;
  font-family: inherit;
}

.trello-chip:hover {
  background: #f1f2f4;
  border-color: #85b8ff;
}

.trello-chip.active {
  background: #e9f2ff;
  border-color: #0c66e4;
  color: #0c66e4;
  font-weight: 700;
}

[data-theme="dark"] .trello-chip {
  background: #22272b;
  border-color: rgba(255, 255, 255, 0.12);
  color: #b6c2cf;
}

[data-theme="dark"] .trello-chip:hover {
  background: #2c333a;
  border-color: #579dff;
}

[data-theme="dark"] .trello-chip.active {
  background: #0c66e4;
  border-color: #579dff;
  color: #ffffff;
}

.trello-quick-divider {
  height: 1px;
  background: rgba(9, 30, 66, 0.08);
  margin: 4px 0;
}

[data-theme="dark"] .trello-quick-divider {
  background: rgba(255, 255, 255, 0.08);
}

/* ---------- Modals (AppModal & TaskModal) ---------- */
.modal-lg {
  max-width: 680px;
  width: 100%;
}

.modal-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.modal-close-btn:hover {
  color: var(--text-main);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.select-field {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-page);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
}

.select-field:focus {
  outline: none;
  border-color: var(--brand-primary);
}

.field-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.btn-add-link {
  font-size: 12.5px;
  color: var(--brand-primary);
}

.hint-inline {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.field-icon {
  position: absolute;
  left: 12px;
  font-size: 14px;
  pointer-events: none;
}

.input-with-icon input {
  padding-left: 36px;
}

/* Icon Upload & Preview */
.icon-upload-container {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-page);
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
}

.icon-preview-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.icon-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-placeholder {
  font-size: 24px;
}

.icon-upload-actions {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.upload-or {
  font-size: 12px;
  color: var(--text-muted);
}

.icon-url-field {
  flex: 1;
  min-width: 180px;
}

/* Extra links rows */
.extra-links-inputs-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.extra-links-empty {
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-page);
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-medium);
}

.extra-link-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.extra-link-title {
  width: 180px;
}

.extra-link-url {
  flex: 1;
}

.btn-icon-danger {
  width: 32px;
  height: 32px;
  background: none;
  border: 1px solid var(--danger-border);
  color: var(--danger);
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.btn-icon-danger:hover {
  background: var(--danger-tint);
}

/* Team Selection Checkboxes */
.team-selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  max-height: 180px;
  overflow-y: auto;
  padding: 4px;
}

.team-checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-page);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.team-checkbox-item:hover {
  border-color: var(--brand-primary);
}

.team-checkbox-item.selected {
  background: var(--brand-primary-light);
  border-color: var(--brand-primary);
}

.team-chip-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.team-chip-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.team-chip-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-chip-role {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Date Input Group */
.date-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-date-chips {
  display: flex;
  gap: 6px;
}

.date-chip {
  background: var(--bg-subtle);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xs);
  padding: 4px 8px;
  font-size: 11.5px;
  color: var(--text-soft);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.date-chip:hover {
  background: var(--brand-primary-light);
  color: var(--brand-primary-dark);
  border-color: var(--brand-primary);
}

.mention-hint-pill {
  font-size: 12px;
  color: var(--brand-primary);
  background: var(--brand-primary-light);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* ---------- Task Details Modal ---------- */
.task-details-modal {
  max-width: 760px;
}

.task-details-app-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 20px;
}

.banner-app-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.banner-app-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-xs);
  object-fit: cover;
}

.banner-app-fallback {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-xs);
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.banner-app-names {
  display: flex;
  flex-direction: column;
}

.banner-app-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.banner-app-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
}

.platform-tag {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
}

.banner-app-actions {
  display: flex;
  gap: 8px;
}

.task-details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.task-meta-pills-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.stage-selector-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.col-pill-select {
  padding: 4px 10px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-main);
  cursor: pointer;
}

.col-pill-select.col-todo {
  border-color: var(--border-strong);
}

.col-pill-select.col-in_progress {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.col-pill-select.col-in_review {
  border-color: var(--warning);
  color: var(--warning-dark);
}

.col-pill-select.col-done {
  border-color: var(--success);
  color: var(--success-dark);
}

.task-details-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 20px;
  line-height: 1.3;
}

.task-details-body-grid {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 24px;
}

.details-section {
  margin-bottom: 24px;
}

.section-heading {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.details-desc-box {
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-main);
}

/* Comments Thread */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

.comments-empty {
  font-size: 13px;
  color: var(--text-muted);
  padding: 14px;
  text-align: center;
  background: var(--bg-page);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-light);
}

.comment-item {
  display: flex;
  gap: 10px;
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.comment-content-box {
  flex: 1;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.comment-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.comment-author-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.comment-time {
  font-size: 11.5px;
  color: var(--text-muted);
}

.btn-delete-comment {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 0 4px;
}

.btn-delete-comment:hover {
  color: var(--danger);
}

.comment-body {
  font-size: 13.5px;
  color: var(--text-soft);
  line-height: 1.45;
}

.comment-add-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comment-input-wrap textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-medium);
  background: var(--bg-page);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 13.5px;
}

.comment-input-wrap textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
}

.comment-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.comment-hint {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Details Side Column */
.side-widget {
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.side-widget-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.side-assignees-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.side-assignee-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.side-assignee-info {
  display: flex;
  flex-direction: column;
}

.side-assignee-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.side-assignee-role {
  font-size: 11px;
  color: var(--text-muted);
}

.side-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  margin-bottom: 6px;
}

.side-meta-label {
  color: var(--text-muted);
}

.side-meta-val {
  font-weight: 500;
  color: var(--text-main);
}

.side-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.full-width {
  width: 100%;
}

/* ---------- Mention Badges & Autocomplete ---------- */
.mention-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 600;
  vertical-align: middle;
  line-height: 1.4;
}

.mention-pill.mention-app {
  background: hsla(209, 61%, 48%, 0.12);
  color: var(--brand-primary);
  border: 1px solid hsla(209, 61%, 48%, 0.25);
}

.mention-pill.mention-user {
  background: hsla(164, 53%, 36%, 0.12);
  color: var(--success-dark);
  border: 1px solid hsla(164, 53%, 36%, 0.25);
}

[data-theme="dark"] .mention-pill.mention-user {
  color: var(--success);
}

.mention-pill-icon {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  object-fit: cover;
}

.mention-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.mention-pill-dot.app-dot {
  background: var(--brand-primary);
}

.mention-pill-avatar {
  font-size: 10px;
  background: var(--success);
  color: #fff;
  padding: 0 4px;
  border-radius: var(--radius-full);
}

/* Floating Mention Dropdown */
.mention-dropdown {
  position: absolute;
  z-index: 1000;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-modal);
  padding: 4px;
  max-height: 240px;
  overflow-y: auto;
  display: none;
  backdrop-filter: blur(8px);
}

.mention-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.mention-item:hover, .mention-item.active {
  background: var(--brand-primary-light);
}

.mention-item-icon {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  object-fit: cover;
}

.mention-badge-app {
  font-size: 16px;
}

.mention-badge-user {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mention-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mention-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.mention-item-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.mention-item-type {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ---------- Responsive Breakpoints ---------- */
@media (max-width: 900px) {
  .dash-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dash-columns {
    grid-template-columns: 1fr;
  }
  .kanban-board {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
  }
  .task-details-body-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  header.appbar {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .header-left {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }
  .app-nav {
    overflow-x: auto;
    max-width: 100%;
  }
  .nav-tab-btn {
    padding: 6px 10px;
    font-size: 12.5px;
  }
  .nav-tab-btn span {
    display: none;
  }
  .who-role {
    display: none;
  }
  .header-profile-btn span {
    display: none;
  }
  .header-profile-btn {
    padding: 7px 9px !important;
  }
  .form-row-2 {
    grid-template-columns: 1fr;
  }
  main.app-main {
    padding: 18px 14px 60px;
  }
  .dash-kpi-grid {
    grid-template-columns: 1fr;
  }
  .dash-hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 18px;
  }
  .dash-hero-actions {
    width: 100%;
  }
  .dash-hero-actions .btn {
    flex: 1;
  }
  .kanban-board {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 24px 20px;
  }
  .hero-clock {
    font-size: 42px;
  }
  .punch {
    flex-direction: column;
    gap: 8px;
  }
  .punch-time {
    min-width: auto;
  }
  .ledger-row summary {
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 16px;
  }
  .ledger-duration {
    margin-left: 0;
    width: 100%;
  }
  .modal {
    padding: 24px 18px 18px;
  }
  .modal-actions-split {
    flex-direction: column-reverse;
    gap: 12px;
  }
  .modal-actions-split .btn-danger-text {
    width: 100%;
    justify-content: center;
  }
  .modal-actions-right {
    width: 100%;
    justify-content: flex-end;
  }
}

/* Modal App Preview */
.modal-app-preview {
  margin-top: 6px;
  min-height: 22px;
}

.selected-app-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--brand-primary-light, #f0f9ff);
  border: 1px solid var(--border-medium);
  padding: 3px 9px;
  border-radius: var(--radius-xs);
  font-size: 11.5px;
}

[data-theme="dark"] .selected-app-chip {
  background: var(--brand-primary-tint);
}

.chip-app-icon {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  object-fit: cover;
}

.chip-app-fallback {
  font-size: 13px;
  line-height: 1;
}

.chip-app-name {
  font-weight: 600;
  color: var(--text-main);
}

.chip-app-platform {
  font-size: 10px;
  color: var(--text-muted);
  background: var(--bg-surface);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid var(--border-light);
}

/* ==========================================================================
   Clean Admin Quick Task Bar (Directly under Good Morning)
   ========================================================================== */
.dash-quick-task-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 6px 8px 6px 16px;
  box-shadow: var(--shadow-sm);
  margin-top: 14px;
  margin-bottom: 6px;
  transition: all var(--transition-fast);
}

.dash-quick-task-bar:focus-within {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-md), 0 0 0 3px var(--brand-glow);
}

.quick-task-input-clean {
  flex: 1;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-main);
  outline: none;
  padding: 7px 0;
  min-width: 0;
}

.quick-task-input-clean::placeholder {
  color: var(--text-faint);
}

.btn-quick-clean {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 18px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  border: none;
  background: var(--brand-primary);
  color: #fff;
  transition: all var(--transition-fast);
}

.btn-quick-clean:hover {
  background: var(--brand-primary-dark);
  transform: translateY(-1px);
}

.btn-quick-clean:active {
  transform: translateY(0);
}

.btn-quick-clean:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* ==========================================================================
   TOP NOTIFICATION BANNER & REALTIME ALERTS
   ========================================================================== */

.top-notification-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  max-width: 520px;
  width: calc(100% - 32px);
}

.top-notification-banner {
  pointer-events: auto;
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 13px 15px;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.16), 0 4px 12px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  animation: bannerSlideDown 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.top-notification-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px -4px rgba(15, 23, 42, 0.22), 0 6px 14px rgba(15, 23, 42, 0.08);
}

.top-notification-banner.dismissing {
  animation: bannerSlideUp 0.25s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes bannerSlideDown {
  from {
    opacity: 0;
    transform: translateY(-26px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes bannerSlideUp {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-24px) scale(0.95);
  }
}

.banner-icon-col {
  flex-shrink: 0;
}

.banner-bell-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, hsl(215, 90%, 56%), hsl(225, 85%, 48%));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.32);
}

.banner-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.banner-top-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.banner-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--brand-primary);
}

.banner-app-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--bg-subtle);
  padding: 1px 7px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-light);
}

.banner-app-pill img {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  object-fit: cover;
}

.banner-priority-pill {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
}

.banner-time {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--text-muted);
}

.banner-task-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.banner-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: 6px;
}

.btn-banner-view {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--brand-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-banner-view:hover {
  background: var(--brand-primary-dark);
  transform: translateY(-1px);
}

.btn-banner-close {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-soft);
  border: none;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-banner-close:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.banner-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2.5px;
  background: linear-gradient(90deg, var(--brand-primary), #60a5fa);
  width: 100%;
  animation: bannerProgress 7s linear forwards;
}

@keyframes bannerProgress {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

/* ==========================================================================
   HEADER NOTIFICATION BELL & DROPDOWN PANEL
   ========================================================================== */

.notifications-wrapper {
  position: relative;
}

.notifications-toggle-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-subtle);
  color: var(--text-soft);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.notifications-toggle-btn:hover {
  background: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-sm);
}

.notifications-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: #ef4444;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-surface);
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
  line-height: 1;
  pointer-events: none;
}

.notifications-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 380px;
  max-width: calc(100vw - 32px);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: 0 22px 50px -8px rgba(15, 23, 42, 0.25), 0 8px 18px rgba(15, 23, 42, 0.1);
  z-index: 2500;
  display: flex;
  flex-direction: column;
  max-height: 480px;
  overflow: hidden;
  animation: notifPanelFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes notifPanelFade {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.notif-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-subtle);
}

.notif-header-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notif-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
}

.notif-unread-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
}

.notif-unread-pill.has-unread {
  background: hsla(215, 90%, 56%, 0.15);
  color: var(--brand-primary);
  border: 1px solid hsla(215, 90%, 56%, 0.25);
}

.notif-unread-pill.zero-unread {
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}

.notif-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.notif-action-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.notif-action-icon-btn:hover {
  background: var(--bg-surface);
  color: var(--text-main);
}

.notif-action-icon-btn.active {
  color: var(--brand-primary);
  border-color: hsla(215, 90%, 56%, 0.35);
  background: hsla(215, 90%, 56%, 0.08);
}

.notif-action-text-btn {
  background: transparent;
  border: none;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: var(--radius-xs);
  transition: all var(--transition-fast);
}

.notif-action-text-btn:hover {
  color: var(--brand-primary);
  background: var(--bg-surface);
}

.notif-list {
  flex: 1;
  overflow-y: auto;
  max-height: 400px;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition-fast);
  position: relative;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item:hover {
  background: var(--bg-subtle);
}

.notif-item.unread {
  background: hsla(215, 90%, 56%, 0.04);
}

.notif-item.unread:hover {
  background: hsla(215, 90%, 56%, 0.08);
}

.notif-item-icon-wrap {
  flex-shrink: 0;
  margin-top: 2px;
}

.notif-item-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.notif-item-icon.icon-task-new {
  background: hsla(215, 90%, 56%, 0.14);
  color: var(--brand-primary);
}

.notif-item-icon.icon-task-comment {
  background: hsla(160, 84%, 39%, 0.14);
  color: hsl(160, 84%, 35%);
}

.notif-item-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.notif-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.notif-item-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
}

.notif-item-time {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.notif-item-text {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.notif-item-app {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-light);
}

.notif-item-priority {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: var(--radius-xs);
}

.notif-unread-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--brand-primary);
  flex-shrink: 0;
  margin-top: 7px;
  box-shadow: 0 0 6px var(--brand-primary);
}

.notif-empty {
  padding: 36px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.notif-empty-icon {
  font-size: 28px;
  margin-bottom: 4px;
}

.notif-empty-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.notif-empty-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0;
  max-width: 260px;
  line-height: 1.4;
}

/* Dark Theme Overrides for Notifications */
[data-theme="dark"] .top-notification-banner {
  box-shadow: 0 20px 48px -4px rgba(0, 0, 0, 0.65), 0 6px 18px rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .notifications-panel {
  box-shadow: 0 24px 54px -8px rgba(0, 0, 0, 0.7), 0 8px 20px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.12);
}



