.tabler-dashboard {
  min-height: 100vh;
  background-color: #f8fafc;

  // Loading overlay
  .loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;

    .loading-content {
      text-align: center;
      
      .loading-spinner {
        width: 40px;
        height: 40px;
        border: 3px solid #f3f3f3;
        border-top: 3px solid #206bc4;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        margin: 0 auto 1rem;
      }

      p {
        color: #6c757d;
        margin: 0;
      }
    }
  }

  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }

  // Page header styling
  .page-header {
    background: white;
    border-bottom: 1px solid #e6e7e9;
    padding: 1.5rem 0;
    margin-bottom: 1.5rem;

    .page-pretitle {
      color: #6c757d;
      font-size: 0.875rem;
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-bottom: 0.25rem;
    }

    .page-title {
      color: #1e293b;
      font-size: 1.75rem;
      font-weight: 600;
      margin: 0;
    }

    .btn-list {
      display: flex;
      gap: 0.5rem;
      align-items: center;
    }
  }

  // Cards styling
  .card {
    border: 1px solid #e6e7e9;
    border-radius: 8px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    background: white;
    margin-bottom: 1.5rem;
    transition: box-shadow 0.15s ease;

    &:hover {
      box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    }

    .card-header {
      padding: 1.25rem 1.5rem;
      border-bottom: 1px solid #e6e7e9;
      background: #fafbfc;
      border-radius: 8px 8px 0 0;

      .card-title {
        font-size: 1.125rem;
        font-weight: 600;
        color: #1e293b;
        margin: 0;
      }

      .card-actions {
        margin-left: auto;
      }
    }

    .card-body {
      padding: 1.5rem;

      &.card-body-scrollable {
        max-height: 400px;
        overflow-y: auto;

        &.card-body-scrollable-shadow {
          position: relative;
          
          &::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 20px;
            background: linear-gradient(transparent, rgba(255, 255, 255, 0.8));
            pointer-events: none;
          }
        }
      }
    }

    &.card-sm {
      .card-body {
        padding: 1rem;
      }
    }

    .card-status-top {
      height: 3px;
      border-radius: 8px 8px 0 0;
    }
  }

  // Stats cards
  .row-deck {
    .col-sm-6,
    .col-lg-3 {
      margin-bottom: 1.5rem;
    }
  }

  // Badge and status styling
  .badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;

    &.bg-green {
      background-color: #28a745 !important;
      color: white;
    }

    &.bg-yellow {
      background-color: #ffc107 !important;
      color: #212529;
    }

    &.bg-red {
      background-color: #dc3545 !important;
      color: white;
    }

    &.bg-blue {
      background-color: #206bc4 !important;
      color: white;
    }

    &.bg-purple {
      background-color: #6f42c1 !important;
      color: white;
    }

    &.bg-orange {
      background-color: #fd7e14 !important;
      color: white;
    }

    &.bg-secondary {
      background-color: #6c757d !important;
      color: white;
    }

    &.badge-outline {
      background: transparent !important;
      border: 1px solid currentColor;
    }
  }

  // Text colors
  .text-green { color: #28a745 !important; }
  .text-red { color: #dc3545 !important; }
  .text-blue { color: #206bc4 !important; }
  .text-purple { color: #6f42c1 !important; }
  .text-orange { color: #fd7e14 !important; }
  .text-muted { color: #6c757d !important; }

  // Avatar styling
  .avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    font-size: 0.875rem;

    &.avatar-sm {
      width: 2rem;
      height: 2rem;
      font-size: 0.75rem;
    }

    &.avatar-rounded {
      border-radius: 6px;
    }
  }

  // Progress bars
  .progress {
    height: 0.5rem;
    background-color: #e9ecef;
    border-radius: 0.25rem;
    overflow: hidden;

    &.progress-xs {
      height: 0.25rem;
    }

    .progress-bar {
      height: 100%;
      background-color: #206bc4;
      transition: width 0.3s ease;
    }
  }

  // Status dots
  .status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    display: inline-block;
  }

  // Chart simulation
  .chart-simulation {
    margin-top: 1rem;
    
    .chart-svg {
      border-radius: 4px;
    }
  }

  // Table styling
  .table {
    margin-bottom: 0;

    th {
      border-top: none;
      border-bottom: 1px solid #e6e7e9;
      font-weight: 600;
      color: #374151;
      font-size: 0.875rem;
      padding: 0.75rem 1rem;
    }

    td {
      border-top: 1px solid #f1f5f9;
      padding: 0.75rem 1rem;
      vertical-align: middle;
    }

    .table-vcenter td {
      vertical-align: middle;
    }
  }

  // Button styling
  .btn {
    font-weight: 500;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    transition: all 0.15s ease;

    &.btn-primary {
      background-color: #206bc4;
      border-color: #206bc4;
      color: white;

      &:hover {
        background-color: #1c5ba0;
        border-color: #1c5ba0;
      }
    }

    &.btn-outline-primary {
      color: #206bc4;
      border-color: #206bc4;
      background: transparent;

      &:hover {
        background-color: #206bc4;
        color: white;
      }
    }

    &.btn-sm {
      padding: 0.375rem 0.75rem;
      font-size: 0.8125rem;
    }

    .icon {
      width: 1rem;
      height: 1rem;
      margin-right: 0.5rem;
    }
  }

  // Form controls
  .form-select {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;

    &.form-select-sm {
      padding: 0.375rem 0.5rem;
      font-size: 0.8125rem;
    }
  }

  .form-check-input {
    border: 1px solid #d1d5db;
    border-radius: 4px;

    &:checked {
      background-color: #206bc4;
      border-color: #206bc4;
    }
  }

  // Button groups
  .btn-group {
    .btn-check:checked + .btn {
      background-color: #206bc4;
      border-color: #206bc4;
      color: white;
    }
  }

  // List groups
  .list-group {
    .list-group-item {
      border: none;
      border-bottom: 1px solid #f1f5f9;
      padding: 1rem 1.5rem;

      &:last-child {
        border-bottom: none;
      }
    }
  }

  // Datagrid
  .datagrid {
    .datagrid-item {
      display: flex;
      align-items: center;
      padding: 0.75rem 0;
      border-bottom: 1px solid #f1f5f9;

      &:last-child {
        border-bottom: none;
      }

      .datagrid-title {
        font-weight: 500;
        color: #374151;
        margin-bottom: 0.25rem;
      }

      .datagrid-content {
        margin-left: auto;
        text-align: right;
      }
    }
  }

  // Divide utility
  .divide-y > * + * {
    border-top: 1px solid #f1f5f9;
    padding-top: 1rem;
    margin-top: 1rem;
  }

  // Responsive utilities
  @media (max-width: 768px) {
    .page-header {
      .btn-list {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;

        .btn {
          width: 100%;
        }
      }
    }

    .card-body {
      padding: 1rem;
    }

    .table-responsive {
      font-size: 0.875rem;
    }
  }

  // Dashboard type specific styling
  &[data-dashboard-type="general"] {
    .page-header {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;

      .page-title,
      .page-pretitle {
        color: white;
      }
    }
  }

  &[data-dashboard-type="finance"] {
    .page-header {
      background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
      color: white;

      .page-title,
      .page-pretitle {
        color: white;
      }
    }
  }

  &[data-dashboard-type="projects"] {
    .page-header {
      background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
      color: white;

      .page-title,
      .page-pretitle {
        color: white;
      }
    }
  }

  &[data-dashboard-type="reporting"] {
    .page-header {
      background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
      color: white;

      .page-title,
      .page-pretitle {
        color: white;
      }
    }
  }

  // Animation utilities
  .fade-in {
    animation: fadeIn 0.5s ease-in;
  }

  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }

  // Hover effects
  .card:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease;
  }

  .btn:hover {
    transform: translateY(-1px);
    transition: transform 0.1s ease;
  }
}