/* =============================================================
   NetAke نت ابايك — Main CSS
   Full RTL-first stylesheet for Virtual AI Company SPA
   ============================================================= */

/* ─────────────────────────────────────────────────────────────
   1. CSS CUSTOM PROPERTIES
───────────────────────────────────────────────────────────── */
:root {
  /* Brand colors */
  --color-primary:    #4A90D9;
  --color-secondary:  #7B68EE;
  --color-accent:     #00D4AA;
  --color-danger:     #FF4F4F;
  --color-warning:    #FF6B35;
  --color-info:       #3498DB;
  --color-success:    #00D4AA;

  /* Backgrounds */
  --bg-dark:          #0A0E1A;
  --bg-mid:           #0F1526;
  --bg-panel:         rgba(15, 20, 35, 0.92);
  --bg-panel-hover:   rgba(20, 28, 50, 0.96);
  --bg-input:         rgba(255, 255, 255, 0.05);
  --bg-glass:         rgba(15, 20, 40, 0.75);

  /* Text */
  --text-primary:     #E8EEFF;
  --text-secondary:   #8A95B0;
  --text-muted:       #4A5168;
  --text-accent:      var(--color-primary);

  /* Borders */
  --border-color:     rgba(100, 120, 180, 0.2);
  --border-active:    rgba(74, 144, 217, 0.5);
  --border-hover:     rgba(100, 120, 200, 0.4);

  /* Shadows & effects */
  --shadow-glow:      0 0 20px rgba(74, 144, 217, 0.3);
  --shadow-panel:     0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-btn:       0 4px 15px rgba(74, 144, 217, 0.4);
  --shadow-text:      0 0 12px rgba(74, 144, 217, 0.6);

  /* Typography */
  --font-ar:          'Noto Sans Arabic', 'Segoe UI', sans-serif;
  --font-en:          'Inter', 'Segoe UI', sans-serif;

  /* Layout */
  --radius:           12px;
  --radius-sm:        8px;
  --radius-lg:        16px;
  --radius-pill:      999px;

  /* Transitions */
  --transition:       0.25s ease;
  --transition-slow:  0.4s ease;
  --transition-fast:  0.15s ease;

  /* Dimensions */
  --top-bar-h:        56px;
  --sidebar-w:        320px;
  --chat-h:           230px;
  --chat-h-expanded:  55vh;
  --status-bar-h:     32px;
  --notif-panel-w:    380px;

  /* Gradients */
  --gradient-brand:   linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  --gradient-accent:  linear-gradient(135deg, var(--color-secondary) 0%, var(--color-accent) 100%);
  --gradient-dark:    linear-gradient(180deg, #0A0E1A 0%, #0D1428 100%);

  /* Glass morphism base */
  --glass-bg:         rgba(15, 20, 40, 0.75);
  --glass-blur:       20px;
  --glass-border:     1px solid rgba(100, 120, 180, 0.15);
  --glass-shadow:     0 8px 32px rgba(0, 0, 0, 0.5);

  /* Status colors */
  --status-available: #00D4AA;
  --status-busy:      #FF6B35;
  --status-on-break:  #FFC107;
  --status-meeting:   #7B68EE;
  --status-learning:  #3498DB;

  /* Z-index stack */
  --z-canvas:         0;
  --z-tags:           5;
  --z-ui:             10;
  --z-sidebar:        20;
  --z-topbar:         30;
  --z-statusbar:      30;
  --z-chat:           30;
  --z-notif:          40;
  --z-tasks:          50;
  --z-modal:          100;
  --z-toast:          200;
  --z-loading:        999;
}

/* Light theme overrides */
body.light-theme {
  --bg-dark:        #EEF2FB;
  --bg-mid:         #E4E9F7;
  --bg-panel:       rgba(230, 235, 250, 0.95);
  --bg-glass:       rgba(220, 228, 248, 0.85);
  --bg-input:       rgba(255, 255, 255, 0.7);
  --text-primary:   #1A2040;
  --text-secondary: #4A5580;
  --text-muted:     #8A95B0;
  --border-color:   rgba(74, 100, 180, 0.2);
  --bg-panel-hover: rgba(210, 218, 245, 0.98);
  --glass-bg:       rgba(230, 235, 250, 0.82);
}

/* English font override */
body.lang-en {
  font-family: var(--font-en);
}


/* ─────────────────────────────────────────────────────────────
   2. RESET & BASE
───────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-ar);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  direction: rtl;
  min-height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

/* Keep direction RTL even in EN mode */
body.lang-en {
  direction: rtl;
  font-family: var(--font-en);
}

/* English text nodes switch to LTR only within specific containers */
body.lang-en [data-i18n] {
  /* Content changed to English but layout remains RTL */
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-secondary);
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  outline: none;
  background: none;
}

button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

input,
select,
textarea {
  font-family: inherit;
  color: var(--text-primary);
}

ul, ol {
  list-style: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* ─────────────────────────────────────────────────────────────
   3. CUSTOM SCROLLBARS (WebKit)
───────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: var(--radius-pill);
  opacity: 0.6;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-secondary);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary) rgba(0, 0, 0, 0.2);
}


/* ─────────────────────────────────────────────────────────────
   4. UTILITY CLASSES
───────────────────────────────────────────────────────────── */
.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  position: relative;
  flex-shrink: 0;
}

.icon-btn:hover {
  background: rgba(74, 144, 217, 0.12);
  color: var(--text-primary);
}

.icon-btn:active {
  transform: scale(0.93);
}

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

.btn--primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: var(--shadow-btn);
}

.btn--primary:hover {
  box-shadow: 0 6px 20px rgba(74, 144, 217, 0.5);
  transform: translateY(-1px);
}

.btn--secondary {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn--secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-hover);
}

.btn--warning {
  background: rgba(255, 107, 53, 0.15);
  border-color: rgba(255, 107, 53, 0.4);
  color: var(--color-warning);
}

.btn--warning:hover {
  background: rgba(255, 107, 53, 0.25);
}

.btn--danger {
  background: rgba(255, 79, 79, 0.12);
  border-color: rgba(255, 79, 79, 0.35);
  color: var(--color-danger);
}

.btn--danger:hover {
  background: rgba(255, 79, 79, 0.22);
}

.panel-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

.panel-close-btn {
  color: var(--text-secondary);
}

.panel-close-btn:hover {
  color: var(--color-danger);
}

/* Skeleton loader */
.skeleton-line {
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  margin-bottom: 6px;
}

.skeleton-line--wide  { width: 70%; }
.skeleton-line--narrow { width: 45%; }


/* ─────────────────────────────────────────────────────────────
   5. KEYFRAME ANIMATIONS
───────────────────────────────────────────────────────────── */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes spinReverse {
  from { transform: rotate(360deg); }
  to   { transform: rotate(0deg); }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@keyframes slideInRight {
  from { transform: translateX(40px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

@keyframes slideInLeft {
  from { transform: translateX(-40px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}

@keyframes slideInUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

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

@keyframes pulse {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%       { transform: scale(1.05); opacity: 0.8; }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 10px rgba(74, 144, 217, 0.3); }
  50%       { box-shadow: 0 0 25px rgba(74, 144, 217, 0.7), 0 0 50px rgba(123, 104, 238, 0.3); }
}

@keyframes progressPulse {
  0%   { transform: scaleX(0.98); }
  50%  { transform: scaleX(1.01); }
  100% { transform: scaleX(0.98); }
}

@keyframes progressShimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

@keyframes toastIn {
  from {
    transform: translateX(-40px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toastOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-40px);
    opacity: 0;
  }
}

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

@keyframes badgePop {
  0%   { transform: scale(0.6); }
  70%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}

@keyframes tagFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-3px); }
}


/* ─────────────────────────────────────────────────────────────
   6. APP CONTAINER
───────────────────────────────────────────────────────────── */
#app-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-dark);
}


/* ─────────────────────────────────────────────────────────────
   7. LOADING SCREEN
───────────────────────────────────────────────────────────── */
#loading-screen {
  position: absolute;
  inset: 0;
  z-index: var(--z-loading);
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 60%, #0F1A3A 0%, #060910 70%, #020408 100%);
  animation: fadeIn 0.3s ease;
}

#loading-screen.fade-out {
  animation: fadeOut 0.6s ease forwards;
  pointer-events: none;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  padding: 40px 32px;
}

/* Logo wrapper */
.logo-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: pulse 3s ease-in-out infinite;
}

.logo-wrapper::before {
  content: '';
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 144, 217, 0.15) 0%, transparent 70%);
  animation: glow 2s ease-in-out infinite;
}

.netake-logo {
  filter: drop-shadow(0 0 16px rgba(74, 144, 217, 0.5));
  animation: fadeIn 0.8s ease 0.2s both;
}

/* Loading titles */
.loading-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: slideInUp 0.5s ease 0.3s both;
}

.loading-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  animation: slideInUp 0.5s ease 0.4s both;
}

/* Spinner rings */
.spinner-wrapper {
  position: relative;
  width: 56px;
  height: 56px;
  margin: 8px 0;
  animation: fadeIn 0.5s ease 0.5s both;
}

.spinner-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2.5px solid transparent;
  border-top-color: var(--color-primary);
  border-left-color: var(--color-secondary);
  animation: spin 1.1s linear infinite;
}

.spinner-ring--delay {
  inset: 8px;
  border-top-color: var(--color-secondary);
  border-left-color: var(--color-accent);
  animation: spinReverse 0.9s linear infinite;
  opacity: 0.7;
}

/* Progress bar */
.loading-progress-track {
  width: 240px;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
  animation: fadeIn 0.5s ease 0.6s both;
}

.loading-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg,
    var(--color-primary) 0%,
    var(--color-secondary) 50%,
    var(--color-accent) 100%
  );
  background-size: 200% 100%;
  transition: width 0.4s ease;
  animation: progressShimmer 1.8s linear infinite;
  position: relative;
}

.loading-progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,0.3) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

/* Loading text */
.loading-text {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 500;
  animation: fadeIn 0.5s ease 0.7s both;
}

.loading-step-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  min-height: 1.2em;
  animation: fadeIn 0.5s ease 0.8s both;
  transition: opacity var(--transition);
}


/* ─────────────────────────────────────────────────────────────
   8. CANVAS CONTAINER
───────────────────────────────────────────────────────────── */
#canvas-container {
  position: absolute;
  inset: 0;
  z-index: var(--z-canvas);
  overflow: hidden;
}

#canvas-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}


/* ─────────────────────────────────────────────────────────────
   9. UI OVERLAY
───────────────────────────────────────────────────────────── */
#ui-overlay {
  position: absolute;
  inset: 0;
  z-index: var(--z-ui);
  pointer-events: none;
  /* Children with pointer-events: auto will be interactive */
}


/* ─────────────────────────────────────────────────────────────
   10. TOP BAR
───────────────────────────────────────────────────────────── */
#top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--top-bar-h);
  z-index: var(--z-topbar);
  pointer-events: auto;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: var(--glass-border);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* RTL: flex-direction row-reverse puts brand on RIGHT, actions on LEFT */
  flex-direction: row-reverse;
  height: 100%;
  padding: 0 16px;
  gap: 12px;
}

/* Brand (visually right due to RTL) */
.top-bar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.top-logo-mini {
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(74, 144, 217, 0.4));
}

.company-name {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
  text-shadow: none;
}

/* Actions (visually left due to RTL) */
.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-direction: row-reverse;
}

/* ─────────────────────────────────────────────────────────────
   10.1 CAMERA VIEW PRESETS TOOLBAR
───────────────────────────────────────────────────────────── */
#camera-presets-bar {
  position: fixed;
  top: calc(var(--top-bar-h) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: calc(var(--z-topbar) - 1);
  pointer-events: auto;
}

.camera-presets-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  max-width: 90vw;
  overflow-x: auto;
  scrollbar-width: none;
}

.camera-presets-inner::-webkit-scrollbar {
  display: none;
}

body.light-theme .camera-presets-inner {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(74, 100, 180, 0.18);
  box-shadow: 0 8px 24px rgba(74, 100, 180, 0.15);
}

.cam-preset-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

body.light-theme .cam-preset-btn {
  background: rgba(0, 0, 0, 0.04);
  color: #1e293b;
}

.cam-preset-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

body.light-theme .cam-preset-btn:hover {
  background: rgba(74, 144, 217, 0.1);
  color: var(--color-primary);
}

.cam-preset-btn.active {
  background: linear-gradient(135deg, rgba(74, 144, 217, 0.25), rgba(0, 212, 170, 0.25));
  border-color: rgba(74, 144, 217, 0.6);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(74, 144, 217, 0.3);
}

body.light-theme .cam-preset-btn.active {
  background: linear-gradient(135deg, rgba(74, 144, 217, 0.15), rgba(0, 212, 170, 0.15));
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}

.cam-preset-icon {
  font-size: 0.95rem;
}

.cam-preset-text {
  font-size: 0.8rem;
}

/* Language Toggle Button */
.lang-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: rgba(74, 144, 217, 0.1);
  border: 1px solid rgba(74, 144, 217, 0.3);
  color: var(--color-primary);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: all var(--transition-fast);
  pointer-events: auto;
}

.lang-toggle-btn:hover {
  background: rgba(74, 144, 217, 0.2);
  border-color: rgba(74, 144, 217, 0.5);
  box-shadow: 0 0 12px rgba(74, 144, 217, 0.3);
}

.lang-label { font-weight: 700; }
.lang-divider { opacity: 0.4; }

/* Notification bell */
.notif-btn {
  position: relative;
}

.notif-badge {
  position: absolute;
  top: 2px;
  left: 2px;      /* RTL: badge appears top-left */
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--color-danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: badgePop 0.3s ease;
  pointer-events: none;
  line-height: 1;
}

/* Sidebar toggle */
.sidebar-toggle-btn {
  transition: all var(--transition-fast);
}

.sidebar-toggle-btn.sidebar-open svg {
  transform: rotate(90deg);
}


/* ─────────────────────────────────────────────────────────────
   11. RIGHT SIDEBAR  (RTL = visually LEFT side)
───────────────────────────────────────────────────────────── */
#right-sidebar {
  position: fixed;
  left: 0;                     /* RTL: sidebar on left */
  top: var(--top-bar-h);
  bottom: calc(var(--chat-h) + var(--status-bar-h));
  width: var(--sidebar-w);
  z-index: var(--z-sidebar);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-right: var(--glass-border);  /* RTL: border on right edge of sidebar */
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
  animation: slideInLeft 0.3s ease;
  transition: transform var(--transition), width var(--transition);
  overflow: hidden;
}

#right-sidebar.collapsed {
  width: 56px;
}

#right-sidebar.sidebar-hidden {
  transform: translateX(-100%);
}

/* Sidebar Tab Buttons */
.sidebar-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.15);
}

.sidebar-tab {
  flex: 1;
  padding: 12px 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
  text-align: center;
  letter-spacing: 0.03em;
}

.sidebar-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  background: rgba(74, 144, 217, 0.08);
}

/* Sidebar Panels */
.sidebar-panels {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.tab-panel {
  padding: 16px;
  animation: fadeIn var(--transition);
}

.tab-panel.hidden {
  display: none;
}

/* Panel Section */
.panel-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.panel-placeholder-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Permissions */
.permission-employee-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.perm-skeleton-item {
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  animation: shimmer 1.5s infinite;
  background-size: 200% 100%;
}

.permission-detail {
  background: rgba(74, 144, 217, 0.06);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.perm-detail-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.perm-toggles {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Settings Form Controls */
.setting-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.setting-group--toggle {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

.setting-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.setting-value-display {
  color: var(--color-primary);
  font-weight: 700;
}

.setting-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 8px 12px;
  font-size: 0.84rem;
  cursor: pointer;
  transition: border-color var(--transition-fast);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238A95B0' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 10px center;  /* RTL: arrow on left */
  padding-left: 32px;
}

.setting-select:hover,
.setting-select:focus {
  border-color: var(--color-primary);
  outline: none;
  background-color: rgba(74, 144, 217, 0.08);
}

/* Range Slider */
.setting-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  outline: none;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.setting-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gradient-brand);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(74, 144, 217, 0.5);
  transition: transform var(--transition-fast);
}

.setting-range::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.setting-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
}

.range-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: var(--text-muted);
  padding: 0 2px;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  transition: background var(--transition-fast);
  border: 1px solid var(--border-color);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 16px;
  width: 16px;
  right: 3px;    /* RTL: start on right */
  top: 2px;
  border-radius: 50%;
  background: var(--text-secondary);
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.toggle-switch input:checked + .toggle-slider {
  background: rgba(74, 144, 217, 0.3);
  border-color: var(--color-primary);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(-18px);  /* RTL: move left when checked */
  background: var(--color-primary);
}

/* Monitor search */
.monitor-filter-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.monitor-search {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 7px 10px;
  font-size: 0.82rem;
  transition: border-color var(--transition-fast);
  direction: rtl;
}

.monitor-search:focus {
  outline: none;
  border-color: var(--color-primary);
}

.monitor-search::placeholder {
  color: var(--text-muted);
}


/* ─────────────────────────────────────────────────────────────
   12. EMPLOYEE MONITOR ITEMS
───────────────────────────────────────────────────────────── */
.employee-monitor-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.employee-monitor-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all var(--transition-fast);
  animation: fadeIn var(--transition);
}

.employee-monitor-item:hover {
  background: rgba(74, 144, 217, 0.08);
  border-color: var(--border-hover);
}

.employee-monitor-item.skeleton {
  pointer-events: none;
  animation: shimmer 1.5s infinite;
  background-size: 200% 100%;
}

/* Avatar circle */
.emp-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Status dot on avatar */
.emp-status-dot {
  position: absolute;
  bottom: 1px;
  left: 1px;     /* RTL: dot on left */
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--bg-panel);
  animation: statusPulse 2s ease-in-out infinite;
}

/* Employee info */
.emp-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.emp-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.emp-role-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: rgba(74, 144, 217, 0.12);
  border: 1px solid rgba(74, 144, 217, 0.25);
  color: var(--color-primary);
  font-size: 0.68rem;
  font-weight: 500;
  white-space: nowrap;
}

/* Emotion Bars — 5 mini horizontal bars */
.emp-emotion-bars {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}

.emotion-bar-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.emotion-bar-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  width: 30px;
  flex-shrink: 0;
  text-align: start;
}

.emotion-bar-track {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.emotion-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 0.6s ease;
}

/* Individual emotion colors */
.emotion-bar-fill--energy  { background: #4A90D9; }
.emotion-bar-fill--focus   { background: #7B68EE; }
.emotion-bar-fill--mood    { background: #00D4AA; }
.emotion-bar-fill--stress  { background: #FF6B35; }
.emotion-bar-fill--social  { background: #FFC107; }

/* Status dot colors */
.status-available  { background: var(--status-available); }
.status-busy       { background: var(--status-busy); }
.status-on_break   { background: var(--status-on-break); }
.status-in_meeting { background: var(--status-meeting); }
.status-learning   { background: var(--status-learning); }


/* ─────────────────────────────────────────────────────────────
   13. BOTTOM CHAT
───────────────────────────────────────────────────────────── */
#bottom-chat {
  position: fixed;
  bottom: var(--status-bar-h);
  left: 0;
  right: 0;
  height: var(--chat-h);
  z-index: var(--z-chat);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-top: var(--glass-border);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4);
  transition: height var(--transition-slow);
}

#bottom-chat.expanded {
  height: var(--chat-h-expanded);
}

/* Chat History */
#chat-history {
  flex: 1;
  overflow-y: auto;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Chat message bubbles */
.chat-message {
  display: flex;
  gap: 8px;
  animation: slideInUp 0.2s ease;
  max-width: 75%;
}

/* Owner messages — right side, purple */
.chat-message--owner {
  align-self: flex-end;
  flex-direction: row-reverse;
}

/* Employee messages — left side, blue */
.chat-message--employee {
  align-self: flex-start;
}

/* System messages */
.chat-message--system {
  align-self: center;
  max-width: 90%;
}

.chat-system-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

/* Chat avatar */
.chat-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  align-self: flex-end;
}

/* Bubble */
.chat-bubble {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-bubble-content {
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 0.84rem;
  line-height: 1.5;
  word-break: break-word;
  position: relative;
}

.chat-message--owner .chat-bubble-content {
  background: rgba(123, 104, 238, 0.25);
  border: 1px solid rgba(123, 104, 238, 0.35);
  border-radius: var(--radius) 4px var(--radius) var(--radius);
  color: var(--text-primary);
}

.chat-message--employee .chat-bubble-content {
  background: rgba(74, 144, 217, 0.18);
  border: 1px solid rgba(74, 144, 217, 0.3);
  border-radius: 4px var(--radius) var(--radius) var(--radius);
  color: var(--text-primary);
}

.chat-timestamp {
  font-size: 0.65rem;
  color: var(--text-muted);
  align-self: flex-end;
  padding: 0 4px;
}

.chat-sender-name {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 600;
  padding: 0 4px;
}

/* Chat Input Row */
#chat-input-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 12px 10px;
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
}

.mention-container {
  position: relative;
  flex-shrink: 0;
}

.mention-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(74, 144, 217, 0.12);
  border: 1px solid rgba(74, 144, 217, 0.3);
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.mention-btn:hover {
  background: rgba(74, 144, 217, 0.22);
  box-shadow: 0 0 10px rgba(74, 144, 217, 0.3);
}

/* @mention dropdown */
.mention-dropdown {
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;    /* RTL */
  width: 200px;
  background: var(--bg-panel);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-panel);
  animation: slideInUp 0.15s ease;
  z-index: 10;
  max-height: 200px;
  overflow-y: auto;
}

.mention-dropdown[hidden] { display: none; }

.mention-dropdown li {
  padding: 8px 12px;
  font-size: 0.82rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
}

.mention-dropdown li:hover {
  background: rgba(74, 144, 217, 0.1);
}

.mention-dropdown li .mention-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Attach button */
.attach-btn {
  flex-shrink: 0;
  color: var(--text-secondary);
}

/* Mic Listening Status Bar */
.mic-status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(239, 68, 68, 0.12);
  border-top: 1px solid rgba(239, 68, 68, 0.25);
  color: #ef4444;
  font-size: 0.82rem;
  font-weight: 600;
  animation: fadeIn 0.2s ease;
}

.mic-status-bar[hidden] {
  display: none !important;
}

.mic-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444;
  animation: pulse 1s infinite;
}

/* Microphone Button */
.mic-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(74, 144, 217, 0.12);
  border: 1px solid rgba(74, 144, 217, 0.25);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mic-btn:hover {
  background: rgba(74, 144, 217, 0.22);
  color: var(--color-primary);
  transform: scale(1.05);
}

.mic-btn.recording {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
  animation: pulse 1.2s infinite;
}

.mic-recording-pulse {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 8px #ef4444;
}

/* Chat Textarea - Enlarged & Enhanced */
.chat-textarea {
  flex: 1;
  resize: none;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  padding: 10px 16px;
  font-size: 0.95rem;
  line-height: 1.5;
  min-height: 46px;
  max-height: calc(5 * 1.5em + 20px);
  overflow-y: auto;
  direction: rtl;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.chat-textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.2);
}

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

/* Send Button - Enlarged */
.chat-send-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--gradient-brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 10px rgba(74, 144, 217, 0.4);
}

.chat-send-btn:hover {
  box-shadow: 0 4px 16px rgba(74, 144, 217, 0.6);
  transform: scale(1.05);
}

.chat-send-btn:active {
  transform: scale(0.95);
}


/* ─────────────────────────────────────────────────────────────
   14. NOTIFICATIONS PANEL
───────────────────────────────────────────────────────────── */
#notifications-panel {
  position: fixed;
  top: var(--top-bar-h);
  left: var(--sidebar-w);   /* RTL: appears left of sidebar */
  width: var(--notif-panel-w);
  max-height: 70vh;
  z-index: var(--z-notif);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  border-radius: 0 0 var(--radius) var(--radius);
  animation: notifPanelIn 0.2s ease;
  overflow: hidden;
}

#notifications-panel.hidden {
  display: none;
}

.notif-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.1);
}

.notif-panel-header .panel-title {
  flex: 1;
}

.notif-mark-all {
  font-size: 0.72rem;
  width: auto;
  padding: 4px 8px;
  color: var(--color-primary);
  font-weight: 600;
}

/* Notification list */
.notif-list {
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.notif-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.notif-item {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background var(--transition-fast);
  animation: slideInDown 0.2s ease;
}

.notif-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.notif-item.unread {
  background: rgba(74, 144, 217, 0.06);
}

.notif-item.unread::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--color-primary);
  border-radius: var(--radius-pill);
}

.notif-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.notif-icon--task     { background: rgba(74, 144, 217, 0.15); }
.notif-icon--message  { background: rgba(0, 212, 170, 0.15); }
.notif-icon--alert    { background: rgba(255, 107, 53, 0.15); }
.notif-icon--system   { background: rgba(123, 104, 238, 0.15); }

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

.notif-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.notif-time {
  font-size: 0.65rem;
  color: var(--text-muted);
  align-self: flex-start;
  flex-shrink: 0;
}


/* ─────────────────────────────────────────────────────────────
   15. TASKS CENTER
───────────────────────────────────────────────────────────── */
#tasks-center {
  position: fixed;
  top: var(--top-bar-h);
  left: 0;
  right: 0;
  bottom: calc(var(--chat-h) + var(--status-bar-h));
  z-index: var(--z-tasks);
  pointer-events: auto;
  overflow: hidden;
  animation: fadeIn var(--transition);
}

#tasks-center.hidden {
  display: none;
}

.tasks-center-inner {
  display: flex;
  height: 100%;
  gap: 0;
}

/* Tasks Header */
.tasks-header {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  gap: 12px;
  flex-shrink: 0;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.1);
  z-index: 2;
}

.tasks-header .panel-title {
  flex: 1;
  font-size: 1.1rem;
}

/* Task Sidebar */
.tasks-sidebar {
  width: 280px;
  flex-shrink: 0;
  border-left: 1px solid var(--border-color);  /* RTL: border on left */
  display: flex;
  flex-direction: column;
  padding-top: 56px; /* header height */
  overflow: hidden;
}

.tasks-filter-row {
  display: flex;
  gap: 4px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  flex-shrink: 0;
}

.task-filter-btn {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.task-filter-btn:hover,
.task-filter-btn.active {
  background: rgba(74, 144, 217, 0.15);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.tasks-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.task-item-empty {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.task-list-item {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.task-list-item:hover {
  background: rgba(74, 144, 217, 0.08);
  border-color: var(--border-hover);
}

.task-list-item.selected {
  background: rgba(74, 144, 217, 0.12);
  border-color: var(--color-primary);
}

.task-list-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-list-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Task Detail */
.task-detail {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 72px 24px 20px;
  gap: 16px;
  overflow-y: auto;
}

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

.task-status-badge {
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid;
}

.task-status-badge[data-status="pending"]     { color: var(--color-warning); border-color: var(--color-warning); background: rgba(255,107,53,0.1); }
.task-status-badge[data-status="in_progress"] { color: var(--color-primary); border-color: var(--color-primary); background: rgba(74,144,217,0.1); }
.task-status-badge[data-status="review"]      { color: var(--color-secondary); border-color: var(--color-secondary); background: rgba(123,104,238,0.1); }
.task-status-badge[data-status="done"]        { color: var(--color-success); border-color: var(--color-success); background: rgba(0,212,170,0.1); }

.task-assignee {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.task-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-inline-start: auto;
}

.task-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
}

/* Status Timeline */
.status-timeline {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 8px 0;
}

.timeline-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
}

.timeline-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 11px;
  left: 50%;   /* RTL: extends toward next step */
  width: 100%;
  height: 2px;
  background: var(--border-color);
  z-index: 0;
}

.timeline-step.active .timeline-dot,
.timeline-step.done .timeline-dot {
  background: var(--color-primary);
  box-shadow: 0 0 10px rgba(74, 144, 217, 0.5);
}

.timeline-step.active::after,
.timeline-step.done::after {
  background: rgba(74, 144, 217, 0.4);
}

.timeline-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--border-color);
  border: 2px solid var(--border-color);
  z-index: 1;
  transition: all var(--transition);
}

.timeline-step.active .timeline-dot {
  border-color: var(--color-primary);
  animation: pulse 2s ease-in-out infinite;
}

.timeline-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
}

.timeline-step.active .timeline-label {
  color: var(--color-primary);
  font-weight: 600;
}

/* Deliverable Area */
.deliverable-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.deliverable-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.deliverable-content {
  flex: 1;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px;
  overflow-y: auto;
  min-height: 120px;
}

/* Prose styling */
.prose {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-primary);
}

.prose h1, .prose h2, .prose h3 {
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.prose p { margin-bottom: 10px; }

.prose code {
  background: rgba(74, 144, 217, 0.1);
  border: 1px solid rgba(74, 144, 217, 0.2);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.82em;
}

.prose pre {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin-bottom: 10px;
}

.placeholder-prose {
  color: var(--text-muted);
  font-style: italic;
}

/* Task Actions */
.task-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}


/* ─────────────────────────────────────────────────────────────
   16. STATUS BAR BOTTOM
───────────────────────────────────────────────────────────── */
#status-bar-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--status-bar-h);
  z-index: var(--z-statusbar);
  pointer-events: auto;
  background: rgba(10, 14, 26, 0.95);
  border-top: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.status-bar-inner {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 14px;
  gap: 14px;
  flex-direction: row-reverse; /* RTL */
}

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

.status-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
}

.status-text {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Quality Badge */
.quality-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.quality-badge--low {
  background: rgba(255, 107, 53, 0.15);
  color: var(--color-warning);
  border: 1px solid rgba(255, 107, 53, 0.3);
}

.quality-badge--medium {
  background: rgba(74, 144, 217, 0.15);
  color: var(--color-primary);
  border: 1px solid rgba(74, 144, 217, 0.3);
}

.quality-badge--high {
  background: rgba(0, 212, 170, 0.15);
  color: var(--color-accent);
  border: 1px solid rgba(0, 212, 170, 0.3);
}

/* Online status dot */
.online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--status-available);
  animation: statusPulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

.status-item--online .status-text {
  color: var(--status-available);
}

/* Status bar button (open tasks) */
.status-btn {
  cursor: pointer;
  padding: 0 8px;
  border-radius: 4px;
  height: 100%;
  transition: background var(--transition-fast);
}

.status-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.task-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 14px;
  padding: 0 4px;
  background: var(--color-warning);
  border-radius: var(--radius-pill);
  font-size: 0.6rem;
  font-weight: 700;
  color: #fff;
}


/* ─────────────────────────────────────────────────────────────
   17. CHARACTER TAGS (3D overlay CSS tags)
───────────────────────────────────────────────────────────── */
#character-tags-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-tags);
  pointer-events: none;
}

.character-tag {
  position: absolute;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  pointer-events: auto;
  cursor: pointer;
  animation: tagFloat 3s ease-in-out infinite;
}

.character-tag-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5), var(--shadow-glow);
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.character-tag:hover .character-tag-inner {
  border-color: var(--border-active);
  box-shadow: 0 4px 16px rgba(0,0,0,0.6), 0 0 16px rgba(74,144,217,0.4);
  transform: translateY(-2px);
}

.character-tag-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  animation: statusPulse 2s ease-in-out infinite;
}

.character-tag-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-primary);
}

.character-tag-role {
  font-size: 0.65rem;
  color: var(--text-secondary);
  border-right: 1px solid var(--border-color);
  padding-right: 6px;
  margin-right: 2px;
}

/* Tag pointer stem */
.character-tag::after {
  content: '';
  width: 1px;
  height: 10px;
  background: rgba(100, 120, 180, 0.4);
  flex-shrink: 0;
}


/* ─────────────────────────────────────────────────────────────
   18. MODAL
───────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn var(--transition-fast);
  padding: 20px;
}

.modal-overlay[aria-hidden="true"] {
  display: none;
}

.modal-box {
  background: var(--bg-panel);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), var(--shadow-glow);
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  animation: slideInUp 0.25s ease;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  gap: 10px;
  flex-shrink: 0;
}

.modal-title {
  flex: 1;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-start; /* RTL: buttons on right visually */
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
}


/* ─────────────────────────────────────────────────────────────
   19. TOAST NOTIFICATIONS (RTL: bottom-left)
───────────────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: calc(var(--chat-h) + var(--status-bar-h) + 16px);
  left: 16px;    /* RTL: toasts on left side of screen */
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  pointer-events: none;
  max-width: 320px;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  pointer-events: auto;
  animation: toastIn 0.25s ease forwards;
  min-width: 240px;
  direction: rtl;
}

.toast.toast-dismiss {
  animation: toastOut 0.3s ease forwards;
}

.toast-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
}

.toast--success .toast-icon { background: rgba(0,212,170,0.15); color: var(--color-success); }
.toast--error   .toast-icon { background: rgba(255,79,79,0.15);  color: var(--color-danger);  }
.toast--warning .toast-icon { background: rgba(255,107,53,0.15); color: var(--color-warning); }
.toast--info    .toast-icon { background: rgba(74,144,217,0.15); color: var(--color-primary); }

.toast--success { border-color: rgba(0,212,170,0.25); }
.toast--error   { border-color: rgba(255,79,79,0.25); }
.toast--warning { border-color: rgba(255,107,53,0.25); }
.toast--info    { border-color: rgba(74,144,217,0.25); }

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

.toast-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.toast-message {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.toast-close {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color var(--transition-fast);
  margin-top: 1px;
}

.toast-close:hover {
  color: var(--text-primary);
}


/* ─────────────────────────────────────────────────────────────
   20. LIGHT THEME
───────────────────────────────────────────────────────────── */
body.light-theme #top-bar,
body.light-theme #right-sidebar,
body.light-theme #bottom-chat,
body.light-theme #notifications-panel,
body.light-theme #tasks-center {
  background: rgba(230, 235, 250, 0.9);
  border-color: rgba(74, 100, 180, 0.15);
}

body.light-theme #status-bar-bottom {
  background: rgba(220, 228, 248, 0.98);
  border-top-color: rgba(74, 100, 180, 0.15);
}

body.light-theme .setting-select,
body.light-theme .monitor-search,
body.light-theme .chat-textarea {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(74, 100, 180, 0.2);
  color: var(--text-primary);
}

body.light-theme .employee-monitor-item {
  background: rgba(255, 255, 255, 0.5);
}

body.light-theme .employee-monitor-item:hover {
  background: rgba(74, 144, 217, 0.1);
}

body.light-theme .chat-message--owner .chat-bubble-content {
  background: rgba(123, 104, 238, 0.15);
}

body.light-theme .chat-message--employee .chat-bubble-content {
  background: rgba(74, 144, 217, 0.1);
}

body.light-theme .character-tag-inner {
  background: rgba(230, 235, 250, 0.92);
}

body.light-theme .modal-box {
  background: rgba(235, 240, 255, 0.98);
}

body.light-theme .toast {
  background: rgba(235, 240, 255, 0.98);
}

body.light-theme .deliverable-content {
  background: rgba(255, 255, 255, 0.5);
}


/* ─────────────────────────────────────────────────────────────
   21. FULL OVERLAY PANEL
───────────────────────────────────────────────────────────── */
.full-overlay {
  position: fixed;
  top: var(--top-bar-h);
  left: 0;
  right: 0;
  bottom: calc(var(--chat-h) + var(--status-bar-h));
  z-index: var(--z-tasks);
  display: flex;
  flex-direction: column;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-top: var(--glass-border);
  overflow: hidden;
}


/* ─────────────────────────────────────────────────────────────
   22. SLIDE PANELS
───────────────────────────────────────────────────────────── */
.slide-panel {
  animation: notifPanelIn var(--transition) ease;
}


/* ─────────────────────────────────────────────────────────────
   23. RESPONSIVE — Mobile (< 768px)
───────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  :root {
    --sidebar-w:    56px;
    --chat-h:       140px;
    --top-bar-h:    48px;
    --notif-panel-w: calc(100vw - 32px);
  }

  #top-bar {
    height: var(--top-bar-h);
  }

  .company-name {
    font-size: 0.9rem;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #right-sidebar {
    width: var(--sidebar-w);
  }

  .sidebar-tabs {
    flex-direction: column;
    gap: 0;
  }

  .sidebar-tab {
    padding: 10px 0;
    font-size: 0;  /* hide text, icons only */
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar-tab::before {
    content: attr(data-icon);
    font-size: 1rem;
  }

  .sidebar-panels {
    display: none;  /* hidden in icon-only mode */
  }

  #right-sidebar.mobile-expanded {
    width: var(--sidebar-w-expanded, 280px);
  }

  #right-sidebar.mobile-expanded .sidebar-panels {
    display: block;
  }

  #notifications-panel {
    left: 0;
    right: 0;
    width: 100%;
    top: var(--top-bar-h);
  }

  .tasks-center-inner {
    flex-direction: column;
  }

  .tasks-sidebar {
    width: 100%;
    max-height: 180px;
    border-left: none;
    border-bottom: 1px solid var(--border-color);
  }

  .modal-box {
    max-width: 95vw;
  }

  #toast-container {
    left: 8px;
    right: 8px;
    max-width: none;
  }

  .chat-textarea {
    font-size: 0.82rem;
  }

  .loading-title {
    font-size: 1.3rem;
  }

  .loading-progress-track {
    width: 200px;
  }

  .task-detail {
    padding: 60px 14px 16px;
  }

  .status-timeline {
    gap: 0;
  }
}

/* ─────────────────────────────────────────────────────────────
   24. RESPONSIVE — Tablet (768px - 1024px)
───────────────────────────────────────────────────────────── */
@media (min-width: 768px) and (max-width: 1024px) {
  :root {
    --sidebar-w: 260px;
  }

  .tasks-sidebar {
    width: 220px;
  }

  #notifications-panel {
    width: 320px;
  }
}

/* ─────────────────────────────────────────────────────────────
   25. FOCUS STYLES (accessibility)
───────────────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Remove focus ring for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}


/* ─────────────────────────────────────────────────────────────
   26. PRINT STYLES
───────────────────────────────────────────────────────────── */
@media print {
  #canvas-container,
  #right-sidebar,
  #bottom-chat,
  #status-bar-bottom,
  #top-bar,
  #loading-screen,
  #toast-container,
  #character-tags-overlay {
    display: none !important;
  }

  #tasks-center {
    position: static;
    height: auto;
    animation: none;
  }
}


/* ─────────────────────────────────────────────────────────────
   27. MISCELLANEOUS / HELPER OVERRIDES
───────────────────────────────────────────────────────────── */

/* Prevent text select on interactive non-text elements */
.top-bar-actions,
.sidebar-tabs,
.task-filter-btn,
.status-bar-inner {
  user-select: none;
  -webkit-user-select: none;
}

/* Smooth color transitions for theme switch */
body,
#top-bar,
#right-sidebar,
#bottom-chat,
#status-bar-bottom,
#notifications-panel,
#tasks-center,
.toast,
.modal-box {
  transition:
    background-color var(--transition-slow),
    border-color var(--transition-slow),
    color var(--transition-slow);
}

/* Prevent body scroll leak when modals/overlays are open */
body.modal-open {
  overflow: hidden;
}

/* Selection highlight */
::selection {
  background: rgba(74, 144, 217, 0.25);
  color: var(--text-primary);
}

/* Thin horizontal rule */
.divider {
  height: 1px;
  background: var(--border-color);
  border: none;
  margin: 8px 0;
}

/* Loading skeleton animation for employees */
@keyframes skeletonPulse {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 0.9; }
}

.employee-monitor-item.skeleton .emp-avatar-circle,
.perm-skeleton-item {
  animation: skeletonPulse 1.4s ease-in-out infinite;
}

/* Keyboard shortcut hints */
.kbd {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: var(--font-en);
  font-size: 0.65rem;
  color: var(--text-secondary);
}

/* Tooltip (data-tooltip attribute) */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 14, 26, 0.95);
  color: var(--text-primary);
  font-size: 0.72rem;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-fast);
  border: 1px solid var(--border-color);
  z-index: 999;
}

[data-tooltip]:hover::after {
  opacity: 1;
}

/* Scroll fade gradient at bottom of scrollable containers */
.scroll-fade {
  position: relative;
}

.scroll-fade::after {
  content: '';
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: linear-gradient(to top, var(--bg-panel) 0%, transparent 100%);
  pointer-events: none;
  display: block;
  margin-top: -32px;
}

/* Collapsible sidebar with icon-mode text hiding */
#right-sidebar.collapsed .sidebar-tab span,
#right-sidebar.collapsed .panel-section,
#right-sidebar.collapsed .sidebar-panels {
  display: none;
}

#right-sidebar.collapsed .sidebar-tabs {
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
}

#right-sidebar.collapsed .sidebar-tab {
  width: 40px;
  height: 40px;
  border-bottom: none;
  border-radius: var(--radius-sm);
}

/* Panel section separator */
.panel-section + .panel-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

/* Notification item position relative fix */
.notif-item {
  position: relative;
}

/* Smooth sidebar slide transition */
#right-sidebar {
  will-change: transform, width;
}

/* Canvas loading state */
#canvas-container.loading {
  display: flex;
  align-items: center;
  justify-content: center;
}

#canvas-container.loading::after {
  content: '';
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--color-primary);
  animation: spin 0.9s linear infinite;
}

/* Final: overflow clip on task center inner for mobile */
.tasks-center-inner {
  overflow: hidden;
}

/* Ensure the main app doesn't show scrollbars on body */
body {
  overflow: hidden;
}

/* END OF STYLESHEET */

/* ─────────────────────────────────────────────────────────────
   28. CREDENTIALS & PERMISSIONS TAB
───────────────────────────────────────────────────────────── */
.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.section-header-row .panel-section-title {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.btn--small {
  padding: 5px 10px;
  font-size: 0.75rem;
  gap: 4px;
}

/* Credentials list */
.credentials-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cred-empty-state {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  padding: 16px 8px;
  line-height: 1.6;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-color);
}

/* Credential card */
.cred-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  transition: all var(--transition-fast);
}

body.light-theme .cred-card {
  background: rgba(255,255,255,0.6);
}

.cred-card:hover {
  border-color: var(--border-hover);
  background: rgba(74,144,217,0.06);
}

.cred-card-header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.cred-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.cred-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cred-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.cred-details {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.cred-detail-key {
  font-family: 'Courier New', monospace;
  font-size: 0.7rem;
  opacity: 0.8;
}

.cred-detail-url {
  direction: ltr;
  unicode-bidi: plaintext;
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cred-detail-mode {
  padding: 1px 6px;
  background: rgba(74,144,217,0.1);
  border-radius: var(--radius-pill);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--color-primary);
}

.cred-assigned {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.cred-status {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.65rem;
  font-weight: 700;
}

.cred-active {
  background: rgba(0,212,170,0.15);
  color: var(--color-success);
}

.cred-inactive {
  background: rgba(255,79,79,0.12);
  color: var(--color-danger);
}

.cred-card-actions {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  justify-content: flex-end;
}

.cred-action-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  border: none;
  background: rgba(255,255,255,0.06);
  transition: all var(--transition-fast);
}

.cred-action-btn:hover {
  background: rgba(74,144,217,0.15);
  transform: scale(1.1);
}

/* Credential form */
.cred-form-section {
  background: rgba(74,144,217,0.04);
  border: 1px solid rgba(74,144,217,0.2);
  border-radius: var(--radius);
  padding: 14px;
  animation: slideInUp 0.2s ease;
}

body.light-theme .cred-form-section {
  background: rgba(74,144,217,0.06);
}

.cred-form-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.cred-form-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* Setting input (text/password/url) */
.setting-input {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 8px 12px;
  font-size: 0.84rem;
  transition: border-color var(--transition-fast);
  width: 100%;
  direction: rtl;
}

body.light-theme .setting-input {
  background: rgba(255,255,255,0.8);
}

.setting-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(74,144,217,0.15);
}

.setting-input::placeholder {
  color: var(--text-muted);
}

.setting-input[dir="ltr"] {
  direction: ltr;
}

/* Setting textarea */
.setting-textarea {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 8px 12px;
  font-size: 0.84rem;
  width: 100%;
  resize: vertical;
  min-height: 60px;
  font-family: inherit;
  line-height: 1.5;
  transition: border-color var(--transition-fast);
}

body.light-theme .setting-textarea {
  background: rgba(255,255,255,0.8);
}

.setting-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* Setting color picker */
.setting-color {
  width: 50px;
  height: 32px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 2px;
  background: var(--bg-input);
}

/* Assign employees checkboxes */
.assign-employees-checks {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 150px;
  overflow-y: auto;
  padding: 6px;
  background: rgba(0,0,0,0.1);
  border-radius: var(--radius-sm);
}

body.light-theme .assign-employees-checks {
  background: rgba(255,255,255,0.4);
}

.assign-check-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  padding: 3px 4px;
  border-radius: 4px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.assign-check-label:hover {
  background: rgba(74,144,217,0.08);
}

.assign-checkbox {
  width: 15px;
  height: 15px;
  accent-color: var(--color-primary);
  cursor: pointer;
  flex-shrink: 0;
}

/* Test result */
.cred-test-result {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  animation: fadeIn 0.2s ease;
}

.cred-test-loading {
  background: rgba(74,144,217,0.1);
  color: var(--color-primary);
}

.cred-test-success {
  background: rgba(0,212,170,0.1);
  border: 1px solid rgba(0,212,170,0.3);
  color: var(--color-success);
}

.cred-test-error {
  background: rgba(255,79,79,0.1);
  border: 1px solid rgba(255,79,79,0.3);
  color: var(--color-danger);
}


/* ─────────────────────────────────────────────────────────────
   29. EMPLOYEE MANAGEMENT (Roster)
───────────────────────────────────────────────────────────── */
.employee-roster-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.roster-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

body.light-theme .roster-card {
  background: rgba(255,255,255,0.6);
}

.roster-card:hover {
  border-color: var(--border-hover);
  background: rgba(74,144,217,0.06);
}

.roster-card-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}

.roster-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.roster-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.roster-role {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.roster-card-actions {
  flex-shrink: 0;
}

/* Avatar upload */
.avatar-upload-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.avatar-filename {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.avatar-format-info {
  margin-top: 6px;
}

.avatar-format-info details {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.avatar-format-info summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--color-primary);
}

.format-requirements {
  margin-top: 6px;
  padding-right: 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  list-style: disc;
}

.format-requirements li {
  list-style: disc;
  line-height: 1.5;
}

.format-requirements code {
  background: rgba(74,144,217,0.1);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 0.72rem;
}

.format-requirements a {
  color: var(--color-primary);
  text-decoration: underline;
}

/* Employee form section */
.emp-form-section {
  background: rgba(0,212,170,0.04);
  border: 1px solid rgba(0,212,170,0.2);
  border-radius: var(--radius);
  padding: 14px;
  animation: slideInUp 0.2s ease;
}

body.light-theme .emp-form-section {
  background: rgba(0,212,170,0.06);
}


/* ─────────────────────────────────────────────────────────────
   30. DELIVERABLE TOOLBAR & OUTPUT
───────────────────────────────────────────────────────────── */
.deliverable-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(0,0,0,0.15);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}

body.light-theme .deliverable-toolbar {
  background: rgba(74,100,180,0.08);
}

.deliverable-type-badge {
  margin-inline-start: auto;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(123,104,238,0.15);
  color: var(--color-secondary);
  border: 1px solid rgba(123,104,238,0.3);
}

.deliverable-output {
  padding: 0;
}

.deliverable-code {
  background: rgba(0,0,0,0.3);
  color: var(--color-accent);
  font-family: 'Courier New', 'Fira Code', monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  padding: 16px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  overflow-x: auto;
  white-space: pre;
  tab-size: 2;
  direction: ltr;
  text-align: left;
}

body.light-theme .deliverable-code {
  background: rgba(30,32,64,0.06);
  color: #1e2040;
}

.deliverable-json {
  color: var(--color-primary);
}

.deliverable-iframe-sandbox {
  width: 100%;
  min-height: 300px;
  border: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: #fff;
}

.deliverable-file-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 20px;
}

.file-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.file-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.file-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.deliverable-prose {
  padding: 16px;
  line-height: 1.8;
  font-size: 0.88rem;
}

/* END */
