.lwp-topload-wrap { 
    max-width: 1200px; 
    margin: 30px auto; 
    padding: 0 15px;
    
    display: grid;
    grid-template-columns: 220px 1fr; /* Left Nav | Content */
    gap: 24px;
    align-items: start;
}

/* Make the Header span the full width of the top */
.lwp-topload-header { 
    grid-column: 1 / -1; 
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.lwp-topload-header-actions { text-align: right; }

/* Stack the Tabs Vertically */
.lwp-topload-tabs { 
    display: flex; 
    flex-direction: column; 
    gap: 4px; 
    margin: 0; 
}

/* Restyle the "Pills" to look like Sidebar Links */
.lwp-topload-tab { 
    display: block;
    text-align: left;
    border: 1px solid transparent; 
    background: transparent; 
    padding: 10px 15px; 
    border-radius: 8px; 
    color: #555;
    font-size: 14px;
    transition: all 0.2s;
}

.lwp-topload-tab:hover {
    background: #f0f0f0;
    color: #111;
}

/* Active State: subtle background + bold */
.lwp-topload-tab.is-active { 
    background: #e7f7ed; 
    color: #0a6b2b; 
    border-color: transparent; 
    box-shadow: none;
    font-weight: 700;
}

/* Panels Area */
.lwp-topload-panels {
    min-width: 0; /* Prevents grid blowout */
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 800px) {
    /* Revert to single column stacked */
    .lwp-topload-wrap { 
        grid-template-columns: 1fr; 
        gap: 15px;
    }
    
    /* Revert tabs to horizontal scrolling pills */
    .lwp-topload-tabs { 
        flex-direction: row; 
		flex-wrap: wrap;
        white-space: nowrap; 
        padding-bottom: 5px; /* Space for scrollbar */
    }
    
    .lwp-topload-tab {
        background: #fff;
        border: 1px solid #ddd;
        flex-shrink: 0; /* Don't squash tabs */
    }
}

.lwp-topload-panel { display:none; }
.lwp-topload-panel.is-active { display:block; }

.lwp-topload-card { background:#fff; border:1px solid #ddd; border-radius:14px; padding:14px; margin-bottom:12px; }
.lwp-topload-card h3 { margin:0 0 10px; font-size:16px; }
.lwp-topload-card-sub { border:1px dashed #ddd; border-radius:12px; padding:12px; background:#fafafa; }
.lwp-topload-card-sub h4 { margin:0 0 10px; }

.lwp-topload-row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; justify-content: right; }
.lwp-topload-grid2 { display:grid; grid-template-columns: 1fr 1fr; gap:12px; }
.lwp-topload-grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

.lwp-topload-inline { display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap; }

.lwp-topload-help { color:#666; font-size:12px; margin-top:6px; }
.lwp-topload-mono, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; font-size:12px; }

.lwp-topload-btn { background:#32A852; border:1px solid #2e9a4c; color:#fff; padding:9px 12px; border-radius:10px; cursor:pointer; font-weight:700; }
.lwp-topload-btn:hover { filter: brightness(0.98); }
/* Improved Ghost Button Styles */
.lwp-topload-btn-ghost {
    background: #fff;
    color: #444;
    border: 1px solid #d0d7de;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05); /* Subtle depth */
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

/* Hover State: Darker border + Slight Lift */
.lwp-topload-btn-ghost:hover {
    background: #fff;
    border-color: #111;
    color: #111;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

/* Active/Click State */
.lwp-topload-btn-ghost:active {
    transform: translateY(0);
    box-shadow: 0 1px 1px rgba(0,0,0,0.05);
}

.lwp-topload-btn-danger { background:#fff; color:#b42318; border:1px solid #f2c2bd; font-weight:800; }
.lwp-topload-edit { margin-right: 5px; }

.lwp-topload-check { display:flex; gap:8px; align-items:center; font-weight:700; }

.lwp-topload-list { display:flex; flex-direction:column; gap:8px; }
.lwp-topload-item { display:flex; gap:10px; align-items:center; padding:10px; border:1px solid #eee; border-radius:12px; background:#fff; }/* Thumbs on left */
.lwp-list-thumbs {
    display: flex;
    gap: 4px;
    margin-right: 14px;
    flex-shrink: 0;
}
.lwp-list-thumb {
    width: 48px; /* Slightly larger than showcase for admin visibility */
    height: 68px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: #f4f4f4;
}
.lwp-topload-item-title { font-weight:800; font-size: 15px; margin-bottom: 2px; }
.lwp-topload-item-sub { color:#666; font-size:12px; margin-top:2px; }
.lwp-topload-empty { color:#666; font-size:13px; padding:8px; }

.lwp-item-parallel {
    color: #555;     
    font-weight: 400;
    margin-left: 6px;
    font-size: 14px;
}

.lwp-item-serial {
    color: #999;
    font-weight: 400;
    margin-left: 6px;
    font-size: 14px;
}

/* Meta Row (Year Brand Set) */
.lwp-item-meta {
    font-size: 13px;
    color: #444;
    margin-bottom: 6px;
    font-weight: 500;
}
.lwp-item-meta span { color: #888; margin: 0 4px; } /* Separator bullets */

/* Pills Row */
.lwp-item-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.lwp-pill {
    display: inline-flex;
    padding: 2px 8px;
    background: #eef0f2;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}
/* Specific pill colors if desired */
.lwp-pill.is-auto { background: #e7f7ed; color: #0a6b2b; }
.lwp-pill.is-num { background: #fff8e6; color: #b78103; }

.lwp-topload-actions {
    margin-left: auto; /* This magically pushes this block to the far right */
    display: flex;
    gap: 8px; /* Optional: adds space between Edit and Delete buttons */
}

.lwp-topload-tab {
    text-decoration: none !important;
    display: block;
}

.lwp-topload-notice { margin: 10px 0; padding: 10px; border-radius: 12px; font-weight: 800; }
.lwp-topload-notice.is-ok { background:#e7f7ed; border:1px solid #bfe7cc; color:#0a6b2b; }
.lwp-topload-notice.is-error { background:#fff5f5; border:1px solid #f2c2bd; color:#8a0000; }

input[type="text"], input[type="number"], select, textarea {
  width:100%;
  max-width:100%;
  border:1px solid #ddd;
  border-radius:10px;
  padding:10px;
  font-size:14px;
  box-sizing:border-box;
  background:#fff;
}
label { display:block; font-weight:800; font-size:12px; margin-bottom:6px; color:#333; }

@media (max-width: 760px) {
  .lwp-topload-grid2 { grid-template-columns: 1fr; }
  .lwp-topload-grid3 { grid-template-columns: 1fr; }
}

.lwp-topload-hr {
  border: 0;
  border-top: 1px solid #e9e9e9;
  margin: 14px 0;
}

.lwp-topload-section-title {
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #444;
  margin-bottom: 10px;
}

.lwp-topload-section-title-row {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}

.lwp-topload-graded-wrap {
  display:flex;
  flex-direction:column;
  gap:10px;
}

.lwp-topload-graded-row {
  display:grid;
  grid-template-columns: 1fr 1fr 1.2fr auto;
  gap:10px;
  align-items:end;
  padding:10px;
  border:1px solid #eee;
  border-radius:12px;
  background:#fff;
}

.lwp-topload-graded-remove {
  border:1px solid #f2c2bd;
  background:#fff;
  color:#b42318;
  font-weight:900;
  border-radius:10px;
  width:40px;
  height:40px;
  cursor:pointer;
}

@media (max-width: 760px) {
  .lwp-topload-graded-row {
    grid-template-columns: 1fr;
  }
  .lwp-topload-graded-remove {
    width:100%;
  }
}

/* IMAGE UPLOAD STYLES */
.lwp-topload-img-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.lwp-topload-preview-wrap {
    position: relative;
    width: 140px;
    height: 196px; /* 5:7 Ratio */
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
}

.lwp-topload-preview-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures placeholder fills box */
    display: block;
}

/* Remove Button (Hidden by default) */
.lwp-topload-remove-img {
    display: none; /* JS will toggle this to flex */
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.lwp-topload-remove-img:hover {
    background: #b42318;
}

/* Make upload button full width of the thumbnail */
.lwp-topload-upload-trigger {
    width: 140px;
    font-size: 13px;
    padding: 6px;
}

/* LOADING SPINNER */
.lwp-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: lwp-spin 0.8s ease-in-out infinite;
  margin-right: 8px;
  vertical-align: middle;
  margin-top: -2px;
}

.lwp-topload-loading .lwp-spinner {
    border: 2px solid rgba(0,0,0,0.1);
    border-top-color: #32A852;
    width: 20px;
    height: 20px;
}

@keyframes lwp-spin { 
  to { transform: rotate(360deg); } 
}

.lwp-topload-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* PROFILE SETTINGS */
.lwp-profile-wrap { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.lwp-profile-preview-box { position: relative; width: 100px; height: 100px; }
.lwp-profile-preview { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 1px solid #ddd; background: #f0f0f0; display: block; }
.lwp-profile-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.lwp-profile-remove {
    display: none; /* JS toggles this */
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    background: rgba(0,0,0,0.6); /* Same transparent black */
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.lwp-profile-remove:hover { background: #b42318; }

/* DASHBOARD OVERVIEW */
.lwp-dash-banner {
    background: linear-gradient(135deg, #1d2327 0%, #3c434a 100%);
    color: #fff;
    padding: 24px;
    border-radius: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.lwp-dash-plan-info h2 { margin: 0 0 6px 0; color:#fff; font-size: 22px; }
.lwp-dash-plan-info p { margin: 0; opacity: 0.8; font-size: 14px; }
.lwp-dash-upgrade-btn {
    background: #ffd700;
    color: #111;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 800;
    text-decoration: none;
    font-size: 13px;
    text-transform: uppercase;
    transition: transform 0.1s;
}
.lwp-dash-upgrade-btn:hover { transform: scale(1.05); filter: brightness(1.05); }

.lwp-dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}
.lwp-dash-tile {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 120px;
}
.lwp-dash-tile:hover {
    border-color: #32A852;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(50, 168, 82, 0.15);
}
.lwp-dash-count { font-size: 32px; font-weight: 800; color: #111; line-height: 1.1; margin-bottom: 4px; }
.lwp-dash-label { font-size: 13px; color: #666; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

/* Empty State Style */
.lwp-dash-tile.is-cta {
    background: #e7f7ed;
    border: 1px dashed #32A852;
    color: #0a6b2b;
}
.lwp-dash-tile.is-cta .lwp-dash-count { font-size: 20px; margin-bottom: 8px; color: #0a6b2b; }

/* Submenu Styles */
.lwp-sub-nav {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
.lwp-sub-link {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    text-decoration: none;
    cursor: pointer;
    padding: 4px 0;
    position: relative;
}
.lwp-sub-link:hover { color: #111; }
.lwp-sub-link.is-active { color: #32A852; }
.lwp-sub-link.is-active::after {
    content: "";
    position: absolute;
    bottom: -11px; /* Aligns with border-bottom */
    left: 0;
    width: 100%;
    height: 2px;
    background: #32A852;
}

/* View Toggles */
#lwp-view-form { display: none; } /* Hidden by default */
#lwp-view-list { display: block; } /* Visible by default */