/* Time Log Details Styles */
.time-log-details {
  padding: 1rem;
}

.detail-item {
  margin-bottom: 1rem;
}

.time-log-details .detail-label {
  font-weight: 600;
  color: #6c757d;
  min-width: 120px;
  display: inline-block;
}

.detail-value {
  color: #212529;
}

.time-log-details .notes-section {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #dee2e6;
}

/* ===========================
   Time Log Form Page (new/edit)
   =========================== */

.time-log-form-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem;
}

.time-log-form-page .page-header {
  padding: 1rem 0;
}

.time-log-form-page .page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.time-log-form-page .page-subtitle {
  font-size: 0.875rem;
}

/* Error Alert */
.error-alert {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #fef2f2 0%, #fff 100%);
  border: 1px solid #fecaca;
  border-left: 4px solid #ef4444;
  border-radius: 0.75rem;
  position: relative;
}

.error-alert-icon {
  width: 40px;
  height: 40px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ef4444;
  flex-shrink: 0;
}

.error-alert-content {
  flex: 1;
}

.error-alert-title {
  font-weight: 600;
  color: #dc2626;
  margin-bottom: 0.5rem;
}

.error-alert-list {
  margin: 0;
  padding-left: 1.25rem;
  color: #7f1d1d;
  font-size: 0.875rem;
}

.error-alert .btn-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

/* Info Items (form sidebar) */
.time-log-form-page .info-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 0.75rem;
}

.time-log-form-page .info-item-icon {
  width: 44px;
  height: 44px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3b82f6;
  flex-shrink: 0;
}

.time-log-form-page .info-item-icon.warning {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

.time-log-form-page .info-item-content {
  flex: 1;
}

.time-log-form-page .info-item-label {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.time-log-form-page .info-item-value {
  font-weight: 600;
  color: #1e293b;
}

.time-log-form-page .info-item-sub {
  font-size: 0.8125rem;
  color: #64748b;
}

/* Timestamps */
.timestamps-section {
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.timestamp-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.timestamp-item:last-child {
  margin-bottom: 0;
}

.time-log-form-page .info-box {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  background: #f0f9ff;
  border-radius: 0.5rem;
}

/* Form Sections */
.time-log-form-page .form-section {
  margin-bottom: 1.5rem;
}

.time-log-form-page .form-label-custom {
  display: flex;
  align-items: center;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
}

.time-log-form-page .required-badge {
  margin-left: auto;
  padding: 0.125rem 0.5rem;
  background: #fef3c7;
  color: #92400e;
  border-radius: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
}

.readonly-badge {
  margin-left: auto;
  padding: 0.125rem 0.5rem;
  background: #f1f5f9;
  color: #64748b;
  border-radius: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
}

/* Selected Date Display */
.selected-date-display {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  border: 2px solid #bfdbfe;
  border-radius: 0.75rem;
}

.selected-date-display.readonly {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.selected-date-icon {
  width: 56px;
  height: 56px;
  background: #3b82f6;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.selected-date-display.readonly .selected-date-icon {
  background: #64748b;
}

.selected-date-full {
  font-weight: 600;
  color: #1e293b;
  font-size: 1.125rem;
}

.selected-date-weekday {
  color: #64748b;
  font-size: 0.875rem;
}

/* Hours Input */
.hours-input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hours-preset-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.hours-preset-btn {
  padding: 0.5rem 1rem;
  background: #f1f5f9;
  border: 2px solid transparent;
  border-radius: 0.5rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.hours-preset-btn:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.hours-preset-btn.active {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
}

.hours-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.hours-input {
  font-size: 1.5rem;
  font-weight: 700;
  padding: 1rem 5rem 1rem 1.25rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  text-align: center;
}

.hours-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  outline: none;
}

.hours-suffix {
  position: absolute;
  right: 1.25rem;
  color: #64748b;
  font-weight: 500;
}

/* Notes Textarea */
.notes-textarea {
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  resize: vertical;
  min-height: 150px;
}

.notes-textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  outline: none;
}

.notes-textarea::placeholder {
  color: #94a3b8;
}

.time-log-form-page .form-hint {
  font-size: 0.8125rem;
  color: #64748b;
  margin-top: 0.5rem;
}

.time-log-form-page .char-count {
  color: #94a3b8;
}

/* Form Actions */
.time-log-form-page .form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
  margin-top: 1rem;
}

.time-log-form-page .form-actions .btn {
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
}

/* Card styling */
.time-log-form-page .card {
  border-radius: 1rem;
}

/* Quick Date Selection (new page) */
.quick-dates {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quick-date-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #f8fafc;
  border: 2px solid transparent;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}

.quick-date-btn:hover:not(.disabled) {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.quick-date-btn.selected {
  background: #eff6ff;
  border-color: #3b82f6;
}

.quick-date-btn.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #f1f5f9;
}

.quick-date-day {
  width: 48px;
  height: 48px;
  background: #fff;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: #334155;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.quick-date-btn.selected .quick-date-day {
  background: #3b82f6;
  color: #fff;
}

.quick-date-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.quick-date-weekday {
  font-weight: 600;
  color: #1e293b;
}

.quick-date-month {
  font-size: 0.75rem;
  color: #64748b;
}

.quick-date-badge {
  padding: 0.25rem 0.75rem;
  background: #e2e8f0;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
}

.quick-date-badge.today {
  background: #dbeafe;
  color: #1d4ed8;
}

.quick-date-badge.logged {
  background: #dcfce7;
  color: #16a34a;
}

/* ===========================
   Time Logs Index Page
   =========================== */

.time-logs-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.time-logs-page .page-header {
  padding: 1rem 0;
}

.time-logs-page .page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.time-logs-page .page-subtitle {
  font-size: 0.875rem;
}

/* Stats Cards */
.stats-card {
  background: #fff;
  border-radius: 1rem;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  height: 100%;
}

.stats-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stats-card-days { color: #22c55e; }
.stats-card-days .stats-icon { background: rgba(34, 197, 94, 0.1); }

.stats-card-hours { color: #3b82f6; }
.stats-card-hours .stats-icon { background: rgba(59, 130, 246, 0.1); }

.stats-card-avg { color: #8b5cf6; }
.stats-card-avg .stats-icon { background: rgba(139, 92, 246, 0.1); }

.stats-card-period { color: #64748b; }
.stats-card-period .stats-icon { background: rgba(100, 116, 139, 0.1); }

.stats-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.stats-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.stats-value-sm {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
}

.stats-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
}

/* Content Card */
.content-card {
  border-radius: 1rem;
  overflow: hidden;
}

/* Filter Section */
.filter-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-label {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
}

.filter-pills {
  display: flex;
  gap: 0.25rem;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  background: #f1f5f9;
  text-decoration: none;
  transition: all 0.2s ease;
}

.filter-pill:hover {
  background: #e2e8f0;
  color: #475569;
}

.filter-pill.active {
  background: #3b82f6;
  color: #fff;
}

/* Table Styles */
.time-log-table thead th {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  padding: 1rem 0.75rem;
}

.time-log-table tbody tr {
  transition: background-color 0.15s ease;
}

.time-log-table tbody tr:hover {
  background-color: #f8fafc;
}

.time-log-table tbody tr.empty-row {
  background-color: #fffbeb;
}

.time-log-table tbody tr.empty-row:hover {
  background-color: #fef3c7;
}

.time-log-table tbody tr.locked-row {
  background-color: #f8fafc;
}

.time-log-table tbody td {
  padding: 1rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}

/* Date Cell */
.date-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.date-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.date-icon-today {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border: 2px solid #3b82f6;
}

.date-day {
  font-size: 1.125rem;
  font-weight: 700;
  color: #334155;
}

.date-icon-today .date-day {
  color: #1d4ed8;
}

/* Hours Badge */
.hours-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 2rem;
  font-size: 0.8125rem;
  font-weight: 600;
}

.hours-badge-sm {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Notes Preview */
.notes-preview {
  color: #475569;
  font-size: 0.875rem;
  cursor: help;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  border-radius: 2rem;
  font-size: 0.8125rem;
  font-weight: 600;
}

.status-editable {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
}

.status-locked {
  background: rgba(100, 116, 139, 0.1);
  color: #64748b;
}

.status-empty {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

/* Status Dots (Mobile) */
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.status-dot.status-editable {
  background: #22c55e;
}

.status-dot.status-locked {
  background: #94a3b8;
}

.status-dot.status-empty {
  background: #f59e0b;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.action-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
}

/* Mobile Card View */
.time-log-card-mobile {
  padding: 1rem;
  border-bottom: 1px solid #f1f5f9;
}

.time-log-card-mobile:last-child {
  border-bottom: none;
}

.time-log-card-mobile.empty {
  background-color: #fffbeb;
}

.time-log-card-mobile.locked {
  background-color: #f8fafc;
}

.time-log-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.time-log-card-date {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.date-icon-sm {
  width: 36px;
  height: 36px;
  background: #f1f5f9;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #334155;
}

.date-icon-sm.today {
  background: #dbeafe;
  color: #1d4ed8;
  border: 2px solid #3b82f6;
}

.time-log-card-notes {
  color: #64748b;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.time-log-card-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  color: #3b82f6;
}

.empty-state-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

.empty-state-text {
  color: #64748b;
  margin-bottom: 1.5rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* Pagination */
.pagination-wrapper {
  background: #f8fafc;
}

/* Modal Styles */
.detail-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 0.75rem;
}

.detail-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.detail-card-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e293b;
}

.detail-card-label {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.time-logs-page .section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.75rem;
}

.notes-content {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 1rem;
  color: #475569;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* ===========================
   Responsive
   =========================== */

@media (max-width: 991px) {
  .quick-dates {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .quick-date-btn {
    flex: 1;
    min-width: calc(33.333% - 0.5rem);
    flex-direction: column;
    text-align: center;
    padding: 0.75rem;
    gap: 0.5rem;
  }

  .quick-date-day {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .quick-date-badge {
    font-size: 0.6875rem;
    padding: 0.125rem 0.5rem;
  }
}

@media (max-width: 767px) {
  .time-log-form-page,
  .time-logs-page {
    padding: 0 0.5rem;
  }

  .time-log-form-page .page-title,
  .time-logs-page .page-title {
    font-size: 1.25rem;
  }

  .hours-preset-buttons {
    justify-content: center;
  }

  .hours-input {
    font-size: 1.25rem;
    padding: 0.875rem 4rem 0.875rem 1rem;
  }

  .time-log-form-page .form-actions {
    flex-direction: column;
  }

  .time-log-form-page .form-actions .btn {
    width: 100%;
  }

  .selected-date-display {
    padding: 0.75rem;
  }

  .selected-date-icon {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
  }

  .time-log-form-page .info-item {
    padding: 0.75rem;
  }

  .time-log-form-page .info-item-icon {
    width: 40px;
    height: 40px;
  }

  .stats-card {
    padding: 0.75rem;
  }

  .stats-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .stats-value {
    font-size: 1.25rem;
  }

  .stats-value-sm {
    font-size: 0.875rem;
  }

  .filter-section {
    width: 100%;
    justify-content: space-between;
  }

  .filter-pill {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
  }

  .empty-state {
    padding: 3rem 1.5rem;
  }
}

@media (max-width: 575px) {
  .quick-date-btn {
    min-width: 100%;
    flex-direction: row;
    text-align: left;
  }

  .stats-card {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .filter-pills {
    width: 100%;
  }

  .filter-pill {
    flex: 1;
    justify-content: center;
  }
}
