/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 11px 24px;
  border-radius: var(--r-pill);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--neo-btn);
  min-height: 44px;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.btn:active {
  box-shadow: var(--neo-pressed);
  transform: translateY(0) !important;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 6px 6px 14px rgba(13,64,107,0.30), -4px -4px 10px var(--neo-light);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 8px 8px 18px rgba(13,64,107,0.35), -4px -4px 10px var(--neo-light);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--neo-btn);
}
.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 8px 8px 18px var(--neo-dark), -8px -8px 18px var(--neo-light);
  color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--text-soft);
  box-shadow: none;
  padding: 8px 14px;
}
.btn-ghost:hover {
  color: var(--text);
  background: rgba(13,64,107,0.06);
}

.btn-danger {
  background: var(--surface);
  color: var(--error);
  box-shadow: var(--neo-btn);
}
.btn-danger:hover {
  background: var(--error-dim);
  transform: translateY(-1px);
  box-shadow: 8px 8px 18px var(--neo-dark), -8px -8px 18px var(--neo-light);
}

.btn-success {
  background: var(--success);
  color: #fff;
  box-shadow: 6px 6px 14px rgba(46,140,95,0.28), -4px -4px 10px var(--neo-light);
}
.btn-success:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: var(--text-xs);
  min-height: 36px;
}

.btn-lg {
  padding: 15px 32px;
  font-size: var(--text-base);
}

.btn-xs {
  padding: 5px 10px;
  font-size: var(--text-xs);
  min-height: 28px;
  border-radius: var(--r-pill);
}

.btn-icon {
  padding: 10px;
  border-radius: var(--r-pill);
  min-width: 44px;
  justify-content: center;
}

.btn-danger-ghost {
  background: transparent;
  color: var(--text-dim);
  box-shadow: none;
}
.btn-danger-ghost:hover {
  color: var(--error);
  background: var(--error-dim);
}

.btn .btn-arrow {
  display: inline-block;
  transition: transform var(--transition);
}
.btn:hover .btn-arrow {
  transform: translateX(4px);
}

.btn.loading {
  pointer-events: none;
}
.btn.loading::after {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-left: var(--space-2);
  flex-shrink: 0;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--space-6);
  box-shadow: var(--neo-shadow);
  transition: box-shadow 0.5s cubic-bezier(.2,.7,.2,1), transform 0.5s cubic-bezier(.2,.7,.2,1);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 14px 14px 32px var(--neo-dark), -14px -14px 32px var(--neo-light);
}

.card-clickable {
  cursor: pointer;
}
.card-clickable:active {
  transform: translateY(0);
  box-shadow: var(--neo-shadow);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.card-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text);
}

.card-subtitle {
  font-size: var(--text-sm);
  color: var(--text-soft);
  margin-top: var(--space-1);
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.form-label .required {
  color: var(--error);
  font-size: var(--text-xs);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  padding: 11px 16px;
  color: var(--text);
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  transition: all var(--transition);
  outline: none;
  box-shadow: var(--neo-inset);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-dim);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--accent);
  box-shadow: inset 4px 4px 10px var(--neo-dark), inset -4px -4px 10px var(--neo-light), 0 0 0 1px var(--accent);
}

.form-input.error,
.form-textarea.error {
  border-color: var(--error);
  box-shadow: var(--neo-inset), 0 0 0 1px var(--error);
}

.form-textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.6;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238397aa' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--text-dim);
}

.form-error {
  font-size: var(--text-xs);
  color: var(--error);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* ============================================
   RICH TEXT EDITOR
   ============================================ */
.rich-editor {
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  overflow: hidden;
  transition: all var(--transition);
  box-shadow: var(--neo-inset);
}

.rich-editor:focus-within {
  border-color: var(--accent);
  box-shadow: inset 4px 4px 10px var(--neo-dark), inset -4px -4px 10px var(--neo-light), 0 0 0 1px var(--accent);
}

.rich-editor-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--hairline);
  background: rgba(255,255,255,0.4);
  flex-wrap: wrap;
}

.rich-editor-btn {
  background: none;
  border: none;
  color: var(--text-soft);
  padding: 4px 8px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: var(--text-sm);
  font-family: monospace;
  transition: all var(--transition);
  line-height: 1.4;
}

.rich-editor-btn:hover {
  background: rgba(13,64,107,0.08);
  color: var(--text);
}

.rich-editor-btn.active {
  background: rgba(13,64,107,0.12);
  color: var(--accent);
}

.rich-editor-content {
  min-height: 120px;
  padding: 12px 16px;
  color: var(--text);
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  line-height: 1.7;
  outline: none;
}

.rich-editor-content:empty::before {
  content: attr(data-placeholder);
  color: var(--text-dim);
  pointer-events: none;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-empty {
  background: rgba(131,151,170,0.14);
  color: var(--text-dim);
}
.badge-empty .badge-dot { background: var(--text-dim); }

.badge-filled {
  background: var(--warning-dim);
  color: var(--warning);
}
.badge-filled .badge-dot { background: var(--warning); }

.badge-approved {
  background: var(--success-dim);
  color: var(--success);
}
.badge-approved .badge-dot { background: var(--success); }

.badge-rejected {
  background: var(--error-dim);
  color: var(--error);
}
.badge-rejected .badge-dot { background: var(--error); }

.badge-active {
  background: rgba(13,64,107,0.10);
  color: var(--accent);
}

.badge-completed {
  background: var(--success-dim);
  color: var(--success);
}
.badge-completed .badge-dot { background: var(--success); }

.badge-waiting {
  background: var(--warning-dim);
  color: var(--warning);
}
.badge-waiting .badge-dot { background: var(--warning); }

/* ============================================
   PROGRESS BAR
   ============================================ */
.progress-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.progress-label {
  font-size: var(--text-xs);
  color: var(--text-soft);
}

.progress-value {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent);
}

.progress-bar {
  width: 100%;
  height: 5px;
  background: var(--surface);
  border-radius: var(--r-pill);
  overflow: hidden;
  box-shadow: var(--neo-inset);
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--r-pill);
  transition: width 0.5s cubic-bezier(.2,.7,.2,1);
  min-width: 0%;
}

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

/* ============================================
   AVATAR
   ============================================ */
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: var(--text-sm);
  color: #fff;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--accent);
  box-shadow: var(--neo-btn);
}

.avatar-lg {
  width: 56px;
  height: 56px;
  font-size: var(--text-base);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
#toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 14px 20px;
  background: var(--surface);
  border-radius: var(--r-pill);
  box-shadow: var(--neo-shadow);
  font-size: var(--text-sm);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 500;
  pointer-events: all;
  animation: slideInRight 0.35s cubic-bezier(.2,.7,.2,1) forwards;
  max-width: 360px;
}

.toast.toast-success { border-left: 3px solid var(--success); }
.toast.toast-error   { border-left: 3px solid var(--error); }
.toast.toast-warning { border-left: 3px solid var(--warning); }
.toast.toast-info    { border-left: 3px solid var(--accent); }

.toast-icon {
  font-size: var(--text-base);
  flex-shrink: 0;
}

.toast.hiding {
  animation: slideOutRight 0.25s cubic-bezier(.2,.7,.2,1) forwards;
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,34,54,0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--space-8);
  max-width: 480px;
  width: 100%;
  box-shadow: var(--neo-shadow);
  animation: scaleIn 0.25s cubic-bezier(.2,.7,.2,1);
  position: relative;
}

.modal-lg {
  max-width: 720px;
}

.modal-header {
  margin-bottom: var(--space-6);
}

.modal-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text);
}

.modal-subtitle {
  font-size: var(--text-sm);
  color: var(--text-soft);
  margin-top: var(--space-2);
}

.modal-body {
  margin-bottom: var(--space-2);
}

.modal-footer {
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--hairline);
}

.modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: var(--surface);
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: var(--text-lg);
  padding: var(--space-2);
  border-radius: var(--r-pill);
  box-shadow: var(--neo-btn);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  width: 36px;
  height: 36px;
}
.modal-close:hover {
  color: var(--text);
  box-shadow: var(--neo-pressed);
}

/* ============================================
   MODULE DRAWER
   ============================================ */
.module-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,34,54,0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s cubic-bezier(.2,.7,.2,1);
}

.module-drawer-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.module-drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 520px;
  max-width: 100vw;
  background: var(--surface);
  box-shadow: -10px 0 40px var(--neo-dark), 10px 0 40px var(--neo-light);
  border-radius: var(--r-lg) 0 0 var(--r-lg);
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(.2,.7,.2,1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.module-drawer-overlay.open .module-drawer-panel {
  transform: translateX(0);
}

.module-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6) var(--space-6) var(--space-4);
  border-bottom: 1px solid var(--hairline);
  flex-shrink: 0;
}

.module-drawer-header h2,
.module-drawer-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.015em;
  margin-top: var(--space-1);
}

.module-drawer-header .eyebrow {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.module-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4) var(--space-6) var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.module-type-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--surface);
  border-radius: var(--r-md);
  box-shadow: var(--neo-btn);
  cursor: pointer;
  transition: all 0.35s cubic-bezier(.2,.7,.2,1);
  border: none;
  width: 100%;
  text-align: left;
}

.module-type-card:hover {
  transform: translateX(4px);
  box-shadow: 8px 8px 18px var(--neo-dark), -8px -8px 18px var(--neo-light);
}

.module-type-card:active {
  box-shadow: var(--neo-pressed);
  transform: translateX(0);
}

.module-type-card.loading {
  opacity: 0.6;
  pointer-events: none;
}

.module-type-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-sm);
  background: rgba(13,64,107,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.module-type-card-name {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.module-type-card-desc {
  font-size: var(--text-xs);
  color: var(--text-soft);
  line-height: 1.4;
}

.module-type-card-arrow {
  margin-left: auto;
  color: var(--text-dim);
  font-size: var(--text-base);
  transition: transform 0.35s cubic-bezier(.2,.7,.2,1);
  flex-shrink: 0;
}

.module-type-card:hover .module-type-card-arrow {
  transform: translateX(4px);
  color: var(--accent);
}

/* ============================================
   MODULE TYPE GRID (backward compat)
   ============================================ */
.module-type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

@media (max-width: 480px) {
  .module-type-grid { grid-template-columns: 1fr; }
}

.module-type-option {
  background: var(--surface);
  border-radius: var(--r-md);
  box-shadow: var(--neo-btn);
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  transition: all 0.35s cubic-bezier(.2,.7,.2,1);
  text-align: left;
  border: none;
}

.module-type-option:hover {
  transform: translateY(-2px);
  box-shadow: 8px 8px 18px var(--neo-dark), -8px -8px 18px var(--neo-light);
}

.module-type-option:active {
  box-shadow: var(--neo-pressed);
  transform: translateY(0);
}

.module-type-option-icon {
  font-size: 24px;
  margin-bottom: var(--space-2);
}

.module-type-option-name {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-1);
}

.module-type-option-desc {
  font-size: var(--text-xs);
  color: var(--text-soft);
  line-height: 1.5;
}

/* ============================================
   SKELETON LOADERS
   ============================================ */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.5) 25%,
    rgba(255,255,255,0.85) 50%,
    rgba(255,255,255,0.5) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r-sm);
  display: block;
  box-shadow: var(--neo-inset);
}

.skeleton-text {
  height: 14px;
  border-radius: 99px;
  margin-bottom: var(--space-2);
}

.skeleton-title {
  height: 20px;
  width: 60%;
  border-radius: 99px;
  margin-bottom: var(--space-3);
}

.skeleton-card {
  height: 160px;
  border-radius: var(--r-lg);
}

/* ============================================
   UPLOAD ZONE (Drag & Drop)
   ============================================ */
.upload-zone {
  border: 2px dashed var(--hairline);
  border-radius: var(--r-md);
  padding: var(--space-8) var(--space-6);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: rgba(255,255,255,0.3);
  position: relative;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--accent);
  background: rgba(13,64,107,0.06);
  box-shadow: var(--neo-shadow);
}

.upload-zone-icon {
  font-size: 32px;
  margin-bottom: var(--space-3);
  opacity: 0.6;
}

.upload-zone-text {
  font-size: var(--text-sm);
  color: var(--text-soft);
}

.upload-zone-text strong { color: var(--accent); }

.upload-zone-hint {
  font-size: var(--text-xs);
  color: var(--text-dim);
  margin-top: var(--space-2);
}

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-preview {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--surface);
  border-radius: var(--r-md);
  box-shadow: var(--neo-btn);
}

.upload-preview-img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--r-sm);
  flex-shrink: 0;
}

.upload-preview-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13,64,107,0.06);
  border-radius: var(--r-sm);
  font-size: 24px;
  flex-shrink: 0;
}

.upload-preview-info {
  flex: 1;
  min-width: 0;
}

.upload-preview-name {
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-preview-size {
  font-size: var(--text-xs);
  color: var(--text-dim);
}

.upload-progress {
  height: 3px;
  background: var(--hairline);
  border-radius: 99px;
  overflow: hidden;
  margin-top: var(--space-2);
}

.upload-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 0.3s ease;
  animation: progressPulse 1.5s infinite;
}

/* ============================================
   LANGUAGE TABS
   ============================================ */
.lang-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: var(--space-4);
}

.lang-tab {
  padding: 8px 16px;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-dim);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
}

.lang-tab:hover { color: var(--text-soft); }

.lang-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ============================================
   DIVIDER
   ============================================ */
.divider {
  border: none;
  border-top: 1px solid var(--hairline);
  margin: var(--space-6) 0;
}

/* ============================================
   AUTOSAVE INDICATOR
   ============================================ */
.autosave-indicator {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-dim);
  transition: color var(--transition);
}
.autosave-indicator.saving { color: var(--warning); }
.autosave-indicator.saved  { color: var(--success); }

.autosave-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.autosave-indicator.saving .autosave-dot {
  animation: pulse 1s infinite;
}

/* ============================================
   LANGUAGE SELECTOR
   ============================================ */
.lang-selector {
  display: flex;
  align-items: center;
  background: var(--surface);
  border-radius: var(--r-pill);
  overflow: hidden;
  box-shadow: var(--neo-inset);
  padding: 2px;
  gap: 2px;
}

.lang-selector-btn {
  padding: 5px 12px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
  transition: all var(--transition);
  background: none;
  border: none;
  border-radius: var(--r-pill);
}
.lang-selector-btn:hover { color: var(--text); }
.lang-selector-btn.active {
  color: #fff;
  background: var(--accent);
  box-shadow: 2px 2px 6px rgba(13,64,107,0.3);
}

/* ============================================
   DRAG & DROP
   ============================================ */
.draggable {
  cursor: grab;
  transition: opacity var(--transition), transform var(--transition);
}
.draggable:active { cursor: grabbing; }

.dragging {
  opacity: 0.5;
  transform: scale(0.98);
}

.drag-over {
  border-top: 2px solid var(--accent) !important;
}

.drag-handle {
  color: var(--text-dim);
  cursor: grab;
  padding: var(--space-2);
  transition: color var(--transition);
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-shrink: 0;
}
.drag-handle:active { cursor: grabbing; }
.drag-handle:hover { color: var(--text-soft); }

.drag-handle-line {
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

/* ============================================
   COLOR PICKER
   ============================================ */
.color-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.color-swatch-wrap {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  overflow: hidden;
  box-shadow: var(--neo-btn);
  flex-shrink: 0;
}

.color-swatch-input {
  position: absolute;
  inset: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-8);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: var(--space-4);
  opacity: 0.4;
}

.empty-state-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: var(--space-2);
}

.empty-state-text {
  font-size: var(--text-sm);
  color: var(--text-dim);
  max-width: 320px;
  margin: 0 auto var(--space-6);
}

/* ============================================
   STATUS DOTS
   ============================================ */
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.empty    { background: var(--text-dim); }
.status-dot.filled   { background: var(--warning); }
.status-dot.approved { background: var(--success); }
.status-dot.rejected { background: var(--error); }

/* ============================================
   COMMENT THREAD
   ============================================ */
.comment {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) 0;
}

.comment + .comment {
  border-top: 1px solid var(--hairline);
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 600;
  flex-shrink: 0;
}

.comment-avatar.admin {
  background: rgba(13,64,107,0.12);
  color: var(--accent);
}

.comment-avatar.client {
  background: rgba(131,151,170,0.14);
  color: var(--text-soft);
}

.comment-body  { flex: 1; min-width: 0; }

.comment-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-1);
}

.comment-author {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text);
}

.comment-time {
  font-size: var(--text-xs);
  color: var(--text-dim);
}

.comment-text {
  font-size: var(--text-sm);
  color: var(--text-soft);
  line-height: 1.5;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes spin {
  to { transform: rotate(360deg); }
}

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

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}

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

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

@keyframes progressPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.7; }
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }

  .modal { padding: var(--space-6); }

  .module-drawer-panel {
    width: 100vw;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    top: auto;
    height: 90vh;
    transform: translateY(100%);
  }
  .module-drawer-overlay.open .module-drawer-panel {
    transform: translateY(0);
  }

  #toast-container {
    left: var(--space-4);
    right: var(--space-4);
    bottom: var(--space-4);
  }
  .toast {
    max-width: 100%;
    border-radius: var(--r-lg);
  }
}

@media (min-width: 769px) {
  .show-mobile-only { display: none !important; }
}
