/* ============================================================
   extras.css — Stilovi za dodatne funkcionalnosti
   Sve klase prefiks "arx-" da ne kolidiraju sa postojecim.
   ============================================================ */

/* ===== SUMMARY KARTICE (Ugovoreno/Naplaceno/Dug/%) ===== */
.arx-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.arx-summary-card {
  background: var(--bg-card, #1e293b);
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--border, #334155);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s;
}
.arx-summary-card::before {
  content: '';
  position: absolute;
  top: -50%; right: -30%;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18), transparent 65%);
  pointer-events: none;
}
.arx-summary-card.naplaceno::before { background: radial-gradient(circle, rgba(16, 185, 129, 0.18), transparent 65%); }
.arx-summary-card.dug::before { background: radial-gradient(circle, rgba(239, 68, 68, 0.20), transparent 65%); }
.arx-summary-card.dug.cisto::before { background: radial-gradient(circle, rgba(16, 185, 129, 0.18), transparent 65%); }
.arx-summary-card.percent::before { background: radial-gradient(circle, rgba(168, 85, 247, 0.18), transparent 65%); }
.arx-summary-card:hover { transform: translateY(-2px); }
.arx-summary-label {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  position: relative;
}
.arx-summary-value {
  font-size: 26px;
  font-weight: 800;
  margin-top: 6px;
  letter-spacing: -0.02em;
  position: relative;
}
.arx-summary-sub {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  margin-top: 4px;
  position: relative;
}
.arx-progress-wrap {
  margin-top: 10px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 999px;
  height: 7px;
  overflow: hidden;
  position: relative;
}
.arx-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #06b6d4);
  transition: width 0.4s ease;
  border-radius: 999px;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

/* ===== USLUGA MINI SUMMARY ===== */
.arx-usl-summary {
  margin-top: 10px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 10px;
  border: 1px solid var(--border, #334155);
}
.arx-usl-summary-col { display: flex; flex-direction: column; }
.arx-usl-summary-label {
  font-size: 10px;
  color: var(--text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}
.arx-usl-summary-value {
  font-weight: 700;
  font-size: 14px;
}
.arx-usl-summary-value.green { color: #10b981; }
.arx-usl-summary-value.red { color: #ef4444; }
.arx-usl-progress {
  flex: 1;
  min-width: 120px;
}
.arx-usl-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 3px;
}
.arx-toggle-btn {
  background: var(--bg-elev, #1e293b);
  color: var(--text, #f1f5f9);
  border: 1px solid var(--border, #334155);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
}
.arx-toggle-btn:hover { background: var(--bg-input, #0f172a); border-color: var(--primary, #6366f1); }

/* ===== DETALJI NAPLATE (EXPAND) ===== */
.arx-detalji {
  margin-top: 10px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 12px;
  border: 1px solid var(--border, #334155);
}
.arx-detalji-title {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  margin-bottom: 10px;
}
.arx-jednokratno-stavka {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--bg-input, #0f172a);
  border-radius: 10px;
  border-left: 3px solid var(--warning, #f59e0b);
}
.arx-jednokratno-stavka.placeno { border-left-color: #10b981; }
.arx-jednokratno-stavka.partial { border-left-color: #3b82f6; }

.arx-stavka-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.arx-stavka-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.arx-stavka-label { font-size: 13px; font-weight: 600; }
.arx-stavka-iznosi { font-size: 13px; }
.arx-stavka-iznosi b.green { color: #10b981; }
.arx-stavka-iznosi b.red { color: #ef4444; }

.arx-progress-thin {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 999px;
  height: 5px;
  overflow: hidden;
  margin-top: 4px;
}
.arx-progress-thin > div {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #3b82f6);
  border-radius: 999px;
  transition: width 0.4s;
}

/* Lista uplata */
.arx-uplate-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 10px;
}
.arx-uplata {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 8px;
  font-size: 12px;
  flex-wrap: wrap;
}
.arx-uplata-iznos { font-weight: 700; }
.arx-uplata-datum { color: var(--text-muted, #94a3b8); }
.arx-uplata-nap { color: var(--text-muted, #94a3b8); font-style: italic; }
.arx-uplata-del {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 8px;
}
.arx-uplata-del:hover { color: #ef4444; }

/* Forma za dodavanje uplate */
.arx-add-uplata {
  margin-top: 10px;
  padding: 10px;
  background: var(--bg-input, #0f172a);
  border: 1px dashed var(--border, #334155);
  border-radius: 8px;
}
.arx-add-uplata-title {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  font-weight: 700;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.arx-add-uplata-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.arx-add-uplata-row > div { display: flex; flex-direction: column; }
.arx-add-uplata-row label {
  font-size: 10px;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 2px;
}
.arx-add-uplata-row input,
.arx-add-uplata-row select {
  background: var(--bg-input, #0f172a);
  border: 1px solid var(--border, #334155);
  color: var(--text, #f1f5f9);
  padding: 7px 9px;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
}

/* ===== DOKUMENTI SEKCIJA ===== */
.arx-dok-section {
  margin-top: 0;
  margin-bottom: 16px;
}
.arx-dok-upload {
  background: var(--bg-input, #0f172a);
  border: 1px dashed var(--border, #334155);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
}
.arx-dok-upload-title {
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.arx-dok-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
@media (max-width: 880px) {
  .arx-dok-upload-grid { grid-template-columns: 1fr; }
}
.arx-dok-upload-grid > div { display: flex; flex-direction: column; }
.arx-dok-upload-grid label {
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 4px;
}
.arx-dok-upload-grid input,
.arx-dok-upload-grid select {
  background: var(--bg-input, #0f172a);
  border: 1px solid var(--border, #334155);
  color: var(--text, #f1f5f9);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}

.arx-dok-group {
  margin-top: 10px;
}
.arx-dok-group-title {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  margin-bottom: 6px;
}
.arx-dok-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.arx-dok-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  background: var(--bg-input, #0f172a);
  border: 1px solid var(--border, #334155);
  border-left: 3px solid #6366f1;
  border-radius: 10px;
  flex-wrap: wrap;
}
.arx-dok-item.ponuda { border-left-color: #f59e0b; }
.arx-dok-item.ugovor { border-left-color: #3b82f6; }
.arx-dok-item.faktura { border-left-color: #10b981; }
.arx-dok-item.drugo { border-left-color: #94a3b8; }
.arx-dok-icon { font-size: 22px; flex-shrink: 0; }
.arx-dok-info { flex: 1; min-width: 140px; }
.arx-dok-name { font-weight: 600; font-size: 13px; }
.arx-dok-meta { font-size: 11px; color: var(--text-muted, #94a3b8); }
.arx-dok-actions { display: flex; gap: 6px; }
.arx-dok-btn {
  background: var(--bg-elev, #1e293b);
  color: var(--text, #f1f5f9);
  border: 1px solid var(--border, #334155);
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.arx-dok-btn:hover { background: var(--bg-input, #0f172a); border-color: var(--primary, #6366f1); }
.arx-dok-btn.danger { color: #ef4444; }
.arx-dok-btn.danger:hover { border-color: #ef4444; }

.arx-empty {
  text-align: center;
  padding: 24px;
  color: var(--text-muted, #94a3b8);
  font-size: 13px;
}

/* ===== AI CHAT WIDGET ===== */
#arx-ai-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(168, 85, 247, 0.5);
  z-index: 10001;
  display: none;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}
#arx-ai-fab.show { display: flex; }
#arx-ai-fab:hover { transform: scale(1.06) rotate(8deg); }

#arx-ai-panel {
  position: fixed;
  right: 24px;
  bottom: 96px;
  width: 400px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 130px);
  background: rgba(20, 27, 48, 0.96);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid var(--border, #334155);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  flex-direction: column;
  z-index: 10002;
  overflow: hidden;
  display: none;
}
#arx-ai-panel.show { display: flex; }

.arx-ai-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border, #334155);
  background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(168,85,247,0.06));
  flex-shrink: 0;
}
.arx-ai-title { display: flex; align-items: center; gap: 10px; }
.arx-ai-avatar {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 16px;
}
.arx-ai-name { font-weight: 700; font-size: 14px; color: #fff; }
.arx-ai-model { font-size: 11px; color: var(--text-muted, #94a3b8); }

.arx-ai-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}
.arx-ai-msg {
  max-width: 88%;
  padding: 10px 13px;
  border-radius: 13px;
  font-size: 13px;
  line-height: 1.5;
  word-wrap: break-word;
}
.arx-ai-msg.user {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.arx-ai-msg.assistant {
  background: var(--bg-input, #0f172a);
  color: var(--text, #f1f5f9);
  align-self: flex-start;
  border: 1px solid var(--border, #334155);
  border-bottom-left-radius: 4px;
}
.arx-ai-msg.tool {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.2);
  color: var(--text-muted, #94a3b8);
  align-self: flex-start;
  font-size: 11px;
  font-family: monospace;
  padding: 5px 9px;
  max-width: 100%;
}
.arx-ai-msg.welcome {
  align-self: stretch;
  background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(168,85,247,0.08));
  border: 1px dashed rgba(168, 85, 247, 0.3);
  text-align: center;
  font-size: 12px;
  padding: 14px;
  border-radius: 11px;
  color: var(--text, #f1f5f9);
}
.arx-ai-typing {
  display: flex; gap: 4px;
  padding: 10px 13px;
  background: var(--bg-input, #0f172a);
  border: 1px solid var(--border, #334155);
  border-radius: 13px;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}
.arx-ai-typing span {
  width: 6px; height: 6px;
  background: var(--text-muted, #94a3b8);
  border-radius: 50%;
  animation: arxDot 1.2s infinite;
}
.arx-ai-typing span:nth-child(2) { animation-delay: 0.15s; }
.arx-ai-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes arxDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-3px); opacity: 1; }
}

.arx-ai-input-area {
  display: flex;
  gap: 6px;
  padding: 10px;
  border-top: 1px solid var(--border, #334155);
  flex-shrink: 0;
}
.arx-ai-input-area textarea {
  flex: 1;
  background: var(--bg-input, #0f172a);
  border: 1px solid var(--border, #334155);
  color: var(--text, #f1f5f9);
  padding: 9px 11px;
  border-radius: 10px;
  font-size: 13px;
  font-family: inherit;
  resize: none;
  outline: none;
}
.arx-ai-send {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  font-size: 13px;
}
.arx-ai-send:disabled { opacity: 0.5; cursor: not-allowed; }

.arx-ai-suggestions {
  display: flex;
  gap: 5px;
  padding: 0 10px 10px;
  flex-wrap: wrap;
}
.arx-ai-sugg {
  background: var(--bg-input, #0f172a);
  border: 1px solid var(--border, #334155);
  color: var(--text, #f1f5f9);
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
}
.arx-ai-sugg:hover { border-color: #a855f7; background: rgba(168, 85, 247, 0.1); }

.arx-icon-btn {
  background: transparent;
  border: 1px solid var(--border, #334155);
  color: var(--text-muted, #94a3b8);
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
}
.arx-icon-btn:hover { color: var(--text, #f1f5f9); }

/* ============== PROJEKTI ============== */
.arx-proj-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.arx-proj-count {
  background: rgba(168,85,247,0.15);
  color: #a855f7;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 6px;
}
.arx-proj-section-subtitle {
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  margin-bottom: 8px;
}
.arx-proj-add-btn {
  background: linear-gradient(135deg, #6366f1, #a855f7) !important;
  color: white !important;
  border: none !important;
  padding: 7px 13px !important;
  font-weight: 600 !important;
}

.arx-proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.arx-proj-card {
  background: var(--bg-input, #0f172a);
  border: 1px solid var(--border, #334155);
  border-left: 3px solid #6366f1;
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.arx-proj-card:hover {
  border-color: #a855f7;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(168,85,247,0.2);
}
.arx-proj-card.zavrsen {
  opacity: 0.65;
  border-left-color: #10b981;
}

.arx-proj-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.arx-proj-name {
  font-weight: 700;
  font-size: 14px;
  flex: 1;
  line-height: 1.3;
}
.arx-proj-status.zavrsen {
  background: rgba(16,185,129,0.18);
  color: #10b981;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.arx-proj-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
}
.arx-proj-opis {
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
  line-height: 1.5;
}
.arx-proj-progress-wrap {
  margin-top: 4px;
}
.arx-proj-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 4px;
  font-weight: 600;
}

/* Rok badge */
.arx-rok {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
}
.arx-rok-ok { background: rgba(99,102,241,0.12); color: #a3b1ff; }
.arx-rok-uskoro { background: rgba(245,158,11,0.18); color: #f59e0b; }
.arx-rok-prosao { background: rgba(239,68,68,0.18); color: #ef4444; }

/* ============== MODAL ARX ============== */
.arx-modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10005;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.arx-modal {
  background: rgba(20, 27, 48, 0.97);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid var(--border, #334155);
  border-radius: 16px;
  padding: 20px;
  max-width: 560px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 30px 90px rgba(0,0,0,0.6);
}
.arx-modal-large { max-width: 720px; }
.arx-modal h3 {
  font-size: 17px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  letter-spacing: -0.015em;
}
.arx-form-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 5px;
}
.arx-modal input, .arx-modal select, .arx-modal textarea {
  background: var(--bg-input, #0f172a);
  border: 1px solid var(--border, #334155);
  color: var(--text, #f1f5f9);
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 14px;
  font-family: inherit;
  width: 100%;
  outline: none;
}
.arx-modal input:focus, .arx-modal select:focus, .arx-modal textarea:focus {
  border-color: #a855f7;
  box-shadow: 0 0 0 3px rgba(168,85,247,0.15);
}
.arx-modal textarea { resize: vertical; min-height: 60px; }
.arx-btn-primary {
  background: linear-gradient(135deg, #6366f1, #a855f7) !important;
  color: white !important;
  border: none !important;
  font-weight: 600 !important;
}

/* Projekt modal detalji */
.arx-proj-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.arx-proj-modal-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
  margin-top: 4px;
}
.arx-proj-modal-opis {
  background: rgba(0,0,0,0.2);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text, #f1f5f9);
  line-height: 1.6;
  margin-bottom: 12px;
}
.arx-proj-modal-progress {
  background: var(--bg-input, #0f172a);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border, #334155);
}

/* Task forma */
.arx-task-form {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
  align-items: stretch;
}
.arx-task-form input[type="text"] { flex: 1; min-width: 180px; }
.arx-task-form select, .arx-task-form input[type="date"] { width: auto; }
.arx-task-form button { white-space: nowrap; }

/* Task lista */
.arx-task-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.arx-task-divider {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  margin: 12px 0 6px;
  padding-top: 10px;
  border-top: 1px solid var(--border, #334155);
}
.arx-task {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-input, #0f172a);
  border: 1px solid var(--border, #334155);
  border-left: 3px solid #6366f1;
  border-radius: 9px;
  transition: opacity 0.15s;
}
.arx-task.done { opacity: 0.6; }
.arx-task.done .arx-task-naziv { text-decoration: line-through; color: var(--text-muted, #94a3b8); }
.arx-task input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #10b981;
  cursor: pointer;
  flex-shrink: 0;
}
.arx-task-body { flex: 1; min-width: 0; }
.arx-task-naziv { font-weight: 600; font-size: 13px; }
.arx-task-opis {
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
  margin-top: 4px;
  line-height: 1.5;
}
.arx-task-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
  font-size: 11px;
}
.arx-task-prio { font-weight: 600; }
.arx-task-assignee {
  background: rgba(99,102,241,0.12);
  color: #a3b1ff;
  padding: 2px 7px;
  border-radius: 6px;
}

/* Mobile - task forma stack */
@media (max-width: 600px) {
  .arx-task-form { flex-direction: column; }
  .arx-task-form > * { width: 100% !important; max-width: none !important; }
  .arx-proj-grid { grid-template-columns: 1fr; }
  .arx-modal { max-height: 95vh; padding: 16px; }
  .arx-modal-bg { padding: 0; align-items: flex-end; }
  .arx-modal { border-radius: 16px 16px 0 0; max-width: 100%; }
}

/* Mobile fix - AI chat */
@media (max-width: 600px) {
  #arx-ai-fab {
    width: 60px !important;
    height: 60px !important;
    right: 16px !important;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
    font-size: 24px !important;
    z-index: 10001 !important;
    box-shadow: 0 10px 32px rgba(168, 85, 247, 0.6) !important;
  }
  #arx-ai-panel {
    right: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 85vh !important;
    max-height: 85vh !important;
    border-radius: 16px 16px 0 0 !important;
    z-index: 10002 !important;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}

/* ============================================================
   MOBILE NAV CLICK ENFORCER (radi - ne diraj!)
   ============================================================ */
@media (max-width: 880px) {
  .sidebar,
  .sidebar * {
    pointer-events: auto !important;
  }
  .sidebar .nav-item,
  .sidebar .theme-toggle,
  .sidebar button {
    pointer-events: auto !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: rgba(168, 85, 247, 0.2) !important;
    position: relative !important;
    z-index: 1 !important;
    user-select: none !important;
    -webkit-user-select: none !important;
  }
  .sidebar { z-index: 9999 !important; }
  #sidebar-overlay { z-index: 9998 !important; }

  /* Cosmetic only - nav item lepsi izgled (NE dira pointer-events) */
  .sidebar .nav-item {
    padding: 11px 13px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    margin-bottom: 3px !important;
    min-height: 42px !important;
  }
  .sidebar .nav-item.active {
    background: linear-gradient(135deg, #6366f1, #a855f7) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(168, 85, 247, 0.3) !important;
    font-weight: 600 !important;
  }

  /* Brand u sidebar-u */
  .sidebar h2 {
    font-size: 16px !important;
    font-weight: 700 !important;
    padding: 6px 8px !important;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .sidebar .tag {
    font-size: 11px !important;
    padding: 0 8px 14px !important;
    color: var(--text-muted, #94a3b8) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    margin-bottom: 12px !important;
  }

  /* Theme/Odjavi se dugmici */
  .sidebar-foot .theme-toggle {
    padding: 11px 14px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    min-height: 42px !important;
    margin-bottom: 6px !important;
  }

  /* Mobile topbar */
  .mobile-topbar h2 {
    font-size: 16px !important;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
  }

  /* === MOJE INJEKCIJE NA MOBILE === */
  /* Summary kartice - 2 kolone na mobile */
  .arx-summary-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }
  .arx-summary-card { padding: 14px !important; border-radius: 12px !important; }
  .arx-summary-value { font-size: 18px !important; }
  .arx-summary-label { font-size: 10px !important; }
  .arx-summary-sub { font-size: 10px !important; }

  /* Dokumenti upload form - 1 kolona */
  .arx-dok-upload-grid { grid-template-columns: 1fr !important; gap: 10px !important; }
  .arx-dok-item { font-size: 13px !important; padding: 10px !important; flex-wrap: wrap !important; }
  .arx-dok-name { font-size: 13px !important; }
  .arx-dok-actions { width: 100%; justify-content: flex-end; gap: 6px; }

  /* Parcijalne uplate - mobile friendly */
  .arx-usl-summary {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .arx-usl-summary-col { flex-direction: row !important; justify-content: space-between; }
  .arx-toggle-btn { width: 100%; padding: 10px !important; min-height: 42px; }

  .arx-add-uplata-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .arx-add-uplata-row > div { width: 100% !important; }
  .arx-add-uplata-row input, .arx-add-uplata-row select { font-size: 16px !important; padding: 10px !important; }
  .arx-add-uplata-row button { width: 100%; padding: 11px !important; min-height: 42px; }

  .arx-uplata { font-size: 12px !important; flex-wrap: wrap !important; }
  .arx-uplata-iznos { font-size: 13px !important; }

  /* Iznos detalja na mobile - stack vertikalno */
  .arx-jednokratno-stavka .arx-stavka-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  /* === MOBILE: TABELE (Klijenti/Ponude/Saradnici) === */
  /* Horizontalni scroll umesto sečenja */
  .table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin-left: -14px !important;
    margin-right: -14px !important;
    padding: 0 14px !important;
    border-radius: 0 !important;
  }
  .table-wrap table {
    min-width: 600px !important;
    font-size: 12px !important;
  }
  .table-wrap th, .table-wrap td {
    padding: 8px 10px !important;
    white-space: nowrap;
  }
  /* Aktivne usluge cell - badges kompaktnije */
  .table-wrap td .badge,
  td .badge {
    font-size: 10px !important;
    padding: 2px 6px !important;
    border-radius: 8px !important;
    margin: 1px;
    display: inline-block !important;
    white-space: nowrap !important;
  }
  /* Naziv klijenta - sticky leva kolona da uvek vidis ime */
  .table-wrap table tbody td:first-child,
  .table-wrap table thead th:first-child {
    position: sticky;
    left: 0;
    background: var(--bg-card, #1e293b) !important;
    z-index: 2;
    border-right: 1px solid var(--border, #334155);
  }
  .table-wrap table thead th:first-child {
    background: var(--bg-input, #0f172a) !important;
  }
  /* Zarade/cifre - bold + bolja vidljivost */
  .table-wrap td:last-child {
    font-weight: 700 !important;
    text-align: right !important;
  }

  /* Search bar + Novi klijent button - puna sirina */
  .search-bar {
    flex-direction: column !important;
    gap: 8px !important;
  }
  .search-bar > * {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Dashboard valuta toggle - puna sirina */
  .valuta-toggle {
    display: flex !important;
    width: 100% !important;
  }
  .valuta-toggle button {
    flex: 1 !important;
    padding: 10px !important;
    font-size: 14px !important;
  }

  /* "Poslednjih X meseci" select - puna sirina */
  select {
    width: 100% !important;
  }

  /* Card-ovi na mobile - manje paddinga */
  .card {
    padding: 14px !important;
    margin-bottom: 12px !important;
    border-radius: 12px !important;
  }
  .card-header h3 {
    font-size: 14px !important;
  }

  /* Stat card-ovi - 2 po redu na mobile */
  .stat-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }
  .stat-card { padding: 14px !important; }
  .stat-card .value { font-size: 18px !important; }
  .stat-card .label { font-size: 10px !important; }
  .stat-card .sub { font-size: 10px !important; }

  /* View header - manji naslovi */
  .view-header h1 { font-size: 20px !important; }
  .view-header .subtitle { font-size: 12px !important; }

  /* Modal na mobile - bottom sheet */
  .modal-overlay { padding: 0 !important; align-items: flex-end !important; }
  .modal {
    max-width: 100% !important;
    max-height: 92vh !important;
    border-radius: 18px 18px 0 0 !important;
  }
}
