/* ==================================================
   NAVBAR COMPONENT STYLES
================================================== */
.tm-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

body {
    padding-top: 72px; /* Header ki height ke barabar */
}

/* Dashboard Navbar Styles (.navbar) */
.navbar {
    background: #FFFFFF;
    border-bottom: 1px solid var(--color-border, #E2E8F0);
    position: fixed; /* sticky ko hata kar fixed karein */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0 1.5rem;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/*----------------------------------
Container
-----------------------------------*/

.tm-navbar{

    height:72px;

    display:flex;

    align-items:center;

    justify-content:space-between;

    gap:28px;

}
/*----------------------------------
Logo
-----------------------------------*/

.tm-logo{

    display:flex;

    align-items:center;

    gap:10px;

    text-decoration:none;

    flex-shrink:0;

}

.tm-logo img{
    width:36px;
    height:36px;
    object-fit:contain;
}

.tm-logo span{

    font-family:var(--font-heading);

    font-size:2rem;

    font-weight:800;

    color:var(--color-text-primary);

    letter-spacing:-0.5px;

}

/*----------------------------------
Desktop Menu
-----------------------------------*/

.tm-nav-menu{

    display:flex;

    align-items:center;

    gap:22px;

    list-style:none;

    margin:0;

    padding:0;

}

.tm-nav-menu li{

    position:relative;

}

.tm-nav-menu a{

    position:relative;

    text-decoration:none;

    font-size:15px;

    font-weight:600;

    color:var(--color-text-secondary);

    padding:8px 4px;

    transition:.3s ease;

}

/*==================================================
  NAVIGATION LINKS
==================================================*/

.tm-nav-menu a::after{

    content:"";

    position:absolute;

    left:0;

    bottom:-10px;

    width:0;

    height:2px;

    background:var(--color-primary);

    border-radius:999px;

    transition:width .3s ease;

}

.tm-nav-menu a:hover{

    color:var(--color-primary);

}

.tm-nav-menu a:hover::after{

    width:100%;

}

/* Active Link — match Home page pattern (color + underline) */
.tm-nav-menu a.active,
.tm-nav-menu a[aria-current="page"],
.nav-links a.active,
.nav-links a[aria-current="page"] {

    color: var(--color-primary);

    font-weight: 700;

}

.tm-nav-menu a.active::after,
.tm-nav-menu a[aria-current="page"]::after,
.nav-links a.active::after,
.nav-links a[aria-current="page"]::after {

    width: 100%;

}
/*==================================================
  NAVBAR ACTION BUTTONS
==================================================*/

.tm-nav-actions{

    display:flex;

    align-items:center;

    gap:12px;

    flex-shrink:0;

}

/* Login Button */

.tm-btn-outline{

    display:inline-flex;

    align-items:center;

    justify-content:center;

    height:42px;

    padding:0 18px;

    border:1px solid var(--color-border);

    border-radius:999px;

    background:#fff;

    color:var(--color-text-primary);

    font-size:14px;

    font-weight:600;

    text-decoration:none;

    transition:.3s ease;

}

.tm-btn-outline:hover{

    border-color:var(--color-primary);

    color:var(--color-primary);

    transform:translateY(-2px);

}
/* Primary Button */

.tm-btn-primary{

    display:inline-flex;

    align-items:center;

    justify-content:center;

    height:42px;

    padding:0 22px;

    border-radius:999px;

    background:linear-gradient(
        135deg,
        var(--color-primary),
        #3B82F6
    );

    color:#fff;

    font-size:14px;

    font-weight:700;

    text-decoration:none;

    box-shadow:0 10px 24px rgba(37,99,235,.16);

    transition:.3s ease;

}

.tm-btn-primary:hover{

    transform:translateY(-3px);

    box-shadow:0 20px 40px rgba(37,99,235,.28);

    color:#fff;

}

.tm-btn-primary:focus,
.tm-btn-primary:focus-visible{

    color:#fff;

}

.tm-btn-primary:active{

    transform:translateY(0);

    color:#fff;

}

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

.tm-menu-toggle{

    display:none;

    width:46px;

    height:46px;

    border:none;

    border-radius:14px;

    background:#ffffff;

    cursor:pointer;

    transition:.3s ease;

}

.tm-menu-toggle i{

    font-size:24px;

    color:var(--color-text-primary);

}

.tm-menu-toggle:hover{

    background:var(--color-primary-soft);

}

/*==================================================
  MOBILE NAVIGATION — hamburger ONLY <= 768px
  Desktop (>1024) & Tablet (769-1024): horizontal nav
==================================================*/

/* Desktop: full horizontal nav, no hamburger */
@media (min-width: 1025px) {
    .tm-menu-toggle,
    .hamburger,
    .mobile-toggle,
    .mobile-toggle-btn,
    .tm-dashboard-menu-toggle {
        display: none !important;
    }

    .tm-nav-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        flex-direction: row;
        align-items: center;
        gap: 22px;
        padding: 0;
        background: transparent;
        box-shadow: none;
        border: none;
        width: auto;
    }

    .tm-nav-menu li {
        width: auto;
    }

    .tm-nav-menu a {
        display: inline;
        padding: 8px 4px;
        border-bottom: none;
        width: auto;
    }
}

/* Tablet landscape: fluid horizontal nav, no hamburger */
@media (min-width: 769px) and (max-width: 1024px) and (orientation: landscape) {
    .tm-menu-toggle,
    .hamburger,
    .mobile-toggle,
    .mobile-toggle-btn,
    .tm-dashboard-menu-toggle {
        display: none !important;
    }

    .tm-navbar,
    .navbar {
        gap: 16px;
        flex-wrap: wrap;
    }

    .tm-nav-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px 14px;
        padding: 0;
        background: transparent;
        box-shadow: none;
        border: none;
        width: auto;
    }

    .tm-nav-menu li {
        width: auto;
    }

    .tm-nav-menu a {
        display: inline;
        padding: 6px 4px;
        font-size: 13px;
        border-bottom: none;
        width: auto;
    }

    .tm-nav-menu a::after {
        display: block;
    }

    .tm-nav-actions {
        display: flex !important;
        align-items: center;
        gap: 8px;
    }

    .tm-nav-actions .tm-btn-outline,
    .tm-nav-actions .tm-btn-primary {
        display: inline-flex !important;
        height: 38px;
        padding: 0 12px;
        font-size: 13px;
        white-space: nowrap;
    }
}

/* Tablet portrait: mobile-style hamburger nav */
@media (min-width: 769px) and (max-width: 1024px) and (orientation: portrait) {
    body {
        padding-top: 64px !important;
    }

    .tm-header,
    .navbar {
        height: 64px;
    }

    .tm-navbar,
    .navbar {
        padding: 0 16px;
        height: 64px;
        gap: 12px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
    }

    .tm-menu-toggle,
    .hamburger,
    .mobile-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .tm-nav-menu {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        width: 100%;
        background: #ffffff;
        padding: 16px 20px 24px;
        border-bottom: 1px solid rgba(15, 23, 42, 0.08);
        box-shadow: 0 20px 30px rgba(0, 0, 0, 0.12);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }

    .tm-nav-menu.tm-nav-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .tm-nav-menu li {
        width: 100%;
    }

    .tm-nav-menu a {
        display: block;
        padding: 12px 0;
        font-size: 15px;
        border-bottom: 1px solid #F1F5F9;
        width: 100%;
    }

    .tm-nav-menu a::after {
        display: none;
    }

    .tm-nav-actions {
        display: flex !important;
        align-items: center;
        gap: 8px;
    }

    .tm-nav-actions .tm-btn-outline,
    .tm-nav-actions .tm-btn-primary {
        display: inline-flex !important;
        height: 36px !important;
        padding: 0 12px !important;
        font-size: 13px !important;
        white-space: nowrap;
    }

    .tm-nav-actions #tm-logout-btn {
        height: 36px !important;
        width: 36px !important;
        min-width: 36px !important;
        padding: 0 !important;
    }

    .tm-nav-actions #tm-logout-btn i {
        font-size: 18px !important;
    }

    .tm-user-name {
        display: none;
    }
}

/* Mobile: hamburger + slide-down menu */
@media (max-width: 768px) {
    .tm-navbar,
    .navbar {
        padding: 0 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .tm-menu-toggle,
    .hamburger,
    .mobile-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .tm-nav-menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        width: 100%;
        background: #ffffff;
        padding: 16px 20px 24px;
        border-bottom: 1px solid rgba(15, 23, 42, 0.08);
        box-shadow: 0 20px 30px rgba(0, 0, 0, 0.12);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }

    .tm-nav-menu.tm-nav-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .tm-nav-menu li {
        width: 100%;
    }

    .tm-nav-menu a {
        display: block;
        padding: 12px 0;
        font-size: 15px;
        border-bottom: 1px solid #F1F5F9;
        width: 100%;
    }

    .tm-nav-menu a::after {
        display: none;
    }

    .tm-nav-actions {
        display: flex !important;
        align-items: center;
        gap: 8px;
    }

    .tm-nav-actions .tm-btn-outline,
    .tm-nav-actions .tm-btn-primary {
        display: inline-flex !important;
        height: 36px;
        padding: 0 12px;
        font-size: 13px;
        white-space: nowrap;
    }

    .tm-user-name {
        display: none;
    }
}

/*==================================================
  NAVBAR SCROLL STATE
==================================================*/

.tm-header.scrolled{

    background:rgba(255,255,255,.95);

    border-bottom:1px solid rgba(15,23,42,.08);

    box-shadow:0 12px 40px rgba(15,23,42,.06);

}



/* Dashboard Navbar Styles (.navbar) */
.navbar {
    background: #FFFFFF;
    border-bottom: 1px solid var(--color-border, #E2E8F0);
    position: sticky;
    top: 0;
    z-index: 999;
    padding: 0 1.5rem;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-left .logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.3rem;
    font-weight: 800;
    color: #2563EB;
    text-decoration: none;
    white-space: nowrap;
}

.nav-left .logo img {
    height: 32px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: #64748B;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #2563EB;
}

.nav-links a.active {
    border-bottom: 2px solid #2563EB;
}

.badge-nav {
    background-color: #EF4444;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-btn {
    background: #F1F5F9;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748B;
    cursor: pointer;
    position: relative;
}

.icon-btn .dot {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #EF4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #E2E8F0;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: #0F172A;
}

.user-role {
    font-size: 0.72rem;
    color: #64748B;
}

/*==================================================
  NAVBAR & ACTION BUTTONS MOBILE FIX
==================================================*/

/* Force active page highlight styling */
.tm-nav-menu a.active,
.nav-links a.active {
    color: #2563EB !important;
    font-weight: 700 !important;
}

/* Legacy duplicate mobile block removed — see MOBILE NAVIGATION section above */

/*==================================================
  LOGGED IN USER PROFILE & DROPDOWN STYLES
==================================================*/

.tm-user-profile-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tm-user-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px 4px 4px;
    border: 1px solid var(--color-border, #E2E8F0);
    border-radius: 999px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tm-user-trigger:hover {
    border-color: var(--color-primary, #2563EB);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.tm-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #2563EB;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
}

.tm-user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary, #0F172A);
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dashboard Direct Link Button */
.tm-btn-dashboard {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 16px;
    background: var(--color-primary, #2563EB);
    color: #ffffff !important;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tm-btn-dashboard:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    color: #ffffff;
}

/* Logout Button */
.tm-btn-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 14px;
    border: 1px solid #EF4444;
    border-radius: 999px;
    background: transparent;
    color: #EF4444;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tm-btn-logout:hover {
    background: #EF4444;
    color: #ffffff;
}
