/* ============================================
   GLOBAL STYLES
   ============================================ */
/* DM Sans font family for entire page */
:root {
    --navbar-height: 80px; /* Logo height (55px) + padding top (0.75rem = 12px) + padding bottom (0.75rem = 12px) + border (1px) */
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'DM Sans', sans-serif;
    background-color: #f4f7f6;
}

/* ============================================
   TOP NAVIGATION BAR
   ============================================ */
.top-navbar {
    width: 100%;
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 2rem;
    max-width: 100%;
    box-sizing: border-box;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.navbar-brand:hover {
    opacity: 0.8;
}

.navbar-logo {
    width: 140px;
    height: auto;
    object-fit: contain;
}

/* Desktop vs Mobile logo visibility */
.navbar-logo-desktop {
	display: inline;
}
.navbar-logo-mobile {
	display: none;
}

.navbar-right {
    display: flex;
    align-items: center;
    /* gap: 0.5rem; */
}

/* Icon Buttons Group */
.navbar-icons-group {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    border-radius: 20px;
    padding: 0.15rem;
}

.language-dropdown {
    position: relative;
}

.navbar-language-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    background: transparent;
    border: none;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100px;
    justify-content: flex-start;
}

.navbar-language-btn .bi {
    font-size: 1.35rem;
    color: #1254a1;
    transition: color 0.3s ease;
}

.navbar-language-btn:focus,
.navbar-language-btn:hover {
    color: #1254a1;
    background-color: rgba(18, 84, 161, 0.08);
}

.navbar-language-btn:focus .bi,
.navbar-language-btn:hover .bi {
    color: #0d4a8a;
}

.language-label {
    white-space: nowrap;
}

.language-dropdown .dropdown-menu {
    min-width: 8rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    padding: 0.25rem 0;
}

.language-dropdown:hover .dropdown-menu,
.language-dropdown:focus-within .dropdown-menu {
    display: block;
}

.language-dropdown .dropdown-item {
    padding: 0.5rem 1rem;
}

.language-dropdown .dropdown-item.active {
    background-color: rgba(18, 84, 161, 0.12);
    color: #0d4a8a;
    font-weight: 600;
}

.language-dropdown .dropdown-item:active {
    background-color: #1254a1;
    color: #ffffff;
}

/* Navbar Separator */
.navbar-separator {
    width: 1px;
    height: 32px;
    background-color: #e0e0e0;
    margin: 0 0.5rem;
}

/* ============================================
   NAVBAR ICON BUTTONS
   ============================================ */
.navbar-icon-btn {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 0.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    transition: all 0.3s ease;
    color: #666;
    font-size: 1.2rem;
}

.navbar-icon-btn:hover {
    background-color: #1253a2;
    border-color: #1253a2;
    color: #ffffff;
    transform: scale(1.05);
}

.navbar-icon-btn:active {
    transform: scale(0.95);
    background-color: #1253a2;
    border-color: #1253a2;
    color: #ffffff;
}

.navbar-icon-btn i {
    display: block;
}

/* ============================================
   PROFILE SECTION
   ============================================ */
.profile-section {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    padding: 0.2rem 0.65rem 0.2rem 0.2rem;
    transition: all 0.3s ease;
}

.profile-avatar-btn {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    flex-shrink: 0;
}

.profile-avatar-btn:hover {
    transform: scale(1.05);
    border-color: #1254a1;
}

.profile-avatar-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 4px rgba(18, 84, 161, 0.15);
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.profile-avatar-initials {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 0.95rem;
	background: #1254a1;
	color: #ffffff;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    line-height: 1.2;
}

.profile-username {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    font-family: 'DM Sans', sans-serif;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.profile-section:hover .profile-username {
    color: #1254a1;
}

/* Profile dropdown (matching Frontend-UI Topbar) */
.profile-section {
	position: relative;
}
.profile-dropdown {
	position: absolute;
	top: calc(100% + 0.65rem);
	right: 0;
	width: 260px;
	background: #ffffff;
	border: 1px solid #e0e0e0;
	border-radius: 14px;
	box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
	z-index: 950;
	overflow: hidden;
}
.profile-dropdown.is-open {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.profile-dropdown-header {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0.6rem 0.75rem;
	background: #fafafa;
}
.profile-dropdown-avatar {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	overflow: hidden;
	border: 1px solid #e0e0e0;
	flex: 0 0 42px;
}
.profile-dropdown-avatar .profile-avatar-initials {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 0.95rem;
	background: #1254a1;
	color: #ffffff;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}
.profile-dropdown-meta {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.profile-dropdown-name {
	font-family: 'DM Sans', sans-serif;
	font-size: 0.95rem;
	font-weight: 500;
	color: #0f223a;
	line-height: 1.2;
}
.profile-dropdown-role {
	font-family: 'DM Sans', sans-serif;
	font-size: 0.8rem;
	font-weight: 400;
	color: #6b7280;
	line-height: 1.2;
}
.profile-dropdown-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
}
.profile-dropdown-separator {
	height: 1px;
	background-color: #e6e8ef;
	margin: 0.25rem 0;
}
.profile-dropdown-item {
	width: 100%;
	text-align: left;
	background: transparent;
	border: none;
	padding: 0.35rem 0.75rem;
	font-size: 0.9rem;
	font-weight: 400;
	color: #1d1d1f;
	font-family: 'DM Sans', sans-serif;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	transition: background-color 0.2s ease, color 0.2s ease;
}
.profile-dropdown-item i {
	font-size: 1.1rem;
	color: #1254a1;
}
.profile-dropdown-item:hover i,
.profile-dropdown-item:focus i {
	color: #0d3d75;
}
.profile-dropdown-item:hover,
.profile-dropdown-item:focus {
	background-color: rgba(18, 84, 161, 0.12);
    color: #1254a1;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    width: 100%;
    height: calc(100vh - var(--navbar-height));
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
	/* Hide scrollbars but keep scrolling */
	scrollbar-width: none; /* Firefox */
}

.main-content::-webkit-scrollbar {
	width: 0;
	height: 0;
	display: none; /* Chrome, Safari, Edge */
}

/* Optional: hide page scrollbars if page height exceeds viewport */
html, body {
	-ms-overflow-style: none; /* IE/Edge */
	scrollbar-width: none; /* Firefox */
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
	width: 0;
	height: 0;
	display: none;
}

/* Page enter transition */
body.page-enter {
	animation: pageFadeIn 420ms cubic-bezier(0.2, 0.6, 0.2, 1) both;
}

@keyframes pageFadeIn {
	0% {
		opacity: 0;
		transform: translateY(8px) scale(0.985);
		filter: blur(2px);
	}
	60% {
		filter: blur(0.5px);
	}
	100% {
		opacity: 1;
		transform: translateY(0) scale(1);
		filter: blur(0);
	}
}

/* Shared transition overlay (match login) */
.page-transition-layer {
	position: fixed;
	inset: 0;
	background: linear-gradient(180deg, #ffffff, #f8fafc);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.4s ease;
	z-index: 1600;
}
.page-transition-layer.open {
	opacity: 1;
	pointer-events: auto;
}
/* ============================================
   TOP CONTAINER
   ============================================ */
.top-container {
    width: 100%;
    height: 34%;
    background: linear-gradient(135deg, #1255a1d6 0%, #1254a1 100%), url('../../Common-Components/asserts/Assetbg 1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-container-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 700px;
    width: 100%;
    padding: 0 2rem;
}

.top-container-heading {
    color: #ffffff;
    font-size: 3rem;
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    text-align: center;
    margin: 0 0 1rem 0;
    padding: 0;
    width: 100%;
}

.top-container-line {
    width: 60px;
    height: 2px;
    background-color: #ffffff;
    margin: 0 auto;
}

/* ============================================
   MODULES INTRO
   ============================================ */
.modules-intro-container {
    width: 100%;
    display: flex;
    justify-content: center;
    position: relative;
    transform: translateY(-50%);
    margin-bottom: -2rem;
    padding: 0 2rem;
    box-sizing: border-box;
}

.modules-intro-text {
    background-color: rgba(255, 255, 255, 0.967);
    border: 1px solid #e0e0e0;
    border-radius: 14px;
    padding: 0.55rem 2.5rem;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1254a1;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ============================================
   CARDS SECTION
   ============================================ */
.cards-container {
    width: 80%;
    /* max-width: 1200px; */
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 3rem 2rem 2rem 2rem;
    box-sizing: border-box;
}

.product-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: start;
    text-align: start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.product-card.product-card--frozen {
	filter: grayscale(100%);
	opacity: 0.7;
	cursor: default;
	position: relative;
}
.product-card.product-card--frozen::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(255,255,255,0.35), rgba(255,255,255,0.1));
	border-radius: 12px;
	pointer-events: none;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.card-icon {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
}

.product-card:nth-child(1) .card-icon {
    color: #1254a1;
}

.product-card:nth-child(2) .card-icon {
    color: #22c55e;
}

.product-card:nth-child(3) .card-icon {
    color: #3b82f6;
}

.card-icon i {
    font-size: 2.5rem;
}

.card-title {
    color: #333;
    font-size: 1.8rem;
    font-weight: 400;
    font-family: 'DM Sans', sans-serif;
    margin: 0 0 1rem 0;
    line-height: 1.3;
}

.card-description {
    color: #666;
    font-size: 0.95rem;
    font-weight: 400;
    font-family: 'DM Sans', sans-serif;
    margin: 0 0 1.5rem 0;
    line-height: 1.6;
    text-align: left;
    flex-grow: 1;
}

.card-cta {
    color: #1254a1;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    align-self: flex-start;
    transition: color 0.3s ease;
}

.card-cta:hover {
    color: #0d4a8a;
}

.card-cta i {
    font-size: 0.8rem;
}

.card-cta-disabled {
	color: #8a8f99;
	font-size: 0.9rem;
	font-weight: 500;
	font-family: 'DM Sans', sans-serif;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	align-self: flex-start;
	cursor: default;
	pointer-events: none;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
/* Mobile devices */
@media (max-width: 768px) {
    :root {
        --navbar-height: 70px; /* Logo height (45px) + padding top (0.75rem = 12px) + padding bottom (0.75rem = 12px) + border (1px) */
    }

    .navbar-container {
        padding: 0.75rem 1rem;
    }

    .navbar-logo {
        width: 80px;
        height: auto;
    }

	/* Swap to mobile logo on tablet/mobile */
	.navbar-logo-desktop {
		display: none;
	}
	.navbar-logo-mobile {
		display: inline;
		width: 80px;
		height: auto;
    }

    .navbar-icon-btn {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
        padding: 0.35rem;
    }

    .navbar-language-btn {
        width: auto;
        padding: 0.3rem 0.5rem;
        justify-content: center;
    }

    .navbar-language-btn .language-label {
        display: none;
    }

    .profile-avatar-btn {
        width: 38px;
        height: 38px;
        border-width: 2px;
        padding: 2px;
    }

    .profile-section {
        gap: 0.2rem;
        padding: 0.1rem 0.45rem 0.1rem 0.1rem;
    }

    .profile-info {
        display: none;
    }

    /* .navbar-right {
        gap: 0.4rem;
    } */

    .navbar-icons-group {
        gap: 0.15rem;
        padding: 0.1rem;
    }

    .navbar-separator {
        height: 24px;
    }


    .top-container {
        height: 30%;
    }

    .top-container {
        height: 26%;
    }

    .top-container-heading {
        font-size: 2.2rem;
        padding: 0 1rem;
    }

    .modules-intro-container {
        padding: 0 1rem;
        margin-bottom: -1.25rem;
    }

    .modules-intro-text {
        font-size: 1rem;
        padding: 0.75rem 2rem;
    }

    .cards-container {
        width: 100%;
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 2rem 1rem;
    }

    .product-card {
        padding: 1.5rem;
    }

    .card-icon {
        width: 70px;
        height: 70px;
    }

    .card-icon i {
        font-size: 2rem;
    }

    .card-title {
        font-size: 1.3rem;
    }

    .card-description {
        font-size: 0.9rem;
    }
}

/* Small mobile devices */
@media (max-width: 576px) {
    :root {
        --navbar-height: 52px; /* Logo height (35px) + padding top (0.5rem = 8px) + padding bottom (0.5rem = 8px) + border (1px) */
    }

    .navbar-container {
        padding: 0.5rem 1rem;
    }

    .navbar-logo {
        width: 60px;
        height: auto;
    }

	/* Ensure mobile logo shows on small phones */
	.navbar-logo-desktop {
		display: none;
	}
	.navbar-logo-mobile {
		display: inline;
		width: 60px;
		height: auto;
    }

    .navbar-icon-btn {
        width: 30px;
        height: 30px;
        font-size: 1rem;
        padding: 0.3rem;
    }

    .profile-avatar-btn {
        width: 38px;
        height: 38px;
        border-width: 2px;
        padding: 3px;
    }

    .profile-section {
        gap: 0.4rem;
        padding: 0.1rem 0.45rem 0.1rem 0.1rem;
    }

    .profile-username {
        font-size: 0.95rem;
    }

    /* .navbar-right {
        gap: 0.3rem;
    } */

    .navbar-icons-group {
        gap: 0.1rem;
        padding: 0.1rem;
    }

    .navbar-separator {
        height: 22px;
        margin: 0 0.3rem;
    }

    .top-container {
        height: 26%;
    }

    .top-container {
        height: 22%;
    }

    .top-container-heading {
        font-size: 1.9rem;
        padding: 0 0.75rem;
    }

    .modules-intro-container {
        padding: 0 0.75rem;
        margin-bottom: -1rem;
    }

    .modules-intro-text {
        font-size: 0.95rem;
        padding: 0.65rem 1.75rem;
    }

    .cards-container {
        width: 100%;
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1.5rem 0.75rem;
    }

    .product-card {
        padding: 1.25rem;
    }

    .card-icon {
        width: 60px;
        height: 60px;
    }

    .card-icon i {
        font-size: 1.75rem;
    }

    .card-title {
        font-size: 1.2rem;
    }

    .card-description {
        font-size: 0.85rem;
    }
}

/* ============================================
   PASSWORD CHANGE MODAL STYLES
   ============================================ */
/* Custom modal styling to match the application theme */
.modal-content {
    border: 1px solid #e0e0e0;
    border-radius: 14px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #e0e0e0;
    padding: 1rem 1.5rem;
    background: linear-gradient(180deg, #ffffff, #fafafa);
}

.modal-title {
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    color: #1254a1;
    font-size: 1.1rem;
}

    .modal-title i {
        color: #1254a1;
    }

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e0e0e0;
    padding: 1rem 1.5rem;
}

/* Form styling */
.form-label {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

.form-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
}

.form-control {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

    .form-control:focus {
        border-color: #1254a1;
        box-shadow: 0 0 0 3px rgba(18, 84, 161, 0.1);
        outline: none;
    }

.input-group {
    display: flex;
    align-items: center;
}

    .input-group .form-control {
        border-right: none;
        border-radius: 8px 0 0 8px;
    }

    .input-group .btn-outline-secondary {
        border-left: none;
        border-radius: 0 8px 8px 0;
        border: 1px solid #e0e0e0;
        background-color: #f8f9fa;
        color: #666;
        padding: 0.75rem;
        transition: all 0.3s ease;
    }

        .input-group .btn-outline-secondary:hover {
            background-color: #e9ecef;
            color: #333;
            border-color: #1254a1;
        }

        .input-group .btn-outline-secondary:active {
            background-color: #1254a1;
            color: #ffffff;
            border-color: #1254a1;
        }

/* Error styling */
.invalid-feedback {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    color: #dc3545;
    display: none;
    margin-top: 0.25rem;
}

.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

    .form-control.is-invalid:focus {
        border-color: #dc3545;
        box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
    }

/* Button styling */
.btn-primary {
    background-color: #1254a1;
    border-color: #1254a1;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

    .btn-primary:hover {
        background-color: #0d4a8a;
        border-color: #0d4a8a;
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(18, 84, 161, 0.2);
    }

    .btn-primary:active {
        transform: translateY(0);
        box-shadow: 0 2px 4px rgba(18, 84, 161, 0.2);
    }

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

    .btn-secondary:hover {
        background-color: #5c636a;
        border-color: #5c636a;
        transform: translateY(-1px);
    }

/* Modal responsiveness */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 1rem;
    }

    .modal-content {
        border-radius: 12px;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-footer {
        padding: 1rem;
    }

    .form-control {
        font-size: 1rem;
        padding: 0.875rem;
    }

    .input-group .btn-outline-secondary {
        padding: 0.875rem;
    }

    .btn-primary, .btn-secondary {
        padding: 0.875rem 1.25rem;
        font-size: 1rem;
    }
}

/* Animation for modal content */
.modal-content {
    animation: modalSlideIn 0.3s cubic-bezier(0.2, 0.6, 0.2, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
