/* ============================================================
   TackTechs Client Area styles. Reuses the site's dark theme +
   #1496F9 accent; adds layout for auth/dashboard/tickets/board.
   ============================================================ */

.client-body {
  background: #0b0b0f;
  color: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- Header ---- */
.client-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  flex-wrap: wrap;
}
.client-header .client-logo img {
  height: 34px;
  width: auto;
}
/* Override the template's global `img { width:100% }` so the wordmark keeps
   its aspect ratio anywhere it appears in the client area (auth cards etc). */
.client-logo {
  text-align: center;
}
.client-logo img {
  height: 38px;
  width: auto;
  max-width: 100%;
  display: inline-block;
}
.client-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-inline-start: 20px;
}
.client-nav a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 30px;
  transition: all 0.2s;
}
.client-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.client-nav a.active {
  color: #fff;
  background: rgba(20, 150, 249, 0.18);
}
.client-header-tools {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.client-lang {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 30px;
  padding: 7px 12px;
}
.client-lang:hover {
  color: #fff;
  border-color: #1496f9;
}
.client-logout {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  border-radius: 30px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.client-logout:hover {
  background: #1496f9;
  border-color: #1496f9;
}

/* ---- Main container ---- */
.client-main {
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 40px 80px;
}
.client-page-head {
  margin-bottom: 36px;
}
.client-page-head h1 {
  font-size: 34px;
  font-weight: 700;
  margin: 0 0 8px;
}
.client-page-head p {
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

/* ---- Cards / panels ---- */
.client-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 28px;
}
.client-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.client-stat h3 {
  font-size: 40px;
  font-weight: 700;
  color: #1496f9;
  margin: 0 0 6px;
}
.client-stat span {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

/* ---- Auth ---- */
.client-auth-wrap {
  min-height: calc(100vh - 74px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.client-auth-card {
  width: 100%;
  max-width: 440px;
}
.client-auth-card h1 {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 6px;
}
.client-auth-card .sub {
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 26px;
}
.client-auth-card .alt {
  margin-top: 22px;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}
.client-auth-card .alt a {
  color: #1496f9;
  font-weight: 600;
}

/* ---- Forms ---- */
.client-field {
  margin-bottom: 18px;
}
.client-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.8);
}
.client-field input,
.client-field textarea,
.client-field select {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 13px 15px;
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}
.client-field input:focus,
.client-field textarea:focus,
.client-field select:focus {
  border-color: #1496f9;
}
.client-field textarea {
  min-height: 130px;
  resize: vertical;
}
.client-field select option {
  background: #14141a;
}
.client-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #1496f9;
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 13px 26px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.client-btn:hover {
  opacity: 0.9;
}
.client-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}
.client-btn-full {
  width: 100%;
}
.client-btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.client-msg {
  border-radius: 10px;
  padding: 12px 15px;
  font-size: 14px;
  margin-bottom: 18px;
}
.client-msg.error {
  background: rgba(255, 80, 80, 0.12);
  border: 1px solid rgba(255, 80, 80, 0.35);
  color: #ffb3b3;
}
.client-msg.success {
  background: rgba(20, 150, 249, 0.12);
  border: 1px solid rgba(20, 150, 249, 0.4);
  color: #9ecbff;
}

/* ---- Tickets ---- */
.client-table {
  width: 100%;
  border-collapse: collapse;
}
.client-table th,
.client-table td {
  text-align: start;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 14px;
}
.client-table th {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.client-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}
.client-table a {
  color: #fff;
  font-weight: 600;
}
.client-badge {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
}
.client-badge.sla-late {
  background: rgba(255, 80, 80, 0.15);
  color: #ffb3b3;
}
.client-badge.sla-ok {
  background: rgba(60, 200, 120, 0.14);
  color: #9be8bd;
}

/* ---- Ticket thread ---- */
.client-thread {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 28px 0;
}
.client-message {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px 18px;
}
.client-message .meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 8px;
}
.client-message .meta strong {
  color: #1496f9;
}
.client-message .body {
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* ---- Board ---- */
.client-board {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 16px;
}
.client-board-col {
  flex: 0 0 300px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
}
.client-board-col h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 14px;
}
.client-task {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 13px 14px;
  margin-bottom: 12px;
}
.client-task.blocked {
  border-color: rgba(255, 80, 80, 0.4);
}
.client-task .name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}
.client-task .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
}
.client-task .tags span {
  background: rgba(255, 255, 255, 0.07);
  border-radius: 20px;
  padding: 3px 9px;
}
.client-task .tags .blk {
  background: rgba(255, 80, 80, 0.16);
  color: #ffb3b3;
}
.client-sprint {
  margin-bottom: 22px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}
.client-sprint .bar {
  height: 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  margin-top: 8px;
  overflow: hidden;
}
.client-sprint .bar > span {
  display: block;
  height: 100%;
  background: #1496f9;
}

/* ---- Service cards ---- */
.client-service {
  display: flex;
  flex-direction: column;
}
.client-service h3 {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 10px;
}
.client-service p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  line-height: 1.6;
  flex: 1;
}
.client-service .price {
  color: #1496f9;
  font-weight: 700;
  margin: 14px 0;
}

.client-empty {
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  padding: 40px 20px;
}
.client-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.client-section-title {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 16px;
}

/* ---- Page head variants ---- */
.client-page-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.client-back-link {
  display: inline-block;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}
.client-back-link:hover {
  color: #1496f9;
}
.client-meta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.client-form-card {
  max-width: 620px;
}

/* ---- Ticket thread (BEM) ---- */
.client-message-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 10px;
}
.client-message-head strong {
  color: #1496f9;
}
.client-message-body {
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}
.client-message.from-customer {
  border-inline-start: 3px solid #1496f9;
}
.client-reply-form {
  margin-top: 4px;
}

/* ---- Board head + sprint ---- */
.client-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.client-sprint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
  background: rgba(20, 150, 249, 0.12);
  border: 1px solid rgba(20, 150, 249, 0.3);
  border-radius: 30px;
  padding: 8px 16px;
}
.client-sprint-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.55);
}
.client-sprint-progress {
  color: #1496f9;
  font-weight: 700;
}

/* ---- Board columns + tasks (BEM) ---- */
.client-board-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 14px;
  font-weight: 600;
}
.client-board-count {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 2px 9px;
  font-size: 12px;
}
.client-board-empty {
  color: rgba(255, 255, 255, 0.35);
  font-size: 13px;
  text-align: center;
  padding: 20px 0;
}
.client-task-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
}
.client-task-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
}
.client-task-points,
.client-task-due {
  background: rgba(255, 255, 255, 0.07);
  border-radius: 20px;
  padding: 3px 9px;
}
.client-task-assignees {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.client-assignee {
  font-size: 11px;
  background: rgba(20, 150, 249, 0.15);
  color: #9ecbff;
  border-radius: 20px;
  padding: 3px 10px;
}

/* ---- Service cards (BEM) ---- */
.client-service-desc {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  line-height: 1.6;
  flex: 1;
}
.client-service-price {
  color: #1496f9;
  font-weight: 700;
  margin: 14px 0;
}
.client-service-price span {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
  font-size: 13px;
}

/* ---- Project cards ---- */
.client-project {
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s;
}
.client-project:hover {
  border-color: rgba(20, 150, 249, 0.5);
}
.client-project h3 {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 8px;
}
.client-project-meta {
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  flex: 1;
  margin: 0 0 16px;
}
.client-project-cta {
  color: #1496f9;
  font-weight: 600;
  font-size: 14px;
}

/* ---- List filters (tickets) ---- */
.client-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.client-filters input,
.client-filters select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 10px 13px;
  color: #fff;
  font-size: 14px;
  outline: none;
}
.client-filters input:focus,
.client-filters select:focus {
  border-color: #1496f9;
}
.client-filter-search {
  flex: 1;
  min-width: 200px;
}
.client-filters select option {
  background: #14141a;
}
.client-filter-count {
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
  margin: 0 0 16px;
}

/* ---- Filter chips (toggle buttons) ---- */
.client-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.75);
  border-radius: 30px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.client-chip:hover {
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}
.client-chip.active {
  background: rgba(20, 150, 249, 0.18);
  border-color: #1496f9;
  color: #fff;
}

/* ---- Clickable task cards ---- */
.client-task-btn {
  display: block;
  width: 100%;
  text-align: start;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.client-task-btn:hover {
  border-color: rgba(20, 150, 249, 0.45);
  background: rgba(255, 255, 255, 0.06);
}

/* ---- Task detail drawer ---- */
.client-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  justify-content: flex-end;
  z-index: 1000;
  animation: client-fade 0.15s ease;
}
.client-drawer {
  width: min(420px, 92vw);
  height: 100%;
  background: #14141a;
  border-inline-start: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  animation: client-slide 0.2s ease;
}
[dir='rtl'] .client-drawer {
  animation-name: client-slide-rtl;
}
.client-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  background: #14141a;
}
.client-drawer-head h3 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
}
.client-drawer-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.client-drawer-close:hover {
  color: #fff;
}
.client-drawer-body {
  padding: 24px;
}
.client-drawer-title {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 20px;
  line-height: 1.4;
}
.client-drawer-fields {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px 16px;
  margin: 0;
}
.client-drawer-fields dt {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}
.client-drawer-fields dd {
  margin: 0;
  font-size: 14px;
}
.client-drawer-desc {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
}
@keyframes client-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes client-slide {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
@keyframes client-slide-rtl {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

/* ---- Loading skeletons ---- */
.client-skel {
  display: block;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 25%,
    rgba(255, 255, 255, 0.11) 37%,
    rgba(255, 255, 255, 0.05) 63%
  );
  background-size: 400% 100%;
  animation: client-shimmer 1.4s ease infinite;
}
.client-skel-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.client-skel-row:last-child {
  border-bottom: none;
}
@keyframes client-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* ---- Toasts ---- */
.client-toasts {
  position: fixed;
  inset-block-end: 24px;
  inset-inline-end: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1100;
  max-width: 360px;
}
.client-toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 14px;
  color: #fff;
  background: #1c1c24;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  animation: client-toast-in 0.2s ease;
}
.client-toast.success {
  border-inline-start: 3px solid #1496f9;
}
.client-toast.error {
  border-inline-start: 3px solid #ff5050;
}
.client-toast-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.client-toast-close:hover {
  color: #fff;
}
@keyframes client-toast-in {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ---- Focus visibility (a11y) ---- */
.client-body a:focus-visible,
.client-body button:focus-visible,
.client-body input:focus-visible,
.client-body select:focus-visible,
.client-body textarea:focus-visible,
.client-task-btn:focus-visible {
  outline: 2px solid #1496f9;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .client-skel,
  .client-toast,
  .client-drawer,
  .client-drawer-overlay {
    animation: none;
  }
}

@media (max-width: 640px) {
  .client-header,
  .client-main {
    padding-inline: 20px;
  }
  .client-header {
    padding-block: 14px;
  }
  .client-filter-search {
    min-width: 100%;
  }
  .client-drawer-fields {
    grid-template-columns: 1fr;
    gap: 4px 0;
  }
  .client-drawer-fields dd {
    margin-bottom: 10px;
  }
  .client-toasts {
    inset-inline: 16px;
    inset-block-end: 16px;
    max-width: none;
  }
}
