/* ═══════════════════════════════════════
   GS1 Romania — gs1-styles.css
   Shared stylesheet pentru toate paginile
═══════════════════════════════════════ */

:root {
  --bg:         rgb(31, 37, 45);
  --bg-2:       rgb(39, 44, 53);
  --bg-hover:   rgb(45, 51, 61);
  --border:     rgba(255,255,255,0.08);
  --primary:    rgb(94, 149, 212);
  --primary-h:  rgb(74, 129, 192);
  --orange:     #f97316;
  --green:      #4ade80;
  --red:        #f87171;
  --yellow:     #facc15;
  --brown:      #c8956c;
  --text:       rgb(220, 226, 234);
  --text-2:     rgb(148, 163, 184);
  --text-3:     rgb(90, 105, 125);
  --sw:         220px;
  --hh:         60px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: ui-sans-serif, system-ui, sans-serif,
    "Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
}

a { text-decoration: none; color: var(--primary); font-weight: 600; }
a:hover { color: var(--primary-h); }

/* ─── SIDEBAR ─── */
.sidebar {
  width: var(--sw);
  height: 100vh;
  position: fixed;
  top: 0; left: 0;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 100;
}
.sb-logo {
  height: var(--hh);
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sb-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 8px;
  scrollbar-width: none;
}
.sb-nav::-webkit-scrollbar { display: none; }
.sb-section {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 8px 10px 5px;
  margin-top: 4px;
}
.sb-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px;
  border-radius: 8px;
  border-left: 2px solid transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 1px;
  transition: background 0.15s, color 0.15s;
}
.sb-item:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.sb-item.active {
  background: rgba(94,149,212,0.14);
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}
.sb-left { display: flex; align-items: center; gap: 9px; }
.sb-badge {
  font-size: 10px; font-weight: 700;
  padding: 1px 7px; border-radius: 10px;
  background: rgba(94,149,212,0.18);
  color: var(--primary);
  min-width: 22px; text-align: center;
}
.sb-badge.w { background: rgba(249,115,22,0.18); color: var(--orange); }
.sb-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.6;
  flex-shrink: 0;
}

/* ─── MAIN ─── */
.main {
  margin-left: var(--sw);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ─── HEADER ─── */
.gs1-header {
  height: var(--hh);
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.search-wrap { position: relative; width: 280px; flex-shrink: 0; }
.search-wrap svg {
  position: absolute; left: 11px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-2); pointer-events: none;
}
.search-wrap input {
  width: 100%; height: 36px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px 0 35px;
  color: var(--text); font-size: 13px; font-family: inherit;
  outline: none; transition: border-color 0.2s;
}
.search-wrap input:focus { border-color: rgba(94,149,212,0.5); }
.search-wrap input::placeholder { color: var(--text-2); }

.hspacer { flex: 1; }

/* istoric dropdown — CSS only hover */
.hist-wrap { position: relative; flex-shrink: 0; }
.hist-btn {
  display: flex; align-items: center; gap: 5px;
  height: 36px; padding: 0 12px;
  border-radius: 8px; background: transparent; border: none;
  cursor: pointer; color: var(--text-2);
  font-size: 12.5px; font-family: inherit; font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.hist-btn:hover,
.hist-wrap:hover .hist-btn { background: rgba(255,255,255,0.07); color: var(--text); }

.hist-drop {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  width: 500px;
  padding-top: 6px;   /* bridge: elimina gap-ul care rupe hover-ul */
  z-index: 200;
}
.hist-wrap:hover .hist-drop { display: block; }

.hist-drop-inner {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.hist-col { padding: 0 12px; }
.hist-col:first-child { padding-left: 0; }
.hist-col:last-child  { padding-right: 0; }
.hist-col + .hist-col { border-left: 1px solid var(--border); }
.hist-label {
  display: block;
  font-size: 10px; font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.6px;
  padding-bottom: 6px; margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.hist-item {
  display: block;
  padding: 5px 6px; border-radius: 6px;
  font-size: 12px; color: var(--text-2);
  text-decoration: none; font-weight: 400;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background 0.15s, color 0.15s;
}
.hist-item:hover { background: rgba(255,255,255,0.06); color: var(--text); }

.h-div { width: 1px; height: 22px; background: var(--border); margin: 0 4px; flex-shrink: 0; }

/* user chip */
.user-chip {
  display: flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 10px 0 6px;
  border-radius: 10px; cursor: pointer;
  text-decoration: none; flex-shrink: 0;
  transition: background 0.15s;
}
.user-chip:hover { background: rgba(255,255,255,0.06); }
.avatar {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, rgb(94,149,212), #6366f1);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.u-name { font-size: 12.5px; font-weight: 600; color: var(--text); display: block; }
.u-role { font-size: 11px; color: var(--text-2); display: block; }

/* ─── CONTENT ─── */
.content { padding: 28px; flex: 1; }

.page-title { font-size: 20px; font-weight: 800; letter-spacing: -0.2px; margin-bottom: 4px; }
.page-sub   { font-size: 13px; color: var(--text-2); margin-bottom: 24px; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 16px; border-radius: 8px;
  font-size: 13px; font-weight: 600; font-family: inherit;
  cursor: pointer; border: none; transition: all 0.18s; text-decoration: none;
}
.btn-sec {
  background: rgba(255,255,255,0.07);
  color: var(--text); border: 1px solid var(--border);
}
.btn-sec:hover { background: rgba(255,255,255,0.12); }
.action-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }

/* ─── FILTER ─── */
.filter-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.filter-label { font-size: 13px; color: var(--text-2); font-weight: 500; white-space: nowrap; }
.filter-select {
  height: 36px; padding: 0 32px 0 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); font-size: 13px; font-family: inherit;
  outline: none; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237c8db0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  min-width: 160px;
  transition: border-color 0.2s;
}
.filter-select:focus { border-color: rgba(94,149,212,0.5); }
.filter-select option { background: rgb(39,44,53); color: var(--text); }

/* ─── TABLE ─── */
.table-wrap {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
}
table { width: 100%; border-collapse: collapse; }
thead tr { background: rgba(255,255,255,0.03); border-bottom: 1px solid var(--border); }
thead th {
  padding: 11px 16px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--text-3); text-align: left; white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border); transition: background 0.15s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,0.025); }
tbody td { padding: 12px 16px; font-size: 13px; color: var(--text-2); vertical-align: middle; }

.td-link { color: var(--primary); font-weight: 600; }
.td-link:hover { color: var(--primary-h); }
.td-link-off { color: var(--text-3); font-weight: 500; cursor: default; }
.td-num  { color: var(--text); }
.td-date { color: var(--text-2); white-space: nowrap; font-size: 12.5px; }
.td-user { color: var(--text-2); font-size: 12.5px; }
.info-line { font-size: 12px; margin-bottom: 2px; color: var(--text-2); }

/* ─── BADGES ─── */
.badge {
  display: inline-flex; align-items: center;
  height: 20px; padding: 0 7px; border-radius: 4px;
  font-size: 10.5px; font-weight: 700;
  white-space: nowrap;
  margin-right: 3px; margin-bottom: 2px;
}
.b-blue   { background: rgba(94,149,212,0.15); color: rgb(94,149,212); }
.b-red    { background: rgba(248,113,113,0.15); color: #f87171; }
.b-green  { background: rgba(74,222,128,0.15);  color: #4ade80; }
.b-yellow { background: rgba(250,204,21,0.15);  color: #facc15; }
.b-orange { background: rgba(249,115,22,0.15);  color: var(--orange); }
.b-brown  { background: rgba(180,120,60,0.15);  color: #c8956c; }

/* ─── STATUS TEXT ─── */
.v-da  { color: var(--green);  font-weight: 600; }
.v-nu  { color: var(--red);    font-weight: 600; }
.v-sc  { color: var(--yellow); font-weight: 600; }

/* ─── RESPINGE BTN ─── */
.btn-resp {
  display: inline-flex; align-items: center;
  height: 26px; padding: 0 10px; border-radius: 6px;
  background: rgba(248,113,113,0.12);
  border: 1px solid rgba(248,113,113,0.25);
  color: #f87171; font-size: 12px; font-weight: 600;
  font-family: inherit; cursor: pointer;
  transition: all 0.15s; text-decoration: none;
}
.btn-resp:hover { background: rgba(248,113,113,0.22); border-color: rgba(248,113,113,0.5); color: #f87171; }