/* ========================================
   MAIN LAYOUT STYLESHEET
   Lemonade-Inspired: Dark Chrome + Pink Accents
   Sidebar & Header are ALWAYS dark black
   ======================================== */

/* Layout Wrapper */
.ml-wrapper {
    height: 100vh;
    overflow: hidden;
    font-family: var(--font-sans);
    background: var(--bg-primary);
}

/* ========================================
   HEADER — Always Dark Black Bar
   ======================================== */
.ml-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #161616;
    z-index: 100;
    display: flex;
    align-items: center;
    padding: 0 var(--space-xl);
    gap: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* Menu Toggle - hidden on desktop, shown on mobile only */
.ml-menu-toggle {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #d8d8d8;
    font-size: 18px;
    cursor: pointer;
    padding: 10px;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.ml-menu-toggle:hover {
    background: #ff0083;
    color: #ffffff;
    border-color: #ff0083;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 0, 131, 0.4);
}

.ml-menu-toggle:active {
    transform: translateY(0);
}

/* Header Brand — Logo + Page Title */
.ml-header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.ml-header-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
}

.ml-header-page-title {
    color: #f3f3f3;
    font-size: 15px;
    font-weight: var(--font-semibold);
    font-family: var(--font-sans);
    letter-spacing: -0.01em;
    white-space: nowrap;
}

/* Header Right Section */
.ml-header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-shrink: 0;
}

/* Theme Toggle — On dark header */
.ml-theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #9b9b9b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all .25s;
    flex-shrink: 0;
}

.ml-theme-toggle:hover {
    border-color: #ff0083;
    color: #ff0083;
    transform: scale(1.08);
    box-shadow: 0 0 8px rgba(255, 0, 131, 0.2);
}

/* Company Selector — On dark header */
.ml-company-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.ml-company-selector:hover {
    border-color: #ff0083;
    box-shadow: 0 0 8px rgba(255, 0, 131, 0.15);
    transform: translateY(-1px);
}

.ml-company-icon {
    color: #ff0083;
    font-size: 14px;
}

.ml-company-dropdown {
    background: transparent;
    border: none;
    color: #f3f3f3;
    font-size: 13px;
    font-weight: var(--font-medium);
    font-family: var(--font-sans);
    cursor: pointer;
    outline: none;
    padding: 0;
    min-width: 120px;
}

.ml-company-dropdown:focus {
    outline: none;
}

.ml-company-dropdown option {
    background: #202020;
    color: #f3f3f3;
    padding: var(--space-sm);
    font-family: var(--font-sans);
}

/* Notification Button — On dark header */
.ml-notify-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ff0083;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    transition: all var(--transition-base);
    font-weight: var(--font-semibold);
    font-family: var(--font-sans);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
}

.ml-notify-btn:hover {
    background: #ff0083;
    color: #ffffff;
    border-color: #ff0083;
    box-shadow: rgba(255, 0, 131, 0.5) 0px 6px 20px -6px;
    transform: translateY(-1px);
}

.ml-badge {
    background: #ff0083;
    color: #ffffff;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    min-width: 20px;
    text-align: center;
    font-weight: var(--font-bold);
    line-height: 1;
}

.ml-notify-btn:hover .ml-badge {
    background: #ffffff;
    color: #ff0083;
}

/* ========================================
   SIDEBAR — Always Dark Black
   ======================================== */
.ml-sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    bottom: 0;
    background: #161616;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    z-index: 90;
    overflow-x: hidden;
    overflow-y: auto;
    width: 70px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.ml-sidebar:hover {
    width: 240px;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.4);
}

/* Push main content when sidebar expands */
.ml-sidebar:hover ~ .ml-main {
    left: 240px;
}

/* ========================================
   SIDEBAR SEARCH
   ======================================== */
.ml-sidebar-search {
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.ml-sidebar-search-icon {
    width: 44px;
    min-width: 44px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7b7b7b;
    font-size: 16px;
    cursor: pointer;
    transition: color 0.2s;
    flex-shrink: 0;
}

.ml-sidebar-search-icon:hover {
    color: #ff0083;
}

/* Hide search icon when sidebar expands, let textbox fill the space */
.ml-sidebar:hover .ml-sidebar-search-icon {
    width: 0;
    min-width: 0;
    opacity: 0;
    overflow: hidden;
}

.ml-sidebar-search-input {
    width: 0;
    opacity: 0;
    height: 36px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: #f3f3f3;
    font-size: 13px;
    font-weight: var(--font-medium);
    font-family: var(--font-sans);
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    flex: 1;
    min-width: 0;
}

.ml-sidebar:hover .ml-sidebar-search-input {
    width: 100%;
    opacity: 1;
}

.ml-sidebar-search-input:focus {
    border-color: #ff0083;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 2px rgba(255, 0, 131, 0.2);
}

.ml-sidebar-search-input::placeholder {
    color: #7b7b7b;
    font-weight: var(--font-regular);
}

.ml-sidebar-search-btn {
    width: 0;
    min-width: 0;
    height: 36px;
    opacity: 0;
    overflow: hidden;
    background: #ff0083;
    border: none;
    border-radius: var(--radius-sm);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    margin-left: 6px;
}

.ml-sidebar:hover .ml-sidebar-search-btn {
    width: 36px;
    min-width: 36px;
    opacity: 1;
}

.ml-sidebar-search-btn:hover {
    background: #dc0073;
    box-shadow: rgba(255, 0, 131, 0.5) 0px 4px 12px -4px;
}

/* Navigation */
.ml-nav {
    flex: 1;
    padding: var(--space-sm);
}

.ml-nav-item {
    margin: var(--space-xs) 0;
    position: relative;
}

.ml-nav-link,
.ml-nav-link:hover,
.ml-nav-link:focus,
.ml-nav-link:active,
.ml-nav-link:visited {
    text-decoration: none !important;
}

.ml-nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-md);
    color: #d8d8d8;
    border-radius: var(--radius-md);
    font-size: 14px;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    transition: all var(--transition-base);
    position: relative;
    font-weight: var(--font-medium);
    font-family: var(--font-sans);
}

.ml-nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    text-decoration: none;
}

.ml-nav-link:hover .ml-nav-icon {
    color: #ff0083;
}

/* Active nav — Pink background, Lemonade button style */
.ml-nav-link.ml-active {
    background: #ff0083;
    color: #ffffff;
    font-weight: var(--font-semibold);
    box-shadow: rgba(255, 0, 131, 0.5) 0px 6px 20px -6px;
}

.ml-nav-link.ml-active .ml-nav-icon {
    color: #ffffff;
}

.ml-nav-link.ml-nav-parent-active {
    background: rgba(255, 0, 131, 0.08);
    color: #f3f3f3;
}

.ml-nav-link.ml-nav-parent-active .ml-nav-icon {
    color: #ff0083;
}

.ml-nav-icon {
    width: 24px;
    min-width: 24px;
    text-align: center;
    font-size: 18px;
    color: #9b9b9b;
    transition: all var(--transition-base);
    position: relative;
}

.ml-nav-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: var(--font-medium);
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s;
}

.ml-sidebar:hover .ml-nav-text {
    opacity: 1;
}

/* Tooltip for collapsed state */
.ml-nav-tooltip {
    position: absolute;
    left: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: #313131;
    color: #f3f3f3;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: var(--font-sans);
    font-weight: var(--font-medium);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 105;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.ml-nav-tooltip::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 50%;
    transform: translateY(-50%);
    border-right: 4px solid #313131;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
}

.ml-nav-link:hover .ml-nav-tooltip {
    opacity: 1;
}

.ml-sidebar:hover .ml-nav-tooltip {
    opacity: 0 !important;
}

/* Submenu Arrow */
.ml-arrow {
    font-size: 10px;
    opacity: 0;
    margin-left: auto;
    transition: all var(--transition-base);
    color: #7b7b7b;
}

.ml-sidebar:hover .ml-arrow {
    opacity: 0.7;
}

.ml-expanded .ml-arrow {
    transform: rotate(90deg);
    opacity: 1 !important;
    color: #ff0083;
}

/* Visual indicator for expanded submenu in collapsed state */
.ml-expanded .ml-nav-icon::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 6px;
    height: 6px;
    background: #ff0083;
    border-radius: 50%;
    border: 2px solid #161616;
    opacity: 1;
    transition: opacity 0.2s;
}

.ml-sidebar:hover .ml-expanded .ml-nav-icon::after {
    opacity: 0;
}

/* Submenu */
.ml-submenu {
    padding-left: 0;
    margin-top: var(--space-xs);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s, padding-left 0.3s;
}

.ml-sidebar:hover .ml-submenu {
    padding-left: 40px;
}

.ml-expanded .ml-submenu {
    max-height: 500px;
}

.ml-submenu-link,
.ml-submenu-link:hover,
.ml-submenu-link:focus,
.ml-submenu-link:active,
.ml-submenu-link:visited {
    text-decoration: none !important;
}

.ml-submenu-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    color: #b7b7b7;
    font-size: 13px;
    border-radius: var(--radius-md);
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    font-weight: var(--font-regular);
    font-family: var(--font-sans);
    justify-content: center;
}

.ml-sidebar:hover .ml-submenu-link {
    justify-content: flex-start;
}

.ml-submenu-link:hover {
    color: #ff0083;
    background: rgba(255, 0, 131, 0.06);
    text-decoration: none;
}

.ml-submenu-link:hover .ml-submenu-icon {
    color: #ff0083;
    transform: scale(1.1);
}

.ml-submenu-link.ml-active {
    color: #ffffff;
    background: #ff0083;
    font-weight: var(--font-semibold);
    box-shadow: rgba(255, 0, 131, 0.5) 0px 4px 14px -4px;
}

.ml-submenu-link.ml-active .ml-submenu-icon {
    color: #ffffff;
}

.ml-submenu-icon {
    width: 16px;
    min-width: 16px;
    text-align: center;
    font-size: 14px;
    color: #7b7b7b;
    transition: all var(--transition-base);
}

.ml-submenu-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    transition: opacity 0.2s;
}

.ml-sidebar:hover .ml-submenu-text {
    opacity: 1;
}

/* Tooltip for collapsed submenu items */
.ml-submenu-tooltip {
    position: absolute;
    left: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: #313131;
    color: #f3f3f3;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-family: var(--font-sans);
    font-weight: var(--font-medium);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 105;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.ml-submenu-tooltip::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 50%;
    transform: translateY(-50%);
    border-right: 4px solid #313131;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
}

.ml-submenu-link:hover .ml-submenu-tooltip {
    opacity: 1;
}

.ml-sidebar:hover .ml-submenu-tooltip {
    opacity: 0 !important;
}

/* ========================================
   SIDEBAR FOOTER — User Panel
   Collapsed: centered avatar only
   Expanded: full user panel with actions
   ======================================== */
.ml-sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: #161616;
    overflow: hidden;
    flex-shrink: 0;
}

.ml-sidebar-user {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 12px;
    justify-content: center;
    transition: padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* When collapsed, add extra vertical padding to center the avatar */
.ml-sidebar-user {
    padding: 16px 12px;
}

.ml-sidebar:hover .ml-sidebar-user {
    padding: 12px;
}

.ml-user-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: #ff0083;
    color: #ffffff;
    border-radius: 50%;
    font-size: 13px;
    font-weight: var(--font-bold);
    font-family: var(--font-sans);
    box-shadow: rgba(255, 0, 131, 0.5) 0px 4px 14px -4px;
    border: 2px solid #262626;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.ml-sidebar:hover .ml-user-initials {
    width: 38px;
    height: 38px;
}

.ml-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: opacity 0.2s 0.05s, width 0.3s;
    min-width: 0;
}

.ml-sidebar:hover .ml-user-info {
    opacity: 1;
    width: auto;
}

.ml-user-name {
    color: #d8d8d8;
    font-size: 13px;
    font-weight: var(--font-semibold);
    font-family: var(--font-sans);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    text-decoration: none;
}

.ml-user-role {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #ff0083;
    font-size: 10px;
    font-weight: var(--font-bold);
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1;
}

.ml-user-role i {
    font-size: 9px;
}

/* Sidebar action buttons — hidden when collapsed, animate in on expand */
.ml-sidebar-actions {
    display: flex;
    gap: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ml-sidebar:hover .ml-sidebar-actions {
    max-height: 50px;
    opacity: 1;
}

.ml-sidebar-action {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: none;
    border: none;
    color: #7b7b7b;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: var(--font-sans);
    font-weight: var(--font-medium);
    text-decoration: none;
}

.ml-sidebar-action:first-child {
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.ml-sidebar-action:hover {
    color: #ff0083;
    background: rgba(255, 0, 131, 0.06);
}

.ml-sidebar-action-logout:hover {
    color: #F83157;
    background: rgba(248, 49, 87, 0.06);
}

.ml-sidebar-action-text {
    font-size: 12px;
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    opacity: 0;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 0.2s, width 0.3s;
}

.ml-sidebar:hover .ml-sidebar-action-text {
    opacity: 1;
    width: auto;
}

/* ========================================
   MAIN CONTENT AREA
   ======================================== */
.ml-main {
    position: fixed;
    top: 60px;
    right: 0;
    bottom: 0;
    left: 70px;
    overflow: auto;
    background: var(--bg-primary);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
}

/* Add breathing room for all content inside ml-main */
.ml-main > * {
    margin: 0;
    padding: 0;
}

/* Products pages handle their own spacing */
.ml-main .pd-wrapper {
    margin: 0;
    padding: 0;
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */
.ml-toast-container {
    position: fixed;
    top: 80px;
    right: var(--space-lg);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.ml-toast {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--surface);
    border-radius: var(--radius-lg);
    min-width: 280px;
    max-width: 360px;
    box-shadow: var(--shadow-lg);
    border-left: 3px solid;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ml-toast-show {
    transform: translateX(0);
    opacity: 1;
}

.ml-toast-hide {
    transform: translateX(120%);
    opacity: 0;
}

.ml-toast-info {
    border-left-color: var(--info);
}

.ml-toast-success {
    border-left-color: var(--success);
}

.ml-toast-warning {
    border-left-color: var(--warning);
}

.ml-toast-danger {
    border-left-color: var(--error);
}

.ml-toast-icon {
    font-size: 18px;
    margin-top: 2px;
}

.ml-toast-info .ml-toast-icon {
    color: var(--info);
}

.ml-toast-success .ml-toast-icon {
    color: var(--success);
}

.ml-toast-warning .ml-toast-icon {
    color: var(--warning);
}

.ml-toast-danger .ml-toast-icon {
    color: var(--error);
}

.ml-toast-body {
    flex: 1;
}

.ml-toast-title {
    color: var(--text-primary);
    font-weight: var(--font-semibold);
    font-size: 14px;
    font-family: var(--font-sans);
    margin-bottom: 2px;
}

.ml-toast-msg {
    color: var(--text-muted);
    font-size: 13px;
    font-family: var(--font-sans);
}

.ml-toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px;
    font-size: 14px;
    transition: color var(--transition-fast);
    border-radius: var(--radius-sm);
}

.ml-toast-close:hover {
    color: #ff0083;
    background: rgba(255, 0, 131, 0.06);
}

/* ========================================
   MOBILE OVERLAY
   ======================================== */
.ml-mobile-overlay {
    display: none;
}

/* ========================================
   SCROLLBAR STYLING
   ======================================== */
.ml-sidebar::-webkit-scrollbar {
    width: 4px;
}

.ml-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.ml-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.ml-sidebar::-webkit-scrollbar-thumb:hover {
    background: #ff0083;
}

/* ========================================
   SFDIALOG — GLOBAL STANDARD
   Professional, themed, consistent
   ======================================== */

/* Base dialog — centered modal with accent bar */
.pf-dialog.e-dialog,
.ml-dialog.e-dialog {
    border-radius: 12px !important;
    border: 1px solid var(--border-primary) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 4px 16px rgba(0, 0, 0, 0.08) !important;
    font-family: var(--font-sans) !important;
    overflow: hidden !important;
}

[data-theme="dark"] .pf-dialog.e-dialog,
[data-theme="dark"] .ml-dialog.e-dialog {
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}

/* Dialog header — clean with accent top bar */
.pf-dialog .e-dlg-header-content,
.ml-dialog .e-dlg-header-content {
    background: var(--surface) !important;
    padding: 0 !important;
    border-bottom: 1px solid var(--border-primary) !important;
    position: relative;
}

.pf-dialog .e-dlg-header-content::before,
.ml-dialog .e-dlg-header-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-primary);
}

.pf-dialog .e-dlg-header,
.ml-dialog .e-dlg-header {
    font-size: 0 !important;
    padding: 0 !important;
}

/* Close button */
.pf-dialog .e-dlg-closeicon-btn,
.ml-dialog .e-dlg-closeicon-btn {
    color: var(--text-muted) !important;
    background: transparent !important;
    border: none !important;
    border-radius: 6px !important;
    width: 32px !important;
    height: 32px !important;
    margin: 12px 12px 0 0 !important;
    transition: all 0.15s ease !important;
}

.pf-dialog .e-dlg-closeicon-btn:hover,
.ml-dialog .e-dlg-closeicon-btn:hover {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

/* Dialog body */
.pf-dialog .e-dlg-content,
.ml-dialog .e-dlg-content {
    padding: 0 !important;
    background: var(--surface) !important;
}

/* Overlay */
.e-dlg-overlay {
    background: rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(4px) !important;
}

[data-theme="dark"] .e-dlg-overlay {
    background: rgba(0, 0, 0, 0.6) !important;
}

/* ========================================
   PROFILE DIALOG — Dark Header (matches contract notifications)
   ======================================== */

/* Dark header bar */
.pf-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: #161616;
    border-radius: 12px 12px 0 0;
}

.pf-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pf-header-icon {
    font-size: 22px;
    color: #ff0083;
}

.pf-header-titles {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.pf-header-title {
    font-size: 15px;
    font-weight: 700;
    color: #f3f3f3;
    font-family: var(--font-sans);
    letter-spacing: -0.01em;
}

.pf-header-subtitle {
    font-size: 11px;
    color: #7b7b7b;
    font-family: var(--font-sans);
}

.pf-header-close {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #9b9b9b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.15s ease;
}

.pf-header-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Override Syncfusion header for dark header */
.pf-dialog .e-dlg-header-content {
    background: #161616 !important;
    border-bottom: none !important;
    padding: 0 !important;
}

.pf-dialog .e-dlg-header-content::before {
    display: none !important;
}

.pf-dialog .e-dlg-header {
    padding: 0 !important;
    font-size: 0 !important;
}

/* Hide Syncfusion default close icon — we use our own */
.pf-dialog .e-dlg-closeicon-btn {
    display: none !important;
}

/* Body */
.pf-body {
    padding: 20px;
    max-height: 65vh;
    overflow-y: auto;
}

.pf-body::-webkit-scrollbar {
    width: 4px;
}

.pf-body::-webkit-scrollbar-track {
    background: transparent;
}

.pf-body::-webkit-scrollbar-thumb {
    background: var(--border-secondary);
    border-radius: 2px;
}

/* Sections */
.pf-section {
    margin-bottom: 20px;
}

.pf-section:last-of-type {
    margin-bottom: 0;
}

.pf-section-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-primary);
}

.pf-section-label i {
    color: var(--accent-primary);
    font-size: 12px;
}

/* Fields */
.pf-field {
    margin-bottom: 14px;
}

.pf-field:last-child {
    margin-bottom: 0;
}

.pf-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.pf-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-body);
    margin-bottom: 6px;
}

.pf-required {
    color: var(--accent-primary);
}

.pf-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Error message */
.pf-error {
    background: rgba(247, 39, 74, 0.06);
    border: 1px solid rgba(247, 39, 74, 0.15);
    color: var(--error);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 12px;
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

[data-theme="dark"] .pf-error {
    background: rgba(248, 49, 87, 0.1);
    border-color: rgba(248, 49, 87, 0.2);
}

/* Action buttons */
.pf-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 16px 20px;
    border-top: 1px solid var(--border-primary);
    background: var(--bg-secondary);
    margin: 20px -20px -20px -20px;
}

.pf-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: 5px;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.pf-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pf-btn-cancel {
    background: var(--surface);
    color: var(--text-body);
    border: 1px solid var(--border-primary);
}

.pf-btn-cancel:hover {
    background: var(--bg-secondary);
    border-color: var(--border-secondary);
}

.pf-btn-save {
    background: var(--accent-primary);
    color: #ffffff;
    box-shadow: rgba(255, 0, 131, 0.3) 0px 6px 20px -6px;
}

.pf-btn-save:hover:not(:disabled) {
    background: var(--accent-secondary);
    transform: translateY(-1px);
    box-shadow: rgba(255, 0, 131, 0.4) 0px 8px 24px -6px;
}

/* Loading state */
.pf-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px;
    color: var(--text-muted);
    font-size: 13px;
}

.pf-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-primary);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: pf-spin 0.8s linear infinite;
}

@keyframes pf-spin {
    to { transform: rotate(360deg); }
}

/* Override Syncfusion input outlines in profile dialog */
.pf-dialog .e-input-group.e-outline {
    border-radius: 6px !important;
}

.pf-dialog .e-input-group.e-outline.e-input-focus {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 2px rgba(255, 0, 131, 0.1) !important;
}

.pf-dialog .e-input-group.e-outline.e-disabled {
    background: var(--bg-secondary) !important;
    opacity: 0.7;
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */
@media (max-width: 768px) {
    .ml-header {
        height: 56px;
        padding: 0 var(--space-sm);
        gap: var(--space-sm);
    }

    .ml-header-right {
        gap: var(--space-xs);
    }

    .ml-menu-toggle {
        display: flex;
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 16px;
        padding: 0;
    }

    .ml-header-brand {
        gap: 8px;
        min-width: 0;
        flex: 1;
    }

    .ml-header-logo {
        width: 28px;
        height: 28px;
    }

    .ml-header-page-title {
        font-size: 13px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .ml-notify-btn {
        padding: 8px;
        min-width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .ml-notify-btn .ml-badge {
        position: absolute;
        top: -4px;
        right: -4px;
        font-size: 10px;
        padding: 2px 5px;
        min-width: 16px;
    }

    .ml-notify-btn {
        position: relative;
    }

    .ml-theme-toggle {
        width: 36px;
        height: 36px;
    }

    .ml-company-selector {
        padding: 6px 8px;
        height: 36px;
    }

    .ml-company-dropdown {
        min-width: 80px;
        font-size: 12px;
    }

    .ml-company-icon {
        font-size: 13px;
    }

    .ml-sidebar {
        width: 0;
        transform: translateX(-100%);
        transition: transform 0.3s, width 0s 0.3s;
    }

    .ml-sidebar:hover {
        width: 0;
        transform: translateX(-100%);
    }

    .ml-sidebar-mobile-open {
        width: 280px !important;
        transform: translateX(0) !important;
        transition: transform 0.3s;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.4);
        z-index: 90;
    }

    .ml-sidebar-mobile-open .ml-nav-text,
    .ml-sidebar-mobile-open .ml-arrow,
    .ml-sidebar-mobile-open .ml-user-name,
    .ml-sidebar-mobile-open .ml-user-info,
    .ml-sidebar-mobile-open .ml-sidebar-action-text,
    .ml-sidebar-mobile-open .ml-submenu-text {
        opacity: 1 !important;
        width: auto !important;
    }

    .ml-sidebar-mobile-open .ml-sidebar-actions {
        max-height: 50px !important;
        opacity: 1 !important;
    }

    .ml-sidebar-mobile-open .ml-sidebar-user {
        padding: 12px !important;
    }

    .ml-sidebar-mobile-open .ml-sidebar-search-input {
        width: 100% !important;
        opacity: 1 !important;
    }

    .ml-sidebar-mobile-open .ml-sidebar-search-btn {
        width: 36px !important;
        min-width: 36px !important;
        opacity: 1 !important;
    }

    .ml-sidebar-mobile-open .ml-submenu {
        padding-left: 40px;
    }

    .ml-mobile-overlay {
        display: block;
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 85;
        animation: fadeIn 0.3s;
        backdrop-filter: blur(3px);
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }

    .ml-main {
        top: 56px;
        left: 0 !important;
    }

    .ml-nav-tooltip,
    .ml-submenu-tooltip {
        display: none;
    }

    .ml-toast-container {
        top: 66px;
        right: var(--space-md);
        left: var(--space-md);
    }

    .ml-toast {
        min-width: auto;
        max-width: 100%;
    }

    /* Profile dialog mobile */
    .pf-field-row {
        grid-template-columns: 1fr !important;
    }

    .pf-dialog.e-dialog {
        width: 95vw !important;
        max-width: 440px !important;
    }
}

/* Prevent mobile menu behavior on desktop */
@media (min-width: 769px) {
    .ml-sidebar-mobile-open {
        width: 70px !important;
        transform: none !important;
    }

    .ml-mobile-overlay {
        display: none !important;
    }
}

/* ========================================
   RESPONSIVE - TABLET
   ======================================== */
