@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600&display=swap');

/* =====================================================
   Pali Help Desk — Frontend CSS  v1.0.2
   Font: Kanit — centered layout
   ===================================================== */

:root {
  --phd-gold:   #c9a227;
  --phd-card:   #161b2e;
  --phd-border: rgba(255,255,255,.12);
  --phd-text:   #e2e8f0;
  --phd-muted:  rgba(255,255,255,.5);
  --phd-radius: 8px;
  --phd-font:   'Kanit', sans-serif;
}

/* ── Outer wrapper — centering ── */
.phd-outer {
  width: 100%;
  padding: 40px 20px 60px;
  box-sizing: border-box;
}

/* ── Inner container ── */
.phd-page {
  font-family: var(--phd-font);
  color: var(--phd-text);
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Page Header */
.phd-page-header {
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--phd-border);
}
.phd-page-title {
  font-family: var(--phd-font);
  font-size: 1.6rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 8px;
  letter-spacing: .2px;
  line-height: 1.3;
}
.phd-page-sub {
  font-family: var(--phd-font);
  font-size: .88rem;
  font-weight: 300;
  color: var(--phd-muted);
  margin: 0;
  line-height: 1.75;
}

/* ── Buttons ── */
.phd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: var(--phd-font);
  font-weight: 500;
  font-size: .88rem;
  padding: 10px 22px;
  border-radius: var(--phd-radius);
  border: none;
  cursor: pointer;
  text-decoration: none !important;
  transition: all .2s;
  letter-spacing: .2px;
  line-height: 1.4;
}
.phd-btn-primary  { background: var(--phd-gold); color: #1a1200 !important; }
.phd-btn-primary:hover  { background: #b8920f; color: #1a1200 !important; transform: translateY(-1px); }
.phd-btn-secondary { background: rgba(255,255,255,.08); color: var(--phd-text) !important; border: 1px solid var(--phd-border); }
.phd-btn-secondary:hover { background: rgba(255,255,255,.14); color: #fff !important; }
.phd-btn-outline { background: transparent; color: var(--phd-gold) !important; border: 1px solid rgba(201,162,39,.4); }
.phd-btn-outline:hover { background: rgba(201,162,39,.1); border-color: var(--phd-gold); }
.phd-btn-full { width: 100%; padding: 13px 22px; font-size: .95rem; }
.phd-btn-sm   { padding: 7px 16px; font-size: .82rem; }

/* ── Forms ── */
.phd-form { max-width: 680px; }
.phd-form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.phd-field { margin-bottom: 18px; }
.phd-label {
  display: block;
  font-family: var(--phd-font);
  font-size: .83rem;
  font-weight: 500;
  color: rgba(255,255,255,.65);
  margin-bottom: 7px;
}
.phd-req { color: #ef4444; }
.phd-input {
  width: 100%;
  background: var(--phd-card);
  border: 1px solid var(--phd-border);
  border-radius: var(--phd-radius);
  color: var(--phd-text);
  font-family: var(--phd-font);
  font-size: .9rem;
  font-weight: 300;
  padding: 10px 14px;
  transition: border-color .2s;
  box-sizing: border-box;
  outline: none;
  appearance: none;
}
.phd-input:focus { border-color: var(--phd-gold); }
.phd-input::placeholder { color: rgba(255,255,255,.22); }
.phd-input option { background: #161b2e; }
.phd-textarea { resize: vertical; min-height: 120px; }
.phd-form-footer { margin-top: 6px; }

/* ── Success ── */
.phd-success {
  text-align: center;
  padding: 40px 24px;
  background: var(--phd-card);
  border-radius: 12px;
  border: 1px solid rgba(16,185,129,.2);
  max-width: 500px;
  margin: 0 auto;
}
.phd-success-icon  { font-size: 3rem; margin-bottom: 14px; }
.phd-success-title { font-family: var(--phd-font); font-size: 1.25rem; font-weight: 600; color: #fff; margin: 0 0 10px; }
.phd-success-desc  { font-family: var(--phd-font); font-size: .88rem; font-weight: 300; color: var(--phd-muted); line-height: 1.7; margin: 0 0 6px; }
.phd-success-desc strong { color: var(--phd-gold); font-weight: 600; }

/* ── FAQ ── */
.phd-faq-group { margin-bottom: 28px; }
.phd-faq-cat {
  font-family: var(--phd-font);
  font-size: .75rem;
  font-weight: 600;
  color: var(--phd-gold);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.phd-accordion {
  border: 1px solid var(--phd-border);
  border-radius: var(--phd-radius);
  margin-bottom: 6px;
  overflow: hidden;
  transition: border-color .2s;
}
.phd-accordion:hover { border-color: rgba(255,255,255,.22); }
.phd-acc-btn {
  width: 100%;
  background: var(--phd-card);
  border: none;
  color: var(--phd-text);
  font-family: var(--phd-font);
  font-size: .9rem;
  font-weight: 400;
  padding: 15px 18px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  gap: 12px;
  transition: background .2s;
}
.phd-acc-btn:hover { background: rgba(255,255,255,.05); }
.phd-acc-btn.open  { color: var(--phd-gold); }
.phd-acc-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  transition: transform .25s;
  color: var(--phd-muted);
}
.phd-acc-btn.open .phd-acc-icon { transform: rotate(180deg); color: var(--phd-gold); }
.phd-acc-body {
  display: none;
  padding: 14px 18px 16px;
  background: rgba(255,255,255,.02);
  font-family: var(--phd-font);
  font-size: .875rem;
  font-weight: 300;
  color: rgba(255,255,255,.75);
  line-height: 1.85;
  border-top: 1px solid var(--phd-border);
}
.phd-faq-cta {
  margin-top: 24px;
  padding: 20px 24px;
  background: var(--phd-card);
  border-radius: 10px;
  border: 1px solid var(--phd-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.phd-faq-cta p { font-family: var(--phd-font); font-size: .9rem; font-weight: 300; color: var(--phd-muted); margin: 0; }

/* ── Ticket Tracking ── */
.phd-track-form   { max-width: 600px; }
.phd-track-result {
  margin-top: 24px;
  background: var(--phd-card);
  border: 1px solid var(--phd-border);
  border-radius: 12px;
  padding: 22px 24px;
}
.phd-track-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--phd-border);
}
.phd-track-subject { font-family: var(--phd-font); font-size: 1.05rem; font-weight: 500; color: #fff; margin: 0 0 4px; }
.phd-track-meta    { font-family: var(--phd-font); font-size: .78rem; font-weight: 300; color: var(--phd-muted); }
.phd-status-badge  {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-family: var(--phd-font);
  font-size: .78rem; font-weight: 500;
  letter-spacing: .3px;
  white-space: nowrap;
}
.phd-track-messages { margin: 14px 0; }
.phd-track-msg {
  margin-bottom: 10px;
  padding: 12px 16px;
  border-radius: var(--phd-radius);
  font-family: var(--phd-font);
  font-size: .86rem;
  font-weight: 300;
  line-height: 1.7;
}
.phd-track-msg.user  { background: rgba(59,130,246,.08); border-left: 3px solid #3b82f6; }
.phd-track-msg.admin { background: rgba(16,185,129,.08); border-left: 3px solid #10b981; }
.phd-track-msg-meta  { font-size: .75rem; font-weight: 400; color: var(--phd-muted); margin-bottom: 6px; }
.phd-reply-area { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--phd-border); }

/* ── Satisfaction ── */
.phd-satisfaction { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--phd-border); }
.phd-sat-title { font-family: var(--phd-font); font-size: .88rem; font-weight: 500; color: rgba(255,255,255,.7); margin-bottom: 10px; }
.phd-stars { display: flex; gap: 8px; margin-bottom: 12px; }
.phd-star { font-size: 1.8rem; cursor: pointer; opacity: .3; transition: opacity .15s, transform .1s; line-height: 1; }
.phd-star.active { opacity: 1; }
.phd-star:hover  { transform: scale(1.15); }

/* ── Widget ── */
.phd-widget {
  background: var(--phd-card);
  border: 1px solid var(--phd-border);
  border-radius: 12px;
  padding: 22px 24px;
  font-family: var(--phd-font);
  max-width: 600px;
}
.phd-widget-header { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.phd-widget-icon-wrap {
  width: 48px; height: 48px;
  border-radius: 10px;
  background: rgba(201,162,39,.12);
  display: flex; align-items: center; justify-content: center;
  color: var(--phd-gold); flex-shrink: 0;
}
.phd-widget-title    { font-size: .85rem; font-weight: 400; color: var(--phd-muted); }
.phd-widget-subtitle { font-size: 1.05rem; font-weight: 600; color: #fff; letter-spacing: .2px; }
.phd-widget-desc  { font-size: .84rem; font-weight: 300; color: var(--phd-muted); line-height: 1.7; margin: 0 0 16px; }
.phd-widget-btns  { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Empty ── */
.phd-empty { text-align: center; padding: 40px 24px; color: var(--phd-muted); font-family: var(--phd-font); font-weight: 300; }
.phd-empty-icon { font-size: 2.5rem; margin-bottom: 12px; }
.phd-empty p { font-size: .9rem; margin: 0; }

/* ── All-in-one sections ── */
.phd-allinone .phd-section { padding: 4px 0; }
.phd-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--phd-border), transparent);
  margin: 44px 0;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .phd-outer { padding: 24px 16px 40px; }
  .phd-form-grid-2 { grid-template-columns: 1fr; }
  .phd-page-title  { font-size: 1.35rem; }
  .phd-faq-cta     { flex-direction: column; }
  .phd-widget-btns { flex-direction: column; }
  .phd-widget-btns .phd-btn { justify-content: center; }
}

/* =====================================================
   Support Panel — มืออาชีพ ดำ-ทอง
   ===================================================== */
.phd-panel-outer { padding: 0 20px 60px; }
.phd-panel {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  font-family: var(--phd-font);
  color: var(--phd-text);
}

/* Hero */
.phd-hero {
  text-align: center;
  padding: 48px 24px 40px;
  margin-bottom: 32px;
}
.phd-hero-icon {
  width: 76px; height: 76px;
  margin: 0 auto 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(212,160,23,.18), rgba(201,162,39,.08));
  border: 1px solid rgba(212,160,23,.3);
  display: flex; align-items: center; justify-content: center;
  color: #d4a017;
}
.phd-hero-title {
  font-family: var(--phd-font);
  font-size: 2rem; font-weight: 600;
  color: #fff; margin: 0 0 12px;
  letter-spacing: .3px;
}
.phd-hero-title span { color: #d4a017; }
.phd-hero-sub {
  font-size: .98rem; font-weight: 300;
  color: var(--phd-muted);
  max-width: 560px; margin: 0 auto;
  line-height: 1.75;
}

/* Action cards */
.phd-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 44px;
}
.phd-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--phd-card);
  border: 1px solid var(--phd-border);
  border-radius: 14px;
  padding: 22px 24px;
  text-decoration: none !important;
  transition: all .22s;
  position: relative;
  overflow: hidden;
}
.phd-card::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: transparent;
  transition: background .22s;
}
.phd-card:hover {
  transform: translateY(-3px);
  border-color: rgba(212,160,23,.4);
  box-shadow: 0 12px 32px rgba(0,0,0,.35);
}
.phd-card:hover::before { background: #d4a017; }
.phd-card-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.phd-ci-blue   { background: rgba(59,130,246,.14);  color: #60a5fa; }
.phd-ci-gold   { background: rgba(212,160,23,.16);  color: #d4a017; }
.phd-ci-green  { background: rgba(16,185,129,.14);  color: #34d399; }
.phd-ci-purple { background: rgba(139,92,246,.14);  color: #a78bfa; }
.phd-card-body { flex: 1; min-width: 0; }
.phd-card-title {
  font-size: 1.05rem; font-weight: 500;
  color: #fff; margin-bottom: 4px;
}
.phd-card-desc {
  font-size: .84rem; font-weight: 300;
  color: var(--phd-muted); line-height: 1.5;
}
.phd-card-tag {
  font-size: .72rem; font-weight: 500;
  color: var(--phd-muted);
  background: rgba(255,255,255,.06);
  padding: 4px 12px; border-radius: 20px;
  white-space: nowrap;
  align-self: flex-start;
}
.phd-card-tag.phd-tag-gold { background: rgba(212,160,23,.15); color: #d4a017; }

/* Section head with badge */
.phd-section-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--phd-border);
}
.phd-section-title {
  font-size: 1.4rem; font-weight: 600;
  color: #fff; margin: 0;
}
.phd-section-badge {
  font-size: .78rem; font-weight: 500;
  color: #d4a017;
  background: rgba(212,160,23,.14);
  padding: 4px 14px; border-radius: 20px;
}

/* My Tickets table */
.phd-table-wrap {
  background: var(--phd-card);
  border: 1px solid var(--phd-border);
  border-radius: 12px;
  overflow: hidden;
}
.phd-table { width: 100%; border-collapse: collapse; }
.phd-table thead th {
  background: rgba(255,255,255,.03);
  text-align: left;
  font-size: .78rem; font-weight: 600;
  color: var(--phd-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--phd-border);
}
.phd-th-c { text-align: center !important; }
.phd-table tbody td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  font-size: .9rem; font-weight: 300;
  vertical-align: middle;
}
.phd-table tbody tr:last-child td { border-bottom: none; }
.phd-ticket-row { cursor: pointer; transition: background .15s; }
.phd-ticket-row:hover { background: rgba(212,160,23,.05); }
.phd-tk-subject { color: #fff; font-weight: 400; margin-bottom: 3px; }
.phd-tk-no { font-size: .76rem; color: var(--phd-muted); }
.phd-tk-date { color: var(--phd-muted); font-size: .84rem; }
.phd-table-hint {
  font-size: .82rem; font-weight: 300;
  color: var(--phd-muted);
  margin: 14px 4px 0;
}

/* Responsive */
@media (max-width: 700px) {
  .phd-cards { grid-template-columns: 1fr; }
  .phd-hero-title { font-size: 1.55rem; }
  .phd-hero { padding: 32px 16px 28px; }
  .phd-table thead { display: none; }
  .phd-table tbody td { display: block; padding: 6px 16px; border: none; }
  .phd-ticket-row { display: block; padding: 12px 0; border-bottom: 1px solid var(--phd-border); }
  .phd-th-c { text-align: left !important; }
}
