#tab-pmd-gefx .tab-main {
    padding: 20px 16px 16px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 140px);
    overflow: hidden;
}

#tab-pmd-gefx .pmd-gefx-panel {
    color: #e5e7eb;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 180px);
    overflow: hidden;
    padding: 0;
}

#tab-pmd-gefx .pmd-gefx-header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: flex-start;
    margin-bottom: 16px;
}

#tab-pmd-gefx .pmd-gefx-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

#tab-pmd-gefx .pmd-gefx-heading {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #ffffff;
}

#tab-pmd-gefx .pmd-gefx-note {
    margin-top: 6px;
    max-width: 420px;
    font-size: 12px;
    line-height: 1.5;
    color: #c9ccd3;
}

#tab-pmd-gefx .pmd-gefx-header-reset {
    border: none !important;
    border-radius: 999px !important;
    background: #2b2b2b !important;
    color: #ffffff !important;
    cursor: pointer;
    box-shadow: none !important;
}

#tab-pmd-gefx .pmd-gefx-header-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.18s ease, color 0.18s ease;
}

#tab-pmd-gefx .pmd-gefx-header-reset:hover {
    background: #1f1f1f !important;
    color: #d8d8d8 !important;
}

#tab-pmd-gefx .pmd-gefx-header-reset-icon {
    font-size: 15px;
    line-height: 1;
}

#tab-pmd-gefx .pmd-gefx-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0 6px 28px 0;
    scrollbar-width: thin;
    scrollbar-color: #8a8a8a rgba(255, 255, 255, 0.05);
}

#tab-pmd-gefx .pmd-gefx-body::-webkit-scrollbar {
    width: 6px;
}

#tab-pmd-gefx .pmd-gefx-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

#tab-pmd-gefx .pmd-gefx-body::-webkit-scrollbar-thumb {
    background: #8a8a8a;
    border-radius: 10px;
}

#tab-pmd-gefx .pmd-gefx-group {
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
}

#tab-pmd-gefx .pmd-gefx-subheading {
    margin-bottom: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #a3a3a3;
}

#tab-pmd-gefx .pmd-gefx-row {
    display: grid;
    grid-template-columns: 108px 1fr 46px;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

#tab-pmd-gefx .pmd-gefx-row:last-child {
    margin-bottom: 0;
}

#tab-pmd-gefx .pmd-gefx-row.pmd-gefx-inline {
    grid-template-columns: 108px 1fr;
}

#tab-pmd-gefx .pmd-gefx-row label,
#tab-pmd-gefx .pmd-gefx-checks label,
#tab-pmd-gefx .pmd-gefx-heading,
#tab-pmd-gefx .pmd-gefx-note,
#tab-pmd-gefx .pmd-gefx-subheading {
    text-align: left !important;
}

#tab-pmd-gefx .pmd-gefx-row label {
    min-width: 108px;
    font-weight: 600;
    color: #f3f4f6;
}

#tab-pmd-gefx .pmd-gefx-row span {
    min-width: 40px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: #1f1f1f;
    text-align: right;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
}

#tab-pmd-gefx .pmd-gefx-row input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: #4b4b4b !important;
    border-radius: 999px;
    outline: none;
}

#tab-pmd-gefx .pmd-gefx-row input[type="range"]::-webkit-slider-runnable-track {
    height: 4px;
    background: #4b4b4b;
    border-radius: 999px;
}

#tab-pmd-gefx .pmd-gefx-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    margin-top: -4px;
    border: none;
    border-radius: 50%;
    background: #cfcfcf !important;
    box-shadow: none !important;
}

#tab-pmd-gefx .pmd-gefx-row input[type="range"]::-moz-range-track {
    height: 4px;
    border: none;
    border-radius: 999px;
    background: #4b4b4b;
}

#tab-pmd-gefx .pmd-gefx-row input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border: none;
    border-radius: 50%;
    background: #cfcfcf !important;
    box-shadow: none !important;
}

#tab-pmd-gefx .pmd-gefx-row select {
    width: 100%;
    height: 36px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: #1f1f1f;
    color: #ffffff;
}

#tab-pmd-gefx .pmd-gefx-checks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
}

#tab-pmd-gefx .pmd-gefx-checks label {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    background: #1f1f1f;
    font-weight: 500;
    color: #f3f4f6;
}

#tab-pmd-gefx .pmd-gefx-checks input {
    accent-color: #7a5cff;
}

#tab-pmd-gefx .pmd-gefx-presets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

#tab-pmd-gefx .pmd-gefx-presets .nbd-button {
    min-height: 34px;
    padding: 8px 10px !important;
    border: none !important;
    border-radius: 8px !important;
    background: #2b2b2b !important;
    color: #ffffff !important;
    text-transform: none !important;
    box-shadow: none !important;
}

#tab-pmd-gefx .pmd-gefx-presets .nbd-button.active,
#tab-pmd-gefx .pmd-gefx-presets .nbd-button:hover {
    background: #1f1f1f !important;
    color: #a78bfa !important;
    box-shadow: 0 0 0 1px rgba(122, 92, 255, 0.45) inset !important;
}

#tab-pmd-gefx .pmd-gefx-actions-wrap,
#tab-pmd-gefx .pmd-gefx-actions,
#tab-pmd-gefx .pmd-gefx-status {
    display: none !important;
}

#tab-pmd-gefx .pmd-gefx-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;
    min-width: 180px;
    max-width: 320px;
    padding: 11px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(22, 22, 22, 0.95);
    color: #f3f4f6;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

#tab-pmd-gefx .pmd-gefx-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

#tab-pmd-gefx .pmd-gefx-toast.is-error {
    border-color: rgba(255, 105, 135, 0.18);
    background: rgba(58, 31, 40, 0.96);
    color: #ffd6dd;
}

#nav-pmd-gefx {
    display: flex;
    align-items: center;
    gap: 8px;
}

#nav-pmd-gefx .pmd-gefx-tab-label {
    white-space: nowrap;
}

#nav-pmd-gefx .pmd-gefx-tab-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#nav-pmd-gefx .pmd-gefx-tab-icon svg {
    width: 22px !important;
    height: 22px !important;
    color: #ffffff !important;
    filter: drop-shadow(0 0 6px rgba(122, 92, 255, 0.8));
}

#nav-pmd-gefx.active .pmd-gefx-tab-icon svg,
#nav-pmd-gefx.current .pmd-gefx-tab-icon svg {
    filter: drop-shadow(0 0 10px rgba(122, 92, 255, 1));
}


/* --- NBDesigner tab style match fix --- */
#nav-pmd-gefx {
    background: transparent !important;
    color: inherit !important;
}

.nbdesigner .nbd-nav-tab.active#nav-pmd-gefx,
.nbdesigner .nbd-nav-tab.current#nav-pmd-gefx {
    background: #fff !important;
    color: #333 !important;
    border-bottom: 2px solid #00a0d2;
}

.nbdesigner .nbd-nav-tab#nav-pmd-gefx:hover {
    background: #f5f5f5;
}


#tab-pmd-gefx .pmd-gefx-preset-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#tab-pmd-gefx .pmd-gefx-preset-block {
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
}

#tab-pmd-gefx .pmd-gefx-preset-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 6px;
    color: #f1f3f5;
}

#tab-pmd-gefx .pmd-gefx-preset-help {
    font-size: 12px;
    line-height: 1.45;
    color: #c9ccd3;
    margin-bottom: 10px;
}

#tab-pmd-gefx .pmd-gefx-custom-preset-form,
#tab-pmd-gefx .pmd-gefx-custom-preset-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

#tab-pmd-gefx .pmd-gefx-custom-preset-form input[type="text"],
#tab-pmd-gefx .pmd-gefx-custom-preset-actions select {
    flex: 1 1 180px;
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.18);
    color: #ffffff;
}

#tab-pmd-gefx .pmd-gefx-custom-preset-actions {
    margin-top: 10px;
}

#tab-pmd-gefx .pmd-gefx-custom-preset-actions .nbd-button,
#tab-pmd-gefx .pmd-gefx-custom-preset-form .nbd-button {
    min-height: 34px;
}


/* vertical icon layout fix */
#nav-pmd-gefx {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px;
}

#nav-pmd-gefx .pmd-gefx-tab-icon {
    display: block;
}

#nav-pmd-gefx .pmd-gefx-tab-label {
    display: block;
    font-size: 11px;
    line-height: 1;
}


/* text color fix */
#nav-pmd-gefx .pmd-gefx-tab-label {
    color: #000 !important;
}

#tab-pmd-gefx .pmd-gefx-heading,
#tab-pmd-gefx .pmd-gefx-subheading,
#tab-pmd-gefx .pmd-gefx-note,
#tab-pmd-gefx .pmd-gefx-row label {
    color: #000 !important;
}

/* keep buttons unchanged */



/* theme-aware UI */
#tab-pmd-gefx {
    color: inherit;
}

#nav-pmd-gefx .pmd-gefx-tab-label,
#tab-pmd-gefx .pmd-gefx-heading,
#tab-pmd-gefx .pmd-gefx-subheading,
#tab-pmd-gefx .pmd-gefx-note,
#tab-pmd-gefx .pmd-gefx-row label,
#tab-pmd-gefx .pmd-gefx-row span,
#tab-pmd-gefx .pmd-gefx-preset-title,
#tab-pmd-gefx .pmd-gefx-preset-help,
#tab-pmd-gefx .pmd-gefx-status {
    color: inherit !important;
}

#tab-pmd-gefx .pmd-gefx-panel,
#tab-pmd-gefx .pmd-gefx-heading,
#tab-pmd-gefx .pmd-gefx-note,
#tab-pmd-gefx .pmd-gefx-subheading {
    color: inherit !important;
}

#tab-pmd-gefx .pmd-gefx-group,
#tab-pmd-gefx .pmd-gefx-preset-block {
    background: transparent;
    border-color: rgba(127,127,127,0.25);
}

#tab-pmd-gefx .pmd-gefx-row select,
#tab-pmd-gefx .pmd-gefx-custom-preset-form input[type="text"],
#tab-pmd-gefx .pmd-gefx-custom-preset-actions select {
    background: inherit;
    color: inherit;
    border-color: rgba(127,127,127,0.35);
}

#tab-pmd-gefx .pmd-gefx-body::-webkit-scrollbar-track {
    background: rgba(127,127,127,0.08);
}

#tab-pmd-gefx .pmd-gefx-body::-webkit-scrollbar-thumb {
    background: rgba(127,127,127,0.45);
}

@media (prefers-color-scheme: dark) {
    #tab-pmd-gefx .pmd-gefx-group,
    #tab-pmd-gefx .pmd-gefx-preset-block {
        border-color: rgba(255,255,255,0.12);
    }

    #tab-pmd-gefx .pmd-gefx-row select,
    #tab-pmd-gefx .pmd-gefx-custom-preset-form input[type="text"],
    #tab-pmd-gefx .pmd-gefx-custom-preset-actions select {
        background: rgba(255,255,255,0.04);
        border-color: rgba(255,255,255,0.16);
    }
}

@media (prefers-color-scheme: light) {
    #tab-pmd-gefx .pmd-gefx-group,
    #tab-pmd-gefx .pmd-gefx-preset-block {
        border-color: rgba(0,0,0,0.12);
    }

    #tab-pmd-gefx .pmd-gefx-row select,
    #tab-pmd-gefx .pmd-gefx-custom-preset-form input[type="text"],
    #tab-pmd-gefx .pmd-gefx-custom-preset-actions select {
        background: rgba(0,0,0,0.02);
        border-color: rgba(0,0,0,0.18);
    }
}



/* premium panel refinement */
#nav-pmd-gefx .pmd-gefx-tab-label {
    color: #fff !important;
    font-weight: 400 !important;
    letter-spacing: 0 !important;
}

#tab-pmd-gefx .pmd-gefx-heading {
    font-weight: 600 !important;
    color: inherit !important;
    margin-bottom: 2px;
}

#tab-pmd-gefx .pmd-gefx-subheading,
#tab-pmd-gefx .pmd-gefx-preset-title,
#tab-pmd-gefx .pmd-gefx-row label,
#tab-pmd-gefx .pmd-gefx-note {
    font-weight: 400 !important;
    color: inherit !important;
}

#tab-pmd-gefx .tab-main {
    padding: 18px 14px 14px;
}

#tab-pmd-gefx .pmd-gefx-header {
    margin-bottom: 12px;
    gap: 10px;
}

#tab-pmd-gefx .pmd-gefx-note {
    font-size: 12px;
    line-height: 1.45;
    opacity: 0.9;
    max-width: 100%;
}

#tab-pmd-gefx .pmd-gefx-body {
    padding: 0 4px 22px 0;
}

#tab-pmd-gefx .pmd-gefx-group,
#tab-pmd-gefx .pmd-gefx-preset-block {
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
    box-shadow: none;
}

#tab-pmd-gefx .pmd-gefx-group-last {
    margin-bottom: 8px;
}

#tab-pmd-gefx .pmd-gefx-subheading,
#tab-pmd-gefx .pmd-gefx-preset-title {
    font-size: 12px;
    text-transform: none !important;
    letter-spacing: 0 !important;
    margin-bottom: 8px;
}

#tab-pmd-gefx .pmd-gefx-row {
    gap: 6px;
    padding: 6px 0;
}

#tab-pmd-gefx .pmd-gefx-row label {
    font-size: 12px;
    margin-bottom: 1px;
}

#tab-pmd-gefx .pmd-gefx-row span {
    font-size: 11px;
    min-width: 28px;
    text-align: right;
    opacity: 0.85;
}

#tab-pmd-gefx .pmd-gefx-row input[type="range"] {
    margin: 1px 0 0;
}

#tab-pmd-gefx .pmd-gefx-checks {
    gap: 8px 14px;
    margin-top: 4px;
}

#tab-pmd-gefx .pmd-gefx-checks label {
    font-weight: 400 !important;
}

#tab-pmd-gefx .pmd-gefx-presets {
    gap: 8px;
}

#tab-pmd-gefx .pmd-gefx-presets .nbd-button,
#tab-pmd-gefx .pmd-gefx-custom-preset-form .nbd-button,
#tab-pmd-gefx .pmd-gefx-custom-preset-actions .nbd-button {
    border-radius: 6px;
}

#tab-pmd-gefx .pmd-gefx-preset-help {
    margin-bottom: 8px;
    line-height: 1.4;
    opacity: 0.85;
}

#tab-pmd-gefx .pmd-gefx-custom-preset-form,
#tab-pmd-gefx .pmd-gefx-custom-preset-actions {
    gap: 8px;
}

#tab-pmd-gefx .pmd-gefx-actions-wrap {
    padding-top: 8px;
    margin-top: 2px;
}

#tab-pmd-gefx .pmd-gefx-status {
    font-size: 12px;
    opacity: 0.9;
}


/* main section bold */
#tab-pmd-gefx .pmd-gefx-section-main {
    font-weight: 600 !important;
}


/* FINAL: all section headings bold */
#tab-pmd-gefx .pmd-gefx-subheading {
    font-weight: 600 !important;
}


/* row spacing refinement */
#tab-pmd-gefx .pmd-gefx-row {
    margin-bottom: 4px !important;
}


/* value label styling */
#tab-pmd-gefx .pmd-gefx-row span {
    padding: 4px !important;
    color: #fff !important;
}


/* ensure consistent row spacing */
#tab-pmd-gefx .pmd-gefx-row {
    margin-bottom: 4px !important;
}


/* compact rows spacing */
#tab-pmd-gefx .pmd-gefx-row {
    margin-bottom: 2px !important;
    padding: 2px 0 !important;
    gap: 4px !important;
}

#tab-pmd-gefx .pmd-gefx-row input[type="range"] {
    margin: 0 !important;
}
