/*
 * HARK Platform - White Label Admin Stylesheet
 * Verbergt Concrete CMS branding en vervangt door HARK Sitebuilder stijl.
 * Geldt voor dashboard, inline editor en loginpagina.
 */

/* ============================================================
   CUSTOM PROPERTIES
   ============================================================ */
:root {
    --hark-primary:     #102A43;
    --hark-accent:      #FF6B35;
    --hark-light:       #F4F7FB;
    --hark-dark:        #071827;
    --hark-text:        #1F2933;
    --hark-border:      #D9E2EC;
    --hark-success:     #28A745;
    --hark-white:       #FFFFFF;
    --hark-radius:      8px;
    --hark-shadow:      0 8px 22px rgba(15,23,42,.08);
    --hark-shell-height: 102px;
    --hark-dashboard-aside-width: 330px;
}

#hark-platform-admin-shell {
    background: #ffffff;
    border-bottom: 1px solid #d8e0e8;
    color: #08233d;
    font-family: 'Segoe UI', Arial, sans-serif;
    position: sticky;
    top: 0;
    z-index: 30000;
    pointer-events: auto;
    box-shadow: 0 1px 0 rgba(15, 23, 42, .04);
}

body.hark-platform-shell-enabled {
    background: #f4f7fb !important;
    overflow-x: hidden !important;
}

#hark-platform-admin-shell a,
#hark-platform-admin-shell button,
#hark-dashboard-banner a,
#hark-dashboard-banner button {
    pointer-events: auto !important;
    cursor: pointer !important;
}

#hark-platform-admin-shell .hark-platform-top {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    background: #fbfdff;
    border-bottom: 1px solid #d8e0e8;
}

#hark-platform-admin-shell .hark-platform-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #102A43 !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 16px;
    flex: 0 0 auto;
}

#hark-platform-admin-shell .hark-platform-mark {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 65% 35%, #22d3ee 0 18%, transparent 19%),
        conic-gradient(from 210deg, #6d28d9, #2563eb, #22d3ee, #6d28d9);
    font-size: 15px;
}

#hark-platform-admin-shell .hark-platform-icons {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #364b63;
    font-size: 13px;
    flex: 0 0 auto;
}

#hark-platform-admin-shell .hark-platform-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-right: 8px;
}

#hark-platform-admin-shell .hark-platform-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 13px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none !important;
    white-space: nowrap;
}

#hark-platform-admin-shell .hark-platform-action--site {
    background: #102A43;
    border: 1px solid #102A43;
    color: #fff !important;
}

#hark-platform-admin-shell .hark-platform-action--back {
    background: #FF6B35;
    border: 1px solid #FF6B35;
    color: #fff !important;
}

#hark-platform-admin-shell .hark-platform-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #2d7cab;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
}

#hark-platform-admin-shell .hark-platform-user {
    display: inline-flex;
    flex-direction: column;
    gap: 1px;
    font-size: 12px;
    color: #0f172a;
    line-height: 1.1;
}

#hark-platform-admin-shell .hark-platform-user span {
    color: #64748b;
    font-size: 11px;
    font-weight: 650;
}

#hark-platform-admin-shell .hark-platform-user strong {
    color: #0f172a;
    font-size: 13px;
    font-weight: 800;
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#hark-platform-admin-shell .hark-platform-nav {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 10px;
    background: #fff;
    overflow-x: auto;
    white-space: nowrap;
}

#hark-platform-admin-shell .hark-platform-nav a {
    color: #0f2540 !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 12px;
    border-radius: 6px;
}

#hark-platform-admin-shell .hark-platform-nav a.is-active {
    background: #dff3ff;
    color: #0c4a6e !important;
}

body.hark-platform-shell-enabled #ccm-toolbar,
body.hark-platform-shell-enabled #ccm-dashboard-header,
body.hark-platform-shell-enabled .ccm-dashboard-layout-sidebar,
body.hark-platform-shell-enabled #ccm-dashboard-sidebar,
body.hark-platform-shell-enabled .ccm-dashboard-header,
body.hark-platform-shell-enabled .ccm-topbar,
body.hark-platform-shell-enabled .ccm-dashboard-header-menu,
body.hark-platform-shell-enabled .ccm-dashboard-header-search,
body.hark-platform-shell-enabled .ccm-dashboard-detail,
body.hark-platform-shell-enabled .ccm-dashboard-detail-panel,
body.hark-platform-shell-enabled .ccm-dashboard-layout-right-sidebar,
body.hark-platform-shell-enabled .ccm-dashboard-sidebar-right,
body.hark-platform-shell-enabled .ccm-dashboard-overlay,
body.hark-platform-shell-enabled .ccm-panel-detail,
body.hark-platform-shell-enabled [id^="ccm-panel-detail"],
body.hark-platform-shell-enabled [id^="ccm-dashboard-detail"],
body.hark-platform-shell-enabled [class*="dashboard-detail"],
body.hark-platform-shell-enabled [class*="right-sidebar"] {
    display: none !important;
}

body.hark-platform-shell-enabled .ccm-dashboard-layout {
    position: static !important;
    inset: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    min-height: calc(100vh - var(--hark-shell-height)) !important;
    background: #f4f7fb !important;
}

body.hark-platform-shell-enabled .ccm-dashboard-layout,
body.hark-platform-shell-enabled .ccm-dashboard-layout-content,
body.hark-platform-shell-enabled main.ccm-dashboard-layout-content,
body.hark-platform-shell-enabled #ccm-dashboard-content,
body.hark-platform-shell-enabled .ccm-dashboard-content {
    margin-left: 0 !important;
    margin-right: 0 !important;
    left: 0 !important;
    right: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    transform: none !important;
    overflow: visible !important;
}

body.hark-platform-shell-enabled #ccm-dashboard-content,
body.hark-platform-shell-enabled .ccm-dashboard-content,
body.hark-platform-shell-enabled main.ccm-dashboard-layout-content {
    box-sizing: border-box !important;
    padding: 22px 32px 56px !important;
    min-height: calc(100vh - var(--hark-shell-height)) !important;
}

@media (min-width: 1024px) {
    body.hark-platform-shell-enabled #ccm-dashboard-content,
    body.hark-platform-shell-enabled .ccm-dashboard-content,
    body.hark-platform-shell-enabled main.ccm-dashboard-layout-content {
        padding-right: 32px !important;
    }

    body.hark-platform-shell-enabled.hark-dashboard-side-panel-ready:not(.hark-dashboard-side-panel-closed) #ccm-dashboard-content,
    body.hark-platform-shell-enabled.hark-dashboard-side-panel-ready:not(.hark-dashboard-side-panel-closed) .ccm-dashboard-content,
    body.hark-platform-shell-enabled.hark-dashboard-side-panel-ready:not(.hark-dashboard-side-panel-closed) main.ccm-dashboard-layout-content {
        padding-right: calc(var(--hark-dashboard-aside-width) + 32px) !important;
    }
}

/* ============================================================
   DASHBOARD — SIDEBAR BRANDING
   Concrete 9.x gebruikt .ccm-dashboard-layout-sidebar en brand-elementen
   ============================================================ */
.ccm-dashboard-layout-sidebar .navbar-brand,
.ccm-dashboard-layout-sidebar .brand,
.ccm-dashboard-sidebar-brand,
#ccm-dashboard-sidebar .navbar-brand {
    background: var(--hark-primary) !important;
    color: var(--hark-white) !important;
    font-family: 'Segoe UI', Arial, sans-serif !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    letter-spacing: -.3px !important;
    padding: 16px 20px !important;
    display: block !important;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(255,255,255,.12) !important;
}

/* Verberg het originele Concrete-logo en vervang het met tekst via ::before */
.ccm-dashboard-layout-sidebar .navbar-brand img,
.ccm-dashboard-sidebar-brand img,
#ccm-dashboard-sidebar .brand img {
    display: none !important;
}
.ccm-dashboard-layout-sidebar .navbar-brand::before,
.ccm-dashboard-sidebar-brand::before {
    content: 'HARK Sitebuilder' !important;
    display: block !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--hark-white) !important;
}

/* Sidebar achtergrond */
.ccm-dashboard-layout-sidebar,
#ccm-dashboard-sidebar,
nav.ccm-dashboard-nav {
    background: var(--hark-primary) !important;
    border-right: none !important;
}

/* Nav-links in sidebar */
.ccm-dashboard-layout-sidebar .nav-link,
.ccm-dashboard-layout-sidebar .nav-item a,
#ccm-dashboard-sidebar .nav-link {
    color: rgba(255,255,255,.82) !important;
    border-radius: var(--hark-radius) !important;
    margin: 1px 8px !important;
}
.ccm-dashboard-layout-sidebar .nav-link:hover,
.ccm-dashboard-layout-sidebar .nav-item a:hover,
#ccm-dashboard-sidebar .nav-link:hover {
    background: rgba(255,255,255,.1) !important;
    color: var(--hark-white) !important;
}
.ccm-dashboard-layout-sidebar .nav-link.active,
.ccm-dashboard-layout-sidebar .nav-item a.active {
    background: var(--hark-accent) !important;
    color: var(--hark-white) !important;
}

/* ============================================================
   DASHBOARD — TOPBAR / HEADER
   ============================================================ */
#ccm-dashboard-header,
.ccm-dashboard-header,
.ccm-topbar {
    background: var(--hark-primary) !important;
    border-bottom: 1px solid var(--hark-border) !important;
    box-shadow: var(--hark-shadow) !important;
    color: var(--hark-white) !important;
}

/* ============================================================
   DASHBOARD — FOOTER
   Verberg "Powered by Concrete CMS" footer tekst
   ============================================================ */
#ccm-footer,
.ccm-dashboard-footer,
footer.ccm-footer,
.ccm-footer-content {
    display: none !important;
}

/* ============================================================
   EDIT TOOLBAR
   De zwarte balk bovenaan bij pagina-bewerking
   ============================================================ */
#ccm-toolbar {
    background: var(--hark-dark) !important;
}

/* Hark "Terug naar Platform" knop (gegenereerd door hark-admin.js) */
#hark-back-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 5px 14px !important;
    background: var(--hark-accent) !important;
    color: var(--hark-white) !important;
    border: none !important;
    border-radius: var(--hark-radius) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    font-family: 'Segoe UI', Arial, sans-serif !important;
    text-decoration: none !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    transition: background .2s ease !important;
    margin: 0 8px !important;
    line-height: 1 !important;
    height: 30px !important;
}
#hark-back-btn:hover {
    background: #e55a28 !important;
    color: var(--hark-white) !important;
    text-decoration: none !important;
}
#hark-back-btn .hark-arrow {
    font-size: 15px !important;
    line-height: 1 !important;
}


/* Hark-topbalk bovenin dashboard (gegenereerd door JS) — compact */
#hark-dashboard-banner {
    display: none !important;
}
#hark-dashboard-banner .hark-banner-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: #e0f2fe;
    color: #0c4a6e;
    font-weight: 800;
}
#hark-dashboard-banner .hark-banner-copy {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    margin-right: auto;
}
#hark-dashboard-banner .hark-banner-kicker {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}
#hark-dashboard-banner .hark-banner-copy strong {
    color: #102a43;
    font-size: 14px;
}
#hark-dashboard-banner .hark-banner-copy span:last-child {
    color: #475569;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#hark-dashboard-banner .hark-banner-site {
    font-weight: 700;
    opacity: 1;
}
#hark-dashboard-banner .hark-banner-current {
    color: #334e68;
    margin-right: auto;
}
#hark-dashboard-banner .hark-banner-website {
    color: #fff !important;
    text-decoration: none !important;
    font-size: 12px;
    font-weight: 700;
    background: #102A43;
    border: 1px solid #102A43;
    border-radius: 7px;
    padding: 8px 12px;
    white-space: nowrap;
}
#hark-dashboard-banner .hark-banner-back {
    color: #fff !important;
    text-decoration: none !important;
    font-size: 12px;
    font-weight: 700;
    opacity: 1;
    background: var(--hark-accent);
    border-radius: 7px;
    padding: 8px 12px;
    transition: opacity .15s;
    white-space: nowrap;
}
#hark-dashboard-banner .hark-banner-back:hover {
    opacity: 1;
    text-decoration: underline !important;
}

/* ============================================================
   LOGIN PAGINA
   Verberg Concrete CMS branding op de login-pagina
   ============================================================ */
.ccm-login-form-logo,
.ccm-authentication-type-concrete .ccm-login-logo,
.login-logo,
#ccm-login .ccm-login-logo {
    display: none !important;
}

/* Custom Hark login logo via ::before */
.ccm-authentication-type-concrete::before,
.login-page::before,
#ccm-login::before {
    content: 'HARK Platform';
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--hark-primary);
    text-align: center;
    margin-bottom: 8px;
    font-family: 'Segoe UI', Arial, sans-serif;
}
.ccm-authentication-type-concrete::after,
.login-page::after,
#ccm-login::after {
    content: 'Log in via HARK Platform om je website te beheren';
    display: block;
    font-size: 14px;
    color: #666;
    text-align: center;
    margin-bottom: 24px;
    font-family: 'Segoe UI', Arial, sans-serif;
}

/* Login knop styling */
.ccm-authentication-type-concrete button[type=submit],
#ccm-login button[type=submit] {
    background: var(--hark-accent) !important;
    border-color: var(--hark-accent) !important;
}
.ccm-authentication-type-concrete button[type=submit]:hover,
#ccm-login button[type=submit]:hover {
    background: #e55a28 !important;
    border-color: #e55a28 !important;
}

/* ============================================================
   VERBERG MULTISITE "GLOBAL" SITE-SWITCHER VOOR KLANTEN
   ============================================================ */
body:not(.hark-role-admin) .ccm-header-site-list,
body:not(.hark-role-admin) .ccm-site-switcher,
body:not(.hark-role-admin) .header-site-list,
body:not(.hark-role-admin) [data-header-site-list],
body:not(.hark-role-admin) .ccm-dashboard-header-menu-site {
    display: none !important;
}

/* ============================================================
   VERBERG CONCRETE-SPECIFIEKE DASHBOARD-MENU'S
   (Marketplace, Community, Updates — voor klanten niet relevant)
   Admins kunnen dit terugzien via `.hark-role-admin` class op body
   ============================================================ */
body:not(.hark-role-admin) .ccm-dashboard-nav-market,
body:not(.hark-role-admin) [href*="marketplace"],
body:not(.hark-role-admin) [href*="/dashboard/system"],
body:not(.hark-role-admin) [href*="/dashboard/extend"],
body:not(.hark-role-admin) [href*="dashboard/stacks"],
body:not(.hark-role-admin) [href*="/dashboard/users"],
body:not(.hark-role-admin) [href*="/dashboard/members"],
body:not(.hark-role-admin) [href*="/dashboard/files"],
body:not(.hark-role-admin) [href*="/account"],
body:not(.hark-role-admin) [href*="/login"],
body:not(.hark-role-admin) [href*="/register"],
body:not(.hark-role-admin) [href*="/forgot_password"],
body:not(.hark-role-admin) .ccm-dashboard-menu-system,
body:not(.hark-role-admin) .ccm-news-overlay,
body:not(.hark-role-admin) #ccm-news-overlay,
body:not(.hark-role-admin) .ccm-dashboard-header-search,
body:not(.hark-role-admin) .ccm-search,
body:not(.hark-role-admin) .ccm-help,
body:not(.hark-role-admin) .ccm-header-help,
body:not(.hark-role-admin) [data-launch-panel="help"] {
    display: none !important;
}

/* ============================================================
   DASHBOARD CONTENT AREA — ALGEMEEN
   ============================================================ */
.ccm-dashboard-content,
.ccm-ui-panel-inner,
main.ccm-dashboard-layout-content {
    background: var(--hark-light) !important;
    color: var(--hark-text) !important;
}

body.hark-platform-shell-enabled .ccm-dashboard-content .row,
body.hark-platform-shell-enabled main.ccm-dashboard-layout-content .row {
    min-width: 0 !important;
}

body.hark-platform-shell-enabled .ccm-dashboard-content [class*="col-"],
body.hark-platform-shell-enabled main.ccm-dashboard-layout-content [class*="col-"] {
    min-width: 0 !important;
}

body.hark-platform-shell-enabled .ccm-dashboard-content pre,
body.hark-platform-shell-enabled .ccm-dashboard-content code,
body.hark-platform-shell-enabled main.ccm-dashboard-layout-content pre,
body.hark-platform-shell-enabled main.ccm-dashboard-layout-content code {
    max-width: 100% !important;
    white-space: pre-wrap !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}

body.hark-platform-shell-enabled .ccm-dashboard-content table,
body.hark-platform-shell-enabled main.ccm-dashboard-layout-content table {
    max-width: 100% !important;
}

body.hark-platform-shell-enabled .hark-dashboard-side-panel {
    position: fixed !important;
    top: var(--hark-shell-height) !important;
    right: 0 !important;
    bottom: 0 !important;
    width: var(--hark-dashboard-aside-width) !important;
    max-width: calc(100vw - 24px) !important;
    margin: 0 !important;
    padding: 24px 24px 28px !important;
    background: rgba(255, 255, 255, .96) !important;
    border-left: 1px solid #d9e2ec !important;
    box-shadow: -18px 0 38px rgba(15, 23, 42, .12) !important;
    overflow-y: auto !important;
    transform: translateX(0) !important;
    transition: transform .18s ease !important;
    z-index: 29800 !important;
}

body.hark-dashboard-side-panel-closed .hark-dashboard-side-panel {
    transform: translateX(100%) !important;
    pointer-events: none !important;
}

body.hark-dashboard-side-panel-closed .ccm-dashboard-content .row > [class*="col-"]:has(.nav-sidebar),
body.hark-dashboard-side-panel-closed main.ccm-dashboard-layout-content .row > [class*="col-"]:has(.nav-sidebar),
body.hark-dashboard-side-panel-closed #ccm-dashboard-content .row > [class*="col-"]:has(.nav-sidebar),
body.hark-dashboard-side-panel-closed .ccm-dashboard-content .ccm-dashboard-section-menu:has(h2),
body.hark-dashboard-side-panel-closed main.ccm-dashboard-layout-content .ccm-dashboard-section-menu:has(h2),
body.hark-dashboard-side-panel-closed #ccm-dashboard-content .ccm-dashboard-section-menu:has(h2) {
    display: none !important;
}

body.hark-dashboard-side-panel-closed #ccm-dashboard-content,
body.hark-dashboard-side-panel-closed .ccm-dashboard-content,
body.hark-dashboard-side-panel-closed main.ccm-dashboard-layout-content {
    padding-right: 32px !important;
}

.hark-dashboard-side-panel-floating-close,
.hark-dashboard-side-panel-toggle {
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    cursor: pointer;
    font: 800 12px/1 'Segoe UI', Arial, sans-serif;
}

.hark-dashboard-side-panel__close {
    display: none !important;
}

.hark-dashboard-side-panel-toggle {
    position: fixed;
    right: 14px;
    bottom: 92px;
    min-height: 40px;
    padding: 0 13px;
    box-shadow: 0 12px 28px rgba(37, 99, 235, .18);
    z-index: 40020;
}

.hark-dashboard-side-panel-floating-close {
    position: fixed;
    top: calc(var(--hark-shell-height) + 18px);
    right: 18px;
    min-height: 36px;
    padding: 0 12px;
    background: #fff7ed;
    border-color: #fed7aa;
    color: #c2410c;
    box-shadow: 0 12px 28px rgba(194, 65, 12, .16);
    z-index: 40040;
}

body:not(.hark-dashboard-side-panel-ready) .hark-dashboard-side-panel-floating-close,
body.hark-dashboard-side-panel-closed .hark-dashboard-side-panel-floating-close {
    display: none !important;
}

body:not(.hark-dashboard-side-panel-ready) .hark-dashboard-side-panel-toggle,
body:not(.hark-dashboard-side-panel-closed) .hark-dashboard-side-panel-toggle {
    display: none !important;
}

body.hark-platform-shell-enabled .ccm-dashboard-content-inner,
body.hark-platform-shell-enabled .ccm-dashboard-panel-list,
body.hark-platform-shell-enabled .ccm-dashboard-page {
    max-width: none !important;
    width: 100% !important;
}

body.hark-platform-shell-enabled .ccm-dashboard-panel-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
    gap: 28px 24px !important;
}

body.hark-platform-shell-enabled .ccm-dashboard-panel-list > div,
body.hark-platform-shell-enabled .ccm-dashboard-panel-list > section {
    min-width: 0 !important;
}

/* Concrete standard card-stijl override naar Hark-stijl */
.ccm-dashboard-panel-list h2,
.ccm-dashboard-content h1 {
    color: var(--hark-primary) !important;
    font-family: 'Segoe UI', Arial, sans-serif !important;
}

.ccm-dashboard-content .card,
.ccm-dashboard-content .panel,
.ccm-dashboard-content .ccm-dashboard-card,
.ccm-ui .card {
    border: 1px solid var(--hark-border) !important;
    border-radius: var(--hark-radius) !important;
    box-shadow: var(--hark-shadow) !important;
}

/* Knoppen primary → Hark accent */
.btn-primary,
.ccm-btn-primary {
    background: var(--hark-accent) !important;
    border-color: var(--hark-accent) !important;
}
.btn-primary:hover,
.ccm-btn-primary:hover {
    background: #e55a28 !important;
    border-color: #e55a28 !important;
}

/* ============================================================
   VERBERG CONCRETE CMS-TEKST IN TITLES EN HEADERS
   JS doet de verdere tekstvervangingen
   ============================================================ */
.ccm-dashboard-content title,
.ccm-powered-by {
    display: none !important;
}

/* ============================================================
   HARK AI TOOLS
   ============================================================ */
#hark-ai-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 42px !important;
    height: 30px !important;
    margin: 0 8px !important;
    padding: 0 12px !important;
    border: 0 !important;
    border-radius: var(--hark-radius) !important;
    background: #2563eb !important;
    color: #fff !important;
    font: 800 13px/1 'Segoe UI', Arial, sans-serif !important;
    cursor: pointer !important;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .24) !important;
    z-index: 10040 !important;
}

#hark-ai-btn.is-floating {
    position: fixed !important;
    right: 24px !important;
    bottom: 24px !important;
    width: 54px !important;
    height: 54px !important;
    border-radius: 999px !important;
    margin: 0 !important;
}

body.hark-ai-panel-open #hark-ai-btn.is-floating {
    display: none !important;
}

@media (max-width: 760px) {
    #hark-platform-admin-shell .hark-platform-top {
        padding: 0 12px;
    }

    #hark-platform-admin-shell .hark-platform-actions {
        display: none;
    }

    #hark-platform-admin-shell .hark-platform-user strong {
        max-width: 128px;
    }

    body.hark-platform-shell-enabled #ccm-dashboard-content,
    body.hark-platform-shell-enabled .ccm-dashboard-content,
    body.hark-platform-shell-enabled main.ccm-dashboard-layout-content {
        padding: 14px 14px 42px !important;
    }

    body.hark-platform-shell-enabled .hark-dashboard-side-panel {
        top: var(--hark-shell-height) !important;
        width: min(88vw, 340px) !important;
        padding: 18px 18px 24px !important;
    }

    .hark-dashboard-side-panel-toggle {
        right: 12px;
        bottom: 82px;
    }

    .hark-dashboard-side-panel-floating-close {
        top: calc(var(--hark-shell-height) + 10px);
        right: 12px;
    }

    #hark-dashboard-banner {
        align-items: stretch;
        flex-wrap: wrap;
    }

    #hark-dashboard-banner .hark-banner-copy {
        flex: 1 1 calc(100% - 44px);
        flex-wrap: wrap;
    }

    #hark-dashboard-banner .hark-banner-website,
    #hark-dashboard-banner .hark-banner-back {
        flex: 1 1 auto;
        text-align: center;
    }
}

#hark-ai-panel {
    position: fixed;
    top: var(--hark-shell-height);
    right: 0;
    width: min(430px, calc(100vw - 18px));
    height: calc(100vh - var(--hark-shell-height));
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    border-left: 1px solid #d9e2ec;
    box-shadow: -22px 0 48px rgba(15, 23, 42, .18);
    color: #0f172a;
    font-family: 'Segoe UI', Arial, sans-serif;
    transform: translateX(105%);
    transition: transform .18s ease;
    z-index: 29900;
}

#hark-ai-panel.is-open {
    transform: translateX(0);
}

.hark-ai-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    background: #102A43;
    color: #fff;
}

.hark-ai-head strong {
    display: block;
    font-size: 16px;
}

.hark-ai-head span {
    display: block;
    margin-top: 2px;
    color: rgba(255,255,255,.72);
    font-size: 12px;
}

.hark-ai-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: rgba(255,255,255,.12);
    color: #fff;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.hark-ai-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 14px;
}

.hark-ai-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 0 0 10px;
}

.hark-ai-field span {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.hark-ai-field textarea,
.hark-ai-field select {
    width: 100%;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font: 13px/1.4 'Segoe UI', Arial, sans-serif;
    padding: 9px 10px;
    box-sizing: border-box;
}

.hark-ai-field textarea:focus,
.hark-ai-field select:focus {
    border-color: #2563eb;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.hark-ai-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.hark-ai-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 4px 0 12px;
}

.hark-ai-action {
    min-height: 38px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    cursor: pointer;
    font: 750 13px/1 'Segoe UI', Arial, sans-serif;
}

.hark-ai-action:hover {
    background: #dbeafe;
    border-color: #60a5fa;
}

.hark-ai-result {
    min-height: 170px;
    border: 1px solid #d9e2ec;
    border-radius: 10px;
    background: #fff;
    padding: 13px;
    color: #1f2933;
    font-size: 13px;
    line-height: 1.5;
}

.hark-ai-result h3 {
    margin: 0 0 8px;
    color: #102A43;
    font-size: 15px;
}

.hark-ai-result small {
    display: block;
    margin-top: 10px;
    color: #64748b;
}

.hark-ai-mutation {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 0 0 12px;
    padding: 10px 11px;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    background: #ecfdf5;
    color: #14532d;
}

.hark-ai-mutation strong {
    font-size: 13px;
}

.hark-ai-mutation span {
    color: #166534;
}

.hark-ai-mutation-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.hark-ai-mutation-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
}

.hark-ai-mutation-links a,
.hark-ai-mutation-list a {
    color: #1d4ed8 !important;
    font-weight: 800;
    text-decoration: none !important;
}

.hark-ai-error {
    color: #b91c1c;
}

.hark-ai-loading {
    color: #2563eb;
    font-weight: 700;
}

.hark-ai-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid #d9e2ec;
    background: #fff;
}

.hark-ai-secondary,
.hark-ai-concrete-note {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #f8fafc;
    color: #102A43 !important;
    cursor: pointer;
    font: 750 12px/1 'Segoe UI', Arial, sans-serif;
    text-decoration: none !important;
}

.hark-ai-concrete-note {
    margin-left: auto;
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #166534 !important;
}

@media (max-width: 560px) {
    .hark-ai-grid,
    .hark-ai-actions {
        grid-template-columns: 1fr;
    }
}
