/*
  DataMetrics Website Stylesheet (Final Version)
  ---
  This is the complete, consolidated stylesheet for the entire DataMetrics website,
  including the main page and the interactive dashboard.
*/

/* --- Root Variables for Theming --- */
:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --secondary: #7c3aed;
  --text: #1f2937;
  --text-light: #6b7280;
  --bg: #f9fafb;
  --bg-dark: #111827;
  --card-bg: rgba(255, 255, 255, 0.8);
  --card-bg-dark: rgba(31, 41, 55, 0.8);
  --border-color: #e5e7eb;
  --border-color-dark: #374151;
  --transition: all 0.3s ease;
}

/* --- Base Body and Dark Mode Styles --- */
html.no-scroll {
  overflow: hidden;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  transition: var(--transition);
}
body.dark {
  background: var(--bg-dark);
  color: #e5e7eb;
}

/* --- General Layout Container --- */
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 22px;
}

/* --- Header and Navigation --- */
header {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}
body.dark header {
  background: rgba(31, 41, 55, 0.8);
  border-bottom: 1px solid var(--border-color-dark);
}
.header-content { display: flex; justify-content: space-between; align-items: center; padding: 16.5px 0; }
.logo { font-size: 31px; font-weight: 700; background: linear-gradient(to right, var(--primary), var(--secondary)); -webkit-background-clip: text; background-clip: text; color: transparent; text-decoration: none; }
nav.desktop-nav { display: flex; gap: 33px; }
nav.desktop-nav a { color: var(--text); text-decoration: none; font-weight: 500; transition: var(--transition); }
nav.desktop-nav a.active,
nav.desktop-nav a:hover { color: var(--primary); }
body.dark nav.desktop-nav a { color: #e5e7eb; }
body.dark nav.desktop-nav a.active,
body.dark nav.desktop-nav a:hover { color: #a78bfa; }

/* --- Mobile Menu --- */
.mobile-menu-button { display: none; background: none; border: none; color: var(--text); font-size: 26px; cursor: pointer; }
body.dark .mobile-menu-button { color: #e5e7eb; }
.mobile-menu { display: none; padding: 16.5px 0; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); }
.mobile-menu.is-open { display: block !important; }
body.dark .mobile-menu { background: rgba(31, 41, 55, 0.95); }
.mobile-menu a { display: block; padding: 11px 0; color: var(--text); text-decoration: none; transition: var(--transition); }
.mobile-menu a.active,
.mobile-menu a:hover { color: var(--primary); }
body.dark .mobile-menu a { color: #e5e7eb; }
body.dark .mobile-menu a.active,
body.dark .mobile-menu a:hover { color: #a78bfa; }

/* --- Buttons --- */
.btn { display: inline-block; padding: 11px 28px; border-radius: 9999px; font-weight: 600; text-decoration: none; transition: var(--transition); cursor: pointer; border: none; }
.btn-primary { background: linear-gradient(to right, var(--primary), var(--secondary)); color: white; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }
.btn-primary:hover { background: linear-gradient(to right, var(--primary-dark), #6d28d9); transform: translateY(-2px); box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15); }
.btn-outline { border: 2px solid var(--primary); color: var(--primary); background-color: transparent; }
body.dark .btn-outline { color: #a78bfa; border-color: #a78bfa; }
.btn-outline:hover { background: var(--primary); color: white; }
body.dark .btn-outline:hover { background: #7c3aed; color: white; }

/* --- Dark Mode Toggle --- */
.dark-mode-toggle { background: #f3f4f6; border: 2px solid #e5e7eb; border-radius: 9999px; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: var(--transition); }
body.dark .dark-mode-toggle { background: #1f2937; border-color: #374151; }
.dark-mode-toggle i { font-size: 20px; }
.dark-mode-toggle .fa-moon { display: block; }
.dark-mode-toggle .fa-sun { display: none; color: #fbbf24; }
body.dark .dark-mode-toggle .fa-moon { display: none; }
body.dark .dark-mode-toggle .fa-sun { display: block; }

/* --- Hero Section --- */
.hero { min-height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; background: var(--bg); }
.hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(199, 210, 254, 0.2) 0%, rgba(216, 180, 254, 0.2) 100%); }
body.dark .hero::before { background: linear-gradient(135deg, rgba(55, 48, 163, 0.2) 0%, rgba(124, 58, 237, 0.2) 100%); }
.hero-content { text-align: center; position: relative; z-index: 1; max-width: 880px; padding: 0 22px; }
.hero h1 { font-size: clamp(2.75rem, 5.5vw, 5rem); font-weight: 800; margin-bottom: 22px; background: linear-gradient(to right, var(--primary), var(--secondary), #db2777); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.2; }
.hero p { font-size: clamp(1.1rem, 2.2vw, 1.4rem); color: var(--text-light); margin-bottom: 44px; line-height: 1.6; }
body.dark .hero p { color: #d1d5db; }
.hero-buttons { display: flex; gap: 16.5px; justify-content: center; flex-wrap: wrap; }

/* --- Hero Stats / Counters --- */
.hero-stats { display: flex; justify-content: space-around; margin-top: 66px; padding-top: 44px; border-top: 1px solid var(--border-color); width: 100%; }
body.dark .hero-stats { border-top-color: var(--border-color-dark); }
.stat-item { text-align: center; flex: 1; }
.stat-item i { font-size: 2.2rem; margin-bottom: 16px; background: linear-gradient(to right, var(--primary), var(--secondary)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-number { font-size: 2.5rem; font-weight: 700; line-height: 1.1; }
.stat-label { font-size: 1rem; color: var(--text-light); margin-top: 8px; }
body.dark .stat-label { color: #d1d5db; }

/* --- Floating Decorative Elements --- */
.floating-element { position: absolute; border-radius: 50%; opacity: 0.2; z-index: 0; animation: pulse 6s infinite ease-in-out alternate; }
.floating-element-1 { width: 88px; height: 88px; top: 20%; left: 10%; background: linear-gradient(to right, #818cf8, #a78bfa); animation-name: bounce; }
.floating-element-2 { width: 66px; height: 66px; bottom: 20%; right: 10%; background: linear-gradient(to right, #a78bfa, #ec4899); animation-delay: -3s; }

/* --- Section Styling --- */
.section { padding: 88px 0; }
.section-title { text-align: center; margin-bottom: 66px; }
.section-title h2 { font-size: clamp(2.2rem, 4.4vw, 3.3rem); font-weight: 800; margin-bottom: 16.5px; background: linear-gradient(to right, var(--primary), var(--secondary)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.section-title p { font-size: 1.2rem; color: var(--text-light); max-width: 770px; margin: 0 auto; }
body.dark .section-title p { color: #d1d5db; }

/* --- About Section & Features --- */
.about { background: rgba(255, 255, 255, 0.5); backdrop-filter: blur(10px); }
body.dark .about { background: rgba(31, 41, 55, 0.5); }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 33px; }
.feature-card { text-align: center; padding: 33px; transition: var(--transition); }
.feature-icon { width: 77px; height: 77px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 22px; transition: var(--transition); }
.feature-card:hover .feature-icon { transform: scale(1.1); }
.feature-icon-1 { background: linear-gradient(to right, var(--primary), var(--secondary)); }
.feature-icon-2 { background: linear-gradient(to right, var(--secondary), #ec4899); }
.feature-icon-3 { background: linear-gradient(to right, #ec4899, #f43f5e); }
.feature-icon i { color: white; font-size: 26px; }
.feature-card h3 { font-size: 1.4rem; font-weight: 600; margin-bottom: 16.5px; }
.feature-card p { color: var(--text-light); line-height: 1.6; }
body.dark .feature-card p { color: #d1d5db; }

/* --- Services Section --- */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 28px; }
.service-card { background: var(--card-bg); backdrop-filter: blur(10px); border-radius: 18px; padding: 33px; box-shadow: 0 11px 17px -3px rgba(0, 0, 0, 0.1); border: 1px solid var(--border-color); transition: var(--transition); }
body.dark .service-card { background: var(--card-bg-dark); border-color: var(--border-color-dark); }
.service-card:hover { transform: translateY(-5.5px); box-shadow: 0 22px 28px -5px rgba(0, 0, 0, 0.1); }
.service-icon { width: 55px; height: 55px; border-radius: 13px; display: flex; align-items: center; justify-content: center; margin-bottom: 22px; }
.service-icon-1 { background: linear-gradient(to right, #3b82f6, var(--primary)); }
.service-icon-2 { background: linear-gradient(to right, #10b981, #059669); }
.service-icon-3 { background: linear-gradient(to right, var(--secondary), #ec4899); }
.service-icon-4 { background: linear-gradient(to right, #f97316, #ef4444); }
.service-icon-5 { background: linear-gradient(to right, #06b6d4, #0ea5e9); }
.service-icon-6 { background: linear-gradient(to right, #8b5cf6, var(--secondary)); }
.service-icon i { color: white; font-size: 20px; }
.service-card h3 { font-size: 1.4rem; font-weight: 600; margin-bottom: 16.5px; }
.service-card p { color: var(--text-light); line-height: 1.6; }
body.dark .service-card p { color: #d1d5db; }

/* --- Contact Section & Form --- */
.contact { background: rgba(255, 255, 255, 0.5); backdrop-filter: blur(10px); }
body.dark .contact { background: rgba(31, 41, 55, 0.5); }
.contact-form-container { background: var(--card-bg); backdrop-filter: blur(10px); border-radius: 18px; padding: 44px; box-shadow: 0 11px 17px -3px rgba(0, 0, 0, 0.1); border: 1px solid var(--border-color); max-width: 990px; margin: 0 auto; position: relative; overflow: hidden; }
body.dark .contact-form-container { background: var(--card-bg-dark); border-color: var(--border-color-dark); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(275px, 1fr)); gap: 22px; margin-bottom: 22px; }
.form-group { margin-bottom: 22px; }
.form-group label { display: block; font-weight: 500; margin-bottom: 9px; }
.form-group input, .form-group textarea { width: 100%; padding: 13px 16.5px; border-radius: 9px; border: 1px solid #d1d5db; background: rgba(255, 255, 255, 0.5); transition: var(--transition); box-sizing: border-box; }
body.dark .form-group input, body.dark .form-group textarea { border-color: #4b5563; background: rgba(31, 41, 55, 0.5); color: #e5e7eb; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2); }
body.dark .form-group input:focus, body.dark .form-group textarea:focus { border-color: #a78bfa; box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.3); }
.form-group textarea { min-height: 132px; resize: vertical; }
.checkbox-group { display: flex; align-items: center; margin-bottom: 28px; }
.checkbox-group input { margin-right: 11px; }
.checkbox-group label { font-size: 1rem; color: var(--text-light); margin-bottom: 0; }
body.dark .checkbox-group label { color: #d1d5db; }
.submit-btn { width: 100%; padding: 16.5px; border-radius: 9px; font-weight: 600; transition: var(--transition); }

/* --- Form Success Message --- */
#form-success-message { text-align: center; padding: 22px; }
#form-success-message h3 { margin-top: 0; margin-bottom: 11px; font-size: 1.65rem; }
#form-success-message p { margin: 0; color: var(--text-light); }
body.dark #form-success-message p { color: #d1d5db; }
.success-icon { margin: 0 auto 22px; width: 66px; height: 66px; }
.success-icon svg { width: 100%; height: 100%; fill: #10b981; }

/* --- Dashboard Section --- */
.dashboard { background: #f3f4f6; }
body.dark .dashboard { background: #111827; }
.dashboard-container { text-align: center; }

/* --- Dashboard Modal --- */
.dashboard-modal { position: fixed; inset: 0; background-color: rgba(0, 0, 0, 0.7); backdrop-filter: blur(5px); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 22px; opacity: 0; transition: opacity 0.3s ease; }
.dashboard-modal.visible { opacity: 1; }
.dashboard-modal-content { position: relative; width: 100%; max-width: 1540px; height: 90%; background: var(--bg); border-radius: 18px; box-shadow: 0 22px 28px -5px rgba(0, 0, 0, 0.1); overflow: hidden; transform: scale(0.95); transition: transform 0.3s ease; }
.dashboard-modal.visible .dashboard-modal-content { transform: scale(1); }
body.dark .dashboard-modal-content { background: var(--bg-dark); }
#dataDashboard { width: 100%; height: 100%; border: none; }
.dashboard-close-btn { position: absolute; top: 16.5px; right: 16.5px; background: rgba(0, 0, 0, 0.3); color: white; border: none; border-radius: 50%; width: 40px; height: 40px; font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.3s ease; }
.dashboard-close-btn:hover { background: rgba(0, 0, 0, 0.5); }

/* --- Footer --- */
footer { background: #111827; color: white; padding: 66px 0 0; }
body.dark footer { background: #000000; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(275px, 1fr)); gap: 44px; margin-bottom: 44px; }
.footer-logo { font-size: 31px; font-weight: 700; background: linear-gradient(to right, #818cf8, #a78bfa); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 22px; display: inline-block; }
.footer-about p { color: #9ca3af; line-height: 1.6; margin-bottom: 22px; }
.social-links { display: flex; gap: 16.5px; }
.social-link { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; text-decoration: none; transition: var(--transition); }
.social-link:hover { transform: translateY(-3.3px); }
.footer-links h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 22px; }
.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 11px; }
.footer-links a { color: #9ca3af; text-decoration: none; transition: var(--transition); }
.footer-links a:hover { color: #a78bfa; }
.footer-bottom { border-top: 1px solid #374151; padding: 22px 0; }
.footer-bottom-content { display: flex; flex-direction: column; align-items: center; justify-content: space-between; }
.copyright { color: #9ca3af; font-size: 1rem; margin-bottom: 16.5px; }
.legal-links { display: flex; gap: 22px; }
.legal-links a { color: #9ca3af; font-size: 1rem; text-decoration: none; transition: var(--transition); }
.legal-links a:hover { color: #a78bfa; }

/* --- Cookie Consent Pop-up --- */
.cookie-consent { position: fixed; bottom: 22px; left: 22px; right: 22px; max-width: 440px; background: var(--card-bg); backdrop-filter: blur(10px); color: var(--text); padding: 22px; border-radius: 13px; box-shadow: 0 11px 17px -3px rgba(0, 0, 0, 0.1); z-index: 1000; display: none; border: 1px solid var(--border-color); animation: slideInUp 0.5s ease-out forwards; }
body.dark .cookie-consent { background: var(--card-bg-dark); border-color: var(--border-color-dark); }
.cookie-header { display: flex; align-items: flex-start; gap: 16.5px; margin-bottom: 16.5px; }
.cookie-icon { width: 38.5px; height: 38.5px; border-radius: 50%; background: linear-gradient(to right, var(--primary), var(--secondary)); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cookie-icon i { color: white; font-size: 15.4px; }
.cookie-content h4 { font-weight: 600; margin-bottom: 5.5px; }
.cookie-content p { font-size: 1rem; color: var(--text-light); line-height: 1.5; }
body.dark .cookie-content p { color: #d1d5db; }
.cookie-buttons { display: flex; gap: 11px; margin-top: 16.5px; }
.cookie-btn { padding: 9px 18px; border-radius: 9px; font-size: 1rem; font-weight: 500; cursor: pointer; transition: var(--transition); border: none; }
.cookie-btn-accept { background: linear-gradient(to right, var(--primary), var(--secondary)); color: white; }
.cookie-btn-decline { background: #e5e7eb; color: var(--text); }
body.dark .cookie-btn-decline { background: #374151; color: #e5e7eb; }

/* --- Utility and Animation Classes --- */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; }

/* --- Scroll-Triggered Animations --- */
.scroll-animate { opacity: 0; transform: translateY(33px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.scroll-animate.is-visible { opacity: 1; transform: translateY(0); }

@keyframes slideInUp { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-22px); } }
@keyframes pulse { 0% { transform: scale(1); opacity: 0.2; } 50% { transform: scale(1.1); opacity: 0.3; } 100% { transform: scale(1); opacity: 0.2; } }

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
  .section { padding: 66px 0; }
  .desktop-nav { display: none; }
  .mobile-menu-button { display: block; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .hero-buttons .btn { width: 100%; max-width: 275px; }
  .hero-stats { flex-direction: column; gap: 44px; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-bottom-content { flex-direction: column; gap: 16.5px; }
  .copyright { margin-bottom: 0; }
}

/* --- Reduced Motion Accessibility --- */
@media (prefers-reduced-motion) {
  .scroll-animate,
  .feature-card:hover .feature-icon,
  .service-card:hover,
  .btn:hover,
  .social-link:hover,
  .cookie-consent,
  .floating-element,
  .dashboard-modal,
  .dashboard-modal-content {
    animation: none !important;
    transform: none !important;
    transition: none !important;
  }
}

/*
==============================================
DASHBOARD PAGE STYLES
==============================================
*/
.dashboard-page { min-height: 100vh; background: var(--bg); padding-top: 2rem; }
body.dark .dashboard-page { background: var(--bg-dark); }
.dashboard-header { text-align: center; margin-bottom: 3rem; }
.dashboard-header h1 { font-size: clamp(2.5rem, 4vw, 3.5rem); font-weight: 800; margin-bottom: 1rem; background: linear-gradient(to right, var(--primary), var(--secondary)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dashboard-header p { font-size: 1.2rem; color: var(--text-light); max-width: 600px; margin: 0 auto; }
body.dark .dashboard-header p { color: #d1d5db; }
.search-section { padding: 3rem 0 2rem 0; }
.data-table-section { padding: 2rem 0 4rem 0; }
.search-form-container { background: var(--card-bg); backdrop-filter: blur(10px); border-radius: 18px; padding: 2.5rem; box-shadow: 0 11px 17px -3px rgba(0, 0, 0, 0.1); border: 1px solid var(--border-color); max-width: 1000px; margin: 0 auto; }
body.dark .search-form-container { background: var(--card-bg-dark); border-color: var(--border-color-dark); }
.inner-form { display: grid; grid-template-columns: 1fr 2fr auto; gap: 1rem; align-items: end; }
.input-field { display: flex; flex-direction: column; }
.input-field label { font-weight: 500; margin-bottom: 0.5rem; color: var(--text); }
body.dark .input-field label { color: #e5e7eb; }
.input-field select, .input-field input { width: 100%; padding: 0.8rem 1rem; border-radius: 8px; border: 1px solid var(--border-color); background: rgba(255, 255, 255, 0.8); transition: var(--transition); font-size: 1rem; font-family: inherit; }
body.dark .input-field select, body.dark .input-field input { border-color: var(--border-color-dark); background: rgba(31, 41, 55, 0.8); color: #e5e7eb; }
.input-field select:focus, .input-field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2); }
body.dark .input-field select:focus, body.dark .input-field input:focus { border-color: #a78bfa; box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.3); }
.btn-search { height: 3.2rem; width: 3.2rem; display: flex; align-items: center; justify-content: center; border-radius: 8px; padding: 0; }
.data-table-container { background: var(--card-bg); backdrop-filter: blur(10px); border-radius: 18px; padding: 2rem; box-shadow: 0 11px 17px -3px rgba(0, 0, 0, 0.1); border: 1px solid var(--border-color); overflow-x: auto; }
body.dark .data-table-container { background: var(--card-bg-dark); border-color: var(--border-color-dark); }
.dataTables_wrapper { font-family: inherit; }
.dataTables_filter input { border-radius: 8px !important; border: 1px solid var(--border-color) !important; padding: 0.5rem 0.75rem !important; background: rgba(255, 255, 255, 0.8) !important; }
body.dark .dataTables_filter input { border-color: var(--border-color-dark) !important; background: rgba(31, 41, 55, 0.8) !important; color: #e5e7eb !important; }
.dataTables_length select { border-radius: 8px !important; border: 1px solid var(--border-color) !important; padding: 0.3rem 0.5rem !important; background: rgba(255, 255, 255, 0.8) !important; }
body.dark .dataTables_length select { border-color: var(--border-color-dark) !important; background: rgba(31, 41, 55, 0.8) !important; color: #e5e7eb !important; }
.dataTables_info, .dataTables_length label, .dataTables_filter label { color: var(--text-light) !important; }
body.dark .dataTables_info, body.dark .dataTables_length label, body.dark .dataTables_filter label { color: #d1d5db !important; }
.page-link { color: var(--primary) !important; border-color: var(--border-color) !important; background: rgba(255, 255, 255, 0.8) !important; }
body.dark .page-link { color: #a78bfa !important; border-color: var(--border-color-dark) !important; background: rgba(31, 41, 55, 0.8) !important; }
.page-item.active .page-link { background: linear-gradient(to right, var(--primary), var(--secondary)) !important; border-color: var(--primary) !important; }
.table { --bs-table-bg: transparent; }
.table th { background: linear-gradient(to right, var(--primary), var(--secondary)) !important; color: white !important; border: none !important; font-weight: 600; padding: 1rem 0.75rem; }
.table td { padding: 0.75rem; border-color: var(--border-color) !important; color: var(--text); }
body.dark .table td { border-color: var(--border-color-dark) !important; color: #e5e7eb; }
.table-striped > tbody > tr:nth-of-type(odd) > td { background: rgba(79, 70, 229, 0.05) !important; }
body.dark .table-striped > tbody > tr:nth-of-type(odd) > td { background: rgba(167, 139, 250, 0.1) !important; }
@media (max-width: 768px) { .inner-form { grid-template-columns: 1fr; gap: 1.5rem; } .btn-search { width: 100%; height: 3rem; } .search-form-container, .data-table-container { padding: 1.5rem; margin: 0 1rem; } .dashboard-header h1 { font-size: 2rem; } .data-table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; } .table { min-width: 600px; } }
@media (max-width: 480px) { .search-form-container, .data-table-container { margin: 0 0.5rem; padding: 1rem; } .dashboard-page { padding-top: 1rem; } .search-section { padding: 2rem 0 1rem 0; } .data-table-section { padding: 1rem 0 3rem 0; } }

/*
==============================================
DataTable Control Alignment Fixes
==============================================
*/
.dataTables_wrapper .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}
.dataTables_wrapper .row .col-sm-12.col-md-6:first-child {
  flex: 1;
  text-align: left;
}
.dataTables_wrapper .row .col-sm-12.col-md-6:last-child {
  flex: 1;
  text-align: right;
}
.dataTables_wrapper .dataTables_paginate .pagination {
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .dataTables_wrapper .row {
    flex-direction: column;
    gap: 1rem;
  }
  .dataTables_wrapper .row .col-sm-12.col-md-6,
  .dataTables_wrapper .row .col-sm-12.col-md-6:first-child,
  .dataTables_wrapper .row .col-sm-12.col-md-6:last-child {
    text-align: center !important;
  }
  .dataTables_wrapper .dataTables_paginate .pagination {
    justify-content: center;
  }
}

/* --- Dashboard Page Specific Styles --- */
.stats-section {
  margin-bottom: 3rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: 0 11px 17px -3px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
}

body.dark .stat-card {
  background: var(--card-bg-dark);
  border-color: var(--border-color-dark);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.15);
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
}

.stat-icon-1 {
  background: linear-gradient(to right, #3b82f6, var(--primary));
}

.stat-icon-2 {
  background: linear-gradient(to right, var(--secondary), #ec4899);
}

.stat-icon-3 {
  background: linear-gradient(to right, #10b981, #059669);
}

.stat-icon-4 {
  background: linear-gradient(to right, #f97316, #ef4444);
}

.stat-content {
  flex: 1;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0;
}

body.dark .stat-label {
  color: #d1d5db;
}

/* --- Charts Section --- */
.charts-section {
  margin-bottom: 3rem;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
}

.chart-card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: 18px;
  box-shadow: 0 11px 17px -3px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: var(--transition);
}

body.dark .chart-card {
  background: var(--card-bg-dark);
  border-color: var(--border-color-dark);
}

.chart-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.15);
}

.chart-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

body.dark .chart-header {
  border-bottom-color: var(--border-color-dark);
}

.chart-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.chart-actions {
  display: flex;
  gap: 0.5rem;
}

.chart-btn {
  background: rgba(79, 70, 229, 0.1);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--primary);
}

body.dark .chart-btn {
  background: rgba(167, 139, 250, 0.1);
  color: #a78bfa;
}

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

body.dark .chart-btn:hover {
  background: #7c3aed;
}

.chart-container {
  padding: 1.5rem;
  min-height: 300px;
}

.chart-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-light);
  text-align: center;
}

body.dark .chart-placeholder {
  color: #9ca3af;
}

.chart-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* --- Quick Actions Section --- */
.quick-actions-section {
  margin-top: 3rem;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.quick-action-card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: 18px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 11px 17px -3px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

body.dark .quick-action-card {
  background: var(--card-bg-dark);
  border-color: var(--border-color-dark);
}

.quick-action-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.15);
}

.action-icon {
  width: 70px;
  height: 70px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: white;
  margin: 0 auto 1.5rem;
}

.action-icon-1 {
  background: linear-gradient(to right, var(--primary), var(--secondary));
}

.action-icon-2 {
  background: linear-gradient(to right, #10b981, #059669);
}

.action-icon-3 {
  background: linear-gradient(to right, #f97316, #ef4444);
}

.quick-action-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.quick-action-card p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

body.dark .quick-action-card p {
  color: #d1d5db;
}

/* --- Status Badges --- */
.status-high {
  background: linear-gradient(to right, #ef4444, #f97316);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-medium {
  background: linear-gradient(to right, #f59e0b, #eab308);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-low {
  background: linear-gradient(to right, #10b981, #059669);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* --- Action Buttons in Table --- */
.action-btn {
  background: rgba(79, 70, 229, 0.1);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--primary);
  margin: 0 0.25rem;
}

body.dark .action-btn {
  background: rgba(167, 139, 250, 0.1);
  color: #a78bfa;
}

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

body.dark .action-btn:hover {
  background: #7c3aed;
}

/* --- Responsive Adjustments for Dashboard --- */
@media (max-width: 768px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-number {
    font-size: 1.5rem;
  }
  
  .chart-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .chart-actions {
    width: 100%;
    justify-content: center;
  }
  
  .dashboard-page {
    padding-top: 1rem;
  }
  
  .stats-section {
    margin-bottom: 2rem;
  }
  
  .charts-section {
    margin-bottom: 2rem;
  }
  
  .quick-actions-section {
    margin-top: 2rem;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-card {
    padding: 1rem;
  }
  
  .chart-container {
    padding: 1rem;
    min-height: 250px;
  }
  
  .quick-action-card {
    padding: 1.5rem;
  }
}

/* --- Enhanced Table Styles --- */
.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

body.dark .table-header {
  border-bottom: 1px solid var(--border-color-dark);
}

.table-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

body.dark .table-header h3 {
  color: #e5e7eb;
}

.table-controls {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.entries-per-page {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.entries-per-page label,
.search-wrapper label {
  font-size: 0.875rem;
  color: var(--text-light);
  margin: 0;
}

body.dark .entries-per-page label,
body.dark .search-wrapper label {
  color: #d1d5db;
}

.entries-per-page select,
.search-wrapper input {
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  transition: var(--transition);
  color: var(--text);
}

body.dark .entries-per-page select,
body.dark .search-wrapper input {
  border-color: var(--border-color-dark);
  background: rgba(31, 41, 55, 0.8);
  color: #e5e7eb;
}

.entries-per-page select:focus,
.search-wrapper input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

body.dark .entries-per-page select:focus,
body.dark .search-wrapper input:focus {
  border-color: #a78bfa;
  box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.3);
}

.search-wrapper input {
  width: 200px;
}

/* --- Table Cell Styling --- */
.table th {
  background: linear-gradient(to right, var(--primary), var(--secondary)) !important;
  color: white !important;
  border: none !important;
  font-weight: 600;
  padding: 1rem 0.75rem !important;
  text-align: left;
  position: relative;
}

.table th::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 8px;
  width: 8px;
  height: 8px;
  background: transparent;
  border: 1px solid white;
  border-radius: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.table th:hover::after {
  opacity: 1;
}

.table td {
  padding: 0.75rem !important;
  border-color: var(--border-color) !important;
  color: var(--text);
  vertical-align: middle;
}

body.dark .table td {
  border-color: var(--border-color-dark) !important;
  color: #e5e7eb;
}

.table tbody tr:nth-child(even) {
  background-color: rgba(79, 70, 229, 0.05) !important;
}

body.dark .table tbody tr:nth-child(even) {
  background-color: rgba(167, 139, 250, 0.1) !important;
}

/* --- Actions Column Styling --- */
.actions-cell {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  align-items: center;
}

.action-btn {
  background: rgba(79, 70, 229, 0.1);
  border: 1px solid rgba(79, 70, 229, 0.2);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--primary);
  margin: 0;
  font-size: 0.875rem;
}

body.dark .action-btn {
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.2);
  color: #a78bfa;
}

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

body.dark .action-btn:hover {
  background: #7c3aed;
  color: white;
  border-color: #7c3aed;
}

.view-btn:hover {
  background: linear-gradient(to right, #3b82f6, var(--primary));
  border-color: transparent;
}

.download-btn:hover {
  background: linear-gradient(to right, var(--secondary), #ec4899);
  border-color: transparent;
}

.view-btn,
.download-btn {
  width: 32px;
  height: 32px;
}

/* --- Status Badges --- */
.status-high {
  background: linear-gradient(to right, #ef4444, #f97316);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-block;
}

.status-medium {
  background: linear-gradient(to right, #f59e0b, #eab308);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-block;
}

.status-low {
  background: linear-gradient(to right, #10b981, #059669);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-block;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
  .table-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .table-controls {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }
  
  .entries-per-page {
    flex-direction: row;
    gap: 0.5rem;
    align-items: center;
  }
  
  .search-wrapper {
    flex-direction: row;
    gap: 0.5rem;
    align-items: center;
    width: 100%;
  }
  
  .search-wrapper input {
    flex: 1;
    width: auto;
  }
  
  .table {
    font-size: 0.875rem;
  }
  
  .table th,
  .table td {
    padding: 0.5rem !important;
  }
  
  .actions-cell {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .table-header {
    gap: 0.75rem;
  }
  
  .table-controls {
    gap: 0.75rem;
  }
  
  .entries-per-page,
  .search-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  
  .search-wrapper {
    width: 100%;
  }
  
  .search-wrapper input {
    width: 100%;
  }
}

/* --- Fix for Table Footer Section (Highlighted Area) --- */
.dataTables_wrapper .dataTables_info {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-light);
  margin: 0;
}

body.dark .dataTables_info {
  color: #d1d5db;
}

.dataTables_wrapper .dataTables_paginate {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  margin: 0;
}

.dataTables_wrapper .dataTables_paginate .pagination {
  margin: 0;
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.dataTables_wrapper .paginate_button {
  padding: 0.5rem 0.75rem;
  margin: 0;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  font-size: 0.875rem;
  transition: var(--transition);
  cursor: pointer;
  min-width: 36px;
  text-align: center;
}

body.dark .dataTables_wrapper .paginate_button {
  border-color: var(--border-color-dark);
  background: rgba(31, 41, 55, 0.8);
  color: #e5e7eb;
}

.dataTables_wrapper .paginate_button:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

body.dark .dataTables_wrapper .paginate_button:hover {
  background: #7c3aed;
  color: white;
  border-color: #7c3aed;
}

.dataTables_wrapper .paginate_button.current {
  background: linear-gradient(to right, var(--primary), var(--secondary));
  color: white;
  border-color: var(--primary);
  font-weight: 500;
}

.dataTables_wrapper .paginate_button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(243, 244, 246, 0.8);
  color: var(--text-light);
}

body.dark .dataTables_wrapper .paginate_button.disabled {
  background: rgba(17, 24, 39, 0.8);
  color: #9ca3af;
}

/* --- Responsive Adjustments for Pagination --- */
@media (max-width: 768px) {
  .dataTables_wrapper .row {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .dataTables_wrapper .row .col-sm-12.col-md-6:first-child,
  .dataTables_wrapper .row .col-sm-12.col-md-6:last-child {
    text-align: center !important;
  }
  
  .dataTables_wrapper .dataTables_paginate .pagination {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .dataTables_wrapper .paginate_button {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    min-width: 32px;
  }
}