/**
 * PAL Theme — Phase 1: Global design system & shell
 * Indigo / cyan palette, tokens, typography, Bootstrap surfaces, footer, side nav.
 */

/* --- Tokens --- */
:root {
    --pal-primary: #4f46e5;
    --pal-primary-rgb: 79, 70, 229;
    --pal-primary-hover: #4338ca;
    --pal-accent: #0891b2;
    --pal-accent-rgb: 8, 145, 178;
    --pal-radius-sm: 0.375rem;
    --pal-radius: 0.625rem;
    --pal-radius-lg: 0.875rem;
    --pal-radius-pill: 999px;
    --pal-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --pal-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
    --pal-shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.12);
    --pal-font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --pal-transition: 0.18s ease;

    --bs-primary: var(--pal-primary);
    --bs-primary-rgb: var(--pal-primary-rgb);
    --bs-link-color: var(--pal-primary);
    --bs-link-hover-color: var(--pal-primary-hover);
    --fb-page-bg: #f0f4f8;
    --fb-hero-gradient: linear-gradient(125deg, #1e1b4b 0%, #312e81 36%, #0e7490 100%);
    --fb-hero-glow: rgba(34, 211, 238, 0.22);
    --fb-card-border: rgba(15, 23, 42, 0.07);
    --fb-footer-bg: #0f172a;
    --fb-footer-text: #94a3b8;
}

[data-bs-theme="dark"] {
    --fb-page-bg: #0b0f14;
    --fb-hero-gradient: linear-gradient(125deg, #0c0a1a 0%, #1e1b4b 45%, #134e4a 100%);
    --fb-hero-glow: rgba(34, 211, 238, 0.08);
    --fb-card-border: rgba(255, 255, 255, 0.08);
    --fb-footer-bg: #050810;
    --fb-footer-text: #94a3b8;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* --- Base --- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--pal-font);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    line-height: 1.55;
}

::selection {
    background: rgba(var(--pal-primary-rgb), 0.18);
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--pal-accent);
    outline-offset: 2px;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
    letter-spacing: -0.02em;
    font-weight: 600;
}

.lead {
    line-height: 1.55;
}

/* --- Skip link --- */
.fb-skip-link {
    position: absolute;
    left: 0.75rem;
    top: -100px;
    z-index: 1080;
    padding: 0.5rem 1rem;
    background: var(--pal-primary);
    color: #fff !important;
    border-radius: var(--pal-radius-sm);
    font-weight: 600;
    text-decoration: none;
    transition: top var(--pal-transition);
}

.fb-skip-link:focus {
    top: 0.75rem;
}

/* --- Shell --- */
.fb-client-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--fb-page-bg);
    background-image: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(var(--pal-primary-rgb), 0.07), transparent),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(var(--pal-accent-rgb), 0.05), transparent);
}

.fb-main-wrap {
    flex: 1 1 auto;
}

[data-bs-theme="dark"] .fb-client-wrapper {
    background-image: radial-gradient(ellipse 70% 40% at 50% 0%, rgba(var(--pal-primary-rgb), 0.12), transparent);
}

/* --- Header / navbar --- */
.fb-site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(var(--bs-body-bg-rgb), 0.82);
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    border-bottom: 1px solid var(--bs-border-color);
    box-shadow: var(--pal-shadow-sm);
}

.fb-navbar .navbar-brand {
    font-weight: 700;
    letter-spacing: -0.03em;
    font-size: 1.15rem;
}

.fb-navbar .nav-link {
    font-weight: 500;
    padding: 0.45rem 0.75rem;
    border-radius: var(--pal-radius-sm);
    transition: background var(--pal-transition), color var(--pal-transition);
}

.fb-navbar .nav-link:hover {
    background: rgba(var(--pal-primary-rgb), 0.08);
    color: var(--bs-emphasis-color);
}

.fb-nav-cta {
    font-weight: 600;
    border-radius: var(--pal-radius-pill);
    padding: 0.45rem 1.35rem;
    border: 0;
    background: linear-gradient(135deg, var(--pal-primary) 0%, #6366f1 100%);
    box-shadow: 0 4px 18px rgba(var(--pal-primary-rgb), 0.4);
    transition: transform var(--pal-transition), box-shadow var(--pal-transition);
}

.fb-nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(var(--pal-primary-rgb), 0.45);
}

.fb-lang-select,
.fb-navbar .js-language-selector {
    border-radius: var(--pal-radius);
    border: 1px solid var(--bs-border-color);
    font-size: 0.875rem;
    max-width: 220px;
}

.fb-user-menu-toggle {
    font-weight: 500;
    border-radius: var(--pal-radius-pill) !important;
    padding: 0.35rem 0.85rem !important;
    gap: 0.35rem;
    display: inline-flex !important;
    align-items: center;
    border: 1px solid var(--bs-border-color) !important;
    background: var(--bs-body-bg) !important;
}

.fb-nav-toggler:focus {
    box-shadow: none;
}

.fb-topnav-mobile .nav-link {
    border-radius: var(--pal-radius);
    padding: 0.6rem 0.75rem;
}

.fb-mobile-auth .btn {
    border-radius: var(--pal-radius);
    font-weight: 600;
}

/* --- Main / content block --- */
.fb-main-wrap .content-block {
    border-radius: var(--pal-radius-lg);
    background: var(--bs-body-bg);
    border: 1px solid var(--fb-card-border);
    padding: 1.5rem 1.75rem;
    box-shadow: var(--pal-shadow);
}

[data-bs-theme="dark"] .fb-main-wrap .content-block {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

@media (max-width: 767.98px) {
    .fb-main-wrap .content-block {
        padding: 1rem 1.15rem;
    }
}

.dashboard .fb-main-wrap .content-block,
.order-index .fb-main-wrap .content-block,
.order-product .fb-main-wrap .content-block,
.cart-page .fb-main-wrap .content-block,
.order-checkout .fb-main-wrap .content-block {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding-left: 0;
    padding-right: 0;
}

/* --- Multi-step checkout (shop → cart → payment) --- */
.fb-checkout-steps-list {
    gap: 0.5rem 1rem;
    align-items: center;
}

.fb-checkout-step {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    border-radius: var(--pal-radius-pill);
    border: 1px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    font-size: 0.85rem;
    font-weight: 600;
}

.fb-checkout-step a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
}

.fb-checkout-step a:hover {
    color: var(--pal-primary);
}

.fb-checkout-step.is-active {
    border-color: rgba(var(--pal-primary-rgb), 0.45);
    background: rgba(var(--pal-primary-rgb), 0.08);
    color: var(--bs-emphasis-color);
}

.fb-checkout-step.is-done {
    border-color: rgba(var(--pal-accent-rgb), 0.35);
    color: var(--bs-secondary-color);
}

.fb-checkout-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(var(--pal-primary-rgb), 0.15);
    color: var(--pal-primary);
}

.fb-checkout-step.is-active .fb-checkout-step-num {
    background: var(--pal-primary);
    color: #fff;
}

.fb-checkout-step-sep {
    opacity: 0.45;
    font-size: 0.9rem;
}

.fb-checkout-client-embed .accordion-item {
    border: 0;
    background: transparent;
}

.fb-checkout-client-embed .accordion-header {
    display: none !important;
}

.fb-checkout-client-embed .accordion-collapse {
    display: block !important;
    height: auto !important;
}

.fb-checkout-client-embed .accordion-body {
    padding: 0;
}

/* Breadcrumb */
.fb-breadcrumb {
    padding: 0.45rem 0.85rem;
    background: rgba(var(--pal-primary-rgb), 0.06);
    border-radius: var(--pal-radius-pill);
    font-size: 0.82rem;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(var(--pal-primary-rgb), 0.1);
}

.fb-breadcrumb .breadcrumb-item a {
    font-weight: 500;
    text-decoration: none;
}

.fb-breadcrumb .breadcrumb-item.active {
    color: var(--bs-secondary-color);
}

/* --- Side panel --- */
.fb-sidebar-col .fb-side-panel.offcanvas-md {
    border-radius: var(--pal-radius-lg);
    border: 1px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    box-shadow: var(--pal-shadow);
}

.fb-side-nav-head {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
}

.fb-side-nav .nav-link {
    font-weight: 500;
    border-radius: var(--pal-radius);
    padding: 0.55rem 0.75rem;
    margin-bottom: 0.2rem;
    color: var(--bs-body-color);
    transition: background var(--pal-transition), color var(--pal-transition), box-shadow var(--pal-transition);
}

.fb-side-nav .nav-link:hover {
    background: rgba(var(--pal-primary-rgb), 0.08);
    color: var(--pal-primary);
}

.fb-side-nav .nav-link .svg-icon {
    opacity: 0.85;
}

.fb-side-nav .offcanvas-item {
    border: 0;
}

.fb-side-nav .offcanvas-item:hover {
    background: transparent;
}

.fb-side-widget {
    border-radius: var(--pal-radius);
    padding: 1rem !important;
    margin-top: 0.5rem !important;
    background: linear-gradient(145deg, rgba(var(--pal-primary-rgb), 0.08), rgba(var(--pal-accent-rgb), 0.06));
    border: 1px solid rgba(var(--pal-primary-rgb), 0.12);
}

/* --- Buttons (global polish) --- */
.btn {
    font-weight: 600;
    border-radius: var(--pal-radius);
    transition: transform var(--pal-transition), box-shadow var(--pal-transition), background var(--pal-transition),
        border-color var(--pal-transition);
}

.btn-primary {
    background: linear-gradient(180deg, #6366f1 0%, var(--pal-primary) 100%);
    border-color: var(--pal-primary);
    box-shadow: 0 2px 8px rgba(var(--pal-primary-rgb), 0.3);
}

.btn-primary:hover {
    background: linear-gradient(180deg, var(--pal-primary-hover) 0%, #3730a3 100%);
    border-color: var(--pal-primary-hover);
}

.btn-outline-primary {
    border-width: 2px;
    font-weight: 600;
}

.btn-sm {
    border-radius: var(--pal-radius-sm);
}

/* --- Forms --- */
.form-control,
.form-select {
    border-radius: var(--pal-radius);
    border: 1px solid var(--bs-border-color);
    padding: 0.5rem 0.85rem;
    transition: border-color var(--pal-transition), box-shadow var(--pal-transition);
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(var(--pal-primary-rgb), 0.45);
    box-shadow: 0 0 0 0.2rem rgba(var(--pal-primary-rgb), 0.15);
}

.form-label {
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.35rem;
}

.input-group-text {
    border-radius: var(--pal-radius);
}

/* --- Cards --- */
.card {
    border-radius: var(--pal-radius-lg);
    border: 1px solid var(--bs-border-color);
    box-shadow: var(--pal-shadow-sm);
    overflow: hidden;
}

.card-header {
    font-weight: 600;
    background: linear-gradient(180deg, rgba(var(--pal-primary-rgb), 0.04), transparent);
    border-bottom-color: var(--bs-border-color);
}

/* --- Alerts & flash --- */
.alert {
    border-radius: var(--pal-radius);
    border: 1px solid transparent;
    box-shadow: var(--pal-shadow-sm);
}

.alert-success {
    border-color: rgba(25, 135, 84, 0.25);
}

.alert-danger {
    border-color: rgba(220, 53, 69, 0.25);
}

.alert-warning {
    border-color: rgba(255, 193, 7, 0.35);
}

.fb-flash .fb-flash-icon {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: var(--pal-radius-sm);
    background: rgba(255, 255, 255, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 800;
    font-size: 0.85rem;
    line-height: 1;
}

[data-bs-theme="dark"] .fb-flash .fb-flash-icon {
    background: rgba(0, 0, 0, 0.2);
}

/* --- Tables --- */
.table {
    --bs-table-bg: transparent;
}

.table thead th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: var(--bs-secondary-color);
    border-bottom-width: 1px;
}

.table tbody tr {
    transition: background var(--pal-transition);
}

.table-hover > tbody > tr:hover {
    background: rgba(var(--pal-primary-rgb), 0.04);
}

/* --- List group --- */
.list-group-item {
    border-radius: var(--pal-radius-sm) !important;
    margin-bottom: 0.35rem;
    border: 1px solid var(--bs-border-color);
}

.list-group-item-action:hover {
    background: rgba(var(--pal-primary-rgb), 0.05);
}

/* --- Accordion --- */
.accordion-button {
    font-weight: 600;
    border-radius: var(--pal-radius) !important;
}

.accordion-item {
    border-radius: var(--pal-radius) !important;
    margin-bottom: 0.5rem;
    overflow: hidden;
    border: 1px solid var(--bs-border-color);
}

/* --- Pagination --- */
.pagination .page-link {
    border-radius: var(--pal-radius-sm);
    margin: 0 0.15rem;
    font-weight: 500;
    border: 1px solid var(--bs-border-color);
}

.pagination .page-item.active .page-link {
    background: var(--pal-primary);
    border-color: var(--pal-primary);
}

/* --- Dropdown --- */
.dropdown-menu {
    border-radius: var(--pal-radius-lg);
    border: 1px solid var(--bs-border-color);
    box-shadow: var(--pal-shadow-lg);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: var(--pal-radius-sm);
    font-weight: 500;
    padding: 0.45rem 0.75rem;
}

.dropdown-item:hover {
    background: rgba(var(--pal-primary-rgb), 0.08);
}

/* --- Badges --- */
.badge {
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* --- Footer --- */
#footer.fb-site-footer,
.fb-site-footer.fb-site-footer--fullwidth {
    width: 100%;
    max-width: none;
    margin-top: auto;
    margin-left: 0;
    margin-right: 0;
}

.fb-site-footer {
    color: var(--fb-footer-text);
}

.fb-site-footer-main {
    background: linear-gradient(165deg, #0f172a 0%, #1e1b4b 42%, #0e7490 160%);
    color: #e2e8f0;
    border-top: 1px solid rgba(34, 211, 238, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

[data-bs-theme="dark"] .fb-site-footer-main {
    background: linear-gradient(165deg, #020617 0%, #0f172a 45%, #134e4a 150%);
    border-top-color: rgba(34, 211, 238, 0.08);
}

.fb-footer-bank {
    color: #94a3b8;
}

.fb-footer-bank strong {
    color: #e2e8f0;
    font-weight: 600;
}

.fb-footer-heading {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #94a3b8;
    margin-bottom: 1rem;
}

.fb-footer-logo-text {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #f8fafc;
}

.fb-footer-tagline {
    max-width: 22rem;
    line-height: 1.5;
    color: #94a3b8 !important;
}

.fb-footer-links {
    margin: 0;
}

.fb-footer-links li {
    margin-bottom: 0.45rem;
}

.fb-footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color var(--pal-transition);
}

.fb-footer-links a:hover {
    color: #22d3ee;
}

.fb-site-footer-bottom {
    background: linear-gradient(180deg, #020617 0%, #0f172a 100%);
    border-top: 1px solid rgba(34, 211, 238, 0.08);
    color: #94a3b8;
    font-size: 0.82rem;
}

.fb-site-footer-bottom a {
    color: #94a3b8;
}

.fb-site-footer-bottom a:hover {
    color: #22d3ee;
}

.fb-back-top {
    border-radius: var(--pal-radius-pill);
    box-shadow: var(--pal-shadow-lg);
    font-weight: 600;
}

/* --- Hero & marketing (from earlier phases) --- */
.fb-hero {
    position: relative;
    overflow: hidden;
    background: var(--fb-hero-gradient);
    color: #f8fafc;
    padding: clamp(2.5rem, 5vw, 4.25rem) 0;
    margin-bottom: 0;
}

.fb-hero::before {
    content: "";
    position: absolute;
    inset: -40% 15% auto -25%;
    height: 130%;
    background: radial-gradient(ellipse, var(--fb-hero-glow), transparent 55%);
    pointer-events: none;
}

.fb-hero .container {
    position: relative;
    z-index: 1;
}

.fb-hero-title {
    font-size: clamp(1.85rem, 4vw, 2.85rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.12;
    margin-bottom: 1rem;
    max-width: 20ch;
}

.fb-hero-lead {
    font-size: 1.075rem;
    opacity: 0.93;
    max-width: 42rem;
    line-height: 1.55;
    margin-bottom: 1.5rem;
}

.fb-hero-actions .btn {
    font-weight: 600;
    border-radius: var(--pal-radius-pill);
    padding: 0.55rem 1.5rem;
}

.fb-hero .btn-light {
    color: #1e1b4b;
}

.fb-hero-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem 2rem;
    margin-top: 2rem;
    padding-top: 1.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 0.9rem;
    opacity: 0.95;
}

.fb-hero-metrics strong {
    display: block;
    font-size: 1.12rem;
    font-weight: 700;
}

.fb-trust-strip {
    background: var(--bs-body-bg);
    border-bottom: 1px solid var(--bs-border-color);
    padding: 1.75rem 0;
}

.fb-trust-item {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
}

.fb-trust-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--pal-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--pal-primary-rgb), 0.12);
    color: var(--pal-primary);
}

.fb-trust-item h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.2rem;
}

.fb-trust-item p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--bs-secondary-color);
    line-height: 1.45;
}

.fb-services-catalog {
    padding: 2.5rem 0 1rem;
    background: var(--fb-page-bg);
}

.fb-section-head {
    margin-bottom: 1.5rem;
}

.fb-section-head h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
}

.fb-section-head p {
    margin: 0;
    color: var(--bs-secondary-color);
    font-size: 0.95rem;
}

.fb-category-block {
    margin-bottom: 2.5rem;
}

.fb-category-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--bs-emphasis-color);
}

.fb-category-desc {
    font-size: 0.875rem;
    color: var(--bs-secondary-color);
    margin-bottom: 1rem;
}

.fb-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.fb-product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.25rem;
    border-radius: var(--pal-radius-lg);
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    text-decoration: none;
    color: inherit;
    transition: transform var(--pal-transition), box-shadow var(--pal-transition), border-color var(--pal-transition);
}

.fb-product-card:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--pal-primary-rgb), 0.35);
    box-shadow: var(--pal-shadow-lg);
    color: inherit;
}

.fb-product-card:hover .fb-product-card-cta {
    color: var(--pal-primary);
}

.fb-product-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--pal-radius);
    object-fit: contain;
    margin-bottom: 1rem;
    background: rgba(var(--pal-primary-rgb), 0.1);
    padding: 8px;
}

.fb-product-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.fb-product-excerpt {
    font-size: 0.84rem;
    color: var(--bs-secondary-color);
    line-height: 1.5;
    flex-grow: 1;
    margin-bottom: 1rem;
}

.fb-product-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--bs-border-color);
}

.fb-price-tag {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--bs-emphasis-color);
}

.fb-product-card-cta {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bs-secondary-color);
    white-space: nowrap;
}

/* Order page */
.order-index .fb-page-title-wrap {
    margin-bottom: 1.25rem;
}

.order-index .fb-page-title-wrap h1 {
    font-size: 1.55rem;
}

.order-index .card.fb-order-shell,
.order-product .card.fb-order-shell {
    border-radius: var(--pal-radius-lg);
    border: 1px solid var(--bs-border-color);
    box-shadow: var(--pal-shadow);
}

.order-index .card.fb-order-shell .card-header,
.order-product .card.fb-order-shell .card-header {
    background: linear-gradient(180deg, rgba(var(--pal-primary-rgb), 0.06), transparent);
}

#orderManager .fb-ob-category {
    margin-bottom: 2rem;
}

#orderManager .fb-ob-category:last-child {
    margin-bottom: 0;
}

#orderManager .fb-ob-category-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

#orderManager .fb-ob-category-desc {
    font-size: 0.875rem;
    color: var(--bs-secondary-color);
    margin-bottom: 1rem;
}

/* Legacy flash blocks */
.h-block {
    border-radius: var(--pal-radius);
    padding: 1rem 1.15rem;
    margin-bottom: 1rem;
    border: 1px solid var(--bs-border-color);
}

.h-block.error,
.h-block.danger {
    background: rgba(220, 53, 69, 0.08);
    border-color: rgba(220, 53, 69, 0.25);
}

.h-block.success {
    background: rgba(25, 135, 84, 0.1);
    border-color: rgba(25, 135, 84, 0.25);
}

.h-block h2 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.35rem;
    opacity: 0.85;
}

/* Error page */
.error-page .display-1 {
    font-weight: 800;
    background: linear-gradient(135deg, var(--pal-primary), var(--pal-accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ========== Phase 2: Auth (login / signup / reset) ========== */
.fb-auth-page {
    position: relative;
    min-height: 100vh;
    background: var(--bs-body-bg);
}

.fb-auth-page .fb-auth-backdrop {
    display: none;
}

.fb-auth-aside {
    background: var(--fb-hero-gradient);
    color: #e2e8f0;
    position: relative;
    overflow: hidden;
    align-items: stretch;
}

.fb-auth-aside::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 90% 60% at 20% 20%, var(--fb-hero-glow), transparent 50%),
        radial-gradient(ellipse 70% 50% at 100% 100%, rgba(var(--pal-primary-rgb), 0.25), transparent 45%);
    pointer-events: none;
}

.fb-auth-aside-inner {
    position: relative;
    z-index: 1;
    padding: clamp(2rem, 5vw, 3.5rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    max-width: 26rem;
}

.fb-auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #f8fafc !important;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
}

.fb-auth-brand img {
    max-height: 48px;
    width: auto;
}

.fb-auth-aside-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #f8fafc;
    margin-bottom: 1rem;
}

.fb-auth-aside-lead {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 1.75rem;
}

.fb-auth-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fb-auth-bullets li {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    margin-bottom: 0.85rem;
    font-size: 0.92rem;
    opacity: 0.92;
}

.fb-auth-bullets li::before {
    content: "✓";
    color: #22d3ee;
    font-weight: 800;
    flex-shrink: 0;
}

.fb-auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    background: linear-gradient(180deg, var(--fb-page-bg) 0%, var(--bs-body-bg) 40%);
}

.fb-auth-main-inner {
    width: 100%;
    max-width: 26rem;
}

.fb-auth-main-inner--wide {
    max-width: 40rem;
}

.fb-auth-card {
    border-radius: var(--pal-radius-lg);
    border: 1px solid var(--bs-border-color);
    box-shadow: var(--pal-shadow-lg);
    overflow: hidden;
}

.fb-auth-card .card-body {
    padding: clamp(1.35rem, 4vw, 2rem);
}

.fb-auth-card h1,
.fb-auth-card .fb-auth-card-title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-align: center;
    margin: 0 0 1.25rem;
}

.page-signup .fb-auth-card h1 {
    font-size: 1.25rem;
}

.fb-auth-logo-mobile {
    text-align: center;
    margin-bottom: 1.25rem;
}

.fb-auth-logo-mobile img {
    max-height: 52px;
}

.fb-auth-foot {
    text-align: center;
    margin-top: 1.25rem;
}

.fb-auth-foot a {
    font-weight: 600;
    text-decoration: none;
}

.fb-auth-foot a:hover {
    text-decoration: underline;
}

.page-login .auth .form-control,
.page-signup .auth .form-control,
.page-password-reset .auth .form-control,
.page-set-password .auth .form-control {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}

/* ========== Phase 2: Client area data pages (invoices / services / support) ========== */
.fb-surface-card {
    border-radius: var(--pal-radius-lg);
    border: 1px solid var(--bs-border-color);
    box-shadow: var(--pal-shadow);
    overflow: hidden;
}

.fb-surface-card > .card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--bs-border-color);
    background: linear-gradient(180deg, rgba(var(--pal-primary-rgb), 0.05), transparent 85%);
}

.fb-page-heading h1 {
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 0.35rem;
}

.fb-page-heading .text-muted,
.fb-page-heading .text-secondary {
    font-size: 0.9rem;
    line-height: 1.45;
    max-width: 42rem;
}

.fb-page-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-end;
}

.invoice-index .nav-tabs,
.support-tickets .nav-tabs,
.order-list .nav-tabs {
    border-bottom: 1px solid var(--bs-border-color);
    gap: 0.25rem;
}

.invoice-index .nav-tabs .nav-link,
.support-tickets .nav-tabs .nav-link {
    border-radius: var(--pal-radius) var(--pal-radius) 0 0;
    font-weight: 600;
    padding: 0.55rem 1rem;
    border: 1px solid transparent;
}

.invoice-index .nav-tabs .nav-link.active,
.support-tickets .nav-tabs .nav-link.active {
    background: var(--bs-body-bg);
    border-color: var(--bs-border-color);
    border-bottom-color: var(--bs-body-bg);
    color: var(--pal-primary);
}

.invoice-index .tab-content {
    padding-top: 1rem;
}

.fb-data-table-wrap {
    border-radius: var(--pal-radius);
    border: 1px solid var(--bs-border-color);
    overflow: hidden;
    background: var(--bs-body-bg);
}

.fb-data-table {
    margin-bottom: 0;
}

.fb-data-table thead th {
    background: rgba(var(--pal-primary-rgb), 0.04);
    border-bottom-width: 1px;
    white-space: nowrap;
}

.fb-data-table tbody td {
    vertical-align: middle;
}

.fb-data-table tbody tr:last-child td {
    border-bottom: 0;
}

.fb-empty-state {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: var(--bs-secondary-color);
}

.fb-empty-state .lead {
    font-size: 1rem;
    margin-bottom: 0;
}

.support-tickets .modal-content {
    border-radius: var(--pal-radius-lg);
    border: 1px solid var(--bs-border-color);
    box-shadow: var(--pal-shadow-lg);
}

.support-tickets .modal-header {
    border-bottom: 1px solid var(--bs-border-color);
    padding: 1.1rem 1.25rem;
}

.support-tickets .modal-title {
    font-weight: 700;
    font-size: 1.05rem;
}

.support-tickets .modal-footer {
    border-top: 1px solid var(--bs-border-color);
}

/* Order / services list (Phase 2 CSS-only polish) */
.order-list .card.mb-4 {
    border-radius: var(--pal-radius-lg);
    border: 1px solid var(--bs-border-color);
    box-shadow: var(--pal-shadow);
    overflow: hidden;
}

.order-list .card-header {
    padding: 1.25rem 1.5rem;
    background: linear-gradient(180deg, rgba(var(--pal-primary-rgb), 0.05), transparent 85%);
}

.order-list .table {
    margin-bottom: 0;
}

.order-list .table thead th {
    background: rgba(var(--pal-primary-rgb), 0.04);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ========== Phase 3: Invoice detail, service manage, ticket thread, KB, profile ========== */
.invoice-invoice .fb-payment-card {
    border-radius: var(--pal-radius-lg);
    border: 1px solid var(--bs-border-color);
    box-shadow: var(--pal-shadow);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.invoice-invoice .fb-payment-card .card-body {
    padding: 1.25rem 1.5rem;
}

.fb-payment-gateway-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.invoice-invoice .invoice-gateway {
    border-radius: var(--pal-radius);
    border: 2px solid var(--bs-border-color);
    padding: 0.35rem;
    background: var(--bs-body-bg);
    transition: border-color var(--pal-transition), box-shadow var(--pal-transition);
}

.invoice-invoice .invoice-gateway:hover {
    border-color: rgba(var(--pal-primary-rgb), 0.45);
    box-shadow: var(--pal-shadow-sm);
}

.invoice-invoice .invoice-gateway .btn-check:checked + label {
    outline: 2px solid var(--pal-primary);
    outline-offset: 2px;
    border-radius: var(--pal-radius-sm);
}

.invoice-invoice .fb-invoice-doc {
    border-radius: var(--pal-radius-lg);
    border: 1px solid var(--bs-border-color);
    box-shadow: var(--pal-shadow);
}

.invoice-invoice .fb-invoice-doc .card-header {
    padding: 1.15rem 1.5rem;
}

.invoice-invoice .fb-invoice-well {
    padding: 1rem 1.15rem;
    border-radius: var(--pal-radius);
    background: rgba(var(--pal-primary-rgb), 0.03);
    border: 1px solid var(--bs-border-color);
}

.invoice-invoice .fb-invoice-well h4,
.invoice-invoice .fb-invoice-well h5 {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.invoice-invoice .table {
    border-radius: var(--pal-radius);
    overflow: hidden;
}

.invoice-invoice #paymentPrompt .modal-footer .btn-primary {
    background: var(--bs-secondary);
    border-color: var(--bs-secondary);
}

.order-manage .fb-service-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.order-manage .fb-data-spec-table {
    margin-bottom: 0;
}

.order-manage .fb-data-spec-table td:first-child {
    width: 34%;
    font-weight: 600;
    color: var(--bs-secondary-color);
    background: rgba(var(--pal-primary-rgb), 0.03);
}

.order-manage .modal-dialog {
    border-radius: var(--pal-radius-lg);
}

.support-ticket .fb-ticket-meta,
.support-contact-us-conversation .fb-ticket-meta {
    border-radius: var(--pal-radius-lg);
    box-shadow: var(--pal-shadow);
}

.support-ticket .fb-ticket-meta .table td:first-child,
.support-contact-us-conversation .fb-ticket-meta .table td:first-child {
    font-weight: 600;
    width: 38%;
    color: var(--bs-secondary-color);
}

.support-ticket .fb-ticket-msg,
.support-contact-us-conversation .fb-ticket-msg {
    border-radius: var(--pal-radius-lg);
    border: 1px solid var(--bs-border-color);
    overflow: hidden;
    box-shadow: var(--pal-shadow-sm);
}

.support-ticket .fb-ticket-msg--staff,
.support-contact-us-conversation .fb-ticket-msg--staff {
    border-color: rgba(var(--pal-primary-rgb), 0.35);
    box-shadow: 0 0 0 1px rgba(var(--pal-primary-rgb), 0.08);
}

.support-ticket .fb-ticket-msg .card-header,
.support-contact-us-conversation .fb-ticket-msg .card-header {
    background: rgba(var(--pal-primary-rgb), 0.04);
    border-bottom: 1px solid var(--bs-border-color);
}

.support-ticket .fb-ticket-msg--staff .card-header,
.support-contact-us-conversation .fb-ticket-msg--staff .card-header {
    background: rgba(var(--pal-primary-rgb), 0.09);
}

.support-ticket .fb-ticket-reply,
.support-contact-us-conversation .fb-ticket-reply {
    border-radius: var(--pal-radius-lg);
    border: 1px solid var(--bs-border-color);
    box-shadow: var(--pal-shadow);
}

.kb-index .fb-kb-search .input-group {
    max-width: 22rem;
}

.kb-index .fb-kb-category-card {
    display: block;
    height: 100%;
    min-height: 7.5rem;
    border-radius: var(--pal-radius-lg);
    border: 1px solid var(--bs-border-color);
    text-decoration: none;
    color: inherit;
    transition: transform var(--pal-transition), border-color var(--pal-transition), box-shadow var(--pal-transition);
    box-shadow: var(--pal-shadow-sm);
}

.kb-index .fb-kb-category-card:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--pal-primary-rgb), 0.35);
    box-shadow: var(--pal-shadow);
    color: inherit;
}

.kb-index .fb-kb-category-card .card-title {
    font-size: 1.05rem;
    font-weight: 700;
}

.client-profile .fb-surface-card > .card-header {
    padding: 0 1rem;
    background: linear-gradient(180deg, rgba(var(--pal-primary-rgb), 0.05), transparent);
}

.client-profile .fb-profile-tabs.nav-tabs {
    border-bottom: 0;
    gap: 0.25rem;
}

.client-profile .fb-profile-tabs .nav-link {
    border-radius: var(--pal-radius) var(--pal-radius) 0 0;
    font-weight: 600;
    padding: 0.65rem 1rem;
    border: 1px solid transparent;
}

.client-profile .fb-profile-tabs .nav-link.active {
    background: var(--bs-body-bg);
    border-color: var(--bs-border-color);
    border-bottom-color: var(--bs-body-bg);
    color: var(--pal-primary);
}

.client-profile .tab-content > .card-body {
    padding-top: 1.5rem;
}

/* ========== Phase 4: KB article/category, wallet, order product, banklink ========== */
.kb-article .fb-kb-doc,
.kb-category .fb-kb-doc {
    border-radius: var(--pal-radius-lg);
    border: 1px solid var(--bs-border-color);
    box-shadow: var(--pal-shadow);
    overflow: hidden;
}

.kb-article .fb-kb-doc .card-header {
    padding: 1.25rem 1.5rem;
    background: linear-gradient(180deg, rgba(var(--pal-primary-rgb), 0.06), transparent);
    border-bottom: 1px solid var(--bs-border-color);
}

.kb-article .fb-kb-doc .card-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
}

.kb-article .fb-kb-prose {
    max-width: 52rem;
    line-height: 1.65;
    font-size: 1rem;
}

.kb-article .fb-kb-prose .markdown-body {
    background: transparent;
}

.kb-article .fb-kb-doc .card-footer {
    background: rgba(var(--pal-primary-rgb), 0.03);
    border-top: 1px solid var(--bs-border-color);
}

.kb-category .fb-kb-article-list .list-group-item {
    border-radius: var(--pal-radius) !important;
    margin-bottom: 0.5rem;
    border: 1px solid var(--bs-border-color);
    font-weight: 500;
}

.kb-category .fb-kb-article-list .list-group-item:hover {
    border-color: rgba(var(--pal-primary-rgb), 0.35);
    background: rgba(var(--pal-primary-rgb), 0.04);
}

.client-balance .fb-wallet-strip {
    border-radius: var(--pal-radius-lg);
    padding: 1.25rem 1.5rem;
    background: linear-gradient(125deg, rgba(var(--pal-primary-rgb), 0.12), rgba(var(--pal-accent-rgb), 0.08));
    border: 1px solid rgba(var(--pal-primary-rgb), 0.2);
    margin-bottom: 1.25rem;
}

.client-balance .fb-wallet-strip .fb-wallet-balance {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.client-balance .fb-wallet-add .form-control {
    max-width: 12rem;
}

.invoice-banklink .fb-banklink-card {
    border-radius: var(--pal-radius-lg);
    border: 1px solid var(--bs-border-color);
    box-shadow: var(--pal-shadow-lg);
    overflow: hidden;
}

.invoice-banklink .fb-banklink-card .card-header {
    padding: 1.5rem 1.5rem 1rem;
    background: linear-gradient(180deg, rgba(var(--pal-primary-rgb), 0.07), transparent);
    border-bottom: 1px solid var(--bs-border-color);
}

.invoice-banklink .fb-banklink-card .card-header h1 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
}

.invoice-banklink .fb-banklink-embed iframe {
    max-width: 100%;
    min-height: 320px;
    border-radius: var(--pal-radius);
    border: 1px solid var(--bs-border-color);
}

.order-product .fb-page-title-wrap h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 0.25rem;
}

/* ========== Phase 5: Thank you, contact, news, about ========== */
.invoice-thankyou .fb-thankyou-card {
    border-radius: var(--pal-radius-lg);
    box-shadow: var(--pal-shadow-lg);
    border: 1px solid var(--bs-border-color);
    overflow: hidden;
}

.invoice-thankyou .fb-thankyou-icon {
    display: flex;
    justify-content: center;
}

.invoice-thankyou .fb-thankyou-progress {
    height: 0.5rem;
    border-radius: var(--pal-radius-pill);
    overflow: hidden;
}

.support-contact-us .fb-contact-card {
    border-radius: var(--pal-radius-lg);
    box-shadow: var(--pal-shadow);
    border: 1px solid var(--bs-border-color);
    overflow: hidden;
}

.support-contact-us .fb-contact-card > .card-header {
    background: linear-gradient(180deg, rgba(var(--pal-primary-rgb), 0.06), transparent);
    border-bottom: 1px solid var(--bs-border-color);
}

.support-contact-us .fb-contact-company {
    background: rgba(var(--pal-primary-rgb), 0.03);
    border-top: 1px solid var(--bs-border-color);
}

.news-index .fb-news-index-card {
    border-radius: var(--pal-radius-lg);
    box-shadow: var(--pal-shadow);
    border: 1px solid var(--bs-border-color);
    overflow: hidden;
}

.news-index .fb-news-index-card > .card-header {
    background: linear-gradient(180deg, rgba(var(--pal-primary-rgb), 0.06), transparent);
    border-bottom: 1px solid var(--bs-border-color);
}

.news-index .fb-news-teaser {
    border-radius: var(--pal-radius-lg);
    transition: border-color var(--pal-transition), box-shadow var(--pal-transition);
}

.news-index .fb-news-teaser:hover {
    border-color: rgba(var(--pal-primary-rgb), 0.28) !important;
    box-shadow: var(--pal-shadow) !important;
}

.news-index .fb-news-excerpt .markdown-body,
.news-index .fb-news-excerpt p {
    margin-bottom: 0;
    font-size: 0.9375rem;
}

.news-post .fb-news-article {
    border-radius: var(--pal-radius-lg);
    box-shadow: var(--pal-shadow);
    border: 1px solid var(--bs-border-color);
    overflow: hidden;
}

.news-post .fb-news-article > .card-header {
    background: linear-gradient(180deg, rgba(var(--pal-primary-rgb), 0.06), transparent);
    border-bottom: 1px solid var(--bs-border-color);
}

.news-post .fb-news-hero img {
    width: 100%;
    object-fit: cover;
    max-height: 24rem;
}

.news-post .fb-news-prose {
    max-width: 52rem;
    line-height: 1.65;
    font-size: 1rem;
}

.news-post .fb-news-prose .markdown-body {
    background: transparent;
}

.about-us .fb-about-card,
.tos .fb-legal-card,
.privacy-policy .fb-legal-card,
.custom-page .fb-custom-page-card {
    border-radius: var(--pal-radius-lg);
    box-shadow: var(--pal-shadow);
    border: 1px solid var(--bs-border-color);
    overflow: hidden;
}

.about-us .fb-about-card > .card-header,
.tos .fb-legal-card > .card-header,
.privacy-policy .fb-legal-card > .card-header,
.custom-page .fb-custom-page-card > .card-header {
    background: linear-gradient(180deg, rgba(var(--pal-primary-rgb), 0.06), transparent);
    border-bottom: 1px solid var(--bs-border-color);
}

.about-us .fb-about-prose,
.tos .fb-legal-prose,
.privacy-policy .fb-legal-prose,
.custom-page .fb-custom-prose {
    max-width: 52rem;
    line-height: 1.65;
}

.about-us .fb-about-prose .markdown-body,
.tos .fb-legal-prose .markdown-body,
.privacy-policy .fb-legal-prose .markdown-body,
.custom-page .fb-custom-prose .markdown-body {
    background: transparent;
}

/* ========== Phase 6: Legal pages shell + markdown iframe preview ========== */
body.fb-markdown-preview {
    margin: 0;
    min-height: 100vh;
    font-family: var(--pal-font);
    background: #fff;
    color: #24292f;
    -webkit-font-smoothing: antialiased;
}

.fb-markdown-preview__shell {
    box-sizing: border-box;
    max-width: 52rem;
    margin: 0 auto;
    padding: 1.25rem 1.25rem 2rem;
}

@media (min-width: 768px) {
    .fb-markdown-preview__shell {
        padding: 1.75rem 2rem 2.5rem;
    }
}

/* ========== Phase 7: Print invoice, emails, dashboard, services list, custom pages ========== */
body.invoice-print {
    font-family: var(--pal-font);
    background: #fff;
    color: var(--bs-body-color);
}

.invoice-print .fb-invoice-print-card {
    border-radius: var(--pal-radius);
}

.invoice-print .fb-invoice-print-notes .markdown-body {
    background: transparent;
}

.invoice-print .fb-invoice-print-lines thead th {
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bs-secondary-color);
}

@media print {
    body.invoice-print {
        background: #fff !important;
    }

    .invoice-print .fb-invoice-print-card,
    .invoice-print .fb-invoice-print-notes {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
        break-inside: avoid;
    }

    .invoice-print .container {
        max-width: 100% !important;
    }
}

.email-index .fb-email-shell {
    border-radius: var(--pal-radius-lg);
    box-shadow: var(--pal-shadow);
    border: 1px solid var(--bs-border-color);
    overflow: hidden;
}

.email-index .fb-email-shell > .card-header {
    background: linear-gradient(180deg, rgba(var(--pal-primary-rgb), 0.06), transparent);
    border-bottom: 1px solid var(--bs-border-color);
}

.email-index .fb-email-list .list-group-item {
    border-left: 0;
    border-right: 0;
}

.email-index .fb-email-list .list-group-item.active {
    background: rgba(var(--pal-primary-rgb), 0.1);
    border-color: var(--bs-border-color);
    color: inherit;
    font-weight: 600;
}

.email-index .fb-email-list .list-group-item:hover:not(.active) {
    background: rgba(var(--pal-primary-rgb), 0.04);
}

.email-email .fb-email-iframe-wrap iframe,
.email-index .fb-email-iframe-wrap iframe {
    background: var(--bs-body-bg);
}

.dashboard .fb-dashboard-showcase {
    border-radius: var(--pal-radius-lg);
    box-shadow: var(--pal-shadow);
    border: 1px solid var(--bs-border-color);
    overflow: hidden;
}

.dashboard .fb-dashboard-showcase-markdown .markdown-body {
    background: transparent;
}

.dashboard .fb-dashboard-widget {
    border-radius: var(--pal-radius-lg);
    box-shadow: var(--pal-shadow-sm);
    border: 1px solid var(--bs-border-color);
}

.dashboard .fb-dashboard-widget > .card-header {
    background: rgba(var(--pal-primary-rgb), 0.03);
    border-bottom: 1px solid var(--bs-border-color);
}

/* Guest homepage: latest news grid + spacing before footer */
.dashboard-guest .fb-guest-home-resources {
    padding-bottom: 0.25rem;
}

.dashboard-guest .fb-home-news-card {
    border-radius: var(--pal-radius-lg);
    transition: box-shadow var(--pal-transition), transform var(--pal-transition);
}

.dashboard-guest .fb-home-news-card:hover {
    box-shadow: var(--pal-shadow) !important;
}

.dashboard-guest .fb-home-news-excerpt {
    line-height: 1.55;
}

/* ========== Phase 8: Maintenance, cookie consent, service addon panels ========== */
body.system-maintenance {
    min-height: 100vh;
    background: var(--fb-page-bg);
}

.system-maintenance .fb-maintenance-card {
    border-radius: var(--pal-radius-lg);
    box-shadow: var(--pal-shadow-lg);
    border: 1px solid var(--bs-border-color);
}

.system-maintenance .fb-maintenance-logo {
    max-width: 220px;
    height: auto;
}

.fb-cookie-consent .alert {
    border-radius: var(--pal-radius-lg) !important;
    box-shadow: var(--pal-shadow-lg);
}

.fb-cookie-consent .cookie-consent-message :last-child {
    margin-bottom: 0;
}

.fb-service-addon {
    border-radius: var(--pal-radius-lg);
    box-shadow: var(--pal-shadow);
    border: 1px solid var(--bs-border-color);
    overflow: hidden;
}

.fb-service-addon > .card-header {
    background: linear-gradient(180deg, rgba(var(--pal-primary-rgb), 0.06), transparent);
    border-bottom: 1px solid var(--bs-border-color);
}

.fb-service-addon .nav-tabs .nav-link {
    font-weight: 600;
    border-radius: var(--pal-radius-sm) var(--pal-radius-sm) 0 0;
    color: var(--bs-secondary-color);
}

.fb-service-addon .nav-tabs .nav-link.active {
    color: var(--pal-primary);
}

/* ========== Phase 9: Domain manage, formbuilder, order currency, embed iframes ========== */
.fb-domain-manage .nav-tabs .nav-link {
    font-size: 0.875rem;
    padding: 0.5rem 0.65rem;
}

.fb-formbuilder-card {
    border-radius: var(--pal-radius-lg);
    box-shadow: var(--pal-shadow-sm);
    border: 1px solid var(--bs-border-color);
    overflow: hidden;
}

.fb-formbuilder-card > .card-header {
    background: linear-gradient(180deg, rgba(var(--pal-primary-rgb), 0.06), transparent);
    border-bottom: 1px solid var(--bs-border-color);
}

.fb-order-currency .form-select {
    min-width: 12rem;
    max-width: 22rem;
}

body.fb-embed-body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--pal-font);
    background: var(--fb-page-bg);
    -webkit-font-smoothing: antialiased;
}

.fb-embed-card {
    border-radius: var(--pal-radius-lg);
    overflow: hidden;
}
