:root {
  --primary: #0a84ff;
  --primary-dark: #003b73;
  --accent: #e6f2ff;
  --text-dark: #1a1a1a;
  --text-muted: #6b7280;
}

body {
  font-family: "Inter", sans-serif;
  background: #f4f8fc;
  color: var(--text-dark);
  min-height: 100vh;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  width: 260px;
  background: linear-gradient(135deg, var(--primary-dark) 0%, #004a94 50%, var(--primary-dark) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  padding: 24px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.app-sidebar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,50 Q25,30 50,50 T100,50 L100,100 L0,100 Z' fill='rgba(255,255,255,0.03)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  animation: wave 20s linear infinite;
  pointer-events: none;
  z-index: 0;
}

.app-sidebar > * {
  position: relative;
  z-index: 1;
}

@keyframes wave {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 200px 200px;
  }
}

.logo-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 20px;
}

.sidebar-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-icon {
  background: var(--primary);
  color: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
}

.logo-title {
  font-weight: 600;
  margin: 0;
  color: #fff;
  font-size: 16px;
  line-height: 1.2;
}

.logo-subtitle {
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  font-size: 11px;
  line-height: 1.2;
}

.app-sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  margin-bottom: 6px;
  transition: all 0.2s ease;
}

.app-sidebar .nav-link.active,
.app-sidebar .nav-link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #004a94 50%, var(--primary-dark) 100%);
  color: #fff;
  padding: 18px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.app-topbar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,50 Q25,30 50,50 T100,50 L100,100 L0,100 Z' fill='rgba(255,255,255,0.03)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  animation: wave 20s linear infinite;
  pointer-events: none;
  z-index: 0;
}

.app-topbar > * {
  position: relative;
  z-index: 1;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1000;
}


.app-topbar .dropdown {
  position: relative;
  z-index: 1000;
}

.app-topbar .dropdown-menu {
  margin-top: 8px;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 8px 0;
  min-width: 200px;
}

.app-topbar .dropdown-item {
  padding: 10px 20px;
  transition: all 0.2s ease;
}

.app-topbar .dropdown-item:hover {
  background-color: #f8f9fa;
  color: var(--primary);
}

.app-topbar .dropdown-item-text {
  padding: 8px 20px;
  font-size: 12px;
}

.app-topbar .dropdown-divider {
  margin: 8px 0;
}

.app-topbar .btn-outline-light {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.app-topbar .btn-outline-light:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.app-topbar .btn-outline-light:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

.page-heading {
  font-size: 20px;
  font-weight: 600;
}

.app-content {
  padding: 32px;
  flex: 1;
}

.stat-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 18px;
  color: #fff;
  padding: 24px;
  min-height: 140px;
}

.stat-label {
  letter-spacing: 1px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.stat-value {
  font-size: 32px;
  margin: 0;
}

.stat-icon {
  font-size: 28px;
  opacity: 0.8;
}

.stat-subtext {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.8);
}

.timeline {
  border-left: 2px solid #e5e7eb;
  padding-left: 18px;
}

.timeline-item {
  position: relative;
  padding: 12px 0;
}

.timeline-item::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  position: absolute;
  left: -23px;
  top: 18px;
}

.fab-btn {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 10px 20px rgba(10, 132, 255, 0.3);
  text-decoration: none;
  z-index: 100;
  transition: all 0.3s ease;
  border: none;
}

.fab-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
  box-shadow: 0 12px 24px rgba(10, 132, 255, 0.4);
  color: #fff;
}

/* ============================================
   GLOBAL BUTTON STYLING - Applied Throughout
   ============================================ */

.btn {
  border-radius: 10px;
  font-weight: 500;
  font-size: 14px;
  padding: 10px 20px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.5;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.25);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Primary Button (Blue) */
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(10, 132, 255, 0.3);
}

.btn-primary:active {
  background: #003b73;
  transform: translateY(0);
}

/* Secondary/Light Button (White/Cancel) */
.btn-secondary,
.btn-light {
  background: #fff;
  border-color: #e5e7eb;
  color: var(--text-dark);
}

.btn-secondary:hover,
.btn-light:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  color: var(--text-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-secondary:active,
.btn-light:active {
  background: #f3f4f6;
  transform: translateY(0);
}

/* Outline Primary */
.btn-outline-primary {
  background: #fff;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline-primary:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(10, 132, 255, 0.2);
}

.btn-outline-primary:active {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(0);
}

/* Outline Secondary */
.btn-outline-secondary {
  background: #fff;
  border-color: #6b7280;
  color: #6b7280;
}

.btn-outline-secondary:hover {
  background: #6b7280;
  border-color: #6b7280;
  color: #fff;
  transform: translateY(-1px);
}

/* Success Button */
.btn-success,
.btn-outline-success {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

.btn-outline-success {
  background: #fff;
  color: #16a34a;
}

.btn-success:hover,
.btn-outline-success:hover {
  background: #15803d;
  border-color: #15803d;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.btn-outline-success:hover {
  background: #15803d;
  color: #fff;
}

/* Danger Button */
.btn-danger,
.btn-outline-danger {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

.btn-outline-danger {
  background: #fff;
  color: #dc2626;
}

.btn-danger:hover,
.btn-outline-danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-outline-danger:hover {
  background: #b91c1c;
  color: #fff;
}

/* Warning Button */
.btn-warning,
.btn-outline-warning {
  background: #ea580c;
  border-color: #ea580c;
  color: #fff;
}

.btn-outline-warning {
  background: #fff;
  color: #ea580c;
}

.btn-warning:hover,
.btn-outline-warning:hover {
  background: #c2410c;
  border-color: #c2410c;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

.btn-outline-warning:hover {
  background: #c2410c;
  color: #fff;
}

/* Button Sizes */
.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 8px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: 12px;
}

/* Button in Cards - Full Width (only in grid layouts) */
.card-body .d-grid .btn {
  width: 100%;
  justify-content: flex-start;
}

/* Buttons in flex containers should not stretch */
.d-flex .btn,
.modal-footer .btn {
  width: auto;
  min-width: 120px;
  justify-content: center;
}

/* Form Buttons - Side by Side */
.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
}

.modal-footer .btn {
  margin: 0;
}

/* Quick Actions Button Styling */
.card-body .d-grid.gap-2 {
  gap: 12px !important;
}

.auth-body {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.auth-body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,50 Q25,30 50,50 T100,50 L100,100 L0,100 Z' fill='rgba(255,255,255,0.03)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  animation: wave 20s linear infinite;
  pointer-events: none;
}

.auth-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 450px;
  padding: 20px;
}

.auth-card {
  background: #fff;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.auth-logo {
  max-width: 120px;
  height: auto;
  object-fit: contain;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.15em;
  font-weight: 600;
}

.payroll-hero {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  padding: 32px;
  border-radius: 24px;
  background: linear-gradient(120deg, #ffffff, #f0f6ff);
  border: 1px solid #e5e7eb;
}

.payroll-hero__body {
  flex: 1;
}

.payroll-hero__stats {
  display: flex;
  gap: 16px;
  min-width: 320px;
}

.payroll-stat {
  background: #fff;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  padding: 18px 20px;
  min-width: 150px;
}

.payroll-stat .label {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.payroll-stat strong {
  display: block;
  font-size: 24px;
  margin-top: 4px;
}

.payroll-stat small {
  color: var(--text-muted);
}

.payroll-alert {
  border-radius: 16px;
  padding: 16px 20px;
}

.payroll-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.payroll-nav {
  width: 280px;
  border-radius: 20px;
  border: 1px solid #e5e7eb;
  padding: 20px;
  position: sticky;
  top: 90px;
}

.payroll-nav .nav-label {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}

.payroll-nav-btn {
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 12px 14px;
  width: 100%;
  text-align: left;
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
  background: transparent;
  transition: all 0.2s ease;
}

.payroll-nav-btn:hover {
  border-color: #dbeafe;
  background: #f8fbff;
}

.payroll-nav-btn.active {
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(10, 132, 255, 0.15);
  background: var(--accent);
}

.nav-step {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  background: #e5e7eb;
  color: var(--text-muted);
}

.payroll-nav-btn.active .nav-step {
  background: var(--primary);
  color: #fff;
}

.payroll-panels {
  flex: 1;
}

.payroll-module {
  display: none;
}

.payroll-module.active {
  display: block;
  animation: fadeSlideIn 0.25s ease;
}

.module-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.module-card {
  border-radius: 20px;
  overflow: hidden;
}

.module-insight {
  text-align: right;
}

.callout {
  border-radius: 14px;
  padding: 16px 18px;
  border-left: 4px solid var(--primary);
  background: #eff6ff;
}

.callout-success {
  border-left-color: #16a34a;
  background: #ecfdf5;
  color: #166534;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 992px) {
  .app-sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    transition: left 0.3s ease;
    z-index: 1000;
  }

  .app-sidebar.open {
    left: 0;
  }

  .app-content {
    padding: 20px;
  }

  .fab-btn {
    right: 16px;
    bottom: 16px;
  }

  .payroll-hero {
    flex-direction: column;
  }

  .payroll-hero__stats {
    width: 100%;
    flex-direction: column;
  }

  .payroll-layout {
    flex-direction: column;
  }

  .payroll-nav {
    position: static;
    width: 100%;
  }

  .module-header {
    flex-direction: column;
  }
}

@media (max-width: 576px) {
  .payroll-nav-btn {
    flex-wrap: wrap;
  }

  .nav-step {
    margin-bottom: 6px;
  }
}
