/* ==========================================================================
   TajirAI — WordPress-Style Left Sidebar & Professional Enterprise Admin
   Clean typography, crisp SVG icons, refined buttons, zero AI slop
   ========================================================================== */

:root {
  --wp-sidebar-bg: #1d2327;
  --wp-sidebar-hover: #2c3338;
  --wp-sidebar-active: #00E785;
  --wp-sidebar-text: #f0f0f1;
  --wp-sidebar-muted: #8c8f94;
  --wp-sidebar-width: 240px;
  --wp-topbar-height: 54px;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f0f2f5;
  color: #1d2327;
  overflow: hidden;
}

.wp-admin-wrapper {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   1. WORDPRESS-STYLE LEFT SIDEBAR
   -------------------------------------------------------------------------- */
.wp-sidebar {
  width: var(--wp-sidebar-width);
  background: var(--wp-sidebar-bg);
  color: var(--wp-sidebar-text);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 50;
  border-right: 1px solid rgba(0,0,0,0.25);
}

.wp-sidebar-brand {
  height: var(--wp-topbar-height);
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #101517;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.wp-sidebar-brand svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.wp-sidebar-brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.01em;
}

.wp-sidebar-brand-title span {
  color: #00E785;
}

.wp-menu-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
  list-style: none;
  margin: 0;
}

.wp-menu-section-label {
  padding: 14px 16px 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--wp-sidebar-muted);
}

.wp-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  color: var(--wp-sidebar-text);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  border-left: 3px solid transparent;
  text-decoration: none;
}

.wp-menu-item:hover {
  background: var(--wp-sidebar-hover);
  color: #FFFFFF;
}

.wp-menu-item.active {
  background: #2c3338;
  color: #FFFFFF;
  border-left-color: var(--wp-sidebar-active);
  font-weight: 600;
}

.wp-menu-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #8c8f94;
}

.wp-menu-item:hover .wp-menu-icon,
.wp-menu-item.active .wp-menu-icon {
  color: #00E785;
}

.wp-menu-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.wp-sidebar-footer {
  padding: 12px 14px;
  background: #101517;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-footer-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  background: #1d2327;
  color: #dcdcde;
  border: 1px solid #3c434a;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sidebar-footer-btn:hover {
  background: #2c3338;
  color: #FFFFFF;
}

/* --------------------------------------------------------------------------
   2. TOP ADMIN BAR
   -------------------------------------------------------------------------- */
.wp-main-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: #f0f2f5;
}

.wp-topbar {
  height: var(--wp-topbar-height);
  background: #FFFFFF;
  border-bottom: 1px solid #dcdcde;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
  z-index: 40;
}

.wp-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.store-selector-label {
  font-size: 0.82rem;
  color: #64748B;
  font-weight: 600;
}

.tenant-select-wp {
  background: #FFFFFF;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1d2327;
  cursor: pointer;
}

.tenant-select-wp:focus {
  outline: none;
  border-color: #2271b1;
  box-shadow: 0 0 0 1px #2271b1;
}

.wp-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.waba-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #F0FDF4;
  color: #166534;
  border: 1px solid #BBF7D0;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
}

.waba-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16A34A;
}

/* Professional action buttons (no bubbly AI slop) */
.btn-top-test {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0B7A53;
  color: #FFFFFF;
  border: 1px solid #064E35;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-top-test:hover {
  background: #064E35;
}

/* --------------------------------------------------------------------------
   3. CONTENT WORKSPACE PANELS
   -------------------------------------------------------------------------- */
.wp-content-area {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.wp-content-area.full-bleed {
  padding: 0;
  overflow: hidden;
}

.wp-panel {
  display: none;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.wp-panel.active {
  display: flex;
}

/* Onboarding checklist widget */
.onboarding-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.onboarding-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.onboarding-step-box {
  padding: 14px;
  border-radius: 6px;
  border: 1px solid #E2E8F0;
  background: #F8FAFC;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.onboarding-step-box.completed {
  border-color: #BBF7D0;
  background: #F0FDF4;
}

.step-status-indicator {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.onboarding-step-box.completed .step-status-indicator {
  color: #15803D;
}

.onboarding-step-box:not(.completed) .step-status-indicator {
  color: #64748B;
}

/* Clean Form File Upload Zone */
.pdf-drop-zone {
  border: 2px dashed #CBD5E1;
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  background: #F8FAFC;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.pdf-drop-zone:hover, .pdf-drop-zone.dragover {
  border-color: #0B7A53;
  background: #F0FDF4;
}

.pdf-drop-icon {
  width: 36px;
  height: 36px;
  color: #0B7A53;
}

/* RTL Support */
[dir="rtl"] .wp-sidebar {
  border-right: none;
  border-left: 1px solid rgba(0,0,0,0.25);
}

[dir="rtl"] .wp-menu-item {
  border-left: none;
  border-right: 3px solid transparent;
}

[dir="rtl"] .wp-menu-item.active {
  border-right-color: var(--wp-sidebar-active);
}
