/**
 * EIRS Theme - Modern Emerald Design System
 * Based on eirs-laravel-mvc design patterns
 */

/* ========================================
   CSS VARIABLES (Custom Properties)
   ======================================== */

:root {
  /* Emerald Color Palette (Primary) */
  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-200: #a7f3d0;
  --emerald-300: #6ee7b7;
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --emerald-800: #065f46;
  --emerald-900: #064e3b;

  /* Teal Accent Colors */
  --teal-50: #f0fdfa;
  --teal-100: #ccfbf1;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  --teal-700: #0f766e;

  /* Gray Scale */
  --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;

  /* Status Colors */
  --success-bg: #dcfce7;
  --success-text: #166534;
  --warning-bg: #fef3c7;
  --warning-text: #854d0e;
  --danger-bg: #fee2e2;
  --danger-text: #991b1b;
  --info-bg: #dbeafe;
  --info-text: #1e40af;

  /* Semantic Colors */
  --primary: var(--emerald-600);
  --primary-hover: var(--emerald-700);
  --primary-light: var(--emerald-50);
  --secondary: var(--gray-600);
  --secondary-hover: var(--gray-700);
  --background: var(--gray-50);
  --surface: #ffffff;
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-600);
  --text-muted: var(--gray-500);
  --border: var(--gray-200);
  --border-light: rgba(255, 255, 255, 0.3);

  /* Typography */
  --font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;

  /* Spacing */
  --spacing-1: 0.25rem;
  --spacing-2: 0.5rem;
  --spacing-3: 0.75rem;
  --spacing-4: 1rem;
  --spacing-5: 1.25rem;
  --spacing-6: 1.5rem;
  --spacing-8: 2rem;
  --spacing-10: 2.5rem;
  --spacing-12: 3rem;

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-card: 0px 10px 80px rgba(2, 31, 123, 0.08);

  /* Transitions */
  --transition-fast: 150ms;
  --transition-normal: 200ms;
  --transition-slow: 300ms;

  /* Z-Index */
  --z-dropdown: 10;
  --z-sticky: 20;
  --z-fixed: 30;
  --z-modal-backdrop: 40;
  --z-modal: 50;
  --z-tooltip: 60;
}

/* ========================================
   BASE STYLES
   ======================================== */

body {
  font-family: var(--font-family) !important;
  background-color: var(--background);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   GLASSMORPHISM UTILITIES
   ======================================== */

.glass {
  background: rgba(255, 255, 255, 0.6) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-strong {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.glass-dark {
  background: rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========================================
   BUTTON STYLES
   ======================================== */

.btn-primary,
.btn-success {
  background-color: var(--emerald-600) !important;
  border-color: var(--emerald-600) !important;
  color: #ffffff !important;
  transition: all var(--transition-normal) ease;
}

.btn-primary:hover,
.btn-success:hover {
  background-color: var(--emerald-700) !important;
  border-color: var(--emerald-700) !important;
  transform: translateY(-1px);
}

.btn-primary:focus,
.btn-success:focus {
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.4) !important;
  outline: none;
}

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

.btn-outline-primary:hover {
  background-color: var(--emerald-600) !important;
  border-color: var(--emerald-600) !important;
  color: #ffffff !important;
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.6) !important;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  color: var(--gray-700) !important;
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.8) !important;
}

/* ========================================
   CARD STYLES
   ======================================== */

.card {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-card) !important;
  overflow: hidden;
}

.card-modern {
  background: rgba(255, 255, 255, 0.6) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: var(--radius-xl) !important;
}

.card-header {
  background-color: var(--emerald-600) !important;
  border-bottom: none !important;
  color: #ffffff !important;
  padding: var(--spacing-4) var(--spacing-6) !important;
}

.card-header.custome {
  background: var(--emerald-600) !important;
}

.card-body {
  padding: var(--spacing-6) !important;
}

.card-footer {
  background-color: var(--gray-50) !important;
  border-top: 1px solid var(--border) !important;
  padding: var(--spacing-4) var(--spacing-6) !important;
}

/* ========================================
   HEADER / NAVBAR STYLES
   ======================================== */

nav.main-header.navbar,
.main-header {
  background: rgba(255, 255, 255, 0.5) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}

.navbar-light .navbar-nav .nav-link {
  color: var(--text-primary) !important;
  padding: var(--spacing-2) var(--spacing-3);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal) ease;
}

.navbar-light .navbar-nav .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.6);
  color: var(--text-primary) !important;
}

.navbar-brand {
  font-weight: 600;
  color: var(--text-primary) !important;
}

/* ========================================
   SIDEBAR STYLES
   ======================================== */

.main-sidebar,
.layout-fixed .main-sidebar {
  background: var(--surface) !important;
  border-right: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active,
.sidebar-light-primary .nav-sidebar > .nav-item > .nav-link.active {
  background-color: var(--teal-50) !important;
  color: var(--teal-700) !important;
  border-radius: var(--radius-lg);
  font-weight: 500;
}

.nav-sidebar .nav-link {
  color: var(--text-secondary) !important;
  padding: var(--spacing-3) !important;
  border-radius: var(--radius-lg);
  margin: var(--spacing-1) 0;
  transition: all var(--transition-normal) ease;
}

.nav-sidebar .nav-link:hover {
  background-color: var(--gray-100) !important;
  color: var(--text-primary) !important;
}

.nav-sidebar .nav-link .nav-icon {
  color: var(--text-muted);
  margin-right: var(--spacing-3);
}

.brand-link {
  border-bottom: 1px solid var(--border) !important;
  padding: var(--spacing-4) !important;
}

/* ========================================
   FORM STYLES
   ======================================== */

.form-control {
  border: 1px solid var(--gray-200) !important;
  border-radius: var(--radius-md) !important;
  padding: var(--spacing-2) var(--spacing-3) !important;
  font-size: var(--font-size-sm) !important;
  color: var(--text-primary) !important;
  background-color: var(--surface) !important;
  transition: all var(--transition-normal) ease;
}

.form-control:focus {
  border-color: var(--emerald-500) !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2) !important;
  outline: none !important;
}

.form-control::placeholder {
  color: var(--gray-400) !important;
}

label {
  color: var(--text-secondary) !important;
  font-size: var(--font-size-sm) !important;
  font-weight: 500;
  margin-bottom: var(--spacing-1) !important;
}

.input-group-text {
  background-color: var(--gray-50) !important;
  border: 1px solid var(--gray-200) !important;
  color: var(--text-muted) !important;
}

/* ========================================
   TABLE STYLES
   ======================================== */

.table {
  background-color: var(--surface);
}

.table thead th {
  background-color: var(--gray-50) !important;
  color: var(--text-secondary) !important;
  font-weight: 500 !important;
  font-size: var(--font-size-xs) !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--spacing-3) var(--spacing-4) !important;
  border-bottom: 1px solid var(--border) !important;
}

.table tbody tr {
  transition: background-color var(--transition-fast) ease;
}

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

.table td {
  padding: var(--spacing-4) !important;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border) !important;
  vertical-align: middle !important;
}

/* DataTables specific */
.dataTables_wrapper {
  font-size: var(--font-size-sm) !important;
}

.dataTables_filter input {
  border: 1px solid var(--gray-200) !important;
  border-radius: var(--radius-md) !important;
  padding: var(--spacing-2) var(--spacing-3) !important;
}

.dataTables_filter input:focus {
  border-color: var(--emerald-500) !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2) !important;
  outline: none !important;
}

/* ========================================
   PAGINATION STYLES
   ======================================== */

.page-item.active .page-link {
  background-color: var(--emerald-600) !important;
  border-color: var(--emerald-600) !important;
  color: #ffffff !important;
}

.page-link {
  color: var(--emerald-600) !important;
  border: 1px solid var(--border);
  padding: var(--spacing-2) var(--spacing-3);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal) ease;
}

.page-link:hover {
  background-color: var(--emerald-50) !important;
  border-color: var(--emerald-200) !important;
  color: var(--emerald-700) !important;
}

.ngx-pagination .current {
  background-color: var(--emerald-600) !important;
  border-color: var(--emerald-600) !important;
}

/* ========================================
   BADGE / STATUS STYLES
   ======================================== */

.badge-success,
.bg-success {
  background: var(--emerald-600) !important;
  color: #ffffff !important;
}

.badge-warning,
.bg-warning {
  background-color: var(--warning-bg) !important;
  color: var(--warning-text) !important;
}

.badge-danger,
.bg-danger {
  background-color: var(--danger-bg) !important;
  color: var(--danger-text) !important;
}

.badge-info,
.bg-info {
  background: var(--emerald-500) !important;
  color: #ffffff !important;
}

.status-active {
  background-color: var(--success-bg);
  color: var(--success-text);
  padding: var(--spacing-1) var(--spacing-2);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 500;
}

.status-inactive {
  background-color: var(--danger-bg);
  color: var(--danger-text);
  padding: var(--spacing-1) var(--spacing-2);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 500;
}

.status-pending {
  background-color: var(--warning-bg);
  color: var(--warning-text);
  padding: var(--spacing-1) var(--spacing-2);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 500;
}

/* ========================================
   GRADIENT OVERRIDES (Emerald Theme)
   ======================================== */

.bg-header-color {
  background: linear-gradient(135deg, var(--emerald-600), var(--emerald-700)) !important;
}

.bg-success {
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600)) !important;
}

.bg-success-da {
  background: linear-gradient(135deg, var(--emerald-600), var(--emerald-700)) !important;
}

.bg-info {
  background: linear-gradient(135deg, var(--emerald-400), var(--emerald-500)) !important;
}

.bg-employee-count {
  background: linear-gradient(135deg, var(--teal-500), var(--teal-600)) !important;
}

.bg-penalty-count {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
}

.green-grad {
  background: linear-gradient(135deg, var(--emerald-600), var(--emerald-700)) !important;
}

/* ========================================
   CONTENT WRAPPER
   ======================================== */

.content-wrapper {
  background-color: var(--background) !important;
  min-height: 100vh !important;
}

/* ========================================
   TOP BAR STYLES
   ======================================== */

.top-bar {
  background-color: var(--emerald-600) !important;
  color: #ffffff !important;
}

/* ========================================
   FOOTER STYLES
   ======================================== */

.footer-bg {
  background-color: var(--gray-50) !important;
  border-top: 1px solid var(--border);
}

.copyright-bg {
  background-color: var(--emerald-600) !important;
}

h6.seprator::after {
  background: var(--emerald-600) !important;
}

/* ========================================
   HEADING / ROLE BADGES
   ======================================== */

.paye-heading,
.color-yellow,
.role {
  background: var(--emerald-600) !important;
  color: #ffffff !important;
}

.role-top-bar {
  background: var(--emerald-700) !important;
  color: #ffffff !important;
}

.role-top-bar:hover {
  background: var(--emerald-600) !important;
}

/* ========================================
   SIGN IN / AUTH BUTTONS
   ======================================== */

.social-auth-links button,
a.sign-in,
.yellow-color,
a.btn-yellow-1,
.view-more-2 a,
.yellow-bg-btn {
  background: var(--emerald-600) !important;
  border-color: var(--emerald-600) !important;
  color: #ffffff !important;
}

.social-auth-links button:hover,
a.sign-in:hover,
a.btn-yellow-1:hover {
  background: var(--emerald-700) !important;
  border-color: var(--emerald-700) !important;
}

/* ========================================
   CTA BUTTONS
   ======================================== */

a.cta-makepayment {
  background-color: var(--emerald-600) !important;
  border: 2px solid var(--emerald-600) !important;
  color: #ffffff !important;
  border-radius: var(--radius-lg) !important;
  transition: all var(--transition-normal) ease;
}

a.cta-makepayment:hover {
  background-color: transparent !important;
  color: var(--emerald-600) !important;
  border-color: var(--emerald-600) !important;
}

a.cta-Corporate {
  background-color: var(--emerald-700) !important;
  border: 2px solid var(--emerald-700) !important;
  color: #ffffff !important;
  border-radius: var(--radius-lg) !important;
}

a.cta-Corporate:hover {
  background-color: transparent !important;
  color: var(--emerald-700) !important;
  border-color: var(--emerald-700) !important;
}

/* ========================================
   SERVICE BOXES
   ======================================== */

.service-box {
  background: var(--surface) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-card) !important;
  transition: all var(--transition-slow) ease;
  border: 1px solid var(--border);
}

.service-box:hover {
  background: var(--emerald-600) !important;
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl) !important;
}

/* ========================================
   SUBSCRIBE SECTION
   ======================================== */

.subscribe-bg {
  background: var(--emerald-600) !important;
}

/* ========================================
   LINKS
   ======================================== */

a.view-more,
a.link-view-more-3,
a.link-view-more-4 {
  color: var(--emerald-600) !important;
}

a.admin-link {
  background: var(--emerald-50) !important;
  color: var(--emerald-700) !important;
}

.pagination-server ul li a {
  color: var(--emerald-600) !important;
}

a.footer-link {
  background: var(--emerald-700) !important;
}

a.footer-link:hover {
  background: var(--emerald-800) !important;
}

/* ========================================
   STEPS / WIZARD
   ======================================== */

.steps {
  background-color: var(--emerald-600) !important;
}

.theme-bg {
  background-color: var(--emerald-700) !important;
  color: #ffffff !important;
}

.color-green {
  color: var(--emerald-600) !important;
}

.bg-green {
  background: var(--emerald-600) !important;
}

/* ========================================
   SCROLLBAR STYLES
   ======================================== */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* ========================================
   ALERT / NOTIFICATION STYLES
   ======================================== */

.alert-success {
  background-color: var(--success-bg) !important;
  color: var(--success-text) !important;
  border: 1px solid var(--emerald-200) !important;
  border-radius: var(--radius-lg) !important;
}

.alert-warning {
  background-color: var(--warning-bg) !important;
  color: var(--warning-text) !important;
  border-radius: var(--radius-lg) !important;
}

.alert-danger {
  background-color: var(--danger-bg) !important;
  color: var(--danger-text) !important;
  border-radius: var(--radius-lg) !important;
}

.alert-info {
  background-color: var(--emerald-50) !important;
  color: var(--emerald-800) !important;
  border: 1px solid var(--emerald-200) !important;
  border-radius: var(--radius-lg) !important;
}

/* ========================================
   LOADING SPINNER
   ======================================== */

.spinner,
.loading-spinner {
  border: 3px solid var(--gray-200);
  border-top: 3px solid var(--emerald-600);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ========================================
   MODAL STYLES
   ======================================== */

.modal-content {
  border-radius: var(--radius-xl) !important;
  border: none !important;
  box-shadow: var(--shadow-xl) !important;
}

.modal-header {
  background-color: var(--emerald-600) !important;
  color: #ffffff !important;
  border-bottom: none !important;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0 !important;
  padding: var(--spacing-4) var(--spacing-6) !important;
}

.modal-header .close,
.modal-header .btn-close {
  color: #ffffff !important;
  opacity: 0.8;
}

.modal-header .close:hover,
.modal-header .btn-close:hover {
  opacity: 1;
}

.modal-body {
  padding: var(--spacing-6) !important;
}

.modal-footer {
  border-top: 1px solid var(--border) !important;
  padding: var(--spacing-4) var(--spacing-6) !important;
}

/* ========================================
   DROPDOWN STYLES
   ======================================== */

.dropdown-menu {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-lg) !important;
  padding: var(--spacing-2) !important;
}

.dropdown-item {
  border-radius: var(--radius-md) !important;
  padding: var(--spacing-2) var(--spacing-3) !important;
  color: var(--text-primary) !important;
  transition: all var(--transition-fast) ease;
}

.dropdown-item:hover {
  background-color: var(--emerald-50) !important;
  color: var(--emerald-700) !important;
}

.dropdown-item.active,
.dropdown-item:active {
  background-color: var(--emerald-600) !important;
  color: #ffffff !important;
}

/* ========================================
   ACCORDION / FAQ STYLES
   ======================================== */

.faq-bg-green {
  background: var(--emerald-600) !important;
}

.faq-bg-yellow {
  background: var(--emerald-50) !important;
  color: var(--text-secondary);
}

/* ========================================
   FOCUS STATES (Accessibility)
   ======================================== */

*:focus-visible {
  outline: 2px solid var(--emerald-500) !important;
  outline-offset: 2px;
}

/* ========================================
   UTILITIES
   ======================================== */

.text-emerald {
  color: var(--emerald-600) !important;
}

.bg-emerald {
  background-color: var(--emerald-600) !important;
}

.border-emerald {
  border-color: var(--emerald-600) !important;
}

.hover-lift {
  transition: transform var(--transition-normal) ease, box-shadow var(--transition-normal) ease;
}

.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
  .card-body {
    padding: var(--spacing-4) !important;
  }

  .modal-body {
    padding: var(--spacing-4) !important;
  }

  h1 {
    font-size: var(--font-size-2xl) !important;
  }
}
