/* ============================================================
   Dochost client area — modern theme overrides (FOSSBilling 0.8.9)
   Loaded after huraga.css. Safe to update independently.
   ============================================================ */

:root {
  --dh-ink: #0b1b26;
  --dh-ink-soft: #243746;
  --dh-muted: #5d6f7f;
  --dh-primary: #0081c5;
  --dh-primary-dark: #00638f;
  --dh-primary-soft: #e6f4fb;
  --dh-bg: #f3f7fa;
  --dh-card: #ffffff;
  --dh-line: #e2eaf1;
  --dh-radius: 18px;
  --dh-radius-sm: 12px;
  --dh-shadow: 0 10px 30px rgba(11, 33, 48, .07);
  --dh-shadow-hover: 0 18px 44px rgba(11, 33, 48, .13);
  --dh-font: "Anuphan", "Noto Sans Thai", "Sarabun", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body,
.navbar,
.btn,
.card,
.form-control,
.form-select {
  font-family: var(--dh-font);
}

body {
  background:
    radial-gradient(1100px 420px at 12% -10%, rgba(0, 129, 197, .10), transparent 60%),
    radial-gradient(900px 380px at 100% 0%, rgba(0, 163, 224, .08), transparent 55%),
    var(--dh-bg);
  color: var(--dh-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Header / navigation ---------- */
body > .container > header {
  position: sticky;
  top: 0;
  z-index: 1020;
  margin: 0 -12px 6px;
  padding: 0 12px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--dh-line);
}

.navbar-brand {
  font-weight: 800;
  letter-spacing: -.02em;
  font-size: 1.35rem;
  color: var(--dh-ink) !important;
}

.navbar-brand span {
  background: linear-gradient(120deg, var(--dh-primary) 0%, #00b3e6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.navbar .nav-link {
  font-weight: 600;
  color: var(--dh-ink-soft) !important;
  border-radius: 999px;
  padding: .45rem .85rem !important;
  transition: background .18s ease, color .18s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  background: var(--dh-primary-soft);
  color: var(--dh-primary-dark) !important;
}

.navbar .js-locale-selector {
  max-width: 150px;
  border-radius: 999px;
  border-color: var(--dh-line);
  font-size: .85rem;
}

/* ---------- Buttons ---------- */
.btn {
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: .01em;
  padding: .55rem 1.15rem;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.btn-primary {
  --bs-btn-bg: var(--dh-primary);
  --bs-btn-border-color: var(--dh-primary);
  --bs-btn-hover-bg: var(--dh-primary-dark);
  --bs-btn-hover-border-color: var(--dh-primary-dark);
  --bs-btn-active-bg: var(--dh-primary-dark);
  --bs-btn-active-border-color: var(--dh-primary-dark);
  background-image: linear-gradient(135deg, var(--dh-primary) 0%, #00a5df 100%);
  border: 0;
  box-shadow: 0 8px 20px rgba(0, 129, 197, .25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0, 129, 197, .32);
}

.btn-outline-primary {
  --bs-btn-color: var(--dh-primary-dark);
  --bs-btn-border-color: rgba(0, 129, 197, .45);
  --bs-btn-hover-bg: var(--dh-primary);
  --bs-btn-hover-border-color: var(--dh-primary);
  border-width: 1.5px;
  background: rgba(255, 255, 255, .7);
}

.btn-dark {
  --bs-btn-bg: var(--dh-ink);
  --bs-btn-border-color: var(--dh-ink);
  --bs-btn-hover-bg: #1d3444;
  --bs-btn-hover-border-color: #1d3444;
}

/* ---------- Generic cards on other pages ---------- */
.card {
  border: 1px solid var(--dh-line);
  border-radius: var(--dh-radius);
  background: var(--dh-card);
  box-shadow: var(--dh-shadow);
  overflow: hidden;
}

.card > .card-header {
  background: #fbfdff;
  border-bottom: 1px solid var(--dh-line);
  font-weight: 700;
}

.list-group-item {
  border-color: var(--dh-line);
}

.form-control,
.form-select {
  border-radius: var(--dh-radius-sm);
  border-color: var(--dh-line);
  padding: .6rem .85rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--dh-primary);
  box-shadow: 0 0 0 .2rem rgba(0, 129, 197, .14);
}

/* ---------- Home layout ---------- */
body.dochost-home .col-12.col-md-9.mx-auto {
  flex: 0 0 100%;
  max-width: 100%;
}

body.dochost-home #wrapper {
  max-width: 1120px;
  margin: 0 auto;
}

body.dochost-home .content-block > .alert-info,
.dh-notice {
  border: 1px solid rgba(0, 129, 197, .18);
  background: linear-gradient(135deg, #eef8fd, #f7fcff);
  color: var(--dh-ink-soft);
  border-radius: var(--dh-radius-sm);
  padding: .7rem 1rem;
  font-size: .9rem;
}

.dh-notice p { margin: 0; }

/* ---------- Hero ---------- */
.dh-hero {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  padding: 56px 48px 46px;
  margin: 8px 0 30px;
  color: #fff;
  background:
    radial-gradient(700px 300px at 85% 10%, rgba(0, 196, 255, .35), transparent 60%),
    radial-gradient(600px 300px at 0% 110%, rgba(0, 129, 197, .45), transparent 60%),
    linear-gradient(135deg, #062c42 0%, #07496c 52%, #0081c5 100%);
  box-shadow: 0 24px 60px rgba(4, 40, 63, .28);
}

.dh-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 75% 40%, #000, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 75% 40%, #000, transparent 72%);
  pointer-events: none;
}

.dh-hero > * { position: relative; z-index: 1; }

.dh-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #bfe9ff;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .16);
  padding: .38rem .8rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
}

.dh-hero-title {
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.12;
  margin: 0 0 .9rem;
  max-width: 18ch;
}

.dh-hero-title span {
  background: linear-gradient(120deg, #8fe3ff 0%, #ffffff 70%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dh-hero-text {
  font-size: 1.06rem;
  line-height: 1.66;
  color: rgba(235, 247, 255, .9);
  max-width: 56ch;
  margin: 0 0 1.6rem;
}

.dh-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-bottom: 1.5rem;
}

.dh-hero .btn-primary {
  background: #fff;
  color: var(--dh-primary-dark);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .18);
}

.dh-hero .btn-primary:hover {
  background: #eef9ff;
  color: var(--dh-primary-dark);
}

.dh-hero .btn-outline-primary {
  color: #fff;
  border-color: rgba(255, 255, 255, .5);
  background: rgba(255, 255, 255, .06);
}

.dh-hero .btn-outline-primary:hover {
  background: rgba(255, 255, 255, .16);
  border-color: #fff;
}

.dh-hero-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  font-size: .88rem;
  color: rgba(230, 246, 255, .82);
}

.dh-hero-contact a { color: #d9f2ff; text-decoration: none; font-weight: 600; }
.dh-hero-contact a:hover { text-decoration: underline; }
.dh-hero-contact .icon { width: 1rem; height: 1rem; }
.dh-dot { opacity: .5; }

/* ---------- Home cards ---------- */
.dh-grid { margin-bottom: 34px; }

.dh-card {
  height: 100%;
  background: var(--dh-card);
  border: 1px solid var(--dh-line);
  border-radius: var(--dh-radius);
  padding: 24px 22px 20px;
  box-shadow: var(--dh-shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex;
  flex-direction: column;
}

.dh-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--dh-shadow-hover);
  border-color: rgba(0, 129, 197, .3);
}

.dh-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--dh-primary-soft), #d8effb);
  color: var(--dh-primary-dark);
  margin-bottom: 16px;
}

.dh-card-icon .icon { width: 22px; height: 22px; }

.dh-card h3 {
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: -.01em;
  margin: 0 0 .4rem;
  color: var(--dh-ink);
}

.dh-card p {
  font-size: .92rem;
  line-height: 1.6;
  color: var(--dh-muted);
  margin: 0 0 1rem;
  flex: 1;
}

.dh-card-actions,
.dh-link-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1rem;
}

.dh-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-weight: 700;
  font-size: .9rem;
  color: var(--dh-primary-dark);
  text-decoration: none;
}

.dh-link:hover { color: var(--dh-primary); text-decoration: underline; }
.dh-link .icon { width: 1rem; height: 1rem; transition: transform .18s ease; }
.dh-link:hover .icon { transform: translateX(3px); }
.dh-link-muted { color: var(--dh-muted); font-weight: 600; }
.dh-link-muted:hover { color: var(--dh-ink); }

/* ---------- Login / public pages ---------- */
.page-login .card {
  width: 100%;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 22px;
}

.page-login .card-body {
  padding: 2rem 1.9rem;
}

.page-login .btn {
  white-space: nowrap;
  font-size: .92rem;
  padding-left: .9rem;
  padding-right: .9rem;
}

.page-login h1,
.page-login .h3 {
  letter-spacing: -.02em;
  font-weight: 800;
}

/* ---------- Knowledge base ---------- */
.dh-kb {
  background: #fff;
  border: 1px solid var(--dh-line);
  border-radius: 24px;
  padding: 30px 30px 26px;
  box-shadow: var(--dh-shadow);
  margin-bottom: 8px;
}

.dh-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 20px;
}

.dh-eyebrow {
  display: block;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dh-primary);
  margin-bottom: .35rem;
}

.dh-section-head h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0;
  color: var(--dh-ink);
}

.dh-kb-card {
  height: 100%;
  display: block;
  text-decoration: none;
  background: #fbfdff;
  border: 1px solid var(--dh-line);
  border-radius: var(--dh-radius);
  padding: 22px 20px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.dh-kb-card:hover {
  transform: translateY(-3px);
  background: #fff;
  border-color: rgba(0, 129, 197, .35);
  box-shadow: var(--dh-shadow-hover);
}

.dh-kb-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--dh-primary-soft);
  color: var(--dh-primary-dark);
  margin-bottom: 14px;
}

.dh-kb-icon .icon { width: 20px; height: 20px; }

.dh-kb-card h4 {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.45;
  margin: 0 0 .4rem;
  color: var(--dh-ink);
}

.dh-kb-card p {
  font-size: .88rem;
  line-height: 1.6;
  color: var(--dh-muted);
  margin: 0 0 .9rem;
}

.dh-kb-card .dh-link { font-size: .85rem; }

/* ---------- Footer ---------- */
#footer {
  border-top: 1px solid var(--dh-line);
  margin-top: 34px !important;
  padding-top: 22px;
  color: var(--dh-muted);
}

#footer a {
  color: var(--dh-ink-soft);
  text-decoration: none;
}

#footer a:hover { color: var(--dh-primary-dark); }

.dh-footer-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .55rem;
  text-align: center;
}

.dh-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .35rem .9rem;
}

.dh-powered {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .82rem;
  color: var(--dh-muted);
}

.dh-home-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: 700;
  color: var(--dh-primary-dark) !important;
}

.dh-home-link .icon { width: 1rem; height: 1rem; }

/* ---------- Dark mode ---------- */
[data-bs-theme="dark"] body {
  background:
    radial-gradient(1100px 420px at 12% -10%, rgba(0, 129, 197, .18), transparent 60%),
    #0d151d;
  color: #e6eef5;
}

[data-bs-theme="dark"] body > .container > header {
  background: rgba(13, 21, 29, .86);
  border-bottom-color: #1d2a36;
}

[data-bs-theme="dark"] .navbar-brand { color: #f2f7fb !important; }
[data-bs-theme="dark"] .navbar .nav-link { color: #c3d2df !important; }
[data-bs-theme="dark"] .navbar .nav-link:hover,
[data-bs-theme="dark"] .navbar .nav-link.active { background: rgba(0, 129, 197, .2); color: #9fe0ff !important; }

[data-bs-theme="dark"] .dh-card,
[data-bs-theme="dark"] .dh-kb,
[data-bs-theme="dark"] .card {
  background: #131f29;
  border-color: #21303d;
  color: #e6eef5;
}

[data-bs-theme="dark"] .card > .card-header { background: #16232e; border-bottom-color: #21303d; }
[data-bs-theme="dark"] .dh-card h3,
[data-bs-theme="dark"] .dh-kb-card h4,
[data-bs-theme="dark"] .dh-section-head h2 { color: #f2f7fb; }
[data-bs-theme="dark"] .dh-card p,
[data-bs-theme="dark"] .dh-kb-card p { color: #9fb2c2; }
[data-bs-theme="dark"] .dh-kb-card { background: #16232e; border-color: #21303d; }
[data-bs-theme="dark"] .dh-kb-card:hover { background: #1a2937; border-color: rgba(0, 163, 224, .5); }
[data-bs-theme="dark"] .dh-card-icon,
[data-bs-theme="dark"] .dh-kb-icon { background: rgba(0, 129, 197, .25); color: #9fe0ff; }
[data-bs-theme="dark"] #footer { border-top-color: #21303d; color: #9fb2c2; }
[data-bs-theme="dark"] #footer a { color: #c3d2df; }
[data-bs-theme="dark"] .dh-link { color: #7fd4ff; }
[data-bs-theme="dark"] .dh-link-muted { color: #9fb2c2; }

/* ---------- Responsive ---------- */
@media (max-width: 767.98px) {
  .dh-hero { padding: 40px 26px 34px; border-radius: 20px; }
  .dh-hero-title { max-width: 100%; }
  .dh-kb { padding: 24px 20px 20px; border-radius: 20px; }
  .dh-section-head { align-items: flex-start; flex-direction: column; }
  body > .container > header { margin: 0; padding: 0; }
}
