/* Control panel (/cp/...) — the reference project's CP layout on this site's header, footer and colours. */
.cp { background: var(--panel); padding: 40px 0 60px; }
.cp-inner { width: 90%; max-width: 1400px; margin: 0 auto; }
.cp-logged { margin: 0 0 30px; text-align: center; color: #666; font-style: italic; }
.cp-logged form { display: inline; }
.cp-logged button { padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-style: normal; cursor: pointer; }
.cp-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 0; padding: 15px; background: var(--ink); font-size: 22px; font-weight: 600; }
.cp-nav a { padding: 0 18px; color: #fff; text-decoration: none; letter-spacing: .02em; }
.cp-nav a + a { border-left: 1px solid rgba(255,255,255,.35); }
.cp-nav a:hover, .cp-nav a[aria-current="page"] { color: var(--blue-light); }
.cp-body { padding: 30px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.cp-body a, .cp-body a:hover, .cp-body a:focus-visible { text-decoration: none; }
.cp-body h1 { font-size: 30px; }
.cp-body h2 { font-size: 24px; }
.cp-body h3 { font-size: 20px; }
.cp-status { margin: 0 0 20px; padding: 12px 16px; border-radius: 6px; background: #e8f6ee; color: var(--success); font-weight: 600; }
.cp-errors { margin: 0 0 20px; padding: 12px 16px; border-radius: 6px; background: #fdecec; color: var(--danger); }
.cp-errors ul { margin: 0; padding-left: 18px; }
.cp-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.cp-toolbar > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* Lists: dark header row, rows alternating grey / white */
.cp-table { width: 100%; border-collapse: separate; border-spacing: 0 1px; margin: 0 0 30px; }
.cp-table th, .cp-table td { padding: 10px 12px; text-align: left; vertical-align: middle; }
.cp-table th { background: rgba(15,17,20,.6); color: #fff; font-weight: 700; text-transform: uppercase; font-size: 15px; }
.cp-table tbody tr:nth-child(odd) td { background: #00000014; }
.cp-table tbody tr:nth-child(even) td { background: #fff; }
.cp-table .c { text-align: center; }
.cp-table tr.is-new td:first-child { font-weight: 700; }
.cp-table .rank { width: 60px; text-align: center; }
.cp-table img.thumb { width: 90px; height: 60px; object-fit: cover; border-radius: 4px; }
.cp-empty { padding: 20px; text-align: center; color: #666; }

/* Forms: labels above inputs in a row, like the reference's form tables */
.cp-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px 25px; margin: 0 0 22px; }
.cp-form-row label, .cp-label { display: block; margin: 0 0 6px; font-weight: 700; }
.cp-hint { display: block; margin-top: 4px; font-size: 14px; color: #666; }
.input { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 6px; background: #fff; }
textarea.input { min-height: 140px; resize: vertical; }
textarea.code { font-family: ui-monospace, Menlo, monospace; font-size: 14px; min-height: 320px; }
.red { color: #EC2228; }
.gray6 { color: #666; }
.btns_ { display: inline-block; padding: 6px 16px; border: 1px solid var(--ink); border-radius: 50px; background: var(--ink); color: #fff; font-size: 17px; line-height: 1.6; text-decoration: none; cursor: pointer; }
.btns_:hover { background: var(--steel); border-color: var(--steel); color: #fff; }
.cp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }

@media (max-width: 760px) {
  .cp-inner { width: auto; margin: 0 16px; }
  .cp-body { padding: 18px; }
  .cp-nav { font-size: 17px; }
  .cp-nav a { padding: 0 10px; }
  .cp-table-wrap { overflow-x: auto; }
}

/* Login and trigger login: the reference's centred "Control Panel Login" page */
.cp-login { max-width: 640px; margin: 0 auto; padding: 3% 0; text-align: center; }
.cp-login h4 { margin: 0 0 24px; font-weight: 700; }
.cp-login label { display: block; margin: 0 0 8px; font-weight: 700; }
.cp-login-phone { margin: 0 0 22px; }
.cp-login-phone .input { width: 60%; min-width: 240px; font-size: 20px; text-align: center; }
.cp-login-msg { margin: 0 0 18px; color: #666; }
.otp-container { margin: 0 0 24px; }
.otp-boxes { display: flex; justify-content: center; gap: 10px; }
.otp-boxes .input { width: 48px; padding: 10px 0; font-size: 22px; text-align: center; }
.sub_btn { width: fit-content; padding: 22px 45px; border: 0; background: var(--ink); color: #fff; font-size: 28px; font-weight: 700; cursor: pointer; }
.sub_btn:hover, .sub_btn:focus-visible { color: var(--blue-light); }
.sub_btn:disabled { opacity: .6; cursor: progress; }
@media (max-width: 860px) { .sub_btn { padding: 15px 25px; font-size: 22px; } .cp-login-phone .input { width: 100%; } }

/* Site Pages list: blue group header rows, alternating grey / white rows, white column lines */
.cp-page-title { font-size: 52px; font-weight: 300; }
.cp-table--pages { border-spacing: 0; }
.cp-table--pages th, .cp-table--pages td { padding: 26px 22px; font-size: 18px; }
.cp-table--pages th { background: var(--ink); font-size: 18px; letter-spacing: .01em; }
.cp-table--pages td { text-transform: uppercase; }
.cp-table--pages td.c { text-transform: none; }
.cp-table--pages th + th, .cp-table--pages td + td { border-left: 1px solid #fff; width: 16%; }
.cp-table--pages th, .cp-table--pages td { border-bottom: 1px solid #fff; }
.cp-table--pages tbody tr:nth-child(even) td { background: #dcdcdc; }
.cp-table--pages tbody tr:nth-child(odd) td { background: #fff; }
.cp-table--pages a { color: #0f1e3d; text-decoration: none; }
@media (max-width: 760px) {
  .cp-page-title { font-size: 34px; }
  .cp-table--pages th, .cp-table--pages td { padding: 14px 12px; font-size: 15px; }
  .cp-table--pages th + th, .cp-table--pages td + td { width: auto; }
}
.cp-table--pages thead + tbody tr:nth-child(odd) td { background: #dcdcdc; }
.cp-table--pages thead + tbody tr:nth-child(even) td { background: #fff; }

/* Site Pages > Modify: editor, then Meta Title / Keyword / Description in one row (as the reference) */
.cp-page-form .cke { margin: 0 0 50px; }
.cp-meta-row { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 40px; }
.cp-meta-row label { font-size: 22px; margin-bottom: 10px; }
.cp-meta-row .input { font-size: 17px; padding: 12px 14px; }
@media (max-width: 900px) { .cp-meta-row { grid-template-columns: 1fr; } }

/* Drop Down Navigation: Link Name and the wider page URL field side by side */
.cp-dropdown-row { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.cp-table--pages .rank { width: 64px; padding: 6px 8px; font-size: 16px; text-align: center; }
@media (max-width: 760px) { .cp-dropdown-row { grid-template-columns: 1fr; } }

/* Template > Header / Footer editors */
.cp-template-form .cke { margin: 0; }
