/* Waterproofing System v2 - Custom Styles
   A clean, professional UI design based on PRD requirements
*/

:root {
  /* Color Palette */
  --primary: #1e40af;         /* Primary brand color - deep blue */
  --primary-hover: #1e3a8a;   /* Darker shade for hover */
  --primary-light: #3b82f6;   /* Lighter shade for accents */
  --primary-bg: #eff6ff;      /* Very light blue for backgrounds */
  
  --secondary: #475569;       /* Neutral dark gray-blue */
  --secondary-hover: #334155; /* Darker gray for hover */
  
  --success: #059669;         /* Green for success states */
  --warning: #d97706;         /* Amber for warnings */
  --danger: #dc2626;          /* Red for dangerous actions */
  --info: #0891b2;            /* Cyan for informational elements */
  
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Typography */
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  /* Border Radius */
  --radius-sm: 0.125rem;
  --radius: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
}

/* Base Styles */
html, body {
  height: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--gray-800);
  background-color: var(--gray-50);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--gray-900);
}

h1 {
  font-size: 1.875rem;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 1.125rem;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Layout Components */
.page-container {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding: 1rem;
}

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

.section {
  margin-bottom: 2rem;
}

/* Navigation */
.navbar {
  background-color: var(--primary);
  color: white;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 50;
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  max-width: 1280px;
  margin: 0 auto;
}

.navbar-brand {
  font-size: 1.25rem;
  font-weight: 600;
  color: white;
  display: flex;
  align-items: center;
}

.navbar-brand img {
  height: 2rem;
  margin-right: 0.5rem;
}

.navbar-menu {
  display: flex;
  gap: 1.5rem;
}

/* Enhanced Dropdown Styles */
.dropdown-menu {
  border-radius: var(--radius-md);
  border: none;
  box-shadow: var(--shadow-lg);
  min-width: 240px;
}

.dropdown-header {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary) !important;
  padding: 0.5rem 1rem 0.25rem 1rem !important;
  margin-bottom: 0.25rem;
}

.dropdown-item {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background-color: var(--primary-bg);
  color: var(--primary);
}

.dropdown-item i {
  width: 1rem;
  text-align: center;
}

/* Quick Actions Enhancement */
.quick-actions-toggle.active {
  background-color: var(--primary-hover) !important;
}

.quick-actions-chevron {
  transition: transform 0.2s ease;
}

.quick-actions-toggle.active .quick-actions-chevron {
  transform: rotate(180deg);
}

.navbar-link {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  padding: 0.5rem 0;
  transition: color 0.15s ease;
  text-decoration: none;
}

.navbar-link:hover, 
.navbar-link.active {
  color: white;
  text-decoration: none;
}

/* Cards */
.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: 1px solid var(--gray-200);
}

.card-header {
  padding: 1rem 1.25rem;
  background-color: white;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h5 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
}

.card-body {
  padding: 1.25rem;
}

.card-footer {
  padding: 1rem 1.25rem;
  background-color: var(--gray-50);
  border-top: 1px solid var(--gray-200);
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--gray-700);
}

.form-input,
.form-select,
.form-textarea {
  display: block;
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--gray-900);
  background-color: white;
  background-clip: padding-box;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary-light);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.form-select {
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3e%3cpath d='M7 7l3-3 3 3m0 6l-3 3-3-3' stroke='%236B7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5rem 1.5rem;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-hint {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--gray-500);
}

.form-error {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--danger);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5);
}

.btn-icon {
  margin-right: 0.5rem;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-secondary {
  background-color: var(--secondary);
  color: white;
  border-color: var(--secondary);
}

.btn-secondary:hover {
  background-color: var(--secondary-hover);
  border-color: var(--secondary-hover);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: white;
}

.btn-success {
  background-color: var(--success);
  color: white;
  border-color: var(--success);
}

.btn-success:hover {
  background-color: #047857;
  border-color: #047857;
}

.btn-danger {
  background-color: var(--danger);
  color: white;
  border-color: var(--danger);
}

.btn-danger:hover {
  background-color: #b91c1c;
  border-color: #b91c1c;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* Tables */
.table-container {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
}

.table th,
.table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--gray-200);
  text-align: left;
}

.table th {
  font-weight: 600;
  color: var(--gray-700);
  background-color: var(--gray-50);
  white-space: nowrap;
}

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

.table-hover tr:hover td {
  background-color: var(--gray-50);
}

.table-striped tbody tr:nth-child(odd) {
  background-color: var(--gray-50);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.25;
  border-radius: 9999px;
  text-transform: capitalize;
}

.badge-primary {
  background-color: var(--primary-bg);
  color: var(--primary);
}

.badge-success {
  background-color: rgba(5, 150, 105, 0.1);
  color: var(--success);
}

.badge-warning {
  background-color: rgba(217, 119, 6, 0.1);
  color: var(--warning);
}

.badge-danger {
  background-color: rgba(220, 38, 38, 0.1);
  color: var(--danger);
}

.badge-secondary {
  background-color: var(--gray-100);
  color: var(--gray-600);
}

.badge-info {
  background-color: rgba(8, 145, 178, 0.1);
  color: var(--info);
}

/* Alerts */
.alert {
  position: relative;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
}

.alert-success {
  color: var(--success);
  background-color: rgba(5, 150, 105, 0.1);
  border-color: rgba(5, 150, 105, 0.2);
}

.alert-warning {
  color: var(--warning);
  background-color: rgba(217, 119, 6, 0.1);
  border-color: rgba(217, 119, 6, 0.2);
}

.alert-danger {
  color: var(--danger);
  background-color: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.2);
}

.alert-info {
  color: var(--info);
  background-color: rgba(8, 145, 178, 0.1);
  border-color: rgba(8, 145, 178, 0.2);
}

/* Utilities */
.d-flex {
  display: flex;
}

.flex-row {
  flex-direction: row;
}

.flex-column {
  flex-direction: column;
}

.justify-content-start {
  justify-content: flex-start;
}

.justify-content-center {
  justify-content: center;
}

.justify-content-end {
  justify-content: flex-end;
}

.justify-content-between {
  justify-content: space-between;
}

.align-items-start {
  align-items: flex-start;
}

.align-items-center {
  align-items: center;
}

.align-items-end {
  align-items: flex-end;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-grow-1 {
  flex-grow: 1;
}

.gap-1 {
  gap: 0.25rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 0.75rem;
}

.gap-4 {
  gap: 1rem;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.ml-0 { margin-left: 0; }
.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-3 { margin-left: 0.75rem; }
.ml-4 { margin-left: 1rem; }

.mr-0 { margin-right: 0; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 0.75rem; }
.mr-4 { margin-right: 1rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-info { color: var(--info); }
.text-muted { color: var(--gray-500); }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.font-normal { font-weight: 400; }

.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }

.w-full { width: 100%; }
.h-full { height: 100%; }

/* Pricing Matrix Specific Styles */
.matrix-builder {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.factor-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1rem;
  background-color: white;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.factor-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.rule-item {
  padding: 1rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  background-color: white;
}

/* Enhanced Matrix Builder Styles */
.visual-matrix-builder {
  background-color: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  overflow: hidden;
}

.matrix-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background-color: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}

.matrix-canvas {
  padding: 2rem;
  min-height: 500px;
  position: relative;
  overflow: auto;
}

.matrix-sidebar {
  width: 300px;
  background-color: var(--gray-50);
  border-left: 1px solid var(--gray-200);
  padding: 1rem;
  position: sticky;
  top: 0;
  height: 100%;
  overflow-y: auto;
}

.matrix-layout {
  display: flex;
}

.matrix-main {
  flex: 1;
  overflow: auto;
}

.factor-item {
  padding: 1rem;
  background-color: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  cursor: grab;
  transition: box-shadow 0.2s;
}

.factor-item:hover {
  box-shadow: var(--shadow);
}

.factor-item-dragging {
  opacity: 0.7;
  box-shadow: var(--shadow-lg) !important;
}

.factor-dimension {
  position: relative;
  padding: 1rem;
  background-color: var(--primary-bg);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  min-width: 200px;
}

.factor-dimension-title {
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.factor-dimension-remove {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  color: var(--danger);
  cursor: pointer;
}

.factor-value-item {
  padding: 0.5rem;
  background-color: white;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  margin-bottom: 0.25rem;
}

.matrix-preview {
  padding: 1rem;
  background-color: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
}

.matrix-grid {
  display: grid;
  gap: 1px;
  background-color: var(--gray-200);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  overflow: hidden;
}

.matrix-cell {
  padding: 0.5rem;
  background-color: white;
  text-align: center;
  font-size: 0.75rem;
}

.matrix-cell-header {
  background-color: var(--gray-100);
  font-weight: 500;
}

.matrix-dropzone {
  background-color: rgba(59, 130, 246, 0.1);
  border: 2px dashed var(--primary);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1rem;
}

.matrix-dropzone-active {
  background-color: rgba(59, 130, 246, 0.2);
  border-color: var(--primary-hover);
}

.rule-builder {
  background-color: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}

.rule-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.rule-adjustment {
  padding: 0.75rem;
  background-color: var(--gray-50);
  border-radius: var(--radius);
  margin-top: 1rem;
}

.condition-group {
  padding: 0.75rem;
  background-color: var(--gray-50);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
}

.condition-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  align-items: center;
}

.bulk-actions {
  padding: 1rem;
  background-color: var(--gray-50);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.import-export-controls {
  padding: 1rem;
  background-color: var(--gray-50);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.rule-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

/* Currency Management Styles */
.currency-card {
  display: flex;
  padding: 1rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  background-color: white;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}

.currency-card:hover {
  box-shadow: var(--shadow-md);
}

.currency-symbol {
  font-size: 1.5rem;
  font-weight: bold;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-bg);
  color: var(--primary);
  border-radius: 9999px;
  margin-right: 1rem;
}

.currency-details {
  flex: 1;
}

.currency-actions {
  align-self: center;
}

/* Service Catalog Styles */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.service-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  background-color: white;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.service-card-img {
  height: 150px;
  background-color: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-card-body {
  padding: 1rem;
  flex-grow: 1;
}

.service-card-title {
  font-weight: 600;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.service-card-price {
  color: var(--primary);
  font-weight: 600;
  font-size: 1.25rem;
  margin-top: 0.5rem;
}

.service-card-footer {
  padding: 1rem;
  background-color: var(--gray-50);
  border-top: 1px solid var(--gray-200);
}

/* Main Content */
main.container {
  flex: 1 0 auto;
  padding-top: 1rem;
  padding-bottom: 1.5rem;
}

/* Footer */
footer {
  flex-shrink: 0;
}

footer h5 {
  color: var(--gray-500) !important;
}

.version {
  color: var(--gray-500) !important;
}

.footer {
  background-color: var(--gray-800);
  color: var(--gray-300);
  padding: 2rem 1rem;
  margin-top: 3rem;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.footer-column {
  flex: 1;
  min-width: 200px;
  margin-bottom: 1.5rem;
}

.footer-title {
  color: white;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-link {
  color: var(--gray-300);
  display: block;
  margin-bottom: 0.5rem;
}

.footer-link:hover {
  color: white;
  text-decoration: none;
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-700);
  margin-top: 2rem;
  font-size: 0.875rem;
}

/* Dashboard Specific Styles */

/* Status badge colors */
.badge-success {
    background-color: var(--success);
    color: white;
}

.badge-warning {
    background-color: var(--warning);
    color: white;
}

.badge-danger {
    background-color: var(--danger);
    color: white;
}

.badge-info {
    background-color: var(--info);
    color: white;
}

.badge-primary {
    background-color: var(--primary);
    color: white;
}

.badge-secondary {
    background-color: var(--secondary);
    color: white;
}

/* Light backgrounds for icons */
.bg-primary-light {
    background-color: rgba(30, 64, 175, 0.1);
}

.bg-success-light {
    background-color: rgba(5, 150, 105, 0.1);
}

.bg-warning-light {
    background-color: rgba(217, 119, 6, 0.1);
}

.bg-danger-light {
    background-color: rgba(220, 38, 38, 0.1);
}

.bg-info-light {
    background-color: rgba(8, 145, 178, 0.1);
}

.bg-secondary-light {
    background-color: rgba(71, 85, 105, 0.1);
}

/* Card hover effect */
.dashboard-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

/* Chart container */
.chart-container {
    position: relative;
    width: 100%;
}

/* Quick actions button hover effect */
.dashboard .btn-outline-primary:hover {
    background-color: var(--primary-bg);
    color: var(--primary);
    border-color: var(--primary);
}

/* Status icon styling in activity list */
.activity-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Metrics value emphasis */
.metric-value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary);
}

/* Currency converter result animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#convertResult:not(.d-none) {
    animation: fadeIn 0.3s ease-in-out;
}

/* Quick Actions Mobile Styles */
.quick-actions-toggle {
  position: relative;
  transition: all 0.3s ease;
  min-height: 44px; /* Touch-friendly size */
}

.quick-actions-toggle:focus {
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.25);
}

.quick-actions-chevron {
  transition: transform 0.3s ease;
  font-size: 0.875rem;
}

.quick-actions-toggle[aria-expanded="true"] .quick-actions-chevron {
  transform: rotate(180deg);
}

#quickActionsPanel {
  transition: all 0.3s ease;
}

#quickActionsPanel .btn {
  min-height: 60px;
  padding: 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

#quickActionsPanel .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#quickActionsPanel .btn:active {
  transform: translateY(0);
  transition: transform 0.1s ease;
}

#quickActionsPanel .btn i {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

#quickActionsPanel .btn small {
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.2;
}

/* Touch feedback effect */
#quickActionsPanel .btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s;
}

#quickActionsPanel .btn:active::before {
  width: 120%;
  height: 120%;
}

/* Badge styling in mobile panel */
#quickActionsPanel .badge {
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
}

/* Smooth collapse animation */
.collapsing {
  transition: height 0.35s ease;
}

/* Mobile-specific improvements for better UX */
@media (max-width: 991.98px) {
  .quick-actions-toggle {
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  #quickActionsPanel .row {
    margin-left: -0.375rem;
    margin-right: -0.375rem;
  }
  
  #quickActionsPanel .col-6 {
    padding-left: 0.375rem;
    padding-right: 0.375rem;
  }
}

/* Enhanced button states for better mobile interaction */
@media (hover: none) and (pointer: coarse) {
  #quickActionsPanel .btn:hover {
    transform: none;
    box-shadow: none;
  }
  
  #quickActionsPanel .btn:active {
    background-color: var(--primary-hover) !important;
    transform: scale(0.98);
  }
  
  #quickActionsPanel .btn-outline:active {
    background-color: var(--primary) !important;
    color: white !important;
  }
  
  #quickActionsPanel .btn-secondary:active {
    background-color: var(--secondary-hover) !important;
  }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .navbar-container {
    flex-direction: column;
    padding: 0.5rem;
  }
  
  .navbar-brand {
    margin-bottom: 0.5rem;
  }
  
  .navbar-menu {
    width: 100%;
    justify-content: space-between;
  }
  
  .header-section {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .header-section > div {
    margin-top: 1rem;
    width: 100%;
  }
  
  .table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .service-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  
  .metric-value {
    font-size: 1.5rem;
  }
    
  .chart-container {
    height: 200px !important;
  }
}

/* Custom Pagination Styles */
.pagination {
  margin-bottom: 0;
  border-radius: var(--radius-md);
}

.pagination .page-item {
  margin: 0 0.125rem;
}

.pagination .page-item:first-child {
  margin-left: 0;
}

.pagination .page-item:last-child {
  margin-right: 0;
}

.pagination .page-link {
  border: 1px solid var(--gray-300);
  color: var(--gray-700);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  background-color: white;
  text-decoration: none;
}

.pagination .page-link:hover {
  background-color: var(--gray-50);
  border-color: var(--gray-400);
  color: var(--gray-900);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.pagination .page-link:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
  border-color: var(--primary-light);
  outline: none;
}

.pagination .page-item.active .page-link {
  background-color: var(--primary);
  border-color: var(--primary);
  color: white;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.pagination .page-item.active .page-link:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: none;
}

.pagination .page-item.disabled .page-link {
  background-color: var(--gray-100);
  border-color: var(--gray-200);
  color: var(--gray-400);
  cursor: not-allowed;
  pointer-events: none;
}

.pagination .page-item.disabled .page-link:hover {
  transform: none;
  box-shadow: none;
}

/* Pagination container styling */
nav[aria-label*="pagination"] {
  border-top: 1px solid var(--gray-200);
  padding-top: 1rem;
  margin-top: 1rem;
}

/* Small pagination variant for compact spaces */
.pagination-sm .page-link {
  padding: 0.375rem 0.5rem;
  font-size: 0.75rem;
}

/* Responsive pagination */
@media (max-width: 576px) {
  .pagination {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .pagination .page-item {
    margin: 0.125rem;
  }
  
  .pagination .page-link {
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
  }
}
