:root {
    --qubenix-primary: #3C32A3;
    --qubenix-accent: #6B5FD1;
    --purple: #3C32A3;
    --cyan: #1F77B4;
    --green: #28A745;
    --border: #e2e8f0;
    --surface: #F5F4FB;
}

.btn-primary {
    background: var(--qubenix-primary);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(60, 50, 163, 0.25);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary:hover {
    background: #312885;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(60, 50, 163, 0.35);
}

/* Stats Section */
.project-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.p-stat-card {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    gap: 24px;
    box-shadow: var(--shadow-card);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.p-stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.p-stat-icon.purple { background: var(--qubenix-primary-subtle); color: var(--qubenix-primary); }
.p-stat-icon.cyan { background: rgba(2, 132, 199, 0.1); color: var(--cyan); }
.p-stat-icon.green { background: rgba(16, 185, 129, 0.1); color: var(--green); }

.p-stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 2px;
}

.p-stat-value {
    font-size: 1.4rem;
    font-weight: 800;
    font-family: var(--qb-font-sans);
    color: var(--text-primary);
}

/* Search and Sort */
.search-bar-wrap {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
}

.search-bar {
    flex: 1;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    transition: all 0.2s;
}

.search-bar:focus-within {
    background: #ffffff;
    border-color: var(--qubenix-primary);
    box-shadow: 0 0 0 3px var(--qubenix-primary-subtle);
}

.search-bar input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    width: 100%;
    font-size: 0.9rem;
}

.search-bar svg {
    color: var(--text-muted);
}

.sort-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-wrap label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.sort-wrap select {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 8px 12px;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
}

/* Empty State */
.empty-state {
    padding: 80px 40px;
    text-align: center;
    background: #f8fafc;
    border: 1px dashed var(--border-subtle);
    border-radius: 24px;
    margin-top: 40px;
    animation: fadeIn 0.6s ease-out;
}

.empty-illustration {
    margin-bottom: 28px;
    color: var(--qubenix-primary);
}

.empty-state h3 {
    font-size: 1.8rem;
    font-family: var(--qb-font-sans);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.empty-state p {
    color: var(--text-secondary);
    max-width: 440px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.cta-btn {
    padding: 14px 32px;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 800;
}

/* Project Card */
.project-card {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 1px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.project-card-inner {
    background: #ffffff;
    border-radius: 19px;
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, var(--project-color) 0%, transparent 60%);
    opacity: 0.05;
    transition: opacity 0.4s;
    pointer-events: none;
}

.project-card:hover .card-glow {
    opacity: 0.15;
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.project-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.favorite-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
}

.favorite-btn.active {
    color: #fbbf24;
    transform: scale(1.2);
}

.action-menu-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
}

.action-menu-btn:hover {
    background: #f1f5f9;
    color: var(--text-primary);
}

/* Dropdown Menu */
.card-menu {
    position: absolute;
    top: 60px;
    right: 20px;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 10;
    display: none;
    overflow: hidden;
}

.card-menu.active { display: block; }

.menu-item {
    padding: 10px 16px;
    font-size: 0.85rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-item:hover { background: #f1f5f9; color: var(--text-primary); }
.menu-item.delete { color: #dc2626; }
.menu-item.delete:hover { background: #fef2f2; }

/* Progress */
.card-progress-section { margin-bottom: 24px; }

.card-progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.progress-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.p-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.p-percentage {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.progress-shimmer {
    height: 8px;
    background: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: 10px;
    position: relative;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-glow {
    position: absolute;
    top: 0; right: 0;
    width: 20px; height: 100%;
    background: white;
    filter: blur(4px);
    opacity: 0.3;
}

/* Footer Info Pills */
.project-card-footer {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.footer-info-pill {
    background: #f8fafc;
    border: 1px solid var(--border-subtle);
    padding: 6px 12px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.footer-info-pill:hover {
    background: #f1f5f9;
    color: var(--text-primary);
}

.footer-info-pill svg {
    color: var(--text-muted);
}

.footer-info-pill.tasks {
    border-color: rgba(16, 185, 129, 0.25);
    color: #059669;
    background: #ecfdf5;
}

/* Modal Redesign */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeInOverlay 0.3s ease;
}

.modal-overlay.active { display: flex; }

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

.modal-card {
    width: 100%;
    max-width: 500px;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 32px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header h2 { font-size: 1.5rem; color: var(--text-primary); margin-bottom: 4px; }
.modal-header p { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 24px; }

.required { color: #ef4444; margin-left: 2px; }

/* Form Styles */
.form-group {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 11px 14px;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.92rem;
    outline: none;
    transition: all 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--qubenix-primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px var(--qubenix-primary-subtle);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.color-picker-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: none;
    cursor: pointer;
}

input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: none; border-radius: 8px; }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
}

/* Spinner */
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e2e8f0;
    border-top-color: var(--qubenix-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

.btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #111;
    border: 1px solid var(--border);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.toast.show { transform: translateX(-50%) translateY(0); }

/* Delete Modal Logic */
.delete-modal { max-width: 400px; text-align: center; padding: 40px 32px; }
.delete-icon-wrapper {
  width: 64px; height: 64px; background: rgba(255, 77, 77, 0.1);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
}
.delete-modal h2 { color: #ff4d4d; font-size: 1.6rem; margin-bottom: 12px; }
.delete-modal p { color: var(--text-secondary); line-height: 1.6; margin-bottom: 8px; }

.btn-danger {
  background: linear-gradient(135deg, #ff4d4d 0%, #f43f5e 100%);
  color: white; padding: 10px 24px; border-radius: 10px; font-weight: 800; border: none; cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 77, 77, 0.3); transition: all 0.3s;
}
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(255, 77, 77, 0.4); }

@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

/* User Profile Refinements */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 20px;
    border-left: 1px solid var(--border);
}

.user-info {
    text-align: right;
}

.user-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
}

.user-avatar {
    width: 38px;
    height: 38px;
    background: var(--gradient, linear-gradient(135deg, #3C32A3 0%, #6B5FD1 100%));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .topbar { flex-direction: column; height: auto; padding: 16px; gap: 16px; }
    .search-bar-wrap { flex-direction: column; align-items: stretch; width: 100%; }
    .search-bar { max-width: none; }
    .user-profile { border: none; padding: 0; }
    .project-stats-grid { grid-template-columns: 1fr; }
    .modal-card { max-width: 90%; padding: 24px; }
}

/* ========================================================
   QUBENIX DELIVERY MANAGEMENT SYSTEM (WORKSPACE & WORKFLOWS)
   ======================================================== */

/* Delivery Status Tabs */
.delivery-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.status-tabs-wrap {
  display: inline-flex;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}

.status-tab-btn {
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-tab-btn:hover {
  color: var(--text-primary);
  background: #f8fafc;
}

.status-tab-btn.active {
  background: var(--qubenix-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(60, 50, 163, 0.25);
}

.status-tab-count {
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.08);
}
.status-tab-btn.active .status-tab-count {
  background: rgba(255, 255, 255, 0.25);
}

/* Enhanced Project Card Elements */
.client-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--qubenix-primary);
  background: rgba(60, 50, 163, 0.08);
  border: 1px solid rgba(60, 50, 163, 0.15);
  padding: 3px 8px;
  border-radius: 6px;
}

.delivery-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 3px 8px;
  border-radius: 6px;
}

.delivery-pill.active { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.delivery-pill.planning { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.delivery-pill.blocked { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.delivery-pill.completed { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.delivery-pill['on-hold'] { background: #f8fafc; color: #64748b; border: 1px solid #cbd5e1; }

.priority-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
}
.priority-pill.urgent { background: #fee2e2; color: #991b1b; }
.priority-pill.high { background: #fef3c7; color: #92400e; }
.priority-pill.medium { background: #ede9fe; color: #5b21b6; }
.priority-pill.low { background: #f1f5f9; color: #475569; }

/* Delivery Breakdown Row */
.card-breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.team-avatar-stack {
  display: flex;
  align-items: center;
}
.team-avatar-mini {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--qubenix-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  border: 2px solid #ffffff;
  margin-left: -6px;
}
.team-avatar-mini:first-child { margin-left: 0; }

.btn-open-workspace {
  width: 100%;
  margin-top: 14px;
  padding: 10px 14px;
  background: #f8fafc;
  color: var(--qubenix-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.btn-open-workspace:hover {
  background: var(--qubenix-primary);
  color: #ffffff;
  border-color: var(--qubenix-primary);
}

/* ========================================================
   PROJECT DELIVERY WORKSPACE (FULL DRAWER / WORKSPACE MODAL)
   ======================================================== */
.workspace-modal-overlay {
  display: none;
  position: fixed;
  z-index: 1500;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.workspace-modal-overlay.active {
  display: flex;
  opacity: 1;
}

.workspace-card {
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.workspace-header-bar {
  padding: 24px 28px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ws-title-group h2 {
  font-family: var(--qb-font-sans);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.ws-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.ws-controls-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ws-select {
  padding: 6px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.btn-close-ws {
  background: #f1f5f9;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-close-ws:hover {
  background: #e2e8f0;
  color: var(--text-primary);
}

/* Workspace Tabs Navigation */
.workspace-tabs-nav {
  display: flex;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 28px;
  gap: 8px;
  overflow-x: auto;
}

.ws-tab-btn {
  padding: 14px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.2s;
}
.ws-tab-btn:hover {
  color: var(--text-primary);
}
.ws-tab-btn.active {
  color: var(--qubenix-primary);
  border-bottom-color: var(--qubenix-primary);
  background: #ffffff;
}

.ws-tab-badge {
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 12px;
  background: #e2e8f0;
  color: var(--text-secondary);
}
.ws-tab-btn.active .ws-tab-badge {
  background: rgba(60, 50, 163, 0.12);
  color: var(--qubenix-primary);
}

/* Workspace Body & Tab Panes */
.workspace-body {
  padding: 24px 28px;
  overflow-y: auto;
  flex: 1;
}

.ws-pane {
  display: none;
}
.ws-pane.active {
  display: block;
}

/* Milestones & Deliverables Layout */
.milestones-section, .deliverables-section, .workflows-section {
  margin-bottom: 24px;
}

.ws-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.ws-section-head h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.milestone-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}
.milestone-item-row:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}
.milestone-item-row.completed {
  background: #f8fafc;
  opacity: 0.75;
}
.milestone-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ms-check {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid #cbd5e1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.ms-check.checked {
  background: #10b981;
  border-color: #10b981;
  color: white;
}
.ms-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}
.milestone-item-row.completed .ms-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Deliverable Item */
.deliverable-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 8px;
}
.deliv-stage-select {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid var(--border-subtle);
}

/* Workflows (Automation Ready) */
.workflow-item-box {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 12px;
}
.wf-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.wf-trigger-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(60, 50, 163, 0.08);
  color: var(--qubenix-primary);
  padding: 3px 8px;
  border-radius: 6px;
}
.wf-steps-trail {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.wf-step-node {
  background: #f1f5f9;
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.wf-arrow {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* Documents List */
.doc-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 8px;
}
.doc-type-badge {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: #e0e7ff;
  color: var(--qubenix-primary);
}

/* Quick Add Form Row */
.ws-inline-add {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.ws-inline-add input, .ws-inline-add select {
  padding: 8px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-size: 0.82rem;
}
.ws-inline-add input[type="text"] {
  flex: 1;
}

@keyframes modalScaleUp {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

