﻿/* Farmedia: a quieter, shared WHMCS design layer. */
:root {
    --saas-ink: #17243a;
    --saas-muted: #64748b;
    --saas-line: #e2e8f0;
    --saas-canvas: #f6f8fb;
    --saas-blue: #2856d7;
    --saas-radius: 12px;
    --saas-shadow: 0 2px 8px rgba(15, 23, 42, .04);
}

body { color: var(--saas-ink); background: var(--saas-canvas); }
body h1, body h2, body h3, body h4 { letter-spacing: -.025em; }
section#main-body { background: var(--saas-canvas); background-image: none; padding-top: 24px; }
header.header { background: #fff; border-bottom: 1px solid var(--saas-line); box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
header.header::after, body:has(#main-body)::before, body:has(.login-form) #main-body::before, body:has(.login-form) #main-body::after, .login-form .card::before { content: none !important; }
header.header .topbar { background: #17243a; }
header.header .navbar.navbar-light { min-height: 68px; }
header.header #mainNavbar .navbar-nav > li > a { font-weight: 600; }
header.header .collapsable-dropdown-menu, .dropdown-menu, .popover { border: 1px solid var(--saas-line); border-radius: 10px; box-shadow: 0 12px 28px rgba(15, 23, 42, .1); backdrop-filter: none; -webkit-backdrop-filter: none; }
.master-breadcrumb { background: #fff; border-bottom: 1px solid var(--saas-line); box-shadow: none; }
.master-breadcrumb::before, .master-breadcrumb::after { content: none !important; }

/* The existing WHMCS domain form, featured TLDs, and captcha remain intact. */
#frmDomainHomepage .home-domain-search { background: #172b4d !important; background-image: none !important; }
#frmDomainHomepage .home-domain-search::before, #frmDomainHomepage .home-domain-search::after,
#frmDomainHomepage .home-domain-search > .container::before, #frmDomainHomepage .home-domain-search > .container::after,
#frmDomainHomepage .home-domain-search .p-5::before, #frmDomainHomepage .home-domain-search .p-5::after,
#frmDomainHomepage .home-domain-search h2::before, #frmDomainHomepage .home-domain-search h2::after { content: none !important; }
#frmDomainHomepage .home-domain-search .p-5 { padding: 64px 0 56px !important; }
#frmDomainHomepage .home-domain-search h2 { color: #fff; font-size: clamp(1.8rem, 3.6vw, 2.7rem); line-height: 1.18; filter: none; text-shadow: none; }
body #frmDomainHomepage .input-group-wrapper { max-width: 720px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .12); animation: none; }
#frmDomainHomepage .home-domain-search .input-group, #frmDomainHomepage .home-domain-search input.form-control { animation: none; }

/* Shared surfaces. Accent colours are reserved for meaningful status and actions. */
body #main-body .card:not([class*="bg-"]), body #main-body .tiles .tile, body #main-body .action-icon-btns a {
    border: 1px solid var(--saas-line); border-radius: var(--saas-radius); background: #fff; box-shadow: var(--saas-shadow);
}
body #main-body .card:hover, body #main-body .tiles .tile:hover, body #main-body .action-icon-btns a:hover { transform: none; box-shadow: 0 6px 18px rgba(15, 23, 42, .07); }
.card-columns.home .card::before, .card-columns.home .card-body::before,
.client-home-cards .card[class*="card-accent-"]::before { content: none !important; }
body #main-body .card-columns.home .card { background: #fff; }
.card-columns.home .card .saas-card-icon, .card-columns.home .card:hover .saas-card-icon { width: 48px !important; height: 48px !important; max-width: 100%; filter: none; transform: none; }
.card-columns.home .pricing-card-title { color: var(--saas-ink); }
.card-columns.home .card p { color: var(--saas-muted); }
body #main-body .action-icon-btns .ico-container, body #main-body .action-icon-btns a:hover .ico-container { background: #edf3ff; transform: none; }
body #main-body .action-icon-btns .ico-container i, body #main-body .action-icon-btns a:hover .ico-container i { color: var(--saas-blue); }
body #main-body .tiles .tile .stat { color: var(--saas-ink); }
.card-header:not([class*="bg-"]), .client-home-cards .card-header:not([class*="bg-"]) { background: #fff; border-bottom: 1px solid var(--saas-line); }
.card-sidebar .list-group-item.active, .card-sidebar .list-group-item-action.active { background: #edf3ff; color: #2349b5; box-shadow: inset 3px 0 0 var(--saas-blue); }

body .btn { border-radius: 8px; font-weight: 600; transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease; }
body .btn-primary, body #main-body .card-columns.home .card:hover .btn-outline-primary { background: var(--saas-blue); border-color: var(--saas-blue); color: #fff; box-shadow: none; }
body .btn-primary:hover, body .btn-primary:focus { background: #2049bd; border-color: #2049bd; transform: none; box-shadow: none; }
.btn-primary:not(.dropdown-toggle)::after { content: none !important; }
.form-control, .custom-select { border-color: #cbd5e1; border-radius: 8px; box-shadow: none; }
.form-control:focus, .custom-select:focus { border-color: #6488e5; box-shadow: 0 0 0 3px rgba(40, 86, 215, .13); }
.table thead th, table.dataTable thead th { color: #526175; background: #f8fafc; border-color: var(--saas-line); }
.table td, .table th { border-color: var(--saas-line); }
.table-list tbody tr:hover, table.dataTable tbody tr:hover { background: #f8faff; }
.modal-content { border: 1px solid var(--saas-line); border-radius: 12px; box-shadow: 0 20px 50px rgba(15, 23, 42, .18); }

/* Cart selectors apply only when the corresponding WHMCS order form is active. */
body #order-standard_cart .domain-checker-container { background: #172b4d; background-image: none; box-shadow: none; }
body #order-standard_cart .domain-checker-container::before, body #order-standard_cart .domain-checker-container::after { content: none !important; }
body #order-standard_cart .product, body #order-standard_cart .spotlight-tld, body #order-standard_cart .order-summary { border-radius: var(--saas-radius); box-shadow: var(--saas-shadow); }
footer.footer { background: #17243a; background-image: none; box-shadow: none; }
footer.footer::before, footer.footer::after { content: none !important; }

@media (max-width: 767.98px) {
    section#main-body { padding-top: 16px; }
    #frmDomainHomepage .home-domain-search .p-5 { padding: 40px 0 36px !important; }
    body #main-body .card:not([class*="bg-"]), body #main-body .tiles .tile, body #main-body .action-icon-btns a { border-radius: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    body .btn { transition: none; }
}
@media print {
    body { background: #fff; }
    .modal-content, .invoice-container .card { box-shadow: none; }
}

/* Keep the domain actions and keyboard focus usable on small screens. */
@media (max-width: 375px) {
    #frmDomainHomepage .row.d-sm-none > .col-6 { flex: 0 0 100%; max-width: 100%; }
}
body .btn-primary:focus-visible { outline: 2px solid #93b4ff; outline-offset: 2px; box-shadow: 0 0 0 3px rgba(40, 86, 215, .2); }
