/* =====================================================================
   IPTVTOOL - Client area black & gold override (additive, presentation only)
   Added: 2026-11-29

   Purpose:
     Make the WHMCS client area match the premium black & gold theme on the
     pages that the dark theme (css/iptvtool.css) does NOT reach - above all
     the standalone invoice page (viewinvoice.php), whose <body> has no
     .it-body class and which loads only the Nexus base stylesheets, so it
     rendered as a white panel inside the dark site.

   Scope / safety:
     - All invoice-page work is scoped to  body:not(.it-body)  so it can NEVER
       touch the main client area (whose <body class="it-body"> is already
       themed by iptvtool.css). On the main pages this file only adds a couple
       of value-matched reinforcements (dark DataTables search box, extra
       invoice status colours).
     - Colours reuse the exact theme tokens from css/iptvtool.css.

   Fully reversible: delete this file and remove its two <link> include lines
   (templates/iptvtool/includes/head.tpl and templates/nexus/viewinvoice.tpl).
   ===================================================================== */

:root {
    --itx-bg:          #0B0B0E;
    --itx-bg-2:        #111116;
    --itx-card:        #16161C;
    --itx-card-2:      #1C1C24;
    --itx-gold:        #D4AF37;
    --itx-gold-light:  #E6C982;
    --itx-gold-dark:   #B8902A;
    --itx-gold-grad:   linear-gradient(135deg, #F3D27A 0%, #D4AF37 55%, #B8902A 100%);
    --itx-text:        #F2F0EA;
    --itx-text-2:      #C9C9D1;
    --itx-muted:       #A3A3AE;
    --itx-line:        rgba(255, 255, 255, .08);
    --itx-line-2:      rgba(255, 255, 255, .12);
    --itx-border:      rgba(212, 175, 55, .28);
    --itx-border-strong: rgba(230, 201, 130, .55);
    --itx-input:       #0F0F14;
    --itx-on-gold:     #141414;
    --itx-green:       #4caf50;
    --itx-green-text:  #8FE6A1;
    --itx-green-bg:    rgba(46, 125, 50, .22);
    --itx-orange:      #ff9800;
    --itx-orange-text: #F6C96A;
    --itx-orange-bg:   rgba(239, 108, 0, .20);
    --itx-red:         #E53935;
    --itx-shadow:      0 18px 50px rgba(0, 0, 0, .45);
}

/* =====================================================================
   PART A - Standalone pages that are NOT the dark main theme
   (viewinvoice.php and any other page whose body lacks .it-body)
   ===================================================================== */

body:not(.it-body) {
    background-color: var(--itx-bg) !important;
    color: var(--itx-text) !important;
}

body:not(.it-body) a            { color: var(--itx-gold-light); }
body:not(.it-body) a:hover,
body:not(.it-body) a:focus      { color: #F3D27A; }
body:not(.it-body) hr           { border-top-color: var(--itx-line) !important; }
body:not(.it-body) strong       { color: inherit; }

/* ---- Invoice panel & generic cards / panels / wells ---- */
body:not(.it-body) .invoice-container,
body:not(.it-body) .card,
body:not(.it-body) .card.bg-default,
body:not(.it-body) .panel,
body:not(.it-body) .well,
body:not(.it-body) .modal-content {
    background-color: var(--itx-card) !important;
    color: var(--itx-text) !important;
    border: 1px solid var(--itx-border) !important;
    box-shadow: var(--itx-shadow);
}
body:not(.it-body) .modal-body,
body:not(.it-body) .card-body  { background-color: transparent !important; color: var(--itx-text) !important; }

body:not(.it-body) .card-header {
    background-color: var(--itx-card-2) !important;
    color: var(--itx-gold) !important;
    border-bottom: 1px solid var(--itx-border) !important;
}

/* ---- Headers in gold ---- */
body:not(.it-body) h1,
body:not(.it-body) h2,
body:not(.it-body) h3,
body:not(.it-body) h4,
body:not(.it-body) .card-title,
body:not(.it-body) .card-subtitle {
    color: var(--itx-gold) !important;
}

/* secondary / address / muted text stays light, not gold */
body:not(.it-body) address,
body:not(.it-body) .small-text,
body:not(.it-body) .text-muted,
body:not(.it-body) p,
body:not(.it-body) label,
body:not(.it-body) .control-label { color: var(--itx-text-2) !important; }

/* ---- Tables (invoice line items + transactions ledger) ---- */
body:not(.it-body) .table,
body:not(.it-body) .table-sm            { color: var(--itx-text) !important; background-color: transparent !important; }
body:not(.it-body) .table th,
body:not(.it-body) .table td            { color: var(--itx-text) !important; background-color: transparent !important; border-color: var(--itx-line) !important; }
body:not(.it-body) .table thead th,
body:not(.it-body) .table thead td      { color: var(--itx-gold) !important; border-bottom: 1px solid var(--itx-border) !important; }
body:not(.it-body) .table-striped tbody tr:nth-of-type(odd),
body:not(.it-body) .table-striped tbody tr:nth-of-type(odd) > td {
    background-color: rgba(255, 255, 255, .03) !important;
}
body:not(.it-body) .invoice-container td.total-row,
body:not(.it-body) .total-row {
    background-color: var(--itx-card-2) !important;
    color: var(--itx-text) !important;
}

/* ---- Invoice status word: PAID = green, UNPAID / PENDING = orange ---- */
body:not(.it-body) .invoice-status .paid,
body:not(.it-body) .invoice-status .issued    { color: var(--itx-green) !important; }
body:not(.it-body) .invoice-status .unpaid,
body:not(.it-body) .invoice-status .collections { color: var(--itx-orange) !important; }
body:not(.it-body) .invoice-status .refunded  { color: var(--itx-gold-light) !important; }
body:not(.it-body) .invoice-status .draft,
body:not(.it-body) .invoice-status .cancelled { color: var(--itx-muted) !important; }

/* ---- Inputs / search / gateway select ---- */
body:not(.it-body) .form-control,
body:not(.it-body) .custom-select,
body:not(.it-body) select.form-control,
body:not(.it-body) input[type="text"],
body:not(.it-body) input[type="email"],
body:not(.it-body) input[type="password"],
body:not(.it-body) input[type="search"],
body:not(.it-body) input[type="tel"],
body:not(.it-body) input[type="number"],
body:not(.it-body) textarea {
    background-color: var(--itx-input) !important;
    color: var(--itx-text) !important;
    border: 1px solid var(--itx-line-2) !important;
}
body:not(.it-body) .form-control::placeholder,
body:not(.it-body) input::placeholder    { color: #8A8A96 !important; opacity: 1; }
body:not(.it-body) .form-control:focus,
body:not(.it-body) .custom-select:focus  { border-color: var(--itx-border-strong) !important; box-shadow: 0 0 0 3px rgba(212, 175, 55, .18) !important; }

/* ---- Buttons ---- */
body:not(.it-body) .btn-default,
body:not(.it-body) .btn-secondary {
    background-color: transparent !important;
    color: var(--itx-gold-light) !important;
    border: 1px solid var(--itx-border) !important;
}
body:not(.it-body) .btn-default:hover,
body:not(.it-body) .btn-secondary:hover {
    background-color: rgba(212, 175, 55, .12) !important;
    color: #F3D27A !important;
}
body:not(.it-body) .btn-primary,
body:not(.it-body) .btn-success {
    background: var(--itx-gold-grad) !important;
    border: 1px solid var(--itx-gold) !important;
    color: var(--itx-on-gold) !important;
    font-weight: 700;
}

/* ---- Responsive (mobile) ---- */
@media (max-width: 575px) {
    body:not(.it-body) .invoice-container { padding: 28px 18px 52px !important; }
    body:not(.it-body) .invoice-status    { font-size: 20px !important; }
}

/* =====================================================================
   PART B - Main dark theme (.it-body) reinforcements only
   Value-matched to css/iptvtool.css so there is no visual regression;
   closes small gaps the client asked about.
   ===================================================================== */

/* DataTables search box guaranteed dark (Services / Invoices / etc.) */
.it-body .dataTables_wrapper .dataTables_filter input,
.it-body .dataTables_wrapper input[type="search"] {
    background-color: var(--itx-input) !important;
    color: var(--itx-text) !important;
    border: 1px solid var(--itx-line-2) !important;
    border-radius: 10px;
}
.it-body .dataTables_wrapper .dataTables_filter input::placeholder { color: #8A8A96 !important; opacity: 1; }

/* Extra invoice/service status classes not covered by iptvtool.css */
.it-body .label.status.status-paymentpending,
.it-body .status-paymentpending {
    background: var(--itx-orange-bg) !important;
    color: var(--itx-orange-text) !important;
}
.it-body .label.status.status-refunded,
.it-body .status-refunded {
    background: rgba(212, 175, 55, .16) !important;
    color: var(--itx-gold-light) !important;
}
