body {
    font-family: "Open Sans", sans-serif;
    background: url(../img/body-bg-img.png) no-repeat left top / cover fixed;
    color: #444444;
}

body::before {
    content: '';
    position: absolute;
    z-index: 5000;
    top: 0;
    width: 100%;
    height: 7px;
    background: rgb(255, 146, 52);
    background: linear-gradient(90deg, rgba(255, 146, 52, 1) 0%, rgba(29, 130, 22, 1) 100%);
}

.login-bg {
    background: url(../img/login-bg.png) no-repeat left bottom !important;
    height: 900px;
    border-bottom: solid 4px #2B2D48;
}

/* Login page footer styles */
.login-bg .app-footer {
    font-size: 0.9rem;
    opacity: 0.8;
    padding: 5px;
    background-color: rgba(248, 249, 250, 0.9);
}

.login-cont {
    background: #fff;
    box-shadow: 0 0 10px #ddd;
    padding: 20px;
    border-radius: 10px;
    position: relative;
    top: 100px;
}

.logo-login {
    margin: 0 auto;
    padding: 0;
    width: 120px;
    height: 120px;
    margin-top: -75px;
    margin-bottom: 20px;
}

a {
    color: #4154f1;
    text-decoration: none;
}

a:hover {
    color: #717ff5;
    text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Roboto", sans-serif;
}

.form-control {
    border-radius: 4px;
    padding: 8px 12px;
    border: 1px solid #ddd;
}

.form-control:focus {
    border-color: #4154f1;
    box-shadow: 0 0 0 0.2rem rgba(65, 84, 241, 0.25);
}

.btn-success {
    background-color: #2B2D48;
    border-color: #2B2D48;
}

.btn-success:hover {
    background-color: #1e1f33;
    border-color: #1e1f33;
}

.btn-outline-success {
    color: #2B2D48;
    border-color: #2B2D48;
}

.btn-outline-success:hover {
    background-color: #2B2D48;
    border-color: #2B2D48;
}

/* Header Navigation Styles */
.header {
    transition: all 0.5s;
    z-index: 997;
    height: 60px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 0px 2px 20px rgba(1, 41, 112, 0.1);
    background-color: #fff;
    padding-top: 7px;
}

.navbar-brand img {
    width: 110px;
    height: auto;
    z-index: 50;
}

.navbar h4 {
    margin-left: 2rem;
    color: #012970;
    font-weight: 600;
    font-family: "Roboto", sans-serif;
}

.nav-link {
    color: #012970;
    font-weight: 500;
    padding: 10px 15px;
    font-size: 15px;
}

.nav-link i {
    margin-right: 5px;
}

.nav-link:hover, .nav-link:focus {
    color: #4154f1;
}

.nav-link.active {
    color: #4154f1;
    background: #f6f9ff;
    border-radius: 4px;
}

.dropdown-menu {
    border-radius: 4px;
    padding: 10px 0;
    animation-name: dropdown-animate;
    animation-duration: 0.2s;
    animation-fill-mode: both;
    border: 0;
    box-shadow: 0 5px 30px 0 rgba(82, 63, 105, 0.2);
    z-index: 1000;
    margin-top: 10px;
}

.dropdown-menu .dropdown-header,
.dropdown-menu .dropdown-footer {
    text-align: center;
    font-size: 15px;
    padding: 10px 25px;
}

.dropdown-menu .dropdown-divider {
    color: #a5c5fe;
    margin: 0;
}

.dropdown-menu .dropdown-item {
    font-size: 14px;
    padding: 10px 15px;
    transition: 0.3s;
    color: #012970;
}

.dropdown-menu .dropdown-item i {
    margin-right: 10px;
    font-size: 18px;
    line-height: 0;
    color: inherit;
}

.dropdown-menu .dropdown-item:hover {
    background-color: #f6f9ff;
    color: #4154f1;
}

.dropdown-menu .dropdown-item.active {
    background-color: #f6f9ff;
    color: #4154f1;
}

/* Masters submenu specific styles */
.navbar-nav .dropdown {
    position: relative;
}

.navbar-nav .dropdown-menu {
    position: absolute;
    left: 0;
    margin-top: 0;
    min-width: 200px;
    z-index: 1001;
}

.navbar-nav .dropdown-menu::before {
    content: "";
    width: 13px;
    height: 13px;
    background: #fff;
    position: absolute;
    top: -7px;
    left: 20px;
    transform: rotate(45deg);
    border-top: 1px solid #eaedf1;
    border-left: 1px solid #eaedf1;
    z-index: -1;
}

/* Main content positioning */
main, .container {
    padding-top: 20px;
    position: relative;
}

/* Ensure content is always below header */
body {
    padding-top: 60px; /* Height of header */
    padding-bottom: 80px; /* Space for fixed footer */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Page header positioning */
.page-header {
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid #dee2e6;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Main content layout */
main {
    padding-top: 67px; /* Header height (60px) + top gradient (7px) */
}

/* CRUD screens layout */
.crud-container {
    padding-top: 0;
}

/* Table styles */
.table-responsive {
    background: #fff;
    border-radius: 0.375rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.table thead th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #012970;
    border: none;
}

.table td {
    vertical-align: middle;
}

.navbar-nav .dropdown-menu .dropdown-item {
    white-space: nowrap;
    padding: 10px 20px;
}

.navbar-nav .dropdown-menu .dropdown-item i {
    width: 20px;
    text-align: center;
}

/* Profile dropdown specific styles */
.nav-profile .dropdown-menu {
    position: absolute;
    right: 0;
    left: auto;
    margin-top: 0;
}

.nav-profile .dropdown-menu::before {
    right: 20px;
    left: auto;
}

.nav-profile img {
    max-height: 36px;
    margin-right: 8px;
}

.nav-profile span {
    font-size: 14px;
    font-weight: 600;
    color: #012970;
}

@keyframes dropdown-animate {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@media (max-width: 1199px) {
    .header {
        padding: 15px;
    }

    .navbar-brand img {
        width: 75px;
    }

    .dropdown-menu {
        box-shadow: none;
        position: static !important;
        transform: none !important;
        width: 100%;
        margin-top: 10px !important;
    }

    .dropdown-menu::before {
        display: none;
    }

    .navbar-nav .dropdown-menu .dropdown-item {
        padding: 10px 15px;
    }
}

/* Dashboard Styles */
.wrapper {
    background: #fafafa;
    padding: 15px;
    margin-bottom: 30px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.card-title {
    padding: 0 0 15px 0;
    font-size: 18px;
    font-weight: 500;
    color: #000;
    font-family: "Roboto", sans-serif;
    margin: 0;
}

.info-card {
    padding: 15px;
    border: none;
    border-radius: 5px;
    background: #fff;
}

.info-card h6 {
    font-size: 18px;
    color: #333;
    font-weight: 700;
    margin: 0;
    padding: 0;
}

.info-card ul {
    margin: 0;
    padding: 0 0 0 15px;
}

.info-card ul li {
    margin: 0;
    padding: 0;
    font-size: 14px;
}

.card-icon {
    font-size: 32px;
    line-height: 0;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    flex-grow: 0;
}

.customers-card .card-icon {
    color: #EFAAB0;
    font-size: 60px;
}

.revenue-card .display-1 {
    color: #2eca6a;
    padding: 20px 0;
}

.back-to-top {
    position: fixed;
    visibility: hidden;
    opacity: 0;
    right: 15px;
    bottom: 15px;
    z-index: 99999;
    background: #4154f1;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    transition: all 0.4s;
}

.back-to-top i {
    font-size: 24px;
    color: #fff;
    line-height: 0;
}

.back-to-top:hover {
    background: #6776f4;
    color: #fff;
}

.back-to-top.active {
    visibility: visible;
    opacity: 1;
}

.table > :not(caption) > * > * {
    padding: 1rem;
}

.table thead {
    background: #f6f6fe;
}

.table thead th {
    border: 0;
    font-weight: 600;
    color: #012970;
}

/* Footer styles */
.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 12px;
    text-align: center;
    font-size: 13px;
    color: #6c757d;
    z-index: 996;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-footer:hover {
    background-color: #f0f2f5;
}
