/* Billing Report Detail Modal Styles */

.billing-report-detail {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Header Section */
.billing-report-detail__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem;
  background: var(--background-secondary);
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.billing-report-detail__info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.billing-report-detail__info-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.billing-report-detail__label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  min-width: 100px;
}

.billing-report-detail__value {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 500;
}

.billing-report-detail__status {
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.billing-report-detail__status--draft {
  background: #6c757d20;
  color: #6c757d;
}

.billing-report-detail__status--pending_review {
  background: #ffc10720;
  color: #ff8c00;
}

.billing-report-detail__status--approved {
  background: #28a74520;
  color: #28a745;
}

.billing-report-detail__status--invoiced {
  background: #17a2b820;
  color: #17a2b8;
}

.billing-report-detail__status--rejected {
  background: #dc354520;
  color: #dc3545;
}

/* Totals Cards */
.billing-report-detail__totals {
  display: flex;
  gap: 1rem;
}

.billing-report-detail__total-card {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 0.75rem 1rem;
  background: var(--background);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  min-width: 150px;
}

.billing-report-detail__total-card--primary {
  background: var(--primary-alpha-10);
  border-color: var(--primary);
}

.billing-report-detail__total-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.billing-report-detail__total-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.billing-report-detail__total-card--primary .billing-report-detail__total-value {
  color: var(--primary);
}

/* Sections */
.billing-report-detail__section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.billing-report-detail__section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

.billing-report-detail__notes {
  padding: 0.75rem;
  background: var(--background-secondary);
  border-left: 3px solid var(--primary);
  border-radius: 4px;
  font-size: 0.875rem;
  color: var(--text-primary);
  margin: 0;
}

/* Task List */
.billing-report-detail__tasks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.75rem;
}

.billing-report-detail__task-info {
  flex: 1;
  min-width: 0;
}

.billing-report-detail__task-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.billing-report-detail__task-client {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.125rem;
}

/* Table */
.billing-report-detail__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  background: var(--background);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
}

.billing-report-detail__table thead {
  background: var(--background-secondary);
}

.billing-report-detail__table th {
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-color);
}

.billing-report-detail__table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}

.billing-report-detail__table tbody tr:hover {
  background: var(--hover-background);
}

.billing-report-detail__table tbody tr:last-child td {
  border-bottom: none;
}

.billing-report-detail__table tfoot {
  background: var(--background-secondary);
  border-top: 2px solid var(--border-color);
}

.billing-report-detail__table tfoot td {
  font-weight: 600;
  border-bottom: none;
}

.billing-report-detail__row--adjusted {
  background: #ffc10710;
}

.billing-report-detail__row--adjusted td {
  position: relative;
}

.billing-report-detail__user-cell {
  background: var(--background-secondary);
  vertical-align: top;
  border-right: 1px solid var(--border-color);
}

/* Hours Input */
.billing-report-detail__hours-input {
  width: 80px;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.875rem;
  background: var(--background);
  color: var(--text-primary);
}

.billing-report-detail__hours-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-alpha-10);
}

.billing-report-detail__adjust-btn {
  padding: 0.25rem 0.5rem;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.billing-report-detail__adjust-btn:hover {
  background: var(--primary-alpha-10);
  border-color: var(--primary);
  color: var(--primary);
}

/* Workflow */
.billing-report-detail__workflow {
  display: flex;
  gap: 1.5rem;
  padding: 1rem;
  background: var(--background-secondary);
  border-radius: 4px;
  overflow-x: auto;
}

.billing-report-detail__workflow-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--background);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  min-width: 200px;
}

.billing-report-detail__workflow-step i {
  font-size: 1.5rem;
  color: var(--primary);
}

.billing-report-detail__workflow-info {
  flex: 1;
}

.billing-report-detail__workflow-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.billing-report-detail__workflow-date {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 500;
  margin-top: 0.125rem;
}

.billing-report-detail__workflow-extra {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Empty State */
.billing-report-detail__empty {
  padding: 2rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Line Items */
.billing-report-detail__line-items {
  overflow-x: auto;
}

/* Responsive */
@media (max-width: 768px) {
  .billing-report-detail__header {
    flex-direction: column;
    gap: 1rem;
  }

  .billing-report-detail__totals {
    width: 100%;
  }

  .billing-report-detail__total-card {
    flex: 1;
  }

  .billing-report-detail__tasks {
    grid-template-columns: 1fr;
  }

  .billing-report-detail__workflow {
    flex-direction: column;
  }

  .billing-report-detail__workflow-step {
    min-width: unset;
  }
}
