html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Custom CSS form layout */
:root {
    --primary-color: #0f172a;
    --accent-color: #2563eb;
    --accent-hover: #1d4ed8;
    --bg-glass: rgba(255, 255, 255, 0.95);
    --transition-speed: 0.3s;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8fafc;
    color: #334155;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

/* --- Navbar Styling & Transitions --- */
.navbar-custom {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
    transition: all var(--transition-speed) ease;
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary-color) !important;
    letter-spacing: -0.5px;
    margin-right: 2rem;
}

    .navbar-brand img {
        max-height: 38px;
        width: auto;
        transition: transform var(--transition-speed) ease;
    }

        .navbar-brand img:hover {
            transform: scale(1.05);
        }

/* Menu Items & Hover Effects */
.navbar-nav .nav-item {
    position: relative;
    margin: 0 2px;
}

.navbar-nav .nav-link {
    color: #475569 !important;
    font-weight: 500;
    padding: 10px 14px !important;
    border-radius: 8px;
    transition: all var(--transition-speed) ease;
}

    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link.active {
        color: var(--accent-color) !important;
        background-color: rgba(37, 99, 235, 0.08);
        transform: translateY(-1px);
    }

/* Multilevel Dropdown Styling */
.dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1);
    background: #ffffff;
    padding: 8px;
    animation: fadeInMenu 0.25s ease forwards;
}

.dropdown-item {
    border-radius: 6px;
    padding: 8px 14px;
    font-weight: 500;
    color: #475569;
    transition: all 0.2s ease;
}

    .dropdown-item:hover,
    .dropdown-item.active {
        background-color: rgba(37, 99, 235, 0.08);
        color: var(--accent-color);
        transform: translateX(4px);
    }

.dropdown-submenu {
    position: relative;
}

    .dropdown-submenu .dropdown-menu {
        top: 0;
        left: 100%;
        margin-top: -6px;
        margin-left: 4px;
    }

/* --- Cards UI --- */
.card-custom {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    background: #ffffff;
    overflow: hidden;
}

    .card-custom:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 25px -5px rgba(37, 99, 235, 0.12);
    }

    .card-custom .card-header {
        background: transparent;
        border-bottom: 1px solid #f1f5f9;
        font-weight: 600;
        padding: 16px 20px;
    }

    .card-custom .card-body {
        padding: 20px;
    }

    .card-custom .card-footer {
        background: transparent;
        border-top: 1px solid #f1f5f9;
        padding: 12px 20px;
    }

/* --- Sticky Footer --- */
.footer-custom {
    margin-top: auto;
    background-color: var(--primary-color);
    color: #94a3b8;
    padding: 20px 0;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

    .footer-custom a {
        color: #cbd5e1;
        text-decoration: none;
        transition: color 0.2s;
    }

        .footer-custom a:hover {
            color: #ffffff;
        }

@keyframes fadeInMenu {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 992px) {
    .navbar-nav .dropdown:hover > .dropdown-menu {
        display: block;
    }

    .dropdown-submenu:hover > .dropdown-menu {
        display: block;
    }
}