/* arp_style.css — friend · arpakorn.com */
@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;600;700&family=Kanit:wght@400;600;700;800&display=swap');

:root {
  --gold:        #c8960a;
  --gold-light:  #f5d87a;
  --gold-dim:    #9a7208;
  --brown:       #3d1f00;
  --brown-mid:   #6b3a0e;
  --cream:       #fdf6e3;
  --cream-dark:  #f5ead0;
  --bg:          #1c0d00;
  --text:        #2d1500;
  --text-muted:  #7a4a18;
  --link:        #8b3a00;
  --link-hover:  #c85000;
  /* friend content accent */
  --teal:        #1a6b6b;
  --teal-light:  #e6f4f4;
  --teal-mid:    #2a9090;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Sarabun', Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── HEADER ──────────────────────────────────── */
.site-header {
  background: linear-gradient(160deg, #1c0800 0%, #4a2000 45%, #2a1000 100%);
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 3px 20px rgba(0,0,0,.6);
}
.header-top {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px 10px;
}
.header-top img {
  width: 64px; height: 64px; border-radius: 50%;
  border: 2px solid rgba(197,150,10,.7);
  object-fit: cover; box-shadow: 0 0 16px rgba(197,150,10,.3);
  flex-shrink: 0;
}
.header-titles h1 {
  font-family: 'Kanit', sans-serif; font-weight: 800;
  font-size: clamp(0.95rem, 3.5vw, 1.4rem);
  color: var(--gold-light); line-height: 1.25;
  text-shadow: 0 1px 8px rgba(0,0,0,.5);
}
.header-titles .sub {
  font-size: 0.77rem; color: rgba(245,216,122,.5); margin-top: 3px; line-height: 1.5;
}
.header-nav {
  background: rgba(0,0,0,.3);
  border-top: 1px solid rgba(197,150,10,.2);
  padding: 0 12px;
  display: flex; flex-wrap: wrap; gap: 0; align-items: center;
}
.header-nav a {
  color: rgba(245,216,122,.8); text-decoration: none;
  font-family: 'Kanit', sans-serif; font-size: 0.75rem; font-weight: 600;
  padding: 7px 10px; white-space: nowrap; border-radius: 4px;
  transition: background .15s, color .15s;
}
.header-nav a:hover, .header-nav a.active {
  background: rgba(197,150,10,.2); color: var(--gold-light);
}
.header-nav .sep { color: rgba(197,150,10,.25); padding: 0 2px; font-size: 0.7rem; user-select: none; }
.header-date {
  background: rgba(197,150,10,.08);
  border-top: 1px solid rgba(197,150,10,.15);
  padding: 5px 20px; font-size: 0.73rem;
  color: rgba(245,216,122,.45); text-align: right;
  font-family: 'Kanit', sans-serif;
}

/* ── MAIN ────────────────────────────────────── */
.site-main {
  flex: 1; padding: 20px 16px 28px;
  max-width: 1000px; margin: 0 auto; width: 100%;
}

/* ── CONTENT CARD ────────────────────────────── */
.content-card {
  background: var(--cream);
  border-radius: 16px;
  padding: 22px 20px;
  border: 1px solid rgba(197,150,10,.2);
  box-shadow: 0 4px 24px rgba(0,0,0,.2);
  margin-bottom: 16px;
  position: relative; overflow: hidden;
}
.content-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--teal-mid), var(--gold-dim), var(--teal-mid), var(--teal));
}
.card-title {
  font-family: 'Kanit', sans-serif; font-weight: 700;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: var(--teal); margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(26,107,107,.15);
  display: flex; align-items: center; gap: 10px;
}

/* ── SEARCH BAR ──────────────────────────────── */
.search-bar {
  background: var(--teal-light);
  border: 1px solid rgba(26,107,107,.25);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}
.search-bar select, .search-bar input[type=text] {
  font-family: 'Sarabun', sans-serif;
  font-size: 0.88rem;
  padding: 5px 10px;
  border: 1px solid rgba(26,107,107,.3);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  margin: 2px 4px;
}
.search-bar input[type=submit], .btn {
  font-family: 'Kanit', sans-serif;
  font-size: 0.88rem; font-weight: 700;
  padding: 6px 18px;
  background: linear-gradient(135deg, var(--teal), var(--teal-mid));
  color: #fff; border: none; border-radius: 8px;
  cursor: pointer; margin: 2px 4px;
  transition: opacity .2s;
}
.search-bar input[type=submit]:hover, .btn:hover { opacity: 0.85; }

/* ── TABLE ───────────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.friend-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.88rem; min-width: 540px;
}
table.friend-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(26,107,107,.1);
  vertical-align: middle;
}
table.friend-table tr:nth-child(even) td { background: rgba(230,244,244,.5); }
table.friend-table tr:hover td { background: rgba(42,144,144,.08); }
table.friend-table .th-row td {
  background: var(--teal) !important;
  color: #fff; font-family: 'Kanit', sans-serif;
  font-weight: 700; font-size: 0.85rem; text-align: center;
}
table.friend-table td img { max-width: 46px; height: auto; }
table.friend-table a { color: var(--link); text-decoration: none; font-weight: 600; }
table.friend-table a:hover { color: var(--link-hover); text-decoration: underline; }

/* ── FORM ────────────────────────────────────── */
.form-wrap {
  background: var(--teal-light);
  border: 1px solid rgba(26,107,107,.2);
  border-radius: 12px; padding: 20px 22px;
}
.form-row { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.form-row label {
  font-family: 'Kanit', sans-serif; font-weight: 600;
  font-size: 0.9rem; color: var(--teal); min-width: 130px; text-align: right;
}
.form-row input[type=text], .form-row input[type=password],
.form-row select, .form-row textarea {
  font-family: 'Sarabun', sans-serif; font-size: 0.9rem;
  padding: 7px 12px; border: 1px solid rgba(26,107,107,.3);
  border-radius: 8px; background: #fff; color: var(--text);
  flex: 1; min-width: 180px;
}
.form-row textarea { min-height: 80px; resize: vertical; }
.form-submit {
  text-align: center; margin-top: 16px;
}
.form-submit input[type=submit], .form-submit button {
  font-family: 'Kanit', sans-serif; font-size: 1rem; font-weight: 700;
  padding: 10px 36px;
  background: linear-gradient(135deg, var(--teal), var(--teal-mid));
  color: #fff; border: none; border-radius: 50px; cursor: pointer;
  box-shadow: 0 4px 16px rgba(26,107,107,.3);
  transition: transform .2s, box-shadow .2s;
}
.form-submit input[type=submit]:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(26,107,107,.4); }

/* pagination */
.pagination { text-align: right; padding: 12px 0; font-size: 0.88rem; color: var(--text-muted); }
.pagination a { color: var(--teal); padding: 3px 8px; text-decoration: none; }
.pagination a:hover { text-decoration: underline; }
.pagination .cur { color: red; font-weight: bold; }

/* login/admin */
.login-box {
  max-width: 360px; margin: 0 auto;
  background: var(--teal-light);
  border: 1px solid rgba(26,107,107,.25);
  border-radius: 14px; padding: 28px 24px; text-align: center;
}
.login-box h2 { font-family: 'Kanit', sans-serif; color: var(--teal); margin-bottom: 20px; }

/* alert/info */
.alert {
  padding: 12px 18px; border-radius: 10px;
  margin-bottom: 14px; font-size: 0.92rem;
}
.alert-success { background: #e6f4ea; border: 1px solid #a8d5b0; color: #1a5c2a; }
.alert-info    { background: var(--teal-light); border: 1px solid rgba(26,107,107,.3); color: var(--teal); }

/* ── FOOTER ──────────────────────────────────── */
.site-footer {
  background: linear-gradient(135deg, #1c0800 0%, #3a1800 50%, #1c0800 100%);
  border-top: 2px solid var(--gold);
  padding: 12px 16px 14px;
}
.footer-nav {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 8px; max-width: 600px; margin: 0 auto 10px;
}
.footer-nav a {
  color: var(--gold-light); text-decoration: none;
  font-family: 'Kanit', sans-serif; font-size: 0.82rem;
  padding: 7px 14px; border-radius: 10px;
  border: 1px solid rgba(197,150,10,.3);
  background: rgba(197,150,10,.07);
  transition: background .2s;
}
.footer-nav a:hover { background: rgba(197,150,10,.2); }
.footer-info {
  text-align: center; font-size: 0.72rem;
  color: rgba(245,216,122,.35); line-height: 1.9;
}
.footer-info a { color: rgba(245,216,122,.5); text-decoration: none; }
.footer-info a:hover { color: var(--gold-light); }

/* legacy style class support */
.style { font-family: 'Sarabun', Tahoma, sans-serif; font-size: 0.9rem; }
.content { font-size: 0.9rem; }

@media (max-width: 600px) {
  .header-nav a { font-size: 0.68rem; padding: 6px 7px; }
  .header-top { padding: 11px 13px 8px; gap: 10px; }
  .header-top img { width: 50px; height: 50px; }
  .form-row { flex-direction: column; align-items: flex-start; }
  .form-row label { text-align: left; min-width: auto; }
  table.friend-table { font-size: 0.78rem; }
}
