/* ==========================================================================
   OMV Ticket Automation — stiluri exact stil Planado
   Culori și dimensiuni extrase direct din bmfgrup.planadoapp.com
   ========================================================================== */

:root {
  /* === Design tokens Planado === */
  --color-brand: #1d89cf;
  --color-brand-hover: #286090;
  --color-brand-dark: #16689e;
  --color-text: #555555;
  --color-text-label: #575757;
  --color-text-title: #666666;
  --color-text-muted: #71717b;
  --color-text-info: #9b9b9b;
  --color-text-heading: #000000;
  --color-text-placeholder: #a2aab9;

  --color-border: #dbe0e9;
  --color-border-separator: #e2e2e2;
  --color-border-divider: #e5e5e5;
  --color-border-page: #e9e9e9;
  --color-border-input: #d5d5d5;
  --color-border-btn: #dddddd;

  --color-bg: #ffffff;
  --color-bg-subtle: #f8f9fb;
  --color-bg-surface: #f9f9f9;
  --color-bg-disabled: #f5f5f5;
  --color-bg-btn: #f4f4f4;
  --color-bg-hover: #e6e6e6;
  --color-bg-file: #f6f6f6;

  --color-group-bg: #333a45;          /* bg-ul rândurilor de grupă (echipe) */
  --color-group-text: #ffffff;

  /* Job status colors — exacte Planado */
  --color-posted-job: #58b5e8;                /* planificat, nu început */
  --color-active-posted-job: #308ec3;
  --color-en-route-job: #7f7be9;              /* tehnician pe drum */
  --color-active-en-route-job: #57559d;
  --color-started-job: #4cbc86;               /* în lucru */
  --color-active-started-job: #398073;
  --color-successful-finished-job: #9bcb60;   /* terminat OK */
  --color-active-successful-finished-job: #55821d;
  --color-unsuccessful-finished-job: #f18383; /* terminat NOK */
  --color-active-unsuccessful-finished-job: #be4f4f;
  --color-suspended-job: #bbc5d3;             /* suspendat */
  --color-active-suspended-job: #98a1af;

  --color-success: #5ebd5e;
  --color-warning: #f0ad4e;
  --color-danger: #d9534f;
  --color-danger-hover: #c9302c;
  --color-danger-border: #d43f3a;
  --color-info: #5bc0de;
  --color-link: #337ab7;
  --color-link-hover: #23527c;

  --shadow-card: 0 1px 4px #d8d8d8;
  --shadow-popover: 0 2px 6px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.07);
  --shadow-dialog: rgba(0, 0, 0, 0.14) 0 0 4px, rgba(0, 0, 0, 0.28) 0 4px 8px;

  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 6px;

  --header-height: 46px;
  --subheader-height: 48px;
  --sidebar-width: 210px;
  --row-height: 50px;

  --font-base: 13px;
  --font-xs: 10px;
  --font-sm: 12px;
  --font-md: 16px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  font-size: var(--font-base);
}

/* ==========================================================================
   TOP NAVBAR (header 46px alb cu text gri)
   ========================================================================== */
.topbar {
  height: var(--header-height);
  background: #fff;
  border-bottom: 1px solid var(--color-border-divider);
  display: flex;
  align-items: stretch;
  padding: 0;
  position: sticky; top: 0; z-index: 1031;
  font-size: var(--font-base);
}
.topbar .logo {
  display: flex; align-items: center;
  padding: 0 16px;
  font-weight: 700; font-size: 15px; color: var(--color-brand);
  letter-spacing: 0.2px;
  border-right: 1px solid var(--color-border-divider);
}
.topbar .logo .dot { color: var(--color-brand-hover); }
.topbar nav { display: flex; }
.topbar nav a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 16px;
  color: var(--color-text);
  text-decoration: none;
  font-size: var(--font-base);
  font-weight: 400;
  border-right: 1px solid var(--color-border-divider);
  background: #fff;
  transition: background 0.1s;
}
.topbar nav a:hover { background: var(--color-bg-subtle); }
.topbar nav a.active {
  background: var(--color-bg-subtle);
  color: var(--color-text-heading);
  font-weight: 600;
  box-shadow: inset 0 -3px 0 var(--color-brand);
}
.topbar nav a .pill {
  background: var(--color-danger);
  color: #fff;
  border-radius: 9999px;
  font-size: 10px;
  padding: 1px 6px;
  font-weight: 600;
  min-width: 16px;
  text-align: center;
}
.topbar .right {
  display: flex; align-items: center; gap: 12px;
  margin-left: auto; padding: 0 16px;
  font-size: var(--font-sm);
}
.topbar .user { color: var(--color-text); }
.topbar button.btn-logout {
  background: var(--color-bg-btn); color: var(--color-text);
  border: 1px solid var(--color-border-btn);
  padding: 5px 12px; border-radius: var(--radius-sm); cursor: pointer;
  font-size: 11px; font-family: inherit;
}
.topbar button.btn-logout:hover { background: var(--color-bg-hover); }

/* ==========================================================================
   SUB-HEADER (Day/Week toggle + filtre)
   ========================================================================== */
.subheader {
  height: var(--subheader-height);
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  display: flex; align-items: center; padding: 0 16px; gap: 10px;
  position: sticky; top: var(--header-height); z-index: 1030;
}

/* View switcher Day|Week — stil Planado (butoane adiacente, radius 2px pe extremități) */
.view-switcher { display: inline-flex; }
.view-switcher button {
  background: #fff; border: 1px solid var(--color-border); color: var(--color-text-heading);
  padding: 6px 18px; font-size: var(--font-sm); font-weight: 600; cursor: pointer;
  font-family: inherit; border-right-width: 0;
}
.view-switcher button:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.view-switcher button:last-child  { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; border-right-width: 1px; }
.view-switcher button.active {
  background: var(--color-bg-subtle);
  color: var(--color-text-heading);
  border-color: var(--color-text-heading);
}
.view-switcher button:hover:not(.active) { background: var(--color-bg-subtle); }

.btn-today {
  background: #fff; color: var(--color-text-heading);
  border: 1px solid var(--color-border);
  padding: 6px 14px; border-radius: var(--radius-sm);
  font-size: var(--font-sm); font-weight: 600; cursor: pointer; font-family: inherit;
}
.btn-today:hover { background: var(--color-bg-subtle); }
.nav-arrow {
  background: #fff; border: 1px solid var(--color-border); color: var(--color-text);
  width: 28px; height: 28px; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 16px; font-family: inherit;
}
.nav-arrow:hover { background: var(--color-bg-subtle); }

.date-display {
  font-size: 14px; font-weight: 600; color: var(--color-text-heading);
  text-transform: uppercase; letter-spacing: 0.3px;
  min-width: 230px;
  padding-left: 10px;
}

.subheader .filters { display: flex; gap: 8px; margin-left: auto; }
.subheader .filters select {
  padding: 5px 10px; border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  font-size: var(--font-sm); background: #fff; cursor: pointer; color: var(--color-text-heading);
  min-width: 145px; height: 30px;
  font-family: inherit;
}
.subheader .filters select:focus { outline: none; border-color: var(--color-brand); }

.btn-new-ticket {
  background: var(--color-brand); color: #fff;
  border: 0; padding: 6px 16px; border-radius: var(--radius-sm);
  font-size: var(--font-sm); font-weight: 600; cursor: pointer;
  font-family: inherit; height: 30px;
  display: inline-flex; align-items: center; gap: 4px;
}
.btn-new-ticket:hover { background: var(--color-brand-hover); }

/* ==========================================================================
   LAYOUT PRINCIPAL
   ========================================================================== */
.app-main {
  display: grid;
  grid-template-rows: 1fr auto;
  height: calc(100vh - var(--header-height) - var(--subheader-height));
}

.schedule-wrap {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  overflow: auto;            /* scroll pe AMBELE axe (orizontal + vertical) */
  background: #fff;
}

/* ---- Sidebar stânga (210px) — ÎNGHEȚAT la scroll orizontal (freeze panes) ---- */
.sidebar {
  border-right: 2px solid var(--color-border-divider);
  background: #fff;
  position: sticky;          /* rămâne fix la stânga când dai pagina pe ore */
  left: 0;
  z-index: 20;               /* peste barele din timeline */
  box-shadow: 2px 0 6px rgba(0,0,0,0.06);   /* umbră subtilă ca să se vadă „înghețat" */
  /* fără overflow propriu — scroll-ul vertical e pe .schedule-wrap */
}
.sidebar::-webkit-scrollbar { width: 7px; }
.sidebar::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }

.sidebar-header {
  padding: 0 14px;
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: #888;
  border-bottom: 1px solid var(--color-border-divider);
  background: #fff;
  position: sticky; top: 0; z-index: 4;
  height: 32px; display: flex; align-items: center;
  box-sizing: border-box;
}

/* Grup "OMV Team 1" etc — stil Planado: slate #333a45, text alb */
.team-group { margin-top: 0; }
.team-group .team-name {
  background: var(--color-group-bg);
  color: var(--color-group-text);
  font-size: 11px; font-weight: 600; letter-spacing: 0.2px;
  height: var(--row-height);
  padding: 0 14px;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.team-group .team-name .count {
  margin-left: auto; font-weight: 600; color: rgba(255,255,255,0.6); font-size: 10px;
}

.tech-row {
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px;
  border-bottom: 1px solid var(--color-border-divider);
  height: var(--row-height);
  background: #fff;
  cursor: default;
}
.tech-row .avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: #dfe4ea; color: #455a6b;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.tech-row .info { flex: 1; min-width: 0; }
.tech-row .name {
  font-size: var(--font-sm); font-weight: 600; color: var(--color-text-heading);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.15;
}
.tech-row .meta {
  font-size: 11px; color: var(--color-text-muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tech-row .load-indicator {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.load-green { background: var(--color-successful-finished-job); }
.load-amber { background: var(--color-warning); }
.load-red   { background: var(--color-danger); }

/* ==========================================================================
   TIMELINE
   ========================================================================== */
.timeline-container {
  position: relative;
  background: #fff;
  /* fără scroll vertical propriu — folosim scroll-ul de pe .schedule-wrap */
  overflow: visible;
}
.timeline-container::-webkit-scrollbar { width: 7px; height: 7px; }
.timeline-container::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }

.timeline-header {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  background: #fff;
  border-bottom: 1px solid var(--color-border-divider);
  position: sticky; top: 0; z-index: 5;
  height: 32px;
  box-sizing: border-box;
}
.timeline-header .hour-cell {
  padding: 0; display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 400; color: var(--color-text-heading);
  border-left: 1px solid var(--color-border-divider);
  overflow: hidden;
}
.timeline-header .hour-cell:first-child { border-left: 0; }

.timeline-body { position: relative; }

/* Separator între echipe în timeline (paralel cu sidebar-ul) */
.team-separator {
  height: var(--row-height);
  background: var(--color-group-bg);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.timeline-row {
  height: var(--row-height);
  border-bottom: 1px solid var(--color-border-divider);
  position: relative;
  background: #fff;
  transition: background 0.1s;
}
.timeline-row.drag-over {
  background: rgba(29, 137, 207, 0.08);
  box-shadow: inset 0 0 0 2px var(--color-brand);
}

.unassigned-card[draggable="true"] { user-select: none; }
.unassigned-card[draggable="true"]:active { cursor: grabbing; }

/* Bare Gantt sunt draggable — mutate între tehnicieni / ore */
.job-bar[draggable="true"] { cursor: grab; user-select: none; }
.job-bar[draggable="true"]:active { cursor: grabbing; }

.hour-grid {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  pointer-events: none;
}
.hour-grid .hour-slot { border-left: 1px solid var(--color-border-divider); }
.hour-grid .hour-slot:first-child { border-left: 0; }
.hour-grid .hour-slot.off-hours { background: var(--color-bg-subtle); }

/* ===== VEDERE SĂPTĂMÂNĂ — heatmap încărcare zilnică ===== */
.week-grid {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.week-cell {
  border-left: 1px solid var(--color-border-divider);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  cursor: pointer; transition: filter .1s;
  gap: 2px;
}
.week-cell:first-child { border-left: 0; }
.week-cell:hover { filter: brightness(0.95); }
.week-cell .wk-count {
  font-size: 18px; font-weight: 700; line-height: 1;
}
.week-cell .wk-hours {
  font-size: 11px; opacity: 0.75;
}
.week-cell.wk-empty  { background: #fff; }
.week-cell.wk-light  { background: #d1fae5; color: #065f46; }   /* verde — lejer */
.week-cell.wk-medium { background: #fef9c3; color: #854d0e; }   /* galben — mediu */
.week-cell.wk-full   { background: #fed7aa; color: #9a3412; }   /* portocaliu — plin */
.week-cell.wk-over   { background: #fecaca; color: #991b1b; }   /* roșu — supraîncărcat */

/* Job bar — stil exact Planado */
.job-bar {
  position: absolute; top: 5px; height: 40px;
  border-radius: var(--radius-sm);
  border-left: 1px solid #fff;
  cursor: pointer;
  color: #fff;
  display: flex; align-items: center;
  padding: 3px 6px;
  font-size: 11px;
  font-weight: 400;
  overflow: hidden; white-space: nowrap;
  line-height: 1.2;
  transition: filter 0.1s;
}
.job-bar:hover { filter: brightness(1.08); z-index: 10; }
.job-bar .job-body { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 1px; }
.job-bar .job-title {
  font-size: 11px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis;
}
.job-bar .job-sub {
  font-size: 11px; font-weight: 400; opacity: 0.95;
  overflow: hidden; text-overflow: ellipsis;
}

/* ==== Resize handles pe barele Gantt ==== */
.job-bar .resize-handle {
  position: absolute; top: 0; bottom: 0; width: 7px;
  cursor: ew-resize; z-index: 3;
  background: transparent;
}
.job-bar .resize-handle.resize-left  { left: 0;  border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.job-bar .resize-handle.resize-right { right: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.job-bar:hover .resize-handle { background: rgba(255,255,255,0.4); }
.job-bar.resizing { z-index: 20; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #0ea5e9; }
.job-bar.resizing .resize-handle { background: rgba(14,165,233,0.7); }

/* Culori după STATUS-ul tichetului (fiecare status = altă culoare) */
.job-bar.status-POSTED     { background: #94a3b8; }  /* gri — nou/în așteptare */
.job-bar.status-ASSIGNED   { background: #58b5e8; }  /* albastru — planificat */
.job-bar.status-NOTIFIED   { background: #0ea5e9; }  /* albastru intens — notificat */
.job-bar.status-EN_ROUTE   { background: #7f7be9; }  /* mov — pe drum */
.job-bar.status-STARTED    { background: #f59e0b; color:#fff; }  /* portocaliu — în lucru */
.job-bar.status-FINISHED   { background: #16a34a; color:#fff; }  /* VERDE — finalizat */
.job-bar.status-FAILED     { background: #ef4444; color:#fff; }  /* roșu — probleme */
.job-bar.status-RESCHEDULED{ background: #ec4899; color:#fff; }  /* ROZ — reprogramat */
.job-bar.status-SUSPENDED  { background: #bbc5d3; }  /* gri — suspendat/escalat */
.job-bar.job-reprog{ cursor:pointer; opacity:.95; }            /* ROZ — copie reprogramată pe mâine (umbră) */
.job-bar.status-DELAYED   { background:#eab308; color:#1e293b; } /* GALBEN — tehnicianul întârzie */
.job-bar.status-NOT_TODAY { background:#fca5a5; color:#7f1d1d; } /* ROȘU DESCHIS — nu ajunge azi */

.now-line {
  position: absolute; top: 0; bottom: 0;
  width: 2px; background: var(--color-danger);
  z-index: 3; pointer-events: none;
}
.now-line::before {
  content: ''; position: absolute; top: -4px; left: -4px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--color-danger);
}

/* ==========================================================================
   UNASSIGNED DRAWER — stil Planado (roșu-pill count)
   ========================================================================== */
.unassigned-drawer {
  background: #fff;
  border-top: 1px solid var(--color-border);
  max-height: 200px;
  display: flex; flex-direction: column;
  transition: max-height 0.2s;
  box-shadow: 0 -1px 4px rgba(0,0,0,0.03);
}
.unassigned-drawer.collapsed { max-height: 38px; }

.drawer-header {
  padding: 0 16px;
  height: 38px;
  display: flex; align-items: center; gap: 10px;
  background: #fff;
  border-bottom: 1px solid var(--color-border-divider);
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}
.drawer-header .title {
  font-size: 11px; font-weight: 700; letter-spacing: 1.2px;
  color: var(--color-text-heading); text-transform: uppercase;
}
.drawer-header .count-pill {
  background: var(--color-danger); color: #fff; padding: 1px 8px;
  border-radius: 9999px; font-size: 11px; font-weight: 700;
}
.drawer-header .sub {
  color: var(--color-text-muted); font-size: 10px;
  text-transform: uppercase; letter-spacing: 1.2px; font-weight: 600;
}
.drawer-header .caret { margin-left: auto; color: var(--color-text-muted); font-size: 12px; }
.drawer-body {
  overflow-x: auto; padding: 10px 16px;
  display: flex; gap: 8px; flex: 1;
  background: var(--color-bg-subtle);
}
.drawer-body .empty {
  display: flex; align-items: center; justify-content: center;
  width: 100%; color: var(--color-text-muted); font-size: 12px;
}

.unassigned-card {
  flex-shrink: 0; width: 210px;
  background: #fff; border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  font-size: 11px;
  box-shadow: var(--shadow-card);
  transition: filter 0.1s, transform 0.1s;
}
.unassigned-card:hover {
  filter: brightness(0.98);
  transform: translateY(-1px);
}
.unassigned-card .type {
  font-size: 9px; color: #fff; padding: 1px 6px;
  border-radius: var(--radius-sm); font-weight: 700;
  display: inline-block; margin-bottom: 4px; letter-spacing: 0.3px;
  text-transform: uppercase;
  background: var(--color-posted-job);
}
.unassigned-card .title {
  font-weight: 600; color: var(--color-text-heading); font-size: 12px; margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.unassigned-card .sub {
  font-size: 11px; color: var(--color-text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.unassigned-card .bottom {
  margin-top: 4px; display: flex; justify-content: space-between;
  font-size: 10px; color: var(--color-text-muted);
}
.unassigned-card .duration { color: var(--color-text); font-weight: 600; }

/* ==========================================================================
   LOGIN
   ========================================================================== */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: #f4f4f4;
}
.login-box {
  background: #fff; padding: 34px 30px; border-radius: var(--radius-md);
  box-shadow: 0 4px 24px rgba(0,0,0,0.12); width: 100%; max-width: 380px;
  border-top: 3px solid var(--color-brand);
}
.login-box h1 {
  text-align: center; margin-top: 0;
  font-size: 20px; color: var(--color-text-heading); font-weight: 600;
}
.login-box .brand-sub {
  text-align: center; color: var(--color-text-muted); font-size: 12px; margin-bottom: 24px;
}
.login-box label {
  display: block; font-size: 12px; color: var(--color-text-label); margin: 14px 0 6px; font-weight: 600;
}
.login-box input {
  width: 100%; padding: 9px 12px; border: 1px solid var(--color-border-input); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit;
}
.login-box input:focus { outline: none; border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(29,137,207,0.15); }
.login-box button.primary {
  width: 100%; background: var(--color-brand); color: #fff; padding: 10px;
  border: 0; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600;
  cursor: pointer; margin-top: 20px; font-family: inherit;
}
.login-box button.primary:hover { background: var(--color-brand-hover); }

.err { background: #f2dede; color: #a94442; padding: 9px; border-radius: var(--radius-sm); font-size: 12px; margin-top: 12px; border: 1px solid #ebccd1; }
.ok  { background: #dff0d8; color: #3c763d; padding: 9px; border-radius: var(--radius-sm); font-size: 12px; margin-top: 12px; border: 1px solid #d6e9c6; }

/* ==========================================================================
   Pagini secundare (Tichete, Tehnicieni)
   ========================================================================== */
.page-wrap { padding: 16px 20px; max-width: 1440px; margin: 0 auto; }
.card { background: #fff; border-radius: var(--radius-sm); padding: 16px;
        box-shadow: var(--shadow-card); margin-bottom: 14px;
        border: 1px solid var(--color-border-divider); }
.card h2 { margin-top: 0; font-size: 14px; color: var(--color-text-heading); font-weight: 600; }
h1 { font-size: 18px; color: var(--color-text-heading); margin: 0 0 14px; font-weight: 600; }

label { display: block; font-size: 12px; color: var(--color-text-label); margin: 10px 0 4px; font-weight: 600; }
input, select, textarea {
  width: 100%; padding: 7px 10px; border: 1px solid var(--color-border-input); border-radius: var(--radius-sm);
  font-size: 13px; background: #fff; color: var(--color-text-heading); font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(29,137,207,0.12);
}
button.primary {
  background: var(--color-brand); color: #fff; padding: 8px 16px;
  border: 0; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: inherit;
}
button.primary:hover { background: var(--color-brand-hover); }
button.secondary {
  background: var(--color-bg-btn); color: var(--color-text-heading); padding: 6px 14px;
  border: 1px solid var(--color-border-btn);
  border-radius: var(--radius-sm); font-size: 12px; cursor: pointer; font-family: inherit;
}
button.secondary:hover { background: var(--color-bg-hover); }
button.danger { background: var(--color-danger); color: #fff; border: 0; }
button.danger:hover { background: var(--color-danger-hover); }

table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius-sm); overflow: hidden;
        border: 1px solid var(--color-border-divider); }
th, td { padding: 8px 12px; text-align: left; font-size: 12px; border-bottom: 1px solid var(--color-border-divider); }
th { background: var(--color-bg-subtle); font-weight: 700; color: var(--color-text-label); font-size: 11px;
     text-transform: uppercase; letter-spacing: 0.4px; }
tr:last-child td { border-bottom: 0; }

.badge { display: inline-block; padding: 2px 8px; border-radius: var(--radius-sm); font-size: 10px; font-weight: 700;
         text-transform: uppercase; letter-spacing: 0.4px; color: #fff; }
.badge-new         { background: var(--color-posted-job); }
.badge-assigned    { background: var(--color-posted-job); }
.badge-notified    { background: var(--color-en-route-job); }
.badge-in_progress { background: var(--color-started-job); }
.badge-done        { background: var(--color-successful-finished-job); }
.badge-escalated   { background: var(--color-danger); }

.muted { color: var(--color-text-muted); font-size: 11px; }
.inline-actions { display: flex; gap: 6px; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: none;
  align-items: center; justify-content: center; z-index: 1032;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius-md); padding: 22px; width: 95%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-dialog);
}
/* Modal cu X persistent în colț: caseta nu scrollează, doar conținutul interior */
.modal.modal-box {
  position: relative; padding: 0; overflow: hidden;
}
.modal-box .modal-scroll {
  padding: 22px; max-height: 90vh; overflow-y: auto;
}
.modal-x {
  position: absolute; top: 10px; right: 12px; z-index: 6;
  width: 34px; height: 34px; border-radius: 50%;
  border: none; background: #f1f5f9; color: #334155;
  font-size: 18px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.modal-x:hover { background: #e11d48; color: #fff; }
.modal h2 { margin-top: 0; font-size: 15px; color: var(--color-text-heading); font-weight: 600; }
.modal table td { padding: 6px 10px; font-size: 12px; border-bottom: 1px solid var(--color-border-divider); }
