/* Presentation only. Visibility, authentication and modal state belong to the application. */
.pm-app {
    --pm-teal: #0d9488;
    --pm-teal-dark: #0f766e;
    --pm-cyan: #0891b2;
    --pm-ink: #172b35;
    --pm-muted: #627680;
    --pm-line: #e1e9ec;
    --pm-surface: #ffffff;
    --pm-radius: 22px;
    color: var(--pm-ink);
    background: #f4f8f9;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
.pm-app button { -webkit-tap-highlight-color: transparent; }
.pm-app button:focus-visible, .pm-app a:focus-visible,
.pm-app input:focus-visible, .pm-app textarea:focus-visible, .pm-app select:focus-visible {
    outline: 3px solid #14b8a6;
    outline-offset: 3px;
}
.pm-app .pm-header {
    padding: 17px 24px;
    border-bottom: 1px solid var(--pm-line);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 3px 18px #15364005;
    z-index: 40;
}
.pm-header-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.pm-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
    flex-shrink: 0;
    cursor: pointer;
}
.pm-brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--pm-teal), var(--pm-cyan));
    color: white;
    font-size: 25px;
    font-weight: 800;
    box-shadow: 0 5px 12px #0d94881b;
}
.pm-brand-title { display: block; margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.55px; line-height: 1.3; }
.pm-brand-title span { color: var(--pm-teal-dark); }
.pm-brand-subtitle { display: block; margin: 3px 0 0; color: var(--pm-muted); font-size: 11px; line-height: 1.4; }
.pm-header-tools { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.pm-header-tools > button, .pm-header-tools > .relative > button,
.pm-header-tools #nav-user-section > button { min-height: 44px; border-radius: 14px; box-shadow: none; }
.pm-header-tools #nav-guest-section { gap: 6px; }
.pm-header-tools #nav-guest-section button { min-height: 44px; padding: 10px 14px; border-radius: 14px; box-shadow: none; }
.pm-header-tools #nav-user-section { gap: 8px; }
.pm-header-tools #user-display-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-app #notifications-dropdown { border-color: var(--pm-line); box-shadow: 0 12px 40px #15364020; }
.pm-app #notifications-dropdown button { min-height: 36px; }
.pm-app #notifications-list { overscroll-behavior: contain; }
.pm-app .pm-desktop-nav {
    max-width: 1120px;
    margin: 0 auto;
    padding: 12px 0 0;
    display: flex;
    align-items: center;
    gap: 7px;
}
.pm-desktop-nav button {
    min-height: 42px;
    padding: 9px 17px;
    border-radius: 12px;
    color: var(--pm-muted);
    font-size: 12px;
    font-weight: 700;
    background: transparent;
    transition: color .15s ease, background .15s ease;
}
.pm-desktop-nav button i { margin-right: 7px; }
.pm-desktop-nav button:hover { color: var(--pm-teal-dark); background: #f0fdfa; }
.pm-app:has(#view-home.active) [data-pm-nav="home"],
.pm-app:has(#view-catalog.active) [data-pm-nav="catalog"],
.pm-app:has(#view-stock-market.active) [data-pm-nav="stock"],
.pm-app:has(#view-suppliers.active) [data-pm-nav="suppliers"],
.pm-app:has(#view-purchase-list.active) [data-pm-nav="list"] { color: var(--pm-teal-dark); background: #e7f5f2; }
.pm-app #cloud-status { padding: 8px 18px; font-size: 11px; line-height: 1.5; }
.pm-app .pm-main {
    width: 100%;
    max-width: 1168px;
    margin: 0 auto;
    padding: 32px 24px 40px;
    min-width: 0;
}
.pm-app .pm-home > * + * { margin-top: 26px; }
.pm-welcome { padding: 0 2px; }
.pm-welcome .pm-eyebrow { margin: 0 0 5px; color: var(--pm-teal-dark); font-size: 11px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; }
.pm-welcome h1 { margin: 0; font-size: clamp(24px, 3vw, 32px); font-weight: 800; line-height: 1.3; letter-spacing: -.9px; }
.pm-welcome > p:last-child { margin: 8px 0 0; color: var(--pm-muted); font-size: 13px; }
.pm-feature-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    align-items: center;
    gap: 32px;
    padding: 32px 38px;
    border-radius: 26px;
    background: linear-gradient(115deg, #0f766e 0%, #0d9488 58%, #0891b2 100%);
    color: white;
    overflow: hidden;
    position: relative;
    isolation: isolate;
}
.pm-feature-card::after { content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%; right: -145px; top: -165px; background: #ffffff0c; z-index: -1; }
.pm-feature-label { margin: 0 0 9px; color: #d2ffef; font-size: 11px; font-weight: 700; }
.pm-feature-copy #pm-list-feature-title { max-width: 540px; margin: 0; font-size: clamp(23px, 3vw, 32px); font-weight: 800; line-height: 1.27; letter-spacing: -.75px; }
.pm-feature-copy > p:not(.pm-feature-label) { max-width: 570px; margin: 13px 0 0; font-size: 13px; line-height: 1.8; color: #e2faf6; }
.pm-feature-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; margin-top: 22px; }
.pm-feature-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 12px 18px; border-radius: 13px; font-size: 12px; font-weight: 800; transition: transform .15s ease, background .15s ease; }
.pm-button-primary { color: #0f766e; background: white; border: 1px solid white; box-shadow: 0 4px 12px #064e3b15; }
.pm-button-primary:hover { background: #e8fff8; transform: translateY(-1px); }
.pm-button-secondary { color: white; background: #ffffff0d; border: 1px solid #ffffff66; }
.pm-button-secondary:hover { background: #ffffff1a; }
.pm-feature-art { display: flex; align-items: center; justify-content: center; position: relative; min-height: 164px; }
.pm-feature-art::before { content: ""; width: 186px; height: 186px; position: absolute; border: 1px solid #ffffff24; border-radius: 50%; background: #ffffff07; }
.pm-paper { position: relative; width: 154px; padding: 17px; border-radius: 16px; background: #f7fffd; color: #0f766e; box-shadow: 0 12px 35px #07596525; transform: rotate(-8deg); }
.pm-paper-heading { display: flex; gap: 7px; align-items: center; margin-bottom: 13px; font-size: 11px; font-weight: 800; }
.pm-paper-line { display: flex; align-items: center; gap: 9px; padding: 9px 0; border-top: 1px solid #dfefe9; }
.pm-paper-line i { font-size: 10px; }
.pm-paper-line span { height: 6px; flex: 1; background: #b5dfd5; border-radius: 4px; }
.pm-paper-line:nth-child(3) span { max-width: 66px; }
.pm-paper-line:nth-child(4) span { max-width: 79px; }
.pm-quick-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.pm-quick-action { display: flex; flex-direction: column; align-items: center; gap: 11px; padding: 18px 12px; border: 1px solid var(--pm-line); border-radius: 20px; background: white; text-align: center; transition: border-color .15s ease, transform .15s ease; }
.pm-quick-action:hover { border-color: #aadacf; transform: translateY(-2px); }
.pm-quick-icon, .pm-service-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; flex-shrink: 0; font-size: 19px; }
.pm-icon-teal { color: #0f766e; background: #e3f5ee; }
.pm-icon-cyan { color: #0e7490; background: #e2f4f8; }
.pm-icon-amber { color: #a16207; background: #fff4da; }
.pm-icon-slate { color: #526575; background: #ecf0f5; }
.pm-quick-label { font-size: 12px; font-weight: 700; line-height: 1.5; color: var(--pm-ink); }
.pm-home-tools { padding: 5px 0 0; }
.pm-section-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 18px; margin-bottom: 14px; padding: 0 2px; }
.pm-section-heading #pm-tools-title { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.35px; }
.pm-section-heading p { margin: 0; color: var(--pm-muted); font-size: 12px; }
.pm-service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pm-service-card { display: flex; align-items: center; gap: 15px; padding: 20px; border: 1px solid var(--pm-line); border-radius: 20px; background: white; text-align: left; transition: border-color .15s ease, background .15s ease; }
.pm-service-card:hover { border-color: #aadacf; background: #fcfffe; }
.pm-service-copy { flex: 1; min-width: 0; }
.pm-service-copy strong { display: block; color: var(--pm-ink); font-size: 14px; font-weight: 800; line-height: 1.5; }
.pm-service-copy small { display: block; margin-top: 5px; color: var(--pm-muted); font-size: 12px; line-height: 1.7; }
.pm-service-arrow { color: #879b9f; font-size: 12px; }
.pm-app .app-view { min-width: 0; }
.pm-app .app-view > .bg-white { border-color: var(--pm-line); border-radius: var(--pm-radius); box-shadow: 0 3px 12px #15364003; }
.pm-app .app-view h2 { letter-spacing: -.5px; line-height: 1.4; }
.pm-app .app-view h3 { letter-spacing: -.2px; }
.pm-app .app-view .text-xs { line-height: 1.7; }
.pm-app .app-view button { min-height: 42px; }
.pm-app .app-view button, .pm-app .modal button { touch-action: manipulation; }
.pm-app .app-view input:not([type="checkbox"]):not([type="radio"]),
.pm-app .app-view select, .pm-app .app-view textarea,
.pm-app .modal input:not([type="checkbox"]):not([type="radio"]),
.pm-app .modal select, .pm-app .modal textarea { min-height: 46px; border-radius: 13px; }
.pm-app .app-view .overflow-x-auto { overscroll-behavior-x: contain; }
.pm-app #d-search-results-box > div, .pm-app #suppliers-list-box > div { border-color: var(--pm-line); border-radius: 20px; box-shadow: 0 3px 12px #15364003; }
.pm-app #purchase-list-root .pm-list-card,
.pm-app #stock-market-root .pm-stock-panel,
.pm-app #stock-market-root .pm-stock-card { border-color: var(--pm-line); border-radius: 20px; box-shadow: 0 3px 12px #15364003; }
.pm-app #purchase-list-root .pm-list-card { margin-bottom: 18px; }
.pm-app #stock-market-root .pm-stock-panel:first-child { margin-top: 0; }
.pm-app #purchase-list-root h2, .pm-app #stock-market-root h2 { font-size: 23px; letter-spacing: -.5px; line-height: 1.4; }
.pm-app #purchase-list-root button, .pm-app #stock-market-root button { min-height: 44px; border-radius: 12px; }
.pm-app #purchase-list-root input:not([type="checkbox"]),
.pm-app #purchase-list-root select, .pm-app #purchase-list-root textarea,
.pm-app #stock-market-root input:not([type="checkbox"]),
.pm-app #stock-market-root select, .pm-app #stock-market-root textarea { min-height: 46px; border-radius: 12px; }
.pm-app .modal { padding: 20px; overscroll-behavior: contain; }
.pm-app .modal > div { max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain; border-radius: 24px; border-color: var(--pm-line); box-shadow: 0 24px 80px #0f172a24; }
.pm-app .modal > div > h3 { padding-right: 42px; line-height: 1.4; }
.pm-app .modal > div > button[onclick^="closeModal"] { width: 44px; height: 44px; top: 15px; right: 15px; border-radius: 12px; background: #f4f8f9; }
.pm-app .modal form button { min-height: 46px; }
.pm-app #stock-buy-dialog, .pm-app #pm-reputation-dialog { border-radius: 24px; }
.pm-app #stock-buy-dialog button, .pm-app #pm-reputation-dialog button { min-height: 44px; border-radius: 12px; }
.pm-app #stock-buy-dialog input:not([type="checkbox"]),
.pm-app #stock-buy-dialog select, .pm-app #stock-buy-dialog textarea,
.pm-app #pm-reputation-dialog select, .pm-app #pm-reputation-dialog textarea { min-height: 46px; border-radius: 12px; }
.pm-app .pm-footer { margin-top: auto; padding: 24px; border-top: 1px solid var(--pm-line); background: white; }
.pm-footer > div { max-width: 1120px; margin: 0 auto; }
.pm-footer p { color: var(--pm-muted); font-size: 11px; line-height: 1.7; }
.pm-mobile-nav { display: none; }

@media (max-width: 1024px) {
    .pm-header-inner { gap: 12px; flex-wrap: wrap; }
    .pm-header-tools { gap: 7px; flex-wrap: wrap; max-width: 100%; margin-left: auto; }
    .pm-header-tools #nav-user-section { gap: 6px; flex-wrap: wrap; max-width: 100%; }
    .pm-header-tools #user-display-name { max-width: 120px; }
    .pm-brand-subtitle { max-width: 235px; }
    .pm-feature-card { padding: 28px; gap: 20px; grid-template-columns: minmax(0, 1fr) 190px; }
}
@media (max-width: 767px) {
    .pm-app .pm-header { padding: 12px 16px !important; }
    .pm-header-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 8px !important; }
    .pm-brand { grid-column: 1; grid-row: 1; min-width: 0; gap: 9px; }
    .pm-brand-mark { width: 38px; height: 38px; border-radius: 13px; font-size: 22px; }
    .pm-brand-copy { min-width: 0; }
    .pm-brand-title { font-size: 16px; letter-spacing: -.65px; white-space: nowrap; }
    .pm-brand-subtitle { margin-top: 2px; font-size: 10px; }
    .pm-app .pm-header-tools { display: contents; }
    .pm-header-tools > .relative { grid-column: 2; grid-row: 1; margin-right: 48px; }
    .pm-header-tools > button { grid-column: 2; grid-row: 1; justify-self: end; }
    .pm-header-tools > button, .pm-header-tools > .relative > button { min-width: 44px; min-height: 44px; padding: 10px; justify-content: center; gap: 4px; }
    .pm-header-tools #nav-guest-section, .pm-header-tools #nav-user-section { grid-column: 1 / -1; grid-row: 2; justify-content: flex-end; padding-top: 9px; gap: 7px !important; }
    .pm-header-tools #nav-guest-section button { min-height: 42px; padding: 8px 15px; font-size: 12px; }
    .pm-header-tools #nav-user-section > button { min-width: 44px; padding: 10px 12px; }
    .pm-app .pm-desktop-nav { display: none; }
    .pm-app #notifications-dropdown { position: fixed; top: 120px; left: 12px; right: 12px; width: auto; max-height: calc(100vh - 140px); max-height: calc(100dvh - 140px); margin-top: 0; overflow-y: auto; overscroll-behavior: contain; }
    .pm-app .pm-main { padding: 24px 16px 28px !important; }
    .pm-app .pm-home > * + * { margin-top: 22px; }
    .pm-welcome h1 { font-size: 25px; letter-spacing: -.75px; }
    .pm-welcome > p:last-child { font-size: 12px; margin-top: 7px; }
    .pm-feature-card { grid-template-columns: minmax(0, 1fr); padding: 25px 23px; border-radius: 23px; gap: 0; }
    .pm-feature-art { display: none; }
    .pm-feature-copy #pm-list-feature-title { max-width: 400px; font-size: 26px; }
    .pm-feature-copy > p:not(.pm-feature-label) { font-size: 12px; margin-top: 12px; }
    .pm-feature-actions { gap: 9px; margin-top: 20px; }
    .pm-feature-actions button { min-height: 45px; padding: 11px 14px; font-size: 12px; }
    .pm-quick-actions { gap: 9px; }
    .pm-quick-action { padding: 14px 5px; border-radius: 17px; gap: 9px; }
    .pm-quick-icon { width: 43px; height: 43px; border-radius: 14px; font-size: 17px; }
    .pm-quick-label { font-size: 11px; }
    .pm-section-heading { gap: 4px; margin-bottom: 12px; }
    .pm-section-heading #pm-tools-title { font-size: 16px; }
    .pm-section-heading p { width: 100%; font-size: 11px; }
    .pm-service-grid { grid-template-columns: minmax(0, 1fr); gap: 11px; }
    .pm-service-card { padding: 17px; border-radius: 19px; gap: 13px; }
    .pm-service-copy strong { font-size: 13px; }
    .pm-service-copy small { font-size: 11px; margin-top: 3px; }
    .pm-app .app-view > .bg-white { padding: 20px; }
    .pm-app .app-view input:not([type="checkbox"]):not([type="radio"]),
    .pm-app .app-view select, .pm-app .app-view textarea,
    .pm-app .modal input:not([type="checkbox"]):not([type="radio"]),
    .pm-app .modal select, .pm-app .modal textarea,
    .pm-app #stock-buy-dialog input:not([type="checkbox"]),
    .pm-app #stock-buy-dialog select, .pm-app #stock-buy-dialog textarea,
    .pm-app #pm-reputation-dialog select, .pm-app #pm-reputation-dialog textarea { font-size: 16px; }
    .pm-app #purchase-list-root input:not([type="checkbox"]),
    .pm-app #purchase-list-root select, .pm-app #purchase-list-root textarea,
    .pm-app #stock-market-root input:not([type="checkbox"]),
    .pm-app #stock-market-root select, .pm-app #stock-market-root textarea { font-size: 16px; }
    .pm-app #purchase-list-root h2, .pm-app #stock-market-root h2 { font-size: 20px; }
    .pm-app #view-catalog > div:first-child > div:first-child { flex-wrap: wrap; align-items: flex-start; gap: 13px; }
    .pm-app #view-catalog > div:first-child > div:first-child > div { flex-wrap: wrap; gap: 12px; }
    .pm-app #view-suppliers > div:first-child > div:first-child { flex-wrap: wrap; align-items: flex-start; gap: 13px; }
    .pm-app #view-catalog h2 { font-size: 18px; }
    .pm-app #ai-agent-input { min-width: 0; }
    .pm-app .modal { padding: 12px; }
    .pm-app .modal > div { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); padding: 22px !important; border-radius: 22px; }
    .pm-app .modal > div > h3 { font-size: 18px; }
    .pm-app #cart-modal > div > .flex.gap-3 { flex-wrap: wrap; }
    .pm-app #cart-modal > div > .flex.gap-3 > button { flex-basis: 100%; min-height: 46px; }
    .pm-app .pm-footer { padding: 20px 16px calc(103px + env(safe-area-inset-bottom, 0px)); }
    .pm-mobile-nav {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 30;
        gap: 3px;
        padding: 9px 9px calc(10px + env(safe-area-inset-bottom, 0px));
        border-top: 1px solid var(--pm-line);
        border-radius: 21px 21px 0 0;
        background: rgba(255, 255, 255, .98);
        box-shadow: 0 -6px 26px #15364008;
    }
    .pm-mobile-nav button { min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 5px 2px; border-radius: 13px; color: #71818b; background: transparent; font-size: 10px; font-weight: 700; line-height: 1.3; }
    .pm-mobile-nav button > i { font-size: 18px; line-height: 1.4; }
    .pm-mobile-nav .pm-mobile-nav-main { position: relative; padding-top: 27px; }
    .pm-mobile-nav .pm-mobile-nav-main > i { display: grid; place-items: center; position: absolute; top: -21px; width: 49px; height: 49px; border: 4px solid white; border-radius: 17px; background: linear-gradient(135deg, #0d9488, #0891b2); color: white; font-size: 20px; box-shadow: 0 5px 13px #0d948829; }
}
@media (max-width: 359px) {
    .pm-app .pm-header { padding-right: 12px !important; padding-left: 12px !important; }
    .pm-brand-title { font-size: 14px; }
    .pm-brand-subtitle { font-size: 9px; }
    .pm-brand-mark { width: 34px; height: 34px; font-size: 20px; }
    .pm-brand { gap: 7px; }
    .pm-app .pm-main { padding-right: 12px !important; padding-left: 12px !important; }
    .pm-feature-card { padding: 22px 19px; }
    .pm-feature-copy #pm-list-feature-title { font-size: 24px; }
    .pm-feature-actions button { width: 100%; }
    .pm-quick-actions { gap: 6px; }
    .pm-quick-label { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .pm-app *, .pm-app *::before, .pm-app *::after { scroll-behavior: auto !important; transition-duration: 0s !important; animation-duration: 0s !important; }
    .pm-quick-action:hover, .pm-button-primary:hover { transform: none; }
}
