

.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    height: 60px;
    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-5);
    background: #fff;
    border-bottom: 1px solid var(--border);
}
#sidebar li:hover {
    background: #2c3e50;
}

#content {
    flex: 1;
    padding: 5px;
    /* padding: 20px; */
    background: #fff;
    /* overflow-y: auto; */
    scroll-behavior: smooth;
    height:auto;
} 


/* ICON FIX */
.icon {
    position: relative;
    font-size: 18px;
    cursor: pointer;
}
.icon i {
    width: 18px;
    font-size: 14px;
    text-align: center;
    opacity: 0.85;
}
/* BADGE */
.badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: red;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 50%;
}

/* USER */
.user {
    display: flex;
    align-items: center;
    gap: 6px;
}

.user img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}


/* Trigger */
.user-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.user-trigger img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

/* Dropdown */
.user-dropdown {
    position: absolute;
    right: 0;
    top: 45px;

    width: 220px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);

    display: none;
    overflow: hidden;
    z-index: 1000;
}

/* Header */
.dropdown-header {
    padding: 12px;
    background: #f8fafc;
}

.dropdown-header small {
    display: block;
    color: #64748b;
    font-size: 12px;
}

/* Divider */
.dropdown-divider {
    height: 1px;
    background: #e2e8f0;
}

/* Links */
.user-dropdown a {
    display: block;
    padding: 10px 14px;
    text-decoration: none;
    color: #1e293b;
    font-size: 14px;
}

.user-dropdown a:hover {
    background: #f1f5f9;
}

/* Logout */
.logout {
    color: #ef4444;
}
.user-menu {
    position: relative;
}

.user-dropdown {
    position: absolute;
    right: 0;
    top: 45px;

    display: none;
    z-index: 9999; /* VERY IMPORTANT */
}

/* SHOW */
.user-dropdown.show {
    display: block;
}


.app-container {
    display: flex;
    margin-top: 60px; 
    height: calc(100vh - 60px); 
    overflow:hidden;

    position: relative;
    z-index: 1;
}

.main-content {
    flex:1;
    padding: var(--space-6);
    /* width: calc(100% - 240px); */
    padding-bottom: 80px !important;
    transition: margin-left 0.3s ease;
    right:0;
    overflow-y: auto;
    /* width:100%; */
    margin-left: 240px;   
    height:100%;
    scroll-behavior: smooth;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    margin-right: 10px;
}
/* LEFT */
.left-section {
    width: 220px; 
    font-weight: 600;
}
.left-section {
    display: flex;
    align-items: center;
    gap: 10px;
}
/* CENTER */
.center-section {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* RIGHT */
.right-section {
    width: 220px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
}
.center-section input {
    width: 420px;
    max-width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    
}
/* .sidebar {
    width: 240px;
    background: #1e293b;
    color: #cbd5f5;
    height: 100vh;
    padding: 15px;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    overflow: hidden;
    overflow-y: auto;
} */

 .sidebar {
    width: 240px;

    position: fixed;
    top: 60px;          
    bottom: 0px;       
    left: 0;
    background: var(--bg-sidebar);
    color: #cbd5e1;
    height: calc(100vh - 60px);

    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    overflow: hidden;
    /* overflow-y: auto; */
    /* min-height: 100%; */
    flex-shrink: 0;

} 

.sidebar-menu-wrapper {
    flex: 1;
    overflow-y: auto;
}
/* Title */
.sidebar h3 {
    font-size: 13px;
    padding: 10px 20px;
    color: #94a3b8;
    text-transform: uppercase;
}

/* Reset */
/* .sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
} */

.sidebar-menu li {
    display: block;
}


/* Left part */
.menu-left {
    display: flex;
    align-items: center;
    gap: 10px;
    color:#fff;
}

/* Icon */
.icon {
    font-size: 10px;
    opacity: 0.7;
}
.icon i {
    font-size: 14px;
    width: 18px;
}





/* Arrow */
.arrow {
    font-size: 12px;
    transition: 0.2s;
    color:#fff;
}

/* Rotate arrow */
.has-submenu.open > a .arrow {
    transform: rotate(90deg);
}
/* Default link */
.sidebar-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    padding: 10px 16px;
    font-size: 13.5px;
    gap: 10px;
    border-radius: 8px;
    margin: 2px 8px;
    
    transition: 0.2s ease;
}

/* Hover (very subtle) */
.sidebar-menu a:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
    
}

/* Active (NO background, NO border) */
.sidebar-menu a.active {
    color: #fff;
    font-weight: 500;
}
/* Submenu */
.submenu {
    display: none;
    padding-left: 0px;
   
    overflow: hidden;
    transition: max-height 0.3s ease;
}

/* Show submenu */
.has-submenu.open > .submenu {
    display: block;
    
}


.submenu a {
    padding-left: 40px;
    font-size: 13px;
    color: #94a3b8;
    color:black;
}

.submenu a:hover {
    color: #ffffff;
}

.submenu a.active {
    color: #ffffff;
}
.sidebar-menu li {
    margin-bottom: 2px;
}
.sidebar .has-submenu.open > .submenu {
    display: block !important;
}
.sidebar .submenu {
    display: none !important;
}

.sidebar-footer {
    height: 45px; /* SAME AS HEADER */
    display: flex;
    align-items: center;
    justify-content: center;

    border-top: 1px solid rgba(255,255,255,0.1);
    /* background: #2c3e50; */
    background: #fff;
    /* transition: width 0.3s ease; */
    flex-shrink: 0;
    width:100%;
    position:relative;
    z-index:9999;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.sidebar-footer img {
    max-height: 30px;
    opacity: 0.8;
    transition: all 0.3s ease;
}
.sidebar-footer img:hover {
    opacity: 1;
}
/* COLLAPSED STATE (based on parent) */
#appContainer.sidebar-collapsed .sidebar {
    width: 70px !important; 
}
#appContainer.sidebar-collapsed .sidebar-footer{
    justify-content: center;
}

#appContainer.sidebar-collapsed .main-content {
    margin-left: 70px;
}
.sidebar.collapsed .menu-text {
    display: none;
}

.sidebar.collapsed .arrow {
    display: none;
}
.sidebar.collapsed .sidebar-menu a {
    justify-content: center;
}
.sidebar.collapsed .submenu {
    display: none !important;
}
.sidebar.collapsed .menu-left {
    justify-content: center;
}
.sidebar.collapsed .sidebar-footer {
    justify-content: center;
}
/* .app-footer {
    position: fixed;
    bottom: 0;
    left: 240px; 
    right: 0;

    height: 45px;
    padding: 0 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: #fff;
    border-top: 1px solid #e2e8f0;

    font-size: 13px;
    color: #64748b;
    transition: left 0.3s ease;
    z-index: 1000;
} */
 .app-footer {
    position: fixed;
    bottom: 0;
    left: 240px; 
    right: 0;

    height: 45px;
    padding: 0 var(--space-5);

    display: flex;
    align-items: center;
    justify-content: space-between;

    font-size: 12px;
    color: var(--text-secondary);

    border-top: 1px solid var(--border);
    background: #fff;
    transition: margin-left 0.3s ease;
}
#appContainer.sidebar-collapsed .app-footer {
   left: 70px;  
    transition: width 0.3s ease;
}
/* .sidebar.collapsed ~ .app-footer {
    left: 70px;  
    transition: width 0.3s ease;
} */
@media (max-width: 768px) {

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 2000;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0 !important;
    }
}
#overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    display: none;
    z-index: 1500;
}

#overlay.show {
    display: block;
}
/* Default (expanded) */
.logo-icon {
    display: none;
}

.logo-full {
    display: block;
    max-height: 28px;
}

/* Collapsed state */
.sidebar.collapsed .logo-full {
    display: none;
}

.sidebar.collapsed .logo-icon {
    display: block;
    max-height: 24px;
}

/* LOGIN CSS */

/* Container */
.auth-container {
    display: flex;
    height: 100vh;
}

/* LEFT SIDE */
.auth-left {
    flex: 1;
    background: #f8fafc;

    display: flex;
    align-items: center;
    justify-content: center;
    /* background-image: url('../images/bridgeops_home_image.png'); */
}

.auth-illustration img {
    width: 60%;
    opacity: 0.7;
}
/* Logo container */
.auth-logo {
    display: flex;
    justify-content: center;
    align-items: center;

    margin-bottom: 35px;
}

/* Logo image */
.auth-logo img {
    /* max-width: 200px;
    height: auto;

    object-fit: contain;
    opacity: 0.9; */
   max-width: 220px;
    height: auto;
    display: block;
    margin: 0 auto;

    transform: scale(1.3);   /* zoom logo */
}


/* RIGHT SIDE */
.auth-right {
    flex: 1;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #ffffff;
}

/* FORM BOX */
.auth-box {
    width: 380px;
}

/* Heading */
.auth-box h2 {
    font-size: 22px;
    margin-bottom: 5px;
}

.auth-box p {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 20px;
}

/* Inputs */
.auth-box input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;

    border: 1px solid #e2e8f0;
    border-radius: 8px;

    font-size: 14px;
}

/* Password row */
.password-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 5px;
}

.password-row a {
    text-decoration: none;
    color: #3b82f6;
}

/* Button */
.btn-login {
    width: 100%;
    padding: 10px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 8px;
    margin-top: 10px;
    cursor: pointer;
}

/* Divider */
.divider {
    text-align: center;
    margin: 20px 0;
    font-size: 13px;
    color: #64748b;
}

/* GitHub button */
.btn-github {
    width: 100%;
    padding: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
}

/* Signup */
.signup-text {
    text-align: center;
    margin-top: 15px;
    font-size: 13px;
}

/* LOGIN CSS END */

.brand-name {
    display: block;
    text-align: center;
    margin-top: 5px;

    font-weight: 600;
    font-size: 16px;
}
/* LEFT PANEL */
.auth-left {
    position: relative;
    flex: 1.4;
    overflow: hidden;
    /* background: url('../images/bridgeops_home_image.png') no-repeat center center;
    background-size: cover;   */
    justify-content:center;
    align-items: center;
    background: #f8fafc;
}

/* Background image */
.auth-bg {
    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;
    /* object-position: left center;  */
}

/* Overlay text */
.auth-overlay {
    position: absolute;
    top: 45%;
    /* left: 60px; */
    text-align:center;
    transform: translateY(-40%);
    color: #1e293b;
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
    z-index: 2;
    background-color: #f7fafc;
    padding: 10px;
    border-radius: 8px;

}
@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(-50%);
    }
}
/* Title */
.auth-overlay h1 {
    font-size: 50px;
    font-weight: 700;
    margin-bottom: 5px;
}

/* Highlight "Ops" */
.auth-overlay h1 span {
    color: #f97316;
}

/* Subtitle */
.auth-overlay p {
    font-size: 20px;
    color: #475569;
}
.auth-left::after {
    content: '';
    position: absolute;
    inset: 0;

    background: linear-gradient(
        to right,
        rgba(255,255,255,0.85),
        rgba(255,255,255,0.3)
    );
    z-index: 1;
}



/* Module Title */
.menu-title {
    font-size: 12px;
    color: #94a3b8;
    margin: 20px 10px 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Menu List */
.sidebar-menu {
    list-style: none;
    padding: 0;
}

/* Menu Item */
.menu-item {
    margin-bottom: 4px;
}

/* Link */
.menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: #cbd5f5;
    transition: 0.2s;
}

/* Hover */
.menu-link:hover {
    background: #334155;
    color: #fff;
}

/* Icon + Text */
.menu-link .menu-icon {
    width: 20px;
    text-align: center;
    margin-right: 10px;
}

.menu-link .menu-text {
    flex: 1;
    font-size: 14px;
}

/* Arrow */
.menu-arrow {
    font-size: 12px;
    color: #94a3b8;
}

/* Submenu */
.submenu {
    list-style: none;
    padding-left: 28px;
    display: none;
}

/* Show submenu */
.menu-item.open > .submenu {
    display: block !important;
}

/* Active */
.menu-link.active {
    /* background: #2563eb; */
    background: #1e293b;
    color: #fff;
}
.menu-section{
    padding-left:5px;
}
/* Submenu container */
.submenu {
    list-style: none;
    padding-left: 28px;
    display: none;
}

/* Submenu links */
.submenu .menu-link {
    color: #cbd5f5;           /* ✅ same as parent */
    font-size: 13px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
}

/* Hover */
.submenu .menu-link:hover {
    background: #334155;
    color: #fff;
}

/* Fix icon color */
.submenu .menu-icon i {
    color: #94a3b8;
}
#appContainer.sidebar-collapsed .menu-title {
    display: none;   
}
#appContainer.sidebar-collapsed .menu-arrow {
    display: none;   
}
#appContainer.sidebar-collapsed .menu-icon {
    margin-right: 0;
}
.left-section img{
    width:60% !important;
}
#appContainer.sidebar-collapsed .menu-link {
    position: relative;
}
#appContainer.sidebar-collapsed .menu-link:hover::after {
    content: attr(data-title);
    position: absolute;
    left: 60px;
    /* top: 10%; */
    transform: translateY(-50%);
    background: #111827;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 12px;
    z-index: 9999; 
}

.form-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;   /* muted gray */
    margin-bottom: 4px;
}
.form-control,
.form-select {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
}

.form-control:focus,
.form-select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99,102,241,0.15);
}
.input-title {
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 0;
}

.input-title:focus {
    outline: none;
    border-bottom: 1px solid #6366f1;
}
.form-section {
    margin-bottom: 14px;
}
.section-title {
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    margin-top: 15px;
    margin-bottom: 6px;
}
.overlay-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
}

body.overlay-open {
    overflow: hidden;
}

.ui-error,
.ui-toast,
.toast {
    position: fixed;
    z-index: 2000 !important;
}