/* CTC Lite admin only. Layout overrides keep existing markup and handlers intact. */
.ctclAdminPanel,
.ctcl-info-tab-main,
.ctcl-payment-tab-content,
.ctcl-shipping-tab-content,
.ctc-smtp-email-setting,
.ctcl-pending-orders-fieldset,
.ctcl-complete-orders-fieldset,
.ctcl-order-detail-main-cont {
   --ctcl-border: #dce2e8;
   --ctcl-ink: #253346;
   --ctcl-muted: #596779;
   --ctcl-accent: #1d5f9e;
   color: var(--ctcl-ink);
   box-sizing: border-box;
   min-width: 0;
   max-width: 100%;
   margin: 24px 20px 24px 0;
   line-height: 1.6;
}
:is(.ctclAdminPanel, .ctcl-info-tab-main, .ctcl-payment-tab-content, .ctcl-shipping-tab-content, .ctc-smtp-email-setting, .ctcl-order-detail-main-cont) * {
   box-sizing: border-box;
}
.ctclAdminPanel h2 {
   display: flex;
   align-items: center;
   gap: 12px;
   margin: 0 0 24px;
   font-size: 25px;
   font-weight: 650;
   line-height: 1.3;
   letter-spacing: -.5px;
}
.ctclAdminPanel h2 .dashicons-before::before { color: var(--ctcl-accent); }
.ctclAdminPanel .nav-tab-wrapper,
.ctcSubNavTab {
   display: flex;
   flex-wrap: wrap;
   gap: 6px;
   padding: 6px;
   margin: 0;
   border: 1px solid #dce2e8;
   border-radius: 12px;
   background: #fff;
}
:is(.ctclAdminPanel, .ctcSubNavTab) .nav-tab {
   display: inline-flex;
   align-items: center;
   gap: 8px;
   float: none;
   margin: 0;
   padding: 10px 15px;
   border: 0;
   border-radius: 7px;
   background: transparent;
   color: #596779;
   font-size: 13px;
   font-weight: 600;
   line-height: 1.5;
}
:is(.ctclAdminPanel, .ctcSubNavTab) .nav-tab:hover { background: #f1f5f9; color: #253346; }
:is(.ctclAdminPanel, .ctcSubNavTab) .nav-tab-active { background: #eaf2fa; color: #174e82; }
:is(.ctclAdminPanel, .ctcl-info-tab-main, .ctcl-payment-tab-content, .ctcl-shipping-tab-content, .ctc-smtp-email-setting, .ctcl-order-detail-main-cont) legend {
   max-width: 100%;
   padding: 0 8px;
   font-size: 14px;
   font-weight: 600;
   line-height: 1.6;
   text-align: left;
}
/* Replace masonry positioning with responsive normal flow, including its inline dimensions. */
.ctcl-info-tab,
.ctcl-payment-tab-fieldset,
.ctcl-shipping-tab-fieldset,
.ctcl-pending-order-detail,
.ctcl-complete-order-detail {
   display: grid !important;
   grid-template-columns: repeat(auto-fit, minmax(min(100%, 390px), 1fr));
   align-items: start;
   gap: 24px;
   width: 100% !important;
   height: auto !important;
   min-width: 0;
   padding: 0;
   opacity: 1 !important;
}
:is(.ctcl-info-tab, .ctcl-payment-tab-fieldset, .ctcl-shipping-tab-fieldset, .ctcl-pending-order-detail, .ctcl-complete-order-detail) > legend {
   margin-bottom: 22px;
   padding: 0;
   font-size: 18px;
}
:is(.ctcl-info-tab, .ctcl-payment-tab-fieldset, .ctcl-shipping-tab-fieldset, .ctcl-pending-order-detail, .ctcl-complete-order-detail) fieldset,
.ctcl-email-setting {
   position: relative !important;
   inset: auto !important;
   transform: none !important;
   width: 100% !important;
   height: auto !important;
   min-width: 0;
   max-width: 100%;
   margin: 0 !important;
   padding: 24px;
   border: 1px solid var(--ctcl-border);
   border-radius: 12px;
   background: #fff;
   box-shadow: 0 2px 5px rgb(25 40 60 / 3%);
   overflow-wrap: anywhere;
}
:is(.ctcl-payment-tab-fieldset, .ctcl-shipping-tab-fieldset) > form { min-width: 0; width: 100%; margin: 0; }
.ctcl-info-tab p { color: var(--ctcl-muted); margin: 8px 0 16px; }
.ctcl-info-tab img { max-width: 100%; height: auto; }
.ctcl-basic-info-header { margin: 24px 0 18px; font-size: 18px; }
.ctcl-smtp-email-setting { max-width: 780px; margin-top: 24px; }
.ctcl-email-setting-row,
.ctcl-business-setting-row {
   display: grid;
   grid-template-columns: minmax(120px, 2fr) minmax(0, 3fr);
   align-items: start;
   gap: 12px 20px;
   height: auto;
   margin: 0 0 18px;
   line-height: 1.6;
}
:is(.ctcl-email-setting-row, .ctcl-business-setting-row) > label { padding-top: 8px; font-weight: 600; }
:is(.ctcl-email-setting-row, .ctcl-business-setting-row) > :is(label, span) { float: none; width: auto; max-width: 100%; min-width: 0; }
.ctcl-business-setting-row h4 { grid-column: 1 / -1; margin: 8px 0; }
:is(.ctcl-payment-tab-content, .ctcl-shipping-tab-content, .ctc-smtp-email-setting, .ctcl-order-detail-main-cont) :is(input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=hidden]), select, textarea) {
   width: 100%;
   max-width: 100%;
   min-height: 40px;
   padding: 7px 10px;
   border: 1px solid #aab6c3;
   border-radius: 6px;
   background-color: #fff;
   color: #253346;
   font-size: 14px;
}
:is(.ctcl-payment-tab-content, .ctcl-shipping-tab-content, .ctc-smtp-email-setting, .ctcl-order-detail-main-cont) textarea { min-height: 110px; resize: vertical; }
:is(.ctclAdminPanel, .ctcSubNavTab, .ctcl-info-tab-main, .ctcl-payment-tab-content, .ctcl-shipping-tab-content, .ctc-smtp-email-setting, .ctcl-order-detail-main-cont) :is(a, input, select, textarea, button):focus-visible {
   outline: 2px solid #2271b1;
   outline-offset: 3px;
}
.ctcl-form-submit-button { margin: 24px 0 0; padding-top: 18px; border-top: 1px solid var(--ctcl-border); }
:is(.ctcl-payment-tab-content, .ctcl-shipping-tab-content, .ctc-smtp-email-setting, .ctcl-order-detail-main-cont) .button { min-height: 38px; padding: 3px 16px; border-radius: 6px; white-space: normal; }
.ctcl-test-email-row { margin-top: 20px; }
.ctcl-test-email-row input { margin-bottom: 10px; }
.ctcl-business-setting-row i { font-size: 11px; }
/* Tables retain all columns and scroll within their panel on small screens. */
:is(.ctcl-pending-orders-fieldset, .ctcl-complete-orders-fieldset) { overflow-x: auto; padding: 0 0 10px; }
:is(.ctcl-pending-orders-fieldset, .ctcl-complete-orders-fieldset) > legend { padding: 0; margin-bottom: 18px; font-size: 18px; font-weight: 600; }
:is(table.ctcl-pending-orders, table.ctcl-complete-orders) { min-width: 720px; width: 100%; border: 1px solid #dce2e8; border-spacing: 0; border-radius: 10px; overflow: hidden; box-shadow: none; }
:is(table.ctcl-pending-orders, table.ctcl-complete-orders) td { padding: 16px 14px; vertical-align: middle; text-align: left; overflow-wrap: anywhere; }
:is(table.ctcl-pending-orders, table.ctcl-complete-orders) thead td { background: #edf1f5; color: #455468; font-size: 12px; font-weight: 600; border-bottom: 1px solid #dce2e8; }
:is(table.ctcl-pending-orders, table.ctcl-complete-orders) tbody tr:nth-child(odd) { background: #fff; }
:is(table.ctcl-pending-orders, table.ctcl-complete-orders) tbody tr:nth-child(even) { background: #f8fafc; }
:is(table.ctcl-pending-orders, table.ctcl-complete-orders) tbody tr:hover { background: #eff5fb; }
:is(table.ctcl-pending-orders, table.ctcl-complete-orders) a { font-weight: 600; text-underline-offset: 3px; }
.ctcl-pending-special-instruct { margin: 0; }
:is(.ctcl-pending-orders-fieldset, .ctcl-complete-orders-fieldset) .page-numbers { display: inline-block; padding: 6px 11px; margin: 0 2px; border: 1px solid #dce2e8; border-radius: 5px; background: #fff; text-decoration: none; }
:is(.ctcl-pending-orders-fieldset, .ctcl-complete-orders-fieldset) .page-numbers.current { background: #eaf2fa; color: #174e82; }
.pending-order-modal-action { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin: 18px 0 26px; }
.ctcl-order-list-header,
.ctcl-ordered-item { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.5fr) minmax(30px, .5fr) minmax(55px, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid #e5eaf0; }
.ctcl-order-list-header { font-size: 12px; font-weight: 600; color: var(--ctcl-muted); }
:is(.ctcl-order-list-header, .ctcl-ordered-item) > span { min-width: 0; overflow-wrap: anywhere; }
:is(.ctcl-order-list-header, .ctcl-ordered-item) > span:last-child { text-align: right; }
:is(.ctcl-order-detail-total, .ctcl-order-detail-tax, .ctcl-order-detail-discount, .ctcl-order-detail-sub-total, .ctcl-order-detail-shipping) { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; }
.ctcl-order-detail-sub-total { margin-top: 8px; padding-top: 14px; border-top: 1px solid #dce2e8; font-weight: 700; }
.ctc-pending-customer-info-fieldset address { font-style: normal; }
.ctc-pending-customer-info-fieldset label { color: var(--ctcl-muted); }
.ctcl-vendor-note-submit { margin-top: 14px !important; }
#ctcl-print-order-list, #ctcl-print-cust-info { display: inline-block; margin-top: 16px; text-decoration: none; padding: 8px; border-radius: 5px; background: #edf3f9; }
@media (max-width: 782px) {
   .ctclAdminPanel, .ctcl-info-tab-main, .ctcl-payment-tab-content, .ctcl-shipping-tab-content, .ctc-smtp-email-setting, .ctcl-pending-orders-fieldset, .ctcl-complete-orders-fieldset, .ctcl-order-detail-main-cont { margin-right: 10px; }
   .ctclAdminPanel h2 { font-size: 22px; }
   :is(.ctclAdminPanel, .ctcSubNavTab) .nav-tab { padding: 10px; }
   .ctcl-email-setting-row, .ctcl-business-setting-row { grid-template-columns: 1fr; gap: 6px; }
   :is(.ctcl-info-tab, .ctcl-payment-tab-fieldset, .ctcl-shipping-tab-fieldset, .ctcl-pending-order-detail, .ctcl-complete-order-detail) fieldset, .ctcl-email-setting { padding: 18px; }
}
@media print {
   .pending-order-modal-action, #ctcl-print-order-list, #ctcl-print-cust-info { display: none; }
   .ctcl-pending-order-detail, .ctcl-complete-order-detail { display: block !important; }
   :is(.ctcl-pending-order-detail, .ctcl-complete-order-detail) > fieldset { box-shadow: none; break-inside: avoid; margin-bottom: 16px !important; }
}

/* Distinguish the setup guide from supplementary information. */
.ctcl-info-tab-main .ctcl-basic-info-header {
   padding: 16px 18px;
   border-left: 4px solid #2271b1;
   border-radius: 0 8px 8px 0;
   background: #eaf2fa;
   color: #174e82;
}
.ctcl-info-tab > fieldset:not(.ctcl-complete-other-info) {
   border-top: 3px solid #2271b1;
}
.ctcl-info-tab > fieldset:not(.ctcl-complete-other-info) > legend {
   color: #174e82;
}
.ctcl-info-tab > .ctcl-complete-other-info {
   grid-column: 1 / -1;
   background: #edf0f3;
   border-color: #cdd5de;
   box-shadow: none;
}
.ctcl-info-tab > .ctcl-complete-other-info > legend {
   padding: 5px 12px;
   border: 1px solid #cdd5de;
   border-radius: 6px;
   background: #e4e9ee;
   color: #39485a;
}
.ctcl-info-tab > .ctcl-complete-other-info:first-of-type,
.ctcl-info-tab > fieldset:not(.ctcl-complete-other-info) + .ctcl-complete-other-info {
   margin-top: 16px !important;
}
.ctcl-info-tab > .ctcl-complete-other-info li { margin-bottom: 10px; }
.ctcl-info-tab > .ctcl-complete-other-info ol { margin-top: 10px; margin-bottom: 0; }
/* Keep the information sub-navigation visually secondary to the main tabs. */
.ctcSubNavTab { margin: 18px 20px 24px 0; padding: 0; border: 0; border-bottom: 1px solid #cdd5de; border-radius: 0; background: transparent; }
.ctcSubNavTab .nav-tab { border-radius: 0; border-bottom: 3px solid transparent; }
.ctcSubNavTab .nav-tab-active { border-bottom-color: #2271b1; background: transparent; color: #174e82; }

/* Consistent section headings and cards across the admin workspace. */
.ctclAdminPanel ~ h3.dashicons.dashicons-editor-insertmore {
   display: flex;
   align-items: center;
   gap: 10px;
   width: auto;
   height: auto;
   margin: 28px 20px 16px 0;
   padding: 0;
   color: #253346;
   font-family: inherit;
   font-size: 20px;
   font-weight: 600;
   line-height: 1.4;
   text-align: left;
}
.ctclAdminPanel ~ h3.dashicons.dashicons-editor-insertmore::before {
   font-family: dashicons;
   font-size: 20px;
   color: #596779;
}
:is(.ctcl-payment-tab-fieldset, .ctcl-shipping-tab-fieldset, .ctc-smtp-email-setting, .ctcl-pending-orders-fieldset, .ctcl-complete-orders-fieldset, .ctcl-order-detail-main-cont) > legend {
   width: 100%;
   padding: 0 0 16px;
   margin: 0 0 24px;
   border-bottom: 1px solid #dce2e8;
   color: #253346;
   font-size: 20px;
   font-weight: 600;
   line-height: 1.4;
   text-align: left;
}
:is(.ctcl-payment-tab-fieldset, .ctcl-shipping-tab-fieldset, .ctc-smtp-email-setting, .ctcl-pending-orders-fieldset, .ctcl-complete-orders-fieldset, .ctcl-order-detail-main-cont) > legend::before {
   margin-right: 8px;
   color: #596779;
   vertical-align: middle;
}
.ctcl-info-tab-main .ctcl-basic-info-header {
   margin: 28px 0 22px;
   padding: 0 0 16px;
   border: 0;
   border-bottom: 1px solid #dce2e8;
   border-radius: 0;
   background: transparent;
   color: #253346;
   font-size: 18px;
   font-weight: 600;
}
:is(.ctcl-info-tab, .ctcl-payment-tab-fieldset, .ctcl-shipping-tab-fieldset, .ctcl-pending-order-detail, .ctcl-complete-order-detail) fieldset,
.ctcl-email-setting {
   border-top: 3px solid #2271b1;
   border-radius: 10px;
   padding: 24px;
   background: #fff;
   box-shadow: 0 2px 8px rgb(25 40 60 / 4%);
}
:is(.ctcl-info-tab, .ctcl-payment-tab-fieldset, .ctcl-shipping-tab-fieldset, .ctcl-pending-order-detail, .ctcl-complete-order-detail) fieldset > legend,
.ctcl-email-setting > legend {
   padding: 5px 12px;
   border: 1px solid #d3e1ef;
   border-radius: 6px;
   background: #edf4fb;
   color: #174e82;
   font-size: 14px;
   font-weight: 600;
   line-height: 1.5;
}
:is(.ctcl-info-tab, .ctcl-payment-tab-fieldset, .ctcl-shipping-tab-fieldset, .ctcl-pending-order-detail, .ctcl-complete-order-detail) fieldset > legend::before,
.ctcl-email-setting > legend::before { margin-right: 6px; vertical-align: middle; }
/* Supplementary information retains its quieter, separate visual treatment. */
.ctcl-info-tab > .ctcl-complete-other-info {
   border-top: 3px solid #9aa8b6;
   background: #edf0f3;
   box-shadow: none;
}
.ctcl-info-tab > .ctcl-complete-other-info > legend {
   border-color: #cdd5de;
   background: #e4e9ee;
   color: #39485a;
}
@media (max-width: 782px) {
   .ctclAdminPanel ~ h3.dashicons.dashicons-editor-insertmore { font-size: 18px; margin-right: 10px; }
   :is(.ctcl-payment-tab-fieldset, .ctcl-shipping-tab-fieldset, .ctc-smtp-email-setting, .ctcl-pending-orders-fieldset, .ctcl-complete-orders-fieldset, .ctcl-order-detail-main-cont) > legend { font-size: 18px; }
   :is(.ctcl-info-tab, .ctcl-payment-tab-fieldset, .ctcl-shipping-tab-fieldset, .ctcl-pending-order-detail, .ctcl-complete-order-detail) fieldset,
   .ctcl-email-setting { padding: 18px; }
}
