/*.plms-user-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    height: 100vh;
}*/
/*.plms-user-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    height: 100vh;
}*/


.plms-user-sidebar.expanded {
    width: 220px;
    text-align: left;
    background: #f1f3f5;
	 border-right: 1px solid #e5e7eb;
}

.plms-user-grid {

    display: flex;

}
/*.plms-user-panel {

    border: 1px solid #ddd;

    overflow: auto;

}*/
.plms-user-panel {
    border: 1px solid #ddd;
    overflow: visible;
	border: none;
}

.plms-user-main {
    display: flex;
}

/*.plms-user-main {
	display: contents; 
}*/

/*.plms-user-sidebar {
    width: 220px;
    background: #0f172a;
    color: #fff;
}*/

.plms-user-sidebar {

    width: 80px;
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
	

}
.plms-user-sidebar.expanded {
		width: 220px;
}

/* MENU takes full height */

.plms-menu {

    flex: 1;

}
/* ICON STYLE */

.plms-user-sidebar .icon {

    font-size: 20px;
	display: inline-block;
	width: 40px;
	text-align: center;

}
/* LABEL HIDDEN BY DEFAULT */

.plms-user-sidebar .label {

    opacity: 0;
	white-space: nowrap;
	transition: 0.2s;

}

/* SHOW LABEL WHEN EXPANDED */

.plms-user-sidebar.expanded .label {
	opacity: 1;

}

.plms-user-content {
	display: flex;
	height: 100vh; 
	flex-direction: column;
	align-items: center;
    padding: 30px 40px;
	background: #fff;
	overflow-y: auto;
	/*overflow: visible !important;*/
}
.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
    max-width: 100%; !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* =========================

DASHBOARD

========================= */

.plms-topbar {

    display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;

}

.plms-topbar h2 {

    font-size: 22px;
	font-weight: 600;

}

.plms-top-actions {

    font-size: 14px;
	color: #64748b;

}

/* push toggle to bottom */
.plms-user-sidebar ul {

    list-style: none;

    padding: 0;

    margin: 0;

}

.plms-toggle-item {

    margin-top: auto;
	text-align: center;

}
.plms-toggle {
    background: red !important;
}

/* MENU ITEM */

.plms-user-sidebar li {

    display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 15px;
	 justify-content: center;

}

/* TOGGLE BUTTON */

.plms-toggle {

	/*z-index: 9999;*/
	flex-shrink: 0;
	position: relative;
    width: 32px;
	height: 32px;
	background: #2563eb;
	color: #fff;
	border-radius: 8px;
	text-align: center;
	line-height: 32px;
	cursor: pointer;
	margin: 20px auto;
	pointer-events: auto;

}
/* ROTATE BUTTON WHEN OPEN */

.plms-user-sidebar.expanded .plms-toggle {

    transform: rotate(180deg);

}
.plms-user-sidebar li:hover {
    background: #1e293b;
    color: #fff;
}

.plms-user-sidebar li.active {
    background: #2563eb;
    color: #fff;
}
.plms-dashboard {

    width: 100%;

    max-width: 1100px;

}

.plms-dashboard-header h2 {

    margin-bottom: 5px;

}

.plms-dashboard-header p {

    color: #64748b;

    margin-bottom: 25px;

}

/* STATS */

.plms-stats {

    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 20px;

    margin-bottom: 25px;

}

.plms-stat-card {

    background: #fff;

    padding: 20px;

    border-radius: 14px;

    box-shadow: 0 10px 25px rgba(0,0,0,0.05);

}

.plms-stat-card span {

    font-size: 13px;

    color: #64748b;

}

.plms-stat-card h3 {

    font-size: 24px;

    margin-top: 10px;

}

/* GRID */

.plms-dashboard-grid {

    display: grid;

    grid-template-columns: 2fr 1fr;

    gap: 20px;

}

/* ACTIVITY */

.plms-activity {

    list-style: none;

    padding: 0;

    margin: 0;

}

.plms-activity li {

    padding: 10px 0;

    border-bottom: 1px solid #eee;

}

/* ACTIONS */

.plms-actions {

    display: flex;

    flex-direction: column;

    gap: 10px;

}

.plms-btn-outline {

    padding: 10px;

    border-radius: 8px;

    border: 1px solid #2563eb;

    background: transparent;

    color: #2563eb;

    cursor: pointer;

}

/* =========================
SETTINGS PAGE
========================= */

.plms-settings-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.plms-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    overflow: hidden;
}

.plms-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.plms-card {
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
    background: #fff;
    padding: 40px;
    border-radius: 18px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.06);
}

.plms-card h3 {
    margin-bottom: 15px;
    color: #0f172a;
}

.plms-grid {

    display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	gap: 20px !important;
	width: 100%;
}

.plms-grid > div {
	display: flex;
	flex-direction: column;
}

.plms-grid .full {
    grid-column: span 2;
}

.plms-settings label {
    font-size: 13px;
    margin-bottom: 5px;
    display: block;
    color: #475569;
}

.plms-settings input,
.plms-settings textarea {
    width: 100% !important;
    display: block;
    padding: 4px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.plms-settings input:focus,
.plms-settings textarea:focus {
    border-color: #2563eb;
    background: #fff;
}

.plms-logo-preview img {
    width: 80px;
    margin-top: 10px;
    border-radius: 10px;
}

.plms-btn {
    margin-top: 20px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}
.wp-block-group.alignwide.is-content-justification-space-between.is-layout-flex.wp-container-core-group-is-layout-4.wp-block-group-is-layout-flex {
    display: none;
}
h1.has-text-align-center.wp-block-post-title {
    display: none;
}
.wp-block-columns.alignwide.is-layout-flex.wp-container-core-columns-is-layout-1.wp-block-columns-is-layout-flex {
    display: none;
}

/* =========================
HOME PAGE (FILTER UI)
========================= */


/* FILTER ROW */
.plms-filter-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 20px;
}

/* LEFT LABEL (rounded) */
.plms-filter-label {
    background: #cfd6dd;
    padding: 14px 22px;
     border-radius: 30px;
    min-width: 140px;
    text-align: center;
     font-weight: 600;
	color: #1f2937;
}

/* RIGHT SELECT BOX */
.plms-filter-select {
    flex: 1;
    background: #e9ecef;
    border-radius: 30px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
    cursor: pointer;
	position: relative;
}

.plms-filter-select span {
    color: #64748b;
}
.plms-filter-select .selected-text {

    font-size: 15px;
	color: #6b7280;

}

/* ARROW */
.plms-filter-select .arrow {
    font-size: 18px;
}

/* =========================
QUICK REPORTS
========================= */

.plms-reports {
    margin-top: 20px;
	 flex: 0 0 auto;
}

.plms-reports h3 {
    margin-bottom: 15px;
}

/* BUTTON GRID */
.plms-report-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.plms-report-buttons button {
    background: #f1f3f5;
    border-radius: 30px;
    padding: 14px 30px;
    border: none;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    cursor: pointer;
	transition: all 0.2s ease;
}

.plms-report-buttons button:hover {

    transform: translateY(-2px);

}
/* ACTION BUTTONS */
.plms-report-actions {
    margin-top: 20px;
    display: flex;
    gap: 20px;
}

.plms-report-actions .wide {
    flex: 1;
    background: #f1f3f5;
    border-radius: 30px;
    padding: 14px;
    border: none;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    cursor: pointer;
}
/* HIDDEN DROPDOWN */

.plms-dropdown {
	
	z-index: 999;
    display: none;

    position: absolute;

    top: 110%;

    left: 0;

    width: 100%;

    background: #fff;

    border-radius: 20px;

    box-shadow: 0 15px 30px rgba(0,0,0,0.1);

    z-index: 100;

}

/* SHOW */

.plms-filter-select.open .plms-dropdown {

    display: block;

}

/* OPTIONS */

.plms-dropdown div {

    padding: 10px 15px;

    cursor: pointer;

}

.plms-dropdown div:hover {

    background: #f1f5f9;

}

/* =========================
PRODUCT META TABLE (SCROLLABLE)
========================= */

.plms-meta-card {
    
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    
}

.plms-meta-card,

.plms-image-card {

    flex: 1;                  /* 🔥 stretch */

    display: flex;

    flex-direction: column;

	overflow: hidden;
}

/* 🔥 THIS CONTROLS HEIGHT */
.plms-meta-scroll {
	flex: 1;
    max-height: 1050px;  
    overflow-y: auto;
	
}

/* TABLE STYLE */
.plms-meta-table {
    width: 100%;
    border-collapse: collapse;
}

/* HEADER */
.plms-meta-table thead {
    position: sticky;
    top: 0;
    background: #f1f3f5;
    z-index: 2;
}

.plms-meta-table th {
    text-align: left;
    padding: 14px 20px;
    font-weight: 600;
    color: #6b7280;
    font-size: 13px;
}

/* ROWS */
.plms-meta-table td {
    padding: 14px 20px;
    border-top: 1px solid #e5e7eb;
    font-size: 14px;
    color: #111827;
}

/* ALT ROW COLOR */
.plms-meta-table tbody tr:nth-child(even) {
    background: #fafafa;
}

/* HOVER EFFECT */
.plms-meta-table tbody tr:hover {
    background: #f3f4f6;
}

/* SCROLLBAR (optional nice UI) */
.plms-meta-scroll::-webkit-scrollbar {
    width: 6px;
}

.plms-meta-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* =========================
PRODUCT IMAGE SECTION
========================= */

.plms-actions-card {

    flex: 1;     /* smaller */

    background: #fff;

    border-radius: 16px;

    padding: 20px;

    box-shadow: 0 10px 30px rgba(0,0,0,0.06);

    overflow: auto;

}
.plms-image-card {
	flex: 1.2; 
	display: flex;
	flex-direction: column;
	height: fit-content;
    margin-top: 25px;
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

/* HEADER */
.plms-image-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.plms-view-all {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
}

/* GRID */
.plms-image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

/* FIRST IMAGE BIG */
.plms-image-item.main-image {
    grid-column: span 2;
    grid-row: span 2;
}

/* IMAGE BOX */
.plms-image-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.plms-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* DOWNLOAD BUTTON */
.plms-download-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 12px;
    text-decoration: none;
}

/* MODAL */
.plms-image-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    z-index: 9999;
    padding: 40px;
    overflow-y: auto;
}

.plms-image-modal-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.plms-image-actions {
    display: flex;
    gap: 10px;
}

.plms-download-all {
    background: #16a34a;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
}

.plms-image-layout {
    display: flex;
    gap: 20px;
}

/* LEFT BIG IMAGE */
.plms-image-left {
    flex: 1.5;
}

.plms-image-left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* RIGHT SIDE */
.plms-image-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* TOP SMALL IMAGES */
.plms-image-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.plms-thumb img {
    width: 100%;
    border-radius: 10px;
    object-fit: cover;
}

/* DOWNLOAD BUTTON */
.plms-image-bottom {
    display: flex;
    justify-content: flex-end;
}

.plms-download-all {
    padding: 16px 40px;
    border-radius: 40px;
    border: none;
    font-size: 16px;
    cursor: pointer;

    background: linear-gradient(135deg, #6fa8dc, #e07a6f);
    color: #fff;
}

/* MAIN 3 COLUMN LAYOUT */
.plms-home-grid {
     display: grid;
	grid-template-columns: 400px 1fr 1fr;
	gap: 25px;
	height: calc(100vh - 120px);             /* fill parent */
	align-items: stretch;
}

/* LEFT PANEL */
.plms-home-left {
	  gap: 20px;
    display: flex;
    flex-direction: column;
	 overflow-y: auto;   
    padding-right: 5px
}

/* MIDDLE (META TABLE) */
.plms-home-middle {
    min-width: 0;
}

/* RIGHT (IMAGES) */


.plms-home-left,

.plms-home-middle,

.plms-home-right {

    display: flex;

    flex-direction: column;

    height: 100%;
	gap: 20px;


}

.plms-actions-grid {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.plms-action-left,
.plms-action-right {
    flex: 1;
}

.plms-actions-card button {
    width: 100%;
    padding: 14px;
    border-radius: 30px;
    border: none;
    background: #f1f3f5;
    margin-bottom: 8px;
    cursor: pointer;
}

.plms-actions-card p {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 15px;
}

.plms-action-footer {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
}

.plms-action-footer button {
    padding: 16px 30px;
    border-radius: 40px;
    border: none;
    background: linear-gradient(135deg, #6fa8dc, #e07a6f);
    color: #fff;
}

.plms-stock-card {
    background: #f8f9fb;
    border-radius: 16px;
    padding: 20px;
}

.plms-stock-header {
    background: #e5e7eb;
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 15px;
    color: #6b7280;
}

.plms-stock-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 5px;
    border-top: 1px solid #e5e7eb;
    font-size: 14px;
}

.plms-stock-row:first-of-type {
    border-top: none;
}
.plms-image-card {
    flex: 1.2;
	overflow: hidden;
}

.plms-stock-card {
    flex: 0.6;
}

.plms-actions-card {
    flex: 1;
}
/* Filters take top space */

.plms-filters {

    flex: 0 0 auto;

}

/* =========================
AI CARD (FIXED DESIGN)
========================= */

.plms-ai-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
	 flex: 0 0 auto; 
    background: #fff;
    border-radius: 16px;
    padding: 0;
}

/* ===== HEADER (TOP GRADIENT SECTION) ===== */
.plms-ai-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 10px;
    border-radius: 10px;

    background: linear-gradient(135deg, #6fa8dc, #e07a6f);
}

/* LEFT BUTTON */
.plms-new-product {
    background: #fff;
    padding: 16px 28px;
    border-radius: 40px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* RIGHT TEXT AREA */
.plms-ai-banner {
    max-width: 60%;
}

.plms-ai-banner h3 {
    font-size: 22px;
    margin: 0;
    color: #1e293b;
}

.plms-ai-banner p {
    font-size: 14px;
    color: #475569;
    margin-top: 8px;
}

/* ===== BODY ===== */
.plms-ai-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

/* TITLE */
.plms-ai-body h4 {
    margin-bottom: 10px;
}

/* CHAT AREA */
.plms-ai-chat {
    flex: 1;
    overflow-y: auto;
    background: #f8fafc;
    border-radius: 12px;
}

/* INPUT AREA */
.plms-ai-input {
    margin-top: 15px;
}

/* INPUT FIELD */
.plms-ai-input input {
    width: 85%;
    padding: 14px 20px;
    border-radius: 40px;
    border: 2px solid #e5e7eb;
    outline: none;
}

@media (max-width: 768px) {

    .plms-stats {
		grid-template-columns: 1fr 1fr;

    }

    .plms-dashboard-grid {
		grid-template-columns: 1fr;

    }

}

.plms-user-loading {

    font-size: 14px;

    color: #64748b;

    position: relative;

    padding-left: 30px;

}

.plms-user-loading::before {

    content: "";

    position: absolute;

    left: 0;

    top: 50%;

    width: 18px;

    height: 18px;

    margin-top: -9px;

    border: 2px solid #2563eb;

    border-top-color: transparent;

    border-radius: 50%;

    animation: plms-spin 0.8s linear infinite;

}

.plms-container {

    width: 100%;
	max-width: 1100px;
	margin: 0 auto;

}
.plms-home,

.plms-settings,

.plms-dashboard {

    width: 100%;

}
@keyframes plms-spin {

    to { transform: rotate(360deg); }

}