/* === Klypp Hub Dark – păstrează sizing/spacing, schimbă doar look-ul === */

/* Tokens: păstrează numele variabilelor, schimbă valorile în dark + violet */
:root {
  --md3-primary: #6366f1;
  /* violet */
  --md3-primary-dark: #4f46e5;
  /* violet intens */
  --md3-primary-light: #818cf8;
  /* accent violet deschis */
  --md3-accent: #22d3ee;
  /* cyan subtil pt. linkuri/accente */

  --md3-bg: linear-gradient(145deg, #0f172a, #1e293b);
  /* fundal ca landing */
  --md3-surface: #1e293b;
  /* card/surface ca pe hub */
  --md3-surface-2: #172033;
  /* surface subtil */
  --md3-text: #e5e7eb;
  /* text principal */
  --md3-text-dim: #9ca3af;
  /* text secundar */
  --md3-outline: rgba(129, 140, 248, 0.28);
  /* contur fin violet */
  --md3-outline-strong: rgba(129, 140, 248, 0.45);
  /* contur puternic violet */

  --maxw: 1440px;
  --radius: 14px;
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.35), 0 2px 10px rgba(0, 0, 0, 0.25);
  /* umbre dark */
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  font-family: "Red Hat Text", sans-serif;
  /* păstrat pt. a nu schimba metrica */
}

body {
  margin: 0;
  background: var(--md3-bg);
  color: var(--md3-text);
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
}

/* Cards */
.card {
  background: var(--md3-surface);
  border-radius: var(--radius);
  border: 1px solid var(--md3-outline);
  box-shadow: var(--shadow);
}

.card-header {
  padding: 16px 0px;
  border-bottom: 1px solid var(--md3-outline);
  font-weight: 600;
  color: var(--md3-text);
}

/* Form */
.input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--md3-surface);
  border: 1px solid var(--md3-outline);
  border-radius: 12px;
  color: var(--md3-text);
  margin-top: 8px;
}

.input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--md3-primary);
  border-color: var(--md3-primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

::placeholder {
  color: #8b93a5;
  opacity: 1;
}

/* ===== Butoane uniforme ===== */
.btn,
.btn.ghost,
.dash-btn,
.dash-btn-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 120px;
  /* păstrat */
  padding: 5px 10px;
  /* păstrat */
  font-size: 12px;
  /* păstrat */
  font-weight: 500;
  line-height: 1.4;
  border-radius: 16px;
  /* păstrat */
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.05s ease, background 0.15s ease, box-shadow .15s;
}

/* Primar */
.btn,
.dash-btn {
  background: linear-gradient(180deg, var(--md3-primary), var(--md3-primary-dark));
  color: #fff;
  border: none;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.35);
}

.btn:hover,
.dash-btn:hover {
  filter: brightness(1.05);
}

.btn:active,
.dash-btn:active {
  transform: translateY(0.5px);
}

/* Ghost */
.btn.ghost {
  background: transparent;
  color: var(--md3-text);
  border: 1px solid var(--md3-outline);
  box-shadow: none;
}

.btn.ghost:hover {
  background: var(--md3-surface-2);
}

/* Logout (ghost-style) */
.dash-btn-logout {
  background: transparent;
  color: var(--md3-text-dim);
  border: 1px solid var(--md3-outline);
  box-shadow: none;
}

.dash-btn-logout:hover {
  background: var(--md3-surface-2);
  color: var(--md3-text);
}

/* Layout utils */
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: right;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid.cols-5 {
  grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1024px) {
  .grid.cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .grid.cols-4 {
    grid-template-columns: 1fr;
  }
}

/* Filtre */
.filter-item label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 16px;
  background: var(--md3-surface-2);
  border: 1px solid var(--md3-outline);
  color: var(--md3-text);
  font-size: 12px;
  font-weight: 600;
}

.badge.link {
  cursor: pointer;
  background: rgba(129, 140, 248, 0.18);
  border-color: rgba(129, 140, 248, 0.35);
  color: var(--md3-primary-light);
}

/* Tabel */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.table tr {
  background: var(--md3-surface);
}

.table td,
.table th {
  padding: 5px 8px;
}

.table th {
  color: var(--md3-text-dim);
  font-weight: 400;
  font-size: 14px;
  text-align: left;
}

.table td {
  border-bottom: 1px solid var(--md3-outline);
  font-size: 14px;
  color: var(--md3-text);
}

/* Sidebar log */
.sidebar-log {
  position: fixed;
  right: 0;
  top: 0;
  width: 150px;
  height: 100%;
  overflow: auto;
  background: var(--md3-surface-2);
  border-left: 1px solid var(--md3-outline);
  padding: 8px;
  color: var(--md3-text-dim);
}

.sidebar-log .item {
  font-size: 11px;
  margin: 8px 0;
}

/* Chips */
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border: 1px solid var(--md3-outline);
  background: var(--md3-surface);
  padding: 10px;
  border-radius: 12px;
  max-height: 100px;
  overflow: auto;
  margin-bottom: 10px;
}

.chip {
  border: 1px solid var(--md3-outline);
  background: var(--md3-surface-2);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  color: var(--md3-text);
}

.chip:hover {
  outline: 2px solid var(--md3-primary);
}

.chip.active {
  background: var(--md3-primary);
  color: #fff;
  border-color: var(--md3-primary);
}

/* Focus accesibil */
:focus-visible {
  outline: 2px solid var(--md3-primary);
  outline-offset: 2px;
}

/* Key-Value list */
.kv-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kv .k {
  color: var(--md3-text-dim);
  margin-right: 6px;
}

.kv .v {
  color: var(--md3-text);
}

/* Task table compact + clamps */
.table-narrow td,
.table-narrow th {
  padding: 10px 12px;
}

.col-sm {
  width: 120px;
  white-space: nowrap;
}

.col-xs {
  width: 90px;
  white-space: nowrap;
}

.clamp-2,
.clamp-3,
.clamp-4,
.clamp {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clamp {
  -webkit-line-clamp: var(--lines, 2);
}

.clamp-2 {
  -webkit-line-clamp: 2;
}

.clamp-3 {
  -webkit-line-clamp: 3;
}

.clamp-4 {
  -webkit-line-clamp: 4;
}

@supports not ((line-clamp: 2) or (-webkit-line-clamp: 2)) {

  .clamp,
  .clamp-2,
  .clamp-3,
  .clamp-4 {
    display: block;
    overflow: hidden;
  }

  .clamp {
    max-height: calc(var(--lines, 2) * 1lh);
  }

  .clamp-2 {
    max-height: calc(2 * 1lh);
  }

  .clamp-3 {
    max-height: calc(3 * 1lh);
  }

  .clamp-4 {
    max-height: calc(4 * 1lh);
  }
}

/* Edit rows */
.task-edit-row td {
  background: var(--md3-surface-2);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.55);
  z-index: 1000;
  padding: 16px;
}

.modal.show {
  display: flex;
}

.modal-dialog {
  width: min(520px, 92vw);
  border-radius: 14px;
  background: var(--md3-surface);
  border: 1px solid var(--md3-outline);
}

/* LOGIN CSS */
#fLogin {
  padding: 15px;
}

.login_page {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.login_btn {
  margin: 5px auto;
  display: flex;
  width: 50%;
  justify-content: center;
}

.task_add_btn {
  margin: 5px auto;
  display: flex;
  width: 150px;
  justify-content: center;
}

.login_email {
  margin-bottom: 15px;
}

/* SPAȚIERE CSS – (doar culori/umbre schimbate) */
.project_add_card,
.task_add_card,
.dashboard_card,
.card_general {
  padding: 20px;
  background: var(--md3-surface);
  border: 1px solid var(--md3-outline);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.project_add_card_header,
.task_add_card_header,
.dashboard_card_header,
.header_general {
  padding: 0px 0px 20px 0px;
  color: var(--md3-text);
}

.project_add_card_content {
  margin: 8px;
}

.dashboard_input,
.input_general {
  margin-top: 10px;
}

.project_add_input_last {
  margin-top: 5px;
  margin-bottom: 10px;
}

.comment-item {
  margin-bottom: 8px;
}

.dashboard_filtre {
  padding: 20px;
  font-size: 14px;
  border-radius: 16px;
  background-color: var(--md3-surface);
  border: 1px solid var(--md3-outline);
  box-shadow: var(--shadow);
  color: var(--md3-text);
}

#tblProjects td:nth-child(6) {
  max-width: 260px;
  white-space: normal;
}

.dash-top-bar,
.dash-top-bar-logo,
.dash-top-bar-logo-add {
  background: var(--md3-surface);
  border-radius: 16px;
  border: 1px solid var(--md3-outline);
  box-shadow: var(--shadow);
}

.dash-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
}

.dash-top-bar-logo img,
.dash-top-bar-logo-add img {
  width: 140px;
  align-items: center;
  filter: brightness(0) invert(1);
}

.dash-top-bar-logo-add {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dash-profile-name {
  width: 200px;
  border: 1px solid var(--md3-outline);
  align-items: center;
  display: flex;
  border-radius: 20px;
  padding: 5px;
  justify-content: center;
  color: var(--md3-text);
  font-size: 14px;
  background: var(--md3-surface-2);
}

.dash-fltr-input {
  padding: 5px 14px !important;
  margin-top: 8px;
}

a {
  text-decoration: none;
  color: var(--md3-primary-light);
}

a:hover {
  color: #fff;
  text-decoration: underline;
}

.brd-right {
  border-right: 1px solid var(--md3-outline);
}

.project_add_input,
.task_add_input {
  margin-bottom: 10px;
  margin-top: 5px;
}

.view-card-details {
  padding: 16px !important;
  font-size: 16px;
}

.view-tasks-card {
  margin-top: 8px;
  padding: 16px;
  background: var(--md3-surface);
  border: 1px solid var(--md3-outline);
  border-radius: var(--radius);
}

.card-commentarii {
  padding: 15px;
  background: var(--md3-surface);
  border: 1px solid var(--md3-outline);
  border-radius: var(--radius);
}

.commentarii-title {
  padding-top: 10px;
  color: var(--md3-text);
}

.commentarii-list {
  padding-top: 16px;
}

td a {
  border: 1px solid var(--md3-outline);
  padding: 10px;
  color: var(--md3-text);
  border-radius: 16px;
  font-weight: 500;
  box-shadow: var(--shadow);
  background: var(--md3-surface-2);
}

td a:hover {
  background: rgba(129, 140, 248, 0.18);
  color: #fff;
}

.proj-link {
  color: var(--md3-text);
  font-weight: 500;
  text-decoration: none;
  background: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  border: 0 !important;
}

.proj-link:hover {
  color: var(--md3-primary-light);
  text-decoration: underline;
}

.list-btn {
  padding: 5px 10px !important;
  width: 50px !important;
  font-size: 12px !important;
}

.count-day,
.list-center {
  text-align: center;
}

.header-actiuni {
  text-align: center !important;
}

.top-bar-margin-bottom {
  margin-bottom: 12px;
}

.btn-profil {
  width: 160px !important;
  padding-top: 8px;
  padding-bottom: 8px;
}

.btn-active-users {
  width: 80px !important;
}

.profile-active {
  margin-top: 16px;
}

.dashboard-summary-bar {
  display: flex;
  justify-content: right;
  align-items: center;
  background: var(--md3-surface);
  padding: 12px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 10px 0 16px;
  flex-wrap: wrap;
  gap: 12px;
  border: 1px solid var(--md3-outline);
}

.dashboard-summary-bar .summary-item {
  font-size: 15px;
  color: var(--md3-text);
}

.summary-value {
  font-weight: 600;
  color: var(--md3-primary-light);
  margin: 0 4px;
}

.summary-clickable {
  cursor: pointer;
  color: var(--md3-accent);
  text-decoration: underline;
}

.summary-clickable:hover {
  opacity: 0.9;
}

.user-projects-top-bar {
  margin: 0 auto;
  max-width: 1160px;
}

.top-bar-padding {
  padding: 24px;
}

.user-projects-th {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--md3-outline);
  color: var(--md3-text-dim);
}

.user-projects-td {
  padding-top: 10px !important;
  border-bottom: none !important;
  color: var(--md3-text);
}

.count-tasks {
  text-align: center;
}

/* Toast */
.toast-msg {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0b1220;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  opacity: 0;
  transition: all 0.4s ease;
  font-size: 14px;
  z-index: 9999;
  border: 1px solid var(--md3-outline);
}

.toast-msg.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-msg.info {
  background: var(--md3-primary-dark);
}

.toast-msg.success {
  background: #16a34a;
}

.toast-msg.error {
  background: #dc2626;
}

.action-bar-new {
  display: flex;
    justify-content: right;
    align-items: center;
    background: var(--md3-surface);
    padding: 12px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 10px 0 16px;
    flex-wrap: wrap;
    gap: 12px;
    border: 1px solid var(--md3-outline);
}

.btn-action-new-proj {background: linear-gradient(180deg, var(--md3-primary), var(--md3-primary-dark));
    color: #fff;
    border: none;
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.35);
      padding: 5px 28px;
    border-radius: 16px;
    cursor: pointer;}