// Color Palette - Enterprise Medical Theme (matching login page)
$primary-blue: #0066cc;
$primary-blue-dark: #0052a3;
$primary-blue-light: #e6f2ff;
$accent-teal: #0099a1;
$text-dark: #1a1a1a;
$text-medium: #4a4a4a;
$text-light: #6b6b6b;
$border-color: #e0e0e0;
$border-focus: #0066cc;
$error-red: #d32f2f;
$error-bg: #ffebee;
$success-green: #2e7d32;
$success-bg: #e8f5e9;
$warning-orange: #ed6c02;
$warning-bg: #fff3e0;
$info-blue: #0288d1;
$info-bg: #e3f2fd;
$white: #ffffff;
$background-light: #f8f9fa;
$background-page: #f5f7fa;
$shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
$shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
$shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
$shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.1);

// Typography
$font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

.admin-wrapper {
  min-height: 100vh;
  background: $background-page;
  display: flex;
  flex-direction: column;
}

// Header Styles
.admin-header {
  background: $white;
  border-bottom: 1px solid $border-color;
  box-shadow: $shadow-sm;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;

  @media (max-width: 768px) {
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
}

.header-left {
  display: flex;
  align-items: center;
  flex: 1;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.medical-icon {
  width: 40px;
  height: 40px;
  color: $primary-blue;
  flex-shrink: 0;
}

.header-text {
  display: flex;
  flex-direction: column;
}

.dashboard-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: $text-dark;
  margin: 0;
  letter-spacing: -0.5px;
  font-family: $font-family;
}

.dashboard-subtitle {
  font-size: 0.875rem;
  color: $text-medium;
  margin: 0;
  font-weight: 400;
}

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

.refresh-button,
.logout-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  font-family: $font-family;
  border: 2px solid $border-color;
  border-radius: 8px;
  background: $white;
  color: $text-dark;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;

  svg {
    width: 18px;
    height: 18px;
  }

  &:hover:not(:disabled) {
    border-color: $primary-blue;
    color: $primary-blue;
    background: $primary-blue-light;
  }

  &:active:not(:disabled) {
    transform: scale(0.98);
  }

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

  &:focus-visible {
    outline: 2px solid $border-focus;
    outline-offset: 2px;
  }
}

.logout-button {
  border-color: $error-red;
  color: $error-red;

  &:hover:not(:disabled) {
    background: $error-bg;
    border-color: $error-red;
  }
}

// Main Content
.admin-main {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;

  @media (max-width: 768px) {
    padding: 1rem;
    gap: 1.5rem;
  }
}

// Loading State
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  min-height: 400px;
}

.spinner-wrapper {
  margin-bottom: 1.5rem;
}

.spinner {
  width: 48px;
  height: 48px;
  color: $primary-blue;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  font-size: 1rem;
  color: $text-medium;
  margin: 0;
  font-family: $font-family;
}

// Error State
.error-container {
  width: 100%;
  padding: 2rem 0;
}

.error-card {
  background: $error-bg;
  border: 1px solid rgba($error-red, 0.3);
  border-radius: 12px;
  padding: 2rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  max-width: 600px;
  margin: 0 auto;

  .error-icon {
    width: 32px;
    height: 32px;
    color: $error-red;
    flex-shrink: 0;
  }

  .error-content {
    flex: 1;

    h3 {
      font-size: 1.125rem;
      font-weight: 600;
      color: $error-red;
      margin: 0 0 0.5rem 0;
      font-family: $font-family;
    }

    p {
      font-size: 0.9375rem;
      color: $text-dark;
      margin: 0 0 1rem 0;
      font-family: $font-family;
    }
  }
}

.retry-button {
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  font-family: $font-family;
  background: $error-red;
  color: $white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;

  &:hover {
    background: darken($error-red, 10%);
    transform: translateY(-1px);
  }

  &:active {
    transform: translateY(0);
  }
}

// Stats Section
.stats-section {
  width: 100%;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: $text-dark;
  margin: 0 0 1.5rem 0;
  letter-spacing: -0.5px;
  font-family: $font-family;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;

  @media (max-width: 768px) {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background: $white;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: $shadow-md;
  transition: all 0.3s ease;
  border: 2px solid transparent;

  &:hover {
    transform: translateY(-4px);
    box-shadow: $shadow-lg;
  }

  .stat-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    padding: 0.75rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: $primary-blue-light;

    svg {
      width: 100%;
      height: 100%;
      color: $primary-blue;
    }
  }

  .stat-content {
    flex: 1;
    min-width: 0;
  }

  .stat-label {
    font-size: 0.875rem;
    color: $text-medium;
    margin: 0 0 0.5rem 0;
    font-weight: 500;
    font-family: $font-family;
  }

  .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: $text-dark;
    margin: 0;
    font-family: $font-family;
    line-height: 1;
  }
}

.stat-card-primary {
  .stat-icon {
    background: $primary-blue-light;
    svg {
      color: $primary-blue;
    }
  }
}

.stat-card-success {
  .stat-icon {
    background: $success-bg;
    svg {
      color: $success-green;
    }
  }
  .stat-value {
    color: $success-green;
  }
}

.stat-card-info {
  .stat-icon {
    background: $info-bg;
    svg {
      color: $info-blue;
    }
  }
  .stat-value {
    color: $info-blue;
  }
}

.stat-card-warning {
  .stat-icon {
    background: $warning-bg;
    svg {
      color: $warning-orange;
    }
  }
  .stat-value {
    color: $warning-orange;
  }
}

.stat-card-active {
  .stat-icon {
    background: linear-gradient(135deg, $primary-blue-light 0%, lighten($accent-teal, 40%) 100%);
    svg {
      color: $accent-teal;
    }
  }
  .stat-value {
    color: $accent-teal;
  }
}

// Users Section
.users-section {
  width: 100%;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.users-count {
  display: flex;
  align-items: center;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: $primary-blue-light;
  color: $primary-blue;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: $font-family;
}

.table-container {
  background: $white;
  border-radius: 12px;
  box-shadow: $shadow-md;
  overflow: hidden;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-family: $font-family;

  thead {
    background: $background-light;
    border-bottom: 2px solid $border-color;
  }

  th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    color: $text-medium;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
  }

  .th-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .th-icon {
    width: 16px;
    height: 16px;
    color: $text-light;
  }

  tbody {
    tr {
      border-bottom: 1px solid $border-color;
      transition: background 0.2s ease;

      &:hover {
        background: $background-light;
      }

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

    td {
      padding: 1.25rem 1.5rem;
      font-size: 0.9375rem;
      color: $text-dark;
    }
  }
}

.td-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.email-text {
  color: $text-dark;
  font-weight: 500;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: $font-family;
}

.role-admin {
  background: rgba($error-red, 0.1);
  color: $error-red;
}

.role-doctor {
  background: rgba($info-blue, 0.1);
  color: $info-blue;
}

.role-patient {
  background: rgba($success-green, 0.1);
  color: $success-green;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: $font-family;
}

.status-active {
  background: rgba($success-green, 0.1);
  color: $success-green;

  .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: $success-green;
    display: inline-block;
  }
}

.status-inactive {
  background: rgba($text-light, 0.1);
  color: $text-light;

  .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: $text-light;
    display: inline-block;
  }
}

// Empty State
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  min-height: 400px;

  .empty-icon {
    width: 64px;
    height: 64px;
    color: $text-light;
    margin-bottom: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: $text-dark;
    margin: 0 0 0.5rem 0;
    font-family: $font-family;
  }

  p {
    font-size: 0.9375rem;
    color: $text-medium;
    margin: 0;
    font-family: $font-family;
  }
}

// Tabs Navigation
.tabs-container {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid $border-color;
  margin-bottom: 2rem;
  overflow-x: auto;
  scrollbar-width: thin;

  &::-webkit-scrollbar {
    height: 4px;
  }

  &::-webkit-scrollbar-thumb {
    background: $border-color;
    border-radius: 2px;
  }

  @media (max-width: 768px) {
    gap: 0.25rem;
  }
}

.tab-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  font-family: $font-family;
  color: $text-medium;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  position: relative;

  svg {
    width: 18px;
    height: 18px;
  }

  &:hover {
    color: $primary-blue;
    background: rgba($primary-blue, 0.05);
  }

  &.active {
    color: $primary-blue;
    border-bottom-color: $primary-blue;
    font-weight: 600;
  }

  .tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 0.5rem;
    background: $primary-blue-light;
    color: $primary-blue;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.25rem;
  }

  &.active .tab-badge {
    background: $primary-blue;
    color: $white;
  }

  @media (max-width: 768px) {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;

    svg {
      width: 16px;
      height: 16px;
    }
  }
}

.tab-content {
  width: 100%;
}

.tab-panel {
  animation: fadeIn 0.3s ease-out;
}

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

// Action Buttons
.action-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid $border-color;
  border-radius: 6px;
  background: $white;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;

  svg {
    width: 16px;
    height: 16px;
  }

  &:hover {
    transform: translateY(-1px);
    box-shadow: $shadow-sm;
  }

  &:active {
    transform: translateY(0);
  }

  &:focus-visible {
    outline: 2px solid $border-focus;
    outline-offset: 2px;
  }
}

.action-btn-toggle {
  color: $text-medium;

  &:hover {
    border-color: $warning-orange;
    color: $warning-orange;
    background: $warning-bg;
  }
}

.action-btn-delete {
  color: $error-red;

  &:hover {
    border-color: $error-red;
    background: $error-bg;
  }
}

// User Name
.user-name {
  font-weight: 500;
  color: $text-dark;
}

.date-text {
  color: $text-medium;
  font-size: 0.875rem;
}

// Urgency Badges
.urgency-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: $font-family;
}

.urgency-emergency {
  background: rgba($error-red, 0.1);
  color: $error-red;
}

.urgency-high {
  background: rgba($warning-orange, 0.1);
  color: $warning-orange;
}

.urgency-medium {
  background: rgba($info-blue, 0.1);
  color: $info-blue;
}

.urgency-low {
  background: rgba($success-green, 0.1);
  color: $success-green;
}

// Section Controls
.section-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.urgency-filter {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-family: $font-family;
  color: $text-dark;
  background: $white;
  border: 2px solid $border-color;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;

  &:hover {
    border-color: $primary-blue;
  }

  &:focus {
    border-color: $border-focus;
    box-shadow: 0 0 0 3px rgba($border-focus, 0.1);
  }
}

// Text Truncation
.input-text,
.output-text {
  color: $text-dark;
  font-size: 0.875rem;
  display: block;
  max-width: 300px;
}

.patient-name {
  font-weight: 500;
  color: $text-dark;
}

// Responsive Design
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 768px) {
  .admin-main {
    padding: 1rem;
  }

  .section-title {
    font-size: 1.25rem;
  }

  .stat-card {
    padding: 1.25rem;
  }

  .stat-value {
    font-size: 1.75rem;
  }

  .table-container {
    border-radius: 8px;
  }

  .data-table {
    th, td {
      padding: 0.875rem 1rem;
      font-size: 0.875rem;
    }
  }
}

// Dark mode support
@media (prefers-color-scheme: dark) {
  .admin-wrapper {
    background: #1e1e1e;
  }

  .admin-header {
    background: #2a2a2a;
    border-color: #404040;
  }

  .dashboard-title {
    color: $white;
  }

  .dashboard-subtitle {
    color: rgba($white, 0.7);
  }

  .refresh-button,
  .logout-button {
    background: #2a2a2a;
    border-color: #404040;
    color: rgba($white, 0.9);
  }

  .stat-card {
    background: #2a2a2a;
  }

  .stat-value {
    color: $white;
  }

  .table-container {
    background: #2a2a2a;
  }

  .data-table {
    thead {
      background: #1e1e1e;
    }

    tbody tr {
      border-color: #404040;

      &:hover {
        background: #1e1e1e;
      }
    }

    th, td {
      color: rgba($white, 0.9);
    }
  }

  .email-text {
    color: rgba($white, 0.9);
  }
}

// Profile Section Styles
.profile-section {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.profile-header-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  gap: 1.5rem;

  @media (max-width: 768px) {
    flex-direction: column;
    align-items: stretch;
  }
}

.profile-header-content {
  flex: 1;

  .section-description {
    font-size: 0.9375rem;
    color: $text-medium;
    margin-top: 0.5rem;
    margin-bottom: 0;
  }
}

.edit-profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: $primary-blue;
  color: $white;
  border: none;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: $shadow-sm;

  svg {
    width: 18px;
    height: 18px;
  }

  &:hover {
    background: $primary-blue-dark;
    box-shadow: $shadow-md;
    transform: translateY(-1px);
  }

  &:active {
    transform: translateY(0);
  }
}

.profile-card {
  background: $white;
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: $shadow-md;
  transition: all 0.2s ease;

  &:hover {
    box-shadow: $shadow-lg;
  }
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid $border-color;
}

.profile-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, $primary-blue-light 0%, $accent-teal 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: $shadow-md;

  svg {
    width: 45px;
    height: 45px;
    color: $primary-blue;
  }
}

.profile-name {
  flex: 1;

  h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: $text-dark;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.5px;
  }

  p {
    font-size: 1rem;
    color: $text-medium;
    margin: 0;
  }
}

.profile-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.25rem 0;
  border-bottom: 1px solid $border-color;

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

.detail-label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: $text-dark;
  min-width: 180px;
}

.detail-value {
  font-size: 0.9375rem;
  color: $text-medium;
  text-align: right;
  max-width: 60%;
  word-wrap: break-word;
}

// Edit Profile Form Styles
.edit-profile-form {
  background: $white;
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: $shadow-lg;
  margin-top: 2rem;

  @media (max-width: 768px) {
    padding: 1.5rem;
  }

  // Scoped form styles for edit profile form
  .form-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid $border-color;

    .form-title {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      font-size: 1.75rem;
      font-weight: 700;
      color: $text-dark;
      margin: 0 0 0.5rem 0;

      svg {
        width: 28px;
        height: 28px;
        color: $primary-blue;
      }
    }

    .form-subtitle {
      font-size: 1rem;
      color: $text-medium;
      margin: 0;
      margin-left: 2.75rem;
    }
  }

  .profile-form {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
  }

  .form-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .section-header {
    margin-bottom: 0.5rem;

    .section-subtitle {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      font-size: 1.25rem;
      font-weight: 600;
      color: $text-dark;
      margin: 0 0 0.25rem 0;

      svg {
        width: 20px;
        height: 20px;
        color: $primary-blue;
      }
    }

    .section-description {
      font-size: 0.875rem;
      color: $text-medium;
      margin-left: 1.75rem;
      margin-top: 0.25rem;
    }
  }

  .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;

    @media (max-width: 768px) {
      grid-template-columns: 1fr;
    }
  }

  .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;

    &.form-group-full {
      grid-column: 1 / -1;
    }
  }

  .form-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: $text-dark;
    display: flex;
    align-items: center;
    gap: 0.25rem;

    .required-indicator {
      color: $error-red;
      font-weight: 700;
    }
  }

  .form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid $border-color;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-family: $font-family;
    color: $text-dark;
    background: $white;
    transition: all 0.2s ease;

    &:focus {
      outline: none;
      border-color: $primary-blue;
      box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
    }

    &:invalid:not(:placeholder-shown) {
      border-color: $error-red;
    }

    &:valid:not(:placeholder-shown) {
      border-color: $success-green;
    }

    &::placeholder {
      color: $text-light;
    }

    &.form-select {
      appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%234a4a4a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 1rem center;
      padding-right: 2.5rem;
    }

    &.form-textarea {
      resize: vertical;
      min-height: 120px;
      font-family: $font-family;
      line-height: 1.6;
    }
  }

  .input-with-icon {
    position: relative;
    display: flex;
    align-items: center;

    .input-icon {
      position: absolute;
      left: 1rem;
      font-size: 1rem;
      font-weight: 600;
      color: $text-medium;
      pointer-events: none;
    }

    .form-input {
      padding-left: 2.5rem;
    }
  }

  .form-hint {
    font-size: 0.8125rem;
    color: $text-light;
    margin-top: 0.25rem;
  }

  .textarea-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;

    .char-counter {
      font-size: 0.8125rem;
      font-weight: 600;
      color: $text-medium;
    }
  }

  .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 2rem;
    margin-top: 1rem;
    border-top: 2px solid $border-color;

    @media (max-width: 768px) {
      flex-direction: column-reverse;

      button {
        width: 100%;
      }
    }
  }

  .cancel-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: $white;
    color: $text-dark;
    border: 2px solid $border-color;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;

    svg {
      width: 18px;
      height: 18px;
    }

    &:hover {
      background: $background-light;
      border-color: $text-medium;
    }
  }

  .submit-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: $primary-blue;
    color: $white;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: $shadow-sm;

    svg {
      width: 18px;
      height: 18px;
    }

    &:hover:not(:disabled) {
      background: $primary-blue-dark;
      box-shadow: $shadow-md;
      transform: translateY(-1px);
    }

    &:active:not(:disabled) {
      transform: translateY(0);
    }

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

// Metrics Section Styles - Enterprise Design
.metrics-section {
  margin-top: 2.5rem;
  padding: 2.5rem;
  background: linear-gradient(135deg, $white 0%, #fafbfc 100%);
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 102, 204, 0.08);

  .section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: $text-dark;
    margin-bottom: 2.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 3px solid $primary-blue;
    position: relative;
    letter-spacing: -0.3px;

    &::after {
      content: '';
      position: absolute;
      bottom: -3px;
      left: 0;
      width: 80px;
      height: 3px;
      background: linear-gradient(90deg, $primary-blue 0%, $accent-teal 100%);
      border-radius: 2px;
    }
  }

  .metrics-category {
    margin-bottom: 3rem;
    padding: 1.5rem;
    background: $white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;

    &:hover {
      box-shadow: 0 4px 12px rgba(0, 102, 204, 0.1);
      transform: translateY(-2px);
    }

    &:last-child {
      margin-bottom: 0;
    }

    .category-title {
      font-size: 1.25rem;
      font-weight: 600;
      color: $text-dark;
      margin-bottom: 1.5rem;
      padding: 0.75rem 1rem;
      background: linear-gradient(135deg, $primary-blue-light 0%, rgba(0, 153, 161, 0.05) 100%);
      border-left: 5px solid $primary-blue;
      border-radius: 6px;
      display: flex;
      align-items: center;
      gap: 0.75rem;
      letter-spacing: -0.2px;

      &::before {
        content: '';
        width: 4px;
        height: 20px;
        background: linear-gradient(180deg, $primary-blue 0%, $accent-teal 100%);
        border-radius: 2px;
      }
    }

    .metrics-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
      gap: 1.25rem;

      @media (max-width: 1200px) {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
      }

      @media (max-width: 768px) {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
      }

      @media (max-width: 480px) {
        grid-template-columns: 1fr;
      }
    }

    .metric-card {
      background: linear-gradient(135deg, $white 0%, #f8f9fa 100%);
      border: 1.5px solid rgba(0, 102, 204, 0.12);
      border-radius: 10px;
      padding: 1.5rem;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative;
      overflow: hidden;

      &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, $primary-blue 0%, $accent-teal 100%);
        opacity: 0;
        transition: opacity 0.3s ease;
      }

      &:hover {
        box-shadow: 0 8px 24px rgba(0, 102, 204, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
        transform: translateY(-4px);
        border-color: $primary-blue;
        background: linear-gradient(135deg, $white 0%, $primary-blue-light 100%);

        &::before {
          opacity: 1;
        }

        .metric-value {
          color: $primary-blue;
          transform: scale(1.05);
        }
      }

      .metric-label {
        font-size: 0.8125rem;
        color: $text-medium;
        margin: 0 0 0.75rem 0;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        opacity: 0.85;
      }

      .metric-value {
        font-size: 2rem;
        font-weight: 700;
        color: $primary-blue;
        margin: 0;
        line-height: 1.1;
        transition: all 0.3s ease;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
        background: linear-gradient(135deg, $primary-blue 0%, $accent-teal 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
      }
    }
  }

  // Special styling for different metric types
  .metrics-category:nth-child(1) .metric-card {
    border-left: 4px solid $primary-blue;
  }

  .metrics-category:nth-child(2) .metric-card {
    border-left: 4px solid $success-green;
  }

  .metrics-category:nth-child(3) .metric-card {
    border-left: 4px solid $info-blue;
  }

  .metrics-category:nth-child(4) .metric-card {
    border-left: 4px solid $accent-teal;
  }

  .metrics-category:nth-child(5) .metric-card {
    border-left: 4px solid $warning-orange;
  }

  .metrics-category:nth-child(6) .metric-card {
    border-left: 4px solid $primary-blue;
  }

  .metrics-category:nth-child(7) .metric-card {
    border-left: 4px solid $error-red;
  }
}

