/* =====================================================================
   NJ TrueHost control panel (client area)
   Loaded after Blesta's CSS and the theme. Brand: navy #0b0f1a,
   green #0a7f64, mint #34e0b4. Font: Plus Jakarta Sans.
   ===================================================================== */
:root {
    --njth-navy: #0b0f1a;
    --njth-navy-2: #111727;
    --njth-navy-3: #1a2236;
    --njth-green: #0a7f64;
    --njth-green-d: #076b54;
    --njth-mint: #34e0b4;
    --njth-blue: #5b8cff;
    --njth-bg: #f4f6fa;
    --njth-card: #ffffff;
    --njth-line: #e6e9f0;
    --njth-text: #1c2333;
    --njth-muted: #6b7489;
    --njth-side-w: 264px;
    --njth-radius: 16px;
}

body.njth-app {
    background: var(--njth-bg) !important;
    color: var(--njth-text);
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
body.njth-app .btn, body.njth-app input, body.njth-app select, body.njth-app textarea, body.njth-app .form-control {
    font-family: inherit;
}

/* ---------- Shell ---------- */
.njth-shell { min-height: 100vh; }
.njth-main {
    margin-left: var(--njth-side-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---------- Sidebar ---------- */
.njth-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 1040;
    width: var(--njth-side-w);
    background:
        radial-gradient(420px 260px at 0% 0%, rgba(52,224,180,.14), transparent 60%),
        var(--njth-navy);
    color: #c3cad8;
    display: flex; flex-direction: column;
    overflow-y: auto;
    border-right: 1px solid rgba(255,255,255,.06);
}
.njth-brand {
    display: flex; align-items: center; justify-content: space-between;
    padding: 22px 22px 18px;
}
.njth-brand img { height: 34px; width: auto; max-width: 190px; }
.njth-close { background: none; border: 0; color: #c3cad8; font-size: 1.1rem; }

.njth-nav { padding: 6px 14px 24px; flex: 1; }
.njth-menu { list-style: none; margin: 0; padding: 0; }
.njth-item { margin: 2px 0; }
.njth-link {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px;
    border-radius: 12px;
    color: #aab3c5 !important;
    font-weight: 600; font-size: .95rem;
    text-decoration: none !important;
    transition: background .15s, color .15s;
}
.njth-link i.fa-fw { width: 20px; font-size: 1rem; opacity: .9; }
.njth-link:hover { background: rgba(255,255,255,.06); color: #ffffff !important; }
.njth-item.active > .njth-link {
    background: linear-gradient(90deg, rgba(52,224,180,.18), rgba(52,224,180,.04));
    color: #ffffff !important;
    box-shadow: inset 3px 0 0 var(--njth-mint);
}
.njth-item.active > .njth-link i.fa-fw { color: var(--njth-mint); }
.njth-caret { margin-left: auto; font-size: .7rem; transition: transform .2s; }
.njth-parent.collapsed .njth-caret { transform: rotate(-90deg); }

.njth-sub { list-style: none; margin: 4px 0 6px; padding: 0 0 0 22px; }
.njth-sub li a {
    display: block; padding: 8px 12px; border-radius: 10px;
    color: #8b95ab !important; font-size: .9rem; font-weight: 500;
    text-decoration: none !important;
}
.njth-sub li a:hover { color: #ffffff !important; background: rgba(255,255,255,.05); }
.njth-sub li a.active { color: var(--njth-mint) !important; }
.njth-sub li a i { margin-right: 6px; opacity: .8; }

.njth-nav-label {
    margin: 22px 14px 8px;
    font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: #5f6a82;
}
.njth-menu-extra .njth-link { font-weight: 500; }
.njth-menu-extra .fa-whatsapp { color: #25d366; }

/* ---------- Top bar ---------- */
.njth-topbar {
    position: sticky; top: 0; z-index: 1020;
    display: flex; align-items: center; gap: 14px;
    padding: 14px 32px;
    background: rgba(244,246,250,.85);
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--njth-line);
}
.njth-title {
    margin: 0; font-size: 1.35rem; font-weight: 800; letter-spacing: -.01em;
    color: var(--njth-navy);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.njth-top-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.njth-burger {
    background: #fff; border: 1px solid var(--njth-line); border-radius: 10px;
    width: 40px; height: 40px; color: var(--njth-navy);
}
.njth-user > a {
    display: flex; align-items: center; gap: 10px;
    padding: 5px 12px 5px 5px; border-radius: 999px;
    background: #fff; border: 1px solid var(--njth-line);
    color: var(--njth-text) !important; font-weight: 600; text-decoration: none !important;
}
.njth-user > a::after { margin-left: 2px; }
.njth-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--njth-mint), var(--njth-blue));
    color: var(--njth-navy); font-size: .8rem; font-weight: 800;
}
.njth-lang ul { list-style: none; margin: 0; padding: 0; }
.njth-lang .dropdown-toggle { color: var(--njth-text) !important; font-weight: 600; }
.njth-staff a { color: #fff !important; }
.njth-app .dropdown-menu {
    border-radius: 14px; border: 1px solid var(--njth-line);
    box-shadow: 0 16px 40px rgba(11,15,26,.14); padding: 8px;
}
.njth-app .dropdown-item { border-radius: 8px; padding: 8px 12px; font-weight: 500; }
.njth-app .dropdown-item:hover, .njth-app .dropdown-item:focus { background: #eef8f5; color: var(--njth-green); }

/* ---------- Content ---------- */
.njth-content { flex: 1; padding: 28px 32px 8px; }
.njth-content > .container-fluid { padding: 0; max-width: 1400px; }

/* Cards & widgets (Blesta's own markup, restyled) */
.njth-app .card, .njth-app .card-blesta {
    border: 1px solid var(--njth-line) !important;
    border-radius: var(--njth-radius) !important;
    background: var(--njth-card);
    box-shadow: 0 4px 16px rgba(11,15,26,.04);
    overflow: hidden;
    margin-bottom: 22px;
}
.njth-app .card-blesta > .card-header,
.njth-app .card > .card-header {
    background: #ffffff !important;
    color: var(--njth-navy) !important;
    border-bottom: 1px solid var(--njth-line) !important;
    font-weight: 700; font-size: 1rem;
    padding: 16px 20px !important;
}
.njth-app .card-blesta > .card-header a { color: var(--njth-green); }
.njth-app .card-footer { background: #fafbfd; border-top: 1px solid var(--njth-line); }
.njth-app .table { color: var(--njth-text); margin-bottom: 0; }
.njth-app .table thead th, .njth-app .table th {
    border-top: 0; border-bottom: 1px solid var(--njth-line);
    color: var(--njth-muted); font-size: .78rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .04em;
}
.njth-app .table th a { color: var(--njth-muted) !important; text-decoration: none; }
.njth-app .table td { border-top: 1px solid #f0f2f6; vertical-align: middle; }
.njth-app .table-hover tbody tr:hover, .njth-app .table tbody tr:hover { background: #f8faf9; }
.njth-app .nav-tabs, .njth-app .nav-pills { border-bottom: 0; gap: 4px; }
.njth-app .nav-tabs .nav-link, .njth-app .nav-pills .nav-link { border-radius: 999px; border: 0; color: var(--njth-muted); font-weight: 600; }
.njth-app .nav-tabs .nav-link.active, .njth-app .nav-pills .nav-link.active { background: #e3f7f1; color: var(--njth-green); }
.njth-app .alert { border-radius: 12px; }
.njth-app .alert-info { background: #eef4ff; border-color: #dbe6ff; color: #2c4a8a; }
.njth-app .badge { border-radius: 999px; font-weight: 600; padding: .35em .7em; }
.njth-app .btn { border-radius: 10px; font-weight: 600; }
.njth-app .btn-light { background: #fff; border-color: var(--njth-line); }
.njth-app .btn-light:hover { background: #f4f6fa; }
.njth-app .form-control, .njth-app .form-select, .njth-app select.form-control {
    border-radius: 10px; border-color: #d5dbe6;
}
.njth-app .form-control:focus { border-color: var(--njth-green); box-shadow: 0 0 0 .2rem rgba(10,127,100,.15); }
.njth-app a { color: var(--njth-green); }
.njth-app .page-item.active .page-link { background: var(--njth-green); border-color: var(--njth-green); }
.njth-app .page-link { border-radius: 8px; margin: 0 2px; }

/* Wide tables scroll sideways inside their card on small screens */
.njth-app .card-body, .njth-app .table-responsive { overflow-x: auto; }
.njth-app .card-body > .table { min-width: 560px; }

/* Secondary menu (e.g. account pages) */
.njth-subnav { margin-bottom: 22px; border-radius: var(--njth-radius); overflow: hidden; border: 1px solid var(--njth-line); }
.njth-subnav .list-group-item { border: 0; border-bottom: 1px solid #f0f2f6; font-weight: 600; color: var(--njth-text); padding: 13px 18px; }
.njth-subnav .list-group-item.active { background: #e3f7f1; color: var(--njth-green); box-shadow: inset 3px 0 0 var(--njth-green); }

/* ---------- Dashboard ---------- */
.njth-dash-head { margin-bottom: 6px; }
.njth-hero {
    display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
    padding: 28px 30px;
    border-radius: 20px;
    background:
        radial-gradient(520px 260px at 0% 0%, rgba(52,224,180,.28), transparent 60%),
        radial-gradient(520px 300px at 100% 100%, rgba(91,140,255,.24), transparent 60%),
        var(--njth-navy);
    color: #e8ecf4;
    margin-bottom: 18px;
}
.njth-hero-kicker { color: var(--njth-mint); font-weight: 700; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; }
.njth-hero-title { color: #fff; font-weight: 800; font-size: 1.9rem; letter-spacing: -.02em; margin: 4px 0 6px; }
.njth-hero-text { color: #aab3c5; margin: 0; }
.njth-hero-btn {
    background: var(--njth-mint); color: var(--njth-navy) !important; border: 0;
    padding: 12px 20px; border-radius: 12px; font-weight: 700;
}
.njth-hero-btn:hover { background: #5be9c4; }

.njth-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.njth-action {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 18px; border-radius: 16px;
    background: #fff; border: 1px solid var(--njth-line);
    color: var(--njth-text) !important; text-decoration: none !important;
    transition: transform .15s, box-shadow .15s, border-color .15s;
}
.njth-action:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(11,15,26,.08); border-color: #cfe9e1; }
.njth-action b { display: block; font-size: .95rem; }
.njth-action small { color: var(--njth-muted); font-size: .8rem; }
.njth-action-icon {
    flex: none; width: 44px; height: 44px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem;
}
.a-green, .c-green { background: #e3f7f1; color: var(--njth-green); }
.a-blue, .c-blue { background: #e8efff; color: #3b6fe0; }
.a-amber, .c-amber { background: #fff4dd; color: #b7791f; }
.a-purple, .c-purple { background: #f1eaff; color: #7c4ddb; }
.c-pink { background: #ffe8ef; color: #d6336c; }

/* Stat cards: one even row whatever the number of cards */
.njth-app .row.cards {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px; margin: 0 0 22px;
}
.njth-app .row.cards > .njth-stat-col { max-width: none; width: auto; flex: none; padding: 0; margin: 0; }
.njth-stat-link { text-decoration: none !important; display: block; }
.njth-app .cards .card.njth-stat {
    display: flex !important; flex-direction: row !important; align-items: center; justify-content: flex-start;
    gap: 14px; text-align: left !important;
    padding: 18px; margin: 0 !important; height: 100%; min-height: 0 !important;
    background: #fff !important; color: var(--njth-text) !important;
    border-bottom: 1px solid var(--njth-line) !important;
    transition: transform .15s, box-shadow .15s;
}
.njth-stat-link:hover .njth-stat { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(11,15,26,.08); }
.njth-stat-icon {
    flex: none; width: 46px; height: 46px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.njth-app .cards .card.njth-stat .card-content { padding: 0 !important; width: auto !important; text-align: left; }
.njth-app .cards .njth-stat .card-value { font-size: 1.7rem; font-weight: 800; line-height: 1.1; color: var(--njth-navy); }
.njth-app .cards .njth-stat .card-label { font-size: .85rem; font-weight: 600; color: var(--njth-muted); }

/* Account box on the right */
.njth-app #my-info .card-header { font-size: .95rem; }
.njth-app #my-info address { margin: 0; line-height: 1.6; color: var(--njth-text); }

/* ---------- Footer ---------- */
.njth-footer {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px;
    padding: 18px 32px 24px; color: var(--njth-muted); font-size: .85rem;
    border-top: 1px solid var(--njth-line);
}
.njth-footer a { color: var(--njth-muted) !important; }
.njth-footer a:hover { color: var(--njth-green) !important; }
.njth-footer-links { display: flex; gap: 16px; }
.njth-powered { margin-left: auto; }

/* ---------- Responsive ---------- */
.njth-backdrop { display: none; }
@media (max-width: 1199px) {
    .njth-actions { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 991px) {
    .njth-main { margin-left: 0; }
    .njth-sidebar { transform: translateX(-100%); transition: transform .25s ease; }
    body.njth-menu-open .njth-sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.35); }
    body.njth-menu-open .njth-backdrop {
        display: block; position: fixed; inset: 0; z-index: 1030; background: rgba(11,15,26,.45);
    }
    .njth-topbar { padding: 12px 18px; }
    .njth-content { padding: 20px 18px 8px; }
    .njth-footer { padding: 16px 18px 22px; }
    .njth-app #my-info { flex: 0 0 100%; max-width: 100%; }
}
@media (max-width: 575px) {
    .njth-actions { grid-template-columns: 1fr; }
    .njth-hero { padding: 22px; }
    .njth-hero-title { font-size: 1.5rem; }
    .njth-title { font-size: 1.1rem; }
    .njth-powered { margin-left: 0; }
}

/* ---------- Portal home page (Tools > CMS content) ---------- */
.njth-portal { width: 100%; padding: 0 15px; }
.njth-portal-hero {
    border-radius: 22px; padding: 44px 40px; margin-bottom: 22px;
    background:
        radial-gradient(560px 300px at 0% 0%, rgba(52,224,180,.28), transparent 60%),
        radial-gradient(560px 320px at 100% 100%, rgba(91,140,255,.24), transparent 60%),
        var(--njth-navy);
    color: #e8ecf4;
}
.njth-portal-copy { max-width: 640px; }
.njth-portal-kicker { color: var(--njth-mint); font-weight: 700; font-size: .85rem; letter-spacing: .05em; text-transform: uppercase; }
.njth-portal-hero h2 { color: #fff; font-weight: 800; font-size: 2.2rem; letter-spacing: -.02em; line-height: 1.15; margin: 8px 0 12px; }
.njth-portal-hero p { color: #aab3c5; font-size: 1.05rem; margin: 0 0 24px; }
.njth-portal-btns { display: flex; flex-wrap: wrap; gap: 12px; }
.njth-btn-mint { background: var(--njth-mint); color: var(--njth-navy) !important; border: 0; padding: 12px 20px; border-radius: 12px; font-weight: 700; }
.njth-btn-mint:hover { background: #5be9c4; }
.njth-btn-ghost { background: rgba(255,255,255,.08); color: #fff !important; border: 1px solid rgba(255,255,255,.18); padding: 12px 20px; border-radius: 12px; font-weight: 700; }
.njth-btn-ghost:hover { background: rgba(255,255,255,.14); }
.njth-portal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.njth-portal-card {
    display: flex; flex-direction: column; gap: 6px;
    padding: 22px; border-radius: 16px; background: #fff; border: 1px solid var(--njth-line);
    color: var(--njth-text) !important; text-decoration: none !important;
    transition: transform .15s, box-shadow .15s, border-color .15s;
}
.njth-portal-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(11,15,26,.08); border-color: #cfe9e1; }
.njth-portal-card b { font-size: 1.05rem; margin-top: 8px; }
.njth-portal-card small { color: var(--njth-muted); font-size: .88rem; line-height: 1.5; }
.njth-portal-icon { width: 48px; height: 48px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.c-wa { background: #e7f9ee; color: #1faa53; }
@media (max-width: 1199px) { .njth-portal-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) {
    .njth-portal-hero { padding: 28px 22px; }
    .njth-portal-hero h2 { font-size: 1.6rem; }
    .njth-portal-grid { grid-template-columns: 1fr; }
}
