/**
 * briskData brand layer for HostBill 2019-based template
 * Matches briskdata.com fonts, colors, and hero animation
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500&family=Manrope:wght@300;400;500;600;700&display=swap');

:root {
    --bd-bg: #f7f4ee;
    --bd-heading: #0f172a;
    --bd-text: #1e293b;
    --bd-muted: #475569;
    --bd-subtle: #64748b;
    --bd-blue: #2563eb;
    --bd-blue-dark: #1d4ed8;
    --bd-amber: #f59e0b;
    --bd-border: rgba(148, 163, 184, 0.24);
    --bd-navbar-height: 72px;
}

/* ---- Typography & base ---- */

body.template_2019.bd-theme {
    font-family: 'Manrope', Arial, sans-serif !important;
    background:
        radial-gradient(circle at top left, rgba(251, 191, 36, 0.12), transparent 24%),
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 30%),
        var(--bd-bg) !important;
    color: var(--bd-text) !important;
}

body.template_2019.bd-theme h1,
body.template_2019.bd-theme h2,
body.template_2019.bd-theme h3,
body.template_2019.bd-theme h4,
body.template_2019.bd-theme h5 {
    font-family: 'Manrope', Arial, sans-serif !important;
    color: var(--bd-heading);
    font-weight: 500;
}

body.template_2019.bd-theme .text-primary {
    color: var(--bd-blue-dark) !important;
}

body.template_2019.bd-theme a {
    color: var(--bd-blue-dark);
}

body.template_2019.bd-theme a:hover {
    color: var(--bd-amber);
}

/* ---- Page body text ---- */

body.template_2019.bd-theme .body-content .section-main {
    font-weight: 700 !important;
}

body.template_2019.bd-theme .body-content .section-main * {
    font-weight: inherit !important;
}

body.template_2019.bd-theme .body-content .section-main .material-icons,
body.template_2019.bd-theme .body-content .section-main [class*="fa-"] {
    font-weight: normal !important;
}

/* ---- Navbar ---- */

body.template_2019.bd-theme .navbar.fixed-top {
    background: rgba(247, 244, 238, 0.88) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(30, 41, 59, 0.08) !important;
    box-shadow: none !important;
    z-index: 1030;
}

body.template_2019.bd-theme .navbar .navbar-left {
    position: relative;
    z-index: 1031;
    background: transparent !important;
}

body.template_2019.bd-theme .navbar .navbar-left .navbar-brand {
    display: flex;
    align-items: center;
    height: auto;
    max-height: none;
    overflow: visible;
    padding-top: 0;
    padding-bottom: 0;
    line-height: normal;
}

body.template_2019.bd-theme .navbar .navbar-left .navbar-brand img {
    display: block;
    height: 46px;
    width: auto;
    max-height: 46px;
    max-width: 200px;
    object-fit: contain;
    object-position: center;
}

body.template_2019.bd-theme .navbar .btn-success,
body.template_2019.bd-theme .navbar-order-toggler {
    background: var(--bd-blue) !important;
    border-color: transparent !important;
    border-radius: 0 !important;
    color: #fff !important;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.14);
}

body.template_2019.bd-theme .navbar .btn-success:hover,
body.template_2019.bd-theme .navbar-order-toggler:hover {
    background: var(--bd-blue-dark) !important;
    color: #fff !important;
}

body.template_2019.bd-theme .navbar .btn-success .material-icons,
body.template_2019.bd-theme .navbar-order-toggler .material-icons {
    color: #fff !important;
}

body.template_2019.bd-theme .btn-left-navbar,
body.template_2019.bd-theme .navbar-search .form-control {
    color: var(--bd-muted) !important;
}

/* Keep search bar aligned when sidebar is collapsed */
@media (min-width: 994px) {
    body.template_2019.bd-theme.sidenav-toggled .navbar .navbar-left {
        flex: 0 0 250px !important;
        width: 250px !important;
        padding: 0.75rem;
        justify-content: space-between;
    }

    body.template_2019.bd-theme.sidenav-toggled .navbar .navbar-left .navbar-brand {
        display: flex !important;
    }

    body.template_2019.bd-theme.sidenav-toggled .navbar .navbar-left .btn-toggler {
        width: auto;
        margin: 10px;
        padding: 5px 10px;
    }
}

/* ---- Client area login logo ---- */

body.template_2019.bd-theme .form-credentials.form-signin .image.size-lg {
    display: block;
    width: auto;
    height: auto;
    max-width: min(280px, 70vw);
    max-height: none;
    margin: 20px 0 28px;
}

body.template_2019.bd-theme .navbar-sub {
    background: rgba(255, 255, 255, 0.55) !important;
    border-color: var(--bd-border) !important;
}

body.template_2019.bd-theme .navbar-sub .nav-link {
    font-family: 'Inter', Arial, sans-serif;
    color: var(--bd-muted) !important;
    font-weight: 400;
}

body.template_2019.bd-theme .navbar-sub .nav-link:hover,
body.template_2019.bd-theme .navbar-sub .nav-link.active {
    color: var(--bd-heading) !important;
    background: rgba(37, 99, 235, 0.06) !important;
}

/* ---- Sidebar ---- */

body.template_2019.bd-theme .sidebar {
    top: var(--bd-navbar-height);
    min-height: calc(100vh - var(--bd-navbar-height));
    z-index: 900;
    background: #1e293b !important;
    border-right: 1px solid rgba(148, 163, 184, 0.12) !important;
}

body.template_2019.bd-theme .sidebar .nav-link,
body.template_2019.bd-theme .sidebar .sidebar-section-title {
    color: #94a3b8 !important;
    font-family: 'Inter', Arial, sans-serif;
}

body.template_2019.bd-theme .sidebar .nav-link:hover,
body.template_2019.bd-theme .sidebar .nav-link.active {
    color: #f8fafc !important;
    background: rgba(37, 99, 235, 0.18) !important;
}

body.template_2019.bd-theme .sidebar .badge-primary {
    background: var(--bd-amber) !important;
}

body.template_2019.bd-theme .sidebar .sidebar-heading {
    color: #cbd5e1 !important;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ---- Buttons & cards ---- */

body.template_2019.bd-theme .btn-primary {
    background: var(--bd-blue) !important;
    border-color: transparent !important;
    border-radius: 0 !important;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 14px 36px rgba(37, 99, 235, 0.14);
}

body.template_2019.bd-theme .btn-primary:hover {
    background: var(--bd-blue-dark) !important;
}

body.template_2019.bd-theme .btn-outline-primary {
    color: var(--bd-blue-dark) !important;
    border-color: rgba(37, 99, 235, 0.35) !important;
    border-radius: 0 !important;
}

body.template_2019.bd-theme .card,
body.template_2019.bd-theme .wbox,
body.template_2019.bd-theme .list-group-item {
    border-radius: 0 !important;
    border-color: rgba(148, 163, 184, 0.18) !important;
    background: rgba(255, 255, 255, 0.78);
}

body.template_2019.bd-theme .badge-primary {
    background: var(--bd-blue) !important;
}

/* ---- Homepage hero ---- */

body.template_2019.bd-theme .portal-home-hero {
    position: relative;
    overflow: hidden;
    margin: -1.5rem -1.5rem 2rem;
    padding: 3rem 1.5rem 4rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

body.template_2019.bd-theme .portal-home-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: linear-gradient(to bottom, black 0%, transparent 78%);
    z-index: 1;
    pointer-events: none;
}

body.template_2019.bd-theme .portal-home-hero .hero-bottom-fade {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 160px;
    background: linear-gradient(
        to bottom,
        rgba(247, 244, 238, 0) 0%,
        rgba(247, 244, 238, 0.72) 58%,
        rgba(247, 244, 238, 0.96) 82%,
        #f7f4ee 100%
    );
    pointer-events: none;
    z-index: 2;
}

body.template_2019.bd-theme .portal-home-hero .hero-inner {
    position: relative;
    z-index: 3;
    max-width: 900px;
}

body.template_2019.bd-theme .portal-home-hero .hero-title {
    margin: 0 0 1rem;
    font-size: clamp(2.2rem, 4.5vw, 3.6rem);
    font-weight: 500;
    line-height: 0.95;
    letter-spacing: -0.04em;
    color: var(--bd-heading);
}

body.template_2019.bd-theme .portal-home-hero .hero-subtitle {
    max-width: 56ch;
    margin-bottom: 1.75rem;
    color: var(--bd-muted);
    font-size: 1.05rem;
    line-height: 1.75;
}

body.template_2019.bd-theme .portal-home-hero .hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

body.template_2019.bd-theme .bd-cta {
    display: inline-block;
    padding: 14px 24px;
    background: var(--bd-blue);
    color: #fff !important;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid transparent;
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.16);
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

body.template_2019.bd-theme .bd-cta:hover {
    background: var(--bd-blue-dark);
    color: #fff !important;
    box-shadow: 0 20px 46px rgba(37, 99, 235, 0.2);
}

body.template_2019.bd-theme .bd-cta.secondary {
    background: rgba(255, 255, 255, 0.58);
    border-color: rgba(148, 163, 184, 0.32);
    color: var(--bd-heading) !important;
    box-shadow: none;
}

body.template_2019.bd-theme .bd-cta.secondary:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--bd-heading) !important;
}

/* ---- Feature cards ---- */

body.template_2019.bd-theme .bd-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 2rem;
}

body.template_2019.bd-theme .bd-feature-card {
    display: block;
    padding: 28px 24px;
    text-decoration: none !important;
    color: inherit !important;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.18);
    transition: border-color 0.25s ease, background 0.25s ease;
}

body.template_2019.bd-theme .bd-feature-card:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(37, 99, 235, 0.22);
    color: inherit !important;
}

body.template_2019.bd-theme .bd-feature-num {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--bd-amber);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.14em;
}

body.template_2019.bd-theme .bd-feature-card h2 {
    margin: 0 0 10px;
    font-size: 1.15rem;
    font-weight: 700;
}

body.template_2019.bd-theme .bd-feature-card p {
    margin: 0;
    color: var(--bd-muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

/* ---- Inner page intro ---- */

body.template_2019.bd-theme .portal-page-intro {
    position: relative;
    overflow: hidden;
    margin: -1.5rem -1.5rem 1.75rem;
    padding: 2.5rem 1.5rem 3rem;
    min-height: 120px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

body.template_2019.bd-theme .portal-page-intro .page-intro-block {
    position: relative;
    z-index: 2;
    max-width: 760px;
}

body.template_2019.bd-theme .portal-page-intro .page-intro-block h1 {
    margin: 0;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

/* ---- Body-content hero backdrop (all pages) ---- */

body.template_2019.bd-theme .body-content {
    position: relative;
    overflow: visible;
}

body.template_2019.bd-theme .body-content > .section-main,
body.template_2019.bd-theme .body-content > *:not(.hero-ambient) {
    position: relative;
    z-index: 2;
}

body.template_2019.bd-theme .body-content > .hero-ambient .hero-grid-glow {
    inset: 4% 0 auto auto;
    width: min(52vw, 700px);
    aspect-ratio: 1;
    background:
        radial-gradient(circle at 28% 34%, rgba(245, 158, 11, 0.34), transparent 22%),
        radial-gradient(circle at 68% 28%, rgba(96, 165, 250, 0.32), transparent 20%),
        radial-gradient(circle at 60% 68%, rgba(30, 64, 175, 0.26), transparent 26%);
    opacity: 0.78;
}

body.template_2019.bd-theme .body-content > .hero-ambient .hero-stage {
    top: -28%;
    right: -32%;
    width: min(92vw, 1240px);
    transform: rotate(-10deg);
    opacity: 0.78;
}

body.template_2019.bd-theme .body-content > .hero-ambient .hero-torus-mesh ellipse:nth-child(3n + 1) { stroke: rgba(30, 41, 59, 0.55); }
body.template_2019.bd-theme .body-content > .hero-ambient .hero-torus-mesh ellipse:nth-child(3n + 2) { stroke: rgba(96, 165, 250, 0.52); }
body.template_2019.bd-theme .body-content > .hero-ambient .hero-torus-mesh ellipse:nth-child(3n) { stroke: rgba(245, 158, 11, 0.46); }

body.template_2019.bd-theme .body-content > .hero-ambient .hero-torus-hole {
    fill: transparent;
    stroke: rgba(30, 41, 59, 0.32);
    stroke-width: 1.4;
}

body.template_2019.bd-theme .body-content > .hero-ambient .hero-torus-sparks circle { fill: rgba(30, 41, 59, 0.55); }
body.template_2019.bd-theme .body-content > .hero-ambient .hero-torus-sparks circle:nth-child(2),
body.template_2019.bd-theme .body-content > .hero-ambient .hero-torus-sparks circle:nth-child(3) { fill: rgba(96, 165, 250, 0.65); }
body.template_2019.bd-theme .body-content > .hero-ambient .hero-torus-sparks circle:nth-child(3) { fill: rgba(245, 158, 11, 0.62); }

/* ---- Shared hero animation (home + inner pages) ---- */

body.template_2019.bd-theme .hero-ambient {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

body.template_2019.bd-theme .hero-grid-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(18px);
    animation: bdHeroGlowShift 16s ease-in-out infinite alternate;
}

body.template_2019.bd-theme .portal-home-hero .hero-grid-glow {
    inset: 4% 0 auto auto;
    width: min(52vw, 700px);
    aspect-ratio: 1;
    background:
        radial-gradient(circle at 28% 34%, rgba(245, 158, 11, 0.34), transparent 22%),
        radial-gradient(circle at 68% 28%, rgba(96, 165, 250, 0.32), transparent 20%),
        radial-gradient(circle at 60% 68%, rgba(30, 64, 175, 0.26), transparent 26%);
    opacity: 0.78;
}

body.template_2019.bd-theme .portal-page-intro .hero-grid-glow {
    top: -20%;
    right: 0;
    width: min(56vw, 560px);
    aspect-ratio: 1;
    background:
        radial-gradient(circle at 28% 34%, rgba(245, 158, 11, 0.28), transparent 22%),
        radial-gradient(circle at 68% 28%, rgba(96, 165, 250, 0.26), transparent 20%),
        radial-gradient(circle at 60% 68%, rgba(30, 64, 175, 0.20), transparent 26%);
    opacity: 0.72;
}

body.template_2019.bd-theme .hero-stage {
    position: absolute;
    aspect-ratio: 1 / 1;
    animation: bdHeroStageDrift 40s ease-in-out infinite alternate;
}

body.template_2019.bd-theme .portal-home-hero .hero-stage {
    top: -18%;
    right: -32%;
    width: min(92vw, 1240px);
    transform: rotate(-10deg);
}

body.template_2019.bd-theme .portal-page-intro .hero-stage {
    top: -80px;
    right: -5%;
    width: min(50vw, 480px);
    opacity: 0.82;
}

body.template_2019.bd-theme .hero-torus-shell {
    position: absolute;
    inset: -12% -10% -18% -14%;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 18px 44px rgba(37, 99, 235, 0.14));
    animation: bdHeroTorusFloat 36s ease-in-out infinite alternate;
}

body.template_2019.bd-theme .hero-torus-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

body.template_2019.bd-theme .hero-torus-mesh,
body.template_2019.bd-theme .hero-torus-sparks {
    transform-origin: 50% 50%;
}

body.template_2019.bd-theme .hero-torus-mesh ellipse {
    fill: none;
    stroke-width: 1.75;
}

body.template_2019.bd-theme .portal-home-hero .hero-torus-mesh ellipse:nth-child(3n + 1) { stroke: rgba(255, 255, 255, 0.68); }
body.template_2019.bd-theme .portal-home-hero .hero-torus-mesh ellipse:nth-child(3n + 2) { stroke: rgba(96, 165, 250, 0.62); }
body.template_2019.bd-theme .portal-home-hero .hero-torus-mesh ellipse:nth-child(3n) { stroke: rgba(245, 158, 11, 0.54); }

body.template_2019.bd-theme .portal-page-intro .hero-torus-mesh ellipse:nth-child(3n + 1) { stroke: rgba(30, 41, 59, 0.55); }
body.template_2019.bd-theme .portal-page-intro .hero-torus-mesh ellipse:nth-child(3n + 2) { stroke: rgba(96, 165, 250, 0.52); }
body.template_2019.bd-theme .portal-page-intro .hero-torus-mesh ellipse:nth-child(3n) { stroke: rgba(245, 158, 11, 0.46); }

body.template_2019.bd-theme .hero-torus-mesh {
    animation: bdHeroTorusRoll 50s linear infinite;
}

body.template_2019.bd-theme .portal-home-hero .hero-torus-hole {
    fill: transparent;
    stroke: rgba(255, 255, 255, 0.52);
    stroke-width: 1.4;
}

body.template_2019.bd-theme .portal-page-intro .hero-torus-hole {
    fill: transparent;
    stroke: rgba(30, 41, 59, 0.32);
    stroke-width: 1.4;
}

body.template_2019.bd-theme .hero-torus-sparks {
    animation: bdHeroSparkPulse 7s ease-in-out infinite;
}

body.template_2019.bd-theme .portal-home-hero .hero-torus-sparks circle { fill: rgba(255, 255, 255, 0.85); }
body.template_2019.bd-theme .portal-home-hero .hero-torus-sparks circle:nth-child(2),
body.template_2019.bd-theme .portal-home-hero .hero-torus-sparks circle:nth-child(4) { fill: rgba(96, 165, 250, 0.78); }
body.template_2019.bd-theme .portal-home-hero .hero-torus-sparks circle:nth-child(3) { fill: rgba(245, 158, 11, 0.72); }

body.template_2019.bd-theme .portal-page-intro .hero-torus-sparks circle { fill: rgba(30, 41, 59, 0.55); }
body.template_2019.bd-theme .portal-page-intro .hero-torus-sparks circle:nth-child(2),
body.template_2019.bd-theme .portal-page-intro .hero-torus-sparks circle:nth-child(3) { fill: rgba(96, 165, 250, 0.65); }
body.template_2019.bd-theme .portal-page-intro .hero-torus-sparks circle:nth-child(3) { fill: rgba(245, 158, 11, 0.62); }

/* ---- Root boxes override ---- */

body.template_2019.bd-theme .root-box {
    border-radius: 0 !important;
}

body.template_2019.bd-theme .root-box .material-icons {
    color: var(--bd-blue-dark) !important;
}

/* ---- Login modal ---- */

body.template_2019.bd-theme #loginModal {
    z-index: 1060;
}

body.template_2019.bd-theme #loginModal .modal-dialog {
    margin: 1.75rem auto;
    max-width: 500px;
}

body.template_2019.bd-theme .modal-backdrop {
    z-index: 1050;
}

/* ---- Footer ---- */

body.template_2019.bd-theme .footer {
    background: transparent !important;
    border-top: 1px solid rgba(148, 163, 184, 0.18) !important;
}

body.template_2019.bd-theme .footer .text-secondary,
body.template_2019.bd-theme .footer .nav-link {
    color: var(--bd-subtle) !important;
    font-family: 'Inter', Arial, sans-serif;
}

body.template_2019.bd-theme .footer .bd-footer-tagline {
    letter-spacing: 0.04em;
    text-transform: lowercase;
}

/* ---- Keyframes ---- */

@keyframes bdHeroGlowShift {
    0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.76; }
    100% { transform: translate3d(-18px, 24px, 0) scale(1.12); opacity: 0.96; }
}

@keyframes bdHeroStageDrift {
    0% { transform: rotate(-10deg) translate3d(0, 0, 0); }
    100% { transform: rotate(-5deg) translate3d(18px, 22px, 0); }
}

@keyframes bdHeroTorusFloat {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(8px, 12px, 0) scale(1.02); }
}

@keyframes bdHeroTorusRoll {
    0% { transform: rotate(0deg) skewX(-8deg); }
    100% { transform: rotate(360deg) skewX(-8deg); }
}

@keyframes bdHeroSparkPulse {
    0% { opacity: 0.35; }
    50% { opacity: 1; }
    100% { opacity: 0.45; }
}

/* ---- Responsive ---- */

@media (max-width: 992px) {
    body.template_2019.bd-theme .bd-feature-grid {
        grid-template-columns: 1fr;
    }

    body.template_2019.bd-theme .body-content > .hero-ambient .hero-stage {
        top: -20%;
        right: -30%;
        width: min(98vw, 1080px);
        opacity: 0.72;
    }
}

@media (max-width: 768px) {
    body.template_2019.bd-theme .body-content > .hero-ambient .hero-stage {
        top: -4%;
        right: -48%;
        width: 156vw;
        opacity: 0.62;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.template_2019.bd-theme .hero-stage,
    body.template_2019.bd-theme .hero-torus-shell,
    body.template_2019.bd-theme .hero-torus-mesh,
    body.template_2019.bd-theme .hero-torus-sparks,
    body.template_2019.bd-theme .hero-grid-glow {
        animation: none;
    }
}
