@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ============================================================================
   APEX HRM - CENTRALIZED DESIGN SYSTEM & STYLING
   Single source of truth for colors, themes, typography, and UI tokens
   (Modeled like Android res/values/colors.xml and styles.xml)
   ============================================================================ */

:root {
  /* ==========================================================================
     1. CORE BRAND COLOR TOKENS (User Specified Palette)
     Change these colors here to instantly change the entire application!
     ========================================================================== */
  --hrm-primary: #166fe5;          /* Vibrant Royal Blue */
  --hrm-primary-dark: #0f56bc;     /* Hover state */
  --hrm-primary-deep: #082048;     /* Midnight Navy */
  --hrm-primary-light: #166fe5;    /* Sky tint */
  --hrm-primary-lighter: #166fe5;  /* Accent tint */
  --hrm-secondary: #00b4f8;        /* Electric Cyan / Azure */
  --hrm-secondary-dark: #0284c7;   /* Secondary Hover */

  /* RGB equivalents for dynamic opacity & alpha blending */
  --hrm-primary-rgb: 22, 111, 229;
  --hrm-primary-dark-rgb: 15, 86, 188;
  --hrm-primary-deep-rgb: 8, 32, 72;
  --hrm-secondary-rgb: 0, 180, 248;

  /* Subtle Alpha Tints & Glows */
  --hrm-primary-subtle: rgba(var(--hrm-primary-rgb), 0.1);
  --hrm-primary-subtle-border: rgba(var(--hrm-primary-rgb), 0.25);
  --hrm-secondary-subtle: rgba(var(--hrm-secondary-rgb), 0.12);
  --hrm-secondary-subtle-border: rgba(var(--hrm-secondary-rgb), 0.3);
  --hrm-deep-subtle: rgba(var(--hrm-primary-deep-rgb), 0.08);
  --hrm-cyan-glow: rgba(0, 180, 248, 0.45);

  /* ==========================================================================
     2. UNIFIED PORTAL THEMES (Super Admin, Company Admin, Employee / User)
     All three portals share the centralized brand identity!
     ========================================================================== */
  /* Entity / Super Admin Module (/apex-hrm/entity) */
  --entity-primary: var(--hrm-primary-deep);
  --entity-secondary: var(--hrm-primary-dark);
  --entity-accent: var(--hrm-secondary);
  --entity-accent-hover: var(--hrm-secondary-dark);
  --entity-navbar-bg: linear-gradient(135deg, var(--hrm-primary-deep) 0%, var(--hrm-primary) 100%);
  --entity-footer-bg: var(--hrm-primary-deep);

  /* Company Admin Module (/apex-hrm/admin) */
  --company-primary: var(--hrm-primary);
  --company-primary-dark: var(--hrm-primary-dark);
  --company-primary-deep: var(--hrm-primary-deep);
  --company-accent: var(--hrm-secondary);
  --company-navbar-bg: linear-gradient(135deg, var(--hrm-primary-deep) 0%, var(--hrm-primary) 100%);
  --company-footer-bg: var(--hrm-primary-deep);

  /* Employee / User Module (/apex-hrm/user) */
  --user-primary: var(--hrm-primary);
  --user-primary-dark: var(--hrm-primary-dark);
  --user-primary-deep: var(--hrm-primary-deep);
  --user-accent: var(--hrm-secondary);
  --user-navbar-bg: linear-gradient(135deg, var(--hrm-primary-deep) 0%, var(--hrm-primary) 100%);
  --user-footer-bg: var(--hrm-primary-deep);

  /* ==========================================================================
     3. CENTRALIZED GRADIENTS & HERO THEMES
     ========================================================================== */
  --hrm-brand-gradient: linear-gradient(135deg, var(--hrm-primary-deep) 0%, var(--hrm-primary) 60%, var(--hrm-secondary) 100%);
  --hrm-hero-gradient: linear-gradient(135deg, var(--hrm-primary-deep) 0%, var(--hrm-primary) 100%);
  --hrm-accent-gradient: linear-gradient(135deg, var(--hrm-primary) 0%, var(--hrm-secondary) 100%);
  --hrm-page-gradient: linear-gradient(180deg, #f0f4f9 0%, #ffffff 100%);
  --hrm-auth-gradient: linear-gradient(135deg, var(--hrm-primary-deep) 0%, var(--hrm-primary) 100%);
  --hrm-navy-gradient: linear-gradient(135deg, var(--hrm-primary-deep) 0%, var(--hrm-primary-dark) 100%);

  /* ==========================================================================
     4. SEMANTIC STATUS & ACCENT COLORS
     ========================================================================== */
  --hrm-success: #10b981;
  --hrm-warning: #f59e0b;
  --hrm-danger: #ef4444;
  --hrm-info: var(--hrm-secondary);

  /* ==========================================================================
     5. NEUTRALS, SURFACES & BORDERS
     ========================================================================== */
  --hrm-dark: var(--hrm-primary-deep);
  --hrm-slate-900: #0f172a;
  --hrm-slate-800: #1e293b;
  --hrm-slate-700: #334155;
  --hrm-slate-600: #475569;
  --hrm-slate-500: #64748b;
  --hrm-slate-400: #94a3b8;
  --hrm-slate-300: #cbd5e1;
  --hrm-slate-200: #e2e8f0;
  --hrm-slate-100: #f1f5f9;
  --hrm-slate-50: #f8fafc;

  --hrm-body-bg: #f8fafc;
  --hrm-surface: #ffffff;
  --hrm-border: #e2e8f0;
  --hrm-border-focus: var(--hrm-primary);

  /* ==========================================================================
     6. TYPOGRAPHY
     ========================================================================== */
  --hrm-font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --hrm-font-heading: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --hrm-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --bs-body-font-family: var(--hrm-font-family);

  --hrm-fw-normal: 400;
  --hrm-fw-medium: 500;
  --hrm-fw-semibold: 600;
  --hrm-fw-bold: 700;
  --hrm-fw-extrabold: 800;

  --hrm-fs-xs: 0.75rem;
  --hrm-fs-sm: 0.875rem;
  --hrm-fs-base: 1rem;
  --hrm-fs-md: 1.125rem;
  --hrm-fs-lg: 1.25rem;
  --hrm-fs-xl: 1.5rem;
  --hrm-fs-2xl: 2rem;
  --hrm-fs-3xl: 2.75rem;

  /* ==========================================================================
     7. SHADOWS & RADIUS
     ========================================================================== */
  --hrm-radius-sm: 6px;
  --hrm-radius-md: 10px;
  --hrm-radius-lg: 16px;
  --hrm-radius-xl: 24px;
  --hrm-radius-pill: 9999px;

  --hrm-shadow-sm: 0 1px 3px rgba(8, 32, 72, 0.08);
  --hrm-shadow-md: 0 4px 12px rgba(8, 32, 72, 0.08);
  --hrm-shadow-lg: 0 10px 25px -5px rgba(8, 32, 72, 0.1);
  --hrm-card-shadow: 0 10px 25px -5px rgba(8, 32, 72, 0.06), 0 8px 10px -6px rgba(8, 32, 72, 0.03);
  --hrm-elevated-shadow: 0 20px 30px -10px rgba(var(--hrm-primary-rgb), 0.22), 0 10px 15px -5px rgba(8, 32, 72, 0.05);
}

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

body {
  font-family: var(--hrm-font-family);
  color: var(--hrm-slate-700);
  background-color: var(--hrm-body-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

button, input, optgroup, select, textarea {
  font-family: var(--hrm-font-family);
}

main {
  flex: 1;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--hrm-font-heading);
  color: var(--hrm-primary-deep);
  font-weight: var(--hrm-fw-bold);
}

a {
  color: var(--hrm-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--hrm-primary-dark);
}

/* ============================================================================
   REUSABLE THEME COMPONENT STYLES (Like Android res/values/styles.xml)
   ============================================================================ */

/* ----------------------------------------------------------------------------
   1. Page Containers & Backgrounds
   ---------------------------------------------------------------------------- */
.portal-page-container {
  background: var(--hrm-page-gradient);
  min-height: 90vh;
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
}

.portal-auth-container {
  background: var(--hrm-auth-gradient);
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.portal-header-banner {
  background: var(--hrm-hero-gradient);
  color: #ffffff;
  border-radius: var(--hrm-radius-lg);
  overflow: hidden;
  box-shadow: var(--hrm-shadow-md);
  margin-bottom: 1.5rem;
}

.portal-auth-card-header {
  background: var(--hrm-hero-gradient);
  color: #ffffff;
  padding: 1.5rem;
  text-align: center;
}

/* ----------------------------------------------------------------------------
   2. Navbars (Entity, Company, User all unified)
   ---------------------------------------------------------------------------- */
.navbar-custom {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hrm-border);
  box-shadow: 0 2px 10px rgba(8, 32, 72, 0.04);
  padding: 0.75rem 1rem;
}

.navbar-brand-custom {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: var(--hrm-fw-bold);
  font-size: var(--hrm-fs-lg);
  color: var(--hrm-primary-deep);
  text-decoration: none;
}

.brand-logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.navbar-brand-custom:hover .brand-logo-img {
  transform: scale(1.06);
}

.nav-link-custom {
  color: var(--hrm-slate-600);
  font-weight: var(--hrm-fw-semibold);
  font-size: 0.95rem;
  padding: 0.5rem 0.95rem !important;
  border-radius: var(--hrm-radius-sm);
  transition: all 0.2s ease;
}

.nav-link-custom:hover, .nav-link-custom.active {
  color: var(--hrm-primary);
  background-color: var(--hrm-primary-subtle);
}

/* Portal Navbars (Entity, Company Admin, and User) */
.entity-navbar,
.company-navbar,
.user-navbar {
  background: var(--hrm-hero-gradient);
  box-shadow: 0 4px 14px rgba(8, 32, 72, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.entity-brand,
.company-brand,
.user-brand {
  font-weight: var(--hrm-fw-extrabold);
  letter-spacing: -0.02em;
  color: #ffffff !important;
  font-size: var(--hrm-fs-lg);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.entity-nav-link,
.company-nav-link,
.user-nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
  font-weight: var(--hrm-fw-medium);
  padding: 0.45rem 0.8rem !important;
  border-radius: var(--hrm-radius-sm);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.92rem;
}

.entity-nav-link:hover, .entity-nav-link.active,
.company-nav-link:hover, .company-nav-link.active,
.user-nav-link:hover, .user-nav-link.active {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.16);
}

.company-dropdown-menu {
  border: 0;
  box-shadow: var(--hrm-shadow-lg);
  border-radius: var(--hrm-radius-md);
  padding: 0.5rem;
}

.company-dropdown-item {
  border-radius: var(--hrm-radius-sm);
  padding: 0.5rem 0.85rem;
  font-weight: var(--hrm-fw-medium);
  font-size: 0.88rem;
  color: var(--hrm-slate-700);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.company-dropdown-item:hover {
  background-color: var(--hrm-primary-subtle);
  color: var(--hrm-primary);
}

/* ----------------------------------------------------------------------------
   3. Buttons & Variants (All portals inherit centrally)
   ---------------------------------------------------------------------------- */
.btn-brand-primary,
.btn-primary-custom,
.btn-primary,
.btn-company,
.btn-entity,
.btn-user {
  background: var(--hrm-primary);
  color: #ffffff !important;
  border: 1px solid var(--hrm-primary);
  font-weight: var(--hrm-fw-semibold);
  border-radius: var(--hrm-radius-md);
  padding: 0.6rem 1.3rem;
  box-shadow: 0 4px 12px rgba(var(--hrm-primary-rgb), 0.28);
  transition: all 0.2s ease;
}

.btn-brand-primary:hover,
.btn-primary-custom:hover,
.btn-primary:hover,
.btn-company:hover,
.btn-entity:hover,
.btn-user:hover {
  background: var(--hrm-primary-dark) !important;
  border-color: var(--hrm-primary-dark) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(var(--hrm-primary-rgb), 0.38);
}

.btn-brand-secondary,
.btn-teal {
  background: var(--hrm-secondary);
  color: #ffffff !important;
  border: 1px solid var(--hrm-secondary);
  font-weight: var(--hrm-fw-semibold);
  border-radius: var(--hrm-radius-md);
  padding: 0.6rem 1.3rem;
  box-shadow: 0 4px 12px rgba(var(--hrm-secondary-rgb), 0.25);
  transition: all 0.2s ease;
}

.btn-brand-secondary:hover,
.btn-teal:hover {
  background: var(--hrm-secondary-dark) !important;
  border-color: var(--hrm-secondary-dark) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

.btn-brand-deep {
  background: var(--hrm-primary-deep);
  color: #ffffff !important;
  border: 1px solid var(--hrm-primary-deep);
  font-weight: var(--hrm-fw-semibold);
  border-radius: var(--hrm-radius-md);
  padding: 0.6rem 1.3rem;
  transition: all 0.2s ease;
}

.btn-brand-deep:hover {
  background: var(--hrm-primary-dark) !important;
  border-color: var(--hrm-primary-dark) !important;
  color: #ffffff !important;
}

.btn-brand-outline {
  background: transparent;
  color: var(--hrm-primary) !important;
  border: 1px solid var(--hrm-primary);
  font-weight: var(--hrm-fw-semibold);
  border-radius: var(--hrm-radius-md);
  padding: 0.6rem 1.3rem;
  transition: all 0.2s ease;
}

.btn-brand-outline:hover {
  background: var(--hrm-primary);
  color: #ffffff !important;
}

.btn-brand-outline-light {
  background: transparent;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.5);
  font-weight: var(--hrm-fw-semibold);
  border-radius: var(--hrm-radius-md);
  padding: 0.6rem 1.3rem;
  transition: all 0.2s ease;
}

.btn-brand-outline-light:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #ffffff;
  color: #ffffff !important;
}

.btn-brand-light {
  background: #ffffff;
  color: var(--hrm-primary) !important;
  border: 1px solid transparent;
  font-weight: var(--hrm-fw-semibold);
  border-radius: var(--hrm-radius-md);
  padding: 0.6rem 1.3rem;
  box-shadow: var(--hrm-shadow-sm);
  transition: all 0.2s ease;
}

.btn-brand-light:hover {
  background: #f8fafc;
  color: var(--hrm-primary-dark) !important;
  transform: translateY(-1px);
}

.btn-secondary-custom {
  background: #ffffff;
  color: var(--hrm-primary-deep);
  border: 1px solid var(--hrm-border);
  font-weight: var(--hrm-fw-semibold);
  padding: 0.65rem 1.4rem;
  border-radius: var(--hrm-radius-md);
  transition: all 0.2s ease;
}

.btn-secondary-custom:hover {
  background: var(--hrm-slate-100);
  color: var(--hrm-primary);
  border-color: var(--hrm-slate-300);
}

/* ----------------------------------------------------------------------------
   4. Badges & Labels (All portals inherit)
   ---------------------------------------------------------------------------- */
.badge-brand-primary {
  background: var(--hrm-primary-subtle) !important;
  color: var(--hrm-primary) !important;
  border: 1px solid var(--hrm-primary-subtle-border);
}

.badge-brand-secondary {
  background: var(--hrm-secondary-subtle) !important;
  color: var(--hrm-secondary) !important;
  border: 1px solid var(--hrm-secondary-subtle-border);
}

.badge-brand-deep {
  background: var(--hrm-deep-subtle) !important;
  color: var(--hrm-primary-deep) !important;
}

.badge-brand-white {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.entity-badge-super {
  background: rgba(239, 68, 68, 0.18);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.35);
  font-size: var(--hrm-fs-xs);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: var(--hrm-fw-bold);
  padding: 0.25rem 0.6rem;
  border-radius: var(--hrm-radius-pill);
}

/* ----------------------------------------------------------------------------
   5. Icons & Icon Boxes (All portals inherit)
   ---------------------------------------------------------------------------- */
.brand-icon-primary {
  background: var(--hrm-primary-subtle) !important;
  color: var(--hrm-primary) !important;
}

.brand-icon-secondary {
  background: var(--hrm-secondary-subtle) !important;
  color: var(--hrm-secondary) !important;
}

.brand-icon-deep {
  background: var(--hrm-deep-subtle) !important;
  color: var(--hrm-primary-deep) !important;
}

.brand-icon-white {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}

/* ----------------------------------------------------------------------------
   6. Text & Background Utility Tokens
   ---------------------------------------------------------------------------- */
.text-brand-primary {
  color: var(--hrm-primary) !important;
}

.text-brand-dark {
  color: var(--hrm-primary-dark) !important;
}

.text-brand-deep {
  color: var(--hrm-primary-deep) !important;
}

.text-brand-secondary {
  color: var(--hrm-secondary) !important;
}

.bg-brand-primary {
  background-color: var(--hrm-primary) !important;
}

.bg-brand-deep {
  background-color: var(--hrm-primary-deep) !important;
}

.bg-brand-secondary {
  background-color: var(--hrm-secondary) !important;
}

.bg-brand-gradient {
  background: var(--hrm-brand-gradient) !important;
}

.bg-hero-gradient {
  background: var(--hrm-hero-gradient) !important;
}

.bg-accent-gradient {
  background: var(--hrm-accent-gradient) !important;
}

/* ----------------------------------------------------------------------------
   7. Attendance & Calendar Matrix Utility Classes
   ---------------------------------------------------------------------------- */
.badge-att-holiday {
  background-color: var(--hrm-secondary-subtle) !important;
  color: var(--hrm-primary) !important;
  border: 1px solid var(--hrm-secondary-subtle-border);
}

.att-stat-present {
  background-color: rgba(16, 185, 129, 0.15) !important;
  color: #15803d !important;
}

.att-stat-absent {
  background-color: rgba(239, 68, 68, 0.15) !important;
  color: #b91c1c !important;
}

.att-stat-leave {
  background-color: rgba(245, 158, 11, 0.15) !important;
  color: #b45309 !important;
}

.att-stat-holiday {
  background-color: var(--hrm-secondary-subtle) !important;
  color: var(--hrm-primary) !important;
}

.att-cell-present {
  background-color: rgba(16, 185, 129, 0.15) !important;
  color: #15803d !important;
  font-weight: bold;
}

.att-cell-absent {
  background-color: rgba(239, 68, 68, 0.15) !important;
  color: #b91c1c !important;
  font-weight: bold;
}

.att-cell-leave {
  background-color: rgba(245, 158, 11, 0.15) !important;
  color: #b45309 !important;
  font-weight: bold;
}

.att-cell-holiday {
  background-color: var(--hrm-secondary-subtle) !important;
  color: var(--hrm-primary) !important;
  font-weight: bold;
}

.att-cell-weekoff {
  background-color: var(--hrm-slate-100) !important;
  color: var(--hrm-slate-600) !important;
}

.att-cell-default {
  color: var(--hrm-slate-400) !important;
}

/* ----------------------------------------------------------------------------
   7. Forms & Inputs
   ---------------------------------------------------------------------------- */
.form-label-custom {
  font-weight: var(--hrm-fw-semibold);
  font-size: var(--hrm-fs-sm);
  color: var(--hrm-slate-700);
  margin-bottom: 0.35rem;
}

.form-control-custom, .form-select-custom {
  border: 1px solid var(--hrm-slate-300);
  border-radius: var(--hrm-radius-md);
  padding: 0.65rem 0.95rem;
  font-size: 0.95rem;
  color: var(--hrm-slate-900);
  background-color: #ffffff;
  transition: all 0.2s ease;
}

.form-control-custom:focus, .form-select-custom:focus {
  border-color: var(--hrm-primary);
  box-shadow: 0 0 0 3px rgba(var(--hrm-primary-rgb), 0.18);
  outline: none;
}

.input-icon-group {
  position: relative;
}

.input-icon-group i.field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--hrm-slate-400);
  font-size: 1.05rem;
  pointer-events: none;
}

.input-icon-group .form-control-custom {
  padding-left: 2.6rem;
}

/* ----------------------------------------------------------------------------
   8. Cards, Metric Boxes & Tables
   ---------------------------------------------------------------------------- */
.hrm-card,
.portal-card {
  background: var(--hrm-surface);
  border: 1px solid var(--hrm-border);
  border-radius: var(--hrm-radius-lg);
  box-shadow: var(--hrm-card-shadow);
  padding: 1.75rem;
  transition: all 0.25s ease;
}

.hrm-metric-card,
.portal-metric-card {
  background: var(--hrm-surface);
  border: 1px solid var(--hrm-border);
  border-radius: var(--hrm-radius-lg);
  box-shadow: var(--hrm-card-shadow);
  padding: 1.25rem 1.5rem;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hrm-metric-card:hover,
.portal-metric-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--hrm-elevated-shadow);
}

.plan-card {
  background: var(--hrm-surface);
  border: 1px solid var(--hrm-border);
  border-radius: var(--hrm-radius-lg);
  padding: 2rem 1.75rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--hrm-card-shadow);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.plan-card:hover {
  transform: translateY(-5px);
  border-color: var(--hrm-primary);
  box-shadow: var(--hrm-elevated-shadow);
}

.plan-card.featured {
  border: 2px solid var(--hrm-primary);
  background: linear-gradient(180deg, var(--hrm-primary-subtle) 0%, #ffffff 28%);
  box-shadow: 0 15px 35px -5px rgba(var(--hrm-primary-rgb), 0.18);
}

.plan-badge-top {
  position: absolute;
  top: -13px;
  right: 24px;
  background: var(--hrm-brand-gradient);
  color: #ffffff;
  font-size: var(--hrm-fs-xs);
  font-weight: var(--hrm-fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.28rem 0.85rem;
  border-radius: var(--hrm-radius-pill);
  box-shadow: 0 4px 10px rgba(var(--hrm-primary-rgb), 0.32);
}

.plan-price-val {
  font-size: var(--hrm-fs-3xl);
  font-weight: var(--hrm-fw-extrabold);
  color: var(--hrm-primary-deep);
  letter-spacing: -0.02em;
}

.plan-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.92rem;
  color: var(--hrm-slate-600);
  margin-bottom: 0.75rem;
}

.plan-feature-item i {
  color: var(--hrm-primary);
  font-size: 1.05rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.onboard-card {
  background: var(--hrm-surface);
  border: 1px solid var(--hrm-border);
  border-radius: var(--hrm-radius-lg);
  box-shadow: var(--hrm-card-shadow);
  padding: 2.25rem;
}

.hrm-table {
  width: 100%;
  margin-bottom: 0;
}

.hrm-table thead th {
  background-color: var(--hrm-slate-50);
  color: var(--hrm-slate-500);
  font-size: var(--hrm-fs-xs);
  font-weight: var(--hrm-fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--hrm-border);
  padding: 0.75rem 1rem;
}

.hrm-table tbody td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--hrm-border);
}

/* ----------------------------------------------------------------------------
   9. Hero Section & Landing Styles
   ---------------------------------------------------------------------------- */
.hero-wrapper {
  background: radial-gradient(circle at 10% 20%, rgba(var(--hrm-primary-rgb), 0.08) 0%, rgba(var(--hrm-secondary-rgb), 0.04) 40%, rgba(248, 250, 252, 1) 85%);
  padding: 4.5rem 1rem 3.5rem;
  border-bottom: 1px solid #edf2f7;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.38rem 0.95rem;
  background: var(--hrm-primary-subtle);
  border: 1px solid var(--hrm-primary-subtle-border);
  border-radius: var(--hrm-radius-pill);
  color: var(--hrm-primary);
  font-size: 0.84rem;
  font-weight: var(--hrm-fw-semibold);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 3rem;
  font-weight: var(--hrm-fw-extrabold);
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--hrm-primary-deep);
}

.hero-gradient-text {
  background: var(--hrm-brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: var(--hrm-fs-md);
  color: var(--hrm-slate-600);
  line-height: 1.6;
}

.order-summary-box {
  background: var(--hrm-surface);
  border: 1px solid var(--hrm-border);
  border-radius: var(--hrm-radius-lg);
  padding: 1.75rem;
  box-shadow: var(--hrm-card-shadow);
  position: sticky;
  top: 90px;
}

.success-check-badge {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--hrm-primary-subtle);
  color: var(--hrm-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 1.5rem;
  box-shadow: 0 0 0 10px rgba(var(--hrm-primary-rgb), 0.08);
}

.credential-pill {
  background: var(--hrm-slate-50);
  border: 1px solid var(--hrm-border);
  border-radius: var(--hrm-radius-sm);
  padding: 0.5rem 0.75rem;
  font-family: var(--hrm-font-mono);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ----------------------------------------------------------------------------
   10. Footers
   ---------------------------------------------------------------------------- */
.footer-custom {
  background: var(--hrm-surface);
  border-top: 1px solid var(--hrm-border);
  padding: 2.5rem 1rem 1.5rem;
  color: var(--hrm-slate-500);
  font-size: 0.9rem;
}

.footer-custom a:hover {
  color: var(--hrm-primary) !important;
}

.entity-footer,
.company-footer,
.user-footer {
  margin-top: auto;
  background: var(--hrm-primary-deep);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.25rem 0;
}

.entity-footer a:hover,
.company-footer a:hover,
.user-footer a:hover {
  color: #ffffff !important;
  text-decoration: underline !important;
}

/* ==========================================================================
   TABLE DROPDOWN & OVERFLOW FIX
   Ensures table action dropdowns (e.g. Manage buttons) are not clipped by
   table-responsive or card overflow containers.
   ========================================================================== */
.table-responsive {
  min-height: 240px;
}

.table-responsive .dropdown-menu {
  z-index: 1060 !important;
}

/* ==========================================================================
   PASSWORD VISIBILITY TOGGLE
   Styling for the eye toggle icon button in password input groups
   ========================================================================== */
.toggle-password-btn {
  border-color: #dee2e6;
  background-color: #f8fafc;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem 0.75rem;
  transition: all 0.15s ease-in-out;
  border-top-right-radius: 0.375rem !important;
  border-bottom-right-radius: 0.375rem !important;
}

.toggle-password-btn:hover {
  background-color: #f1f5f9 !important;
  color: var(--hrm-primary, #166fe5);
  border-color: #cbd5e1;
}

.toggle-password-btn:focus,
.toggle-password-btn:active {
  box-shadow: none !important;
  border-color: #94a3b8;
  outline: none;
}

/* ==========================================================================
   COMPREHENSIVE RESPONSIVE DESIGN SYSTEM
   Mobile (<576px), Tablet (576px - 991px), Desktop (992px+)
   Optimizes layouts, typography, spacing, navigation, forms, modals, tables,
   buttons, and cards while eliminating horizontal overflows and clipping.
   ========================================================================== */

/* 1. Global Viewport & Overflow Safeguards */
html,
body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  -webkit-text-size-adjust: 100%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  max-width: 100%;
  height: auto;
}

table {
  max-width: 100%;
}

/* Ensure long words, URLs, codes, and IDs wrap instead of overflowing */
.text-break-word,
code,
pre,
.font-monospace {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Modern smooth horizontal scrolling with subtle visual scrollbar for tables */
.table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.table-responsive::-webkit-scrollbar {
  height: 6px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: var(--hrm-slate-300);
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-track {
  background: var(--hrm-slate-100);
}

/* 2. Fluid Typography Scales */
.hero-title {
  font-size: clamp(1.85rem, 5.5vw, 3rem);
  line-height: 1.15;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.125rem);
  line-height: 1.6;
}

.display-5 {
  font-size: clamp(1.65rem, 4.5vw, 2.75rem) !important;
}

.display-6 {
  font-size: clamp(1.4rem, 3.8vw, 2.25rem) !important;
}

/* 3. Base Touch Target Optimization */
button,
a.btn,
.btn,
.nav-link,
.dropdown-item {
  touch-action: manipulation;
}

/* 4. Breakpoint: Desktop to Tablet Landscape (<1200px) */
@media (max-width: 1199.98px) {
  /* Public Navbar Collapse Drawer */
  .navbar-custom .navbar-collapse {
    background: #ffffff;
    border-radius: var(--hrm-radius-lg);
    box-shadow: var(--hrm-shadow-lg);
    border: 1px solid var(--hrm-border);
    padding: 1rem 1.25rem;
    margin-top: 0.75rem;
  }

  .navbar-custom .navbar-nav {
    margin-bottom: 0.75rem !important;
  }

  .navbar-custom .nav-link-custom {
    padding: 0.65rem 1rem !important;
    border-radius: var(--hrm-radius-md);
  }

  .navbar-custom .navbar-collapse .d-flex.align-items-center {
    width: 100%;
    margin-top: 0.5rem;
  }

  .navbar-custom .navbar-collapse .d-flex.align-items-center .btn,
  .navbar-custom .navbar-collapse .d-flex.align-items-center .dropdown {
    width: 100%;
  }

  .navbar-custom .navbar-collapse .d-flex.align-items-center .btn {
    justify-content: center;
  }

  /* Portal Navbars (Company Admin, Employee, Super Admin) Collapse Drawer */
  .company-navbar .navbar-collapse,
  .user-navbar .navbar-collapse,
  .entity-navbar .navbar-collapse {
    background: rgba(8, 32, 72, 0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: var(--hrm-radius-md);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.35);
    padding: 1rem 1.25rem;
    margin-top: 0.75rem;
  }

  .company-brand .bg-white,
  .user-brand .bg-white {
    margin-bottom: 0 !important;
  }

  /* Prevent duplicate company code badges on compact header bar */
  .company-brand > .badge,
  .user-brand > .badge {
    display: none !important;
  }

  .company-navbar .navbar-collapse .ms-auto,
  .user-navbar .navbar-collapse .ms-auto {
    width: 100%;
    justify-content: space-between;
    padding-top: 0.25rem;
  }
}

/* 5. Breakpoint: Tablet Portrait & Below (<992px) */
@media (max-width: 991.98px) {
  /* Containers & Spacing */
  .portal-page-container {
    padding-top: 1.25rem;
    padding-bottom: 2rem;
  }

  .portal-auth-container {
    padding-top: 1.5rem;
    padding-bottom: 2rem;
    min-height: auto;
  }

  /* Form & Checkout Sticky Sidebars: Turn off sticky on mobile/tablet to prevent overlay collision */
  .sticky-top,
  .order-summary-box {
    position: static !important;
    top: auto !important;
    margin-top: 1.5rem;
  }

  /* Management Module Hub cards in Company Dashboard */
  .hover-shadow {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  /* Footer Links Stacking */
  .footer-custom {
    padding: 2rem 1rem 1.25rem;
  }

  .footer-custom .row.g-4 > div {
    margin-bottom: 1rem;
  }
}

/* 6. Breakpoint: Small Tablets & Mobile Devices (<768px) */
@media (max-width: 767.98px) {
  /* Fluid Headings for Mobile */
  h1, .h1 {
    font-size: clamp(1.4rem, 4.5vw, 1.85rem);
  }

  h2, .h2 {
    font-size: clamp(1.25rem, 3.8vw, 1.6rem);
  }

  h3, .h3 {
    font-size: clamp(1.1rem, 3.2vw, 1.35rem);
  }

  h4, .h4 {
    font-size: clamp(1rem, 2.8vw, 1.2rem);
  }

  h5, .h5 {
    font-size: clamp(0.92rem, 2.5vw, 1.1rem);
  }

  /* Hero Banner & Header Panels */
  .hero-wrapper {
    padding: 2.75rem 1rem 2.25rem;
  }

  .portal-header-banner {
    border-radius: var(--hrm-radius-md);
  }

  /* Cards, Surfaces & Forms Padding */
  .hrm-card,
  .portal-card,
  .onboard-card {
    padding: 1.15rem !important;
    border-radius: var(--hrm-radius-md) !important;
  }

  .card-body.p-4,
  .card-body.p-md-5 {
    padding: 1.15rem !important;
  }

  .card-header.px-4,
  .card-header.p-4 {
    padding-left: 1.15rem !important;
    padding-right: 1.15rem !important;
  }

  /* Form Controls & Inputs: Ensure 16px font-size to prevent iOS Safari auto-zooming */
  .form-control,
  .form-select,
  .form-control-custom,
  .form-select-custom {
    font-size: 16px !important;
    padding: 0.58rem 0.85rem;
    min-height: 42px;
  }

  .toggle-password-btn {
    min-width: 44px;
    min-height: 42px;
    padding: 0.5rem 0.85rem;
  }

  /* Plan & Pricing Cards */
  .plan-card {
    padding: 1.5rem 1.25rem;
    border-radius: var(--hrm-radius-md);
  }

  .plan-badge-top {
    right: 16px;
    top: -11px;
    font-size: 0.68rem;
    padding: 0.2rem 0.65rem;
  }

  .plan-price-val {
    font-size: 2.25rem;
  }

  /* Tables: Mobile Sizing & Padding */
  .table {
    font-size: 0.85rem;
  }

  .table th,
  .table td {
    padding: 0.55rem 0.65rem !important;
  }

  .table thead th {
    white-space: nowrap;
  }

  /* Attendance Matrix Grid Mobile Optimization */
  /* Keep employee name column readable while providing room for days */
  table thead th[style*="min-width: 220px"],
  table tbody td[style*="min-width: 220px"] {
    min-width: 150px !important;
    max-width: 160px !important;
    padding: 0.35rem 0.45rem !important;
  }

  table thead th[style*="min-width: 220px"] .text-truncate,
  table tbody td[style*="min-width: 220px"] .text-truncate {
    max-width: 145px !important;
    font-size: 0.8rem;
  }

  table thead th[style*="min-width: 32px"],
  table thead th[style*="width: 32px"] {
    width: 28px !important;
    min-width: 28px !important;
    padding: 0.3rem 0.15rem !important;
    font-size: 0.72rem;
  }

  /* Modal Dialog Constraints */
  .modal-dialog {
    margin: 0.75rem auto;
    max-width: calc(100% - 1.5rem);
  }

  .modal-body {
    padding: 1.15rem !important;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
  }

  .modal-header {
    padding: 1rem 1.15rem 0.5rem 1.15rem;
  }

  .modal-footer {
    padding: 0.75rem 1.15rem 1rem 1.15rem;
  }

  /* Employee Workspace Attendance Quick Actions */
  .user-navbar .navbar-brand .brand-logo-img,
  .company-navbar .navbar-brand .brand-logo-img {
    width: 36px;
    height: 36px;
  }
}

/* 7. Breakpoint: Extra Small Phones (<576px) */
@media (max-width: 575.98px) {
  /* Container Padding */
  .container,
  .container-fluid,
  .container-xl {
    padding-left: 0.85rem !important;
    padding-right: 0.85rem !important;
  }

  /* Page Header & Breadcrumbs Actions */
  .d-flex.flex-wrap.justify-content-between.align-items-center.mb-4,
  .d-flex.flex-wrap.align-items-center.justify-content-between.gap-3.mb-4 {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
  }

  .d-flex.flex-wrap.justify-content-between.align-items-center.mb-4 > div:last-child,
  .d-flex.flex-wrap.align-items-center.justify-content-between.gap-3.mb-4 > div:last-child {
    width: 100%;
  }

  .d-flex.flex-wrap.justify-content-between.align-items-center.mb-4 > div:last-child .btn,
  .d-flex.flex-wrap.align-items-center.justify-content-between.gap-3.mb-4 > div:last-child .btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .d-flex.flex-wrap.justify-content-between.align-items-center.gap-3.mb-4 > .d-flex.gap-2 {
    flex-wrap: wrap;
  }

  /* Hero Section CTA Buttons */
  .hero-wrapper .d-flex.flex-wrap.justify-content-center.gap-3.mb-4 {
    flex-direction: column;
    align-items: center;
    gap: 0.65rem !important;
  }

  .hero-wrapper .d-flex.flex-wrap.justify-content-center.gap-3.mb-4 .btn {
    width: 100%;
    max-width: 320px;
    padding: 0.75rem 1.25rem !important;
  }

  /* Modal Sizing & Buttons */
  .modal-dialog {
    margin: 0.5rem auto;
    max-width: calc(100% - 1rem);
  }

  .modal-body {
    padding: 0.95rem !important;
    max-height: calc(100vh - 140px);
  }

  .modal-footer {
    flex-direction: column-reverse;
    gap: 0.5rem;
    padding: 0.6rem 0.95rem 0.95rem;
  }

  .modal-footer .btn {
    width: 100%;
    margin: 0 !important;
  }

  /* Filter Pills in Leaves, Advances, etc. */
  .d-flex.flex-wrap.gap-2 {
    gap: 0.4rem !important;
  }

  /* Metric KPI Cards in Dashboards */
  .hrm-metric-card,
  .portal-metric-card {
    padding: 0.85rem 1rem !important;
  }

  /* Employee Dashboard Check In/Out Buttons */
  .backdrop-blur {
    width: 100%;
  }

  .backdrop-blur .d-flex.flex-wrap.gap-2 {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem !important;
    width: 100%;
  }

  .backdrop-blur .d-flex.flex-wrap.gap-2 form {
    display: contents !important;
  }

  .backdrop-blur .d-flex.flex-wrap.gap-2 form button {
    width: 100%;
    justify-content: center;
  }

  /* Registration Form Stepper Badges */
  .card-header .rounded-circle[style*="width: 36px"] {
    width: 30px !important;
    height: 30px !important;
    font-size: 0.85rem !important;
    flex-shrink: 0;
  }

  /* Login Card Header */
  .portal-auth-card-header {
    padding: 1.25rem 1rem;
  }

  /* Table Dropdown Menus: Keep within viewport */
  .dropdown-menu-end {
    right: 0 !important;
    left: auto !important;
  }
}

/* ==========================================================================
   USER ATTENDANCE - ATTENDANCE CONTROLS & HISTORY SCREEN DESIGN (hrm-app)
   ========================================================================== */
.att-controls-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

/* Primary Check In Button (AttendanceControlsWidget) */
.att-checkin-outer {
  background-color: #D6E4F7;
  border-radius: 24px;
  padding: 8px;
  width: 210px;
  max-width: 100%;
  margin: 0 auto 16px auto;
  box-shadow: 0 4px 14px rgba(17, 34, 74, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.att-checkin-outer:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(17, 34, 74, 0.16);
}

.att-checkin-inner {
  background-color: #11224a;
  border-radius: 18px;
  padding: 18px 20px 14px 20px;
  color: #ffffff;
  cursor: pointer;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: none;
  width: 100%;
  transition: background-color 0.2s ease;
}

.att-checkin-inner:hover {
  background-color: #0b1733;
}

.att-checkin-label {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
}

/* Secondary Action Row (Start Break, End Break, Check Out) */
.att-action-row {
  display: flex;
  width: 100%;
  gap: 12px;
  margin-bottom: 16px;
}

.att-action-card {
  flex: 1 1 0;
  min-width: 0;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px 8px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #181A20;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.att-action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  border-color: #cbd5e1;
}

.att-action-icon {
  font-size: 1.65rem;
  color: #6B7280;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
}

.att-action-label {
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 8px;
  color: #1f2937;
  white-space: nowrap;
}

.att-action-card.checkout-card {
  background-color: #FFE8E8;
  border-color: rgba(226, 18, 33, 0.18);
}

.att-action-card.checkout-card:hover {
  background-color: #ffdada;
  border-color: rgba(226, 18, 33, 0.3);
}

.att-action-card.checkout-card .att-action-icon,
.att-action-card.checkout-card .att-action-label {
  color: #D94040;
}

.att-checkin-inner:disabled,
.att-action-card:disabled,
.att-action-card.checkout-card:disabled,
.att-dashboard-controls .att-action-card.att-checkin-inner:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.att-checkin-outer:has(.att-checkin-inner:disabled):hover {
  transform: none;
  box-shadow: 0 4px 14px rgba(17, 34, 74, 0.08);
}

/* Dashboard full-width single-line row (Check In, Start Break, End Break, Check Out) */
.att-dashboard-controls {
  max-width: 100%;
  width: 100%;
}

.att-dashboard-controls .att-action-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
  gap: clamp(6px, 1.5vw, 20px);
  align-items: stretch;
}

.att-dashboard-controls .att-action-row .att-action-card,
.att-dashboard-controls .att-action-card.att-checkin-inner {
  width: 100%;
  min-width: 0;
  padding: clamp(14px, 1.8vw, 22px) clamp(6px, 1.2vw, 16px);
}

.att-dashboard-controls .att-action-card.att-checkin-inner {
  border-radius: 14px;
  border: 1px solid #11224a;
  background-color: #11224a;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(17, 34, 74, 0.14);
}

.att-dashboard-controls .att-action-card.att-checkin-inner:hover {
  background-color: #0b1733;
  border-color: #0b1733;
  box-shadow: 0 6px 16px rgba(17, 34, 74, 0.22);
}

.att-dashboard-controls .att-action-card.att-checkin-inner .att-action-icon,
.att-dashboard-controls .att-action-card.att-checkin-inner .att-action-label {
  color: #ffffff;
}

/* Total Break Pill Badge */
.att-total-break-pill {
  background-color: rgba(70, 202, 66, 0.12);
  color: #1b5e20;
  font-weight: 700;
  font-size: 0.88rem;
  border-radius: 6px;
  padding: 6px 16px;
  display: inline-block;
  margin: 0 auto 16px auto;
  letter-spacing: 0.01em;
}

/* Section Header */
.att-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  margin-bottom: 12px;
}

.att-section-title {
  color: #11224a;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}

.att-history-btn {
  color: #11224a;
  font-size: 0.88rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  background: transparent;
  border: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background-color 0.15s ease;
}

.att-history-btn:hover {
  background-color: rgba(17, 34, 74, 0.06);
  color: #082048;
}

/* Attendance Log Item Card (Image 1) */
.att-logs-list {
  width: 100%;
}

.att-log-item {
  width: 100%;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  padding: 10px 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: transform 0.15s ease;
}

.att-log-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.att-log-thumb {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #a7d08c 0%, #86b966 60%, #689f38 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.att-log-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.att-log-address {
  flex: 1 1 0;
  min-width: 0;
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.35;
  max-height: 2.7em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.att-log-status-badge {
  border-radius: 6px;
  padding: 6px 10px;
  text-align: right;
  min-width: 95px;
  flex-shrink: 0;
}

.att-log-status-badge.status-checkin {
  background-color: #E8F8E8;
  color: #1b5e20;
}

.att-log-status-badge.status-breakstart {
  background-color: #FFF3E0;
  color: #e65100;
}

.att-log-status-badge.status-breakend {
  background-color: #E8F0FE;
  color: #1565c0;
}

.att-log-status-badge.status-checkout {
  background-color: #FFE8E8;
  color: #d94040;
}

.att-log-type-text {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.att-log-time-text {
  font-size: 0.74rem;
  font-weight: 600;
  margin-top: 2px;
  line-height: 1.2;
}

/* Day Summary responsive wrapping (prevents text overlap/clipping) */
.att-day-summary-logs .att-log-item {
  width: 100%;
  align-items: center;
  flex-wrap: nowrap;
  gap: 14px;
}

.att-day-summary-logs .att-log-details {
  flex: 1 1 0;
  min-width: 0;
}

.att-day-summary-logs .att-log-address {
  display: block;
  max-height: none;
  overflow: visible;
  -webkit-line-clamp: unset;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.4;
}

.att-day-summary-logs .att-log-device {
  font-size: 0.74rem;
  color: #64748b;
  margin-top: 3px;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 575.98px) {
  .att-day-summary-logs .att-log-item {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
  }

  .att-day-summary-logs .att-log-details {
    flex: 1 1 calc(100% - 64px);
    min-width: 0;
  }

  .att-day-summary-logs .att-log-status-badge {
    margin-left: auto;
  }
}

/* ==========================================================================
   ATTENDANCE HISTORY CALENDAR SCREEN (Image 2 & AttendanceHistoryScreen)
   ========================================================================== */
.att-history-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.att-month-navigator {
  background: #ffffff;
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

.att-nav-arrow-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: #181A20;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.att-nav-arrow-btn:hover {
  background-color: #f1f5f9;
  color: #082048;
}

.att-nav-arrow-btn.disabled,
.att-nav-arrow-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.att-month-display {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #11224a;
  cursor: pointer;
}

/* Stats Cards (Present / Absent / Pending / Leave / Holiday) */
.att-stats-summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.att-stat-box {
  flex: 1 1 calc(33.333% - 8px);
  min-width: 100px;
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
}

.att-stat-box.stat-present {
  background-color: rgba(70, 202, 66, 0.1);
  border: 1px solid rgba(70, 202, 66, 0.35);
  color: #2E7D32;
}

.att-stat-box.stat-absent {
  background-color: rgba(226, 18, 33, 0.08);
  border: 1px solid rgba(226, 18, 33, 0.25);
  color: #D32F2F;
}

.att-stat-box.stat-leave {
  background-color: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #B45309;
}

.att-stat-box.stat-holiday {
  background-color: rgba(0, 180, 248, 0.1);
  border: 1px solid rgba(0, 180, 248, 0.35);
  color: #0284C7;
}

.att-stat-box.stat-pending {
  background-color: rgba(255, 193, 7, 0.12);
  border: 1px solid rgba(255, 193, 7, 0.45);
  color: #D97706;
}

.att-stat-box.stat-compoff {
  background-color: rgba(156, 39, 176, 0.1);
  border: 1px solid rgba(156, 39, 176, 0.35);
  color: #7B1FA2;
}

.att-stat-val {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.15;
}

.att-stat-label {
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: 2px;
}

/* Calendar Matrix Grid */
.att-calendar-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  padding: 16px;
}

.att-weekday-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  text-align: center;
  margin-bottom: 8px;
  padding: 0;
}

.att-weekday-item {
  font-size: 0.82rem;
  font-weight: 700;
  color: #181A20;
}

.att-days-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
}

.att-day-cell {
  min-height: 54px;
  padding: 8px 4px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  text-decoration: none;
}

.att-day-cell:hover {
  transform: scale(1.05);
  z-index: 2;
}

.att-day-num {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
}

.att-day-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: currentColor;
  margin-top: 3px;
}

/* Day Cell Status Themes */
.att-day-cell.day-absent {
  background-color: #FFEEEE;
  border: 1px solid rgba(226, 18, 33, 0.35);
  color: #E21221;
}

.att-day-cell.day-present {
  background-color: #E8F8E8;
  border: 1px solid rgba(70, 202, 66, 0.4);
  color: #2E7D32;
}

.att-day-cell.day-leave {
  background-color: #FFF3E0;
  border: 1px solid #FFCC80;
  color: #E65100;
}

.att-day-cell.day-holiday {
  background-color: #E3F2FD;
  border: 1px solid #90CAF9;
  color: #1565C0;
}

.att-day-cell.day-pending {
  background-color: #FFF8E1;
  border: 1px solid rgba(255, 193, 7, 0.5);
  color: #D97706;
}

.att-day-cell.day-compoff {
  background-color: #F3E5F5;
  border: 1px solid rgba(156, 39, 176, 0.35);
  color: #7B1FA2;
}

.att-day-cell.day-weekoff {
  background-color: #F1F5F9;
  border: 1px solid #CBD5E1;
  color: #64748B;
}

.att-day-cell.day-empty {
  background-color: #F8FAFC;
  border: 1px solid #E2E8F0;
  color: #94A3B8;
}

.att-day-cell.day-empty .att-day-dot {
  background-color: #CBD5E1;
}

.att-day-cell.day-blank {
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 575.98px) {
  .att-action-row {
    gap: 8px;
  }
  .att-dashboard-controls .att-action-row {
    gap: 6px;
  }
  .att-action-card,
  .att-dashboard-controls .att-action-row .att-action-card,
  .att-dashboard-controls .att-action-card.att-checkin-inner {
    padding: 12px 4px;
  }
  .att-action-label {
    font-size: 0.78rem;
  }
  .att-dashboard-controls .att-action-label {
    font-size: 0.72rem;
  }
  .att-days-grid,
  .att-weekday-grid {
    gap: 6px;
  }
  .att-day-cell {
    min-height: 36px;
    border-radius: 8px;
  }
  .att-day-num {
    font-size: 0.8rem;
  }
}

/* ==========================================================================
   USER DASHBOARD - INTERACTIVE MODULE COUNT CARDS
   ========================================================================== */
.dashboard-count-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  text-decoration: none;
  color: #181A20;
  cursor: pointer;
}

.dashboard-count-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
  color: #181A20;
}

.dashboard-count-card .display-4 {
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
}

@media (max-width: 767.98px) {
  .dashboard-count-card {
    padding: 1.25rem;
  }
  .dashboard-count-card .display-4 {
    font-size: 2.25rem;
  }
}

/* ==========================================================================
   USER PROFILE, PAYROLL & ADVANCES (Matching hrm-app ProfileScreen)
   ========================================================================== */
.user-nav-profile-link {
  transition: background-color 0.15s ease;
}

.user-nav-profile-link:hover {
  background-color: rgba(255, 255, 255, 0.14);
}

a.btn:has(.bi-arrow-left),
button.btn:has(.bi-arrow-left) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

.profile-avatar-box {
  position: relative;
  width: 76px;
  height: 76px;
  flex-shrink: 0;
}

.profile-avatar-frame {
  width: 76px;
  height: 76px;
  border-radius: 16px;
  border: 2px solid #11224a;
  background-color: #f8fafc;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-edit-btn {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: #11224a;
  color: #ffffff;
  border: 2px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.profile-avatar-edit-btn:hover {
  background-color: #0b1733;
}

.profile-role-pill {
  background-color: #eef2ff;
  color: #11224a;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 999px;
  display: inline-block;
}

.profile-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.profile-info-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.profile-preference-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  text-decoration: none;
  color: #181a20;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: background-color 0.15s ease;
}

.profile-preference-item:last-child {
  border-bottom: none;
}

.profile-preference-item:hover {
  background-color: #f8fafc;
  color: #11224a;
}

.profile-preference-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background-color: #f0f0f0;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}




