/**
 * ROMLI ATELIER - WordPress Authentic Admin Styling
 * Faithfully replicates the classic WordPress wp-admin visual identity:
 * Dark sidebar (#1d2327), WP Blue (#2271b1), Light background (#f0f0f1),
 * List tables, postbox metaboxes, WooCommerce-style tabs, and top admin bar.
 */

:root {
  --wp-admin-theme: #2271b1;
  --wp-admin-theme-hover: #135e96;
  --wp-admin-theme-dark: #0a4b78;
  --wp-admin-bar-bg: #1d2327;
  --wp-admin-bar-color: #f0f0f1;
  --wp-admin-bar-hover: #72aee6;
  --wp-admin-menu-bg: #1d2327;
  --wp-admin-submenu-bg: #2c3338;
  --wp-admin-menu-color: #c3c4c7;
  --wp-admin-menu-active: #2271b1;
  --wp-admin-bg: #f0f0f1;
  --wp-admin-card-bg: #ffffff;
  --wp-admin-border: #c3c4c7;
  --wp-admin-border-light: #dcdcde;
  --wp-admin-text: #2c3338;
  --wp-admin-text-muted: #646970;
  --wp-admin-success: #00a32a;
  --wp-admin-warning: #dba617;
  --wp-admin-danger: #d63638;
  --wp-admin-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

body.wp-admin-body {
  margin: 0;
  padding: 0;
  background: var(--wp-admin-bg);
  color: var(--wp-admin-text);
  font-family: var(--wp-admin-font);
  font-size: 13px;
  line-height: 1.4em;
  -webkit-font-smoothing: subpixel-antialiased;
}

/* ==========================================================================
   1. WORDPRESS LOGIN VIEW (WP-LOGIN REPLICA)
   ========================================================================== */
#wp-login-view {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px 15px;
  background: var(--wp-admin-bg);
}

.login-brand-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: #111111;
  border: 2px solid #C29A38;
  color: #C29A38;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 12px;
}

.login-brand-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #1d2327;
  margin: 0;
}

.login-brand-sub {
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--wp-admin-text-muted);
}

.login-card-box {
  width: 100%;
  max-width: 340px;
  background: #ffffff;
  border: 1px solid var(--wp-admin-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  padding: 26px 24px 28px;
  border-radius: 4px;
}

.login-card-box label {
  display: block;
  font-size: 14px;
  color: var(--wp-admin-text);
  margin-bottom: 4px;
}

.login-card-box input[type="text"],
.login-card-box input[type="password"] {
  width: 100%;
  font-size: 16px;
  line-height: 1.33333333;
  padding: 6px 10px;
  border: 1px solid #8c8f94;
  border-radius: 4px;
  background-color: #fff;
  color: #2c3338;
  outline: none;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  margin-bottom: 16px;
}

.login-card-box input[type="text"]:focus,
.login-card-box input[type="password"]:focus {
  border-color: var(--wp-admin-theme);
  box-shadow: 0 0 0 1px var(--wp-admin-theme);
}

.login-pass-wrap {
  position: relative;
}

.toggle-password-btn {
  position: absolute;
  right: 8px;
  top: 9px;
  background: none;
  border: none;
  color: var(--wp-admin-text-muted);
  cursor: pointer;
  font-size: 14px;
}

.login-remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.login-remember-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
  margin: 0;
}

.login-actions-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.login-demo-hint {
  margin-top: 18px;
  padding: 10px;
  background: #f0f6fc;
  border: 1px solid #c5d9ed;
  border-radius: 3px;
  font-size: 12px;
  color: #135e96;
}

.login-demo-hint strong {
  display: block;
  margin-bottom: 2px;
}

.login-nav-links {
  width: 100%;
  max-width: 340px;
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.login-nav-links a {
  color: var(--wp-admin-text-muted);
  text-decoration: none;
}

.login-nav-links a:hover {
  color: var(--wp-admin-theme);
}

/* ==========================================================================
   2. WORDPRESS TOP ADMIN BAR (#wpadminbar)
   ========================================================================== */
#wpadminbar {
  height: 32px;
  background: var(--wp-admin-bar-bg);
  color: var(--wp-admin-bar-color);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  user-select: none;
}

.wp-bar-group {
  display: flex;
  align-items: center;
  height: 100%;
}

.wp-bar-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  color: var(--wp-admin-bar-color);
  text-decoration: none;
  font-size: 13px;
  cursor: pointer;
  position: relative;
  transition: background-color 0.15s;
}

.wp-bar-item:hover,
.wp-bar-dropdown:hover > .wp-bar-item {
  background: #2c3338;
  color: var(--wp-admin-bar-hover);
}

.wp-bar-w-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wp-bar-w-logo svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.wp-bar-badge {
  display: inline-block;
  background: var(--wp-admin-theme);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
  line-height: 1.2;
}

/* Admin Bar Dropdowns */
.wp-bar-dropdown {
  position: relative;
  height: 100%;
}

.wp-bar-dropdown-menu {
  display: none;
  position: absolute;
  top: 32px;
  left: 0;
  background: #2c3338;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  min-width: 180px;
  z-index: 100000;
  padding: 4px 0;
}

.wp-bar-dropdown:hover > .wp-bar-dropdown-menu {
  display: block;
}

.wp-bar-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  color: #c3c4c7;
  text-decoration: none;
  font-size: 13px;
}

.wp-bar-dropdown-menu a:hover {
  background: var(--wp-admin-theme);
  color: #fff;
}

.wp-bar-dropdown-right {
  left: auto;
  right: 0;
}

.wp-avatar-mini {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  vertical-align: middle;
}

/* ==========================================================================
   3. WORDPRESS SIDEBAR NAVIGATION (#adminmenu)
   ========================================================================== */
#adminmenuback,
#adminmenuwrap {
  width: 160px;
  background: var(--wp-admin-menu-bg);
  position: fixed;
  top: 32px;
  bottom: 0;
  left: 0;
  z-index: 9990;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width 0.15s ease-in-out;
}

#adminmenu {
  list-style: none;
  margin: 0;
  padding: 0;
}

#adminmenu li.menu-top {
  position: relative;
}

#adminmenu a.menu-top {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  color: var(--wp-admin-menu-color);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.4;
  gap: 8px;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

#adminmenu a.menu-top:hover {
  background: #135e96;
  color: #72aee6;
}

#adminmenu a.menu-top .wp-menu-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #a7aaad;
}

#adminmenu a.menu-top:hover .wp-menu-icon,
#adminmenu li.current a.menu-top .wp-menu-icon {
  color: #ffffff;
}

#adminmenu li.current > a.menu-top {
  background: var(--wp-admin-theme);
  color: #ffffff;
  font-weight: 600;
  border-left-color: #72aee6;
}

#adminmenu li.current > a.menu-top::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  border-style: solid;
  border-width: 7px 8px 7px 0;
  border-color: transparent var(--wp-admin-bg) transparent transparent;
}

#adminmenu .update-plugins {
  background-color: #d63638;
  color: #ffffff;
  display: inline-block;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 700;
  margin-left: auto;
}

#adminmenu .count-bubble {
  background-color: var(--wp-admin-theme);
  color: #ffffff;
  display: inline-block;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 700;
  margin-left: auto;
}

#adminmenu li.wp-menu-separator {
  height: 5px;
  margin: 6px 0;
  background: var(--wp-admin-submenu-bg);
}

#collapse-menu {
  position: sticky;
  bottom: 0;
  background: var(--wp-admin-menu-bg);
  border-top: 1px solid #2c3338;
  padding: 0;
  z-index: 99;
}

#collapse-button {
  background: transparent;
  border: none;
  color: #a7aaad;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  padding: 0 12px;
  width: 100%;
  height: 38px;
  text-align: left;
  transition: all 0.15s ease-in-out;
  outline: none;
}

#collapse-button:hover,
#collapse-button:focus {
  background: #2c3338;
  color: #72aee6;
}

.collapse-button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.15s ease;
  flex-shrink: 0;
}

#collapse-button:hover .collapse-button-icon {
  background: rgba(114, 174, 230, 0.2);
  color: #72aee6;
}

.collapse-button-label {
  font-size: 12px;
  white-space: nowrap;
  transition: opacity 0.15s ease;
}

/* ==========================================================================
   FOLDED MENU STATE (AUTHENTIC WORDPRESS WP-ADMIN COLLAPSED SIDEBAR)
   ========================================================================== */
body.folded #adminmenuback,
body.folded #adminmenuwrap {
  width: 48px;
}

body.folded #wpcontent {
  margin-left: 48px;
}

/* Hide text labels, badges, and the text label of the collapse button */
body.folded #adminmenu .wp-menu-name,
body.folded #adminmenu .update-plugins,
body.folded #adminmenu .count-bubble,
body.folded .collapse-button-label {
  display: none !important;
}

body.folded #adminmenu a.menu-top {
  padding: 10px 0;
  justify-content: center;
  position: relative;
}

body.folded #adminmenu a.menu-top .wp-menu-icon {
  margin: 0;
}

/* Collapse Button in Folded State: Centers the button & rotates icon to point RIGHT */
body.folded #collapse-menu {
  padding: 0;
}

body.folded #collapse-button {
  justify-content: center;
  padding: 0;
  width: 48px;
  height: 40px;
}

body.folded #collapse-button .collapse-button-icon {
  transform: rotate(180deg);
  background: rgba(255, 255, 255, 0.12);
  color: #c3c4c7;
}

body.folded #collapse-button:hover {
  background: var(--wp-admin-theme);
  color: #ffffff;
}

body.folded #collapse-button:hover .collapse-button-icon {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* WordPress Flyout Tooltip on Hover in Folded Mode */
body.folded #adminmenu li.menu-top:hover .wp-menu-name {
  display: block !important;
  position: absolute;
  left: 48px;
  top: 0;
  height: 100%;
  line-height: 38px;
  padding: 0 16px;
  background: #2c3338;
  color: #ffffff;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  pointer-events: none;
  border-left: 1px solid #191e23;
  animation: wpFlyoutFade 0.15s ease;
}

@keyframes wpFlyoutFade {
  from { opacity: 0; transform: translateX(-4px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ==========================================================================
   4. MAIN CONTENT AREA (#wpcontent)
   ========================================================================== */
#wpcontent {
  margin-left: 160px;
  margin-top: 32px;
  padding: 16px 24px 60px;
  background: var(--wp-admin-bg);
  min-height: calc(100vh - 32px);
  transition: margin-left 0.15s ease-in-out;
}

.wrap {
  margin: 0;
  max-width: 1300px;
}

.wrap h1.wp-heading-inline {
  font-size: 23px;
  font-weight: 400;
  line-height: 1.3;
  color: #1d2327;
  display: inline-block;
  margin: 0 8px 16px 0;
  vertical-align: middle;
}

.page-title-action {
  display: inline-block;
  vertical-align: middle;
  padding: 4px 8px;
  font-size: 13px;
  line-height: normal;
  color: var(--wp-admin-theme);
  border: 1px solid var(--wp-admin-theme);
  background: #f6f7f7;
  text-decoration: none;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s;
}

.page-title-action:hover {
  background: var(--wp-admin-theme);
  color: #ffffff;
}

/* Screen Title Header Bar */
.wp-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.wp-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Notices / Alerts */
.notice {
  background: #ffffff;
  border: 1px solid var(--wp-admin-border);
  border-left-width: 4px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
  margin: 12px 0 18px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 2px;
  font-size: 13px;
}

.notice-success {
  border-left-color: var(--wp-admin-success);
}

.notice-warning {
  border-left-color: var(--wp-admin-warning);
}

.notice-error {
  border-left-color: var(--wp-admin-danger);
}

.notice-info {
  border-left-color: var(--wp-admin-theme);
}

.notice-dismiss {
  background: none;
  border: none;
  color: var(--wp-admin-text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
}

.notice-dismiss:hover {
  color: var(--wp-admin-danger);
}

/* ==========================================================================
   5. WORDPRESS DASHBOARD SCREEN (WIDGETS & STATS)
   ========================================================================== */
.welcome-panel {
  background: #ffffff;
  border: 1px solid var(--wp-admin-border);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
  padding: 24px 28px;
  margin-bottom: 24px;
  position: relative;
  border-radius: 2px;
}

.welcome-panel h2 {
  margin: 0 0 6px;
  font-size: 21px;
  font-weight: 400;
  color: #1d2327;
}

.welcome-panel p.about-description {
  margin: 0 0 18px;
  font-size: 15px;
  color: var(--wp-admin-text-muted);
}

.welcome-panel-column-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--wp-admin-border-light);
}

.welcome-panel-column h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 10px;
}

.welcome-panel-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.welcome-panel-column ul li {
  margin-bottom: 8px;
}

.welcome-panel-column ul li a {
  color: var(--wp-admin-theme);
  text-decoration: none;
}

.welcome-panel-column ul li a:hover {
  color: var(--wp-admin-theme-hover);
  text-decoration: underline;
}

/* Postbox Widgets */
.dashboard-widgets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
}

.postbox {
  background: #ffffff;
  border: 1px solid var(--wp-admin-border);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
  border-radius: 2px;
  margin-bottom: 20px;
}

.postbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--wp-admin-border-light);
  background: #ffffff;
}

.postbox-header h2 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  color: #1d2327;
}

.postbox .inside {
  padding: 14px;
  font-size: 13px;
}

/* At a Glance Widget */
.at-a-glance-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.at-a-glance-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.at-a-glance-icon {
  color: #a7aaad;
}

/* Metric KPI Mini Cards */
.kpi-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.kpi-card {
  background: #f6f7f7;
  border: 1px solid var(--wp-admin-border-light);
  padding: 12px;
  border-radius: 3px;
}

.kpi-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--wp-admin-text-muted);
  display: block;
}

.kpi-value {
  font-size: 20px;
  font-weight: 700;
  color: #1d2327;
  margin-top: 4px;
  display: block;
}

/* ==========================================================================
   6. WORDPRESS BUTTONS & FORM CONTROLS
   ========================================================================== */
.button,
.button-primary,
.button-secondary,
.button-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  font-size: 13px;
  line-height: normal;
  height: 30px;
  margin: 0;
  padding: 0 12px;
  cursor: pointer;
  border-width: 1px;
  border-style: solid;
  border-radius: 3px;
  white-space: nowrap;
  box-sizing: border-box;
  font-family: inherit;
  transition: all 0.15s ease-in-out;
}

.button,
.button-secondary {
  color: var(--wp-admin-theme);
  border-color: var(--wp-admin-theme);
  background: #f6f7f7;
}

.button:hover,
.button-secondary:hover {
  background: #f0f0f1;
  border-color: var(--wp-admin-theme-hover);
  color: var(--wp-admin-theme-hover);
}

.button-primary {
  background: var(--wp-admin-theme);
  border-color: var(--wp-admin-theme);
  color: #ffffff;
}

.button-primary:hover {
  background: var(--wp-admin-theme-hover);
  border-color: var(--wp-admin-theme-hover);
  color: #ffffff;
}

.button-danger {
  background: #fcf0f1;
  border-color: var(--wp-admin-danger);
  color: var(--wp-admin-danger);
}

.button-danger:hover {
  background: var(--wp-admin-danger);
  color: #ffffff;
}

.button-small {
  height: 24px;
  padding: 0 8px;
  font-size: 12px;
}

.button-large {
  height: 38px;
  padding: 0 18px;
  font-size: 14px;
}

/* Form Inputs */
input[type="text"],
input[type="number"],
input[type="search"],
input[type="email"],
input[type="url"],
select,
textarea {
  border: 1px solid #8c8f94;
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 13px;
  line-height: 1.4;
  color: #2c3338;
  background-color: #fff;
  outline: none;
  box-shadow: 0 0 0 transparent;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
  border-color: var(--wp-admin-theme);
  box-shadow: 0 0 0 1px var(--wp-admin-theme);
}

.regular-text {
  width: 25em;
  max-width: 100%;
}

.large-text {
  width: 100%;
}

.small-text {
  width: 70px;
}

/* ==========================================================================
   7. WORDPRESS LIST TABLE (WP-LIST-TABLE)
   ========================================================================== */
.tablenav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0;
}

.tablenav-left,
.tablenav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.subsubsub {
  list-style: none;
  margin: 8px 0;
  padding: 0;
  font-size: 13px;
  color: var(--wp-admin-text-muted);
}

.subsubsub li {
  display: inline;
  margin: 0;
}

.subsubsub li a {
  color: var(--wp-admin-theme);
  text-decoration: none;
  padding: 2px;
}

.subsubsub li a.current {
  font-weight: 600;
  color: #000000;
}

.table-responsive-wrapper {
  overflow-x: auto;
  background: #ffffff;
  border: 1px solid var(--wp-admin-border);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.wp-list-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  font-size: 13px;
}

.wp-list-table th {
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 400;
  text-align: left;
  color: #2c3338;
  border-bottom: 1px solid var(--wp-admin-border);
  background: #ffffff;
  white-space: nowrap;
}

.wp-list-table td {
  padding: 10px;
  font-size: 13px;
  color: #50575e;
  border-top: 1px solid #f0f0f1;
  vertical-align: middle;
}

.wp-list-table tr:hover td {
  background: #f6f7f7;
}

.column-thumb {
  width: 54px;
  text-align: center;
}

.wp-list-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid var(--wp-admin-border-light);
  background: #eee;
}

.column-primary strong {
  font-size: 14px;
  color: #1d2327;
}

.row-actions {
  font-size: 12px;
  margin-top: 4px;
  color: #a7aaad;
}

.row-actions a {
  color: var(--wp-admin-theme);
  text-decoration: none;
}

.row-actions a:hover {
  text-decoration: underline;
}

.row-actions .trash a {
  color: #b32d2e;
}

.wp-badge-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-bestseller { background: #e3f2fd; color: #1565c0; }
.badge-cult-edit { background: #fef3c7; color: #92400e; }
.badge-luxury { background: #f3e8ff; color: #6b21a8; }
.badge-iconic { background: #e0e7ff; color: #3730a3; }
.badge-outdoor { background: #ecfdf5; color: #065f46; }
.badge-trending { background: #ffedd5; color: #9a3412; }

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
}
.status-pending { background: #fff8e5; color: #8a6d3b; border: 1px solid #faebcc; }
.status-processing { background: #e8f4fd; color: #1e70bf; border: 1px solid #d0e7fb; }
.status-confirmed { background: #e7f7ed; color: #2e7d32; border: 1px solid #c8e6c9; }
.status-completed { background: #e7f7ed; color: #2e7d32; border: 1px solid #c8e6c9; }

/* ==========================================================================
   8. WOOCOMMERCE PRODUCT EDITOR SCREEN (#post-body)
   ========================================================================== */
#poststuff {
  margin-top: 15px;
}

#post-body {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 960px) {
  #post-body {
    grid-template-columns: 1fr;
  }
}

#titlediv {
  margin-bottom: 20px;
}

#titlediv input#title {
  padding: 10px 14px;
  font-size: 1.6em;
  line-height: 100%;
  width: 100%;
  border: 1px solid #8c8f94;
  border-radius: 4px;
}

/* Tabbed Panels / WooCommerce Product Data Tabs */
.woocommerce-product-data {
  background: #ffffff;
  border: 1px solid var(--wp-admin-border);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
  margin-bottom: 20px;
  border-radius: 2px;
}

.wc-tabs-wrapper {
  display: grid;
  grid-template-columns: 180px 1fr;
  min-height: 380px;
}

@media (max-width: 768px) {
  .wc-tabs-wrapper {
    grid-template-columns: 1fr;
  }
}

.wc-tabs {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #f6f7f7;
  border-right: 1px solid var(--wp-admin-border-light);
}

.wc-tabs li {
  margin: 0;
}

.wc-tabs li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--wp-admin-text);
  text-decoration: none;
  border-bottom: 1px solid var(--wp-admin-border-light);
  border-left: 3px solid transparent;
  cursor: pointer;
}

.wc-tabs li.active a {
  background: #ffffff;
  border-left-color: var(--wp-admin-theme);
  font-weight: 600;
  color: var(--wp-admin-theme);
}

.wc-tabs li a:hover {
  background: #f0f0f1;
}

.wc-panel-content {
  padding: 18px 24px;
}

.wc-panel {
  display: none;
}

.wc-panel.active {
  display: block;
}

/* Settings Form Table */
.form-table {
  width: 100%;
  border-collapse: collapse;
}

.form-table th {
  width: 200px;
  padding: 14px 10px 14px 0;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  font-weight: 600;
  color: #1d2327;
}

.form-table td {
  padding: 12px 0;
  vertical-align: middle;
}

.form-table p.description {
  font-size: 12px;
  color: var(--wp-admin-text-muted);
  font-style: italic;
  margin: 4px 0 0;
}

.form-row-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 12px;
}

/* Featured Image Box */
.featured-image-preview-wrap {
  text-align: center;
  margin-bottom: 10px;
}

.featured-image-preview {
  max-width: 100%;
  max-height: 200px;
  border-radius: 3px;
  border: 1px solid var(--wp-admin-border-light);
  object-fit: cover;
}

/* Category Checkbox List */
.category-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 180px;
  overflow-y: auto;
}

.category-checklist li {
  margin-bottom: 6px;
}

.category-checklist label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

/* ==========================================================================
   9. MEDIA LIBRARY VIEW (HORIZONTAL FULL-WIDTH RESPONSIVE GRID)
   ========================================================================== */
.media-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 14px;
  width: 100%;
}

.media-grid-item {
  position: relative;
  border: 1px solid var(--wp-admin-border-light);
  background: #ffffff;
  border-radius: 4px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.15s ease-in-out;
  display: flex;
  flex-direction: column;
}

.media-grid-item:hover {
  transform: translateY(-2px);
  border-color: var(--wp-admin-theme);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.media-grid-item.selected {
  border-color: var(--wp-admin-theme);
  box-shadow: 0 0 0 2px var(--wp-admin-theme);
}

.media-grid-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #f0f0f1;
  overflow: hidden;
  display: block;
}

.media-grid-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.media-grid-item:hover .media-grid-img {
  transform: scale(1.05);
}

.media-grid-info {
  padding: 8px 10px;
  font-size: 11.5px;
  color: var(--wp-admin-text-muted);
  background: #ffffff;
  border-top: 1px solid #f0f0f1;
}

.media-grid-info strong {
  display: block;
  color: var(--wp-admin-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 2px;
}

.media-grid-info span {
  font-size: 10.5px;
  color: #646970;
}

/* WordPress Media Modal Backdrop & Dialog */
.media-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 160000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.media-modal-dialog {
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.25);
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: wpModalFadeIn 0.2s ease-out;
}

@keyframes wpModalFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   10. NAV TABS (WP STANDARD TABS)
   ========================================================================== */
.nav-tab-wrapper {
  border-bottom: 1px solid var(--wp-admin-border);
  margin: 16px 0 20px;
  display: flex;
  gap: 4px;
}

.nav-tab {
  display: inline-block;
  padding: 6px 14px;
  font-size: 14px;
  line-height: 1.7;
  color: #50575e;
  text-decoration: none;
  background: #dcdcde;
  border: 1px solid var(--wp-admin-border);
  border-bottom: none;
  border-radius: 3px 3px 0 0;
  cursor: pointer;
  transition: all 0.15s;
}

.nav-tab:hover {
  background: #f0f0f1;
  color: #1d2327;
}

.nav-tab-active,
.nav-tab-active:hover {
  background: var(--wp-admin-bg);
  border-bottom: 1px solid var(--wp-admin-bg);
  margin-bottom: -1px;
  color: #000000;
  font-weight: 600;
}

/* ==========================================================================
   11. MODAL / DIALOG POPUP
   ========================================================================== */
.wp-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 100050;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.wp-modal-overlay.active {
  display: flex;
}

.wp-modal-box {
  background: #ffffff;
  border-radius: 4px;
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
}

.wp-modal-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--wp-admin-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wp-modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.wp-modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--wp-admin-text-muted);
}

.wp-modal-body {
  padding: 20px;
}

.wp-modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--wp-admin-border-light);
  background: #f6f7f7;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ==========================================================================
   12. FRONTEND INJECTED WP-ADMIN BAR (FOR INDEX & SHOP)
   ========================================================================== */
.wp-front-admin-bar {
  height: 32px;
  background: #1d2327;
  color: #f0f0f1;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 13px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.wp-front-admin-bar a {
  color: #f0f0f1;
  text-decoration: none;
}

body.admin-bar-active {
  padding-top: 32px !important;
}

/* Mobile Responsiveness */
@media (max-width: 782px) {
  #wpcontent {
    margin-left: 0;
    padding: 12px 14px 40px;
  }
  #adminmenuback,
  #adminmenuwrap {
    display: none;
  }
  #adminmenuback.mobile-open,
  #adminmenuwrap.mobile-open {
    display: block;
    width: 200px;
  }
}
