/* Cases controller — document list + preview on case show */

.case_row:hover {
  background-color: #efefef;
  cursor: pointer;
}

.da-case-documents-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.da-case-documents-preview {
  order: 1;
  min-width: 0;
  width: 100%;
}

.da-case-documents-list {
  order: 2;
  min-width: 0;
  width: 100%;
  max-height: 45vh;
  overflow-y: auto;
}

/* Tall legal-style preview (8.5×14 feel); explicit height — does not depend on Tailwind build */
.da-case-preview-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  height: min(85vh, 52rem);
  min-height: 32rem;
}

.da-case-preview-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Selected document card — matches preview */
.da-case-document-card--active {
  box-shadow: inset 0 0 0 2px #269ed5;
}

@media (min-width: 768px) {
  .da-case-documents-layout {
    display: grid;
    grid-template-columns: minmax(12rem, 1fr) minmax(0, 2fr);
    align-items: start;
  }

  .da-case-documents-preview,
  .da-case-documents-list {
    order: unset;
  }

  .da-case-documents-list {
    max-height: min(88vh, 56rem);
    overflow-y: auto;
  }

  .da-case-documents-preview {
    position: sticky;
    top: 1rem;
  }

  .da-case-preview-frame {
    height: min(88vh, 56rem);
    min-height: 40rem;
  }
}

@media (min-width: 1024px) {
  .da-case-documents-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  }
}
/* Desktop sidebar width + collapse (plain CSS — works without Tailwind rebuild) */

@media (min-width: 1024px) {
  #desktop-sidebar {
    width: 18rem;
    transition: width 0.3s ease;
    border-right: 1px solid #e5e7eb;
  }

  #main-content {
    padding-left: 18rem;
    transition: padding-left 0.3s ease;
  }

  #desktop-sidebar[data-collapsed="true"] {
    width: 4.5rem;
  }

  #desktop-sidebar[data-collapsed="true"] ~ #main-content {
    padding-left: 4.5rem;
  }

  #desktop-sidebar[data-collapsed="true"] .sidebar-logo,
  #desktop-sidebar[data-collapsed="true"] .sidebar-label {
    display: none !important;
  }

  #desktop-sidebar[data-collapsed="true"] #sidebar-brand {
    justify-content: center;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  #desktop-sidebar[data-collapsed="true"] nav ul li a,
  #desktop-sidebar[data-collapsed="true"] nav ul li > div:not(.sidebar-label) {
    justify-content: center;
  }
}
/* Place all the styles related to the Documents controller here. */
/* They will automatically be included in application.css. */
/* You can use Sass (SCSS) here: http://sass-lang.com/ */

.ui-autocomplete
{
    position:absolute;
    cursor:default;
    z-index:1001 !important
}
/* Place all the styles related to the Events controller here. */
/* They will automatically be included in application.css. */
/* You can use Sass (SCSS) here: http://sass-lang.com/ */


tr.striped {
  background-color: rgb(249, 250, 251);
}
/* Invoice show / print layout */

.page {
  width: 210mm;
  min-height: 297mm;
  padding: 20mm;
  margin: 10mm auto;
  border: 1px #d3d3d3 solid;
  border-radius: 5px;
  background: white;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  position: relative;

  table {
    line-height: 1.4;
  }
}

.invoice-document {
  .invoice-logo {
    max-height: 72px;
    width: auto;
    height: auto;
  }

  .invoice-title {
    letter-spacing: 0.08em;
  }

  .invoice-party-box {
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    padding: 1rem 1.25rem;
    background: #f9fafb;
  }

  .invoice-party-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 0.5rem;
  }

  .invoice-totals-box {
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    border-collapse: separate;
    border-spacing: 0;
    padding: 0.75rem 1rem;
    background: #f9fafb;

    td {
      vertical-align: top;
    }

    .invoice-totals-total td {
      border-top: 2px solid #374151;
    }
  }

  .tabular-nums,
  .tw-tabular-nums {
    font-variant-numeric: tabular-nums;
  }

  .invoice-line-items tbody tr {
    break-inside: avoid;
  }
}

.invoice-draft-watermark {
  display: none;
}

@page {
  size: A4;
  margin: 0;
}

@media print {
  html,
  body {
    width: 210mm;
    height: 297mm;
  }

  .page {
    margin: 0;
    border: initial;
    border-radius: initial;
    width: initial;
    min-height: initial;
    box-shadow: initial;
    background: initial;
    page-break-after: always;
  }

  .noprint,
  .noprint * {
    display: none !important;
    height: 0;
  }

  .invoice-draft-badge {
    display: none !important;
  }

  .invoice-document--draft .invoice-draft-watermark {
    display: block;
    position: fixed;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-35deg);
    font-size: 5rem;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.06);
    letter-spacing: 0.2em;
    z-index: 0;
    pointer-events: none;
    white-space: nowrap;
  }

  .invoice-document > *:not(.invoice-draft-watermark) {
    position: relative;
    z-index: 1;
  }
}
/* Organization settings — logo upload previews */

.org-logo-preview {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  width: 100%;
  max-width: 14rem;
  border: 1px dashed #d1d5db;
  border-radius: 0.375rem;
  background: #fff;
  padding: 0.5rem;
}

.org-logo-preview--sidebar {
  height: 2rem; /* matches tw-h-8 in sidebar */
  max-width: 10rem;
}

.org-logo-preview--invoice {
  height: 4.5rem; /* matches invoice-logo max-height 72px */
  max-width: 14rem;
}

.org-logo-preview__img {
  display: block;
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: left center;
}

/* Sidebar brand — align with main header; avoid img baseline gap */
.sidebar-logo {
  display: flex;
  align-items: center;
  line-height: 0;
}

.sidebar-logo img {
  display: block;
  max-height: 2rem;
  max-width: 10rem;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: left center;
}

/* Pagy pagination — Tailwind-aligned styling */
.pagy.nav {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0.5rem 0;
  font-size: 0.875rem;

  a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    padding: 0.375rem 0.75rem;
    color: #374151;
    text-decoration: none;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: #fff;
    transition: background-color 0.15s ease, color 0.15s ease;

    &:hover {
      background: #f3f4f6;
      color: #111827;
    }

    &.current {
      background: #269ED5;
      border-color: #269ED5;
      font-weight: 600;
      color: #fff;
    }

    &.gap {
      border-color: transparent;
      background: transparent;
      cursor: default;
      min-width: auto;
      padding-left: 0.25rem;
      padding-right: 0.25rem;
    }

    &[aria-disabled="true"] {
      color: #9ca3af;
      cursor: default;
      pointer-events: none;
      background: #f9fafb;
    }
  }
}

/* Document upload spinner animation */
.spinner {
  display: inline-block;
  animation: spin 1s linear infinite;
  font-size: 1.2em;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
/* Place all the styles related to the Remarks controller here. */
/* They will automatically be included in application.css. */
/* You can use Sass (SCSS) here: http://sass-lang.com/ */


.chat-bubble {
  background-color: #2f92e9;
  border-radius: 1em;
  color: white;
  padding: 1em;
  margin: 0.5em 0.3em 0 5em;
}
/* Place all the styles related to the Search controller here. */
/* They will automatically be included in application.css. */
/* You can use Sass (SCSS) here: http://sass-lang.com/ */

.ui.card.result em {
  background-color: #ffff99;
}
/* User profile pages */

.profile-page {
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
  padding: 1.5rem 1rem 2.5rem;
}

.profile-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  box-shadow:
    0 1px 3px 0 rgb(0 0 0 / 0.06),
    0 4px 24px -4px rgb(38 158 213 / 0.15);
}

.profile-hero {
  position: relative;
  padding: 2.5rem 1.5rem 3.5rem;
  /* MyLegalWhiz brand gradient (primary blue → accent purple) */
  background: linear-gradient(135deg, #269ed5 0%, #269ed5 38%, #9d4edd 100%);

  &::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 100% 0%, rgb(255 255 255 / 0.12), transparent);
    pointer-events: none;
  }
}

.profile-hero__actions {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;

  .profile-hero__edit-btn {
    background: rgb(255 255 255 / 0.95) !important;
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.1);

    &:hover {
      background: #fff !important;
    }
  }
}

.profile-hero__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.profile-hero__identity {
  color: #fff;
}

.profile-hero__name {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.15);
}

.profile-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.profile-avatar-row {
  display: flex;
  justify-content: center;
  margin-top: -3.75rem;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 3;
  padding: 0 1.5rem;

  @media (min-width: 640px) {
    margin-top: -4.5rem;
    margin-bottom: 0.75rem;
  }
}

.profile-avatar-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.profile-avatar__org {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  text-align: center;
}

.profile-avatar {
  width: 7.5rem;
  height: 7.5rem;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 9999px;
  border: 4px solid #fff;
  background: #f3f4f6;
  box-shadow:
    0 10px 15px -3px rgb(0 0 0 / 0.12),
    0 4px 6px -4px rgb(0 0 0 / 0.08);

  @media (min-width: 640px) {
    width: 9rem;
    height: 9rem;
  }
}

.profile-avatar__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.profile-body {
  padding: 0 1.5rem 1.5rem;
}

.profile-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;

  @media (min-width: 640px) {
    grid-template-columns: repeat(2, 1fr);
  }

  @media (min-width: 768px) {
    grid-template-columns: repeat(3, 1fr);
  }
}

.profile-stat {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1rem 1.125rem;
  border-radius: 0.75rem;
  border: 1px solid #f3f4f6;
  background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;

  &:hover {
    border-color: #c5e8f7;
    box-shadow: 0 4px 12px -6px rgb(38 158 213 / 0.22);
  }
}

.profile-stat__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
  background: #e8f4fc;
  color: #269ed5;
}

.profile-stat__label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6b7280;
}

.profile-stat__value {
  margin-top: 0.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #111827;
  word-break: break-word;
}

.profile-section {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid #f3f4f6;
}

.profile-section__title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 1rem;
}

.profile-details {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;

  @media (min-width: 640px) {
    grid-template-columns: repeat(2, 1fr);
  }
}

.profile-detail {
  padding: 0.875rem 1rem;
  border-radius: 0.5rem;
  background: #f9fafb;
}

.profile-detail__label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b7280;
}

.profile-detail__value {
  margin-top: 0.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #111827;
}

/* Edit layout */
.profile-edit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 1.5rem;

  @media (min-width: 768px) {
    grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
    padding: 1.5rem 1.75rem 1.75rem;
  }
}

.profile-edit-photo-card {
  padding: 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
}

.profile-edit-photo-card .user-photo-preview--profile {
  margin: 0 auto;
}

.profile-form-section {
  padding: 1.25rem 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #fff;
}

.profile-form-section + .profile-form-section {
  margin-top: 1rem;
}

.profile-form-section__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.25rem;
}

.profile-form-section__hint {
  font-size: 0.75rem;
  color: #6b7280;
  margin-bottom: 1rem;
}

.profile-readonly-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;

  @media (min-width: 480px) {
    grid-template-columns: repeat(3, 1fr);
  }
}

.profile-readonly-field {
  padding: 0.75rem 0.875rem;
  border-radius: 0.5rem;
  background: #f9fafb;
  border: 1px solid #f3f4f6;
}

.profile-readonly-field__label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9ca3af;
}

.profile-readonly-field__value {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
}

.profile-acronym-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.125rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgb(255 255 255 / 0.2);
  color: #fff;
  border: 1px solid rgb(255 255 255 / 0.25);
}

.profile-role-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.profile-edit-hero {
  padding: 1.5rem 1.5rem 1.25rem;
  border-bottom: 1px solid #f3f4f6;
}

.profile-edit-hero__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
}

.profile-edit-hero__subtitle {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #6b7280;
}

/* Shared photo preview sizes */
.user-photo-preview {
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  background: #f9fafb;
  flex-shrink: 0;
}

.user-photo-preview--thumb {
  width: 2rem;
  height: 2rem;
}

.user-photo-preview--profile {
  width: 9rem;
  height: 9rem;
  border: 4px solid #fff;
  box-shadow: 0 4px 14px -4px rgb(0 0 0 / 0.15);

  @media (min-width: 640px) {
    width: 10rem;
    height: 10rem;
  }
}

.user-photo-preview__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.profile-photo-upload {
  .profile-photo-upload__drop {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 2px dashed #d1d5db;
    background: #fafafa;
    text-align: center;
    transition: border-color 0.15s ease, background 0.15s ease;

    &:hover {
      border-color: #269ed5;
      background: #e8f4fc;
    }
  }

  input[type="file"] {
    width: 100%;
    font-size: 0.875rem;
  }
}
/*
 * Application styles — Tailwind is built separately (application.tailwind.css → builds/tailwind.css).
 *











 */

.center {
  text-align: center;
  margin: 0 auto;

  & a {
    display: block;
  }
}

#header-logo {
  width: 150px;
}

.headerbar {
  background-color: #f9fafb;
  width: 100%;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}
