/* ==========================================================================
   Placer Operations Hub v2.0 — Dark/Gold Theme
   Colors: #D2B373 (gold), #B89B4E (dark gold), #000 (bg), #181818 (surface)
   ========================================================================== */

/* ---------- CSS Variables ---------- */
:root {
    --poh-gold: #D2B373;
    --poh-gold-dark: #B89B4E;
    --poh-gold-light: #E5D4A1;
    --poh-bg: #000000;
    --poh-surface: #181818;
    --poh-surface-hover: #222222;
    --poh-border: #333333;
    --poh-border-gold: rgba(210, 179, 115, 0.3);
    --poh-text: #DBDBDB;
    --poh-text-muted: #888888;
    --poh-text-dim: #666666;
    --poh-white: #FFFFFF;
    --poh-green: #4ADE80;
    --poh-red: #F87171;
    --poh-orange: #FB923C;
    --poh-blue: #60A5FA;
    --poh-yellow: #FACC15;
    --poh-radius: 8px;
    --poh-radius-lg: 12px;
    --poh-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* ---------- Back to Dashboard Button ---------- */
.poh-back-nav {
    margin-bottom: 1.5rem;
    text-align: center;
}

.poh-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--poh-surface);
    color: var(--poh-gold) !important;
    border: 1px solid var(--poh-border-gold);
    border-radius: var(--poh-radius);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.poh-btn-back:hover {
    background: var(--poh-surface-hover);
    border-color: var(--poh-gold);
    color: var(--poh-gold-light) !important;
    transform: translateX(-3px);
}

/* ---------- Dashboard Card Grid ---------- */
.poh-dashboard-grid {
    padding: 0;
}

.poh-dashboard-welcome h2 {
    color: var(--poh-gold);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}

.poh-dashboard-section {
    margin-top: 2rem;
}

.poh-section-title {
    color: var(--poh-gold);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--poh-border);
}

.poh-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
}

.poh-dash-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--poh-surface);
    border: 1px solid var(--poh-border);
    border-radius: var(--poh-radius-lg);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.poh-dash-card:hover {
    border-color: var(--poh-border-gold);
    background: var(--poh-surface-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.poh-dash-card-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(210, 179, 115, 0.1);
    border-radius: var(--poh-radius);
}

.poh-dash-card-content {
    flex: 1;
    min-width: 0;
}

.poh-dash-card-title {
    color: var(--poh-text);
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
    line-height: 1.3;
}

.poh-dash-card-desc {
    color: var(--poh-text-muted);
    font-size: 0.75rem;
    margin: 0;
    line-height: 1.4;
}

/* ---------- Alert Boxes (FIXED: readable text colors) ---------- */
.poh-alert {
    padding: 0.75rem 1rem;
    border-radius: var(--poh-radius);
    margin-bottom: 1rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.poh-alert-success {
    background: rgba(74, 222, 128, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: #155724;
}

.poh-alert-error {
    background: rgba(248, 113, 113, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #721c24;
}

.poh-alert-warning {
    background: rgba(251, 146, 60, 0.15);
    border: 1px solid rgba(251, 146, 60, 0.3);
    color: #856404;
}

.poh-alert-info {
    background: rgba(96, 165, 250, 0.15);
    border: 1px solid rgba(96, 165, 250, 0.3);
    color: #0c5460;
}

/* ---------- Base Overrides for My Account ---------- */
/* HIDE the old WooCommerce sidebar navigation on ALL screen sizes */
.woocommerce-account .woocommerce-MyAccount-navigation {
    display: none !important;
}

/* Make content area full-width since sidebar is hidden */
.woocommerce-account .woocommerce-MyAccount-content {
    background: var(--poh-bg);
    color: var(--poh-text);
    width: 100% !important;
    float: none !important;
    max-width: 100% !important;
}

/* Hide any WooCommerce-generated back/breadcrumb links that duplicate our centered button */
.woocommerce-account .woocommerce-MyAccount-content > p:first-child > a[href*="my-account"],
.woocommerce-account .woocommerce-MyAccount-content > a.woocommerce-back-link,
.woocommerce-account .woocommerce-MyAccount-content > .woocommerce-breadcrumb {
    display: none !important;
}

/* ---------- Tab Content ---------- */
.poh-tab-content {
    padding: 0;
}

.poh-tab-content h2 {
    color: var(--poh-gold);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    letter-spacing: -0.01em;
}

.poh-tab-content h3 {
    color: var(--poh-gold);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
}

.poh-tab-content h4 {
    color: var(--poh-gold-light);
    font-size: 1rem;
    font-weight: 600;
    margin: 1.25rem 0 0.5rem;
}

.poh-subtitle {
    color: var(--poh-text-muted);
    font-size: 0.875rem;
    margin: 0 0 1.5rem;
}

/* ---------- Operations Sub-Navigation ---------- */
.poh-ops-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--poh-border);
}

.poh-ops-nav a {
    padding: 0.5rem 1rem;
    border-radius: var(--poh-radius);
    color: var(--poh-text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--poh-border);
    transition: all 0.2s ease;
}

.poh-ops-nav a:hover {
    color: var(--poh-gold);
    border-color: var(--poh-border-gold);
    background: var(--poh-surface);
}

.poh-ops-nav a.active {
    color: var(--poh-gold);
    border-color: var(--poh-gold-dark);
    background: var(--poh-surface);
}

/* ---------- Tables ---------- */
.poh-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0.75rem 0;
    border-radius: var(--poh-radius);
    border: 1px solid var(--poh-border);
}

.poh-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.poh-table thead {
    background: var(--poh-surface);
}

.poh-table th {
    padding: 0.6rem 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--poh-gold);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    border-bottom: 1px solid var(--poh-border);
}

.poh-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(51,51,51,0.5);
    color: var(--poh-text);
    vertical-align: middle;
}

.poh-table tbody tr:hover {
    background: var(--poh-surface-hover);
}

.poh-table tbody tr:last-child td {
    border-bottom: none;
}

.poh-table-compact td {
    padding: 0.35rem 0.75rem;
    font-size: 0.775rem;
}

/* ---------- Inputs ---------- */
.poh-input {
    background: var(--poh-surface);
    border: 1px solid var(--poh-border);
    color: var(--poh-text);
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    width: 100%;
    max-width: 120px;
    transition: border-color 0.2s;
}

.poh-input:focus {
    outline: none;
    border-color: var(--poh-gold-dark);
    box-shadow: 0 0 0 2px rgba(210, 179, 115, 0.15);
}

.poh-input-sm {
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
    max-width: 100px;
    min-width: 80px;
    box-sizing: border-box;
}

/* Fix input number spinner overlap */
.poh-table input[type="number"].poh-input-sm {
    padding-right: 0.2rem;
    -moz-appearance: textfield;
}

.poh-table input[type="number"].poh-input-sm::-webkit-inner-spin-button,
.poh-table input[type="number"].poh-input-sm::-webkit-outer-spin-button {
    opacity: 1;
    margin-left: 4px;
}

/* ---------- Buttons ---------- */
.poh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: var(--poh-radius);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.poh-btn-sm {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
}

.poh-btn-primary {
    background: var(--poh-gold-dark);
    color: var(--poh-bg);
    border-color: var(--poh-gold-dark);
}

.poh-btn-primary:hover {
    background: var(--poh-gold);
    border-color: var(--poh-gold);
}

.poh-btn-success {
    background: rgba(74, 222, 128, 0.15);
    color: var(--poh-green);
    border-color: rgba(74, 222, 128, 0.3);
}

.poh-btn-success:hover {
    background: rgba(74, 222, 128, 0.25);
}

.poh-btn-danger {
    background: rgba(248, 113, 113, 0.15);
    color: var(--poh-red);
    border-color: rgba(248, 113, 113, 0.3);
}

.poh-btn-danger:hover {
    background: rgba(248, 113, 113, 0.25);
}

.poh-btn-outline {
    background: transparent;
    color: var(--poh-gold);
    border-color: var(--poh-border-gold);
}

.poh-btn-outline:hover {
    background: var(--poh-surface);
    border-color: var(--poh-gold-dark);
}

.poh-btn-save {
    background: var(--poh-gold-dark);
    color: var(--poh-bg);
}

.poh-btn-save:hover {
    background: var(--poh-gold);
}

.poh-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ---------- Cards ---------- */
.poh-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.poh-approval-card,
.poh-order-mgmt-card,
.poh-shipment-card {
    background: var(--poh-surface);
    border: 1px solid var(--poh-border);
    border-radius: var(--poh-radius-lg);
    overflow: hidden;
}

.poh-approval-header,
.poh-order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--poh-border);
    gap: 0.5rem;
}

.poh-approval-name,
.poh-order-number {
    display: block;
    font-weight: 600;
    color: var(--poh-gold);
    font-size: 0.9rem;
}

.poh-approval-email,
.poh-order-date {
    display: block;
    font-size: 0.75rem;
    color: var(--poh-text-muted);
}

.poh-approval-body,
.poh-order-card-body {
    padding: 0.75rem 1rem;
}

.poh-approval-actions,
.poh-order-card-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--poh-border);
}

/* ---------- Meta Rows ---------- */
.poh-meta-row {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    font-size: 0.8rem;
}

.poh-meta-label {
    color: var(--poh-text-muted);
    flex-shrink: 0;
}

.poh-meta-value {
    color: var(--poh-text);
    text-align: right;
}

/* ---------- Order Items ---------- */
.poh-order-item-row {
    display: flex;
    gap: 0.5rem;
    padding: 0.2rem 0;
    font-size: 0.775rem;
}

.poh-item-sku {
    color: var(--poh-gold);
    font-weight: 600;
    min-width: 60px;
}

.poh-item-name {
    color: var(--poh-text);
    flex: 1;
}

.poh-item-qty {
    color: var(--poh-text-muted);
}

.poh-item-price {
    color: var(--poh-gold);
    font-weight: 600;
    margin-left: auto;
}

/* ---------- Badges ---------- */
.poh-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.poh-badge-green { background: rgba(74,222,128,0.15); color: var(--poh-green); }
.poh-badge-yellow { background: rgba(250,204,21,0.15); color: var(--poh-yellow); }
.poh-badge-orange { background: rgba(251,146,60,0.15); color: var(--poh-orange); }
.poh-badge-blue { background: rgba(96,165,250,0.15); color: var(--poh-blue); }
.poh-badge-red { background: rgba(248,113,113,0.15); color: var(--poh-red); }
.poh-badge-default { background: var(--poh-surface); color: var(--poh-text-muted); }

/* ---------- Summary Cards ---------- */
.poh-summary-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.poh-summary-card {
    background: var(--poh-surface);
    border: 1px solid var(--poh-border);
    border-radius: var(--poh-radius);
    padding: 1rem;
    text-align: center;
}

.poh-summary-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--poh-text-muted);
    margin-bottom: 0.25rem;
}

.poh-summary-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--poh-gold);
}

/* ---------- Highlight Card ---------- */
.poh-highlight-card {
    background: var(--poh-surface);
    border: 1px solid var(--poh-border-gold);
    border-radius: var(--poh-radius-lg);
    padding: 1.25rem;
    margin: 1rem 0;
}

.poh-highlight-card h4 {
    margin-top: 0;
    color: var(--poh-gold);
}

/* ---------- Expense Grid ---------- */
.poh-expense-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
}

.poh-expense-item {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    background: rgba(255,255,255,0.03);
}

.poh-expense-label {
    font-size: 0.8rem;
    color: var(--poh-text-muted);
}

.poh-expense-value {
    font-size: 0.8rem;
    color: var(--poh-text);
    font-weight: 600;
}

.poh-expense-total {
    background: rgba(210, 179, 115, 0.1);
    border: 1px solid var(--poh-border-gold);
}

.poh-expense-total .poh-expense-label,
.poh-expense-total .poh-expense-value {
    color: var(--poh-gold);
}

/* ---------- Form Elements ---------- */
.poh-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.poh-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.poh-form-group label {
    font-size: 0.75rem;
    color: var(--poh-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.poh-textarea {
    background: var(--poh-surface);
    border: 1px solid var(--poh-border);
    color: var(--poh-text);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    width: 100%;
    resize: vertical;
    transition: border-color 0.2s;
}

.poh-textarea:focus {
    outline: none;
    border-color: var(--poh-gold-dark);
    box-shadow: 0 0 0 2px rgba(210, 179, 115, 0.15);
}

.poh-input-file {
    background: var(--poh-surface);
    border: 1px solid var(--poh-border);
    color: var(--poh-text);
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* ---------- Info Elements ---------- */
.poh-info-text {
    color: var(--poh-text-muted);
    font-size: 0.8rem;
    margin: 0 0 1rem;
}

.poh-info-box {
    background: var(--poh-surface);
    border-left: 3px solid var(--poh-gold-dark);
    padding: 0.75rem 1rem;
    margin: 1.5rem 0;
    font-size: 0.8rem;
    color: var(--poh-text-muted);
    border-radius: 0 var(--poh-radius) var(--poh-radius) 0;
}

.poh-info-box strong {
    color: var(--poh-gold);
}

/* ---------- Empty State ---------- */
.poh-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--poh-text-muted);
}

.poh-empty-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.75rem;
}

/* ---------- Text Colors ---------- */
.poh-text-green { color: var(--poh-green) !important; }
.poh-text-red { color: var(--poh-red) !important; }
.poh-text-orange { color: var(--poh-orange) !important; }
.poh-text-gold { color: var(--poh-gold) !important; }
.poh-text-blue { color: var(--poh-blue) !important; }

/* ---------- Links ---------- */
.poh-link,
.poh-tracking-link {
    color: var(--poh-gold);
    text-decoration: none;
}

.poh-link:hover,
.poh-tracking-link:hover {
    color: var(--poh-gold-light);
    text-decoration: underline;
}

/* ---------- Adjustments ---------- */
.poh-adj {
    display: block;
    font-size: 0.65rem;
    color: var(--poh-text-dim);
}

/* ---------- Tracking Timeline ---------- */
.poh-tracking-timeline {
    position: relative;
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.poh-tracking-step {
    position: relative;
    padding-bottom: 1rem;
    padding-left: 0.75rem;
    border-left: 2px solid var(--poh-border);
}

.poh-tracking-step:last-child {
    border-left-color: transparent;
    padding-bottom: 0;
}

.poh-tracking-step::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--poh-border);
}

.poh-tracking-step.active::before {
    background: var(--poh-gold);
    box-shadow: 0 0 6px rgba(210, 179, 115, 0.4);
}

.poh-tracking-step.completed::before {
    background: var(--poh-green);
}

.poh-tracking-step .poh-step-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--poh-text);
}

.poh-tracking-step .poh-step-date {
    font-size: 0.7rem;
    color: var(--poh-text-muted);
}

/* ---------- Invoice Card ---------- */
.poh-invoice-card {
    background: var(--poh-surface);
    border: 1px solid var(--poh-border);
    border-radius: var(--poh-radius-lg);
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.poh-invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.poh-invoice-amount {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--poh-gold);
}

.poh-invoice-details {
    font-size: 0.8rem;
    color: var(--poh-text-muted);
}

.poh-progress-bar {
    height: 4px;
    background: var(--poh-border);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.poh-progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.poh-progress-green { background: var(--poh-green); }
.poh-progress-gold { background: var(--poh-gold); }
.poh-progress-orange { background: var(--poh-orange); }
.poh-progress-red { background: var(--poh-red); }

/* ---------- Upload Area ---------- */
.poh-upload-area {
    border: 2px dashed var(--poh-border);
    border-radius: var(--poh-radius-lg);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.poh-upload-area:hover {
    border-color: var(--poh-gold-dark);
    background: var(--poh-surface);
}

.poh-upload-area input[type="file"] {
    display: none;
}

.poh-upload-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.poh-upload-text {
    color: var(--poh-text-muted);
    font-size: 0.85rem;
}

.poh-upload-text strong {
    color: var(--poh-gold);
}

/* ---------- Upload Section (form-based) ---------- */
.poh-upload-section {
    background: var(--poh-surface);
    border: 1px solid var(--poh-border);
    border-radius: var(--poh-radius-lg);
    padding: 1.25rem;
    margin: 1rem 0;
}

.poh-upload-form .poh-form-row {
    margin-bottom: 0.75rem;
}

.poh-upload-form .poh-form-group {
    flex: 1;
    min-width: 150px;
}

/* ---------- Manual Line Items ---------- */
.poh-item-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}
.poh-input-sku {
    flex: 2;
    max-width: 200px;
}
.poh-input-qty {
    flex: 1;
    max-width: 80px;
}
.poh-btn-remove-row {
    background: transparent;
    border: 1px solid #666;
    color: #f44;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.poh-btn-remove-row:hover {
    background: rgba(255,68,68,0.1);
    border-color: #f44;
}
.poh-btn-secondary {
    background: transparent;
    border: 1px solid var(--poh-gold);
    color: var(--poh-gold);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}
.poh-btn-secondary:hover {
    background: rgba(212,175,55,0.1);
}
.poh-manual-items-section {
    border-top: 1px solid var(--poh-border);
    padding-top: 1rem;
    margin-top: 1rem;
}

/* ---------- Toast Notification ---------- */
.poh-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 1rem;
    right: 1rem;
    max-width: 400px;
    margin-left: auto;
    padding: 0.75rem 1.25rem;
    border-radius: var(--poh-radius);
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 10000;
    animation: poh-toast-in 0.3s ease, poh-toast-out 0.3s ease 2.7s;
    box-shadow: var(--poh-shadow);
    text-align: center;
    word-wrap: break-word;
}

.poh-toast-success {
    background: rgba(74, 222, 128, 0.15);
    color: var(--poh-green);
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.poh-toast-error {
    background: rgba(248, 113, 113, 0.15);
    color: var(--poh-red);
    border: 1px solid rgba(248, 113, 113, 0.3);
}

@keyframes poh-toast-in {
    from { opacity: 0; transform: translateY(1rem); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes poh-toast-out {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(1rem); }
}

/* ---------- Mobile Responsive ---------- */
@media (max-width: 768px) {
    .woocommerce-account .woocommerce-MyAccount-navigation ul {
        flex-direction: column;
        gap: 0.125rem;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation ul li a {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    /* Sidebar already hidden globally, ensure content full-width on mobile too */
    .woocommerce-account .woocommerce-MyAccount-content {
        width: 100% !important;
        float: none !important;
    }

    .poh-card-grid {
        grid-template-columns: 1fr;
    }

    .poh-ops-nav {
        flex-direction: column;
        gap: 0.25rem;
    }

    .poh-ops-nav a {
        text-align: center;
    }

    .poh-summary-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .poh-table {
        font-size: 0.75rem;
    }

    .poh-table th,
    .poh-table td {
        padding: 0.4rem 0.5rem;
    }

    .poh-approval-actions,
    .poh-order-card-actions {
        flex-direction: column;
    }

    .poh-btn {
        width: 100%;
        justify-content: center;
    }

    .poh-expense-grid {
        grid-template-columns: 1fr;
    }

    .poh-meta-row {
        flex-direction: column;
        gap: 0.1rem;
    }

    .poh-meta-value {
        text-align: left;
    }

    .poh-form-row {
        flex-direction: column;
    }

    .poh-input {
        max-width: 100%;
    }

    .poh-cards-grid {
        grid-template-columns: 1fr;
    }

    .poh-tab-content h2 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .poh-summary-row {
        grid-template-columns: 1fr;
    }

    .poh-summary-value {
        font-size: 1.1rem;
    }
}

/* ---------- Print Styles ---------- */
@media print {
    .poh-btn,
    .poh-ops-nav,
    .poh-toast,
    .woocommerce-MyAccount-navigation {
        display: none !important;
    }

    .poh-table,
    .poh-tab-content {
        color: #000 !important;
        background: #fff !important;
    }

    .poh-table th {
        color: #333 !important;
    }
}

/* ==========================================================================
   v3.0 Enhanced Operations Cards — Additional Styles
   ========================================================================== */

/* ---------- Parameter Groups ---------- */
.poh-param-group {
    background: var(--poh-surface);
    border: 1px solid var(--poh-border);
    border-radius: var(--poh-radius-lg);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.poh-param-group h4 {
    margin: 0 0 0.75rem;
    color: var(--poh-gold);
    font-size: 0.9rem;
}

.poh-param-footer {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--poh-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ---------- Section Header with Actions ---------- */
.poh-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.poh-section-header h3 {
    margin: 0;
}

.poh-btn-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ---------- Count Badge ---------- */
.poh-count {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--poh-text-muted);
}

/* ---------- Toggle Buttons ---------- */
.poh-toggle-group {
    display: inline-flex;
    border-radius: var(--poh-radius);
    border: 1px solid var(--poh-border);
    overflow: hidden;
}

.poh-toggle-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--poh-text-muted);
    transition: all 0.2s ease;
}

.poh-toggle-btn.active {
    background: var(--poh-gold-dark);
    color: var(--poh-bg);
}

.poh-toggle-btn:hover:not(.active) {
    background: var(--poh-surface-hover);
    color: var(--poh-text);
}

/* ---------- Order Builder ---------- */
.poh-order-builder {
    background: var(--poh-surface);
    border: 1px solid var(--poh-border);
    border-radius: var(--poh-radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.poh-order-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(210, 179, 115, 0.05);
    border: 1px solid var(--poh-border-gold);
    border-radius: var(--poh-radius);
}

.poh-order-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--poh-border);
}

/* ---------- Projection Chart Placeholder ---------- */
.poh-chart-container {
    background: var(--poh-surface);
    border: 1px solid var(--poh-border);
    border-radius: var(--poh-radius-lg);
    padding: 1rem;
    margin: 1rem 0;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- Mode Toggle (Projections) ---------- */
.poh-mode-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.poh-mode-toggle label {
    font-size: 0.8rem;
    color: var(--poh-text-muted);
    cursor: pointer;
}

.poh-mode-toggle label.active {
    color: var(--poh-gold);
    font-weight: 600;
}

/* ---------- Inventory Cards ---------- */
.poh-inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.poh-inventory-item {
    background: var(--poh-surface);
    border: 1px solid var(--poh-border);
    border-radius: var(--poh-radius);
    padding: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.poh-inventory-sku {
    font-weight: 700;
    color: var(--poh-gold);
    font-size: 0.85rem;
}

.poh-inventory-qty {
    font-size: 1rem;
    font-weight: 700;
    color: var(--poh-text);
}

/* ---------- Order History ---------- */
.poh-order-history {
    margin-top: 1.5rem;
}

.poh-order-history-item {
    background: var(--poh-surface);
    border: 1px solid var(--poh-border);
    border-radius: var(--poh-radius);
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.poh-order-history-item:hover {
    border-color: var(--poh-border-gold);
}

/* ---------- P&L Year Tabs ---------- */
.poh-year-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.poh-year-tab {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--poh-radius);
    border: 1px solid var(--poh-border);
    background: transparent;
    color: var(--poh-text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.poh-year-tab.active {
    background: var(--poh-gold-dark);
    color: var(--poh-bg);
    border-color: var(--poh-gold-dark);
}

.poh-year-tab:hover:not(.active) {
    border-color: var(--poh-border-gold);
    color: var(--poh-gold);
}

/* ---------- Scenario Comparison ---------- */
.poh-scenario-compare {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.poh-scenario-card {
    background: var(--poh-surface);
    border: 1px solid var(--poh-border);
    border-radius: var(--poh-radius-lg);
    padding: 1.25rem;
}

.poh-scenario-card.active {
    border-color: var(--poh-gold);
}

.poh-scenario-card h5 {
    margin: 0 0 0.75rem;
    color: var(--poh-gold);
    font-size: 0.9rem;
}

/* ---------- CSV Upload Area ---------- */
.poh-csv-upload {
    background: var(--poh-surface);
    border: 2px dashed var(--poh-border);
    border-radius: var(--poh-radius-lg);
    padding: 1.5rem;
    text-align: center;
    margin: 1rem 0;
    transition: all 0.2s ease;
}

.poh-csv-upload:hover {
    border-color: var(--poh-gold-dark);
}

.poh-csv-upload input[type="file"] {
    margin: 0.5rem 0;
}

/* ---------- Status Indicators ---------- */
.poh-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.poh-status-dot.green { background: var(--poh-green); }
.poh-status-dot.yellow { background: var(--poh-yellow); }
.poh-status-dot.red { background: var(--poh-red); }
.poh-status-dot.blue { background: var(--poh-blue); }

/* ---------- Enhanced Mobile Responsive (v3.0) ---------- */
@media (max-width: 768px) {
    .poh-section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .poh-btn-group {
        width: 100%;
    }

    .poh-btn-group .poh-btn {
        flex: 1;
        text-align: center;
    }

    .poh-param-group {
        padding: 0.75rem;
    }

    .poh-order-builder {
        padding: 1rem;
    }

    .poh-order-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .poh-order-actions {
        flex-direction: column;
    }

    .poh-order-actions .poh-btn {
        width: 100%;
    }

    .poh-inventory-grid {
        grid-template-columns: 1fr;
    }

    .poh-order-history-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .poh-year-tabs {
        padding-bottom: 0.5rem;
    }

    .poh-toggle-group {
        width: 100%;
    }

    .poh-toggle-btn {
        flex: 1;
        text-align: center;
    }

    .poh-mode-toggle {
        flex-direction: column;
        align-items: flex-start;
    }

    .poh-scenario-compare {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .poh-order-summary {
        grid-template-columns: 1fr;
    }

    .poh-param-group h4 {
        font-size: 0.8rem;
    }

    .poh-table-compact td,
    .poh-table-compact th {
        padding: 0.3rem 0.4rem;
        font-size: 0.7rem;
    }
}

/* ---------- Touch-friendly buttons (min 44px) ---------- */
@media (pointer: coarse) {
    .poh-btn {
        min-height: 44px;
        min-width: 44px;
    }

    .poh-btn-sm {
        min-height: 36px;
        padding: 0.4rem 0.8rem;
    }

    .poh-toggle-btn {
        min-height: 44px;
    }

    .poh-input {
        min-height: 40px;
    }
}

/* ==========================================================================
   v3.4.0 — Additional Mobile Responsive Enhancements
   Covers: Manufacturer Portal, Commitment Plans, Reports, Customer Form
   ========================================================================== */

/* ---------- Manufacturer Portal ---------- */
.poh-manufacturer-portal .poh-mfr-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
}

.poh-mfr-stats {
    flex-wrap: wrap;
}

/* ---------- Reports Cards ---------- */
.poh-report-card {
    min-width: 0;
}

/* ---------- Commitment Form ---------- */
.poh-commitment-form {
    width: 100%;
    box-sizing: border-box;
}

/* ---------- Admin Commitments ---------- */
.poh-admin-commitments {
    width: 100%;
    box-sizing: border-box;
}

/* ---------- Manufacturer Projections ---------- */
.poh-mfr-projections {
    width: 100%;
    box-sizing: border-box;
}

/* ---------- Mobile Responsive (v3.4.0) ---------- */
@media (max-width: 768px) {
    /* Manufacturer Portal */
    .poh-manufacturer-portal .poh-mfr-header {
        flex-direction: column;
    }

    .poh-mfr-stats {
        width: 100%;
    }

    .poh-mfr-stats .poh-summary-card {
        flex: 1;
        min-width: 80px;
    }

    /* Reports */
    .poh-reports-section {
        padding: 12px !important;
    }

    .poh-reports-section > div:first-child {
        flex-direction: column;
        align-items: flex-start;
    }

    .poh-report-card {
        padding: 16px !important;
    }

    /* Commitment Form */
    .poh-commitment-form {
        max-width: 100% !important;
        padding: 0 4px;
    }

    .poh-commitment-form .poh-plan-status {
        padding: 12px !important;
    }

    .poh-commitment-form .poh-plan-status > div {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .poh-commitment-form .poh-plan-status > div > div:last-child {
        text-align: left !important;
    }

    /* Admin Commitments */
    .poh-admin-commitments {
        max-width: 100% !important;
    }

    .poh-admin-commitments > div:first-child {
        flex-direction: column;
        align-items: flex-start;
    }

    .poh-admin-commitments > div:first-child > div:last-child {
        width: 100%;
        flex-wrap: wrap;
    }

    /* Manufacturer Projections */
    .poh-mfr-projections {
        max-width: 100% !important;
        padding: 12px !important;
    }

    .poh-mfr-projections > div:first-child {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Inline tables — ensure horizontal scroll */
    .poh-mfr-projections table,
    .poh-admin-commitments table,
    .poh-commitment-form table {
        min-width: 600px;
    }

    /* Wrap long select/button combos */
    .poh-report-card select,
    .poh-report-card button {
        font-size: 0.85rem !important;
    }

    /* Tabs/nav on commitment pages */
    .poh-commitment-tabs {
        flex-direction: column;
        gap: 4px;
    }

    .poh-commitment-tabs button {
        width: 100%;
        text-align: center;
    }

    /* Upload areas */
    .poh-upload-area {
        padding: 1.25rem;
    }

    /* Item rows in forms */
    .poh-item-row {
        flex-wrap: wrap;
    }

    .poh-input-sku {
        max-width: 100%;
        flex: 1 1 100%;
    }

    .poh-input-qty {
        max-width: 100%;
        flex: 1 1 calc(50% - 20px);
    }

    /* Document cards in manufacturer portal */
    .poh-doc-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .poh-doc-card-actions {
        width: 100%;
        margin-top: 8px;
    }
}

@media (max-width: 480px) {
    /* Reports grid single column */
    .poh-reports-section > div:nth-child(2) {
        grid-template-columns: 1fr !important;
    }

    /* Summary stat cards */
    .poh-admin-commitments > div:nth-child(2),
    .poh-mfr-projections > div:nth-child(2) {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Smaller font in tables */
    .poh-mfr-projections table,
    .poh-admin-commitments table {
        font-size: 11px !important;
    }

    .poh-mfr-projections table th,
    .poh-mfr-projections table td,
    .poh-admin-commitments table th,
    .poh-admin-commitments table td {
        padding: 6px 8px !important;
    }
}
