/* ============================================================
   Rocada.io — Global CSS
   ============================================================ */

:root {
  --rocada-green:       #16a34a;
  --rocada-green-dark:  #15803d;
  --rocada-green-light: #86efac;
  --rocada-bg:          #f8fafc;
  --rocada-text:        #1e293b;
  --rocada-muted:       #64748b;
  --rocada-border:      #e2e8f0;
  --sidebar-width:      240px;
}

/* --- Base --- */
* { box-sizing: border-box; }
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--rocada-bg);
  color: var(--rocada-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main.main-content { flex: 1; }

/* --- Navbar --- */
.bg-rocada {
  background: var(--rocada-green) !important;
}
.text-rocada-light { color: var(--rocada-green-light); }
.navbar-leaf { font-size: 1.2rem; }

/* --- Cards --- */
.card {
  border: 1px solid var(--rocada-border);
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  transition: box-shadow .2s;
}
.card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.card-header {
  background: #fff;
  border-bottom: 1px solid var(--rocada-border);
  font-weight: 600;
  padding: 14px 20px;
}

/* --- Stat cards (dashboard) --- */
.stat-card {
  border-radius: 12px;
  padding: 20px 24px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.stat-card .stat-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  opacity: .2;
}
.stat-card .stat-value { font-size: 2rem; font-weight: 700; }
.stat-card .stat-label { font-size: .85rem; opacity: .85; }
.stat-green  { background: linear-gradient(135deg, #16a34a, #15803d); }
.stat-blue   { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.stat-orange { background: linear-gradient(135deg, #f97316, #ea580c); }
.stat-purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

/* --- Buttons --- */
.btn-rocada {
  background: var(--rocada-green);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  font-weight: 600;
  transition: background .2s, transform .1s;
}
.btn-rocada:hover {
  background: var(--rocada-green-dark);
  color: #fff;
  transform: translateY(-1px);
}
.btn-rocada:active { transform: translateY(0); }

/* --- Forms --- */
.form-control:focus, .form-select:focus {
  border-color: var(--rocada-green);
  box-shadow: 0 0 0 3px rgba(22,163,74,.15);
}
.form-label { font-weight: 500; color: var(--rocada-text); margin-bottom: 4px; }
.required-star { color: #ef4444; }

/* --- Tables --- */
.table-rocada thead th {
  background: #f1f5f9;
  border-bottom: 2px solid var(--rocada-border);
  font-weight: 600;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--rocada-muted);
}
.table-rocada tbody tr:hover { background: #f8fffe; }

/* --- Badges --- */
.badge { font-size: .75rem; padding: 4px 8px; border-radius: 20px; }

/* --- Job card (lista joburi) --- */
.job-card {
  border-left: 4px solid var(--rocada-green);
  transition: border-color .2s, box-shadow .2s;
}
.job-card:hover { border-left-color: var(--rocada-green-dark); }
.job-card.status-disputed { border-left-color: #ef4444; }
.job-card.status-completed { border-left-color: #3b82f6; }
.job-card.status-cancelled { border-left-color: #94a3b8; }

/* --- Harta Leaflet --- */
#map, .leaflet-map {
  height: 420px;
  border-radius: 10px;
  border: 1px solid var(--rocada-border);
  z-index: 1;
}
.map-pin-value {
  background: var(--rocada-green);
  color: #fff;
  border-radius: 20px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
  white-space: nowrap;
}

/* --- QR Code display --- */
.qr-wrapper {
  background: #fff;
  border: 2px dashed var(--rocada-green);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  max-width: 220px;
  margin: 0 auto;
}
.qr-code-text {
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--rocada-green);
  background: #f0fdf4;
  padding: 8px 16px;
  border-radius: 6px;
  display: inline-block;
}

/* --- Steps (flow job) --- */
.step-list { list-style: none; padding: 0; margin: 0; }
.step-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rocada-border);
}
.step-list li:last-child { border-bottom: none; }
.step-num {
  min-width: 30px; height: 30px;
  background: var(--rocada-green);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 700;
}
.step-num.done { background: #3b82f6; }
.step-num.pending { background: #94a3b8; }

/* --- Split financiar vizual --- */
.split-bar {
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
}
.split-helper  { background: var(--rocada-green); }
.split-client  { background: #3b82f6; }
.split-rocada  { background: #f97316; }
.split-legend  { display: flex; gap: 16px; font-size: .8rem; flex-wrap: wrap; }
.split-legend span::before {
  content: '●';
  margin-right: 4px;
}
.split-legend .leg-helper::before { color: var(--rocada-green); }
.split-legend .leg-client::before { color: #3b82f6; }
.split-legend .leg-rocada::before { color: #f97316; }

/* --- Uploader poze --- */
.photo-upload-area {
  border: 2px dashed var(--rocada-border);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.photo-upload-area:hover, .photo-upload-area.dragover {
  border-color: var(--rocada-green);
  background: #f0fdf4;
}
.photo-preview-wrap { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.photo-preview-wrap img {
  width: 80px; height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--rocada-border);
}

/* --- Rating stars --- */
.stars { color: #f59e0b; letter-spacing: 2px; }
.star-input input { display: none; }
.star-input label { font-size: 1.8rem; color: #cbd5e1; cursor: pointer; transition: color .15s; }
.star-input input:checked ~ label,
.star-input label:hover,
.star-input label:hover ~ label { color: #f59e0b; }

/* --- Alerte & info boxes --- */
.info-green {
  background: #f0fdf4;
  border-left: 4px solid var(--rocada-green);
  padding: 12px 16px;
  border-radius: 0 6px 6px 0;
}
.info-blue {
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  padding: 12px 16px;
  border-radius: 0 6px 6px 0;
}
.info-orange {
  background: #fff7ed;
  border-left: 4px solid #f97316;
  padding: 12px 16px;
  border-radius: 0 6px 6px 0;
}

/* --- Footer --- */
.footer-rocada {
  background: #1e293b;
  color: #94a3b8;
  font-size: .85rem;
  margin-top: auto;
}
.footer-rocada a:hover { color: var(--rocada-green-light); }

/* --- Disponibilitate helper (toggle) --- */
.availability-toggle .form-check-input { width: 3em; height: 1.5em; cursor: pointer; }
.availability-toggle .form-check-input:checked { background-color: var(--rocada-green); border-color: var(--rocada-green); }

/* --- Mobile tweaks --- */
@media (max-width: 768px) {
  .stat-card { margin-bottom: 12px; }
  #map, .leaflet-map { height: 280px; }
  .stat-card .stat-value { font-size: 1.5rem; }
}

/* --- Page header section --- */
.page-header {
  padding: 20px 0 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--rocada-border);
}
.page-header h1 { font-size: 1.5rem; font-weight: 700; margin: 0; }
.page-header p  { color: var(--rocada-muted); margin: 4px 0 0; font-size: .9rem; }
