/* APDocs for Caspio - demo site. Branding follows the APCommercial demo sites
   (tmdemo.afterpremise.com): teal #29a5b2, Roboto, light grey page, white header. */
:root {
  --teal: #29a5b2;
  --teal-dark: #1f7f89;
  --teal-tint: #e6f5f7;
  --ink: #161616;
  --muted: #5f6475;
  --line: #e3e6eb;
  --page: #f7f8fa;
  --card: #ffffff;
  --amber: #b7791f;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font-family: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 15px; line-height: 1.5;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--teal-dark); }
code { font-size: .9em; }
.apd-wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.apd-skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px; z-index: 10; }
.apd-skip:focus { left: 8px; }

/* header */
.apd-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.apd-header-row { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.apd-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--teal); }
.apd-logo { height: 40px; width: auto; }
.apd-logo-text { font-weight: 700; font-size: 22px; color: var(--teal); }
.apd-product { font-weight: 500; font-size: 18px; color: var(--teal); white-space: nowrap; }
.apd-product::before { content: "-"; margin-right: 6px; }
.apd-company { margin-left: auto; color: var(--muted); font-size: 13px; }
.apd-menu { display: none; margin-left: auto; border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 6px 12px; font: inherit; }
.apd-nav { border-top: 1px solid var(--line); background: #fff; }
.apd-nav .apd-wrap { display: flex; flex-wrap: wrap; gap: 4px; }
.apd-nav a { padding: 10px 12px; text-decoration: none; color: var(--ink); border-bottom: 3px solid transparent; font-weight: 500; font-size: 14px; }
.apd-nav a:hover { color: var(--teal-dark); }
.apd-nav a.active { color: var(--teal-dark); border-bottom-color: var(--teal); }

/* hero */
.apd-hero { background: var(--teal); color: #fff; }
.apd-hero .apd-wrap { display: flex; align-items: center; gap: 32px; padding-top: 36px; padding-bottom: 36px; }
.apd-hero h1 { margin: 0 0 8px; font-size: 34px; font-weight: 500; }
.apd-hero p { margin: 0; font-size: 17px; max-width: 640px; opacity: .95; }
.apd-hero .apd-tagline { margin-top: 18px; font-weight: 500; }
.apd-badge { margin-left: auto; height: 150px; width: auto; border-radius: 12px; }

/* page title */
.apd-title { padding: 24px 0 8px; }
.apd-title h1 { margin: 0 0 4px; font-size: 26px; font-weight: 500; }
.apd-title p { margin: 0; color: var(--muted); max-width: 820px; }

main { padding-bottom: 40px; flex: 1 0 auto; }
.apd-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.apd-card h2 { margin: 0 0 8px; font-size: 17px; font-weight: 500; }

/* area tiles */
.apd-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin: 24px 0; }
.apd-tile { display: block; text-decoration: none; color: inherit; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--teal); border-radius: var(--radius); padding: 16px; transition: box-shadow .15s; }
.apd-tile:hover, .apd-tile:focus { box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.apd-tile h3 { margin: 0 0 6px; font-size: 17px; font-weight: 500; color: var(--teal-dark); }
.apd-tile p { margin: 0; color: var(--muted); font-size: 14px; }
.apd-tile.soon { border-top-color: #c9ced6; }
.apd-tile .apd-pill { display: inline-block; margin-top: 8px; font-size: 12px; background: var(--teal-tint); color: var(--teal-dark); border-radius: 99px; padding: 2px 10px; }
.apd-tile.soon .apd-pill { background: #eef0f3; color: var(--muted); }

/* dashboard grid */
.apd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; }
.apd-section-h { font-size: 19px; font-weight: 500; margin: 28px 0 12px; }

/* tabs */
.apd-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); margin: 16px 0 0; }
.apd-tabs button { font: inherit; font-weight: 500; font-size: 14px; background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; cursor: pointer; color: var(--muted); }
.apd-tabs button:hover { color: var(--teal-dark); }
.apd-tabs button.active { color: var(--teal-dark); border-bottom-color: var(--teal); }
.apd-panel { background: #fff; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); padding: 16px; overflow-x: auto; }
.apd-panel > p.apd-note { margin: 0 0 12px; color: var(--muted); font-size: 14px; }

.apd-signout { color: var(--teal-dark); font-size: 13px; font-weight: 500; white-space: nowrap; }
.apd-signin { background: var(--teal-tint); border: 1px solid #bfe3e7; border-radius: var(--radius); padding: 10px 14px; margin: 12px 0 0; font-size: 14px; }
.apd-signin summary { cursor: pointer; font-weight: 500; color: var(--teal-dark); }
.apd-signin p { margin: 8px 0; color: var(--muted); }
.apd-muted { color: var(--muted); }
.apd-table-wrap { overflow-x: auto; }
.apd-signin table { border-collapse: collapse; width: 100%; }
.apd-signin th, .apd-signin td { text-align: left; padding: 6px 10px 6px 0; border-top: 1px solid #bfe3e7; vertical-align: top; }
.apd-signin code { user-select: all; }

.apd-dp { min-height: 60px; }
.apd-login { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 16px; align-items: start; margin-top: 16px; }
.apd-login .apd-signin { margin: 0; }
@media (max-width: 900px) { .apd-login { grid-template-columns: 1fr; } }
.apd-missing { color: var(--amber); }
.apd-placeholder { text-align: center; padding: 48px 16px; color: var(--muted); }

/* footer */
.apd-footer { border-top: 1px solid var(--line); background: #fff; }
.apd-footer .apd-wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; padding-top: 16px; padding-bottom: 16px; color: var(--muted); font-size: 13px; }

@media (max-width: 900px) {
  .apd-company { display: none; }
  .apd-menu { display: inline-block; }
  .apd-signout { margin-left: auto; }
  .apd-signout + .apd-menu { margin-left: 8px; }
  .apd-nav { display: none; }
  .apd-nav.open { display: block; }
  .apd-nav .apd-wrap { flex-direction: column; }
  .apd-hero .apd-wrap { flex-direction: column; align-items: flex-start; }
  .apd-badge { margin-left: 0; height: 110px; }
  .apd-grid { grid-template-columns: 1fr; }
  .apd-product { font-size: 15px; }
}
@media (max-width: 480px) {
  .apd-product::before { content: none; }
  .apd-brand { flex-direction: column; align-items: flex-start; gap: 0; }
  .apd-hero h1 { font-size: 26px; }
}
