/* ── DASHBOARD PAGE ─────────────────────────────────────── */

.dash-body {
  background: var(--cream);
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

/* ── SIDEBAR ──────────────────────────────── */
.dash-sidebar {
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 14px;
  gap: 28px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.dash-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  padding: 0 6px;
  flex-shrink: 0;
}

.dash-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.dn-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.15s;
  position: relative;
}

.dn-item:hover { background: var(--cream); color: var(--ink); }

.dn-item.active {
  background: var(--amber-light);
  color: var(--amber-dark);
}

.dn-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 15%; bottom: 15%;
  width: 3px;
  background: var(--amber);
  border-radius: 0 3px 3px 0;
}

.dn-icon { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }

.dn-badge {
  margin-left: auto;
  background: var(--amber);
  color: white;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 1px 7px;
  border-radius: 100px;
  min-width: 20px;
  text-align: center;
}

.dash-sidebar__bottom {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.dash-profile-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}

.dash-profile-link:hover { background: var(--cream); }

.dp-avatar {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--amber-light);
  border: 1.5px solid var(--amber);
  color: var(--amber-dark);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.dp-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.dp-role { font-size: 11px; color: var(--ink-muted); font-family: var(--font-mono); }

.dp-status {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  margin-left: auto;
  flex-shrink: 0;
}

/* ── MAIN ─────────────────────────────────── */
.dash-main {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
  min-height: 100vh;
}

.dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.dash-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.5px;
}

.dash-sub { margin-top: 2px; font-size: 13px; }

.dash-header__actions { display: flex; align-items: center; gap: 8px; }

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

.avail-dot--on  { background: var(--green); box-shadow: 0 0 6px var(--green); }
.avail-dot--off { background: var(--ink-muted); }

/* ── KPI ROW ──────────────────────────────── */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.kpi-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: box-shadow 0.2s, transform 0.2s;
  opacity: 0;
  transform: translateY(10px);
  animation: kpiFade 0.4s ease forwards;
}

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

@keyframes kpiFade {
  to { opacity: 1; transform: translateY(0); }
}

.kpi-icon { font-size: 20px; }

.kpi-label {
  font-size: 11px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
}

.kpi-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -1px;
  line-height: 1;
}

.kpi-delta {
  font-size: 12px;
  font-family: var(--font-mono);
}

.kpi-delta.up   { color: var(--green); }
.kpi-delta.down { color: #c0392b; }

/* ── MAIN GRID ────────────────────────────── */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.dash-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dash-card--wide { grid-column: 1 / -1; }
.dash-card--chart { grid-column: 1 / -1; }

.dash-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-card__title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

/* ── UPITI LIST ───────────────────────────── */
.upiti-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.upit-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.18s;
}

.upit-card:hover { border-color: var(--amber); box-shadow: var(--shadow-sm); }

.upit-card--new { border-left: 3px solid var(--amber); }

.uc-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }

.uc-user { font-weight: 600; font-size: 14px; color: var(--ink); }
.uc-time { font-size: 11px; color: var(--ink-muted); font-family: var(--font-mono); flex-shrink: 0; }

.uc-desc {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.uc-meta { display: flex; gap: 8px; flex-wrap: wrap; }

.uc-actions {
  display: flex;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

/* ── POSLOVI LIST ─────────────────────────── */
.poslovi-list { display: flex; flex-direction: column; gap: 10px; }

.posao-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--cream);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.pi-status {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pi-status--active  { background: var(--green); box-shadow: 0 0 6px var(--green); }
.pi-status--pending { background: var(--amber); }
.pi-status--done    { background: var(--ink-muted); }

.pi-name  { font-size: 13.5px; font-weight: 600; color: var(--ink); flex: 1; }
.pi-client { font-size: 12px; color: var(--ink-muted); }
.pi-date  { font-size: 11px; color: var(--ink-muted); font-family: var(--font-mono); }

/* ── EARNINGS CHART ───────────────────────── */
.earn-total {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.5px;
}

/* ── MINI REVIEWS ─────────────────────────── */
.mini-reviews { display: flex; flex-direction: column; gap: 12px; }

.mr-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  background: var(--cream);
  border-radius: var(--radius);
}

.mr-header { display: flex; align-items: center; justify-content: space-between; }
.mr-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.mr-stars { font-size: 12px; color: var(--amber); }
.mr-text { font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; }

/* ── RESPONSIVE ───────────────────────────── */
@media (max-width: 1024px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-card--wide, .dash-card--chart { grid-column: 1; }
}

@media (max-width: 768px) {
  .dash-body { grid-template-columns: 1fr; }
  .dash-sidebar { display: none; }
  .dash-main { padding: 20px 16px; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
}
