/* ==========================================================================
   Shah Courier & Cargo Theme (Matching Logo Palette)
   Primary Blue: #0a4b9c | Accent Red: #e31e24 | Dark Navy: #051b3b
   ========================================================================== */

/* Menu Bar Styling */
div.PageMenuBar {
    background: #0a4b9c !important;
    border-bottom: 3px solid #e31e24 !important;
    padding: 2px 10px !important;
}

div.PageMenuBar table.Menu tr td.Item {
    background: transparent !important;
    border: none !important;
}

div.PageMenuBar table.Menu tr td.Item span.Outer {
    background-image: none !important;
    background-color: transparent !important;
    border: 1px solid transparent !important;
    border-radius: 4px !important;
    padding: 6px 14px !important;
    margin: 2px 3px !important;
    transition: all 0.2s ease-in-out !important;
}

div.PageMenuBar table.Menu tr td.Item a.Link, 
div.PageMenuBar table.Menu tr td.Item span.Inner {
    color: #ffffff !important;
    font-weight: bold !important;
    font-size: 13px !important;
    font-family: Arial, sans-serif !important;
    text-decoration: none !important;
}

/* Hover State */
div.PageMenuBar table.Menu tr td.Menu_Hover {
    background: transparent !important;
    border: none !important;
}

div.PageMenuBar table.Menu tr td.Menu_Hover span.Outer {
    background-image: none !important;
    background-color: #e31e24 !important;
    border: 1px solid #b71217 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

div.PageMenuBar table.Menu tr td.Menu_Hover a.Link,
div.PageMenuBar table.Menu tr td.Menu_Hover span.Inner {
    color: #ffffff !important;
}

/* Selected Active State */
div.PageMenuBar table.Menu tr td.Selected {
    background: transparent !important;
    border: none !important;
}

div.PageMenuBar table.Menu tr td.Selected span.Outer {
    background-image: none !important;
    background-color: #051b3b !important;
    border: 1px solid #031229 !important;
}

div.PageMenuBar table.Menu tr td.Selected a.Link,
div.PageMenuBar table.Menu tr td.Selected span.Inner {
    color: #ffffff !important;
}

/* Dropdown Submenu Styling (Navbar & Grid Action Menus) */
.HoverMenu, .HoverMenuEx {
    background: #ffffff !important;
    background-image: none !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.18), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
    border-radius: 6px !important;
    padding: 6px !important;
    z-index: 100001 !important;
}

.HoverMenu a.Item, .HoverMenuEx a.Item {
    border: 1px solid transparent !important;
    border-radius: 4px !important;
    margin: 2px 0 !important;
    padding: 0 !important;
    background: transparent !important;
    text-decoration: none !important;
}

.HoverMenu a.Item .Outer, .HoverMenuEx a.Item .Outer {
    padding: 6px 16px 6px 38px !important;
    display: block !important;
}

.HoverMenu a.Item span.Text, .HoverMenuEx a.Item span.Text {
    color: #0f172a !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    font-family: Arial, sans-serif !important;
    line-height: 16px !important;
    display: block !important;
}

.HoverMenu a.Item span.Description, .HoverMenuEx a.Item span.Description {
    color: #64748b !important;
    font-size: 11px !important;
    font-weight: normal !important;
    margin-top: 3px !important;
    line-height: 14px !important;
    display: block !important;
}

/* Hover / Active Item Styling */
.HoverMenu a.Active, .HoverMenuEx a.Active,
.HoverMenu a.Item:hover, .HoverMenuEx a.Item:hover {
    background-color: #f0f7ff !important;
    border: 1px solid #bfdbfe !important;
    border-left: 4px solid #e31e24 !important;
    text-decoration: none !important;
}

.HoverMenu a.Active span.Text, .HoverMenuEx a.Active span.Text,
.HoverMenu a.Item:hover span.Text, .HoverMenuEx a.Item:hover span.Text {
    color: #0a4b9c !important;
}

.HoverMenu a.Active span.Description, .HoverMenuEx a.Active span.Description,
.HoverMenu a.Item:hover span.Description, .HoverMenuEx a.Item:hover span.Description {
    color: #334155 !important;
}

/* Values & Select Focus */
.Value
{
    padding: 0px !important;
}

table.DataView tr.CategoryRow td.Fields div.Item div.Value select:focus
{
    background-color: #0a4b9c !important;
    color: #ffffff !important;
    border-color: #e31e24 !important;
}

/* Search Bar & Action Buttons */
.SearchBarCell div.SearchButtons {
    height: 65px;
    float: left !important;
    padding-left: 8px;
}

.ActionButtons{
    width: 70%;
}

/* Header Bar Styling */
div#PageHeaderBar {
    background-color: #ffffff;
    border-bottom: 3px solid #e31e24;
    background-image: url(logo.png);
    background-position: center;
    background-repeat: no-repeat;
    height: 72px;
    padding-top: 25px;
    padding-left: 300px;
    font-size: 24px;
    font-weight: bold;
    color: #0a4b9c;
    font-family: Arial, Helvetica, sans-serif;
}

/* Footer Bar Styling */
div#PageFooterBar {
    background-color: #051b3b;
    border-top: 3px solid #e31e24;
    color: #ffffff;
    padding: 12px 20px;
    font-size: 13px;
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
}

div#PageFooterBar a, div#PageFooterBar a:visited {
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 500;
}

div#PageFooterBar a:hover {
    color: #e31e24 !important;
    text-decoration: underline;
}

/* Buttons Styling (Log In, Submit, Action buttons) */
input[type="submit"], input[type="button"], .LogOnButton, button {
    background: linear-gradient(135deg, #0a4b9c 0%, #032b69 100%) !important;
    color: #ffffff !important;
    border: 1px solid #051b3b !important;
    border-radius: 4px !important;
    padding: 6px 16px !important;
    font-weight: bold !important;
    font-family: Arial, sans-serif !important;
    cursor: pointer !important;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.2s ease !important;
}

input[type="submit"]:hover, input[type="button"]:hover, .LogOnButton:hover, button:hover {
    background: linear-gradient(135deg, #e31e24 0%, #b71217 100%) !important;
    border-color: #8e0b10 !important;
    box-shadow: 0 2px 6px rgba(227, 30, 36, 0.4) !important;
}

/* Global Link Colors */
a, a:visited {
    color: #0a4b9c;
}

a:hover {
    color: #e31e24;
}

/* ==========================================================================
   Modern Enterprise Header & Profile Menu Styling
   ========================================================================== */

/* Hide default legacy top bar, history/permalinks bar and large centered logo container */
#Membership_Login,
.MembershipBar,
.BookmarkBar,
.MembershipBarPlaceholder,
div#PageHeaderBar,
td#PageHeaderSideBar {
    display: none !important;
}

/* Custom Top Header Wrapper - Logo Matched Light Executive Theme */
.custom-header-wrapper {
    background: #ffffff;
    border-bottom: 3px solid #e31e24;
    box-shadow: 0 2px 10px rgba(10, 75, 156, 0.12);
    width: 100%;
    position: relative;
    z-index: 9999;
}

.custom-header-bar {
    max-width: 100%;
    margin: 0 auto;
    padding: 8px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 85px;
    box-sizing: border-box;
}

/* Top-Left Logo: Prominent, Sharp, & Legible */
.header-logo-container {
    display: flex;
    align-items: center;
}

.header-logo-container a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header-app-logo {
    height: 75px;
    width: auto;
    max-width: 450px;
    object-fit: contain;
    display: block;
    transition: transform 0.2s ease;
}

.header-app-logo:hover {
    transform: scale(1.02);
}

/* Center Welcome Banner */
.header-welcome-container {
    flex: 1;
    text-align: center;
    padding: 0 20px;
}

.header-welcome-text {
    color: #1e293b;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.welcome-username {
    color: #ffffff;
    font-weight: 700;
    background: #0a4b9c;
    border: 1px solid #032b69;
    padding: 3px 12px;
    border-radius: 12px;
    margin: 0 4px;
    box-shadow: 0 2px 4px rgba(10, 75, 156, 0.2);
}

/* Right Profile Menu */
.header-profile-container {
    position: relative;
}

.profile-menu-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    padding: 6px 14px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.profile-menu-trigger:hover {
    background: #ffffff;
    border-color: #0a4b9c;
    box-shadow: 0 4px 12px rgba(10, 75, 156, 0.15);
}

.profile-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e31e24 0%, #b71217 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(227, 30, 36, 0.35);
}

.profile-username {
    color: #0f172a;
    font-size: 14px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.profile-caret {
    color: #64748b;
    transition: transform 0.25s ease;
}

.profile-menu-trigger:hover .profile-caret {
    color: #0a4b9c;
}

/* Profile Dropdown Card */
.profile-dropdown-card {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 250px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 30px -5px rgba(10, 75, 156, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10000;
    overflow: hidden;
}

.profile-dropdown-card.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #0a4b9c 0%, #051b3b 100%);
}

.dropdown-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e31e24 0%, #b71217 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.dropdown-user-name {
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
}

.dropdown-user-role {
    color: #cbd5e1;
    font-size: 12px;
}

.profile-dropdown-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 4px 0;
}

.profile-dropdown-list {
    list-style: none;
    margin: 0;
    padding: 6px;
}

.profile-dropdown-list li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: #334155;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.profile-dropdown-list li a:hover {
    background: #f0f7ff;
    color: #0a4b9c;
}

.profile-dropdown-list li a.logout-link:hover {
    background: #fef2f2;
    color: #dc2626;
}

.menu-icon {
    stroke: #64748b;
    transition: stroke 0.15s ease;
}

.profile-dropdown-list li a:hover .menu-icon {
    stroke: #0a4b9c;
}

.profile-dropdown-list li a.logout-link:hover .menu-icon {
    stroke: #dc2626;
}

/* ==========================================================================
   Modern Enterprise Full-Screen Login Screen (No Scroll, Card Logo)
   ========================================================================== */

/* ==========================================================================
   Modern Enterprise Full-Screen Web App Login Screen
   ========================================================================== */

/* Fullscreen unauthenticated background & flex centering strictly for Login page */
/* Fullscreen unauthenticated background & flex centering strictly for Login page */
.unauthenticated-login-page {
    background: linear-gradient(135deg, #0b192c 0%, #1e293b 50%, #0f172a 100%) !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 100vh !important;
    width: 100vw !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.unauthenticated-login-page #PageBody,
.unauthenticated-login-page #PageContent,
.unauthenticated-login-page td {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.unauthenticated-login-page #PageBody {
    width: 100% !important;
    max-width: 500px !important;
    margin: 0 auto !important;
    border-collapse: collapse !important;
}

.unauthenticated-login-page #PageFooterBar,
.unauthenticated-login-page #PageHeaderSideBar,
.unauthenticated-login-page #PageHeaderLeftSide,
.unauthenticated-login-page #PageHeaderRightSide,
.unauthenticated-login-page #PageContentSideBar,
.unauthenticated-login-page #PageContentLeftSide,
.unauthenticated-login-page #PageContentRightSide {
    display: none !important;
}

/* Modern Web App Login Card */
.SettingsPanel {
    width: 100% !important;
    max-width: 480px !important;
    margin: 0 auto !important;
    background: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 20px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 40px rgba(10, 75, 156, 0.25) !important;
    padding: 32px 36px 28px 36px !important;
    box-sizing: border-box !important;
    position: relative !important;
    animation: fadeInScale 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Card Logo */
.login-card-logo-wrapper {
    text-align: center;
    margin-bottom: 16px;
}

.login-card-logo {
    height: 78px;
    width: auto;
    max-width: 380px;
    object-fit: contain;
    display: inline-block;
}

.login-card-subtitle {
    text-align: center;
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 18px;
    letter-spacing: 0.3px;
    font-family: 'Inter', sans-serif;
}

.SettingsPanel::before {
    content: "Sign In to Your Account";
    display: block;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
    margin-bottom: 4px;
}

.SettingsPanel table {
    width: 100% !important;
    border-collapse: separate !important;
}

.SettingsPanel td {
    padding: 5px 0 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    color: #334155 !important;
}

.SettingsPanel input[type="text"],
.SettingsPanel input[type="password"] {
    width: 100% !important;
    height: 42px !important;
    padding: 8px 14px !important;
    background: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-family: 'Inter', sans-serif !important;
    color: #0f172a !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease-in-out !important;
    outline: none !important;
}

.SettingsPanel input[type="text"]:focus,
.SettingsPanel input[type="password"]:focus {
    background: #ffffff !important;
    border-color: #0a4b9c !important;
    box-shadow: 0 0 0 4px rgba(10, 75, 156, 0.15) !important;
}

.SettingsPanel input[type="submit"],
.SettingsPanel input[type="button"],
.SettingsPanel button {
    width: 100% !important;
    height: 44px !important;
    background: linear-gradient(135deg, #0a4b9c 0%, #051b3b 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    font-family: 'Inter', sans-serif !important;
    cursor: pointer !important;
    margin-top: 14px !important;
    box-shadow: 0 4px 14px rgba(10, 75, 156, 0.3) !important;
    transition: all 0.25s ease !important;
    letter-spacing: 0.3px !important;
}

.SettingsPanel input[type="submit"]:hover,
.SettingsPanel input[type="button"]:hover,
.SettingsPanel button:hover {
    background: linear-gradient(135deg, #e31e24 0%, #b71217 100%) !important;
    box-shadow: 0 6px 18px rgba(227, 30, 36, 0.4) !important;
    transform: translateY(-1px) !important;
}

.SettingsPanel a {
    color: #0a4b9c !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    font-family: 'Inter', sans-serif !important;
    transition: color 0.15s ease !important;
}

.SettingsPanel a:hover {
    color: #e31e24 !important;
    text-decoration: underline !important;
}

/* Hide Sidebar / "See Also" Section */
td#PageHeaderSideBar,
td#PageContentSideBar,
td#PageFooterSideBar,
td#PageHeaderLeftSide,
td#PageContentLeftSide,
td#PageFooterLeftSide,
.SideBarBody,
.TaskBox,
.TaskBox.SeeAlso {
    display: none !important;
    width: 0 !important;
}