.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: linear-gradient(135deg, #206bc4 0%, #4299e1 100%);
    color: white;
    border-bottom: 1px solid #e6e7e9;
    padding: 1.5rem 0;
    margin-bottom: 1.5rem;

    .page-pretitle {
      color: rgba(255, 255, 255, 0.85);
      font-size: 0.875rem;
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-bottom: 0.25rem;
    }

    .page-title {
      color: white;
      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, transform 0.2s ease;

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

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

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

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

    .card-body {
      padding: 1.5rem;
    }

    .card-footer {
      padding: 1rem 1.5rem;
      border-top: 1px solid #e6e7e9;
      background: #fafbfc;
      border-radius: 0 0 8px 8px;
    }

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

  // Stats cards — equal height
  .row-deck {
    align-items: stretch;

    > [class*="col"] {
      margin-bottom: 1.5rem;
      display: flex;
      flex-direction: column;

      > .card {
        flex: 1;
        margin-bottom: 0;
      }
    }
  }

  .subheader {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

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

    &.badge-lg {
      font-size: 0.875rem;
      padding: 0.5rem 1rem;
    }

    &.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;
    }
  }

  // Text colors
  .text-green { color: #28a745 !important; }
  .text-red { color: #dc3545 !important; }
  .text-muted { color: #6c757d !important; }

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

    &.progress-sm {
      height: 0.375rem;
    }

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

      &.bg-green { background-color: #28a745 !important; }
      &.bg-yellow { background-color: #ffc107 !important; }
      &.bg-red { background-color: #dc3545 !important; }
    }
  }

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

    &.status-dot-animated {
      animation: pulse-dot 1.5s infinite;
    }
  }

  @keyframes pulse-dot {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
  }

  // Health gauge
  .health-gauge {
    position: relative;
    display: inline-block;
    width: 200px;
    height: 200px;

    .gauge-svg {
      width: 200px;
      height: 200px;
    }

    .gauge-value {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      font-size: 2rem;
      font-weight: 700;
    }
  }

  // Empty state
  .empty-state {
    text-align: center;
    padding: 2rem 1rem;

    .icon-lg {
      width: 3rem;
      height: 3rem;
    }
  }

  // Alert styling
  .alert {
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;

    &.alert-danger {
      background-color: #fef2f2;
      border: 1px solid #fecaca;
      color: #991b1b;

      .alert-title {
        font-weight: 600;
        margin: 0 0 0.25rem 0;
        color: #991b1b;
      }
    }
  }

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

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

      &:hover {
        background-color: #1c5ba0;
        border-color: #1c5ba0;
        transform: translateY(-1px);
      }
    }

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

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

    &.btn-outline-secondary {
      color: #6c757d;
      border: 1px solid #d1d5db;
      background: transparent;

      &:hover {
        background-color: #6c757d;
        color: white;
      }
    }

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

    .icon {
      width: 1rem;
      height: 1rem;
      margin-right: 0.25rem;
      vertical-align: -0.125em;
    }
  }

  // Form controls
  .form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.375rem;
    display: block;
  }

  .form-control {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: #1e293b;
    background-color: white;
    transition: border-color 0.15s ease;

    &.form-control-sm {
      padding: 0.25rem 0.5rem;
      font-size: 0.8125rem;
    }

    &:focus {
      border-color: #206bc4;
      outline: none;
      box-shadow: 0 0 0 3px rgba(32, 107, 196, 0.15);
    }
  }

  .form-label-sm {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
  }

  .px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
  .py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
  .mb-3 { margin-bottom: 1rem !important; }

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

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

  // Report card specific
  .report-card {
    .card-footer {
      .d-flex {
        .btn {
          display: inline-flex;
          align-items: center;
          justify-content: center;
        }
      }
    }
  }

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

  // Container
  .container-xl {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 1.5rem;
  }

  // Row/Col grid system (Bootstrap-like)
  .row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;

    > [class*="col"] {
      padding: 0 0.75rem;
    }
  }

  .col { flex: 1 0 0%; }
  .col-auto { flex: 0 0 auto; width: auto; }
  .col-12 { flex: 0 0 auto; width: 100%; }

  @media (min-width: 576px) {
    .col-sm-6 { flex: 0 0 auto; width: 50%; }
    .d-sm-inline { display: inline !important; }
    .d-sm-inline-block { display: inline-block !important; }
  }

  @media (min-width: 992px) {
    .col-lg-3 { flex: 0 0 auto; width: 25%; }
    .col-lg-4 { flex: 0 0 auto; width: 33.333333%; }
  }

  @media (min-width: 768px) {
    .col-md-4 { flex: 0 0 auto; width: 33.333333%; }
    .col-md-8 { flex: 0 0 auto; width: 66.666667%; }
  }

  // Utility classes
  .d-flex { display: flex; }
  .d-none { display: none; }
  .d-inline-flex { display: inline-flex; }
  .d-print-none { }
  .flex-fill { flex: 1 1 auto; }
  .gap-2 { gap: 0.5rem; }
  .g-3 { --bs-gutter-x: 1rem; --bs-gutter-y: 1rem; }
  .align-items-center { align-items: center; }
  .align-items-baseline { align-items: baseline; }
  .align-items-end { align-items: end; }
  .justify-content-center { justify-content: center; }
  .text-center { text-align: center; }
  .text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mb-0 { margin-bottom: 0 !important; }
  .mb-2 { margin-bottom: 0.5rem !important; }
  .mb-3 { margin-bottom: 1rem !important; }
  .mt-2 { margin-top: 0.5rem !important; }
  .mt-3 { margin-top: 1rem !important; }
  .me-2 { margin-right: 0.5rem !important; }
  .me-auto { margin-right: auto !important; }
  .ms-1 { margin-left: 0.25rem !important; }
  .ms-auto { margin-left: auto !important; }
  .py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
  .lh-1 { line-height: 1; }

  .h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
  }

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

  // Dropdown
  .dropdown-toggle {
    font-size: 0.8125rem;
    text-decoration: none;
    color: #6c757d;
  }

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

        .btn {
          width: 100%;
        }
      }
    }
  }

  // Refresh button spinning animation
  .icon.spinning {
    animation: spin 1s linear infinite;
  }

  // Warning outline button style (for Refresh CTA)
  .btn-outline-warning {
    color: #f59e0b;
    border: 1px solid #f59e0b;
    background: transparent;

    &:hover:not(:disabled) {
      background-color: #f59e0b;
      color: white;
    }

    &:disabled {
      opacity: 0.6;
      cursor: not-allowed;
    }
  }

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

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