/* OSUT Intern — Crimson Premium UI
   Mobile-first, table-to-cards on small screens.
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;650;800;900&display=swap');

:root{
  --brand:#ac0000;
  --brand-glow: rgba(172,0,0,.50);
  --brand-dim: rgba(172,0,0,.14);
  --brand-border: rgba(172,0,0,.30);

  --bg-deep:#050505;
  --bg-surface:#0f0f10;
  --bg-float: rgba(20,20,20,.82);

  --text:#ffffff;
  --muted:#a0a0a0;

  --line: rgba(255,255,255,.08);
  --line2: rgba(255,255,255,.14);

  --shadow: 0 20px 40px -12px rgba(0,0,0,.82);
  --shadow-soft: 0 12px 28px rgba(0,0,0,.55);
  --focus: 0 0 0 4px var(--brand-dim);

  --r-xl:24px;
  --r-md:16px;
  --r-sm:10px;

  --btn-h:42px;
  --btn-h-sm:36px;

  --max: 1120px;
}

*{ box-sizing:border-box; -webkit-tap-highlight-color: transparent; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at 50% -20%, rgba(172, 0, 0, 0.26), transparent 60%),
    radial-gradient(circle at 100% 50%, rgba(172, 0, 0, 0.08), transparent 40%),
    var(--bg-deep);
  background-attachment: fixed;
  line-height:1.55;
  font-size:15px;
}

a{ color:inherit; text-decoration:none; }
.muted{ color:var(--muted); }
.small{ font-size:12px; }
.hr{ height:1px; background:var(--line); border:0; margin:14px 0; }

.container{
  max-width: var(--max);
  margin:0 auto;
  padding: 0 16px;
}

/* NAV ISLAND */
.nav-island{
  position: sticky;
  top: 12px;
  z-index: 50;
  margin: 12px 12px 18px;
  background: var(--bg-float);
  backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid var(--line2);
  border-radius: 20px;
  padding: 10px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  box-shadow: var(--shadow-soft);
}

.brand{
  display:flex; align-items:center; gap:10px;
  font-weight: 900; letter-spacing: .2px;
}
.brand .dot{
  width: 12px; height: 12px;
  border-radius:999px;
  background: var(--brand);
  box-shadow: 0 0 12px var(--brand-glow);
}
.nav-links{
  display:flex; align-items:center; gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.pill{
  display:inline-flex;
  align-items:center;
  height: 34px;
  padding: 0 12px;
  border-radius: 16px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  font-weight:800;
  font-size:12px;
  transition:.15s ease;
}
.pill:hover{ background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.18); }
.pill.active{
  border-color: var(--brand-border);
  background: rgba(172,0,0,.10);
}

.user-chip{
  display:flex; align-items:center; gap:10px;
}
.avatar{
  width:36px; height:36px; border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.04));
  border:1px solid var(--line);
  display:flex; align-items:center; justify-content:center;
  font-weight:900;
}

/* PAGE HEADER */
.page-head{
  padding: 18px 0 10px;
}
.h1{
  margin:0;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -1px;
  background: linear-gradient(to right, #fff, #cfcfcf);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
}
.sub{
  margin-top:4px;
  color:var(--muted);
  font-size:13px;
}

/* CARDS */
.grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
  padding-bottom: 32px;
}
@media (max-width: 900px){
  .grid{ grid-template-columns: 1fr; }
}

.card{
  grid-column: span 12;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 18px;
  box-shadow: var(--shadow);
  position:relative;
  overflow:hidden;
}
.card::before{
  content:"";
  position:absolute;
  left:0; right:0; top:0;
  height:2px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  opacity:.9;
}
.card:hover{
  border-color: var(--brand-border);
  box-shadow: 0 24px 54px rgba(172,0,0,.14);
}

.card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom: 12px;
}
.card-title{
  font-weight: 900;
  margin:0;
  font-size: 16px;
}
.card-actions{ display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end; }

/* FORMS */
.form{
  display:grid;
  gap: 12px;
}
.field{
  display:flex;
  flex-direction:column;
  gap: 8px;
}
.label{
  font-size:12px;
  font-weight:900;
  color: var(--muted);
  letter-spacing:.6px;
  text-transform: uppercase;
  padding-left:4px;
}

.input, select.input, textarea.input{
  width:100%;
  border-radius: var(--r-md);
  border: 1px solid var(--line2);
  background: #000;
  color: var(--text);
  padding: 14px 14px;
  font-size: 15px;
  font-family: inherit;
  outline:none;
  transition: .15s ease;
}

textarea.input{ min-height: 110px; resize: vertical; }

.input:focus{
  border-color: var(--brand);
  background: rgba(172,0,0,.06);
  box-shadow: var(--focus);
}

/* Make options readable on many browsers */
select.input{
  appearance:none;
  -webkit-appearance:none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255,255,255,.70) 50%),
    linear-gradient(135deg, rgba(255,255,255,.70) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 55%,
    calc(100% - 12px) 55%;
  background-size: 6px 6px, 6px 6px;
  background-repeat:no-repeat;
  padding-right: 36px;
}
select.input option{
  background:#0c0c0c;
  color:#fff;
}

/* BUTTONS */
.btn{
  height: var(--btn-h);
  padding: 0 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line2);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  color: var(--text);
  font-weight: 900;
  letter-spacing:.4px;
  text-transform: uppercase;
  font-size: 13px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease, opacity .12s ease;
  box-shadow: 0 10px 24px rgba(0,0,0,.30);
}
.btn:hover{
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.20);
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.06));
  box-shadow: 0 14px 30px rgba(0,0,0,.36);
}
.btn:active{ transform: translateY(0px) scale(.99); }
.btn:focus{ outline:none; box-shadow: var(--focus), 0 14px 30px rgba(0,0,0,.36); }
.btn:disabled{ opacity:.55; cursor:not-allowed; transform:none; box-shadow:none; }

.btn-sm{ height: var(--btn-h-sm); padding: 0 12px; border-radius: 14px; font-size: 12px; }

.btn-primary{
  border-color: var(--brand-border);
  background: linear-gradient(135deg, rgba(172,0,0,.42), rgba(172,0,0,.18));
  box-shadow: 0 16px 32px rgba(172,0,0,.18);
}
.btn-primary:hover{
  background: linear-gradient(135deg, rgba(172,0,0,.52), rgba(172,0,0,.24));
}

.btn-approve{
  border-color: rgba(34,197,94,.55);
  background: linear-gradient(135deg, rgba(34,197,94,.30), rgba(34,197,94,.12));
}
.btn-warn{
  border-color: rgba(245,158,11,.62);
  background: linear-gradient(135deg, rgba(245,158,11,.28), rgba(245,158,11,.10));
}
.btn-danger{
  border-color: rgba(239,68,68,.62);
  background: linear-gradient(135deg, rgba(239,68,68,.24), rgba(239,68,68,.10));
}

.btn-link{
  border: 1px solid transparent;
  background: transparent;
  box-shadow:none;
  text-transform:none;
  letter-spacing:0;
  font-size:13px;
  height: 34px;
  padding: 0 10px;
  border-radius: 14px;
  color: var(--muted);
}
.btn-link:hover{
  background: rgba(255,255,255,.06);
  border-color: var(--line);
  transform:none;
  color:#fff;
}

/* BADGES */
.badge{
  display:inline-flex;
  align-items:center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing:.4px;
  border:1px solid var(--line2);
}
.badge.pending{ background: rgba(245,158,11,.14); color: #ffb020; border-color: rgba(245,158,11,.30); }
.badge.approved{ background: rgba(34,197,94,.14); color: #5dff9f; border-color: rgba(34,197,94,.30); }
.badge.rejected{ background: rgba(239,68,68,.14); color: #ff6b6b; border-color: rgba(239,68,68,.30); }

/* TOOLBAR (filters & bulk actions) */
.toolbar{
  display:flex;
  gap: 12px;
  flex-wrap:wrap;
  align-items:flex-end;
  justify-content:space-between;
}
.toolbar .left,
.toolbar .right{
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
  align-items:flex-end;
}
.toolbar .left{ flex: 1 1 520px; }
.toolbar .right{ justify-content:flex-end; flex: 1 1 260px; }
@media (max-width:720px){
  .toolbar{ flex-direction:column; align-items:stretch; }
  .toolbar .left, .toolbar .right{ width:100%; }
  .btn.mobile-full{ width:100%; }
}

/* TABLE -> Desktop table, Mobile cards */
.table-wrap{ width:100%; overflow:auto; border-radius: 18px; border:1px solid var(--line); }
.table{
  width:100%;
  border-collapse: collapse;
  min-width: 820px;
  background: rgba(255,255,255,.02);
}
.table th, .table td{
  padding: 12px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.table thead th{
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing:.7px;
  color: var(--muted);
  font-weight: 900;
  background: rgba(255,255,255,.03);
}
.table tbody tr:hover{ background: rgba(255,255,255,.03); }

.actions{
  display:flex;
  gap: 8px;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
}
.table form{ display:inline-block; margin:0; }

/* Mobile cards view */
@media (max-width: 900px){
  .table-wrap{ border:none; overflow:visible; }
  .table{
    min-width: unset;
    border: none;
    background: transparent;
  }
  .table thead{ display:none; }
  .table, .table tbody, .table tr, .table td{ display:block; width:100%; }
  .table tr{
    background: rgba(255,255,255,.03);
    border: 1px solid var(--line);
    border-radius: 18px;
    margin-bottom: 12px;
    overflow:hidden;
  }
  .table td{
    border-bottom: 1px solid var(--line);
    padding: 12px 14px;
  }
  .table td:last-child{ border-bottom:none; }

  .td-label{
    display:block;
    font-size: 11px;
    font-weight: 900;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing:.7px;
    margin-bottom: 6px;
  }
  .actions{ justify-content:flex-start; }
}

/* Inline code pill (for ids etc) */
.code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border:1px solid var(--line);
  color:#fff;
}
/* --- Approvals: keep actions visible, wrap description downward --- */
.table-wrap .table {
  table-layout: fixed;
  width: 100%;
}

.table-wrap .table th,
.table-wrap .table td {
  vertical-align: top;
}

/* Coloana de actiuni ramane stabila */
.table-wrap .table th.col-actions,
.table-wrap .table td.col-actions {
  width: 240px;              /* ajustezi 220-280 dupa gust */
  white-space: nowrap;
}

/* Coloana descriere: se rupe pe randuri, nu impinge lateral */
.table-wrap .table td.col-desc {
  width: auto;
}

.desc-box {
  display: block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;   /* rupe si cuvinte lungi / links */
  word-break: break-word;
  line-height: 1.35;
}

/* Butoane: nu ies din container; pe desktop stau ok, pe mobil se pot aseza pe 2 randuri */
.actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
/* =========================
   Premium Dashboard (Crimson)
   ========================= */
:root{
  --brand:#ac0000;
  --brand-glow: rgba(172,0,0,.45);
  --brand-dim: rgba(172,0,0,.12);
  --line: rgba(255,255,255,.10);
  --line2: rgba(255,255,255,.16);
  --bg0:#050505;
  --bg1:#0f0f0f;
  --bg2:#151515;
}

/* wrapper */
.dash{ max-width: 1100px; margin: 0 auto; }

/* header */
.dash-head{
  display:flex; flex-wrap:wrap; gap:14px;
  align-items:flex-end; justify-content:space-between;
  margin-bottom:16px;
}
.dash-title{
  font-size:28px; font-weight:900; letter-spacing:-.6px;
  background: linear-gradient(to right, #fff, #d0d0d0);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent;
}
.dash-sub{ font-size:13px; color: rgba(255,255,255,.70); }
.dash-head-actions{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }

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

/* pills */
.pill{
  display:inline-flex; align-items:center; gap:8px;
  padding:10px 12px; border-radius:999px;
  background: rgba(20,20,20,.72);
  border:1px solid var(--line2);
  backdrop-filter: blur(14px) saturate(170%);
}
.pill-dot{ width:10px; height:10px; border-radius:50%; background:var(--brand); box-shadow:0 0 10px var(--brand); }
.pill-text{ font-weight:800; font-size:12px; letter-spacing:.4px; }

/* grid */
.dash-grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap:14px;
  margin-bottom:14px;
}
.kpi-card{ padding:18px; }
.kpi-card:nth-child(1){ grid-column: span 4; }
.kpi-card:nth-child(2){ grid-column: span 4; }
.kpi-card:nth-child(3){ grid-column: span 4; }

@media (max-width: 980px){
  .kpi-card:nth-child(1),
  .kpi-card:nth-child(2),
  .kpi-card:nth-child(3){ grid-column: span 12; }
}

/* kpi internals */
.kpi-top{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px; }
.kpi-title{ font-weight:800; font-size:14px; }
.kpi-chip{
  font-size:11px; font-weight:900; text-transform:uppercase;
  padding:6px 10px; border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
}
.kpi-chip.ok{ border-color: rgba(0,255,128,.25); background: rgba(0,255,128,.08); }
.kpi-value{ font-size:40px; font-weight:900; line-height:1; margin:8px 0 6px; }
.kpi-note{ font-size:12px; }
.kpi-mini{ margin-top:10px; font-size:12px; display:flex; gap:8px; align-items:baseline; }

.kpi-bar{
  height:8px; border-radius:999px;
  background: rgba(255,255,255,.08);
  overflow:hidden; margin-top:10px;
}
.kpi-bar-fill{
  height:100%;
  background: var(--brand);
  box-shadow: 0 0 16px var(--brand-glow);
  border-radius:999px;
}

.kpi-spark{ margin-top:12px; }
.spark-pill{
  display:flex; gap:10px; align-items:center;
  padding:10px 12px; border-radius:14px;
  background: rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.08);
}
.spark-dot{ width:10px; height:10px; border-radius:50%; background:rgba(0,255,128,.9); box-shadow:0 0 10px rgba(0,255,128,.35); }

/* quick actions */
.qa{ display:grid; gap:10px; margin-top:8px; }
.qa-btn{
  display:flex; gap:12px; align-items:center;
  padding:12px 12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  text-decoration:none;
  transition: transform .12s ease, border-color .2s ease, box-shadow .2s ease;
}
.qa-btn:hover{
  transform: translateY(-2px);
  border-color: rgba(172,0,0,.35);
  box-shadow: 0 16px 40px rgba(172,0,0,.12);
}
.qa-accent{
  background: rgba(172,0,0,.08);
  border-color: rgba(172,0,0,.25);
}
.qa-ico{
  width:42px; height:42px; border-radius:16px;
  display:flex; align-items:center; justify-content:center;
  background: rgba(0,0,0,.55);
  border:1px solid rgba(255,255,255,.10);
  font-size:18px;
}
.qa-title{ font-weight:900; letter-spacing:-.2px; }
.qa-sub{ font-size:12px; }

/* top card */
.top-card{ padding:18px; }
.top-head{
  display:flex; align-items:flex-end; justify-content:space-between;
  gap:10px; flex-wrap:wrap;
  margin-bottom:14px;
}
.top-title{ font-size:18px; font-weight:900; letter-spacing:-.3px; }
.top-sub{ font-size:12px; }
.top-actions{ display:flex; gap:10px; align-items:center; }

.top-list{ display:flex; flex-direction:column; gap:10px; }
.top-row{
  display:grid;
  grid-template-columns: 34px 1.2fr 90px 1fr;
  gap:12px;
  align-items:center;
  padding:12px 12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
}
@media(max-width: 720px){
  .top-row{
    grid-template-columns: 28px 1fr 72px;
    grid-template-areas:
      "rank user hours"
      "rank bar  bar";
  }
  .top-rank{ grid-area: rank; }
  .top-user{ grid-area: user; }
  .top-hours{ grid-area: hours; }
  .top-bar{ grid-area: bar; }
}

.top-rank{
  font-weight:900;
  color: rgba(255,255,255,.55);
}
.top-name{ font-weight:900; }
.top-handle{ font-size:12px; }
.top-hours{ text-align:right; }
.top-hours-val{ font-weight:900; font-size:16px; }
.top-hours-sub{ font-size:11px; margin-top:-2px; }

.top-bar{
  height:8px; border-radius:999px;
  background: rgba(255,255,255,.08);
  overflow:hidden;
}
.top-bar-fill{
  height:100%;
  background: var(--brand);
  box-shadow: 0 0 16px var(--brand-glow);
  border-radius:999px;
}

/* compact controls */
.input-compact{ padding:10px 12px !important; border-radius:14px !important; font-size:13px !important; }
.btn-compact{ padding:10px 12px !important; border-radius:14px !important; font-size:12px !important; }
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
}

.brand-logo{
  height:28px;
  width:auto;
  display:block;
  border-radius:8px;      /* dacă e pătrat */
}

.brand-text{
  font-weight:800;
  letter-spacing:.2px;
}
@media (max-width: 520px){
  .brand-text{ display:none; }
  .brand-logo{ height:30px; }
}
.nav-island { gap: 12px; }
.nav-links { display:flex; flex-wrap:wrap; gap:10px; }

@media (max-width: 760px){
  .nav-island { align-items: flex-start; }
  .user-chip { margin-left: auto; }
  .pill { padding: 10px 12px; font-size: 13px; }
}
/* =========================
   Mobile navbar compact
   ========================= */

.nav-island{
  position: sticky;
  top: 12px;
}

/* Default: ok pe desktop */
.nav-links{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

/* Mobile: compact + scroll horizontal */
@media (max-width: 720px){
  .nav-island{
    padding: 10px 12px;
    border-radius: 16px;
    gap: 10px;
  }

  /* Brand mic */
  .brand{
    display:flex;
    align-items:center;
    gap:8px;
    min-width: 0;
  }
  .brand-logo{
    width: 22px;
    height: 22px;
    border-radius: 6px;
  }
  .brand-text{
    font-size: 13px;
    letter-spacing: .6px;
    font-weight: 900;
    white-space: nowrap;
  }

  /* Links: un singur rând, scroll */
  .nav-links{
    flex: 1;
    min-width: 0;
    flex-wrap: nowrap;         /* NU mai rupe rânduri */
    overflow-x: auto;          /* scroll */
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;     /* Firefox */
    gap: 8px;
    padding-bottom: 2px;
  }
  .nav-links::-webkit-scrollbar{ display:none; }

  /* Pills mai mici */
  .pill{
    flex: 0 0 auto;
    padding: 8px 10px;
    font-size: 12px;
    border-radius: 999px;
    line-height: 1;
    white-space: nowrap;
  }

  /* User chip super compact */
  .user-chip{
    gap: 8px;
  }
  .user-chip .muted.small{
    display:none;              /* scoate nume+rol pe mobil */
  }
  .avatar{
    width: 30px;
    height: 30px;
    border-radius: 10px;
    font-size: 12px;
  }

  /* Logout mic */
  .user-chip .btn{
    padding: 8px 10px;
    font-size: 12px;
    border-radius: 12px;
  }
}
