/* ==========================================================================
   PNG Market — Phase 2 Design System (Step 1)
   Source: client mockups (homepage, account, listing, auth, footer).

   IMPORTANT: Do NOT use CSS custom properties here — Osclass CSS merger
   strips var(--*). Tokens are documented as hex below and inlined.

   Brand tokens (sampled from mockups):
     brand            #006b24
     brand hover      #00551c
     brand soft       #e8f5ec
     brand mid        #16883f   (legacy Phase-1 accent — keep for gradual migrate)
     sell             #e30000
     ink              #16202a
     body             #3d4651
     muted            #6b7785
     hairline         #e3e8ed
     hairline strong  #cfd7df
     canvas           #f4f6f8
     surface          #ffffff
     danger           #c62828
     warning          #e6a700
     info             #1e88e5
     radius sm/md/lg  8px / 12px / 16px
     radius pill      999px
     shadow card      0 1px 2px rgba(16,24,40,.06), 0 4px 12px rgba(16,24,40,.04)
     shadow float     0 8px 24px rgba(16,24,40,.12)
     font             inherit (theme sans-serif stack — Inter-like)
   ========================================================================== */


/* --------------------------------------------------------------------------
   Global base
   -------------------------------------------------------------------------- */

html {
  -webkit-text-size-adjust: 100%;
}

body {
  color: #16202a;
  background: #f4f6f8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: #006b24;
}

a:hover {
  color: #00551c;
}


/* --------------------------------------------------------------------------
   Typography scale
   -------------------------------------------------------------------------- */

.pngm-ds-h1,
.pngm-ds-title {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.02em;
  color: #16202a;
}

.pngm-ds-h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: #16202a;
}

.pngm-ds-h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: #16202a;
}

.pngm-ds-sub {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #6b7785;
}

.pngm-ds-meta {
  font-size: 12px;
  line-height: 1.4;
  color: #6b7785;
}

.pngm-ds-price {
  font-size: 16px;
  font-weight: 800;
  color: #006b24;
}


/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.pngm-ds-btn,
a.pngm-ds-btn,
button.pngm-ds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.pngm-ds-btn-primary,
a.pngm-ds-btn-primary,
button.pngm-ds-btn-primary,
.btn.pngm-ds-btn-primary {
  color: #fff !important;
  background: #006b24 !important;
  border-color: #006b24 !important;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
}

.pngm-ds-btn-primary:hover,
a.pngm-ds-btn-primary:hover,
button.pngm-ds-btn-primary:hover,
.btn.pngm-ds-btn-primary:hover {
  color: #fff !important;
  background: #00551c !important;
  border-color: #00551c !important;
  text-decoration: none;
}

.pngm-ds-btn-secondary,
a.pngm-ds-btn-secondary,
button.pngm-ds-btn-secondary {
  color: #006b24 !important;
  background: #fff !important;
  border-color: #006b24 !important;
}

.pngm-ds-btn-secondary:hover,
a.pngm-ds-btn-secondary:hover,
button.pngm-ds-btn-secondary:hover {
  background: #e8f5ec !important;
  text-decoration: none;
}

.pngm-ds-btn-ghost,
a.pngm-ds-btn-ghost,
button.pngm-ds-btn-ghost {
  color: #16202a !important;
  background: #fff !important;
  border-color: #cfd7df !important;
}

.pngm-ds-btn-danger,
a.pngm-ds-btn-danger,
button.pngm-ds-btn-danger {
  color: #c62828 !important;
  background: #fff !important;
  border-color: #c62828 !important;
}

.pngm-ds-btn-block {
  width: 100%;
}

.pngm-ds-btn-sm {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 8px;
}

.pngm-ds-btn-pill {
  border-radius: 999px !important;
}


/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.pngm-ds-label {
  display: block;
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: #16202a;
}

.pngm-ds-input,
.pngm-ds-select,
.pngm-ds-textarea,
input.pngm-ds-input,
select.pngm-ds-select,
textarea.pngm-ds-textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #cfd7df;
  border-radius: 10px;
  background: #fff;
  color: #16202a;
  font-size: 14px;
  line-height: 1.4;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.pngm-ds-textarea,
textarea.pngm-ds-textarea {
  min-height: 120px;
  resize: vertical;
}

.pngm-ds-input:focus,
.pngm-ds-select:focus,
.pngm-ds-textarea:focus,
input.pngm-ds-input:focus,
select.pngm-ds-select:focus,
textarea.pngm-ds-textarea:focus {
  outline: 0;
  border-color: #006b24;
  box-shadow: 0 0 0 3px rgba(0, 107, 36, .15);
}

.pngm-ds-input.is-error,
.pngm-ds-field-error .pngm-ds-input {
  border-color: #c62828;
}

.pngm-ds-input.is-success,
.pngm-ds-field-success .pngm-ds-input {
  border-color: #006b24;
}

.pngm-ds-error {
  margin: 6px 0 0;
  font-size: 12px;
  color: #c62828;
}

.pngm-ds-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: #6b7785;
}


/* --------------------------------------------------------------------------
   Cards / surfaces
   -------------------------------------------------------------------------- */

.pngm-ds-card {
  background: #fff;
  border: 1px solid #e3e8ed;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 12px rgba(16, 24, 40, .04);
}

.pngm-ds-card-pad {
  padding: 16px;
}

.pngm-ds-panel {
  background: #fff;
  border: 1px solid #e3e8ed;
  border-radius: 12px;
}

.pngm-ds-soft {
  background: #e8f5ec;
  border-radius: 12px;
}


/* --------------------------------------------------------------------------
   Badges / status
   -------------------------------------------------------------------------- */

.pngm-ds-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

.pngm-ds-badge-active,
.pngm-ds-badge-success {
  color: #006b24;
  background: #e8f5ec;
}

.pngm-ds-badge-pending,
.pngm-ds-badge-warning {
  color: #8a6a00;
  background: #fff6d6;
}

.pngm-ds-badge-inactive {
  color: #4a5561;
  background: #eef1f4;
}

.pngm-ds-badge-expired,
.pngm-ds-badge-danger {
  color: #b71c1c;
  background: #fdecea;
}

.pngm-ds-badge-premium {
  color: #5c4500;
  background: #ffe082;
}

.pngm-ds-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #006b24;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.pngm-ds-count-alert {
  background: #e30000;
}


/* --------------------------------------------------------------------------
   Account sidebar (mockup IA)
   -------------------------------------------------------------------------- */

.pngm-ds-sidebar {
  background: #fff;
  border: 1px solid #e3e8ed;
  border-radius: 12px;
  padding: 12px 0;
}

.pngm-ds-sidebar-section {
  margin: 8px 0 4px;
  padding: 0 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #6b7785;
}

.pngm-ds-sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 8px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #16202a;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.pngm-ds-sidebar a:hover {
  background: #f4f6f8;
  color: #16202a;
  text-decoration: none;
}

.pngm-ds-sidebar a.active,
.pngm-ds-sidebar a.current {
  background: #e8f5ec;
  color: #006b24;
  box-shadow: inset 3px 0 0 #006b24;
}

.pngm-ds-sidebar a.logout,
.pngm-ds-sidebar a.pngm-ds-logout {
  color: #c62828;
}


/* --------------------------------------------------------------------------
   Empty state
   -------------------------------------------------------------------------- */

.pngm-ds-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 20px;
  background: #fff;
  border: 1px solid #e3e8ed;
  border-radius: 16px;
}

.pngm-ds-empty-art {
  width: 160px;
  max-width: 60%;
  height: auto;
  margin: 0 0 16px;
}

.pngm-ds-empty h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: #16202a;
}

.pngm-ds-empty p {
  margin: 0 0 16px;
  max-width: 420px;
  font-size: 14px;
  line-height: 1.5;
  color: #6b7785;
}

.pngm-ds-empty .pngm-ds-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}


/* --------------------------------------------------------------------------
   Listing card (marketplace)
   -------------------------------------------------------------------------- */

.pngm-ds-listing-card {
  display: block;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e3e8ed;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
  transition: box-shadow .15s ease, border-color .15s ease;
}

.pngm-ds-listing-card:hover {
  border-color: #cfd7df;
  box-shadow: 0 8px 24px rgba(16, 24, 40, .1);
  text-decoration: none;
  color: inherit;
}

.pngm-ds-listing-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #eef1f4;
  overflow: hidden;
}

.pngm-ds-listing-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pngm-ds-listing-body {
  padding: 10px 12px 12px;
}

.pngm-ds-listing-body .pngm-ds-price {
  margin: 0 0 4px;
}

.pngm-ds-listing-body .pngm-ds-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: #16202a;
}

.pngm-ds-photo-count {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}


/* --------------------------------------------------------------------------
   Mobile bottom nav (PWA-ready)
   -------------------------------------------------------------------------- */

#navi-bar.pngm-ds-navi,
.pngm-ds-navi {
  background: #fff;
  border-top: 1px solid #e3e8ed;
  box-shadow: 0 -4px 16px rgba(16, 24, 40, .06);
}

.pngm-ds-navi a.active,
#navi-bar a.active {
  color: #006b24;
}

/* Single + button style: green pill on the SVG only (not on the <a> too). */
.pngm-ds-navi .post,
#navi-bar .post {
  background: transparent !important;
  color: inherit;
  border-radius: 0;
  box-shadow: none !important;
}


/* --------------------------------------------------------------------------
   Utility
   -------------------------------------------------------------------------- */

.pngm-ds-container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.pngm-ds-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pngm-ds-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.pngm-ds-divider {
  height: 1px;
  background: #e3e8ed;
  border: 0;
  margin: 16px 0;
}

@media screen and (max-width: 767px) {
  .pngm-ds-h1,
  .pngm-ds-title {
    font-size: 22px;
  }

  .pngm-ds-card-pad {
    padding: 14px;
  }
}
