:root {
  font-family: Tahoma, Arial, sans-serif;
  color: #173844;
  background: #f3f8f5;
  font-size: 15px;
  line-height: 1.65;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 1rem 5%;
  background: white;
  border-bottom: 1px solid #d6e5dd;
}
header span {
  flex: 1;
}
a {
  color: #075e4f;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
main {
  max-width: 1240px;
  margin: auto;
  padding: 1rem 24px 4rem;
}
h1 {
  font-size: 1.8rem;
  line-height: 1.3;
  margin: 0.3rem 0 1rem;
}
h2 {
  font-size: 1.2rem;
  margin: 0;
}
p {
  color: #4a6569;
  margin: 0.6rem 0;
}
.eyebrow {
  letter-spacing: 0.14em;
  color: #167363;
  font-size: 0.75rem;
  font-weight: bold;
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 1.3rem 0;
}
.panel {
  background: white;
  border: 1px solid #d6e5dd;
  border-radius: 14px;
  padding: 24px;
  margin: 20px 0;
}
.narrow {
  max-width: 480px;
  margin: 3rem auto;
}
.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0.8rem 0;
  font-weight: bold;
}
input,
select,
button {
  font: inherit;
  min-height: 44px;
  border: 1px solid #b9cec5;
  border-radius: 7px;
  padding: 8px 12px;
  color: #173844;
  background: white;
  max-width: 100%;
}
input:focus,
select:focus,
button:focus,
a:focus {
  outline: 3px solid #93c6b2;
  outline-offset: 2px;
}
button {
  cursor: pointer;
}
button.primary {
  background: #075e4f;
  color: white;
  border-color: #075e4f;
  font-weight: bold;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
fieldset {
  border: 1px solid #d6e5dd;
  border-radius: 8px;
  margin: 1rem 0;
  padding: 16px;
}
legend {
  font-weight: bold;
}
.check {
  flex-direction: row;
  align-items: center;
  font-size: 0.9rem;
  font-weight: normal;
}
.check input {
  flex: 0 0 20px;
  min-height: 20px;
}
#notice:not(:empty) {
  padding: 12px 16px;
  background: #e8f4ed;
  border: 1px solid #b9dbca;
  border-radius: 8px;
}
#notice.error {
  background: #fff1ef;
  border-color: #e8aaa0;
  color: #8a2519;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 650px;
}
th,
td {
  border-bottom: 1px solid #d6e5dd;
  padding: 14px 10px;
  text-align: left;
}
th {
  background: #eaf4ee;
  color: #254d43;
  font-size: 0.85rem;
}
.money {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
td small {
  display: block;
  color: #4a6569;
  overflow-wrap: anywhere;
}
.badge {
  display: inline-block;
  background: #eef5f1;
  padding: 4px 10px;
  border-radius: 5px;
  white-space: nowrap;
  font-size: 0.85rem;
}
.badge.pending {
  background: #fff1d4;
  color: #78540c;
}
.badge.rejected {
  background: #ffefec;
  color: #8a2519;
}
dialog {
  border: 1px solid #b9cec5;
  border-radius: 14px;
  max-width: 650px;
  width: calc(100% - 24px);
  padding: 24px;
  color: #173844;
}
dialog::backdrop {
  background: #17384455;
}
.close {
  float: right;
}
dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 16px;
}
dt {
  color: #4a6569;
}
dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.muted {
  font-size: 0.85rem;
}
summary {
  cursor: pointer;
  color: #075e4f;
  padding: 4px 0;
}
summary span {
  display: block;
  font-size: 0.85rem;
  color: #4a6569;
  margin-left: 1rem;
}
.bank-preview,
.bank-note {
  padding: 12px 16px;
  background: #edf6f0;
  border: 1px solid #d6e5dd;
  border-radius: 8px;
  overflow-wrap: anywhere;
}
#bank-dialog-notice:not(:empty) {
  color: #8a2519;
  padding: 10px;
  background: #fff1ef;
  border-radius: 8px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 650px) {
  main {
    padding: 12px;
  }
  .panel {
    padding: 18px 14px;
  }
  .fields {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .intro {
    align-items: flex-start;
    flex-direction: column;
  }
  header {
    padding: 12px;
  }
  header span {
    font-size: 0.85rem;
  }
  .check {
    align-items: flex-start;
  }
  dl {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  dd {
    margin-bottom: 10px;
  }
  button {
    min-height: 46px;
  }
  h1 {
    font-size: 1.5rem;
  }
}

/* Shared approved merchant workspace shell. Login keeps the original isolated
   surface; navigation appears only after the authenticated workspace opens. */
:root { font-family: 'Leelawadee UI','Segoe UI',Tahoma,sans-serif; color: #172c37; background: #f6f8f6; font-size: 14px; }
header { min-height: 76px; background: #fffefa; }
.panel { border-color: #dce5df; border-radius: 10px; padding: 22px; }
h1 { font-size: 26px; } h2 { font-size: 16px; }
button.primary, .primary { background: #14765d; border-color: #14765d; color: white; }
thead, th { background: #f7f5ed; color: #4b6159; }
.shop-sidebar { display: none; position: fixed; top: 0; bottom: 0; left: 0; width: 242px; background: #fff; border-right: 1px solid #dce5df; padding: 0 14px 20px; z-index: 30; overflow-y: auto; }
.shop-sidebar > a { display: block; padding: 10px 12px; border-radius: 7px; font-size: 13px; margin: 3px 0; }
.shop-sidebar > a:hover, .shop-sidebar > a[aria-current=page] { text-decoration: none; color: #0b5744; background: #eaf5ef; }
.shop-sidebar .shop-brand { display: flex; align-items: center; gap: 11px; padding: 18px 6px; border-bottom: 1px solid #dce5df; border-radius: 0; margin-bottom: 20px; }
.shop-brand b { background: #14765d; color: white; width: 38px; height: 38px; border-radius: 9px; text-align: center; font-size: 24px; }
.shop-brand span { font-size: 13px; letter-spacing: .035em; font-weight: bold; color: #172c37; }
.shop-brand small { display: block; font-size: 11px; color: #62737b; letter-spacing: 0; font-weight: normal; }
.shop-nav-label { padding: 10px 12px 3px; font-size: 11px; color: #62737b; }
.shop-sidebar-note { font-size: 11px; border-top: 1px solid #dce5df; margin: 28px 12px; padding-top: 16px; }
.shop-menu-toggle, .shop-menu-backdrop { display: none; }
body:has(#workspace:not([hidden])) .shop-sidebar { display: block; }
body:has(#workspace:not([hidden])) > header { margin-left: 242px; padding: 16px 30px; }
body:has(#workspace:not([hidden])) > main { margin-left: 242px; max-width: none; padding: 10px 30px 40px; }
body:has(#workspace:not([hidden])) header > a { display: none; }
.shop-workspace .intro .actions { display: none; }
.request-payment { margin-top: 22px; border-top: 1px solid #dce5df; padding-top: 18px; }
.request-payment h3, .request-payment h4 { margin: 12px 0; }
.request-payment dl { background: #f4f8f5; padding: 12px; border-radius: 8px; }
.payment-confirmed { background: #e7f5eb; color: #07543f; padding: 12px; font-weight: bold; }
.payment-pending, .payment-hint { background: #fff5df; color: #72510b; padding: 12px; }
.payment-link { display: inline-block; padding: 10px 14px; border: 1px solid #b9cec5; border-radius: 7px; }
.payment-proofs { display: grid; gap: 8px; }
.payment-slip-form, .payout-part { border: 1px solid #dce5df; border-radius: 8px; padding: 14px; margin-top: 16px; }
.payment-upload-notice, .request-payment dd { overflow-wrap: anywhere; }
.request-payment input[type=file] { width: 100%; }
.request-payment button, .request-payment a { white-space: normal; overflow-wrap: anywhere; }
#bank-management, #request-history { scroll-margin-top: 25px; }
@media(max-width:1023px) {
 body:has(#workspace:not([hidden])) > header { margin-left: 0; padding: 12px 20px; }
 body:has(#workspace:not([hidden])) > main { margin-left: 0; padding: 12px 20px 30px; }
 .shop-sidebar { transform: translateX(-100%); transition: transform .18s ease; }
 body:has(#workspace:not([hidden])) .shop-menu-toggle { display: block; }
 body.shop-menu-open .shop-sidebar { transform: translateX(0); }
 .shop-menu-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; width: 100%; height: 100%; background: rgb(23 44 55 / 35%); border: 0; border-radius: 0; z-index: 25; }
}
@media(max-width:600px) {
 body:has(#workspace:not([hidden])) > main { padding: 8px 14px 30px; }
 body:has(#workspace:not([hidden])) > header { padding: 10px 14px; gap: 10px; }
 .panel { padding: 16px; } h1 { font-size: 23px; }
 header span { font-size: 12px; min-width: 0; overflow-wrap: anywhere; }
}
@media(prefers-reduced-motion:reduce) { * { animation:none !important; transition:none !important; scroll-behavior:auto !important; } }
