/* These styles are generated from project.scss. */

.alert-debug {
  color: black;
  background-color: white;
  border-color: #d6e9c6;
}

.alert-error {
  color: #b94a48;
  background-color: #f2dede;
  border-color: #eed3d7;
}

/* ============================================
   UI/UX Style Guide Implementation
   IrisMed Dashboard
   ============================================ */

/* Typography */
body {
  font-family: 'Inter', 'Roboto', 'Helvetica Neue', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  color: #212529;
}

/* Application Layout */
.app-layout {
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
}

.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background-color: #ffffff;
  border-bottom: 1px solid #dee2e6;
  height: 64px;
}

.header-left {
  flex: 0 0 auto;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #212529;
  font-weight: 600;
  font-size: 1.25rem;
}

/* make this log image 50% */
.logo-image {
  width: 20%;
  height: auto;
  display: block;
}

.header-center {
  flex: 1;
  text-align: center;
}

.welcome-text {
  font-size: 14px;
  font-weight: 400;
  color: #212529;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 0 0 auto;
}

.header-icon {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #6c757d;
  font-size: 1.25rem;
  border-radius: 50%;
  transition: background-color 0.2s;
  background: transparent;
  border: none;
}

.header-icon:hover {
  background-color: #f8f9fa;
}

.notification-icon .badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background-color: #0d6efd;
  color: white;
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 0.7rem;
  font-weight: 600;
  min-width: 18px;
  text-align: center;
}

/* App Body */
.app-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Sidebar */
.app-sidebar {
  width: 240px;
  background-color: #f8f9fa;
  border-right: 1px solid #dee2e6;
  overflow-y: auto;
  flex-shrink: 0;
}

.sidebar-nav {
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.nav-section {
  margin-bottom: 1.5rem;
}

.nav-section-header {
  padding: 0 1rem;
  margin-bottom: 0.5rem;
}

.nav-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #6c757d;
  letter-spacing: 0.5px;
}

.nav-section-content {
  display: flex;
  flex-direction: column;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 0.625rem 1rem;
  color: #6c757d;
  text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
  font-size: 14px;
  font-weight: 400;
  background: transparent;
  border-left: 3px solid transparent;
}

.nav-item i {
  margin-right: 0.75rem;
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
  color: inherit;
}

.nav-item:hover {
  color: #212529;
  background-color: #ecf5f8;
}

.nav-item.active {
  background: transparent;
  color: #6c757d;
  border-left-color: transparent;
  font-weight: 400;
}

.nav-item.active:hover {
  background-color: #ecf5f8;
}

.nav-section-footer {
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid #dee2e6;
  margin-bottom: 1rem;
}

.managed-by {
  padding: 0 1rem;
  font-size: 0.875rem;
  color: #6c757d;
  font-weight: 400;
}

.managed-by span {
  display: block;
  margin-bottom: 0.5rem;
}

.external-link {
  display: flex;
  align-items: center;
  color: #495057;
  text-decoration: none;
  gap: 0.5rem;
  font-weight: 400;
}

.external-link:hover {
  color: #212529;
}

/* Main Content */
.app-main {
  flex: 1;
  overflow-y: auto;
  background-color: #ffffff;
  padding: 32px;
}

/* Remits Page */
.remits-page {
  max-width: 100%;
}

.page-header {
  margin-bottom: 24px;
}

.page-title {
  font-size: 24px;
  font-weight: 600;
  color: #212529;
  margin: 0;
}

/* Segmented Control */
.segmented-control {
  display: inline-flex;
  background-color: #ffffff;
  border: 1px solid #dde1e6;
  border-radius: 9999px;
  padding: 4px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  position: relative;
}

.segmented-control-item {
  position: relative;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 400;
  color: #70757a;
  text-decoration: none;
  border-radius: 9999px;
  transition: color 0.2s ease, background-color 0.2s ease;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  cursor: pointer;
  background-color: transparent;
  border: none;
}

.segmented-control-item:hover:not(.active) {
  color: #5f6368;
}

.segmented-control-item.active {
  background-color: #e8edf1;
  color: #1f1f1f;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Search and Filter Bar */
.search-filter-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.search-container {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  pointer-events: none;
}

.search-input {
  padding: 8px 12px 8px 40px;
  border-radius: 6px;
  border: 1px solid #dee2e6;
  font-size: 14px;
  font-weight: 400;
  width: 100%;
}

.search-input:focus {
  outline: none;
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.filter-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Secondary Button */
.filter-btn {
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #ffffff;
  color: #212529;
  border: 1px solid #dee2e6;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  cursor: pointer;
}

.filter-btn:hover {
  background-color: #f8f9fa;
  color: #212529;
  border-color: #dee2e6;
}

.display-info {
  color: #6c757d;
  font-size: 14px;
  font-weight: 400;
}

.action-buttons {
  margin-left: auto;
}

/* Primary Button */
.manual-upload-btn,
.sign-in-btn {
  background-color: #01131d;
  border-color: #01131d;
  border-radius: 6px;
  padding: 8px 20px;
  font-weight: 500;
  font-size: 14px;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.manual-upload-btn:hover,
.sign-in-btn:hover {
  background-color: #52798b;
  border-color: #52798b;
  color: #ffffff;
  text-decoration: none;
}

/* Table Container Card */
.table-responsive {
  background-color: #ffffff;
  border-radius: 8px;
  border: 1px solid #dee2e6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  margin-bottom: 24px;
}

/* Table */
.remits-table {
  margin-bottom: 0;
  background-color: #fff;
  border-collapse: collapse;
}

.remits-table thead th {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  font-weight: 600;
  color: #212529;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  white-space: nowrap;
  border-top: none;
}

.remits-table thead th.sortable {
  cursor: pointer;
  user-select: none;
}

.remits-table thead th.sortable:hover {
  background-color: #fbfbfb;
}

.remits-table thead th i {
  margin-left: 0.5rem;
  font-size: 0.75rem;
  opacity: 0.5;
}

.remits-table tbody td {
  padding: 12px 16px;
  vertical-align: middle;
  border-bottom: 1px solid #dee2e6;
  font-size: 14px;
  font-weight: 400;
  color: #212529;
}

.remits-table tbody tr {
  background-color: #ffffff;
}

.remits-table tbody tr:hover {
  background-color: #f8f9fa;
}

.remits-table tbody tr:last-child td {
  border-bottom: none;
}

/* Status Badge - Base Style */
.badge.status-badge {
  display: inline-block !important;
  padding: 4px 10px !important;
  border-radius: 9999px !important;
  font-size: 0.75rem !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
  background-color: transparent;
}

/* 🔵 Status: Not Started */
.badge.status-badge.status-not-started {
  background-color: #e7f1ff !important;
  color: #0d47a1 !important;
}

/* 🟠 Status: In Progress */
.badge.status-badge.status-in-progress {
  background-color: #fff8e1 !important;
  color: #ffa000 !important;
}

/* 🟢 Status: Completed / Posted */
.badge.status-badge.status-posted,
.badge.status-badge.status-completed {
  background-color: #e8f5e9 !important;
  color: #2e7d32 !important;
}

/* 🔴 Status: Error / Failed */
.badge.status-badge.status-error,
.badge.status-badge.status-failed {
  background-color: #ffebee !important;
  color: #c62828 !important;
}

/* 🟣 Status: Needs Review */
.badge.status-badge.status-needs-review {
  background-color: #f3e5f5 !important;
  color: #6a1b9a !important;
}

/* ⚫ Status: On Hold */
.badge.status-badge.status-on-hold {
  background-color: #f5f5f5 !important;
  color: #616161 !important;
}

/* Download Link */
.download-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #0d6efd;
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  transition: color 0.2s;
}

.download-link:hover {
  color: #0b5ed7;
  text-decoration: underline;
}

.download-link i {
  font-size: 0.875rem;
}

/* Action Buttons Cell */
.action-buttons-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-buttons-cell .btn-sm {
  padding: 4px 12px;
  font-size: 14px;
  font-weight: 400;
  border-radius: 6px;
}

/* Secondary Button in Table Actions */
.action-buttons-cell .btn-outline-primary {
  background-color: #ffffff;
  color: #212529;
  border: 1px solid #dee2e6;
  border-radius: 6px;
}

.action-buttons-cell .btn-outline-primary:hover {
  background-color: #f8f9fa;
  color: #212529;
  border-color: #dee2e6;
}

.action-buttons-cell .btn-link {
  padding: 4px;
  color: #6c757d;
  background: transparent;
  border: none;
  text-decoration: none;
}

.action-buttons-cell .btn-link:hover {
  color: #212529;
  background: transparent;
}

/* Pagination */
.pagination {
  margin-top: 32px;
}

.pagination .page-link {
  color: #495057;
  border-color: #dee2e6;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 400;
}

.pagination .page-link:hover {
  color: #212529;
  background-color: #f8f9fa;
  border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
  background-color: #0d6efd;
  border-color: #0d6efd;
  color: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .app-sidebar {
    width: 200px;
  }

  .app-main {
    padding: 16px;
  }

  .search-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .action-buttons {
    margin-left: 0;
    width: 100%;
  }

  .manual-upload-btn {
    width: 100%;
  }
}
