/* ── Body backgrounds ────────────────────────────────────────────────────── */
/* Scoped so each layout gets the right bg without overriding siblings.       */
body                { font-family: Arial, sans-serif; }
body.nav-md         { background: #1B3A6B; }   /* app shell — blue shows in gaps   */
body.login          { background: #1B3A6B; }   /* login / signup pages              */
body.share-body     { background: #f4f7fa; }   /* share recording pages             */
body.page-verify    { background: #f4f7fa; }   /* certificate verify page           */

/* ── Login card ──────────────────────────────────────────────────────────── */
.login-card {
  width: 520px; max-width: calc(100vw - 32px);
  margin: 70px auto;
  background: #fff; border: 3px solid #222; border-radius: 8px;
  padding: 32px; text-align: center;
}
.login-logo-wrap    { display: flex; flex-direction: column; align-items: center; margin-bottom: 20px; }
.login-logo         { max-width: 220px; margin-bottom: 20px; }   /* kept for legacy img refs */
.login-brand-name   { font-size: 20px; font-weight: 800; color: #0D1B33; margin-top: 8px; }
.login-brand-tld    { color: #00B99E; }
.login-card input   { margin-bottom: 18px; }
.login-button       { margin-top: 8px; }

/* ── Left sidebar ────────────────────────────────────────────────────────── */
.left_col {
  position: fixed; left: 0; top: 0; bottom: 0; width: 230px;
  background: #1B3A6B; color: #fff;
}
.nav_title {
  width: 230px; padding: 18px 20px 22px; font-size: 24px;
  text-align: center; background: #1B3A6B; border-radius: 0;
}
.logo { max-width: 160px; max-height: 105px; width: auto; height: auto; }

/* App brand in sidebar */
.app-brand-link  { text-decoration: none; display: block; }
.app-brand       { display: flex; align-items: center; gap: 10px; justify-content: center; }
.app-logo-mark   { width: 36px; height: 36px; flex-shrink: 0; }
.app-brand-name  { font-size: 16px; font-weight: 800; color: white; letter-spacing: -0.01em; }
.app-brand-tld   { color: #7ee8d8; }

.nav_title a, .side-menu a { color: #fff; text-decoration: none; }
.side-menu { list-style: none; padding: 0; margin: 0; }
.side-menu li a { display: block; padding: 13px 15px 12px; font-size: 16px; font-weight: 600; }
.side-menu .accordion-heading {
  background: rgba(0,0,0,0.06); border-top: 1px solid rgba(255,255,255,0.18);
  cursor: pointer; min-height: 56px; display: flex; align-items: center; gap: 8px;
}
.side-menu .accordion-heading > i:first-child { width: 28px; font-size: 19px; text-align: center; }
.side-menu .accordion-heading .fa-chevron-down { margin-left: auto; width: auto; color: rgba(255,255,255,0.75); }
.child_menu {
  display: none; margin: 0; padding: 7px 0 9px 0;
  background: rgba(255,255,255,0.045); position: relative;
}
.accordion-group.open .child_menu { display: block; }
.child_menu::before {
  content: ""; position: absolute; left: 27px; top: 12px; bottom: 30px;
  width: 1px; background: #425668;
}
.child_menu li { list-style: none; position: relative; min-height: 34px; }
.child_menu li::before {
  content: ""; position: absolute; left: 23px; top: 15px;
  width: 8px; height: 8px; border-radius: 50%; background: #425668; z-index: 1;
}
.child_menu li.active,
.child_menu li:hover { background: rgba(255,255,255,0.06); }
.child_menu li a { padding: 8px 12px 8px 52px; font-size: 14px; font-weight: 400; line-height: 20px; color: rgba(255,255,255,0.86); }
.side-menu em { color: red; font-style: normal; }
.storage-box {
  display: block; padding: 14px 20px; color: rgba(255,255,255,0.85);
  border-top: 1px solid rgba(255,255,255,0.3); font-size: 14px; font-weight: 600;
}

/* ── Top nav ─────────────────────────────────────────────────────────────── */
.top_nav { margin-left: 230px; background: #f4f4f4; min-height: 80px; }
.nav_menu { min-height: 60px; padding: 12px 16px; }
.navbar-right {
  float: right; text-align: right; list-style: none;
  margin-right: 0; padding-right: 16px; max-width: calc(100% - 60px);
}
#balance    { color: #1B3A6B; font-weight: bold; }
#disclaimer { background: #00B99E; color: #fff; padding: 8px 12px; font-size: 16px; }

/* ── Main content area ───────────────────────────────────────────────────── */
.right_col { margin-left: 230px; padding: 10px 20px 0; background: #fff; min-height: calc(100vh - 80px); }
.x_title { border-bottom: 2px solid #E6E9ED; padding: 1px 5px 6px; margin-top: 20px; margin-bottom: 10px; }
.x_title h2 { color: #1B3A6B; font-size: 28px; margin: 5px 0 6px; }
.x_content { margin-bottom: 36px; }
.refresh_icon { float: right; font-size: 28px; cursor: pointer; }
.top-space { margin-top: 16px; }

/* ── Session / recording ─────────────────────────────────────────────────── */
.session-toolbar {
  height: 70px; display: flex; align-items: center; gap: 14px;
  justify-content: flex-end; color: #fff; background: #1B3A6B; padding: 10px 18px;
}
.session-toolbar div:first-child { margin-right: auto; font-size: 18px; }
.recording-dot { color: red; }
.novnc-frame {
  width: 100%; height: calc(100vh - 230px); min-height: 650px;
  border: 4px solid #111; background: #111;
}

/* ── Progress page ───────────────────────────────────────────────────────── */
.progress-page { max-width: 980px; margin: 40px auto; }
.progress-page h1 { color: #1B3A6B; margin-bottom: 14px; }
.progress-page .progress { height: 34px; margin: 28px 0; }
.progress-page h2 { font-size: 24px; color: #333; margin-bottom: 24px; }
.progress-checklist { list-style: none; padding: 0; font-size: 20px; }
.progress-checklist li { margin: 12px 0; color: #777; }
.progress-checklist li::before { content: "○"; display: inline-block; width: 32px; color: #999; }
.progress-checklist li.done { color: #222; }
.progress-checklist li.done::before { content: "✓"; color: #00B99E; font-weight: bold; }

/* ── Utility classes ─────────────────────────────────────────────────────── */
.dark-blue  { color: #1B3A6B; }
.bold       { font-weight: bold; }
.underline  { text-decoration: underline !important; }
.h1-title   { font-size: 2em; }
.h2-title   { font-size: 1.5em; }
.link-title { font-size: 1em; }
.btn-min-width  { min-width: 100px; }
.rounded-border { border-radius: 4px; border: 1px solid #b5c6d2; }
.create-form    { background-color: white; margin-top: 20px; padding: 20px; border-radius: 4px; }

/* ── Certificate wizard ──────────────────────────────────────────────────── */
.form_wizard.wizard_horizontal { margin: 10px auto 25px; max-width: 980px; }
.wizard_steps { display: flex; justify-content: center; align-items: flex-start; padding: 0; margin: 0; list-style: none; }
.wizard_steps li { width: 33.333%; position: relative; text-align: center; }
.wizard_steps li::before { content: ""; position: absolute; top: 25px; left: 0; right: 0; height: 5px; background: #ccc; }
.wizard_steps li:first-child::before { left: 50%; }
.wizard_steps li:last-child::before  { right: 50%; }
.wizard_steps li:first-child::before { background: linear-gradient(to right, #2f4054 0%, #2f4054 50%, #ccc 50%, #ccc 100%); }
.step_no {
  position: relative; z-index: 1; display: inline-flex;
  width: 54px; height: 54px; border-radius: 50%;
  background: #ccc; color: #fff; align-items: center; justify-content: center;
  font-size: 22px; font-weight: bold;
}
.wizard_steps li:first-child .step_no { background: #2f4054; }
.step_descr { display: block; margin-top: 8px; color: #777; font-weight: bold; }
.choice-title { text-align: center; margin: 22px 0; }
.cert-choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 0 auto 24px; max-width: 1120px; }
.cert-choice {
  min-height: 245px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; cursor: pointer;
  background: #fff; padding-top: 10px; padding-bottom: 10px; border: solid 1px #d3d3d3;
}
.selector-service:hover { border: solid 1px #1B3A6B; cursor: pointer; }
.cert-choice.selected {
  border: solid 1px #1B3A6B;
  background: repeating-linear-gradient(135deg,
    rgba(52,152,219,0.10), rgba(52,152,219,0.15) 10px,
    rgba(52,152,219,0.10) 10px, rgba(52,152,219,0.15) 20px);
}
.cert-choice input { position: absolute; opacity: 0; }
.cert-choice h2 { margin-top: 14px; }
.choice-icon {
  width: 136px; height: 136px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 54px; color: #f7e5bd;
}
.website-icon { background: #f3b19f; }
.file-icon    { background: #c4cfa8; }
.certificate-flow { max-width: 920px; margin: 24px auto; text-align: center; }
.file-picker        { max-width: 700px; margin: 15px auto; }
.hidden-file-input  { display: none !important; }

/* ── Top-up / amount selector ────────────────────────────────────────────── */
.amount-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  max-width: 620px; margin: 20px auto 26px;
  border: 1px solid #cfcfcf; border-radius: 4px; overflow: hidden;
}
.amount-option {
  min-height: 90px; display: flex; align-items: center; justify-content: center;
  gap: 8px; margin: 0; border-right: 1px solid #cfcfcf; font-size: 18px; cursor: pointer;
}
.amount-option:last-child { border-right: 0; }
.amount-option.selected   { background: #1B3A6B; color: #fff; font-weight: bold; }
.amount-option input[type="radio"] { display: none; }
.other-amount  { width: 110px; color: #333; }
.order-button  { display: block; margin: 0 auto; }

/* ── Subscription / pricing ──────────────────────────────────────────────── */
.subscription-plans { margin-top: 32px; }
.pricing            { background: #fff; margin-bottom: 20px; }
.pricing .title     { background: #1B3A6B; color: #fff; padding: 15px 0 0; text-align: center; min-height: 112px; }
.pricing .title h2  { font-size: 18px; border-radius: 5px 5px 0 0; margin: 0; font-weight: bold; }
.pricing .title h1  { font-size: 22px; margin: 12px; }
.pricing_features   { background: #f5f5f5; padding: 20px 15px; min-height: 305px; }
.pricing_features ul { margin: 0; }
.pricing_features ul li { margin-top: 10px; font-size: 16px; line-height: 1.35; }
.pricing_footer { padding: 10px 15px; background-color: #f5f5f5; border-top: 1px solid #ddd; text-align: center; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; }
.pricing_footer .btn { font-size: 16px; }
.ui-ribbon-container { position: relative; overflow: hidden; }
.ui-ribbon-wrapper   { width: 120px; height: 120px; overflow: hidden; position: absolute; top: 0; right: 0; z-index: 2; }
.ui-ribbon {
  position: relative; top: 22px; right: -30px; width: 150px;
  padding: 8px 0; background: #555; color: #fff;
  transform: rotate(45deg); text-align: center; font-weight: bold;
}

/* ── Batch ────────────────────────────────────────────────────────────────── */
.batch-area { min-height: 340px; font-size: 18px; }
.batch-note { margin-left: 12px; font-size: 18px; }

/* ── Certificate table actions ───────────────────────────────────────────── */
.btn-expand       { background: none; border: none; padding: 0; cursor: pointer; color: #1B3A6B; font-size: 18px; line-height: 1; }
.btn-expand:hover { color: #2755A8; }
.btn-icon-delete        { background: none; border: none; padding: 0 0 0 8px; cursor: pointer; color: #c0392b; font-size: 16px; line-height: 1; vertical-align: middle; }
.btn-icon-delete:hover  { color: #922b21; }
.cert-icon-btn   { font-size: 16px; color: #1B3A6B; vertical-align: middle; }
.cert-actions a  { text-decoration: none; }
.rec-expand-cell { width: 36px; text-align: center !important; padding: 8px 4px !important; }
.rec-expand-row > td   { background: #f8fafc !important; border-top: none !important; }
.rec-expand-body       { padding: 12px 20px !important; }
.rec-expand-inner      { display: flex; flex-direction: column; max-width: 680px; gap: 8px; }
.rec-expand-inner label { font-weight: 600; font-size: 13px; margin: 0; }
.rec-expand-inner input,
.rec-expand-inner textarea { margin-top: 3px; }

/* ── Share recording pages ───────────────────────────────────────────────── */
.share-page   { max-width: 760px; margin: 0 auto; padding: 0 20px 60px; }
.share-header { padding: 28px 0; }
.share-brand  { font-size: 19px; font-weight: 800; color: #0D1B33; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand-tld    { color: #00B99E; }
.share-card   { background: #fff; padding: 36px 40px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.06); }
.share-card h1      { margin-top: 0; color: #1B3A6B; }
.share-field        { margin-bottom: 18px; }
.share-field label  { display: block; font-weight: bold; margin-bottom: 6px; }
.share-field input  { font-size: 18px; padding: 8px 12px; width: 100%; max-width: 360px; }
.share-meta         { color: #666; font-size: 14px; margin-top: 14px; }
.share-video        { width: 100%; max-width: 720px; background: #000; }
.share-actions      { margin-top: 18px; display: flex; gap: 12px; align-items: center; }

/* ── Certificate verify page ─────────────────────────────────────────────── */
.verify-page        { max-width: 880px; margin: 0 auto; padding: 0 20px 60px; }
.verify-header      { padding: 28px 0; }
.verify-brand       { font-size: 19px; font-weight: 800; color: #0D1B33; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.verify-card        { background: #fff; padding: 40px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.06); }
.verify-card h1     { margin-top: 0; }
.verify-good        { color: #00B99E; }
.verify-bad         { color: #c0392b; }
.verify-field       { margin-bottom: 18px; }
.verify-field label { display: block; font-weight: bold; margin-bottom: 6px; }
.verify-field input[type="file"],
.verify-field input[type="text"] { font-size: 16px; padding: 6px 10px; width: 100%; max-width: 420px; }
.verify-table       { margin-top: 20px; width: 100%; }
.verify-table th    { width: 240px; text-align: left; }
.verify-table td    { word-break: break-all; }
.verify-hash        { font-family: monospace; font-size: 13px; word-break: break-all; }

/* ── Hamburger button (hidden on desktop) ────────────────────────────────── */
.nav.toggle {
  display: none;
  background: none; border: none; padding: 8px 12px;
  font-size: 22px; cursor: pointer; color: #1B3A6B; line-height: 1;
}

/* ── Responsive: ≤ 900px — tablet landscape / small desktop ─────────────── */
@media (max-width: 900px) {
  /* Sidebar becomes a slide-in overlay */
  .left_col {
    position: fixed;
    top: 0; left: 0; height: 100%;
    width: 230px; min-height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 1050;
    box-shadow: none;
  }
  body.sidebar-open .left_col {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.35);
  }

  /* Content fills full width */
  .top_nav, .right_col { margin-left: 0; }

  /* Show hamburger button */
  .nav.toggle { display: inline-block; }

  /* Grid adjustments */
  .cert-choice-grid { grid-template-columns: 1fr; }
  .amount-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Responsive: ≤ 768px — tablet portrait ───────────────────────────────── */
@media (max-width: 768px) {
  .login-card { padding: 24px 20px; }

  /* DataTables: scroll horizontally instead of overflowing the viewport */
  .dataTables_wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .right_col { overflow-x: hidden; }

  /* Wizard step circles slightly smaller */
  .step_no { width: 44px; height: 44px; font-size: 18px; }

  /* Tables scroll horizontally */
  .verify-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .verify-table th { width: auto; }

  /* Share / verify pages: tighter side padding */
  .share-page  { padding: 0 12px 40px; }
  .verify-page { padding: 0 12px 40px; }
  .share-card  { padding: 24px 20px; }
  .verify-card { padding: 24px 20px; }
}

/* ── Responsive: ≤ 480px — phone ─────────────────────────────────────────── */
@media (max-width: 480px) {
  /* Login card */
  .login-card { padding: 20px 16px; max-width: calc(100vw - 24px); margin: 32px auto; }
  .login-brand-name { font-size: 16px; }

  /* Page title */
  .x_title h2 { font-size: 20px; }

  /* Certificate choice cards */
  .cert-choice { min-height: 160px; }
  .choice-icon { width: 88px; height: 88px; font-size: 36px; }

  /* Amount grid: single column on phones */
  .amount-grid { grid-template-columns: 1fr; }

  /* Full-width form inputs */
  .share-field input  { max-width: 100%; width: 100%; }
  .verify-field input[type="file"],
  .verify-field input[type="text"] { max-width: 100%; width: 100%; }

  /* Pricing card padding */
  .pricing_features { padding: 16px 12px; }

  /* Top nav: reduce bottom padding so the hamburger isn't cut off */
  .nav_menu { padding: 8px 12px; }
}

/* ── Responsive: ≥ 1280px — large desktop ──────────────────────────────────── */
@media (min-width: 1280px) {
  .container { max-width: 1200px; }
  .sidebar { width: 220px; }
  .main-content { margin-left: 240px; }
  .table-responsive { overflow: visible; }
}

/* ── Responsive: ≥ 1600px — extra large desktop ──────────────────────────────── */
@media (min-width: 1600px) {
  .container { max-width: 1400px; }
}
