/* ==========================================================================
   BESTSELL ALL-IN-ONE V2+ SAAS APPLICATION STYLES
   Applies Theme A - Precision Zinc across Public Portal & Workspaces
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-canvas);
    color: var(--text-primary);
    line-height: 1.55;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select, textarea {
    font-family: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.mono {
    font-family: var(--font-mono);
}

/* ==========================================================================
   CONTAINERS & TYPOGRAPHY
   ========================================================================== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

.page-section {
    padding: 56px 0;
}

.page-section-sm {
    padding: 36px 0;
}

.page-header-band {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 40px 0 36px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: var(--primary-subtle);
    color: var(--primary-hover);
    border: 1px solid var(--primary-border);
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 14px;
}

.h1-display {
    font-size: clamp(2rem, 3.8vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--text-primary);
}

.h1-page {
    font-size: clamp(1.65rem, 2.8vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.h2-section {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.h3-card {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.lead-text {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

.muted-text {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ==========================================================================
   STATUS PILLS & BADGES (TRANSPARENCY CLASSIFICATION)
   ========================================================================== */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid transparent;
    white-space: nowrap;
}

.pill-live {
    background: var(--status-live-bg);
    color: var(--status-live-text);
    border-color: var(--status-live-border);
}

.pill-proto {
    background: var(--status-proto-bg);
    color: var(--status-proto-text);
    border-color: var(--status-proto-border);
}

.pill-plan {
    background: var(--status-plan-bg);
    color: var(--status-plan-text);
    border-color: var(--status-plan-border);
}

.pill-danger {
    background: var(--status-danger-bg);
    color: var(--status-danger-text);
    border-color: var(--status-danger-border);
}

.pill-neutral {
    background: var(--bg-subtle);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

/* ==========================================================================
   BUTTONS & FORM CONTROLS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary-accent);
    color: var(--text-inverted);
}
.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
}

.btn-ink {
    background: var(--ink-action);
    color: var(--text-inverted);
}
.btn-ink:hover:not(:disabled) {
    background: var(--ink-action-hover);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border-color: var(--border-color);
    box-shadow: var(--shadow-xs);
}
.btn-secondary:hover:not(:disabled) {
    background: var(--bg-subtle);
    border-color: var(--border-strong);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}
.btn-ghost:hover:not(:disabled) {
    background: var(--bg-subtle);
    color: var(--text-primary);
}

.btn-danger-outline {
    background: var(--bg-surface);
    color: var(--status-danger-text);
    border-color: var(--status-danger-border);
}
.btn-danger-outline:hover:not(:disabled) {
    background: var(--status-danger-bg);
}

.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-xs { padding: 4px 9px; font-size: 0.74rem; }
.btn-lg { padding: 12px 22px; font-size: 0.95rem; }

.input, .select, .textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.field-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

/* ==========================================================================
   CARDS, PANELS, GRIDS & TABLES
   ========================================================================== */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-xs);
}

.card-subtle {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px;
}

.notice-bar {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    font-size: 0.84rem;
    color: var(--text-secondary);
}

.notice-bar.notice-info {
    background: var(--primary-subtle);
    border-color: var(--primary-border);
    color: #1e40af;
}

.notice-bar.notice-warn {
    background: var(--status-plan-bg);
    border-color: var(--status-plan-border);
    color: #854d0e;
}

.notice-bar.notice-live {
    background: var(--status-live-bg);
    border-color: var(--status-live-border);
    color: #065f46;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }

.table-wrap {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.84rem;
}

.data-table th {
    background: var(--bg-subtle);
    color: var(--text-secondary);
    font-size: 0.74rem;
    font-weight: 700;
    padding: 11px 14px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.data-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background: #fafafa;
}

/* ==========================================================================
   PUBLIC MULTI-PAGE TOPBAR (TWO-ROW CLEAN LAYOUT) & FOOTER
   ========================================================================== */
.pub-topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.pub-header-row-top {
    border-bottom: 1px solid #f1f5f9;
}

.pub-topbar-inner {
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    white-space: nowrap;
}

.brand-logo-box {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    background: var(--ink-action);
    color: var(--text-inverted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.brand-logo-box--img {
    width: 36px;
    height: 36px;
    background: transparent !important;
    border-radius: 0;
    padding: 0;
}

.brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.brand-footer-lockup {
    display: inline-flex;
    align-items: center;
    margin-bottom: 10px;
}

.brand-footer-logo {
    height: 78px;
    width: auto;
    object-fit: contain;
    display: block;
}

.brand-tag {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: var(--bg-subtle);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.pub-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Row 2: Single-line Marketing Menu (Never wraps to 2-3 lines) */
.pub-header-row-nav {
    background: #ffffff;
}

.pub-nav-row-inner {
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pub-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}
.pub-nav::-webkit-scrollbar { display: none; }

.pub-nav-link {
    padding: 6px 12px;
    border-radius: var(--radius-md);
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
    transition: background-color 0.15s, color 0.15s;
}

.pub-nav-link:hover {
    background: var(--bg-subtle);
    color: var(--text-primary);
}

.pub-nav-link.active {
    background: var(--primary-subtle);
    color: var(--primary-hover);
    font-weight: 600;
}

/* Live Theme Customizer Bar */
.theme-customizer-bar {
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border-color);
    padding: 8px 0;
    font-size: 0.76rem;
}

.theme-customizer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.theme-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.theme-swatch {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #cbd5e1;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.1s ease, box-shadow 0.15s ease;
}

.theme-swatch:hover {
    transform: scale(1.15);
}

.theme-swatch.active {
    box-shadow: 0 0 0 2px var(--text-primary);
}

.theme-opt-chip {
    padding: 3px 9px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.theme-opt-chip.active {
    background: var(--text-primary);
    color: #fff;
    border-color: var(--text-primary);
}

/* Browser Frame & Floating Mockup */
.browser-frame {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 18px 40px -12px rgba(9, 9, 11, 0.14);
    overflow: hidden;
}

.browser-bar {
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border-color);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-muted);
    gap: 8px;
    min-width: 0;
    max-width: 100%;
}

.browser-bar .browser-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.browser-bar .pill {
    flex-shrink: 0;
    white-space: nowrap;
}

.hero-split > * {
    min-width: 0;
}

.browser-bar .dots {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

.browser-bar .dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
}

.floating-product-card {
    position: absolute;
    right: 14px;
    bottom: -14px;
    width: 250px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 10px;
    box-shadow: 0 12px 28px rgba(9, 9, 11, 0.14);
    display: flex;
    gap: 10px;
    align-items: center;
}

.floating-product-card img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2px;
}

.lang-btn {
    border: none;
    background: transparent;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
}

.lang-btn.active {
    background: var(--bg-surface);
    color: var(--text-primary);
    box-shadow: var(--shadow-xs);
}

.mobile-menu-toggle {
    display: none;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.pub-mobile-drawer {
    display: none;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px 20px;
}

.pub-mobile-drawer.open {
    display: block;
}

.pub-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 48px 0 28px;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(4, 1fr);
    gap: 28px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
}

.footer-col h4 {
    font-size: 0.84rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links a {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--primary-accent);
}

.footer-bottom {
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ==========================================================================
   WORKSPACE SHELL (BUILDER, TENANT ADMIN, PLATFORM ADMIN, COMMERCE, BILLING)
   ========================================================================== */
.ws-layout {
    display: flex;
    min-height: 100vh;
}

.ws-sidebar {
    width: var(--sidebar-w);
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
}

.ws-sidebar.platform-mode {
    background: var(--platform-rail-bg);
    border-right-color: var(--platform-rail-border);
    color: var(--text-inverted);
}

.ws-sidebar-brand {
    height: var(--topbar-h);
    padding: 0 18px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ws-sidebar.platform-mode .ws-sidebar-brand {
    border-bottom-color: var(--platform-rail-border);
}

.ws-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ws-nav-group-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    padding: 10px 10px 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ws-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 11px;
    border-radius: var(--radius-md);
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: background-color 0.15s, color 0.15s;
}

.ws-nav-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.ws-nav-item:hover {
    background: var(--bg-subtle);
    color: var(--text-primary);
}

.ws-nav-item.active {
    background: var(--primary-subtle);
    color: var(--primary-hover);
    font-weight: 600;
}

.ws-sidebar.platform-mode .ws-nav-item {
    color: var(--platform-rail-text);
}

.ws-sidebar.platform-mode .ws-nav-item:hover {
    background: #18181b;
    color: #ffffff;
}

.ws-sidebar.platform-mode .ws-nav-item.active {
    background: #1e293b;
    color: #60a5fa;
}

.ws-nav-item.disabled-by-rbac {
    opacity: 0.4;
    pointer-events: none;
}

.ws-sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid var(--border-color);
    font-size: 0.78rem;
}

.ws-sidebar.platform-mode .ws-sidebar-footer {
    border-top-color: var(--platform-rail-border);
}

.ws-main {
    margin-left: var(--sidebar-w);
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.ws-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    min-height: var(--topbar-h);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.ws-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ws-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.ws-breadcrumb strong {
    color: var(--text-primary);
}

.ws-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.credit-wallet-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border-radius: var(--radius-md);
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    font-size: 0.76rem;
}

.credit-wallet-pill:hover {
    border-color: var(--primary-accent);
}

.ws-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ==========================================================================
   TABS, SWITCHES, MODALS, TOASTS
   ========================================================================== */
.tab-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
}

.tab-btn {
    border: none;
    background: transparent;
    padding: 10px 14px;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--primary-accent);
    border-bottom-color: var(--primary-accent);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* iOS Toggle Switch */
.ios-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.ios-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ios-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #cbd5e1;
    border-radius: 34px;
    transition: 0.2s;
}

.ios-slider::before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.ios-switch input:checked + .ios-slider {
    background-color: #059669;
}

.ios-switch input:checked + .ios-slider::before {
    transform: translateX(18px);
}

/* Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(9, 9, 11, 0.45);
    backdrop-filter: blur(2px);
    z-index: 120;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-backdrop.open {
    display: flex;
}

.modal-dialog {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-dialog.modal-lg {
    max-width: 820px;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-canvas);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Toast */
.toast-container {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast-item {
    background: var(--ink-action);
    color: var(--text-inverted);
    padding: 11px 16px;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 380px;
}

.ws-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(9, 9, 11, 0.45);
    z-index: 45;
}

.ws-backdrop.open {
    display: block;
}

/* Progress Bar */
.progress-track {
    width: 100%;
    height: 7px;
    background: var(--bg-subtle);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-accent);
    border-radius: var(--radius-full);
    transition: width 0.25s ease;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (DESKTOP 1440, TABLET 768, MOBILE 390)
   ========================================================================== */
@media (max-width: 1100px) {
    .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
    .ws-sidebar {
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }
    .ws-sidebar.open {
        transform: translateX(0);
    }
    .ws-main {
        margin-left: 0;
    }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .hero-split {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .pub-header-row-nav {
        display: none !important;
    }
    .mobile-menu-toggle {
        display: inline-flex !important;
    }
    .hide-mobile {
        display: none !important;
    }
    .floating-product-card {
        position: static !important;
        width: 100% !important;
        margin-top: 12px;
    }
}

@media (max-width: 640px) {
    .container { padding: 0 16px; }
    .ws-content { padding: 16px; }
    .grid-2, .grid-3, .grid-4, .grid-5, .footer-grid {
        grid-template-columns: 1fr;
    }
    .grid-2 > *, .grid-3 > *, .grid-4 > *, .grid-5 > * {
        min-width: 0;
    }
    .case-admin-card {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    .case-admin-card img {
        width: 100% !important;
        height: 150px !important;
    }
    .pub-actions .hide-sm {
        display: none;
    }
    .ws-topbar {
        padding: 8px 14px;
        gap: 6px;
        min-height: auto;
    }
    .ws-topbar-left {
        width: 100%;
        min-width: 0;
        gap: 8px;
    }
    .ws-breadcrumb {
        min-width: 0;
        font-size: 0.78rem;
        gap: 5px;
    }
    .ws-breadcrumb a,
    .ws-breadcrumb > span {
        display: none;
    }
    .ws-breadcrumb strong {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
    }
    .ws-topbar-right {
        width: 100%;
        gap: 6px;
        justify-content: space-between;
    }
    .credit-wallet-pill {
        font-size: 0.72rem;
        padding: 4px 8px;
        gap: 5px;
        width: 100%;
        justify-content: center;
    }
    .ws-topbar-right #globalRoleSwitcher {
        max-width: 175px;
        padding: 4px 6px !important;
        font-size: 0.74rem !important;
    }
}
