/* ============================================================
   HLD – Business Dashboard CSS
   Full-width layout, improved nav, improved sub-navigation
   ============================================================ */

/* ── Shell / Layout ───────────────────────────────────────── */
.hld-dash-shell {
  display: flex;
  gap: 0;
  min-height: calc(100vh - 120px);
  background: #f0f4f8;
  font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;
  color: #1e293b;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

/* Force full width — override any WordPress container constraints */
.hld-dash-shell,
.hld-dash-shell *,
.entry-content .hld-dash-shell,
.post-content .hld-dash-shell,
.page-content .hld-dash-shell,
.site-main .hld-dash-shell,
main .hld-dash-shell {
  box-sizing: border-box;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.hld-dash-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: #1e293b;
  min-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.hld-dash-sidebar-brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.hld-dash-sidebar-brand-name {
  font-size: 11px;
  font-weight: 800;
  color: rgba(255,255,255,.5);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin: 0 0 4px;
}

.hld-dash-sidebar-biz-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 0 8px;
}

/* ── Status Pill ──────────────────────────────────────────── */
.hld-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
}
.hld-sp-publish { background: rgba(16,185,129,.2); color: #6ee7b7; }
.hld-sp-pending { background: rgba(245,158,11,.18); color: #fcd34d; }

/* ── Nav Menu ─────────────────────────────────────────────── */
.hld-dash-nav {
  list-style: none;
  padding: 12px 0;
  margin: 0;
  flex: 1;
}

.hld-dash-nav li {
  margin: 2px 10px;
}

.hld-dash-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: rgba(255,255,255,.6);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  transition: all .16s ease;
}

.hld-dash-nav a:hover {
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.9);
  text-decoration: none;
}

.hld-dash-nav a.active {
  background: #4f46e5;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(79,70,229,.4);
}

.hld-dash-nav-icon {
  width: 20px;
  height: 20px;
  text-align: center;
  font-size: 15px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hld-dash-sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.06);
  font-size: 11px;
  color: rgba(255,255,255,.3);
}

/* ── Main Content ─────────────────────────────────────────── */
.hld-dash-main {
  flex: 1;
  padding: 28px 36px;
  min-width: 0;
  background: #f0f4f8;
  overflow: auto;
}

.hld-dash-page-title {
  font-size: 22px;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hld-dash-page-subtitle {
  font-size: 14px;
  color: #64748b;
  margin: 0 0 24px;
}

/* ── Section Block ────────────────────────────────────────── */
.hld-section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.hld-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Form Styles (Dashboard) ──────────────────────────────── */
.hld-d-form-group {
  margin-bottom: 18px;
}

.hld-d-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.hld-d-label span { color: #ef4444; margin-left: 2px; }

.hld-d-input,
.hld-d-select,
.hld-d-textarea {
  width: 100%;
  padding: 10px 13px;
  font-size: 14px;
  color: #1e293b;
  font-family: inherit;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
  -webkit-appearance: none;
}

.hld-d-input:focus,
.hld-d-select:focus,
.hld-d-textarea:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}

.hld-d-input::placeholder,
.hld-d-textarea::placeholder { color: #9ca3af; }

.hld-d-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.hld-d-textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.6;
}

.hld-d-hint {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
  display: block;
}

/* ── Dashboard Buttons ────────────────────────────────────── */
.hld-d-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: all .15s;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
}

.hld-d-btn-primary { background: #4f46e5; color: #fff; }
.hld-d-btn-primary:hover { background: #3730a3; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(79,70,229,.3); color: #fff; text-decoration: none; }

.hld-d-btn-secondary { background: #f1f5f9; color: #374151; }
.hld-d-btn-secondary:hover { background: #e2e8f0; color: #1e293b; text-decoration: none; }

.hld-d-btn-danger { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.hld-d-btn-danger:hover { background: #fee2e2; text-decoration: none; }

.hld-d-btn-success { background: #ecfdf5; color: #059669; border: 1px solid #6ee7b7; }
.hld-d-btn-success:hover { background: #d1fae5; text-decoration: none; }

.hld-d-btn-sm { padding: 6px 12px; font-size: 12px; }
.hld-d-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ── Sub-navigation (Profile, Catalog) ───────────────────── */
.hld-subnav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 24px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 6px;
  flex-wrap: wrap;
}

.hld-subnav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  transition: all .15s;
  white-space: nowrap;
}

.hld-subnav-link:hover {
  background: #f1f5f9;
  color: #1e293b;
  text-decoration: none;
}

.hld-subnav-link.active {
  background: #4f46e5;
  color: #fff;
  box-shadow: 0 2px 8px rgba(79,70,229,.3);
}

.hld-subnav-link.active:hover {
  background: #3730a3;
  color: #fff;
}

/* ── Stats Bar (Insights) ─────────────────────────────────── */
.hld-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 640px) {
  .hld-stats-grid { grid-template-columns: 1fr 1fr; }
}

.hld-stat-tile {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.hld-stat-tile::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--tile-color, #4f46e5);
}

.hld-stat-tile .num {
  font-size: 32px;
  font-weight: 800;
  color: var(--tile-color, #4f46e5);
  line-height: 1;
}

.hld-stat-tile .lbl {
  font-size: 12px;
  color: #64748b;
  margin-top: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── Photo Upload Zones ───────────────────────────────────── */
.hld-upload-zone {
  border: 2px dashed #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all .15s;
  background: #fafbff;
}

.hld-upload-zone:hover {
  border-color: #4f46e5;
  background: #f5f3ff;
}

.hld-upload-zone .icon { font-size: 32px; margin-bottom: 8px; }
.hld-upload-zone .txt  { font-size: 13px; color: #64748b; }
.hld-upload-zone .sub  { font-size: 12px; color: #94a3b8; margin-top: 4px; }

.hld-photo-thumb {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #f1f5f9;
  position: relative;
  margin-top: 12px;
}

.hld-photo-thumb img { width: 100%; height: 100%; object-fit: cover; }

.hld-photo-thumb-change {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(30,41,59,.7);
  color: #fff;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  padding: 8px;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s;
}

.hld-photo-thumb:hover .hld-photo-thumb-change { opacity: 1; }

.hld-logo-thumb {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f5f9;
  border: 2px solid #e2e8f0;
  margin-top: 12px;
  cursor: pointer;
}

.hld-logo-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ── Image Preview Grid ───────────────────────────────────── */
.hld-img-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.hld-img-preview-grid .hld-preview-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.hld-img-preview-grid .hld-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hld-img-preview-grid .hld-preview-remove {
  position: absolute;
  top: 3px; right: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(0,0,0,.7);
  color: #fff;
  border: none;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ── Catalog Item Cards ───────────────────────────────────── */
.hld-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.hld-catalog-item {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow .15s, transform .15s;
}

.hld-catalog-item:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.1);
  transform: translateY(-2px);
}

.hld-catalog-item-imgs   { position: relative; aspect-ratio: 1; background: #f8fafc; overflow: hidden; }
.hld-catalog-item-imgs img { width: 100%; height: 100%; object-fit: cover; }
.hld-catalog-item-badge  { position: absolute; top: 8px; right: 8px; }
.hld-catalog-item-body   { padding: 12px 14px; }
.hld-catalog-item-name   { font-size: 13px; font-weight: 700; color: #1e293b; margin: 0 0 4px; }
.hld-catalog-item-price  { font-size: 13px; font-weight: 700; color: #4f46e5; margin: 0 0 6px; }
.hld-catalog-item-desc   { font-size: 12px; color: #64748b; margin: 0 0 10px; line-height: 1.5; }
.hld-catalog-item-actions { display: flex; gap: 6px; }
.hld-catalog-item-actions .hld-d-btn { flex: 1; justify-content: center; }

/* ── Modal ────────────────────────────────────────────────── */
.hld-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15,23,42,.6);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.hld-modal-overlay.open { display: flex; }

.hld-modal-box {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,.2);
  position: relative;
}

.hld-modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.hld-modal-title { font-size: 17px; font-weight: 700; color: #1e293b; margin: 0; }
.hld-modal-close {
  width: 32px; height: 32px;
  border-radius: 8px; border: none;
  background: #f1f5f9; cursor: pointer;
  font-size: 18px; display: flex; align-items: center; justify-content: center; color: #64748b;
}

.hld-modal-close:hover { background: #e2e8f0; }

/* ── Hours Table ──────────────────────────────────────────── */
.hld-hours-table { width: 100%; border-collapse: collapse; }
.hld-hours-table th {
  background: #f8fafc; padding: 10px 12px;
  font-size: 12px; font-weight: 700; color: #64748b;
  text-transform: uppercase; letter-spacing: .04em;
  text-align: left; border-bottom: 2px solid #e2e8f0;
}
.hld-hours-table td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; font-size: 13px; vertical-align: middle; }
.hld-hours-table tr:last-child td { border-bottom: none; }
.hld-time-input { padding: 7px 10px; border: 1.5px solid #e2e8f0; border-radius: 6px; font-size: 13px; outline: none; font-family: inherit; }
.hld-time-input:focus { border-color: #4f46e5; box-shadow: 0 0 0 2px rgba(79,70,229,.12); }

/* ── Contact Links ────────────────────────────────────────── */
.hld-link-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.hld-link-row .hld-link-icon {
  width: 36px; height: 36px; border-radius: 8px; background: #f1f5f9;
  display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0;
}

/* ── Badge Tiles ──────────────────────────────────────────── */
.hld-badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }

.hld-badge-tile {
  border: 2px solid #e2e8f0; border-radius: 12px; padding: 18px 12px;
  text-align: center; transition: all .15s; background: #fff; cursor: default;
}

.hld-badge-tile.earned { border-color: #4f46e5; background: #f5f3ff; }
.hld-badge-tile .ico   { font-size: 32px; margin-bottom: 8px; }
.hld-badge-tile .name  { font-size: 13px; font-weight: 700; color: #1e293b; margin-bottom: 4px; }
.hld-badge-tile .desc  { font-size: 11px; color: #64748b; }

/* ── Premium Plans ────────────────────────────────────────── */
.hld-plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }

.hld-plan-card {
  border: 2px solid #e2e8f0; border-radius: 14px; padding: 24px;
  text-align: center; transition: all .15s; background: #fff;
}

.hld-plan-card.featured { border-color: #4f46e5; background: linear-gradient(135deg, #f5f3ff, #ede9fe); }
.hld-plan-card.featured .hld-plan-badge {
  background: #4f46e5; color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px; display: inline-block; margin-bottom: 12px;
}
.hld-plan-name { font-size: 17px; font-weight: 800; color: #1e293b; margin-bottom: 6px; }
.hld-plan-price { font-size: 28px; font-weight: 800; color: #4f46e5; margin: 8px 0 16px; }
.hld-plan-price span { font-size: 14px; color: #64748b; font-weight: 500; }
.hld-plan-features { list-style: none; padding: 0; margin: 0 0 20px; text-align: left; }
.hld-plan-features li {
  font-size: 13px; color: #374151; padding: 5px 0;
  display: flex; align-items: center; gap: 7px;
}
.hld-plan-features li::before { content: '✓'; color: #10b981; font-weight: 700; }

/* ── Alerts inline ────────────────────────────────────────── */
.hld-d-alert {
  padding: 12px 16px; border-radius: 8px; font-size: 13px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.hld-d-alert-success { background: #ecfdf5; border: 1px solid #6ee7b7; color: #065f46; }
.hld-d-alert-error   { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }
.hld-d-alert-info    { background: #eff6ff; border: 1px solid #93c5fd; color: #1e40af; }

/* ── Owner Card ───────────────────────────────────────────── */
.hld-owner-card {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(135deg, #1e293b, #334155);
  border-radius: 14px; padding: 24px; color: #fff; margin-bottom: 20px;
}
.hld-owner-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: #4f46e5; display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.hld-owner-name  { font-size: 18px; font-weight: 700; margin: 0 0 4px; color: #fff; }
.hld-owner-email { font-size: 13px; color: rgba(255,255,255,.7); margin: 0 0 2px; }
.hld-owner-since { font-size: 12px; color: rgba(255,255,255,.5); margin: 0; }

/* ── Profile Section (within profile pages) ───────────────── */
.hld-profile-section {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 24px; margin-bottom: 20px;
}
.hld-profile-section h3 {
  font-size: 15px; font-weight: 700; color: #1e293b; margin: 0 0 16px; padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

/* ── Updates ──────────────────────────────────────────────── */
.hld-update-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 16px; margin-bottom: 12px;
  transition: box-shadow .15s;
}
.hld-update-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.07); }
.hld-update-card-title { font-size: 14px; font-weight: 700; color: #1e293b; margin: 0 0 4px; }
.hld-update-card-meta  { font-size: 12px; color: #94a3b8; margin-bottom: 8px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hld-update-card-desc  { font-size: 13px; color: #64748b; line-height: 1.5; white-space: pre-line; }
.hld-update-card-imgs  { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hld-update-card-imgs img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid #e2e8f0; }
.hld-update-card-actions { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #f1f5f9; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .hld-dash-sidebar {
    width: 60px;
    position: fixed;
    z-index: 100;
    height: 100vh;
    overflow: hidden;
  }
  .hld-dash-sidebar-brand,
  .hld-dash-sidebar-footer,
  .hld-dash-nav a span.hld-dash-nav-label { display: none; }
  .hld-dash-nav a { padding: 12px; justify-content: center; }
  .hld-dash-nav-icon { width: 20px; font-size: 18px; }
  .hld-dash-main { margin-left: 60px; padding: 20px 16px; }
}

@media (max-width: 600px) {
  .hld-dash-main { padding: 16px; }
  .hld-stats-grid { grid-template-columns: 1fr; }
  .hld-subnav { gap: 2px; padding: 4px; }
  .hld-subnav-link { padding: 7px 10px; font-size: 12px; }
}
