/* user.css — "HugeSMM" clone theme: bright orange + white + warm cream. */
:root {
  --org: #f26522;
  --org-dark: #d9531a;
  --org-light: #ff8a3d;
  --org-soft: #fff0e6;
  --yellow: #ffc107;
  --bg: #fff9f5;
  --card: #ffffff;
  --border: #f3e2d3;
  --text: #2d2a26;
  --muted: #a89a8d;
  --blue: #1d9bf0;
  --blue-soft: #e3f3fd;
  --cyan: #22d3ee;
  --green: #25d366;
  --red: #e5484d;
  --radius: 12px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
}
a { color: var(--org); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- header ---------- */
.u-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 70;
}
.u-logo { font-size: 1.7rem; font-weight: 900; letter-spacing: 0.02em; }
.u-logo .l1 { color: var(--yellow); }
.u-logo .l2 { color: #111; }
.u-logo:hover { text-decoration: none; }
.u-burger {
  background: #fff;
  border: 2px solid var(--org);
  border-radius: 8px;
  width: 46px; height: 42px;
  cursor: pointer;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px;
}
.u-burger span { display: block; width: 22px; height: 3px; background: var(--org); border-radius: 2px; }
.u-head-right { display: flex; align-items: center; gap: 10px; }

/* ---------- slide-in menu ---------- */
.u-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.35);
  opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 90;
}
.u-overlay.open { opacity: 1; pointer-events: auto; }
.u-drawer {
  position: fixed; top: 0; right: -300px; width: 280px; max-width: 85vw; height: 100vh;
  background: #fff; z-index: 100; transition: right .28s ease;
  overflow-y: auto; padding: 18px 0 40px;
  box-shadow: -4px 0 24px rgba(0,0,0,0.12);
}
.u-drawer.open { right: 0; }
.u-drawer .d-head { display: flex; align-items: center; justify-content: space-between; padding: 0 18px 14px; border-bottom: 1px solid var(--border); }
.u-drawer .d-close { background: none; border: none; font-size: 1.6rem; color: var(--muted); cursor: pointer; }
.u-menu { list-style: none; padding: 8px 0; }
.u-menu a {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 20px; color: #e08a5a; font-size: 1.02rem; font-weight: 600;
}
.u-menu a:hover { text-decoration: none; background: var(--org-soft); }
.u-menu a.active { color: var(--org); background: var(--org-soft); border-right: 4px solid var(--org); }
.u-menu .m-ico { width: 26px; text-align: center; font-size: 1.15rem; }
.u-menu .tick-badge {
  background: var(--org); color: #fff; font-size: 0.75rem; font-weight: 800;
  border-radius: 999px; padding: 1px 9px; margin-left: 6px;
}
.u-drawer .d-section { border-top: 1px solid var(--border); margin-top: 8px; padding: 14px 20px; }
.u-drawer .d-label { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }

/* ---------- pills / dropdowns ---------- */
.balance-pill {
  display: inline-block;
  background: var(--org); color: #fff;
  padding: 6px 16px; border-radius: 999px;
  font-weight: 800; font-size: 0.95rem; white-space: nowrap;
}
.cur-sel {
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px;
  background: #fff; color: var(--org); font-weight: 700; cursor: pointer;
}
.u-user { position: relative; }
.u-user-btn {
  background: none; border: none; cursor: pointer;
  color: #e08a5a; font-weight: 700; font-size: 0.98rem;
  display: flex; align-items: center; gap: 6px;
}
.u-user-menu {
  display: none; position: absolute; right: 0; top: 130%;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12); min-width: 170px; z-index: 60; overflow: hidden;
}
.u-user.open .u-user-menu { display: block; }
.u-user-menu a, .u-user-menu button {
  display: block; width: 100%; text-align: left; padding: 11px 16px;
  color: var(--text); font-size: 0.93rem; background: none; border: none; cursor: pointer;
}
.u-user-menu a:hover, .u-user-menu button:hover { background: var(--org-soft); text-decoration: none; }

/* ---------- layout ---------- */
.u-container { max-width: 860px; margin: 0 auto; padding: 20px 14px 90px; }
.u-footer { text-align: center; color: var(--muted); font-size: 0.8rem; padding: 22px; }

/* ---------- cards / stats ---------- */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(242,101,34,0.06);
}
.stat-cards { display: grid; gap: 12px; margin-bottom: 18px; }
.stat-card {
  background: linear-gradient(135deg, var(--org-light), var(--org) 60%, var(--org-dark));
  border-radius: 14px; padding: 22px 20px; color: #fff;
  box-shadow: 0 4px 14px rgba(242,101,34,0.3);
}
.stat-card .s-label { font-size: 1.35rem; font-weight: 500; opacity: 0.95; }
.stat-card .s-value { font-size: 1.6rem; font-weight: 400; text-align: right; margin-top: 10px; letter-spacing: 0.02em; }
.notice-card { text-align: center; color: #6b6b6b; font-size: 1.02rem; line-height: 1.5; }
.notice-card .join-link { color: var(--blue); font-weight: 700; }

/* ---------- buttons / forms ---------- */
.btn {
  display: inline-block; background: var(--org); color: #fff; border: none;
  padding: 12px 26px; border-radius: 999px; font-size: 1rem; font-weight: 700;
  cursor: pointer; text-align: center;
}
.btn:hover { background: var(--org-dark); text-decoration: none; color: #fff; }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 700; font-size: 1.02rem; }
input[type="text"], input[type="password"], input[type="email"],
input[type="number"], input[type="url"], select, textarea {
  width: 100%; padding: 12px 14px; background: #fff;
  border: 1px solid #e5d9cd; border-radius: 10px;
  color: var(--text); font-size: 1rem;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--org); box-shadow: 0 0 0 3px rgba(242,101,34,0.12); }
textarea { min-height: 100px; resize: vertical; }
.muted, p.muted { color: var(--muted); }
.hint { font-size: 0.85rem; color: var(--muted); font-weight: 400; }
.charge-big { font-size: 1.5rem; font-weight: 800; color: var(--org); }

/* ---------- service detail card ---------- */
.svc-detail {
  background: #fff; border: 1px solid #f0e2d6; border-left: 4px solid var(--org);
  border-radius: 12px; padding: 12px 14px; margin: 10px 0 16px; font-size: 0.82rem;
  box-shadow: 0 2px 10px rgba(242,101,34,0.07);
}
.svc-detail .row { display: flex; gap: 8px; margin-bottom: 6px; align-items: baseline; flex-wrap: wrap; }
.svc-detail .row:last-child { margin-bottom: 0; }
.svc-detail .k { color: var(--org); font-weight: 700; min-width: 72px; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.03em; }
.id-pill {
  display: inline-block; background: var(--org); color: #fff;
  border-radius: 999px; padding: 2px 12px; font-weight: 800; font-size: 0.85rem;
}

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.cat-row td {
  background: var(--cyan); color: #fff; font-weight: 800; font-size: 1rem;
  padding: 10px 12px;
}
.searchbar { display: flex; gap: 8px; margin-bottom: 14px; }
.searchbar input { flex: 1; }
.filter-row { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.filter-row select { flex: 1; min-width: 130px; }
.filter-row input { flex: 2; min-width: 150px; }

/* ---------- badges / alerts ---------- */
.badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.badge-pending, .badge-processing, .badge-in_progress, .badge-open { background: #fdf0dc; color: #d99413; }
.badge-completed, .badge-approved, .badge-answered { background: #e2f7e9; color: #1d9d4b; }
.badge-canceled, .badge-rejected, .badge-failed, .badge-closed { background: #fde3e4; color: #d33; }
.badge-partial { background: #ede9fe; color: #7c3aed; }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 0.95rem; }
.alert-success { background: #e2f7e9; border: 1px solid #b9e8c7; color: #1d7d3c; }
.alert-error { background: #fde3e4; border: 1px solid #f5b5b8; color: #c22; }

/* ---------- auth ---------- */
.auth-wrap { max-width: 420px; margin: 30px auto; }
.auth-logo { text-align: center; font-size: 2.2rem; font-weight: 900; margin-bottom: 18px; }
.auth-logo .l1 { color: var(--yellow); } .auth-logo .l2 { color: #111; }

/* ---------- tickets ---------- */
.ticket-msg { border-left: 4px solid var(--border); background: #fffdfb; padding: 10px 14px; margin-bottom: 10px; border-radius: 0 10px 10px 0; }
.ticket-msg.admin-msg { border-left-color: var(--org); }
.ticket-meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 4px; }

/* ---------- pay method cards ---------- */
.pay-card { border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 10px; background: #fffdfb; }
.pay-card .p-name { font-weight: 800; font-size: 1.05rem; }
.pay-card code { background: var(--org-soft); color: var(--org-dark); padding: 2px 8px; border-radius: 6px; font-weight: 700; }

/* ---------- whatsapp float ---------- */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 80;
  width: 62px; height: 62px; border-radius: 50%;
  background: var(--green); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,0.45);
}
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 34px; height: 34px; fill: #fff; }

/* ---------- toast ---------- */
.u-toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px);
  background: #2d2a26; color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 0.9rem; opacity: 0; pointer-events: none; transition: all .25s; z-index: 200;
}
.u-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

h1 { font-size: 1.45rem; margin-bottom: 14px; }
h2 { font-size: 1.15rem; margin: 0 0 12px; }
h3 { font-size: 1.02rem; margin: 14px 0 8px; }
code { background: var(--org-soft); padding: 2px 6px; border-radius: 4px; font-size: 0.85rem; }

@media (min-width: 700px) {
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .u-container { padding: 28px 20px 90px; }
}
@media (max-width: 560px) {
}

/* Custom dropdowns with brand icons (new order page) */
.dd { position: relative; }
.dd-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #fff; border: 1.5px solid #e8ddd6; border-radius: 10px; padding: 9px 12px; font-size: 0.85rem; cursor: pointer; color: #222; }
.dd-btn:hover { border-color: #f26522; }
.dd-btn .dd-sel { display: flex; align-items: center; gap: 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dd-arrow { color: #b7a99e; font-size: 0.85rem; flex: none; }
.dd-panel { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1.5px solid #e8ddd6; border-radius: 12px; max-height: 320px; overflow-y: auto; z-index: 60; display: none; box-shadow: 0 12px 32px rgba(0,0,0,.14); }
.dd.open .dd-panel { display: block; }
.dd-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; font-size: 0.82rem; color: #333; }
.dd-item:hover { background: #fff3ec; }
.dd-item.active { background: #ffe9dd; }
.dd-item .rate { margin-left: auto; color: var(--org); font-size: 0.8rem; font-weight: 800; white-space: nowrap; background: #fff3ec; padding: 3px 9px; border-radius: 999px; }
.plat-icon { flex: none; border-radius: 5px; vertical-align: -4px; }

/* ---------- mobile fit & alignment fixes ---------- */
html, body { overflow-x: hidden; max-width: 100vw; }
.u-container { overflow-x: hidden; }
img { max-width: 100%; }
table { border-collapse: collapse; }
.table-wrap table { min-width: 560px; }
@media (max-width: 699px) {
  .stat-card { padding: 16px; }
  .stat-card .s-label { font-size: 1.05rem; }
  .stat-card .s-value { font-size: 1.25rem; word-break: break-all; }
  .charge-big { font-size: 1.4rem; word-break: break-all; }
  .svc-detail .row { flex-wrap: wrap; gap: 4px; }
  .svc-detail strong { word-break: break-word; }
  .dd-item { font-size: 0.85rem; padding: 10px 12px; }
  .dd-item .rate { font-size: 0.72rem; }
  .card { padding: 14px; }
  .btn-block { width: 100%; }
  h1, h2 { word-break: break-word; }
}

/* ---------- header fit fixes (burger was pushed off-screen) ---------- */
.u-header { overflow-x: clip; overflow-y: visible; }
.u-head-right { min-width: 0; flex-shrink: 1; }
.u-user { min-width: 0; flex-shrink: 1; }
.u-user-btn { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; }
.u-burger { flex: none; }
.balance-pill { flex: none; }
.u-logo { flex: none; }
@media (max-width: 699px) {
  .u-header { padding: 10px 12px; gap: 6px; }
  .u-logo { font-size: 1.2rem; line-height: 1.1; }
  .u-head-right { gap: 6px; }
  .u-user-btn { max-width: 86px; font-size: 0.78rem; }
  .balance-pill { font-size: 0.78rem; padding: 5px 10px; }
  .u-burger { width: 40px; height: 38px; }
  .u-burger span { width: 18px; }
}

/* ---------- compact service detail card + smart avg time ---------- */
.svc-detail strong { font-size: 0.85rem; font-weight: 700; line-height: 1.35; color: #222; }
.svc-detail .id-pill { font-size: 0.7rem; padding: 2px 9px; }
.avg-time { background: #fff8f3; border: 1.5px solid #f0e2d6; border-left: 4px solid var(--org); border-radius: 12px; padding: 12px 14px; font-size: 0.88rem; color: #6b5f54; font-weight: 600; }

/* ---------- profile page ---------- */
.page-head { margin-bottom: 16px; }
.page-head h1 { font-size: 1.4rem; margin-bottom: 4px; }
.info-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f3ece5; font-size: 0.92rem; }
.info-row:last-child { border-bottom: none; }
.info-row .k { color: #8a7a6c; font-weight: 600; }
.status-pill { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 0.78rem; font-weight: 800; }
.status-pill.active { background: #e7f9ee; color: #1d9e4b; }
.btn-danger { background: #e5484d !important; }
.btn-danger:hover { background: #c93a3f !important; }

/* ---------- enriched dashboard ---------- */
.dash-welcome { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.dash-welcome h1 { margin: 0 0 4px; font-size: 1.35rem; }
.dash-welcome .dw-text p { margin: 0; font-size: 0.9rem; }
.dash-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.dash-stat { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: flex; gap: 12px; align-items: center; box-shadow: 0 2px 10px rgba(242,101,34,0.06); min-width: 0; }
.ds-ico { font-size: 1.5rem; background: var(--org-soft); width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: none; }
.ds-body { min-width: 0; }
.ds-label { font-size: 0.72rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.ds-value { font-size: 1.12rem; font-weight: 800; color: var(--text); overflow-wrap: anywhere; }
.dash-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.dash-action { background: var(--org-soft); border: 1px solid var(--border); border-radius: 14px; padding: 14px 6px; text-align: center; font-weight: 700; font-size: 0.82rem; color: var(--text); display: flex; flex-direction: column; gap: 6px; align-items: center; transition: transform .12s ease; }
.dash-action span { font-size: 1.5rem; }
.dash-action:hover { background: #ffe4d2; text-decoration: none; transform: translateY(-1px); }
.dash-sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.dash-sec-head h2 { margin: 0; }
.dash-order { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid #f6ece3; }
.dash-order:last-child { border-bottom: none; }
.do-main { display: flex; gap: 10px; align-items: center; min-width: 0; }
.do-info { display: flex; flex-direction: column; min-width: 0; }
.do-info strong { font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.do-info .muted { font-size: 0.78rem; }
@media (max-width: 420px) {
  .dash-actions { grid-template-columns: repeat(2, 1fr); }
  .dash-welcome h1 { font-size: 1.2rem; }
}

/* ---------- form loading states (spinner) ---------- */
.btn-spin { display: inline-block; width: 15px; height: 15px; border: 2.5px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: btnSpin .7s linear infinite; vertical-align: -3px; margin-right: 7px; opacity: .9; }
@keyframes btnSpin { to { transform: rotate(360deg); } }
button[type="submit"]:disabled, input[type="submit"]:disabled { cursor: wait; opacity: .8; }

/* ---------- service detail card polish ---------- */
.svc-detail { overflow-wrap: anywhere; }
.svc-detail .row:first-child { align-items: center; gap: 10px; }
.svc-detail .row:first-child strong { flex: 1; min-width: 0; }

/* ---------- header balance pill: never overflow on 360px ---------- */
@media (max-width: 699px) {
  .balance-pill { max-width: 34vw; overflow: hidden; text-overflow: ellipsis; }
}

/* ---------- API docs page ---------- */
.api-doc h4 { margin: 16px 0 6px; font-size: 0.95rem; color: var(--org); }
.api-doc h4:first-child { margin-top: 0; }
.api-doc pre { background: #1a2233; color: #9fe8b8; padding: 12px 14px; border-radius: 10px; overflow-x: auto; font-size: 0.78rem; line-height: 1.5; }

/* ---------- mobile orders: card layout instead of cramped table ---------- */
@media (max-width: 699px) {
  #orderTable, #orderTable tbody, #orderTable tr, #orderTable td { display: block; width: 100%; box-sizing: border-box; }
  #orderTable thead { display: none; }
  #orderTable tr { background: #fff; border: 1.5px solid var(--border); border-radius: 14px; margin-bottom: 12px; padding: 12px 14px; }
  #orderTable td { border: none; padding: 4px 0; }
  #orderTable td:before { content: attr(data-label); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); display: block; margin-bottom: 2px; }
  .filter-row .btn { width: 100%; }
}
