/* Base Styles */
:root {
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 45px;
  --header-height: 60px;
  --inline-auto-fit-grid-flow: repeat(auto-fit, minmax(max-content, 0px));
}

html, body {
  min-height: 100vh;
}

.layout-wrapper {
  display: flex;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.layout-sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  transition: all 0.2s ease-out;
  overflow-x: hidden;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}
.layout-sidebar.layout-sidebar-slim {
  width: var(--sidebar-collapsed-width);
}
.layout-sidebar.layout-sidebar-slim .nav-items, .layout-sidebar.layout-sidebar-slim .bottom-items, .layout-sidebar.layout-sidebar-slim .brand-logo {
  display: none;
  opacity: 0;
}
.layout-sidebar.layout-sidebar-slim .menu-text {
  display: none;
  opacity: 0;
}
.layout-sidebar.layout-sidebar-slim .menu-icon {
  margin-right: 0;
}
.layout-sidebar.layout-sidebar-slim .sidebar-header .brand-text {
  display: none;
  opacity: 0;
}
.layout-sidebar .sidebar-header {
  height: var(--header-height);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.layout-sidebar .sidebar-header .brand-text {
  margin-left: 0.5rem;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}
.layout-sidebar .sidebar-header .sidebar-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}
.layout-sidebar .sidebar-menu {
  margin-top: 0.5rem;
  padding: 0.5rem 0;
  overflow-y: auto;
}
.layout-sidebar .sidebar-menu .menu-item {
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
  border-radius: 0.25rem;
  margin: 0.25rem 0.5rem;
}
.layout-sidebar .sidebar-menu .menu-item:hover, .layout-sidebar .sidebar-menu .menu-item.active {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}
.layout-sidebar .sidebar-menu .menu-item .menu-icon {
  min-width: 24px;
  width: 24px;
  height: 24px;
  margin-right: 1rem;
  transition: margin 0.3s ease;
}
.layout-sidebar .sidebar-menu .menu-item .menu-text {
  white-space: nowrap;
  transition: opacity 0.2s ease;
  font-size: 0.875rem;
  font-weight: 500;
}

.page-header {
  margin-bottom: 1.5rem;
}
.page-header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.page-header .breadcrumb {
  display: flex;
  list-style: none;
  margin-bottom: 0.75rem;
}
.page-header .breadcrumb li:not(:last-child) {
  margin-right: 0.5rem;
}
.page-header .breadcrumb li:not(:last-child):after {
  content: "/";
  margin-left: 0.5rem;
  color: var(--secondary-color);
}
.page-header .breadcrumb li a {
  color: var(--primary-color);
  text-decoration: none;
}
.page-header .breadcrumb li a:hover {
  text-decoration: underline;
}

.kanban-board {
  display: flex;
  overflow-x: auto;
  padding: 1rem 0;
  min-height: 400px;
}
.kanban-board .kanban-column {
  min-width: 300px;
  width: 300px;
  margin-right: 1rem;
  border-radius: 0.25rem;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
}
.kanban-board .kanban-column .column-header {
  padding: 0.75rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
  background-color: rgba(0, 0, 0, 0.05);
}
.kanban-board .kanban-column .column-content {
  padding: 0.75rem;
  flex: 1;
  overflow-y: auto;
}
.kanban-board .kanban-column .empty-column-message {
  padding: 1rem;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.03);
  border-radius: 0.25rem;
}
.kanban-board .kanban-card {
  background-color: white;
  padding: 0.75rem;
  border-radius: 0.25rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  margin-bottom: 0.75rem;
  cursor: pointer;
}
.kanban-board .kanban-card:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}
.kanban-board .kanban-card .card-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.kanban-board .kanban-card .card-description {
  margin: 0.5rem 0;
  font-size: 0.875rem;
  color: #666;
}
.kanban-board .kanban-card .card-labels {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.kanban-board .kanban-card .card-labels .label {
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 0.25rem;
  margin-right: 0.5rem;
  margin-bottom: 0.25rem;
}
.kanban-board .kanban-card .card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  font-size: 0.875rem;
}

.task-detail-view .task-section {
  margin-bottom: 2rem;
}
.task-detail-view .task-title {
  margin-bottom: 1rem;
}
.task-detail-view .task-meta {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.task-detail-view .task-meta .meta-item {
  margin-right: 1.5rem;
  margin-bottom: 0.5rem;
}
.task-detail-view .task-meta .meta-item .meta-label {
  display: block;
  font-size: 0.75rem;
  color: var(--secondary-color);
  margin-bottom: 0.25rem;
}
.task-detail-view .task-meta .meta-item .meta-value {
  font-weight: 500;
}
.task-detail-view .comments-section {
  margin-top: 2rem;
}
.task-detail-view .comments-section .comment {
  padding: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.task-detail-view .comments-section .comment .comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.task-detail-view .comments-section .comment .comment-header .commenter {
  font-weight: 500;
}
.task-detail-view .comments-section .comment .comment-header .comment-date {
  font-size: 0.75rem;
  color: var(--secondary-color);
}
.task-detail-view .comment-form {
  margin-top: 1rem;
}

.project-form .form-section {
  margin-bottom: 2rem;
}
.project-form .form-group {
  margin-bottom: 1rem;
}
.project-form .form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.project-form .form-group .help-text {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--secondary-color);
}
.project-form .form-row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -0.5rem;
}
.project-form .form-row .form-group {
  flex: 1;
  min-width: 250px;
  padding: 0 0.5rem;
}
.project-form .form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 2rem;
}
.project-form .form-actions button {
  margin-left: 0.5rem;
}

.expense-claims-view .expense-summary {
  margin-bottom: 2rem;
}
.expense-claims-view .expense-summary .summary-card {
  border-radius: 0.5rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.expense-claims-view .expense-summary .summary-card .summary-title {
  font-size: 0.875rem;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}
.expense-claims-view .expense-summary .summary-card .summary-value {
  font-size: 1.5rem;
  font-weight: 600;
}
.expense-claims-view .expense-summary .summary-card.bg-info {
  background-color: rgba(var(--info-color-rgb), 0.1);
  color: var(--info-color);
}
.expense-claims-view .expense-summary .summary-card.bg-success {
  background-color: rgba(var(--success-color-rgb), 0.1);
  color: var(--success-color);
}
.expense-claims-view .expense-summary .summary-card.bg-warning {
  background-color: rgba(var(--warning-color-rgb), 0.1);
  color: var(--warning-color);
}
.expense-claims-view .expense-summary .summary-card.bg-danger {
  background-color: rgba(var(--danger-color-rgb), 0.1);
  color: var(--danger-color);
}
.expense-claims-view .status-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 50rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}
.expense-claims-view .status-badge.status-draft {
  background-color: rgba(var(--secondary-color-rgb), 0.1);
  color: var(--secondary-color);
}
.expense-claims-view .status-badge.status-submitted {
  background-color: rgba(var(--info-color-rgb), 0.1);
  color: var(--info-color);
}
.expense-claims-view .status-badge.status-approved {
  background-color: rgba(var(--success-color-rgb), 0.1);
  color: var(--success-color);
}
.expense-claims-view .status-badge.status-rejected {
  background-color: rgba(var(--danger-color-rgb), 0.1);
  color: var(--danger-color);
}

.expense-claim-detail .expense-header {
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--card-shadow);
}
.expense-claim-detail .expense-header .expense-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.expense-claim-detail .expense-header .expense-title h2 {
  margin: 0;
}
.expense-claim-detail .expense-header .expense-info {
  display: flex;
  flex-wrap: wrap;
}
.expense-claim-detail .expense-header .expense-info .info-item {
  margin-right: 2rem;
  margin-bottom: 1rem;
}
.expense-claim-detail .expense-header .expense-info .info-item .info-label {
  font-size: 0.75rem;
  color: var(--secondary-color);
  margin-bottom: 0.25rem;
}
.expense-claim-detail .expense-header .expense-info .info-item .info-value {
  font-weight: 500;
}
.expense-claim-detail .expense-line-items {
  margin-bottom: 1.5rem;
}
.expense-claim-detail .expense-line-items .line-item {
  background-color: white;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: var(--card-shadow);
}
.expense-claim-detail .expense-line-items .line-item .line-item-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.expense-claim-detail .expense-line-items .line-item .line-item-header .line-item-title {
  font-weight: 500;
}
.expense-claim-detail .expense-line-items .line-item .line-item-header .line-item-amount {
  font-weight: 600;
}
.expense-claim-detail .expense-line-items .line-item .line-item-details {
  font-size: 0.875rem;
  color: var(--secondary-color);
}
.expense-claim-detail .expense-line-items .line-item .line-item-details .detail-item {
  margin-bottom: 0.25rem;
}
.expense-claim-detail .expense-line-items .line-item .line-item-attachments {
  margin-top: 0.5rem;
}
.expense-claim-detail .expense-line-items .line-item .line-item-attachments .attachment {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 0.25rem;
  font-size: 0.75rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}
.expense-claim-detail .expense-line-items .line-item .line-item-attachments .attachment i {
  margin-right: 0.5rem;
}
.expense-claim-detail .add-line-item-form {
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--card-shadow);
}
.expense-claim-detail .add-line-item-form h3 {
  margin-bottom: 1rem;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}
.empty-state .empty-icon {
  font-size: 4rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
}
.empty-state .illustration {
  margin-bottom: 2rem;
}
.empty-state .illustration img {
  max-width: 100%;
  height: auto;
}
.empty-state h3 {
  margin-bottom: 0.5rem;
}
.empty-state p {
  color: var(--secondary-color);
  max-width: 400px;
  margin: 0 auto 1.5rem;
}

@media (max-width: 768px) {
  .layout-sidebar {
    width: var(--sidebar-collapsed-width);
  }
  .layout-sidebar .sidebar-header .brand-text,
  .layout-sidebar .menu-item .menu-text {
    display: none;
  }
  .layout-sidebar.expanded {
    width: var(--sidebar-width);
  }
  .layout-sidebar.expanded .sidebar-header .brand-text,
  .layout-sidebar.expanded .menu-item .menu-text {
    display: block;
  }
  .kanban-board .kanban-column {
    min-width: 250px;
    width: 250px;
  }
  .project-form .form-row {
    flex-direction: column;
  }
}
.layout-main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 3rem;
  transition: all 0.3s ease;
  margin-left: var(--sidebar-width);
}

.layout-sidebar.layout-sidebar-slim {
  width: var(--sidebar-collapsed-width);
}

.layout-sidebar.layout-sidebar-slim ~ .layout-main {
  margin-left: var(--sidebar-collapsed-width);
}

@media (max-width: 768px) {
  .layout-sidebar {
    position: static; /* Remove the fixed positioning on small screens */
    width: 100%;
    height: auto;
  }
  .layout-main {
    margin-left: 0;
  }
}
.p-datatable-header-cell.justify-end .p-datatable-column-header-content {
  justify-content: end;
}

label {
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 1px;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
}

.table-nums {
  font-variant-numeric: tabular-nums;
}

*[readonly] {
  background-color: #f5f5f5 !important;
  border-color: #f0f0f0 !important;
  pointer-events: none;
}

.sticky-table thead th {
  position: sticky;
  top: 0;
  background-color: #f8f9fa;
  z-index: 20;
}

.sticky-table thead th:first-child,
.sticky-table tbody td:first-child {
  position: sticky;
  left: 0;
  background-color: #f8f9fa;
  z-index: 10;
}

.sticky-table thead th:first-child {
  z-index: 30;
}

.sticky-table td, .sticky-table th {
  padding: 8px 12px;
  white-space: nowrap;
}

.tab-styling {
  width: 100%;
  max-width: 100%;
  overflow: auto;
  max-height: 500px;
}
.tab-styling-wrapper {
  overflow-y: auto;
}

.sticky-table td, .sticky-table th {
  padding: 8px 12px;
  white-space: nowrap;
}

.sticky-table th:first-child,
.sticky-table td:first-child {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  width: 180px;
  max-width: 180px;
  min-width: 180px;
}

.form-field {
  display: flex;
  flex-direction: column;
}

.table-body .table-row {
  border-bottom: 1px solid #f3f4f6;
}

.table-body .table-row:last-child {
  border-bottom: none;
}

.table-body .table-row:hover {
  background-color: #f9fafb;
}

:deep(.p-invalid) {
  border-color: #e24c4c !important;
}

.p-error {
  color: #e24c4c;
  font-size: 0.875rem;
}

.field-height {
  height: 2.5rem !important;
}

:deep(.p-inputtext) {
  height: 2.5rem;
}

:deep(.p-autocomplete .p-autocomplete-input) {
  height: 2.5rem;
}

:deep(.p-calendar .p-inputtext) {
  height: 2.5rem;
}

:deep(.p-inputnumber .p-inputtext) {
  height: 2.5rem;
}

:deep(.p-button) {
  height: 2.5rem;
}

.field-height {
  height: 40px;
}

.form-field {
  margin-bottom: 1rem;
}

.field-wrapper {
  position: relative;
}

:deep(.p-checkbox .p-checkbox-box) {
  width: 1.25rem;
  height: 1.25rem;
}

:deep(.p-checkbox .p-checkbox-box.p-highlight) {
  background-color: #10b981;
  border-color: #10b981;
}

.card-title {
  font-weight: 500;
}

.card-value {
  font-size: 1.4em;
  font-weight: bold;
  display: block;
  color: #222;
}

.summary-cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.summary-card {
  background-color: #fff;
  border-radius: 8px;
  padding: 20px;
  border: 1px solid #e0e6ed;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.summary-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.summary-card.highlighted {
  border-left: 5px solid #4a90e2;
}

select:invalid {
  color: #6b7280;
}

.loading-spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #1db983;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}