/* ==========================================================================
   AidhERP Unified Design System (Light & Dark Themes)
   Matches reference designs:
   - Screen 1: Application Launcher (1.png, 2.png, mobile.png)
   - Screen 2: Module Workspace & Internal Pages (3.png, 4.png)
   ========================================================================== */

:root,
[data-theme="light"] {
    /* Core Surface & Background Tokens */
    --erp-bg: #f5f7f6;
    --erp-surface: #ffffff;
    --erp-surface-2: #f8faf9;
    --erp-surface-3: #f1f5f3;
    --erp-surface-hover: #f3f7f5;
    --erp-border: #e3e8e6;
    --erp-border-strong: #cfd8d4;

    /* Typography Tokens */
    --erp-text: #0f172a;
    --erp-text-secondary: #334155;
    --erp-text-muted: #64748b;
    --erp-text-faint: #94a3b8;

    /* Brand Accent Tokens (Emerald / Deep Teal) */
    --erp-primary: #16795b;
    --erp-primary-hover: #115e46;
    --erp-primary-dark: #1b5e4b;
    --erp-primary-soft: #e6f4ef;
    --erp-primary-soft-hover: #d5ede4;
    --erp-primary-soft-border: #b9e2d2;
    --erp-accent-pill-bg: #16795b;
    --erp-accent-pill-text: #ffffff;

    /* Table & Card Tokens */
    --erp-table-head-bg: #263238;
    --erp-table-head-text: #ffffff;
    --erp-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --erp-shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.05);
    --erp-shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);

    /* Layout Dimensions */
    --erp-topbar-height: 60px;
    --erp-sidebar-width: 248px;

    /* Legacy Variable Compatibility Mapping */
    --primary-color: #16795b;
    --secondary-color: #115e46;
    --accent-color: #0d9488;
    --theme-primary: #16795b;
    --theme-primary-dark: #1b5e4b;
    --theme-accent: #0d9488;
    --bg-color: #f5f7f6;
    --card-bg: #ffffff;
    --text-color: #0f172a;
    --text-muted: #64748b;
    --border-color: #e3e8e6;
    --sidebar-bg: #ffffff;
    --sidebar-text: #334155;
    --sidebar-hover: #f3f7f5;
    --header-bg: #ffffff;
    --header-text: #0f172a;
    --success-color: #16a34a;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --info-color: #0284c7;
}

[data-theme="dark"] {
    --erp-bg: #0b1117;
    --erp-surface: #131c26;
    --erp-surface-2: #182330;
    --erp-surface-3: #1e2b3a;
    --erp-surface-hover: #1c2938;
    --erp-border: #223042;
    --erp-border-strong: #2e4057;

    --erp-text: #f1f5f9;
    --erp-text-secondary: #cbd5e1;
    --erp-text-muted: #94a3b8;
    --erp-text-faint: #64748b;

    --erp-primary: #2dd4bf;
    --erp-primary-hover: #14b8a6;
    --erp-primary-dark: #134e3e;
    --erp-primary-soft: rgba(45, 212, 191, 0.14);
    --erp-primary-soft-hover: rgba(45, 212, 191, 0.22);
    --erp-primary-soft-border: rgba(45, 212, 191, 0.32);
    --erp-accent-pill-bg: #2dd4bf;
    --erp-accent-pill-text: #09151c;

    --erp-table-head-bg: #1a2634;
    --erp-table-head-text: #f1f5f9;
    --erp-shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.3);
    --erp-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.35);
    --erp-shadow-md: 0 10px 28px rgba(0, 0, 0, 0.45);

    /* Legacy Variable Compatibility Mapping */
    --primary-color: #16795b;
    --secondary-color: #134e3e;
    --accent-color: #2dd4bf;
    --theme-primary: #2dd4bf;
    --theme-primary-dark: #134e3e;
    --theme-accent: #2dd4bf;
    --bg-color: #0b1117;
    --card-bg: #131c26;
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #223042;
    --sidebar-bg: #131c26;
    --sidebar-text: #cbd5e1;
    --sidebar-hover: #1c2938;
    --header-bg: #131c26;
    --header-text: #f1f5f9;
}

/* ==========================================================================
   1. Base Reset & Typography
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background-color: var(--erp-bg) !important;
    color: var(--erp-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--erp-primary);
    text-decoration: none;
}
a:hover {
    color: var(--erp-primary-hover);
}

/* ==========================================================================
   2. Top Header Bar (.erp-topbar) - Shared by Screen 1 & Screen 2
   ========================================================================== */
.erp-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--erp-topbar-height);
    background: var(--erp-surface);
    border-bottom: 1px solid var(--erp-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1040;
    gap: 16px;
}

.erp-topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    margin-right: auto;
}

.erp-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
    color: var(--erp-text) !important;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.erp-brand-logo {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    object-fit: contain;
    background: var(--erp-surface-2);
    border: 1px solid var(--erp-border);
    padding: 2px;
    flex-shrink: 0;
}

.erp-brand-monogram {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #16795b;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.erp-brand-name {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
}

.erp-topbar-divider {
    width: 1px;
    height: 22px;
    background: var(--erp-border);
    flex-shrink: 0;
}

.erp-topbar-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    white-space: nowrap;
}

.erp-nav-apps-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--erp-text-secondary);
    text-decoration: none !important;
    transition: background-color 0.15s ease, color 0.15s ease;
    position: relative;
}

.erp-nav-apps-pill:hover {
    background: var(--erp-surface-hover);
    color: var(--erp-text);
}

.erp-nav-apps-pill.active {
    background: transparent;
    color: var(--erp-primary);
}

.erp-nav-apps-pill.active::after {
    content: "";
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: -14px;
    height: 2px;
    background: var(--erp-primary);
    border-radius: 2px;
}

.erp-nav-apps-pill svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.erp-breadcrumb-sep {
    color: var(--erp-text-faint);
    font-size: 13px;
    user-select: none;
}

.erp-breadcrumb-module {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--erp-text);
    overflow: hidden;
    text-overflow: ellipsis;
}

.erp-topbar-right,
.erp-topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Search Box in Topbar */
.erp-search-wrap {
    position: relative;
    width: 250px;
}

.erp-search-input {
    width: 100%;
    height: 36px;
    padding: 0 34px 0 34px;
    border-radius: 9px;
    border: 1px solid var(--erp-border);
    background: var(--erp-surface-2);
    color: var(--erp-text);
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.erp-search-input::placeholder {
    color: var(--erp-text-muted);
}

.erp-search-input:focus {
    background: var(--erp-surface);
    border-color: var(--erp-primary);
    box-shadow: 0 0 0 3px var(--erp-primary-soft);
}

.erp-search-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    color: var(--erp-text-muted);
    pointer-events: none;
}

.erp-search-kbd {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    font-weight: 600;
    color: var(--erp-text-muted);
    background: var(--erp-surface);
    border: 1px solid var(--erp-border);
    border-radius: 5px;
    padding: 1px 6px;
    line-height: 1.3;
    pointer-events: none;
}

/* Quick Search Dropdown Results */
.erp-search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    min-width: 420px;
    max-width: 92vw;
    max-height: 440px;
    overflow-y: auto;
    background: var(--erp-surface);
    border: 1px solid var(--erp-border);
    border-radius: 11px;
    box-shadow: var(--erp-shadow-md);
    z-index: 1060;
    display: none;
    padding: 6px;
}

.erp-search-dropdown.show {
    display: block;
}

.erp-search-section-header {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--erp-text-muted);
    padding: 6px 10px 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.erp-search-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none !important;
    color: var(--erp-text) !important;
    font-size: 13px;
    transition: background-color 0.12s ease;
    cursor: pointer;
}

.erp-search-result-item:hover,
.erp-search-result-item.active {
    background: var(--erp-surface-hover);
}

.erp-search-result-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.erp-search-result-title {
    font-weight: 600;
    color: var(--erp-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.erp-search-result-sub {
    font-size: 11.5px;
    color: var(--erp-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
    line-height: 1.25;
}

.erp-search-result-meta {
    display: flex;
     align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.erp-search-result-badge {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--erp-accent);
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    padding: 2px 7px;
    border-radius: 999px;
    white-space: nowrap;
}

.erp-search-result-mod {
    font-size: 11px;
    color: var(--erp-text-muted);
    font-weight: 500;
    white-space: nowrap;
}

/* Topbar Icon Buttons */
.erp-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    border: 1px solid var(--erp-border);
    background: var(--erp-surface);
    color: var(--erp-text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    padding: 0;
    flex-shrink: 0;
    text-decoration: none !important;
}

.erp-icon-btn:hover {
    background: var(--erp-surface-hover);
    color: var(--erp-text);
    border-color: var(--erp-border-strong);
}

.erp-icon-btn svg {
    width: 17px;
    height: 17px;
}

/* Topbar Notification Bell & Dropdown */
.erp-notif-dropdown-wrap {
    position: relative;
    display: inline-flex;
}

.erp-notif-btn {
    position: relative;
}

.erp-notif-dropdown-wrap.open .erp-notif-btn {
    background: var(--erp-surface-hover);
    color: var(--erp-text);
    border-color: var(--erp-border-strong);
}

.erp-notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    line-height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--erp-surface);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

.erp-notif-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-width: calc(100vw - 24px);
    background: var(--erp-surface);
    border: 1px solid var(--erp-border);
    border-radius: 12px;
    box-shadow: var(--erp-shadow-md);
    z-index: 1065;
    display: none;
    overflow: hidden;
}

.erp-notif-dropdown-wrap.open .erp-notif-dropdown-menu {
    display: block;
}

.erp-notif-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    border-bottom: 1px solid var(--erp-border);
    background: var(--erp-surface);
}

.erp-notif-dropdown-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--erp-text);
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.erp-notif-count-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

[data-theme="dark"] .erp-notif-count-pill {
    background: rgba(239, 68, 68, 0.22);
    color: #f87171;
}

.erp-notif-mark-all-btn {
    border: none;
    background: transparent;
    color: var(--erp-primary, #0f766e);
    font-size: 12px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.erp-notif-mark-all-btn:hover {
    background: var(--erp-surface-hover);
}

.erp-notif-list {
    max-height: 360px;
    overflow-y: auto;
    divide-y: 1px solid var(--erp-border);
}

.erp-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--erp-border);
    text-decoration: none !important;
    color: var(--erp-text) !important;
    background: var(--erp-surface);
    transition: background-color 0.12s ease;
    cursor: pointer;
    position: relative;
}

.erp-notif-item:last-child {
    border-bottom: none;
}

.erp-notif-item:hover {
    background: var(--erp-surface-hover);
}

.erp-notif-item.unread {
    background: rgba(15, 118, 110, 0.05);
}

[data-theme="dark"] .erp-notif-item.unread {
    background: rgba(52, 211, 153, 0.08);
}

.erp-notif-item.unread:hover {
    background: var(--erp-surface-hover);
}

.erp-notif-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
    margin-top: 1px;
}

.erp-notif-icon.type-info,
.erp-notif-icon.type-quotation {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
}

.erp-notif-icon.type-success,
.erp-notif-icon.type-purchase_order {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.erp-notif-icon.type-warning {
    background: rgba(245, 158, 11, 0.14);
    color: #d97706;
}

.erp-notif-icon.type-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

[data-theme="dark"] .erp-notif-icon.type-info,
[data-theme="dark"] .erp-notif-icon.type-quotation {
    background: rgba(59, 130, 246, 0.22);
    color: #60a5fa;
}

[data-theme="dark"] .erp-notif-icon.type-success,
[data-theme="dark"] .erp-notif-icon.type-purchase_order {
    background: rgba(16, 185, 129, 0.22);
    color: #34d399;
}

[data-theme="dark"] .erp-notif-icon.type-warning {
    background: rgba(245, 158, 11, 0.22);
    color: #fbbf24;
}

[data-theme="dark"] .erp-notif-icon.type-danger {
    background: rgba(239, 68, 68, 0.22);
    color: #f87171;
}

.erp-notif-body {
    flex: 1;
    min-width: 0;
}

.erp-notif-item-title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--erp-text);
    line-height: 1.3;
    margin-bottom: 2px;
}

.erp-notif-item-msg {
    font-size: 12px;
    color: var(--erp-text-secondary);
    line-height: 1.38;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.erp-notif-item-time {
    font-size: 11px;
    color: var(--erp-text-muted);
    margin-top: 4px;
}

.erp-notif-unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0f766e;
    flex-shrink: 0;
    margin-top: 6px;
}

[data-theme="dark"] .erp-notif-unread-dot {
    background: #34d399;
}

.erp-notif-empty {
    padding: 28px 16px;
    text-align: center;
    color: var(--erp-text-muted);
    font-size: 12.5px;
}

.erp-notif-empty i {
    font-size: 22px;
    display: block;
    margin-bottom: 6px;
    opacity: 0.55;
}

/* User Profile Chip & Dropdown */
.erp-user-dropdown-wrap {
    position: relative;
}

.erp-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 4px 8px 4px 5px;
    border-radius: 9px;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.erp-user-chip:hover,
.erp-user-dropdown-wrap.open .erp-user-chip {
    background: var(--erp-surface-hover);
    border-color: var(--erp-border);
}

.erp-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #d1fae5;
    color: #0f766e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

[data-theme="dark"] .erp-user-avatar {
    background: rgba(22, 121, 91, 0.32);
    color: #34d399;
}

.erp-user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.18;
}

.erp-user-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--erp-text);
}

.erp-user-role {
    font-size: 11px;
    color: var(--erp-text-muted);
}

.erp-user-chevron {
    width: 14px;
    height: 14px;
    color: var(--erp-text-muted);
    margin-left: 2px;
    transition: transform 0.16s ease;
}

.erp-user-dropdown-wrap.open .erp-user-chevron {
    transform: rotate(180deg);
}

.erp-user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 210px;
    background: var(--erp-surface);
    border: 1px solid var(--erp-border);
    border-radius: 12px;
    box-shadow: var(--erp-shadow-md);
    padding: 6px;
    z-index: 1060;
    display: none;
}

.erp-user-dropdown-wrap.open .erp-user-dropdown-menu {
    display: block;
}

.erp-user-dropdown-header {
    padding: 8px 10px;
    border-bottom: 1px solid var(--erp-border);
    margin-bottom: 4px;
    font-size: 12.5px;
    color: var(--erp-text);
}

.erp-user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--erp-text-secondary) !important;
    text-decoration: none !important;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.erp-user-dropdown-item:hover {
    background: var(--erp-surface-hover);
    color: var(--erp-text) !important;
}

.erp-user-dropdown-divider {
    height: 1px;
    background: var(--erp-border);
    margin: 4px 0;
}

/* ==========================================================================
   3. Screen 1: Central Application Launcher (1.png, 2.png, mobile.png)
   ========================================================================== */
body.erp-launcher-body {
    padding-top: var(--erp-topbar-height);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.erp-launcher-main {
    flex: 1;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 36px 28px 32px;
    display: flex;
    flex-direction: column;
}

.erp-launcher-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.erp-launcher-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--erp-primary);
    margin-bottom: 8px;
}

.erp-eyebrow-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--erp-primary);
    display: inline-block;
}

.erp-launcher-welcome h1 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--erp-text);
    margin: 0 0 6px 0;
}

.erp-welcome-dot {
    color: var(--erp-primary);
}

.erp-launcher-welcome p {
    font-size: 14.5px;
    color: var(--erp-text-muted);
    margin: 0;
}

.erp-date-widget {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.erp-date-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--erp-surface);
    border: 1px solid var(--erp-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--erp-text-secondary);
    box-shadow: var(--erp-shadow-xs);
    flex-shrink: 0;
}

.erp-date-icon-box svg {
    width: 17px;
    height: 17px;
}

.erp-date-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.erp-date-weekday {
    font-size: 11.5px;
    color: var(--erp-text-muted);
    font-weight: 500;
}

.erp-date-full {
    font-size: 13px;
    color: var(--erp-text);
    font-weight: 700;
}

.erp-launcher-divider {
    height: 1px;
    background: var(--erp-border);
    margin-bottom: 22px;
}

.erp-launcher-toolbar {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 22px;
}

.erp-launcher-toolbar-top,
.erp-launcher-toolbar-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.erp-launcher-count-wrap {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.erp-launcher-count-title {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--erp-text);
}

.erp-launcher-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    background: var(--erp-surface);
    border: 1px solid var(--erp-border);
    color: var(--erp-text-secondary);
}

.erp-launcher-tagline,
.erp-launcher-avail-text {
    font-size: 12.5px;
    color: var(--erp-text-muted);
}

.erp-launcher-filters {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.erp-filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--erp-text-secondary);
    font-size: 12.5px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.erp-filter-tab svg {
    width: 14px;
    height: 14px;
}

.erp-filter-tab:hover {
    color: var(--erp-text);
    background: var(--erp-surface-hover);
}

.erp-filter-tab.active {
    background: var(--erp-accent-pill-bg);
    color: var(--erp-accent-pill-text);
}

/* 17-Tile Centered Grid (6 + 6 + 5 centered on desktop) */
.erp-launcher-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-bottom: 36px;
}

.erp-app-tile {
    width: calc((100% - 5 * 16px) / 6);
    min-width: 165px;
    background: var(--erp-surface);
    border: 1px solid var(--erp-border);
    border-radius: 14px;
    padding: 22px 14px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none !important;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
    box-shadow: var(--erp-shadow-xs);
    position: relative;
}

.erp-app-tile:hover {
    transform: translateY(-2px);
    border-color: var(--erp-primary-soft-border);
    box-shadow: var(--erp-shadow-md);
}

.erp-app-tile.erp-tile-hidden {
    display: none !important;
}

.erp-tile-arrow {
    position: absolute;
    top: 12px;
    right: 12px;
    color: var(--erp-text-faint);
    opacity: 0.7;
    transition: color 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.erp-tile-arrow svg {
    width: 12px;
    height: 12px;
}

.erp-app-tile:hover .erp-tile-arrow {
    color: var(--erp-primary);
    opacity: 1;
    transform: translate(1px, -1px);
}

.erp-tile-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    background: var(--tile-bg, #eaf6f1);
    color: var(--tile-color, #16795b);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: transform 0.16s ease;
}

[data-theme="dark"] .erp-tile-icon {
    background: var(--tile-dark-bg, rgba(22, 121, 91, 0.24));
    color: var(--tile-dark-color, #34d399);
    border-color: rgba(255, 255, 255, 0.06);
}

.erp-app-tile:hover .erp-tile-icon {
    transform: scale(1.05);
}

.erp-tile-icon svg {
    width: 24px;
    height: 24px;
}

.erp-tile-title {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--erp-text);
    margin: 0 0 5px 0;
    line-height: 1.35;
}

.erp-tile-subtitle {
    font-size: 11.5px;
    color: var(--erp-text-muted);
    margin: 0;
    line-height: 1.35;
}

.erp-launcher-empty {
    display: none;
    text-align: center;
    padding: 48px 20px;
    background: var(--erp-surface);
    border: 1px dashed var(--erp-border-strong);
    border-radius: 14px;
    color: var(--erp-text-muted);
    margin-bottom: 32px;
}

.erp-launcher-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--erp-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    color: var(--erp-text-muted);
    flex-wrap: wrap;
}

.erp-footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.erp-footer-monogram {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: #16795b;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.erp-footer-shortcut {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.erp-launcher-footer kbd {
    background: var(--erp-surface);
    color: var(--erp-text-secondary);
    border: 1px solid var(--erp-border);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 11px;
}

/* ==========================================================================
   4. Screen 2: Module Workspace Sidebar & Content Layout (3.png, 4.png)
   ========================================================================== */
.erp-module-sidebar {
    position: fixed;
    top: var(--erp-topbar-height);
    left: 0;
    bottom: 0;
    width: var(--erp-sidebar-width);
    background: var(--erp-surface);
    border-right: 1px solid var(--erp-border);
    display: flex;
    flex-direction: column;
    z-index: 1030;
    transition: transform 0.22s ease;
    user-select: none;
}

.erp-sidebar-top {
    border-bottom: 1px solid var(--erp-border);
}

.erp-back-apps-link,
.erp-sidebar-back {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--erp-text-secondary) !important;
    border-bottom: 1px solid var(--erp-border);
    text-decoration: none !important;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.erp-back-apps-link:hover,
.erp-sidebar-back:hover {
    background: var(--erp-surface-hover);
    color: var(--erp-primary) !important;
}

.erp-back-apps-link svg,
.erp-sidebar-back svg {
    width: 14px;
    height: 14px;
}

.erp-workspace-card,
.erp-sidebar-modhead {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 14px 16px;
    text-decoration: none !important;
    transition: background-color 0.15s ease;
}

.erp-workspace-card:hover {
    background: var(--erp-surface-hover);
}

.erp-workspace-icon,
.erp-sidebar-modicon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--mod-bg, #eaf6f1);
    color: var(--mod-color, #16795b);
    border: 1px solid rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
}

[data-theme="dark"] .erp-workspace-icon,
[data-theme="dark"] .erp-sidebar-modicon {
    background: var(--mod-dark-bg, rgba(22, 121, 91, 0.24));
    color: var(--mod-dark-color, #34d399);
    border-color: rgba(255, 255, 255, 0.06);
}

.erp-workspace-icon svg,
.erp-sidebar-modicon svg {
    width: 18px;
    height: 18px;
}

.erp-workspace-meta,
.erp-sidebar-modinfo {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.erp-workspace-eyebrow,
.erp-sidebar-modlabel {
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--erp-text-muted);
    line-height: 1.25;
}

.erp-workspace-title,
.erp-sidebar-modtitle {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--erp-text);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 10px 16px;
}

.erp-sidebar-nav::-webkit-scrollbar {
    width: 5px;
}
.erp-sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--erp-border-strong);
    border-radius: 4px;
}

.erp-nav-group {
    margin-bottom: 10px;
}

.erp-nav-group-toggle {
    width: 100%;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--erp-text-muted);
    border-radius: 7px;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.14s ease, color 0.14s ease;
}

.erp-nav-group-toggle:hover {
    background: var(--erp-surface-hover);
    color: var(--erp-text);
}

.erp-chevron,
.erp-nav-group-chevron {
    width: 13px;
    height: 13px;
    color: var(--erp-text-muted);
    transition: transform 0.18s ease;
    flex-shrink: 0;
}

.erp-nav-group.collapsed .erp-chevron,
.erp-nav-group.collapsed .erp-nav-group-chevron {
    transform: rotate(180deg);
}

.erp-nav-group-items,
.erp-nav-items {
    list-style: none;
    margin: 3px 0 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.erp-nav-group.collapsed .erp-nav-group-items,
.erp-nav-group.collapsed .erp-nav-items {
    display: none;
}

.erp-nav-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--erp-text-secondary) !important;
    text-decoration: none !important;
    transition: background-color 0.14s ease, color 0.14s ease;
}

.erp-nav-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--erp-text-faint);
    flex-shrink: 0;
    transition: background-color 0.14s ease, transform 0.14s ease;
}

.erp-nav-link:hover {
    background: var(--erp-surface-hover);
    color: var(--erp-text) !important;
}

.erp-nav-link:hover .erp-nav-dot {
    background: var(--erp-text-secondary);
}

.erp-nav-link.active {
    background: var(--erp-primary-soft);
    color: var(--erp-primary) !important;
    font-weight: 600;
}

.erp-nav-link.active .erp-nav-dot {
    background: var(--erp-primary);
    transform: scale(1.25);
}

.erp-sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--erp-border);
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--erp-surface);
}

.erp-sidebar-footer-logo,
.erp-sidebar-footicon {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: #16795b;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 11px;
    flex-shrink: 0;
    overflow: hidden;
}

.erp-sidebar-footer-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.erp-sidebar-footer-meta,
.erp-sidebar-footmeta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.22;
}

.erp-sidebar-footer-name,
.erp-sidebar-footname {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--erp-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.erp-sidebar-footer-sub,
.erp-sidebar-footsub {
    font-size: 10.5px;
    color: var(--erp-text-muted);
}

.erp-sidebar-backdrop {
    display: none;
    position: fixed;
    top: var(--erp-topbar-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 35, 0.45);
    z-index: 1025;
}

body.erp-workspace-body.erp-mobile-nav-open .erp-sidebar-backdrop {
    display: block;
}

/* Main Workspace Container - covers all wrapper classes used across internal pages */
body.erp-workspace-body .main-content,
body.erp-workspace-body .content,
body.erp-workspace-body .content-wrapper,
body.erp-workspace-body .dx-content,
body.erp-workspace-body > .container-fluid {
    margin-left: var(--erp-sidebar-width) !important;
    margin-top: var(--erp-topbar-height) !important;
    padding: 24px 28px 40px !important;
    min-height: calc(100vh - var(--erp-topbar-height));
    background: var(--erp-bg) !important;
    transition: margin-left 0.22s ease;
    width: auto !important;
    max-width: none !important;
}

body.erp-workspace-body .pos-container {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    margin-left: var(--erp-sidebar-width) !important;
    margin-top: var(--erp-topbar-height) !important;
    width: auto !important;
    min-height: calc(100vh - var(--erp-topbar-height)) !important;
    z-index: 1 !important;
}

/* Prevent double margin/padding when wrapper classes are nested inside one another */
body.erp-workspace-body .main-content .content,
body.erp-workspace-body .main-content .content-wrapper,
body.erp-workspace-body .content .main-content,
body.erp-workspace-body .content .content-wrapper,
body.erp-workspace-body .content-wrapper .main-content,
body.erp-workspace-body .content-wrapper .content {
    margin-left: 0 !important;
    margin-top: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
}

/* Collapsed Sidebar State on Desktop */
body.erp-workspace-body.erp-sidebar-collapsed .erp-module-sidebar {
    transform: translateX(-100%);
}

body.erp-workspace-body.erp-sidebar-collapsed .main-content,
body.erp-workspace-body.erp-sidebar-collapsed .content,
body.erp-workspace-body.erp-sidebar-collapsed .content-wrapper,
body.erp-workspace-body.erp-sidebar-collapsed .dx-content,
body.erp-workspace-body.erp-sidebar-collapsed > .container-fluid,
body.erp-workspace-body.erp-sidebar-collapsed .pos-container {
    margin-left: 0 !important;
}

/* Sidebar Backdrop for Mobile Drawer */
.erp-sidebar-backdrop {
    position: fixed;
    inset: var(--erp-topbar-height) 0 0 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1025;
    display: none;
}

body.erp-mobile-nav-open .erp-sidebar-backdrop {
    display: block;
}

/* ==========================================================================
   5. Unified Internal Page Components (Cards, Headers, Tables, Buttons, Forms)
   ========================================================================== */

/* Cards */
.card {
    background-color: var(--erp-surface) !important;
    border: 1px solid var(--erp-border) !important;
    border-radius: 12px !important;
    box-shadow: var(--erp-shadow-xs) !important;
    color: var(--erp-text);
    margin-bottom: 20px;
}

.card-header {
    background-color: var(--erp-surface) !important;
    border-bottom: 1px solid var(--erp-border) !important;
    padding: 14px 18px !important;
    font-weight: 600;
    color: var(--erp-text);
    border-top-left-radius: 11px !important;
    border-top-right-radius: 11px !important;
}

/* Dark Emerald Card Header (matches 4.png Quotations List header) */
.card-header.bg-primary,
.card-header.bg-success,
.card-header.bg-info,
.card-header.bg-secondary,
.card-header.bg-warning.text-white,
.card-header.bg-danger,
.card-header.bg-dark,
.card-header.text-white:not(.bg-light):not(.bg-white),
.card-header.erp-card-header-brand,
.card-header[style*="linear-gradient"] {
    background: var(--erp-primary-dark) !important;
    color: #ffffff !important;
    border-bottom-color: transparent !important;
}

.card-header.bg-primary *,
.card-header.bg-success *,
.card-header.bg-info *,
.card-header.bg-secondary *,
.card-header.bg-warning.text-white *,
.card-header.bg-danger *,
.card-header.bg-dark *,
.card-header.text-white:not(.bg-light):not(.bg-white) *,
.card-header.erp-card-header-brand *,
.card-header[style*="linear-gradient"] h1,
.card-header[style*="linear-gradient"] h2,
.card-header[style*="linear-gradient"] h3,
.card-header[style*="linear-gradient"] h4,
.card-header[style*="linear-gradient"] h5,
.card-header[style*="linear-gradient"] h6 {
    color: #ffffff !important;
}

.card-header[style*="linear-gradient"] .btn-light,
.card-header.bg-primary .btn-light,
.card-header.bg-success .btn-light,
.card-header.bg-info .btn-light,
.card-header.bg-secondary .btn-light,
.card-header.text-white .btn-light,
.card-header.erp-card-header-brand .btn-light,
.card-header .badge.bg-light,
.card-header .badge.bg-light * {
    background: #ffffff !important;
    color: #0f172a !important;
    border-color: #ffffff !important;
    font-weight: 600;
}

.card-header[style*="linear-gradient"] .btn-outline-light,
.card-header.bg-primary .btn-outline-light,
.card-header.bg-success .btn-outline-light,
.card-header.bg-info .btn-outline-light,
.card-header.bg-secondary .btn-outline-light,
.card-header.text-white .btn-outline-light,
.card-header.erp-card-header-brand .btn-outline-light {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
    background: transparent !important;
}

.card-header[style*="linear-gradient"] .btn-outline-light:hover,
.card-header.bg-primary .btn-outline-light:hover,
.card-header.bg-success .btn-outline-light:hover,
.card-header.bg-info .btn-outline-light:hover,
.card-header.bg-secondary .btn-outline-light:hover,
.card-header.text-white .btn-outline-light:hover,
.card-header.erp-card-header-brand .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.15) !important;
}

.card-body {
    color: var(--erp-text);
}

.card-footer {
    background-color: var(--erp-surface-2) !important;
    border-top: 1px solid var(--erp-border) !important;
    border-bottom-left-radius: 11px !important;
    border-bottom-right-radius: 11px !important;
}

/* Tables (Matches 4.png dark slate table header & clean rows) */
.table {
    color: var(--erp-text) !important;
    border-color: var(--erp-border) !important;
    margin-bottom: 0;
    vertical-align: middle;
}

.table > :not(caption) > * > * {
    background-color: transparent !important;
    color: var(--erp-text);
    border-bottom-color: var(--erp-border) !important;
    padding: 11px 14px;
    font-size: 13px;
}

.table thead th,
.table > thead > tr > th {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    background-color: var(--erp-surface-2) !important;
    color: var(--erp-text-secondary) !important;
    border-bottom: 1px solid var(--erp-border-strong) !important;
    padding: 11px 14px;
    white-space: nowrap;
}

.table thead.table-dark th,
.table thead.bg-dark th,
.table thead.bg-primary th,
.table-dark > thead > tr > th,
.table thead[style*="background"] th {
    background-color: var(--erp-table-head-bg) !important;
    color: var(--erp-table-head-text) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.table-hover > tbody > tr:hover > * {
    background-color: var(--erp-surface-hover) !important;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(15, 23, 42, 0.015) !important;
}

[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(255, 255, 255, 0.02) !important;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 14px;
    transition: all 0.15s ease;
}

.btn-sm, .btn-group-sm > .btn {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 7px;
}

.btn-primary,
.btn-success {
    background: #16795b !important;
    border-color: #16795b !important;
    color: #ffffff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-success:hover,
.btn-success:focus {
    background: #115e46 !important;
    border-color: #115e46 !important;
    color: #ffffff !important;
}

.btn-outline-primary,
.btn-outline-success {
    color: var(--erp-primary) !important;
    border-color: var(--erp-primary) !important;
    background: transparent !important;
}

.btn-outline-primary:hover,
.btn-outline-success:hover {
    background: var(--erp-primary-soft) !important;
    color: var(--erp-primary) !important;
}

.btn-secondary {
    background: var(--erp-surface) !important;
    border: 1px solid var(--erp-border-strong) !important;
    color: var(--erp-text-secondary) !important;
}

.btn-secondary:hover {
    background: var(--erp-surface-hover) !important;
    color: var(--erp-text) !important;
}

/* Action Button Group in Tables (matches 4.png) */
.table .btn-group .btn,
.table .btn-sm {
    padding: 4px 8px;
    border-radius: 6px;
}

/* Forms & Inputs */
.form-control,
.form-select {
    background-color: var(--erp-surface) !important;
    border: 1px solid var(--erp-border-strong) !important;
    color: var(--erp-text) !important;
    border-radius: 8px;
    font-size: 13.5px;
    padding: 7px 12px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--erp-primary) !important;
    box-shadow: 0 0 0 3px var(--erp-primary-soft) !important;
    background-color: var(--erp-surface) !important;
    color: var(--erp-text) !important;
}

.form-control::placeholder {
    color: var(--erp-text-muted) !important;
}

.form-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--erp-text-secondary);
    margin-bottom: 5px;
}

.input-group-text {
    background-color: var(--erp-surface-2) !important;
    border-color: var(--erp-border-strong) !important;
    color: var(--erp-text-secondary) !important;
    font-size: 13px;
}

/* Status Badges */
.badge {
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 6px;
    font-size: 11.5px;
}

/* Modals, Dropdowns, List Groups, Alerts in Dark Mode */
.modal-content,
.dropdown-menu {
    background-color: var(--erp-surface) !important;
    border: 1px solid var(--erp-border) !important;
    color: var(--erp-text) !important;
    border-radius: 12px;
    box-shadow: var(--erp-shadow-md);
}

.modal-header,
.modal-footer {
    border-color: var(--erp-border) !important;
}

.dropdown-item {
    color: var(--erp-text-secondary) !important;
    font-size: 13px;
    border-radius: 6px;
}

.dropdown-item:hover {
    background-color: var(--erp-surface-hover) !important;
    color: var(--erp-text) !important;
}

.list-group-item {
    background-color: var(--erp-surface) !important;
    border-color: var(--erp-border) !important;
    color: var(--erp-text) !important;
}

/* Neutralize Legacy Purple/Blue Inline Banner Headers across Internal Pages */
.page-header[style*="#667eea"],
.header-section[style*="#667eea"],
.hero-header[style*="#667eea"],
div[style*="#667eea"][style*="#764ba2"] {
    background: linear-gradient(135deg, #16795b 0%, #0f5132 100%) !important;
    color: #ffffff !important;
}

.text-muted {
    color: var(--erp-text-muted) !important;
}

[data-theme="dark"] .bg-light,
[data-theme="dark"] .bg-white {
    background-color: var(--erp-surface-2) !important;
    color: var(--erp-text) !important;
}

[data-theme="dark"] .text-dark {
    color: var(--erp-text) !important;
}

[data-theme="dark"] .border,
[data-theme="dark"] .border-top,
[data-theme="dark"] .border-bottom,
[data-theme="dark"] .border-start,
[data-theme="dark"] .border-end {
    border-color: var(--erp-border) !important;
}

/* Dashboard (.dw) Dark Mode Support */
[data-theme="dark"] .dw {
    --ink: #f1f5f9;
    --ink-2: #cbd5e1;
    --ink-3: #94a3b8;
    --ink-4: #64748b;
    --surf: #131c26;
    --surf-2: #182330;
    --surf-3: #1e2b3a;
    --line: #223042;
    --line-2: #2e4057;
}

/* ==========================================================================
   6. Responsive Rules (Tablet & Mobile - Matches docs/screenshots/mobile.png)
   ========================================================================== */
@media (max-width: 1199px) {
    .erp-app-tile {
        width: calc((100% - 3 * 16px) / 4);
    }
}

@media (max-width: 991px) {
    body.erp-workspace-body .erp-module-sidebar {
        transform: translateX(-100%);
        box-shadow: var(--erp-shadow-md);
    }

    body.erp-workspace-body.erp-mobile-nav-open .erp-module-sidebar {
        transform: translateX(0);
    }

    body.erp-workspace-body .main-content,
    body.erp-workspace-body .content,
    body.erp-workspace-body .content-wrapper,
    body.erp-workspace-body .dx-content,
    body.erp-workspace-body > .container-fluid,
    body.erp-workspace-body .pos-container {
        margin-left: 0 !important;
        padding: 18px 16px 32px !important;
    }

    .erp-app-tile {
        width: calc((100% - 2 * 14px) / 3);
    }
}

@media (max-width: 767px) {
    /* Compact 2-Row Topbar matching docs/screenshots/mobile.png */
    .erp-topbar {
        height: auto;
        min-height: 56px;
        flex-wrap: wrap;
        padding: 10px 14px;
        gap: 10px;
    }

    .erp-topbar-left {
        order: 1;
        gap: 8px;
        flex: 1 1 auto;
    }

    .erp-topbar-divider,
    .erp-user-meta,
    body.erp-launcher-body .erp-topbar-nav,
    .erp-search-kbd {
        display: none !important;
    }

    .erp-mobile-apps-btn {
        color: var(--erp-primary) !important;
        border-color: transparent !important;
        background: transparent !important;
    }

    .erp-date-widget {
        gap: 8px;
    }

    .erp-date-icon-box {
        width: 28px;
        height: 28px;
        border-radius: 7px;
    }

    .erp-date-text {
        flex-direction: row;
        align-items: center;
        gap: 6px;
    }

    .erp-nav-apps-pill span.erp-apps-text {
        display: none;
    }

    .erp-topbar-actions {
        order: 2;
        gap: 6px;
    }

    /* Put icons on row 1 right, search input full-width on row 2 (matching mobile.png) */
    .erp-search-wrap {
        order: 3;
        width: 100%;
        flex: 1 1 100%;
    }

    body.erp-launcher-body {
        padding-top: 104px;
    }

    body.erp-workspace-body .erp-module-sidebar {
        top: 104px;
    }

    .erp-sidebar-backdrop {
        top: 104px;
    }

    body.erp-workspace-body .main-content,
    body.erp-workspace-body .content,
    body.erp-workspace-body .content-wrapper,
    body.erp-workspace-body .dx-content,
    body.erp-workspace-body > .container-fluid,
    body.erp-workspace-body .pos-container {
        margin-top: 104px !important;
    }

    .erp-launcher-main {
        padding: 20px 14px 28px;
    }

    .erp-launcher-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 20px;
    }

    .erp-launcher-welcome h1 {
        font-size: 22px;
    }

    .erp-launcher-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .erp-launcher-filters {
        width: 100%;
        overflow-x: auto;
        justify-content: space-between;
    }

    .erp-filter-tab {
        flex: 1;
        text-align: center;
        padding: 6px 8px;
        font-size: 11.5px;
        white-space: nowrap;
    }

    /* 2-Column Mobile Tile Grid with 17th tile centered (matching mobile.png) */
    .erp-launcher-grid {
        gap: 12px;
    }

    .erp-app-tile {
        width: calc((100% - 12px) / 2);
        min-width: 135px;
        padding: 18px 10px 15px;
    }
}

@media print {
    .erp-topbar,
    .erp-module-sidebar,
    .erp-sidebar-backdrop,
    .no-print {
        display: none !important;
    }
    body.erp-workspace-body .main-content,
    body.erp-workspace-body .content,
    body.erp-workspace-body .content-wrapper,
    body.erp-workspace-body .dx-content,
    body.erp-workspace-body > .container-fluid {
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* ==========================================================================
   Executive Wall Dashboard (full-screen / kiosk presentation)
   ========================================================================== */
body.wall-kiosk .erp-topbar,
body.wall-kiosk .erp-module-sidebar,
body.wall-kiosk .erp-sidebar-backdrop,
body.wall-fullscreen .erp-topbar,
body.wall-fullscreen .erp-module-sidebar,
body.wall-fullscreen .erp-sidebar-backdrop {
    display: none !important;
}

body.wall-kiosk .content,
body.wall-kiosk .main-content,
body.wall-fullscreen .content,
body.wall-fullscreen .main-content {
    margin-left: 0 !important;
    margin-top: 0 !important;
    padding: 14px !important;
    min-height: 100vh !important;
    width: auto !important;
    max-width: none !important;
}
