html {
    height: 100%;
}

body {
    margin: 0;
    background-color: #f9f9f9;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    background: linear-gradient(to bottom right, #f4f7f9, #e9eff5);
}

/* Only center login/register pages */
body.centered-page {
    display: flex;
    justify-content: center;  
    align-items: center;      
    height: 100vh;
}

/* Main content container */
.centered-container {
    background-color: #ffffff;
    padding: 40px 60px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;        /* Center text and buttons inside */
    max-width: 500px;          /* Optional: control width */
    width: 100%;
}

/* Title */
.centered-container h1 {
    font-size: 2.5rem;
    color: #1a5276;
    margin-bottom: 20px;
}

/* User greeting */
.centered-container .user-greeting {
    font-weight: 500;
    margin-bottom: 15px;
    color: #2c3e50;
}

/* Navigation buttons */
.centered-container a.btn {
    display: block;           /* Full width block */
    margin: 10px auto;        /* Center horizontally */
    min-width: 200px;         /* Optional: control button width */
}

/* Custom primary button */
.centered-container a.btn-primary {
    background-color: #1a5276;
    border-color: #1a5276;
    color: #fff;
    font-weight: 600;
    padding: 12px 20px;
    font-size: 1rem;
    border-radius: 6px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.centered-container a.btn-primary:hover {
    background-color: #154360;
    border-color: #154360;
    color: #fff;
}

/* Custom secondary button */
.centered-container a.btn-secondary {
    background-color: #85929e;
    border-color: #85929e;
    color: #fff;
    font-weight: 600;
    padding: 12px 20px;
    font-size: 1rem;
    border-radius: 6px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.centered-container a.btn-secondary:hover {
    background-color: #5d6d7e;
    border-color: #5d6d7e;
    color: #fff;
}

/* Style login form inputs */
.centered-container .login-form .form-control {
    max-width: 300px;
    margin: 0 auto 15px auto;
    padding: 10px 12px;
    font-size: 1rem;
    border-radius: 6px;
    box-shadow: none;
    border: 1px solid #ccc;
    transition: border-color 0.3s ease;
}

.centered-container .login-form .form-control:focus {
    border-color: #1a5276;
    box-shadow: 0 0 0 0.1rem rgba(26, 82, 118, 0.25);
}

/* Style the login button */
.centered-container .login-form .btn-primary {
    display: block;
    margin: 10px auto;
    min-width: 200px;
    font-weight: 600;
    padding: 12px 20px;
    font-size: 1rem;
    border-radius: 6px;
}

/* Back to Home link styling */
.centered-container a.btn-link {
    color: #1a5276;
    text-decoration: underline;
    font-weight: 500;
    padding: 0;
    border: none;
    background: none;
    box-shadow: none;
}

/* Style register form inputs */
.centered-container .register-form .form-control {
    max-width: 300px;
    margin: 0 auto 15px auto;
    padding: 10px 12px;
    font-size: 1rem;
    border-radius: 6px;
    box-shadow: none;
    border: 1px solid #ccc;
    transition: border-color 0.3s ease;
}

.centered-container .register-form .form-control:focus {
    border-color: #1a5276;
    box-shadow: 0 0 0 0.1rem rgba(26, 82, 118, 0.25);
}

/* Style the register button */
.centered-container .register-form .btn-primary {
    display: block;
    margin: 10px auto;
    min-width: 200px;
    font-weight: 600;
    padding: 12px 20px;
    font-size: 1rem;
    border-radius: 6px;
}

/* Dashboard page styles */
body.dashboard-page {
    display: block;
    height: auto;
    margin: 0;
    background-color: #f9f9f9;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
}

.dashboard-container {
    width: 1200px;   
    max-width: unset; 
    flex-shrink: 0;       
    margin: 40px auto;
    padding: 0 40px 20px 40px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-height: 80vh;
    max-height: 80vh;
    overflow-y: auto;
    animation: fadeSlideIn 0.6s ease-out;
    position: relative;
}

body.no-animation .dashboard-container {
    animation: none;
}

/* Sticky table header for dashboard */
.table thead th {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    z-index: 10;
    border-top: 0px solid #dee2e6;
    box-shadow: 0 2px 2px -1px rgba(0,0,0,0.04);
}

.table tbody tr {
    background: #fff;
}

.dashboard-navbar {
    background-color: #1a5276;
    color: #ffffff;
    border-bottom: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 999;
    padding: 20px 24px;
}

.dashboard-navbar .navbar-title {
    font-size: 1.25rem;
    color: #ffffff;
}

body.dashboard-page {
    padding-top: 0px; /* optional, if you want extra breathing room below the navbar */
}

.pagination .page-item .page-link {
    padding: 6px 12px;
    font-size: 0.9rem;
}

.dashboard-title-container {
    margin-bottom: 2rem;
}

.dashboard-title-underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #1a5276 60%, #6c757d 100%);
    border-radius: 2px;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.dashboard-title-icon {
    line-height: 1;
    color: #1a5276;
}

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

th.col-entity,
td.col-entity {
    min-width: 160px; 
    white-space: nowrap;
}

body.variance-page .container {
    max-width: 800px;
    margin-top: 40px;
}

.custom-file-upload input[type="file"] {
    display: none;
}

#file-name {
    font-size: 0.95rem;
    font-style: italic;
    word-break: break-word;
    max-width: 100%;
    text-align: center;
}

.custom-file-upload label.btn {
    margin-bottom: 1rem;
    font-weight: 600;
}

.variance-title {
    font-family: 'Segoe UI', 'Arial', sans-serif;
    color: #2c3e50;
    letter-spacing: 0.5px;
}

@keyframes fadeSlideIn {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.nav-pills .nav-link {
    margin: 0 40px;
    color: #ffffff;
    margin-right: 0.5rem;
    border-radius: 50px;
    transition:
        outline 0.1s,
        box-shadow 0.1s,
        transform 0.1s;
    width: 110px; 
    text-align: center;
    display: inline-block;
    white-space: nowrap;
}

.nav-pills .nav-link.active {
    background-color: #ffffff;
    color: #1a5276;
    font-weight: 600;
    border-radius: 50px;
}

.nav-pills .nav-link:hover {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
    border-radius: 50px;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.table-btn.active {
    background-color: #0d6efd !important; 
    color: white !important;
    border-color: #0d6efd !important;
}

.ui-autocomplete {
    max-height: 200px;  
    overflow-y: auto;     
    overflow-x: hidden;     
    z-index: 9999 !important; 
    font-size: 0.95rem;    
    /* position: absolute */
}

.ui-autocomplete::-webkit-scrollbar {
    display: none;
}

.ui-autocomplete {
  -ms-overflow-style: none;  /* IE 10+ */
  scrollbar-width: none;     /* Firefox */
}

.ui-autocomplete::-webkit-scrollbar-thumb {
  background: transparent;
}

.content-shift-left {
    padding-left: 260px;
}

.sidebar-action-button {
    display: block;
    width: 100%;
    padding: 14px 18px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    background-color: #1a5276;
    color: #fff;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 3px 6px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.sidebar-action-button:hover {
    background-color: #154360;
    text-decoration: none;
    transform: translateY(-1px);
}

.sidebar-text-link {
    display: block;
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
    color: #1a5276;
    text-decoration: none;
    margin-top: 40px;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.sidebar-text-link:hover {
    color: #154360;
    text-decoration: underline;
}