:root {
  /* ===== Colors ===== */
    --color-primary: #4C28FF;           /* Main Accent (Vibrant Violet Blue) */
    --color-primary-hover: #3B20CC;     /* Slightly darker violet for hover */

    /* Updated Secondary Colors */
    --color-secondary: #4B5563;         /* Gray-600 (better than pure black) */
    --color-secondary-hover: #374151;   /* Gray-700 */

    --color-danger: #E53935;            /* Red */
    --color-danger-hover: #C62828;

    --color-success: #43A047;           /* Green */
    --color-success-hover: #2E7D32;

    --btn-logout-bg: var(--color-danger);


  /* ===== Light Theme ===== */
  --light-bg: #FFFFFF;              /* Background White */
  --light-card: #ffffff; 
  --light-card-2: #f8f8f8;           /* Soft Blue-Gray Card */
  --light-input: #F1F3F5;           /* Subtle Input Field */
  --light-text: #000000; 
  --white-text:#ffffff;           /* Main Text (Black) */
  --light-text-secondary: #9D9D9D;  /* Muted Gray Text */
  --light-border: #D9D9D9; 
  --light-table-header:#d6e0ff;         /* Neutral Border */

  /* ===== Dark Theme (keep same or customize later) ===== */
  --dark-bg: #0D1117;
  --dark-card: #161B22;
  --dark-input: #1E2530;
  --dark-text: #FFFFFF;
  --dark-text-secondary: #8B949E;
  --dark-border: #2D333B;

  /* ===== Typography ===== */
  --font-primary:'Outfit', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-secondary: 'Inter','Nunito Sans', 'Open Sans', 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: 2rem;

  /* ===== Spacing ===== */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  /* ===== Radius & Shadows ===== */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.15);
}



/* ===========================
   Light Theme (Default)
=========================== */
body {
  background-color: var(--light-bg);
  color: var(--light-text);
  font-family: var(--font-secondary);
  font-size: var(--font-size-base);
  line-height: 1.6;
}
/* Prevent horizontal scrolling globally */
html, body {
    overflow-x: hidden;
}

/* ===========================
   Dark Theme
=========================== */
body.dark {
  background-color: var(--dark-bg);
  color: var(--dark-text);
}


/* Dark theme */
body.dark {
    background-color: var(--dark-bg);
    color: var(--dark-text);
}

/* ===========================
   Typography
=========================== */
h1, h2, h3, h4, h5, h6, button {
  font-family: var(--font-primary);
  font-weight: 600;
  letter-spacing: -0.5px;
}
.font-primary{
  font-family: var(--font-primary);
}
.font-secondary{
  font-family: var(--font-secondary);
}
h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }

p, input, textarea, select {
  font-family: var(--font-secondary);
  font-size: var(--font-size-base);
  font-weight: 400;
  line-height: 1.6;
  color: inherit;
}

/* ===========================
   Buttons
=========================== */
.btn {
  display: inline-block;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: x-small;
   font-family: var(--font-primary);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  box-shadow: var(--shadow-sm);
  min-width: 100px; /* keeps uniform size */
}
/* Primary button - solid main theme color */
.btn-primary {
  background-color: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  box-shadow: 0 0 5px var(--color-primary);
  transform: translateY(-2px);
}


.btn-secondary {
  background: var(--color-secondary);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--color-secondary-hover);
  box-shadow: var(--shadow-md);
   transform: translateY(-2px);
}

/* Search button - solid primary */
.btn-search {
  background-color: var(--color-primary);
  color: #fff;
}

.btn-search:hover {
  background-color: var(--color-primary-hover);
  box-shadow: 0 0 5px var(--color-primary);
  transform: translateY(-2px);
}
/* Success button - solid green */
.btn-success {
  background-color: #22C55E;
  color: #fff;
}

.btn-success:hover {
  background-color: #16A34A;
  box-shadow: 0 0 5px #22C55E80;
  transform: translateY(-2px);
}

/* Danger button - solid red */
.btn-danger {
  background-color: #EF4444;
  color: #fff;
}

.btn-danger:hover {
  background-color: #B91C1C;
  box-shadow: 0 0 5px #EF444480;
  transform: translateY(-2px);
}

/* Info button - solid blue */
.btn-info {
  background-color: #3B82F6;
  color: #fff;
}

.btn-info:hover {
  background-color: #2563EB;
  box-shadow: 0 0 5px #60A5FA80;
  transform: translateY(-2px);
}

/* Warning / Pending / Caution */
.btn-warning {
  background-color: #b48e29; /* amber-500 */
  color: #fff;
}

.btn-warning:hover {
  background-color: #7e5e26; /* amber-600 */
  box-shadow: 0 0 5px #FBBF2480; /* subtle glow */
  transform: translateY(-2px);
}

/* Purple / Verify */
.btn-purple {
  background: #8B5CF6; /* violet-500 */
  color: #fff;
}
.btn-purple:hover {
  background: #7C3AED; /* violet-600 */
  box-shadow: var(--shadow-md);
}




/* Inline buttons container */
.btn-inline {
  display: flex;
  gap: 10px;
 
  flex-wrap: nowrap; 
}
/* Edit button using theme colors */
.icon-btn {
   
    background: transparent;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.icon-btn-primary{
    
     color: var(--color-primary)
}
.icon-btn-danger{
    color: var(--color-danger);
}
.icon-btn-danger:hover{
   stroke: var(--color-danger);
}
.icon-btn-danger-1{
     background-color: #EF4444;
  color: #fff;
}
.icon-btn-danger-1:hover{
    background-color: #B91C1C;
  box-shadow: 0 0 5px #EF444480;
  transform: translateY(-2px);
}
/* Success button - solid green */
.icon-btn-success {
  background-color: #22C55E;
  color: #fff;
}

.icon-btn-success:hover {
  background-color: #16A34A;
  box-shadow: 0 0 5px #22C55E80;
  transform: translateY(-2px);
}
/* Info button - solid blue */
.icon-btn-info {
  background-color: #3B82F6;
  color: #fff;
}

.icon-btn-info:hover {
  background-color: #2563EB;
  box-shadow: 0 0 5px #60A5FA80;
  transform: translateY(-2px);
}
/* Warning / Pending / Caution */
.icon-btn-warning {
  background-color: #b48e29; /* amber-500 */
  color: #fff;
}

.icon-btn-warning:hover {
  background-color: #7e5e26; /* amber-600 */
  box-shadow: 0 0 5px #FBBF2480; /* subtle glow */
  transform: translateY(-2px);
}

/*=========================
   sidebar start 
=========================== */

/* ===========================
   Sidebar Base
=========================== */
#sidebar {
    height: 100vh;
    flex: 0 0 14rem; 
    display: flex;
    flex-direction: column;
    
    background-color: #1F2937;
    color: var(--light-input);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) transparent;
     font-family: var(--font-primary); /* Apply secondary font to sidebar */
    font-size: var(--font-size-sm); 
}

/* Sidebar nav scrolls if long */
#sidebar nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
     -webkit-overflow-scrolling: touch; 
     -ms-overflow-style: none; 
    scrollbar-width: none;
}
#sidebar nav::-webkit-scrollbar{
  display:none;
}

/* Sidebar Icons */
.menu-icons,
.sidebar-link i {
    width: 18px;
    font-size: var(--font-size-base); /* Icon size consistent */
    color: #9d9d9d; /* default gray */
}

/* ===========================
   Sidebar Link Styles
=========================== */

/* Default state */
.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.65rem 0.8rem; /* reduced padding for compact look */
    color: #9d9d9d;
    text-decoration: none;
    border-right: 3px solid transparent;
    transition: all 0.2s ease;
    font-family: var(--font-primary);
    /* smaller text */
}


/* Default icon color */
.sidebar-link i,
.sidebar-link .menu-icons {
    width: 18px;
    color: #9d9d9d;
}

/* Default text */
.sidebar-link-text {
   font-weight: 600;
    margin-left: 0.5rem;
    white-space: nowrap;
}

/* Hover */
.sidebar-link:hover {
   color: var(--color-primary);
}
.sidebar-link-text:hover {
    color: var(--color-primary); /* #4C28FF */
}
.logout-text:hover{
    color: var(--dark-text);
}
.sidebar-link:hover i,
.sidebar-link:hover .menu-icons  {
    color: var(--color-primary) ;
}

/* Add rounded active border using pseudo-element */
.sidebar-link-active {
    position: relative;
    color: var(--white-text);

    background-color: transparent !important;
}

.sidebar-link-active::before {
    content: "";
    position: absolute;
    left: 0;          /* change from right to left */
    top: 8px;
    bottom: 8px;
    width: 4px;
    background-color: var(--color-primary);
    border-radius: 10px; /* rounded edges */
}

.sidebar-link-active i,
.sidebar-link-active .menu-icons {
    color: var(--color-primary) !important; /* icon violet-blue */
}


/* Remove background from hover & active */
.sidebar-link:hover,
.sidebar-link-active {
    background-color: transparent !important;
}

/* Mobile Sidebar Overlay */
#sidebar-overlay {
    display: none; /* hidden by default */
}

body.sidebar-open #sidebar {
    transform: translateX(0);
}

body.sidebar-open #sidebar-overlay {
    display: block;
}


/* ===========================
   Mobile Sidebar
=========================== */
@media (max-width: 1024px) {
    #sidebar {
        position: fixed;
        left: -16rem;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
    }
    body.sidebar-open #sidebar {
        left: 0;
    }
    #sidebar .mobile-close-btn {
        display: flex;
        justify-content: flex-end;
        padding: 1rem;
    }

    /* Ensure main-content full width on mobile */
    .main-content {
        margin-left: 0;
    }
}

/* Default hidden close button on desktop */
#sidebar .mobile-close-btn {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #fff;
}

/* ===========================
   Dark Theme Sidebar
=========================== */
body.dark #sidebar {
    background-color: var(--dark-card); /* dark sidebar bg */
    color: var(--dark-text-secondary);
}

body.dark .sidebar-link {
    color: var(--dark-text-secondary);
}

body.dark .sidebar-link:hover {
    background-color: #2D333B; /* dark hover bg */
    color: var(--color-primary);
}

body.dark .sidebar-link-active {
    background-color: #2D333B; /* dark active bg */
    color: var(--color-primary); /* primary color in dark mode */
}


body.dark .sidebar-link {
    color: var(--dark-text-secondary);
}

body.dark .sidebar-link.active,
body.dark .sidebar-link:hover {
    background-color: #2D333B;
    color: var(--dark-text);
}

/* Sidebar collapsed */
#sidebar.collapsed {
    width: 80px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    transition: width 0.3s ease;
}
#sidebar.collapsed .sidebar-link span {
    display: none;
}

#sidebar.collapsed .sidebar-link {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

#sidebar.collapsed .sidebar-link i {
    margin-right: 0;
}

#sidebar.collapsed .sidebar-link span {
    display: none;
}

#sidebar.collapsed .sidebar-logo img {
    width: 32px;
}

/* ===========================
   Scrollbar
=========================== */
#sidebar::-webkit-scrollbar {
    width: 1px;
}

#sidebar::-webkit-scrollbar-track {
    background: transparent;
}

#sidebar::-webkit-scrollbar-thumb {
    background-color: var(--color-primary);
    border-radius: 10px;
    border: 1px solid transparent;
}

#sidebar::-webkit-scrollbar-thumb:hover {
    background-color: var(--color-primary-hover);
}


/*=========================
   sidebar end  
=========================== */
/* ===========================
   Main Content Layout
=========================== */
.main-content {
    flex: 1; 
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: hidden;
    height: 100vh; 
    /* reduce opacity by using rgba (alpha = 0.85) */
    background-color: #F8F9FB; /* was var(--light-card) */
}
/* ===========================
   Scrollable Area inside Main
=========================== */
.main-scroll {
    flex: 1;
    overflow-y: auto;   /* vertical scrolling */
    overflow-x: auto;   /* horizontal scrolling for tables */
    padding: 1rem;
}

/* Scrollbar styling for main content */
.main-scroll::-webkit-scrollbar {
    width: 6px;
    height: 6px;
    display: none;
}
.main-scroll::-webkit-scrollbar-thumb {
    background-color: var(--color-primary-glow);
  border-radius: 10px;
}
.main-scroll::-webkit-scrollbar-thumb:hover {
     background-color: var(--color-primary);
}


/* ===========================
   Top Bar (Sticky)
=========================== */
.main-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color:#f4f7ff;
    border: 1px solid rgba(217, 217, 217, 0.6); 
    margin-bottom: 1rem;
    position: sticky;
    top: 0;
    z-index: 20; 
}
body.dark .main-topbar {
    background-color: var(--dark-card);
    border-color: var(--dark-border);
}

#dashboardCalendar {
  height: 300px !important;
}

.fc .fc-daygrid-day-frame {
  min-height: 60px !important;
  padding: 2px !important;
}

.fc .fc-daygrid-day-number {
  font-size: 0.8rem !important;
  padding: 2px !important;
}

.fc .fc-event {
  font-size: 0.75rem !important;
  padding: 1px 2px !important;
}

.fc .fc-col-header-cell-cushion {
  font-size: 0.8rem !important;
  padding: 4px 0 !important;
}

@media (min-width: 768px) { 
  .calendar-compact {
    width: 47.666667% !important;
  }
  .calendar-wrapper {
    flex-direction: row !important;
  }
}
@media (min-width: 768px) { 
  .calendar-compact {
    width: 47.666667% !important; 
  }
  .calendar-wrapper {
    flex-direction: row !important;
  }
}

@media (max-width: 767px) { 
  .calendar-compact {
    width: 100% !important;
  }
  .calendar-wrapper {
    flex-direction: column !important;
  }
}
.calendar-compact{
   background-color: var(--light-card-2);
    color: var(--light-text);
    border: 1px solid var(--light-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);


}
.upcoming-section{
    background-color: var(--light-card-2);
    color: var(--light-text);
    border: 1px solid var(--light-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    box-shadow: var(--shadow-sm);
    transition: background 0.3s, border 0.3s, color 0.3s;
}
.upcoming-events-parent,.upcoming-events-wrapper{
    overflow-y: auto; 
    -webkit-overflow-scrolling: touch; 
     -ms-overflow-style: none; 
    scrollbar-width: none;
}
.upcoming-events-parent::-webkit-scrollbar,
.upcoming-events-wrapper::-webkit-scrollbar{
  display: none;
}
.upcoming-events-card {
    background-color: var(--light-input);
    border: 1px solid #e5e7eb; 
}

.upcoming-events-card:hover {
    background-color: #e9ebee;
}

.upcoming-events-card p {
    transition: color 0.2s ease;
}

.upcoming-events-card:hover p.font-semibold {
    color: var(--color-primary, #4C28FF);
}


/* filter section */
.user-filter-card,.dashboard-card {
    background-color: var(--light-card-2);
    color: var(--light-text);
    border: 1px solid var(--light-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    box-shadow: var(--shadow-sm);
    transition: background 0.3s, border 0.3s, color 0.3s;
}
.dashboard-card i {
    transition: transform 0.25s ease, color 0.25s ease;
}
.dashboard-card:hover i {
    transform: scale(1.2);
}
.dashboard-card:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease;
}
.employee-inital{
  background-color: var(--color-primary);
}
#employeeProfileBtn:hover span {
  background-color: var(--color-primary-hover);
}
/* Dark mode */
body.dark .user-filter-card {
    background-color: var(--dark-card);
    color: var(--dark-text);
}
/* user details cards style*/



/* Form inputs & select styling */

/* Inputs & Selects */
.form-input, .form-select ,.form-group textarea  {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--light-border);
    border-radius: var(--radius-md);
    background-color: var(--light-input);
     font-family: var(--font-primary);
    font-size: var(--font-size-sm);
    color: var(--light-text);
    transition: all 0.2s ease;
}
.form-input:hover, .form-select:hover {
   outline: none;
    border-color: var(--color-primary);
   box-shadow: 0 0 0 3px rgba(69, 126, 246, 0.2);
}
.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-primary);
   box-shadow: 0 0 0 3px rgba(69, 126, 246, 0.2);
}
.scroll-table-btn:disabled {
    cursor: default;
    opacity: 0.5;
    pointer-events: none; /* prevents hover effects */
}
 

/* Dark mode inputs */
body.dark .form-input,
body.dark .form-select {
    background-color: var(--dark-input);
    color: var(--dark-text);
    border-color: var(--dark-border);
}



/* Filter header */
.user-filter-card .filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
}

/* Filter buttons */
.user-filter-card .btn {
    min-width: 120px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .user-filter-card form {
        flex-direction: column;
        gap: var(--space-sm);
    }
    /* .user-filter-card .flex-1 { min-width: 100%; } */
    .user-filter-card .flex.items-end { flex-direction: row; gap: var(--space-sm); }
}

/*=========================
  table section
=========================== */

.table-wrapper-header {
    background-color: var(--light-card-2);
    border: 1px solid var(--light-border);
    padding: 1rem;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}
body.dark .table-wrapper-header{
    background-color: var(--dark-card);
    
    color: var(--dark-text);
}
.table-wrapper {
    overflow-x: auto; /* horizontal scroll for tables */
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid #b1b6c2;
    -webkit-overflow-scrolling: touch; 
     -ms-overflow-style: none; 
    scrollbar-width: none;
}
.table-wrapper::-webkit-scrollbar{
  display: none;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
  font-family: var(--font-primary);
  white-space: nowrap; /* Prevent line breaks inside table cells */
}


.table th,
.table td {
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--light-border);
}
.table th {
  background-color: var(--light-table-header);
  font-weight: 600;
  color:  var(--dark-input);;
}
/* Dark Mode */
body.dark .table-wrapper {
  border: 1px solid var(--dark-border);
}

body.dark .table th {
  background-color: var(--dark-card);
  color: var(--dark-text-secondary);
}




/* Highlight pending rows */
.table-row-pending {
    background-color: var(--color-primary-glow) !important; /* light primary color */
    transition: background 0.3s;
}


/* Global Alert Boxes */
.alert-box {
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    border: 1px solid;
    font-size: var(--font-size-sm);
}

.alert-success {
    background: var(--light-card-2);
    border-color: var(--color-success);
    color: var(--color-success);
}

.alert-error {
    background: var(--light-card-2);
    border-color: var(--color-danger);
    color: var(--color-danger);
}

/* Main Card Wrapper */
.theme-card {
    background: var(--light-card-2);
    border: 1px solid var(--light-border);
    border-radius: var(--radius-md);
}

/* Section Card */
.theme-section-card {
   background-color: var(--light-card-2);
    color: var(--light-text);
    border: 1px solid var(--light-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    box-shadow: var(--shadow-sm);
    transition: background 0.3s, border 0.3s, color 0.3s;
 
}
/* Section Title */
.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--light-text);
    margin-bottom: 1rem;
}

/* Department badge */
.department-badge {
    background: var(--color-success);
    color: var(--dark-text);
    font-weight: 500;
    font-size: 0.85rem;
}

/* Label/value style */
.theme-text-secondary span.font-semibold {
    color: var(--light-text);
}

/* Grid responsiveness */
@media (max-width: 640px) {
    .grid-cols-2 {
        grid-template-columns: 1fr !important;
    }
}
/* Borders */
.theme-border {
    border-color: var(--light-border);
}

/* Text */
.theme-text-primary {
    color: var(--light-text);
}

.theme-text-secondary {
    color: var(--light-text);
}

/* Section Title */
.section-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--light-text);
    margin-bottom: var(--space-md);
}
/* TAB WRAPPER BORDER */
.theme-tab-parent {
    border-bottom: 1px solid var(--light-border); 
    overflow-x: auto;
        -webkit-overflow-scrolling: touch; 
     -ms-overflow-style: none; 
    scrollbar-width: none;
}
.theme-tab-parent::-webkit-scrollbar{
  display: none;
}
/* TAB BUTTONS */
.theme-tab {
    padding-bottom: 0.5rem;
    border-bottom: 3px solid transparent; /* Default: no underline */
    color: var(--light-text-secondary);
    cursor: pointer;
}

.theme-tab:hover {
    color: var(--color-primary);
}

/* ACTIVE TAB */
.theme-tab-active {
    color: var(--color-primary);
    border-bottom: 3px solid var(--color-primary); /* Active underline */
}

/* SCROLL WRAPPER (HIDE SCROLLBAR) */
.tab-scroll-wrapper {
    overflow-x: auto;
    white-space: nowrap;
}
.status {
    color: var(--dark-text);
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    display: inline-block;
}

/* Status Colors */
.status.working { background-color: var(--color-success); }
.status.relieved { background-color: var(--color-danger); }
.status.notice_period { background-color: #FBC02D; }
.status.probation { background-color: #2196F3; } /* Blue for probation */





.offer-letter-modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  display: none;

  /* Center children using flex */
  display: flex;
  justify-content: center;
  align-items: center;

  padding: 1rem;
 
}

/* --- Modal Box --- */
.offer-letter-box {
  position: relative;
  margin: 0;
  background-color: var(--light-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh; /* Limit total modal height */
  display: flex;
  flex-direction: column; /* Header, content, footer stacked */
  padding: 1.5rem;
  font-family: var(--font-primary);
}



/* Dark Mode Support */
body.dark .offer-letter-box {
  background-color: var(--dark-card);
  color: var(--dark-text);
}

/* --- Header --- */
.offer-letter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--light-border);
  padding-bottom: var(--space-sm);
  margin-bottom: var(--space-md);
}

body.dark .offer-letter-header {
  border-color: var(--dark-border);
}

.offer-letter-title {
  font-size: var(--font-size-2xl);
  font-weight: 600;
  color: var(--color-secondary);
}

body.dark .offer-letter-title {
  color: var(--dark-text);
}

.offer-letter-close-btn {
  background: none;
  border: none;
  color: var(--light-text-secondary);
  cursor: pointer;
  transition: color 0.2s;
}

.offer-letter-close-btn:hover {
  color: var(--color-danger);
}
.offer-letter-content {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1; /* Takes remaining space between header and footer */
  color: var(--light-text);
  font-size: var(--font-size-base);
  line-height: 1.6;
}

body.dark .offer-letter-content {
  color: var(--dark-text-secondary);
}
.offer-letter-header,
.offer-letter-footer {
  flex-shrink: 0; /* Prevent shrinking */
}
/* --- Footer Buttons --- */
.offer-letter-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

@media (min-width: 640px) { .offer-letter-modal { padding: 2rem; } }
@media (min-width: 768px) { .offer-letter-modal { padding: 3rem; } }
@media (max-width: 480px) {
  .offer-letter-box {
    max-height: 85vh; /* Reduce modal height on small screens */
    padding: 1rem;
  }

  .offer-letter-content {
    max-height: calc(85vh - 120px); /* Header + footer space */
  }

  .letter-body p {
    font-size: 0.9rem;
    margin-bottom: 8px;
  }

  .offer-header .company-name {
    font-size: 1.2rem;
  }

  .offer-header .job-offer-title {
    font-size: 1rem;
  }
}


/* leave model */
/* leave modal card */
.leave-model-card {
    background-color: var(--light-card-2);
    color: var(--light-text);
    border: 1px solid var(--light-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    overflow-y: auto;
    box-shadow: var(--shadow-sm);
    transition: background 0.3s, border 0.3s, color 0.3s;
}

.leave-model-card::-webkit-scrollbar{
 width: 2px;
 color: var(--color-primary);
}


/* compensate */
  .tab-btn-table {
            display: inline-block;
            padding: var(--space-sm) var(--space-md);
            border-radius: var(--radius-md);
            font-weight: 600;
            font-size: x-small;
            font-family: var(--font-primary);
            text-align: center;
            cursor: pointer;
            transition: all 0.2s ease;
            border: none;
            box-shadow: var(--shadow-sm);
            box-shadow: 1px 1px 6px 0px rgba(0, 0, 0, 0.15);
            min-width: 100px; /* keeps uniform size */
        
    }

    .tab-btn-table-active {
        background-color: var(--color-primary);
        color: var(--white-text);
    }
    .tab-btn-table:hover{
        background-color: var(--color-primary-hover);
        box-shadow: 0 0 5px var(--color-primary);
        transform: translateY(-2px);
    }
    .tab-btn-table-inactive {
        background-color: var(--light-input);
        box-shadow: 1px 1px 6px 0px rgba(0, 0, 0, 0.15);
        color: var(--color-secondary);
    }
    .tab-btn-table-inactive:hover{
        color: var(--white-text);
    }


    /* ===============================
   PAGINATION (THEME STYLED)
================================ */

.pagination-wrapper {
    display: flex;
    justify-content: flex-end;
}

.pagination {
    display: flex;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Page item */
.pagination .page-item {
    display: inline-flex;
}

/* Default link */
.pagination .page-link {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--light-bg);
    color: var(--color-secondary);
    border: 1px solid var(--light-border);

    font-size: 14px;
    font-weight: 500;
    text-decoration: none;

    transition: all 0.2s ease;
    cursor: pointer;
}

/* Hover */
.pagination .page-link:hover {
    background: var(--light-card-2);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

/* Active page */
.pagination .page-item.active .page-link {
    background: var(--color-primary);
    color: var(--white-text);
    border-color: var(--color-primary);
    font-weight: 600;
    pointer-events: none;
    min-width: 38px;
    text-align: center;
}

/* Disabled (‹ › when not clickable) */
.pagination .page-item.disabled .page-link {
    background: var(--light-input);
    color: var(--light-text-secondary);
    border-color: var(--light-border);
    cursor: not-allowed;
}


/* Prev / Next arrows */
.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
    font-size: 16px;
    font-weight: 600;
}

/* Mobile friendly */
@media (max-width: 640px) {
    .pagination {
        gap: 4px;
    }

    .pagination .page-link {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
        padding: 0 8px;
    }
}
