/* =====================================================
   BASE LAYOUT
===================================================== */
html {
    overflow-y: scroll;
}

body {
    background-color: #f3f6f9;
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    color: #1f2937;
    line-height: 1.6;
}

/* =====================================================
   NAVBAR
===================================================== */

.navbar {
    min-height: 64px;
    z-index: 1030;
    background: rgba(255, 255, 255, 0.92);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.navbar-logo {
    height: 42px;
}

@media (max-width: 576px) {
    .navbar-logo {
        height: 36px;
    }
}

.navbar-title {
    font-size: 1.05rem;
    line-height: 1.2;
}

.navbar-title-mobile {
    font-size: 0.95rem;
}

.nav-link-public {
    color: #146c43;
    text-decoration: none;
    transition: 0.2s ease;
}

.nav-link-public:hover {
    color: #0f5132;
}

.navbar-toggler:focus,
.btn:focus {
    box-shadow: none;
}

.navbar-avatar {
    width: 36px;
    height: 36px;
}

/* Mobile collapse */
/* ===== Public Navbar Stable Collapse ===== */

@media (max-width: 767.98px) {

    .public-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #ffffff;
        border-top: 1px solid #e9ecef;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);

        /* Animation base state */
        opacity: 0;
        transform: translateY(-16px);

        transition: opacity 0.2s ease-out,
            transform 0.2s ease-out;

        pointer-events: none;

        /* iOS smoothness */
        will-change: transform, opacity;
        backface-visibility: hidden;
    }

    .public-collapse.show {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .public-collapse .navbar-nav {
        padding: 20px 24px;
        gap: 14px;
    }

    /* Disable Bootstrap height animation */
    .collapsing {
        height: auto !important;
        transition: none !important;
    }

}

.btn:focus {
    box-shadow: none;
}

@media (max-width: 576px) {
    .navbar-logo {
        height: 36px;
    }
}

@media (max-width: 767.98px) {
    .navbar-collapse {
        background: #ffffff;
        padding: 15px 0;
        border-top: 1px solid #e9ecef;
    }
}

/* =====================================================
   APP STRUCTURE
===================================================== */

.app-layout {
    display: flex;
    min-height: calc(100vh - 64px);
}

.app-content {
    flex: 1;
    padding: 24px;
    min-width: 0;
    background-color: #f3f6f9;
}

/* =====================================================
   SIDEBAR
===================================================== */

.sidebar {
    width: 260px;
    padding: 16px;
    background: linear-gradient(to bottom, #f8fafc, #f1f5f9);
    border-right: 1px solid #e5e7eb;
    box-shadow: 2px 0 6px rgba(0, 0, 0, .03);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    padding-bottom: 2rem;
    transition: width .25s ease;
}

.mobile-sidebar .sidebar {
    width: 100%;
    border-right: none;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, .2);
    border-radius: 10px;
}

/* Sidebar Nav */

.sidebar h6 {
    font-size: .7rem;
    letter-spacing: .08em;
    margin: 26px 0 8px;
    padding-left: 6px;
    color: #6b7280;
}

.sidebar .nav {
    gap: 4px;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: .9rem;
    font-weight: 500;
    color: #1f2937;
    transition: all .2s ease;
}

.sidebar .nav-link i {
    font-size: 1rem;
    opacity: .8;
    transition: all .2s ease;
}

.sidebar .nav-link:hover {
    background-color: #eef2f7;
    transform: translateX(2px);
}

.sidebar .nav-link:hover i {
    opacity: 1;
    transform: scale(1.05);
}

.sidebar .nav-link.active {
    background-color: #e6f4ea;
    color: #15803d;
    font-weight: 600;
    position: relative;
}

.sidebar .nav-link.active::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 6px;
    bottom: 6px;
    width: 3px;
    background: #16a34a;
    border-radius: 6px;
}

/* Collapsed Sidebar */

body.sidebar-collapsed .sidebar-desktop .sidebar {
    width: 80px !important;
}

body.sidebar-collapsed .sidebar-desktop .sidebar .nav-link span,
body.sidebar-collapsed .sidebar-desktop .sidebar h6 {
    display: none;
}

body.sidebar-collapsed .sidebar-desktop .sidebar .nav-link {
    justify-content: center;
}

body.sidebar-collapsed .sidebar-desktop .sidebar .nav-link i {
    margin-right: 0 !important;
}

/* =====================================================
   PAGE WRAPPER
===================================================== */

.page-wrapper {
    background: #fff;
    border: 1px solid #edf2f7;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .03);
}

.page-header {
    border-bottom: 1px solid #f1f3f5;
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.page-title {
    font-size: 1.3rem;
    font-weight: 600;
}

.page-subtitle {
    font-size: .85rem;
    color: #6b7280;
}

.link-hover:hover {
    text-decoration: underline;
}

/* =====================================================
   GLOBAL CARDS
===================================================== */

.card {
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .03);
    transition: all .2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .06);
}

/* =====================================================
   STATUS SYSTEM
===================================================== */

.status-not-started {
    border-left: 4px solid #9ca3af;
}

.status-ongoing {
    border-left: 4px solid #2563eb;
}

.status-completed {
    border-left: 4px solid #16a34a;
}

.status-overdue {
    border-left: 4px solid #dc2626;
}

.status-not-started .badge,
.status-ongoing .badge,
.status-completed .badge,
.status-overdue .badge {
    transition: all .2s ease;
}

.status-not-started .badge:hover,
.status-ongoing .badge:hover,
.status-completed .badge:hover,
.status-overdue .badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

/* =====================================================
   PROJECT + TASK CARDS
===================================================== */

.project-card,
.task-card {
    background-color: #fafbfc;
    animation: fadeInCard .3s ease-in-out;
}

.project-card:hover,
.task-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .06);
}

.project-card .btn-light,
.task-card .btn-light {
    border: 1px solid #e5e7eb;
    background: #fff;
    transition: all .2s ease;
}

.project-card .btn-light:hover,
.task-card .btn-light:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.project-card .progress,
.task-card .progress {
    height: 8px;
    border-radius: 8px;
    background-color: #e5e7eb;
}

.progress-bar {
    border-radius: 8px;
}

/* =====================================================
   STAT TILES
===================================================== */

.stat-tile {
    min-height: 110px;
    border-radius: 16px;
    padding: 22px 24px;
    color: #fff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .05);
    transition: all .2s ease;
    cursor: pointer;
}

.stat-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, .08);
}

.tile-blue {
    background: linear-gradient(135deg, #2563eb, #1e40af);
}

.tile-green {
    background: linear-gradient(135deg, #16a34a, #166534);
}

.tile-orange {
    background: linear-gradient(135deg, #f59e0b, #b45309);
}

.tile-red {
    background: linear-gradient(135deg, #dc2626, #7f1d1d);
}

.stat-label {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    opacity: .85;
    font-weight: 600;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    margin-top: 8px;
    letter-spacing: -.5px;
}

/* =====================================================
   LOGIN PAGE
===================================================== */

/* ================= PREMIUM LOGIN ================= */

.login-body {
    min-height: 100vh;
    background:
        linear-gradient(rgba(20,108,67,0.05), rgba(20,108,67,0.05)),
        radial-gradient(circle at 20% 30%, rgba(20,108,67,0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(0,0,0,0.04) 0%, transparent 40%);
    display: flex;
    flex-direction: column;
}

.login-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 20px;
    padding: 45px 35px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.08);
    animation: loginFade 0.6s ease;
}

.login-logo {
    height: 70px;
}

.login-title {
    font-weight: 600;
    color: #146c43;
}

.login-subtitle {
    font-size: 0.9rem;
    color: #6b7280;
}

.login-input {
    border-radius: 12px;
    padding: 12px 14px;
}

.login-input:focus {
    border-color: #146c43;
    box-shadow: 0 0 0 .15rem rgba(20,108,67,.15);
}

.login-btn {
    background: #146c43;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 12px;
    font-weight: 500;
    position: relative;
    transition: all 0.2s ease;
}

.login-btn:disabled,
.login-btn.disabled {
    background-color: #146c43 !important;
    color: #ffffff !important;
    opacity: 0.9;
    cursor: not-allowed;
}

.login-btn:hover {
    background: #115c39;
    color: #ffffff;
    transform: translateY(-2px);
}

.login-btn .spinner-border {
    color: #ffffff;
}

.login-security {
    font-size: 0.85rem;
    color: #6b7280;
}

.login-security i {
    color: #146c43;
    margin-right: 6px;
}

.login-footer {
    padding: 15px;
    font-size: 0.8rem;
    color: #6b7280;
}

.login-back-link {
    font-size: 0.9rem;
    color: #146c43;
    text-decoration: none;
    transition: all 0.2s ease;
}

.login-back-link:hover {
    text-decoration: underline;
    color: #0f5132;
}

.login-title {
    font-family: 'Ibarra Real Nova', serif;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: none;
}

/* Entrance Animation */
@keyframes loginFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================================
   FLOATING BUTTON
===================================================== */

.mobile-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 1050;
    transition: all .2s ease;
}

.mobile-fab:hover {
    transform: scale(1.05);
}

/* =====================================================
   ANIMATION
===================================================== */

@keyframes fadeInCard {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

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

/* =====================================================
   LOGIN SECTION
===================================================== */

.login-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.9rem;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6b7280;
    transition: 0.2s ease;
}

.password-toggle:hover {
    color: #146c43;
}

.password-toggle i {
    transition: transform 0.2s ease;
}

.password-toggle:hover i {
    transform: scale(1.1);
}

/* ================= HERO SLIDESHOW ================= */

.hero-section {
    margin-bottom: 60px;
}

.hero-slide {
    position: relative;
    height: 480px;
}

.hero-bg {
    width: 100%;
    height: 480px;
    object-fit: cover;
    filter: brightness(0.75);
}

/* Gradient for readability */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.65),
            rgba(0, 0, 0, 0.1));
    display: flex;
    align-items: flex-end;
}

.hero-bottom-content {
    padding-bottom: 70px;
    max-width: 750px;
    color: #ffffff;
}

.hero-main-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.7;
}

/* Carousel indicators styling */
.carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {

    .hero-slide,
    .hero-bg {
        height: 320px;
    }

    .hero-bottom-content {
        padding-bottom: 30px;
    }

    .hero-main-title {
        font-size: 0.95rem;
    }

    .hero-subtitle {
        font-size: 0.75rem;
    }
}

/* ================= SECTIONS ================= */

.section-title {
    font-weight: 600;
    color: #146c43;
    margin-bottom: 15px;
}

.section-text {
    max-width: 700px;
}

.feature-card {
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    transition: 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

/* ================= PUBLIC FOOTER ================= */

.public-footer {
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
}

.footer-title {
    font-weight: 600;
    color: #146c43;
    margin-bottom: 12px;
}

.footer-text {
    font-size: 0.9rem;
    color: #6b7280;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    text-decoration: none;
    color: #374151;
    transition: 0.2s ease;
}

.footer-links a:hover {
    color: #146c43;
}

.footer-bottom {
    background: #e5e7eb;
    font-size: 0.85rem;
    color: #374151;
}

/* SLIDER PREVIEW */
.slide-image-wrapper {
    cursor: pointer;
    overflow: hidden;
    border-radius: 12px;
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.slide-image-wrapper:hover .slide-overlay {
    opacity: 1;
}

/* =====================================================
   META PILL (Project / Task Meta Info)
===================================================== */

.meta-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 6px 14px;

    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;

    border-radius: 999px;

    background: #e6f4ea;        /* Soft MBHTE green tint */
    color: #146c43;             /* Primary brand green */

    width: fit-content;
    margin: 0 auto;

    transition: all 0.2s ease;
}

.meta-pill:hover {
    background: #d1fae5;
    transform: translateY(-1px);
}