/* Professional Case Manager Styles */

/* Container */
.container {
  max-width: 100%;
  padding: 20px;
  overflow: hidden;
}

/* Section Header - Enhanced */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f3f4f6;
  position: relative;
}

.section-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, #1f7a4d 0%, transparent 100%);
}

.section-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  border-left: 4px solid #1f7a4d;
  padding-left: 14px;
  letter-spacing: -0.02em;
}

/* Table Search - Modern Design */
.table-search {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.table-search form {
  display: flex;
  gap: 10px;
}

.table-search input {
  padding: 9px 14px;
  border-radius: 10px;
  border: 2px solid #e5e7eb;
  width: 240px;
  font-size: 13px;
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #ffffff;
  font-weight: 500;
}

.table-search input::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

.table-search input:focus {
  border-color: #1f7a4d;
  box-shadow: 0 0 0 4px rgba(31, 122, 77, 0.1),
              0 4px 12px rgba(31, 122, 77, 0.08);
  background: #ffffff;
}

.table-search button {
  background: linear-gradient(135deg, #1f7a4d 0%, #155e3b 100%);
  color: #fff;
  border: none;
  padding: 9px 22px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.02em;
  box-shadow: 0 3px 10px rgba(31, 122, 77, 0.2);
}

.table-search button:hover {
  background: linear-gradient(135deg, #155e3b 0%, #0f4829 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(31, 122, 77, 0.35);
}

.table-search button:active {
  transform: translateY(0);
}

/* Table Wrapper - Enhanced */
.table-scroll {
  width: 100%;
  max-height: 70vh;
  overflow-x: auto;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 3px 16px rgba(0, 0, 0, 0.06),
              0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid #e5e7eb;
}

/* Custom Scrollbar */
.table-scroll::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.table-scroll::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}

.table-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
  border-radius: 10px;
  border: 2px solid #f1f5f9;
}

.table-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

/* Table - Modern Professional Design */
.edr-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

/* Header Cells - Gradient Design */
.edr-table th {
  position: sticky;
  top: 0;
  background: linear-gradient(135deg, #1f7a4d 0%, #155e3b 100%);
  color: white;
  padding: 16px 18px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  z-index: 10;
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  line-height: 1.4;
}

.edr-table th:first-child {
  border-top-left-radius: 14px;
}

.edr-table th:last-child {
  border-top-right-radius: 14px;
  border-right: none;
}

/* Body Cells - Clean Design */
.edr-table td {
  padding: 16px 18px;
  font-size: 14px;
  white-space: nowrap;
  border-bottom: 1px solid #f3f4f6;
  border-right: 1px solid #f3f4f6;
  background: #ffffff;
  color: #374151;
  font-weight: 500;
  line-height: 1.5;
}

.edr-table td:last-child {
  border-right: none;
}

/* Row Hover Effects */
.edr-table tbody tr {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.edr-table tbody tr:hover {
  background: linear-gradient(90deg, #f8fafb 0%, #ffffff 100%);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  transform: scale(1.001);
}

.edr-table tbody tr:hover td {
  background: transparent;
  color: #111827;
}

/* Status Cell Styling - Simple Text with Color */
.status-cell {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
}

.status-cell.closed {
  color: #059669;
}

.status-cell.rejected {
  color: #dc2626;
}

.status-cell.pending {
  color: #d97706;
}

.status-cell.restricted {
  color: #ea580c;
}

.status-cell.sar {
  color: #7c3aed;
}

/* Final Action Dropdown - Enhanced */
.final-action-dropdown {
  padding: 10px 14px;
  border-radius: 8px;
  border: 2px solid #e5e7eb;
  font-size: 14px;
  cursor: pointer;
  background: #ffffff;
  min-width: 160px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 38px;
  color: #111827;
  line-height: 1.4;
}

.final-action-dropdown:hover:not(:disabled) {
  border-color: #1f7a4d;
  box-shadow: 0 0 0 3px rgba(31, 122, 77, 0.1);
}

.final-action-dropdown:focus {
  border-color: #1f7a4d;
  box-shadow: 0 0 0 4px rgba(31, 122, 77, 0.1);
  outline: none;
}

.final-action-dropdown.locked,
.final-action-dropdown:disabled {
  background: #f9fafb;
  color: #9ca3af;
  cursor: not-allowed;
  border-color: #e5e7eb;
  opacity: 0.6;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%9ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
}

/* Responsive Design */
@media (max-width: 1024px) {
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .table-search {
    width: 100%;
  }

  .table-search input {
    flex: 1;
  }
}

@media (max-width: 768px) {
  .edr-table th,
  .edr-table td {
    padding: 12px;
    font-size: 12px;
  }

  .status-cell {
    padding: 6px 12px !important;
    font-size: 11px;
  }

  .final-action-dropdown {
    min-width: 150px;
    font-size: 12px;
  }
}