/* Global Styles */
body {
    background-color: #f4f6f9;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 0.85rem;
    /* Reduced base font size */
    color: #343a40;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: #495057;
    margin-bottom: 1rem;
    font-weight: 600;
}

h1 {
    font-size: 1.75rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1rem;
}

a {
    text-decoration: none;
}

/* Navbar */
.navbar {
    box-shadow: 0 4px 6px rgba(0, 0, 0, .1);
    padding: 0.5rem 1rem;
    /* Balanced padding */
}

.bg-custom {
    background: linear-gradient(135deg, #004e92 0%, #000428 100%);
}

.navbar-brand {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    margin-right: 2rem;
    /* Ensure space between brand and menu */
}

.navbar-nav {
    align-items: center;
    /* Force all nav items to center vertically */
}

.nav-item {
    display: flex;
    align-items: center;
    margin: 0 5px;
    /* Consistent horizontal spacing */
}

.nav-link {
    font-size: 0.9rem;
    transition: all 0.2s ease-in-out;
    opacity: 0.9;
    display: flex;
    flex-direction: column;
    /* Stack Icon and Text */
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.5rem 1rem !important;
    /* Increased horizontal padding for touch targets */
    height: 100%;
    min-width: 80px;
    /* Minimum width for consistency */
}

.nav-link i {
    font-size: 1.2rem;
    margin-right: 0 !important;
    /* Remove right margin since it's stacked */
    margin-bottom: 2px;
}

.nav-link:hover {
    transform: translateY(-2px);
    opacity: 1;
    color: #fff !important;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
    margin-top: 10px;
    /* Slight gap from nav */
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #004e92;
}

/* User Profile Section in Navbar */
.navbar .d-flex.align-items-center {
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 15px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0 1px rgba(0, 0, 0, .125), 0 1px 3px rgba(0, 0, 0, .2);
    margin-bottom: 1.5rem;
    border-radius: 0.35rem;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, .05);
    font-weight: 600;
    padding: 0.75rem 1rem;
}

.card-body {
    padding: 1rem;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: #6c757d;
    border-top: none;
    background-color: #f8f9fa;
}

.table td {
    vertical-align: middle;
    padding: 0.5rem 0.75rem;
    /* Tighter padding */
}

.table-responsive {
    border-radius: 0.35rem;
    overflow: hidden;
    box-shadow: 0 0 1px rgba(0, 0, 0, .125), 0 1px 3px rgba(0, 0, 0, .2);
    background: #fff;
}

/* Table Text Truncation */
.text-truncate-cell {
    max-width: 200px;
    /* Adjust as needed */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: bottom;
}

/* Buttons */
.btn {
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.5rem 1rem;
    font-size: 1rem;
}

/* Login Page */
.login-page {
    background: #e9ecef;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    width: 360px;
    background: #fff;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, .15);
}

.login-logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
    color: #0d6efd;
}

/* Utilities */
.text-muted {
    font-size: 0.8rem;
}

.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Dashboard Specifics */
.dashboard-stat-card {
    border-left: 4px solid #0d6efd;
}

.dashboard-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
}

.dashboard-stat-label {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 1px;
    color: #6c757d;
}