/* 
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, customized for the Web Tech Craft payment portal.
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.1.0
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

:root {
  --wtc-bg: #f4f7fb;
  --wtc-surface: #ffffff;
  --wtc-surface-soft: #f8fafc;
  --wtc-text: #0f172a;
  --wtc-muted: #64748b;
  --wtc-border: #e2e8f0;
  --wtc-primary: #1d4ed8;
  --wtc-primary-dark: #1e3a8a;
  --wtc-success: #16a34a;
  --wtc-danger: #dc2626;
  --wtc-warning: #f59e0b;
  --wtc-shadow: 0 24px 70px rgba(15, 23, 42, .08);
  --wtc-shadow-soft: 0 14px 36px rgba(15, 23, 42, .07);
  --wtc-radius: 22px;
  --wtc-radius-sm: 14px;
}

body {
  background: radial-gradient(circle at top left, rgba(29, 78, 216, .10), transparent 32%), var(--wtc-bg);
  color: var(--wtc-text);
}

body, button, input, select, textarea {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#invoice-portal {
  max-width: 1180px;
  margin: 34px auto;
  padding: clamp(18px, 2vw, 28px);
  border: 1px solid rgba(226, 232, 240, .85);
  border-radius: 30px;
  background: rgba(255, 255, 255, .78);
  box-shadow: var(--wtc-shadow);
  backdrop-filter: blur(18px);
}

#invoice-portal::before {
  content: "Payment Portal";
  display: block;
  margin-bottom: 8px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
  font-weight: 850;
  letter-spacing: -.04em;
  color: var(--wtc-text);
}

#invoice-portal::after {
  content: "Create, send, track, and collect invoice payments from a clean secure dashboard.";
  display: block;
  margin: 20px 0 24px;
  color: var(--wtc-muted);
  font-size: 15px;
}

.invoice-tabs {
  display: flex;
  gap: 10px;
  margin: 0 0 22px !important;
  padding: 8px !important;
  list-style: none !important;
  background: var(--wtc-surface-soft);
  border: 1px solid var(--wtc-border);
  border-radius: 18px;
  overflow-x: auto;
}

.invoice-tabs li {
  min-width: max-content;
  cursor: pointer;
  padding: 12px 18px;
  border-radius: 13px;
  color: var(--wtc-muted);
  font-size: 14px;
  font-weight: 750;
  transition: all .22s ease;
}

.invoice-tabs li:hover {
  color: var(--wtc-primary);
  background: #fff;
}

.invoice-tabs li.active {
  background: linear-gradient(135deg, var(--wtc-primary), #2563eb);
  color: #fff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, .22);
}

.invoice-tab-content {
  min-height: 280px;
}

.wtc-card-form,
#invoice-create-form,
#invoice-brand-form {
  background: var(--wtc-surface);
  border: 1px solid var(--wtc-border);
  border-radius: var(--wtc-radius);
  padding: clamp(18px, 2.3vw, 30px);
  box-shadow: var(--wtc-shadow-soft);
}

.invoice-inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.invoice-inner p,
#invoice-brand-form p,
#invoice-create-form p {
  margin: 0 0 16px;
}

#invoice-create-form h3 {
  margin: 12px 0 14px;
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -.02em;
}

#invoice-create-form label,
#invoice-brand-form label {
  display: block;
  color: var(--wtc-text);
  font-size: 13px;
  font-weight: 750;
}

#invoice-create-form input,
#invoice-create-form select,
#invoice-brand-form input,
#invoice-brand-form textarea,
#invoice-brand-form select {
  width: 100%;
  margin-top: 7px;
  min-height: 46px;
  border: 1px solid var(--wtc-border);
  border-radius: 14px;
  background: #fff;
  color: var(--wtc-text);
  padding: 11px 13px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

#invoice-create-form input:focus,
#invoice-create-form select:focus,
#invoice-brand-form input:focus,
#invoice-brand-form textarea:focus,
#invoice-brand-form select:focus {
  border-color: rgba(29, 78, 216, .55);
  box-shadow: 0 0 0 4px rgba(29, 78, 216, .10);
}

#line-items {
  display: grid;
  gap: 12px;
}

.line-item {
  display: grid;
  grid-template-columns: 1.5fr .55fr .75fr auto;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--wtc-border);
  border-radius: 18px;
  background: var(--wtc-surface-soft);
}

#add-line-item,
.remove-line-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none !important;
}

#add-line-item {
  padding: 0 16px;
  color: var(--wtc-primary);
  border: 1px solid rgba(29, 78, 216, .22);
  background: rgba(29, 78, 216, .06);
}

.remove-line-item {
  border: 1px solid rgba(220, 38, 38, .18);
  background: rgba(220, 38, 38, .06);
  color: var(--wtc-danger);
  padding: 0 14px;
  cursor: pointer;
}

#invoice-create-form button[type="submit"],
#invoice-brand-form button[type="submit"],
#payment-form button[type="submit"],
#square-pay-button-card,
.logout-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border: 0 !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, var(--wtc-primary), var(--wtc-primary-dark)) !important;
  color: #fff !important;
  min-height: 48px;
  padding: 0 24px !important;
  font-size: 14px;
  font-weight: 850 !important;
  letter-spacing: -.01em;
  text-decoration: none !important;
  box-shadow: 0 14px 26px rgba(29, 78, 216, .22);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

#invoice-create-form button[type="submit"]:hover,
#invoice-brand-form button[type="submit"]:hover,
#payment-form button[type="submit"]:hover,
#square-pay-button-card:hover,
.logout-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(29, 78, 216, .28);
}

button:disabled {
  opacity: .68;
  cursor: wait !important;
}

.invoice-tab-pane h3,
.invoice-tab-pane > h3 {
  margin: 18px 0 12px;
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -.025em;
}

.invoice-tab-pane table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  overflow: hidden;
  border: 1px solid var(--wtc-border) !important;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--wtc-shadow-soft);
}

.invoice-tab-pane th {
  background: #f8fafc;
  color: var(--wtc-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 14px !important;
  text-align: left;
}

.invoice-tab-pane td {
  color: var(--wtc-text);
  padding: 15px 14px !important;
  border-bottom: 1px solid var(--wtc-border) !important;
  vertical-align: top;
}

.invoice-tab-pane tr:last-child td {
  border-bottom: 0 !important;
}

.invoice-tab-pane td a {
  color: var(--wtc-primary);
  font-weight: 800;
  text-decoration: none;
}

.invoice-tab-pane hr {
  border: 0;
  border-top: 1px solid var(--wtc-border);
  margin: 28px 0 18px;
}

.invoice-tab-pane ul:not(.invoice-tabs) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 0 !important;
  list-style: none !important;
}

.invoice-tab-pane ul:not(.invoice-tabs) li {
  border: 1px solid var(--wtc-border);
  border-radius: 18px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
}

.wtc-alert,
#invoice-message > div,
#brand-form-message > div,
#payment-message,
#square-payment-message {
  margin: 0 0 16px;
  padding: 13px 15px !important;
  border-radius: 14px !important;
  font-size: 14px !important;
  font-weight: 700;
}

.wtc-alert-success,
#invoice-message > div:not(.wtc-alert-error),
#brand-form-message > div:not(.wtc-alert-error) {
  color: #166534 !important;
  background: #dcfce7 !important;
  border: 1px solid #bbf7d0 !important;
}

.wtc-alert-error {
  color: #991b1b !important;
  background: #fee2e2 !important;
  border: 1px solid #fecaca !important;
}

.wtc-topbar {
  max-width: 1180px;
  margin: 14px auto -12px;
  display: flex;
  justify-content: flex-end;
  padding: 0 18px;
}

/* Public invoice/payment page revamp. The original template uses inline styles, so these selectors gently upgrade it. */
body:has(#payment-form),
body:has(#square-container),
body:has(#thank-u) {
  background: radial-gradient(circle at top right, rgba(37, 99, 235, .14), transparent 34%), linear-gradient(180deg, #eff6ff 0%, #f8fafc 45%, #f1f5f9 100%);
}

#payment-form,
#square-container {
  padding: 2px;
}

#payment-form label.my-check {
  margin: 14px 0 !important;
  padding: 12px 14px;
  border: 1px solid var(--wtc-border);
  border-radius: 14px;
  background: var(--wtc-surface-soft);
}

#payment-element,
#card-container {
  padding: 16px;
  border: 1px solid var(--wtc-border);
  border-radius: 18px;
  background: #fff;
}

.card-md {
  display: flex !important;
  gap: 18px;
  justify-content: space-between;
  align-items: flex-start;
}

.site-title-custom {
  font-size: 20px !important;
  letter-spacing: -.02em;
}

.summary-p-custom {
  color: var(--wtc-primary-dark) !important;
  letter-spacing: -.04em;
}

.brand-q-custom {
  padding: 12px;
  border: 1px solid var(--wtc-border);
  border-radius: 16px;
  background: var(--wtc-surface-soft);
}

summary {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--wtc-surface-soft);
  font-weight: 800;
}

#thank-u {
  max-width: 560px;
  padding: clamp(28px, 5vw, 56px) !important;
  background: #fff;
  border: 1px solid var(--wtc-border);
  border-radius: 30px;
  box-shadow: var(--wtc-shadow);
}

#thank-u img {
  width: 86px;
  height: 86px;
  padding: 16px;
  border-radius: 999px;
  background: #dcfce7;
}

#thank-u h1 {
  color: var(--wtc-text);
  letter-spacing: -.05em;
}

@media (max-width: 900px) {
  .invoice-inner,
  .invoice-tab-pane ul:not(.invoice-tabs) {
    grid-template-columns: 1fr;
  }

  .line-item {
    grid-template-columns: 1fr;
  }

  .invoice-tab-pane table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .card-md {
    flex-direction: column;
  }

  .card-fd,
  .card-sd {
    width: 100% !important;
  }

  .brand-m-custom {
    text-align: left !important;
  }
}

@media (max-width: 560px) {
  #invoice-portal {
    margin: 16px 10px;
    border-radius: 22px;
  }

  .invoice-tabs {
    border-radius: 15px;
  }

  .invoice-tabs li {
    padding: 10px 13px;
  }
}

/* =====================================================
   Dashboard/Table UI Upgrade
   Add this at the BOTTOM of old style.css
   Do not replace the old CSS
===================================================== */

/* Portal dashboard polish only */
#invoice-portal {
  max-width: 1240px;
  padding: 32px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255,255,255,.92), #f8fbff);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.10);
}

/* Better tab style, but keep old behavior */
#invoice-portal .invoice-tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px !important;
  margin: 20px 0 28px !important;
  background: #eef4ff;
  border: 1px solid #dbeafe;
  border-radius: 999px;
}

#invoice-portal .invoice-tabs li {
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  color: #475569;
}

#invoice-portal .invoice-tabs li:hover {
  color: #1d4ed8;
  background: #ffffff;
}

#invoice-portal .invoice-tabs li.active {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
}

/* Section headings */
#invoice-portal .invoice-tab-pane h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0px 0 16px;
  font-size: 18px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.02em;
}

#invoice-portal .invoice-tab-pane h3::before {
  content: "";
  width: 9px;
  height: 22px;
  flex: 0 0 9px;
  border-radius: 999px;
  background: linear-gradient(180deg, #2563eb, #38bdf8);
}

/* Table wrapper */
.wtc-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
  margin-bottom: 34px;
}

/* Modern table */
#invoice-portal .invoice-tab-pane table {
  width: 100%;
  min-width: 1050px;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  margin: 0 !important;
  background: transparent;
  border: 0 !important;
  box-shadow: none !important;
  font-size: 13px;
}

#invoice-portal .invoice-tab-pane table th {
  padding: 16px 15px !important;
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

#invoice-portal .invoice-tab-pane table td {
  padding: 17px 15px !important;
  color: #0f172a;
  font-weight: 600;
  vertical-align: middle;
  border-bottom: 1px solid #edf2f7 !important;
  background: #ffffff;
}

#invoice-portal .invoice-tab-pane table tr:last-child td {
  border-bottom: none !important;
}

#invoice-portal .invoice-tab-pane table tr:hover td {
  background: #f8fbff;
}

/* Client column */
#invoice-portal .invoice-tab-pane table td:first-child {
  min-width: 175px;
  font-weight: 900;
}

#invoice-portal .invoice-tab-pane table td small {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  word-break: break-word;
}

/* Amount column */
#invoice-portal .invoice-tab-pane table td:nth-child(2) {
  font-weight: 900;
  color: #111827;
  white-space: nowrap;
}

/* Items column */
#invoice-portal .invoice-tab-pane table td:nth-child(3) {
  max-width: 220px;
  color: #334155;
  line-height: 1.45;
}

/* Payment method dot */
#invoice-portal .invoice-tab-pane table td:nth-child(5)::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 999px;
  background: #2563eb;
}

/* Table links */
#invoice-portal .invoice-tab-pane table a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb !important;
  font-size: 11px;
  font-weight: 900;
  text-decoration: none !important;
  transition: all 0.22s ease;
}

#invoice-portal .invoice-tab-pane table a:hover {
  background: #2563eb;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}

/* Pay Now button */
#invoice-portal .invoice-tab-pane table td:last-child a {
  background: #0f172a;
  color: #ffffff !important;
}

#invoice-portal .invoice-tab-pane table td:last-child a:hover {
  background: #2563eb;
}

/* Paid badge */
#invoice-portal .invoice-tab-pane table span[style*="green"] {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  background: #dcfce7 !important;
  color: #15803d !important;
  font-size: 12px;
  font-weight: 900 !important;
}

/* Summary cards only, not all ULs */
#invoice-portal .invoice-tab-pane ul:not(.invoice-tabs) {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 0 !important;
  margin: 18px 0 0;
  list-style: none !important;
}

#invoice-portal .invoice-tab-pane ul:not(.invoice-tabs) li {
  position: relative;
  overflow: hidden;
  min-height: 110px;
  padding: 20px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

#invoice-portal .invoice-tab-pane ul:not(.invoice-tabs) li::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 95px;
  height: 95px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.08);
}

#invoice-portal .invoice-tab-pane ul:not(.invoice-tabs) li strong {
  display: block;
  margin-top: 12px;
  font-size: 26px;
  line-height: 1.1;
  font-weight: 950;
  color: #0f172a;
  letter-spacing: -0.04em;
}

/* Hide old divider before summary */
#invoice-portal .invoice-tab-pane hr {
  display: none;
}

/* Responsive */
@media (max-width: 1024px) {
  #invoice-portal {
    margin: 20px;
    padding: 22px;
  }

  .wtc-table-wrap {
    overflow-x: auto;
  }

  #invoice-portal .invoice-tab-pane ul:not(.invoice-tabs) {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  #invoice-portal {
    padding: 18px;
    border-radius: 22px;
  }

  #invoice-portal .invoice-tabs {
    width: 100%;
    overflow-x: auto;
    border-radius: 16px;
  }

  #invoice-portal .invoice-tabs li {
    white-space: nowrap;
  }
}