/* public/assets/css/views.css */

.app-shell {
    flex: 1;
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* --- INLOGGNINGSVY --- */
.login-container {
    width: 100%;
    max-width: 420px;
    margin: auto; /* 🌟 Ändrat från '0 auto' till 'auto' för perfekt vertikal centrering */
    padding: 40px 20px;
    opacity: 0;
    animation: fadeIn 0.6s var(--ease) forwards;
}

.login-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.25rem; /* Delightful spacing between logo, slogan and subtitle */
    margin-bottom: 2.5rem;
}
.login-logo {
    width: 64px;
    height: 64px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.login-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    aspect-ratio: 1 / 1;
}
.login-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-strong);
    line-height: 1.35;
    letter-spacing: -0.01em;
}
.login-subtitle {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-strong);
}

.lang-switch { display: flex; justify-content: center; gap: 1rem; margin-bottom: 2rem; }
.lang-switch span {
    font-size: 0.85rem; font-weight: 500; color: var(--text-muted);
    cursor: pointer; padding-bottom: 2px; border-bottom: 2px solid transparent;
    transition: color var(--transition-fast);
}
.lang-switch span:hover { color: var(--text-strong); }
.lang-switch span.active { color: var(--text-strong); border-bottom-color: var(--text-strong); }

.login-footer { text-align: center; margin-top: 2rem; }
.login-footer p { font-size: 0.75rem; color: var(--text-muted); }

.footer-links { margin-top: 1.5rem; text-align: center; }
.back-link {
    color: var(--text-muted); text-decoration: none;
    font-size: 0.85rem; font-weight: 500; cursor: pointer;
    transition: color 0.2s; display: inline-block;
}
.back-link:hover { color: var(--text-strong); }

.help-section {
    margin-top: 2.5rem; padding-top: 1.5rem;
    border-top: 1px solid var(--stroke);
    text-align: center; cursor: pointer;
}
.help-title {
    font-size: 0.75rem; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.1em; transition: color 0.2s;
}
.help-section:hover .help-title { color: var(--text-strong); }

/* Unified login page button sizing matching inputs */
.login-container .btn-full {
    height: var(--control-h) !important;
    border-radius: var(--r-md) !important;
    font-size: 0.95rem !important;
}

/* --- BOOT / SETUP SCREEN --- */
.boot-container {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 100vh; background: var(--bg-main); text-align: center; padding: 20px;
    width: 100%;
}

.boot-logo { width: 64px; height: 64px; margin-bottom: 24px; opacity: 0; animation: fadeUp 0.8s var(--ease) forwards; }
.boot-title { font-size: 1.5rem; font-weight: 600; color: var(--text-strong); margin-bottom: 12px; letter-spacing: -0.01em; opacity: 0; animation: fadeUp 0.8s var(--ease) 0.15s forwards; }
.boot-subtitle { font-size: 0.95rem; color: var(--text-strong); max-width: 320px; line-height: 1.5; opacity: 0; animation: fadeUp 0.8s var(--ease) 0.3s forwards; }

.boot-progress-bar {
    width: 200px; height: 3px; background: var(--stroke); border-radius: 4px;
    margin-top: 32px; overflow: hidden; position: relative; opacity: 0;
    animation: fadeUp 0.8s var(--ease) 0.45s forwards;
}
.boot-progress-bar::after {
    content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 40%;
    background: var(--text-strong); border-radius: 4px;
    animation: slideProgress 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}


/* Gömmer element utan att sabba layouten */
.d-none { display: none !important; }

/* QR-kod layout */
.qr-wrapper { text-align: center; margin-bottom: 20px; }
.qr-image { 
    width: 180px; height: 180px; 
    background: #ffffff; padding: 10px; 
    border-radius: var(--r-sm); 
    border: 1px solid var(--stroke); 
}


@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideProgress { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }

/* --- ORDER VIEW --- */
.order-view-container, .workspace-view-container {
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeIn 0.4s var(--ease);
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
}

.view-title {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--text-strong);
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
}

.view-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin: 0;
}

.view-actions {
    display: flex;
    gap: 12px;
}

/* Tabellkort */
.table-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: none; /* Flat Notion look */
    margin-bottom: 32px;
}

.order-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.order-table th {
    background: #f7f7f8; /* Light Notion-like gray header */
    color: rgba(55, 53, 47, 0.65); /* Notion muted dark color */
    font-size: 11.5px; /* Tiny, clean headers */
    font-weight: 500; /* Subtle font weight */
    padding: 8px 12px; /* High density padding */
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border); /* Vertical cell grid lines */
    text-transform: none; /* Standard sentence case */
    letter-spacing: 0;
    user-select: none;
}

.order-table th:first-child {
    border-top-left-radius: 8px;
}

.order-table th:last-child {
    border-right: none;
    border-top-right-radius: 8px;
}

.order-table td {
    padding: 10px 12px; /* Notion high-density cell padding */
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border); /* Vertical cell grid lines */
    font-size: 13px;
    color: var(--text);
    vertical-align: middle;
}

.order-table td:last-child {
    border-right: none;
}

/* Notion th property styling */
.notion-th-property {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.notion-prop-icon {
    font-size: 13px !important;
    color: rgba(55, 53, 47, 0.45);
    margin-top: 1px;
}

.order-row-btn {
    cursor: pointer;
    transition: background 0.1s ease;
}

.order-row-btn:hover {
    background: #f1f1f2 !important; /* Notion cell hover color */
}

/* Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.05em;
}

.status-blue {
    background: rgba(35, 131, 226, 0.08);
    color: var(--primary);
}

.status-green {
    background: var(--success-bg);
    color: var(--success);
}

.status-green-subtle {
    background: rgba(70, 145, 107, 0.12);
    color: var(--success);
}

.status-gray {
    background: var(--hover);
    color: var(--text-muted);
}

/* Detalj panel (Slide-out) */
.detail-drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease);
    display: flex;
    justify-content: flex-end;
}

.detail-drawer-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.detail-drawer {
    width: 480px;
    height: 100%;
    background: var(--panel);
    border-left: 1px solid var(--border);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.detail-drawer.is-open {
    transform: translateX(0);
}

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

.drawer-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-strong);
}

.drawer-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: background 0.15s;
}

.drawer-close:hover {
    background: var(--hover);
    color: var(--text-strong);
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    scrollbar-width: thin;
}

.drawer-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.section-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.drawer-status-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.drawer-time {
    font-size: 13px;
    color: var(--text-muted);
}

.detail-group {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.detail-key {
    color: var(--text-muted);
}

.detail-val {
    font-weight: 500;
    color: var(--text-strong);
}

.drawer-articles {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.drawer-article-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    font-size: 13px;
    border: 1px solid var(--border);
}

.article-qty {
    font-weight: 700;
    color: var(--primary);
}

.article-name {
    color: var(--text-strong);
}

.drawer-total-row {
    display: flex;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-strong);
}

.drawer-total-row strong {
    font-size: 16px;
    color: var(--text-strong);
}

.drawer-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 24px;
}

/* --- HOME VIEW (NOTION INSPIRED SUMMARY) --- */
.home-container {
    padding: 40px;
    max-width: 1000px;
    margin: 0 auto;
    animation: fadeIn 0.4s var(--ease);
}

.home-header {
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.home-title {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--text-strong);
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
}

.home-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin: 0;
}

.home-btn-new {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--text-strong);
    color: var(--surface);
    border: none;
    padding: 10px 16px;
    border-radius: var(--r-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s var(--ease);
}
.home-btn-new:hover {
    opacity: 0.9;
}
.home-btn-new:active {
    transform: scale(0.98);
}
.home-btn-new i {
    width: 16px;
    height: 16px;
}

.home-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.kpi-card {
    background: var(--surface);
    padding: 20px;
    border-radius: var(--r-md);
    border: 1px solid var(--stroke);
    /* No box shadow or hover effect per user request */
}

.kpi-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    color: var(--text-muted);
}
.kpi-header span {
    font-size: 13px;
    font-weight: 500;
}
.kpi-header i {
    width: 16px;
    height: 16px;
}

.kpi-value {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-strong);
}

.kpi-trend-up {
    font-size: 12px;
    color: #10B981;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.kpi-trend-neutral {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.kpi-trend-up i, .kpi-trend-neutral i {
    width: 12px;
    height: 12px;
}

.home-split-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}
@media (max-width: 860px) {
    .home-split-grid {
        grid-template-columns: 1fr;
    }
}

.activity-box {
    background: var(--surface);
    border: 1px solid var(--stroke);
    border-radius: var(--r-md);
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    overflow: hidden;
}

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

.activity-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-strong);
}

.activity-menu-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.15s;
}
.activity-menu-btn:hover {
    background: var(--hover);
    color: var(--text-strong);
}

.activity-list {
    padding: 0;
}

.activity-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--stroke);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: background 0.15s var(--ease);
    cursor: pointer;
    text-decoration: none;
}
.activity-item:hover {
    background: var(--hover);
}

.activity-icon-box {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #E0F2FE;
    color: #0284C7;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
[data-theme="dark"] .activity-icon-box {
    background: #0c4a6e;
    color: #38bdf8;
}
.activity-icon-box i {
    width: 16px;
    height: 16px;
}

.activity-text {
    flex: 1;
}

.activity-item-heading {
    font-size: 14px;
    color: var(--text-strong);
    font-weight: 500;
}

.activity-item-detail {
    font-size: 13px;
    color: var(--text-muted);
}

.activity-item-time {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.ai-widget {
    background: linear-gradient(145deg, #f8fafc 0%, #eff6ff 100%);
    border: 1px solid #e2e8f0;
    border-radius: var(--r-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    transition: transform 0.2s var(--ease);
}
.ai-widget:hover {
    transform: translateY(-1px);
}
[data-theme="dark"] .ai-widget {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border-color: #334155;
}

.ai-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #0284C7;
}
[data-theme="dark"] .ai-header {
    color: #38bdf8;
}
.ai-header i {
    width: 18px;
    height: 18px;
}

.ai-title {
    font-size: 14px;
    font-weight: 600;
}

.ai-desc {
    font-size: 14px;
    color: var(--text-main);
    line-height: 1.6;
    flex: 1;
    margin: 0 0 16px 0;
}

.ai-btn {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 8px 12px;
    border-radius: var(--r-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-strong);
    cursor: pointer;
    text-align: left;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    transition: all 0.2s var(--ease);
}
[data-theme="dark"] .ai-btn {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}
.ai-btn:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}
[data-theme="dark"] .ai-btn:hover {
    border-color: #475569;
    background: #334155;
}

/* --- DASHBOARD VIEW fallbacks --- */
.dashboard-container {
    padding: 40px;
    max-width: 900px;
    margin: 0 auto;
}
.dashboard-title {
    font-size: 2rem;
    color: var(--text-strong);
    margin-bottom: 8px;
}
.dashboard-desc {
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 600px;
}
.dashboard-card {
    margin-top: 32px;
    padding: 24px;
    border: 1px solid var(--stroke);
    border-radius: var(--r-md);
    background: var(--surface);
}
.dashboard-card-title {
    color: var(--text-strong);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dashboard-card-icon {
    color: #0ea5e9;
}
.dashboard-card-info {
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 16px;
}
.dashboard-code-box {
    background: rgba(0,0,0,0.03);
    padding: 16px;
    border-radius: var(--r-md);
    color: var(--text-muted);
    font-family: monospace;
    font-size: 0.85rem;
    overflow-x: auto;
}
[data-theme="dark"] .dashboard-code-box {
    background: rgba(255,255,255,0.03);
}

/* 2FA Secret Key Container (Notion-like) */
.qr-secret-container {
    margin-top: 16px;
    margin-bottom: 24px;
    text-align: left;
    width: 100%;
}

.qr-secret-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.qr-secret-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--hover);
    border: 1px dashed var(--stroke);
    border-radius: var(--r-sm);
    padding: 8px 12px;
    gap: 8px;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.qr-secret-box:hover {
    border-color: var(--text-muted);
    background: var(--hover-active);
}

.qr-secret-value {
    font-family: var(--font-mono, SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-strong);
    letter-spacing: 0.05em;
    user-select: all;
    word-break: break-all;
}

.btn-copy-secret {
    background: transparent;
    border: none;
    padding: 4px;
    border-radius: var(--r-xs, 4px);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-fast), background var(--transition-fast), transform 0.1s var(--ease);
}

.btn-copy-secret:hover {
    color: var(--text-strong);
    background: var(--hover);
}

.btn-copy-secret:active {
    transform: scale(0.92);
}

.btn-copy-secret .copy-icon {
    font-size: 1.1rem;
    transition: color var(--transition-fast);
}

/* Green checkmark indicator state */
.btn-copy-secret.copied {
    color: #10b981 !important;
}

/* --- MOBILANPASSNING (LoginView) --- */
@media (max-width: 480px) {
    .login-container {
        padding: 40px 24px;
        max-width: 100%;
    }
    
    .login-header {
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .login-logo {
        width: 56px;
        height: 56px;
    }
    
    .login-logo img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        aspect-ratio: 1 / 1;
    }
    
    .login-title {
        font-size: 1.25rem;
    }
    
    .login-subtitle {
        font-size: 0.85rem;
    }
    
    .lang-switch {
        margin-bottom: 1.5rem;
    }
    
    .qr-image {
        width: 150px;
        height: 150px;
    }
    
    .qr-secret-box {
        padding: 6px 10px;
    }
    
    .qr-secret-value {
        font-size: 0.8rem;
    }
    
    input.code-input {
        height: 54px;
        font-size: 1.6rem;
        letter-spacing: 0.3em;
    }
    
    .help-section {
        margin-top: 1.75rem;
        padding-top: 1.25rem;
    }
}

/* --- PREMIUM PAGE HEADER & TOOLBAR --- */
.page-header {
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    padding: 20px 32px 20px 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.page-header:has(.page-sub-tabs),
.page-header:has(.page-toolbar) {
    padding-bottom: 0;
    border-bottom: none;
}

.page-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.page-header-titles {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.page-description {
    font-size: 13px;
    color: var(--muted);
    font-weight: 400;
    line-height: 1.4;
    max-width: 720px;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- EMPTY STATES --- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-surface);
    border-radius: 12px;
    border: 1px dashed var(--border);
    margin: 0;
}
.empty-state-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.empty-state-icon-wrapper .material-symbols-rounded {
    font-size: 32px !important;
    color: var(--muted) !important;
    margin: 0 !important;
}
.empty-state h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-strong);
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}
.empty-state p {
    font-size: 13px;
    color: var(--muted);
    font-weight: 400;
    line-height: 1.4;
    max-width: 400px;
    margin: 0 auto;
}

/* Page Views and Contents */
.page-view-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.page-view-content {
    padding: 24px 32px 32px 32px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Tabs */
.page-sub-tabs {
    margin-top: 4px;
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
    border-bottom: 1px solid var(--border);
}



.page-sub-tabs-list {
    display: flex;
    gap: 16px;
    border-bottom: 1px solid transparent;
    margin-bottom: -1px;
}

.page-header:has(.page-toolbar) .page-sub-tabs-list {
    margin-bottom: 0;
}

.page-sub-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 8px 4px 12px 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}

.page-sub-tab:hover {
    color: var(--text);
}

.page-sub-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Sub Navigation Tab Buttons */
.sub-tab-btn {
    background: none;
    border: none;
    padding: 12px 20px;
    font-weight: 500;
    font-size: 13.5px;
    color: var(--muted);
    border-bottom: 3px solid transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

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

.sub-tab-btn.active {
    font-weight: 700;
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
}

.sub-tab-btn .material-symbols-rounded {
    font-size: 20px;
}

/* Status Filter Tabs Above the Table */
.status-tabs-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-tab-btn {
    background: none;
    border: 1px solid transparent;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    box-sizing: border-box;
}

.status-tab-btn:hover {
    background: var(--hover);
}

.status-tab-btn.active[data-status="all"] {
    background: var(--swepearl-hover-color) !important;
    border-color: var(--border) !important;
    color: var(--primary) !important;
}

.status-tab-btn.active[data-status="active"] {
    background: rgba(47, 158, 68, 0.08) !important;
    border-color: rgba(47, 158, 68, 0.2) !important;
    color: var(--success) !important;
}

.status-tab-btn.active[data-status="inactive"] {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: var(--text) !important;
}

.status-tab-btn span {
    background: var(--border);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text);
}

.status-tab-btn.active[data-status="active"] span {
    background: rgba(47, 158, 68, 0.12);
    color: var(--success);
}

.status-tab-btn.active[data-status="inactive"] span {
    background: rgba(0, 0, 0, 0.06);
    color: var(--muted);
}

/* Toolbar (Search & Filter) */
.page-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0 12px 0;
}

.page-toolbar .searchable-select-trigger,
.page-toolbar select,
.page-toolbar .btn {
    border-radius: 8px !important;
}

.page-toolbar-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

.page-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: transparent;
    border-radius: 8px;
    padding: 0 10px;
    height: 36px;
    width: 100%;
    flex: 1;
    border: 1px solid var(--border);
    transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.page-search-wrapper:focus-within {
    background: var(--panel);
    border-color: var(--primary);
    box-shadow: none;
}

.page-search-wrapper .search-icon {
    font-size: 16px;
    color: var(--muted);
    margin-right: 8px;
}

.page-search-wrapper input {
    width: 100%;
    border: none !important;
    background: transparent !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--text) !important;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}

.page-search-wrapper input:focus {
    outline: none !important;
    box-shadow: none !important;
}

.btn-filter {
    height: 36px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 6px;
}

.btn-filter .material-symbols-rounded {
    font-size: 16px;
}

/* Toolbar Select Class */
.toolbar-select {
    padding-left: 10px;
    padding-right: 24px;
    height: 36px !important;
    cursor: pointer;
    border-radius: 6px !important;
    border: 1px solid var(--border) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    background: var(--panel) !important;
    color: var(--text) !important;
    outline: none !important;
    box-sizing: border-box !important;
    transition: border-color var(--transition-fast) !important;
    appearance: none !important; /* hide default browser arrow */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    background-size: 14px !important;
}

.toolbar-select:hover {
    border-color: var(--muted-2) !important;
}

.toolbar-select:focus {
    border-color: var(--primary) !important;
}

.page-toolbar-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* --- KUPONGSTUDIO / ACCORDION WIZARD --- */
.wizard-split-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    align-items: stretch;
    width: 100%;
    margin-top: 16px;
    flex: 1;
}
.vertical-stepper {
    position: relative;
    position: sticky;
    top: 10px;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 10;
    padding: 8px 0 8px 16px;
    border-left: 1px solid var(--border);
}
.stepper-breadcrumb {
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.stepper-breadcrumb .sep {
    color: var(--border);
    font-weight: 400;
}
.stepper-breadcrumb .current {
    color: var(--text);
    font-weight: var(--fw-bold);
}
.vertical-stepper-bg-line,
.vertical-stepper-progress {
    display: none !important;
}
.step-nav-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 6px 16px 6px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    z-index: 2;
    width: 100%;
    margin-left: -17px; /* Offset to overlap vertical-stepper left border */
}
.step-nav-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: transparent;
    transition: all 0.2s ease;
}
.step-nav-btn.active::before {
    background: rgb(38,38,38);
}
.step-num {
    display: none !important;
}
.step-nav-desc {
    display: none !important;
}
.step-nav-btn.active .step-nav-desc {
    display: block !important;
    margin-top: 6px;
    font-size: var(--fs-sm);
    color: var(--muted) !important;
    line-height: 1.5;
    font-weight: var(--fw-regular);
}
.step-nav-title {
    font-size: var(--fs-base);
    font-weight: var(--fw-medium);
    color: var(--muted) !important;
    transition: color 0.2s ease;
}
.step-nav-btn.active .step-nav-title {
    color: var(--text) !important;
    font-weight: var(--fw-bold);
    font-size: var(--fs-md);
}
.wizard-content-pane {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.wizard-pane-header {
    margin-bottom: 28px;
    padding-bottom: 0;
    border-bottom: none;
}
.wizard-pane-title {
    font-size: var(--fs-xl);
    font-weight: var(--fw-bold);
    color: var(--text);
    margin: 0 0 8px 0;
    line-height: 1.2;
}
.wizard-pane-desc {
    font-size: var(--fs-base);
    color: var(--muted);
    margin: 0;
    line-height: 1.5;
}
.wizard-step-body {
    width: 100% !important;
    max-width: 100% !important;
    animation: wizardBodyFadeIn 0.35s ease;
    flex-direction: column;
    flex: 1;
}
.wizard-step-body[style*="block"] {
    display: flex !important;
}
.wizard-step-body.step-5-wide,
.wizard-step-body.step-6-wide {
    max-width: 100%;
}
@keyframes wizardBodyFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.wizard-actions-bar {
    margin-top: auto !important;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: sticky;
    bottom: -4px;
    background: rgb(250,250,250);
    z-index: 100;
    padding-bottom: 24px;
    margin-bottom: -24px;
}
.wizard-actions-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.wizard-actions-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}
.wizard-actions-bar::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 40px;
    background: rgb(250,250,250);
}
.wizard-header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}
.form-section-header {
    margin-bottom: 24px !important;
    padding-bottom: 24px !important;
    border-bottom: 1px solid var(--border) !important;
}
.form-section-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: var(--text) !important;
    margin: 0 0 6px 0 !important;
}
.form-section-desc {
    font-size: 12px !important;
    color: var(--muted) !important;
    margin: 0 0 20px 0 !important;
}
.stacked-lang-section {
    margin-bottom: 24px !important;
}
.lang-box-primary {
    background: rgba(0, 0, 0, 0.01) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
    padding: 20px !important;
    margin-bottom: 20px !important;
}
.lang-box-secondary {
    background: var(--bg) !important;
    border: 1px dashed var(--border) !important;
    border-radius: var(--radius-md) !important;
    padding: 20px !important;
}
.lang-box-title {
    font-size: 13px !important;
    font-weight: 600 !important;
    margin: 0 0 16px 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}
.lang-box-title.primary {
    color: var(--swepearl-active-color) !important;
}
.lang-box-title.secondary {
    color: var(--muted) !important;
}
.lang-box-title span.material-symbols-rounded {
    font-size: 16px !important;
}

/* Uniform stacked layout inputs */
.form-grid-stack {
    display: flex !important;
    flex-direction: column !important;
    gap: 18px !important;
    margin-bottom: 24px !important;
}

/* Wizard step body custom spacing & uniform font sizes */
.wizard-step-body .form-group {
    margin-bottom: 18px !important;
}
.wizard-step-body .form-group:last-child,
.wizard-step-body .form-group.m-0 {
    margin-bottom: 0 !important;
}
.form-grid-stack .form-group {
    margin-bottom: 0 !important;
}
.wizard-step-body label.opt-label {
    display: inline-block !important;
    margin-bottom: 6px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--text) !important;
}
.wizard-step-body .checkbox-label {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--text) !important;
}
.wizard-step-body .checkbox-label span {
    font-size: 13px !important;
}
.wizard-step-body .unit-card-content {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    color: var(--text) !important;
}
.wizard-step-body .unit-card-content span {
    font-size: 13px !important;
}
.wizard-step-body .price-input-wrapper .currency-label {
    font-size: 13px !important;
    font-weight: 600 !important;
}
.wizard-step-body .purchase-option-row label.opt-label {
    font-size: 13px !important;
    color: var(--text) !important;
    margin-bottom: 6px !important;
}
.wizard-step-body .purchase-option-row .opt-active-lbl {
    font-size: 13px !important;
}
.accounting-result-item {
    font-size: 13px !important;
    font-weight: 500 !important;
    padding: 10px 16px !important;
    cursor: pointer !important;
    border-bottom: 1px solid var(--border) !important;
    background: var(--panel) !important;
    color: var(--text) !important;
    transition: background 0.15s ease !important;
}
.accounting-result-item:hover {
    background: var(--bg) !important;
}
.accounting-result-item:last-child {
    border-bottom: none !important;
}
.form-control, select.form-control {
    height: 30px !important;
    border-radius: 6px !important;
    border: 1px solid var(--border) !important;
    padding: 0 10px !important;
    font-size: 13px !important;
    font-family: inherit !important;
    background: var(--panel) !important;
    color: var(--text) !important;
    box-sizing: border-box !important;
    width: 100% !important;
    outline: none !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
}
.form-control:focus, select.form-control:focus {
    border-color: var(--swepearl-active-color) !important;
    box-shadow: 0 0 0 3px rgba(66, 67, 150, 0.1) !important;
}
textarea.form-control {
    height: auto !important;
    min-height: 80px !important;
    padding: 8px 10px !important;
}

/* Standardized Premium welcome buttons for the Wizard */
.wizard-btn-primary, .wizard-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 36px;
    padding: 0 16px;
    font-weight: 600;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    box-sizing: border-box;
}
.wizard-btn-primary {
    background: var(--swepearl-active-color);
    border: none;
    color: #ffffff;
}
.wizard-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}
.wizard-btn-primary:active {
    transform: translateY(0);
}
.wizard-btn-secondary {
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--text);
}
.wizard-btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}
.wizard-btn-secondary:active {
    transform: translateY(0);
}
.wizard-btn-secondary.btn-sm {
    height: 32px;
    padding: 0 12px;
    font-size: 12.5px;
}

.price-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}
.price-input-wrapper input {
    padding-right: 48px !important;
}
.price-input-wrapper .currency-label {
    position: absolute;
    right: 16px;
    color: var(--muted);
    font-weight: 600;
    font-size: 14px;
    pointer-events: none;
}
.border-bottom-sep {
    border-bottom: 1px solid var(--border) !important;
    padding-bottom: 24px !important;
    margin-bottom: 24px !important;
}

.form-sub-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--text) !important;
    margin: 0 0 14px 0 !important;
}
.form-sub-desc {
    font-size: 12px !important;
    color: var(--muted) !important;
    margin: 0 0 16px 0 !important;
}
.form-sub-title + .form-sub-desc {
    margin-top: -10px !important;
    margin-bottom: 16px !important;
}
.purchase-options-wrapper {
    border: 1px dashed var(--border) !important;
    border-radius: var(--radius-md) !important;
    padding: 20px !important;
    background: var(--bg) !important;
    margin-bottom: 24px !important;
}
.purchase-options-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.purchase-options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.relative-input {
    position: relative;
}
.search-icon-left {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
    font-size: 20px;
}
.search-input-with-icon,
.settings-row-stacked input.search-input-with-icon {
    padding-left: 40px !important;
}
.accounting-dropdown-results {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    z-index: 1000;
    left: 0;
    right: 0;
    background: var(--panel, #ffffff);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 6px;
}
.accounting-dropdown-item {
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.accounting-dropdown-item:hover {
    background: var(--hover, #f3f4f6);
}
.accounting-dropdown-item .acc-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-strong, #111827);
    line-height: 1.4;
}
.accounting-dropdown-item .acc-desc {
    font-size: 12px;
    color: var(--text-muted, #6b7280);
    line-height: 1.4;
}
.check-group-section {
    margin-bottom: 24px;
}
.check-options-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
}
.checkbox-label input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
}
.color-picker-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}
.color-picker-wrapper .color-picker-input {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    background: none;
}
.color-picker-wrapper .hex-text-input {
    flex: 1;
}

.modal-tab-btn {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 14px 4px 14px 4px;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}

.modal-tab-btn:hover {
    color: rgb(38,38,38);
}

.modal-tab-btn.active {
    border-bottom-color: rgb(38,38,38);
    color: rgb(38,38,38);
}

.checkbox-group-wrapper::-webkit-scrollbar {
    width: 6px;
}
.checkbox-group-wrapper::-webkit-scrollbar-thumb {
    background: var(--muted-2);
    border-radius: 3px;
}

.accounting-result-item:hover {
    background: rgba(59, 130, 246, 0.05);
}

.empty-state-welcome-container {
    animation: scaleUpIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes scaleUpIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.units-check-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 16px;
}
.unit-check-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 36px;
    box-sizing: border-box;
    user-select: none;
}
.unit-check-card:hover {
    background: rgba(66, 67, 150, 0.02);
}
.unit-check-card.checked {
    background: rgba(66, 67, 150, 0.04);
}
.unit-check-card input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    accent-color: var(--swepearl-active-color);
    cursor: pointer;
}
.unit-card-content {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text);
}
.unit-card-content span.material-symbols-rounded {
    color: var(--muted);
    font-size: 20px;
    transition: color 0.2s ease;
}
.unit-check-card.checked .unit-card-content span.material-symbols-rounded {
    color: var(--swepearl-active-color);
}

.purchase-option-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    width: 100%;
    box-sizing: border-box;
}
.purchase-option-row .form-group {
    margin: 0;
    width: 100%;
}
.purchase-option-row label.opt-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    display: block;
}
.purchase-option-row .row-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    width: 100%;
}
.purchase-option-row .opt-active-lbl {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}
.purchase-option-row .opt-active {
    width: 16px;
    height: 16px;
}
.btn-delete-option {
    padding: 6px !important;
    min-width: auto !important;
    height: 30px !important;
    width: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 6px !important;
    cursor: pointer !important;
}

.live-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 12px;
    width: 100%;
}
.preview-tabs {
    display: flex;
    gap: 8px;
    background: var(--bg);
    padding: 4px;
    border-radius: 20px;
    border: 1px solid var(--border);
}
.preview-tab-btn {
    border: none;
    background: transparent;
    padding: 8px 16px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s ease;
}
.preview-tab-btn.active {
    background: var(--panel);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}
.iphone-device {
    position: relative;
    width: 310px;
    height: 560px;
    border-radius: 36px;
    background: #000;
    border: 8px solid #2d2d2d;
    box-shadow: var(--shadow-lg), 0 20px 50px rgba(0,0,0,0.15);
    overflow: hidden;
    box-sizing: content-box;
}
.iphone-screen {
    width: 100%;
    height: 100%;
    background: #f7fafc;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 28px 16px 16px;
    box-sizing: border-box;
}
.iphone-screen::-webkit-scrollbar {
    width: 4px;
}
.iphone-screen::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
}
.iphone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 18px;
    background: #000;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    z-index: 99;
}

.wallet-pass-card {
    border-radius: 16px;
    color: #fff;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    margin-top: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    transition: background 0.3s ease;
    min-height: 280px;
}
.wallet-pass-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 700;
    opacity: 0.9;
}
.wallet-pass-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}
.wallet-pass-logo-img {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    object-fit: cover;
    background: #fff;
}
.wallet-pass-title {
    font-size: 16px;
    font-weight: 700;
    margin-top: 8px;
    line-height: 1.2;
}
.wallet-pass-barcode {
    background: #fff;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: auto;
}
.barcode-lines {
    width: 170px;
    height: 48px;
    background: repeating-linear-gradient(90deg, #000, #000 2px, #fff 2px, #fff 6px, #000 6px, #000 8px);
}
.barcode-value {
    color: #000;
    font-size: 11px;
    font-family: monospace;
    letter-spacing: 2px;
}

.landing-preview {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}
.landing-preview-hero {
    width: 100%;
    height: 120px;
    background: #edf2f7;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    position: relative;
}
.landing-preview-logo-box {
    position: absolute;
    bottom: -20px;
    left: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #fff;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.landing-preview-logo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.landing-preview-content {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}
.landing-preview-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}
.landing-preview-desc {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
    margin: 0;
}
.landing-preview-price-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}
.landing-preview-btn {
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 13px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
    margin-top: 16px;
}

/* Layout specific classes for completely eliminating inline styles */
.wizard-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    width: 100%;
}
.wizard-view-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}
.wizard-view-subtitle {
    color: var(--muted);
    margin: 4px 0 0 0;
    font-size: 14px;
}
#coupon-form {
    width: 100%;
}
.no-units-fallback {
    grid-column: 1/-1;
    padding: 16px;
    border: 1px dashed var(--border);
    border-radius: 8px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}
.preview-logo-fallback {
    font-size: 24px;
    color: var(--muted);
}
.preview-price-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.preview-price-lbl {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
}
.preview-price-val {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}
.preview-type-lbl {
    font-size: 13px;
    font-weight: 600;
    color: var(--swepearl-active-color);
}
.wallet-logo-fallback {
    font-size: 16px;
    color: #fff;
}
.wallet-logo-lbl {
    font-weight: 700;
}
.wallet-pass-validity {
    font-size: 11px;
    opacity: 0.8;
    margin-top: 4px;
}
.form-group.m-0 {
    margin: 0 !important;
}

/* --- PREMIUM SEARCHABLE CUSTOM SELECT --- */
.searchable-select-container {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 220px;
    min-width: 0;
    z-index: 1;
}

.searchable-select-container:has(.searchable-select-dropdown.show),
.searchable-select-container:has(.searchable-select-trigger.active),
.searchable-select-container.active,
.searchable-select-container:focus-within {
    z-index: 99999 !important;
}

/* Elevate parent rows and cards when containing an open searchable select dropdown */
.settings-row:has(.searchable-select-dropdown.show),
.settings-row-control:has(.searchable-select-dropdown.show),
.settings-row-stacked:has(.searchable-select-dropdown.show),
.form-group:has(.searchable-select-dropdown.show) {
    position: relative !important;
    z-index: 99999 !important;
}

.settings-card:has(.searchable-select-dropdown.show),
.wizard-step-body:has(.searchable-select-dropdown.show),
.modal-body:has(.searchable-select-dropdown.show) {
    position: relative !important;
    z-index: 9999 !important;
    overflow: visible !important;
}

.searchable-select-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 10px;
    padding-right: 28px;
    height: 36px;
    width: 100%;
    min-width: 0;
    cursor: pointer;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-size: 13px;
    font-weight: 600;
    background: var(--panel);
    color: var(--text);
    outline: none;
    box-sizing: border-box;
    transition: border-color var(--transition-fast), background var(--transition-fast);
    user-select: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
}

.searchable-select-trigger:hover {
    border-color: var(--muted-2);
}

.searchable-select-trigger.active {
    border-color: var(--primary);
    background-color: var(--panel);
}

.settings-row-control .searchable-select-trigger {
    height: 32px;
    padding: 0 32px 0 10px;
    font-size: 14px;
    font-weight: 400;
    border: 1px solid transparent;
    border-radius: 6px;
    background-color: rgb(245,245,245);
    color: rgb(38,38,38);
    justify-content: flex-end;
    text-align: right;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-position: right 8px center;
    width: 100%;
    min-width: 0;
}

.settings-row-control .searchable-select-trigger > span {
    text-align: right;
    width: 100%;
}

.settings-row-control .searchable-select-trigger:hover {
    border-color: transparent;
}

.settings-row-control .searchable-select-trigger.active {
    border-color: transparent;
    box-shadow: 0 0 0 3px var(--focus-ring);
    background-color: rgb(245,245,245);
}

.searchable-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    min-width: 240px;
    background: var(--panel, #ffffff);
    border: 1px solid var(--border, #e4e4e7);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.05);
    z-index: 999999 !important;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: dropdown-fade-in 120ms ease;
}

@keyframes dropdown-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.searchable-select-dropdown.show {
    display: flex;
}

.category-tree-popover {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    width: 280px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.02);
    z-index: 100;
    display: none;
    flex-direction: column;
    animation: dropdown-fade-in 120ms ease;
    overflow: hidden;
}

.category-tree-popover.show {
    display: block;
}

.searchable-select-dropdown.align-right,
.settings-row-control .searchable-select-dropdown {
    left: auto !important;
    right: 0 !important;
}

/* Enforce strict left text-alignment for all dropdown items and group headers */
.searchable-select-dropdown,
.searchable-select-dropdown *,
.searchable-select-group-header,
.searchable-select-option,
.searchable-select-option-content,
.searchable-select-no-results {
    text-align: left !important;
}

.searchable-select-group-header {
    text-align: left !important;
    justify-content: flex-start !important;
}

.searchable-select-option-content {
    text-align: left !important;
    justify-content: flex-start !important;
    align-items: center !important;
}

.searchable-select-option-content > span {
    text-align: left !important;
    align-items: flex-start !important;
}

.searchable-select-option-content span span {
    text-align: left !important;
}

.searchable-select-search-box {
    padding: 8px;
    border-bottom: 1px solid var(--border);
    background: var(--panel);
    display: flex;
    align-items: center;
    gap: 6px;
    height: 42px;
    box-sizing: border-box;
}

.searchable-select-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #f5f5f6;
    border-radius: 6px;
    padding: 0 8px;
    height: 28px;
    width: 100%;
    border: 1px solid var(--border);
}

.searchable-select-search-input-wrapper .search-icon {
    font-size: 14px;
    color: var(--muted);
    margin-right: 4px;
}

.searchable-select-search-input-wrapper input {
    width: 100%;
    border: none !important;
    background: transparent !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
    color: var(--text) !important;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}

.searchable-select-options-list {
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 4px 0;
}

.searchable-select-option-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.searchable-select-option-content .material-symbols-rounded {
    font-size: 16px !important;
}

.searchable-select-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
    user-select: none;
}

.searchable-select-option:hover {
    background: #f1f1f2;
}

.searchable-select-option.selected {
    color: var(--primary);
    background: var(--swepearl-hover-color);
    font-weight: 600;
}

.searchable-select-option .check-icon {
    font-size: 18px;
    color: var(--muted-2);
}

.searchable-select-option.selected .check-icon {
    font-size: 18px;
    color: var(--primary);
}

.searchable-select-no-results {
    padding: 16px;
    text-align: center;
    font-size: 12.5px;
    color: var(--muted);
    font-weight: 500;
}

.tree-select-node:hover {
    background: #f1f1f2 !important;
}

/* --- COUPON VIEW METRIC CARDS --- */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.metric-card {
    background: var(--panel);
    border: 1px solid var(--border);
    padding: 24px;
    border-radius: 6px; /* Match standard button border-radius of 6px */
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.metric-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.metric-card-title {
    font-size: 12.5px;
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.metric-card-icon {
    font-size: 20px;
}
.metric-card-icon.primary {
    color: var(--primary);
}
.metric-card-icon.success {
    color: var(--success);
}
.metric-card-icon.wallet {
    color: hsl(260, 60%, 55%);
}
.metric-card-icon.warning {
    color: var(--warning);
}

.metric-card-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.03em;
    margin: 4px 0;
}

.metric-card-trend {
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}
.metric-card-trend.success {
    color: var(--success);
}
.metric-card-trend.muted {
    color: var(--muted);
}

.metric-card-trend-icon {
    font-size: 16px;
}
.metric-card-trend-icon.primary {
    color: var(--primary);
}
.metric-card-trend-icon.warning {
    color: var(--warning);
}

/* --- MODAL OVERVIEW METRIC CARDS --- */
.modal-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.modal-metric-card {
    background: var(--panel);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: 6px; /* Consistency with standard metric card border-radius of 6px */
}

.modal-metric-title {
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
}

.modal-metric-value {
    font-size: 22px;
    font-weight: 700;
    margin-top: 8px;
}
.modal-metric-value.text {
    color: var(--text);
}
.modal-metric-value.primary {
    color: var(--primary);
}
.modal-metric-value.success {
    color: var(--success);
}
.modal-metric-value.warning {
    color: var(--warning);
}

/* --- Normalized Modal & Autocomplete Overlay Styles --- */
.swepearl-modal-overlay-bg {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.swepearl-modal-overlay-bg.show {
    opacity: 1;
}

.swepearl-modal-card-normalized {
    background: var(--panel);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(15px);
    transition: transform 0.2s ease;
    border: 1px solid var(--border);
    box-sizing: border-box;
}
.swepearl-modal-overlay-bg.show .swepearl-modal-card-normalized {
    transform: translateY(0);
}

.archive-modal-width {
    width: 600px;
    max-width: 90%;
    max-height: 80vh;
}

.custom-period-modal-width {
    width: 450px;
    max-width: 90%;
}

.selected-items-pills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.selected-pill-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--swepearl-hover-color);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    border: 1px solid var(--border);
}

.selected-pill-item .btn-remove-item {
    font-size: 15px;
    cursor: pointer;
    color: var(--muted);
    transition: color 150ms;
}
.selected-pill-item .btn-remove-item:hover {
    color: var(--primary);
}

.autocomplete-results-item {
    padding: 12px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
}
.autocomplete-results-item.is-selectable {
    cursor: pointer;
    background: transparent;
    opacity: 1;
}
.autocomplete-results-item.is-selectable:hover {
    background: var(--hover);
}
.autocomplete-results-item.is-disabled {
    cursor: not-allowed;
    background: rgba(239, 68, 68, 0.02);
    opacity: 0.7;
}

.switch-options-flex-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.switch-option-align-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.switch-option-label-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
}

/* Licence Upsell Block styles */
.selling-page-container {
    padding: 40px;
    min-height: 100vh;
    overflow-y: auto;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    gap: 40px;
    box-sizing: border-box;
    width: 100%;
}
.selling-hero {
    text-align: center;
    max-width: 800px;
    margin: 20px auto 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.selling-hero .hero-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--swepearl-hover-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--swepearl-active-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.selling-hero .hero-icon-wrapper .material-symbols-rounded {
    font-size: 36px;
}
.selling-hero h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--swepearl-brand-color);
    letter-spacing: -0.03em;
    margin: 10px 0 0 0;
    line-height: 1.2;
}
.selling-hero p {
    font-size: 16px;
    color: var(--swepearl-user-color);
    max-width: 600px;
    line-height: 1.6;
    margin: 0;
}
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}
.feature-card {
    background: var(--panel);
    border: 1px solid var(--border);
    padding: 24px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-sizing: border-box;
}
.feature-card .material-symbols-rounded {
    color: var(--swepearl-active-color);
    font-size: 28px;
}
.feature-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--swepearl-brand-color);
    margin: 0;
}
.feature-card p {
    font-size: 13.5px;
    color: var(--swepearl-user-color);
    line-height: 1.5;
    margin: 0;
}
.pricing-tier-banner {
    background: #ffffff;
    border: 1px solid var(--border);
    padding: 32px 40px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 10px auto 40px auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    width: 100%;
    box-sizing: border-box;
}
.pricing-tier-banner .banner-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.pricing-tier-banner .banner-tag {
    font-size: 12px;
    font-weight: 700;
    color: var(--swepearl-active-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.pricing-tier-banner h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--swepearl-brand-color);
    margin: 0;
    letter-spacing: -0.02em;
}
.pricing-tier-banner p {
    font-size: 14px;
    color: var(--swepearl-user-color);
    margin: 2px 0 0 0;
}
.pricing-tier-banner .btn-activate {
    padding: 12px 24px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    background: var(--swepearl-active-color);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    transition: background 160ms;
}

/* Access Request Block styles */
.access-request-container {
    padding: 40px;
    min-height: 100vh;
    overflow-y: auto;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
}
.access-request-card {
    background: transparent;
    border: none;
    padding: 48px 40px;
    border-radius: 20px;
    box-shadow: none;
    max-width: 520px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    box-sizing: border-box;
}
.access-request-card .lock-icon-wrapper {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(38, 38, 38);
}
.access-request-card .lock-icon-wrapper .material-symbols-rounded {
    font-size: 56px;
}
.access-request-card .card-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.access-request-card h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--swepearl-brand-color);
    margin: 0;
    letter-spacing: -0.02em;
}
.access-request-card p {
    font-size: 14.5px;
    color: var(--swepearl-user-color);
    line-height: 1.5;
    margin: 0;
}
.access-request-card .request-form-box {
    width: 100%;
    border: 1px solid var(--swepearl-hover-color);
    background: var(--swepearl-hover-color);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
    box-sizing: border-box;
}
.access-request-card .form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.access-request-card label {
    font-size: 11px;
    font-weight: 700;
    color: var(--swepearl-user-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.access-request-card .admin-row {
    font-size: 14px;
    font-weight: 600;
    color: var(--swepearl-brand-color);
    display: flex;
    align-items: center;
    gap: 6px;
}
.access-request-card .admin-row .material-symbols-rounded {
    font-size: 18px;
    color: var(--swepearl-active-color);
}
.access-request-card .textarea-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}
.access-request-card textarea {
    width: 100%;
    height: 80px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    font-size: 13px;
    font-family: inherit;
    color: var(--text);
    resize: none;
    box-sizing: border-box;
    outline: none;
    background: #ffffff;
}
.access-request-card .btn-request {
    width: 100%;
    padding: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    background: var(--swepearl-active-color);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    transition: background 160ms;
}

/* --- Extracted Modular UI layout styles --- */
.badge-container {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    vertical-align: middle;
}
.badge-text {
    font-weight: 600;
    color: var(--text);
}
.badge-pill {
    background: var(--hover);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    display: inline-block;
    line-height: 1.2;
}

/* SVG Chart Layouts */
.chart-container {
    position: relative;
    width: 100%;
    height: 180px;
}
.chart-svg {
    overflow: visible;
}
.chart-dot {
    cursor: pointer;
}
.chart-tooltip-text {
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    background: var(--panel);
}

/* Table High-Density Settings */
.high-density-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}
.high-density-table th {
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-align: left;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}
.high-density-table th .material-symbols-rounded {
    font-size: 14px;
    vertical-align: middle;
    margin-right: 4px;
}
.high-density-table td {
    padding: 10px 10px;
    font-size: 13px;
    color: var(--text);
    vertical-align: middle;
}
.high-density-table tbody tr {
    border-bottom: 1px dashed var(--border);
    transition: background 0.15s ease;
}
.high-density-table tbody tr:last-child {
    border-bottom: none;
}
.high-density-table tbody tr:hover {
    background: var(--hover);
}
.high-density-table tr.campaign-row-btn {
    cursor: pointer;
}
.text-right {
    text-align: right !important;
}
.progress-bar-bg {
    background: var(--border);
    width: 60px;
    height: 4px;
    border-radius: 2px;
    overflow: hidden;
}
.progress-bar-fill {
    background: var(--primary);
    height: 100%;
}
.progress-bar-fill.success {
    background: var(--success);
}
.progress-percent-label {
    font-size: 10px;
    color: var(--muted);
    font-weight: 600;
}

/* Welcome Page Empty State */
.welcome-empty-view {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    width: 100%;
}
.empty-state-welcome-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    text-align: center;
    max-width: 600px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    gap: 24px;
}
.empty-state-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}
.empty-state-icon-wrapper .material-symbols-rounded {
    font-size: 40px;
}
.empty-state-welcome-container h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 10px 0;
}
.empty-state-welcome-container p {
    font-size: 15px;
    color: var(--muted);
    margin: 0;
    line-height: 1.6;
}
.empty-state-btn-row {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    margin-top: 8px;
}

/* Manage Modal Overlays */
.modal-fixed-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(225, 225, 226, 0.9) !important;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 100ms ease-in-out !important;
    -webkit-transition: all 100ms ease-in-out !important;
    -moz-transition: all 100ms ease-in-out !important;
    -o-transition: all 100ms ease-in-out !important;
}
.modal-card {
    position: relative;
    background-color: rgb(250,250,250);
    width: 100%;
    max-width: 760px;
    height: 90vh;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    transform: scale(0.95);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

@keyframes popupWindowInneContainer {
    from {
        opacity: 0.5;
        transform: scale(1.1,1.1);
    }
    to {
        opacity: 1;
        transform: scale(1,1);
    }
}
.modal-header-container {
    padding: 20px 24px;
    border-bottom: 1px solid rgb(240,240,240);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgb(250,250,250) !important;
}
.modal-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.modal-header-left h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.modal-header-subtitle {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
}
.modal-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.modal-close-btn {
    background: #f5f5f5;
    border: none;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    transition: all 0.15s ease;
    margin-left: 30px;
}
.modal-close-btn:hover {
    background: #ebebeb;
    color: rgb(38,38,38);
}
.modal-close-btn .material-symbols-rounded {
    font-size: 20px;
}

.modal-header-cta {
    background: #f5f5f5;
    border: none;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    height: 30px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s ease;
}
.modal-header-cta:hover {
    background: #ebebeb;
    color: rgb(38,38,38);
}
.modal-header-cta .material-symbols-rounded {
    font-size: 13px !important;
    line-height: 1 !important;
}
.modal-tabs-menu {
    display: flex;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    background: rgb(250,250,250);
    padding: 0 24px;
}
.modal-body-container {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background-color: rgb(250,250,250);
    display: flex;
    flex-direction: column;
}
.modal-tab-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.modal-form-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.modal-overview-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.modal-columns-grid {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 24px;
}
.modal-details-card {
    background: var(--panel);
    border: 1px solid var(--border);
    padding: 24px;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.modal-details-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.modal-details-properties {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px 20px;
    font-size: 13.5px;
}
.modal-details-label {
    color: var(--muted);
    font-weight: 500;
}
.modal-details-value {
    color: var(--text);
    font-weight: 600;
}
.modal-description-box {
    background: var(--bg);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
    margin-top: 8px;
}
.modal-sidebar-card {
    background: var(--panel);
    border: 1px solid var(--border);
    padding: 24px;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
}
.modal-sidebar-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.modal-action-btn-full {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
}
.btn-status-active {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    font-weight: 600;
    background: rgba(224, 62, 62, 0.1) !important;
    color: var(--danger) !important;
    border: 1px solid var(--danger) !important;
}
.btn-status-inactive {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    font-weight: 600;
    background: rgba(47, 158, 68, 0.1) !important;
    color: var(--success) !important;
    border: 1px solid var(--success) !important;
}
.modal-delete-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: none;
    border: 1px solid var(--border);
    color: var(--danger);
}
.modal-delete-btn:hover {
    background: rgba(224, 62, 62, 0.05);
    border-color: var(--danger);
}
.modal-qr-card {
    background: var(--panel);
    border: 1px solid var(--border);
    padding: 24px;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    text-align: center;
}
.modal-qr-circle-box {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}
.modal-qr-canvas {
    width: 160px;
    height: 160px;
    display: block;
}
.modal-qr-caption {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.4;
}
.modal-qr-download-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    font-weight: 700;
}
.layout-content-gap {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.overview-period-badge-layout {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    padding: 0 12px;
    height: 30px;
    background: var(--hover);
    border-radius: 6px;
    border: none;
    margin-bottom: -8px;
}
.overview-period-icon {
    font-size: 18px;
    color: inherit;
}
.overview-period-divider {
    color: var(--border);
    margin: 0 4px;
}
.margin-top-md {
    margin-top: 8px;
}
.progress-label-row {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
    margin-top: 2px;
}
.metric-value-primary {
    font-weight: 600;
    color: var(--primary);
    font-size: 13.5px;
}
.metric-value-success {
    font-weight: 600;
    color: var(--success);
    font-size: 13.5px;
}
.metric-value-warning {
    font-weight: 600;
    color: var(--warning);
    font-size: 13.5px;
}
.metric-value-danger {
    font-weight: 600;
    color: var(--danger);
    font-size: 13.5px;
}
.empty-state-cell {
    padding: 16px;
    text-align: center;
}
.empty-state-cell .empty-state {
    margin: 0 auto;
    border: none;
    background: transparent;
    padding: 60px 20px;
}
.empty-state .btn {
    margin-top: 20px;
}
.coupon-row-btn {
    cursor: pointer;
}
.margin-bottom-xs {
    margin-bottom: 4px;
}
.flex-column-gap-xs {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.flex-align-center-gap-sm {
    display: flex;
    align-items: center;
    gap: 6px;
}
.inline-icon-sm {
    font-size: 16px;
}
.no-wrap {
    white-space: nowrap;
}

/* --- Normalized Modal & Archive Layouts --- */
.modal-header-normalized {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-title-normalized {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
}

.modal-form-normalized {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0;
}
.modal-section-title-normalized {
    margin: 0 0 10px 0;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.modal-input-row-flex {
    display: flex;
    gap: 12px;
}
.modal-date-input-normalized {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    font-size: 13px;
    box-sizing: border-box;
}
.modal-footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}
.modal-btn-cancel {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: none;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}
.modal-btn-cancel:hover {
    background: var(--hover);
}
.modal-btn-submit {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: var(--primary);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s ease;
}
.modal-btn-submit:hover {
    opacity: 0.9;
}

/* Archive (Papperskorg) Modal overrides */
.archive-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(224, 62, 62, 0.05);
}
.archive-modal-title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--danger);
    font-size: 18px;
    font-weight: 600;
}
.modal-scroll-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}
.modal-empty-state-wrapper {
    padding: 40px;
    text-align: center;
    color: var(--muted);
}
.modal-loading-spinner {
    font-size: 32px;
    margin-bottom: 8px;
    display: inline-block;
}
.archive-empty-state {
    padding: 40px 0;
    text-align: center;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.archive-empty-icon {
    font-size: 48px;
    opacity: 0.3;
}
.archive-row-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.archive-row-title {
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
}
.archive-row-date {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}
.btn-restore-coupon-action {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12px;
}

/* General layout utility helpers */
.flex-gap-sm {
    display: flex;
    gap: 8px;
}
.flex-gap-md {
    display: flex;
    gap: 12px;
}
.flex-align-center {
    display: flex;
    align-items: center;
}
.inline-icon-warning {
    color: var(--warning) !important;
    font-size: 18px !important;
}
.icon-size-md {
    font-size: 18px !important;
}
.icon-danger {
    color: var(--danger) !important;
}

/* Additional layout & typography helper classes */
.flex-grow-1 {
    flex: 1 !important;
}
.flex-space-between-align-center {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.product-sku-badge {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    background: var(--hover);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 6px;
    display: inline-block;
}
.product-warning-row {
    font-size: var(--fs-xs);
    color: var(--danger);
    font-weight: var(--fw-semibold);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.icon-size-sm {
    font-size: 14px !important;
}
.text-primary {
    color: var(--primary) !important;
}
.border-top-sep {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 0;
}

/* Global Wizard Page Fullscreen & Left-aligned Layout */
.global-wizard-page {
    background-color: rgb(250,250,250) !important;
    min-height: 100% !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}
.global-wizard-page .page-header {
    background-color: rgb(250,250,250) !important;
    border-bottom: none !important;
    padding-left: 32px !important;
    padding-right: 32px !important;
}
.global-wizard-container {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 24px 32px 60px 32px !important;
    background-color: rgb(250,250,250) !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}
.global-wizard-form {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.global-wizard-layout {
    flex: 1;
}

/* Card descriptions and custom control wrappers */
.settings-card-desc-container {
    padding: 16px 16px 0 16px;
}
.settings-row-control-flex {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
}
.settings-row-control-flex span {
    white-space: nowrap;
}
.settings-row-control-large {
    max-width: 400px;
    width: 100%;
    min-width: 0;
}
.settings-row-control-large > div {
    width: 100%;
    min-width: 0;
    display: flex;
    justify-content: flex-end;
}

.global-wizard-page .wizard-content-pane {
    max-width: 420px !important;
}

.global-wizard-page .wizard-step-body {
    max-width: 480px !important;
    flex-direction: column;
    min-height: 100%;
    position: relative;
}

.global-wizard-page .wizard-step-body.wizard-step-body-wide {
    max-width: 920px !important;
}

.sp-appearance-split-grid,
.selfservice-appearance-split-grid {
    display: flex;
    gap: 56px;
    align-items: start;
    width: 100%;
}

.sp-appearance-left-form,
.selfservice-appearance-left-form {
    width: 480px;
    max-width: 480px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sp-appearance-left-form .settings-card,
.selfservice-appearance-left-form .settings-card {
    max-width: 100% !important;
}

.sp-appearance-right-preview,
.selfservice-appearance-right-preview {
    position: sticky;
    top: 20px;
    width: 320px;
    flex-shrink: 0;
}

.sp-preview-header,
.selfservice-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.sp-preview-title-gradient,
.selfservice-preview-title-gradient {
    font-size: 15px;
    font-weight: 700;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 33%, #db2777 66%, #2563eb 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientTextShift 4s linear infinite;
    letter-spacing: -0.01em;
}

@keyframes gradientTextShift {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.sp-preview-badge,
.selfservice-preview-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 11px !important;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    background-color: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}
.sp-preview-badge .material-symbols-rounded,
.selfservice-preview-badge .material-symbols-rounded {
    font-size: 14px;
    margin: 0;
    padding: 0;
    display: block;
}

.sp-kiosk-device-frame,
.selfservice-kiosk-device-frame {
    width: 100%;
    background: #0f172a;
    border-radius: 24px;
    padding: 14px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.25), 0 0 0 1px rgba(255,255,255,0.05);
    border: 2px solid #334155;
    box-sizing: border-box;
}

.sp-kiosk-screen-container,
.selfservice-kiosk-screen-container {
    width: 100%;
    aspect-ratio: 9 / 16;
    border-radius: 0 !important;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: inset 0 0 12px rgba(0,0,0,0.15);
    box-sizing: border-box;
}

/* Color & Icon Dropdown Popover High Stacking Index above Wizard Actions Bar */
.color-dropdown-popover,
.icon-dropdown-popover {
    z-index: 9999 !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18) !important;
}

.settings-section:has(.color-dropdown-popover),
.settings-section:has(.icon-dropdown-popover) {
    position: relative;
    z-index: 105;
}

.icon-picker-grid::-webkit-scrollbar {
    width: 4px;
}
.icon-picker-grid::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

/* Premium Figma-styled Unified Color Picker Swatches */
.color-input-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important; /* Force 2-columns */
    gap: 14px 12px !important;
    margin-top: 12px !important;
}
.color-input-grid .form-group {
    margin-bottom: 0 !important; /* Managed by grid gap */
}
.color-input-grid .opt-label {
    font-size: var(--fs-xs) !important;
    font-weight: var(--fw-semibold) !important;
    color: var(--muted) !important;
    margin-bottom: 6px !important;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.color-picker-wrapper {
    display: flex !important;
    gap: 10px !important;
    align-items: center !important;
    background: var(--panel) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    padding: 4px 10px !important;
    height: 38px !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
}
.color-picker-wrapper:focus-within {
    border-color: var(--focus-stroke) !important;
    box-shadow: 0 0 0 3px var(--focus-ring) !important;
}
.color-picker-wrapper .color-picker-input {
    width: 22px !important;
    height: 22px !important;
    padding: 0 !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 50% !important; /* Perfect circular swatch bubble */
    cursor: pointer !important;
    background: none !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
    outline: none !important;
}
.color-picker-wrapper .color-picker-input::-webkit-color-swatch-wrapper {
    padding: 0 !important;
}
.color-picker-wrapper .color-picker-input::-webkit-color-swatch {
    border: none !important;
    border-radius: 50% !important;
}
.color-picker-wrapper .hex-text-input {
    flex: 1 !important;
    height: 100% !important;
    padding: 0 !important;
    font-size: var(--fs-base) !important;
    font-weight: var(--fw-semibold) !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    text-transform: uppercase !important;
    color: var(--text) !important;
}

/* Premium segmented capsule tabs for Mobile Wallets configuration */
.wallet-tabs-container {
    display: flex !important;
    background: var(--hover) !important;
    border: 1px solid var(--border) !important;
    border-radius: 10px !important;
    padding: 3px !important;
    gap: 2px !important;
    margin-bottom: 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
.wallet-tab-btn {
    flex: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 8px !important;
    height: 36px !important;
    font-size: var(--fs-sm) !important;
    font-weight: var(--fw-semibold) !important;
    color: var(--muted) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}
.wallet-tab-btn:hover {
    color: var(--text) !important;
}
.wallet-tab-btn.active {
    background: var(--panel) !important;
    color: var(--text) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}
.wallet-tab-btn .material-symbols-rounded {
    font-size: var(--fs-lg) !important;
    color: var(--muted) !important;
}
.wallet-tab-btn.active .material-symbols-rounded {
    color: var(--primary) !important;
}
.wallet-tab-btn.active .material-symbols-rounded.google-icon-color {
    color: #4285F4 !important;
}

/* Redefined Wallet Cards & Instruction Guidelines */
.wallet-details-card {
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    padding: 24px !important;
    background: var(--panel) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.01) !important;
    box-sizing: border-box !important;
}
.wallet-instruction-alert {
    background: var(--hover) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    padding: 14px 16px !important;
    margin-top: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    color: var(--text) !important;
}
.wallet-instruction-alert h6 {
    font-size: var(--fs-sm) !important;
    font-weight: var(--fw-bold) !important;
    color: var(--text) !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}
.wallet-instruction-alert h6 .material-symbols-rounded {
    font-size: var(--fs-md) !important;
    color: var(--primary) !important;
}
.wallet-instruction-alert .label-hint-text {
    font-size: var(--fs-sm) !important;
    color: var(--muted) !important;
    line-height: 1.6 !important;
    margin: 0 !important;
}

/* Widescreen vector logos rendering within segmented tab capsule buttons */
.wallet-tab-logo-img {
    width: auto !important;
    display: inline-block !important;
    transition: all 0.2s ease !important;
}
.wallet-tab-logo-img.apple {
    height: 13px !important; /* Scaled down slightly to match Google visually */
    filter: var(--logo-filter, none); /* Matches text colors when inactive */
}
.wallet-tab-logo-img.google {
    height: 17px !important; /* Scaled up slightly to balance internal G SVG padding */
}
.wallet-tab-btn:not(.active) .wallet-tab-logo-img {
    opacity: 0.45 !important;
    filter: grayscale(1) !important; /* Perfect sleek muted grayscale */
}
.wallet-tab-btn.active .wallet-tab-logo-img {
    opacity: 1 !important;
    filter: none !important; /* Full brand color on active state */
}

/* Premium Unified Capsule Chips & Badge Overhauls (Surf Blueprint) */
.swepearl-chip,
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold) !important;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    width: fit-content;
}
.swepearl-chip .chip-dot,
.status-badge .chip-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Themed chip styles */
.chip-primary,
.status-blue {
    background: rgba(59, 66, 159, 0.06) !important;
    color: var(--primary) !important;
}
.chip-primary .chip-dot,
.status-blue .chip-dot {
    background: var(--primary);
}

.chip-success,
.status-green,
.status-green-subtle {
    background: rgba(29, 111, 98, 0.08) !important;
    color: var(--success) !important;
}
.chip-success .chip-dot,
.status-green .chip-dot {
    background: var(--success);
}

.chip-warning {
    background: rgba(217, 119, 6, 0.08) !important;
    color: var(--warning) !important;
}
.chip-warning .chip-dot {
    background: var(--warning);
}

.chip-danger {
    background: rgba(224, 62, 62, 0.06) !important;
    color: var(--danger) !important;
}
.chip-danger .chip-dot {
    background: var(--danger);
}

.chip-neutral,
.status-gray {
    background: var(--hover) !important;
    color: var(--text-muted) !important;
}
.chip-neutral .chip-dot,
.status-gray .chip-dot {
    background: var(--muted);
}

/* --- Premium Grouped List Form Layout (Settings Style) --- */
.settings-section {
    margin-bottom: 32px;
    width: 100%;
    max-width: 100% !important;
}
.settings-section .settings-title,
h4.settings-title {
    font-size: 14px !important;
    font-weight: bold !important;
    color: rgb(38,38,38) !important;
    margin-bottom: 8px;
    margin-left: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: normal !important;
}
.settings-section .settings-desc,
p.settings-desc,
div.settings-desc {
    color: #7c7c7c !important;
    font-size: 13px;
    line-height: 1.4;
}
.settings-card {
    background: rgb(245,245,245);
    border-radius: 10px;
    border: none;
    overflow: visible;
    /* Optional subtle shadow for elevation */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.settings-card > :first-child {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}
.settings-card > :last-child {
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}
.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    min-height: 48px;
    border-bottom: 1px solid rgb(240,240,240);
    transition: background 0.15s ease;
}
.settings-row:last-child {
    border-bottom: none;
}
/* Stacked variation for textareas */
.settings-row-stacked {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    gap: 12px;
}
.settings-row-stacked:last-child {
    border-bottom: none;
}
.settings-row-stacked.search {
    padding-top: 4px;
    padding-bottom: 4px;
}
.settings-row-stacked .settings-row-label {
    width: 100%;
}
.settings-row-stacked .settings-row-control {
    width: 100%;
}
.settings-row-stacked input.settings-input,
.settings-row-stacked select.settings-input {
    width: 100%;
    max-width: 100%;
    text-align: left;
}

.settings-row-stacked textarea {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0;
    box-shadow: none !important;
    outline: none !important;
    resize: vertical;
    width: 100%;
    max-width: 100%;
    min-height: 80px;
    color: rgb(38,38,38);
    text-align: left;
}
.settings-row-stacked textarea:focus {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    color: #424396 !important;
}

/* Card row for toggle options with full-width description below */
.settings-row-toggle-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    border-bottom: 1px solid rgb(240,240,240);
}
.settings-row-toggle-card:last-child,
.settings-row-toggle-card.settings-row-no-border {
    border-bottom: none !important;
}

/* Card Inline Search Input */
.settings-card-search-container {
    padding: 12px 16px;
    border-bottom: 1px solid rgb(240,240,240);
}
.settings-card-search-container .relative-input {
    position: relative;
    width: 100%;
}
.settings-card-search-container .search-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted, #94a3b8);
    font-size: 18px;
    pointer-events: none;
}
.settings-card-search-container input.search-input-with-icon {
    width: 100%;
    padding-left: 38px !important;
    text-align: left !important;
    background: var(--bg-surface, #ffffff);
    border: 1px solid var(--border-color, #cbd5e1);
    border-radius: 8px;
    height: 38px;
    font-size: 13.5px;
    color: var(--text-main, #1e293b);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.settings-card-search-container input.search-input-with-icon:focus {
    border-color: var(--swepearl-active-color, #424396);
    box-shadow: 0 0 0 3px rgba(66, 67, 150, 0.12);
    outline: none;
}
.settings-row-toggle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}
.settings-row-toggle-header label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main, #1e293b);
    cursor: pointer;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Stripe-Grade Payment Method Brand Badge Layout */
.payment-method-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}
.payment-method-header-title label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main, #1e293b);
    cursor: pointer;
    margin: 0;
}
.payment-method-badge-slot {
    width: 60px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    flex-shrink: 0;
}
.payment-method-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 20px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    padding: 2px;
    flex-shrink: 0;
}
.payment-method-badge-slot .payment-method-badge:only-child {
    width: 38px;
    height: 24px;
    border-radius: 5px;
}
.payment-method-badge img {
    max-width: 30px;
    max-height: 16px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}
.payment-method-fallback-icon {
    font-size: 16px;
    color: var(--swepearl-active-color, #424396);
}
.payment-method-desc {
    font-size: 12.5px;
    color: var(--text-muted, #64748b);
    line-height: 1.35;
    margin-top: 2px;
    margin-left: 72px;
}
.dark-theme .payment-method-badge {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
}

.settings-row-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 0 0 auto;
    max-width: 45%;
    min-width: 120px;
}
.settings-row-label label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-strong);
    margin: 0;
    cursor: pointer;
}
.settings-row-label .settings-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}
.settings-row-control {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
    text-align: right;
}
.settings-input {
    height: 32px;
    padding: 0 10px;
    font-size: 13px;
    border: 1px solid transparent; /* invisible border to prevent jumping */
    border-radius: 6px;
    background: rgb(245,245,245);
    color: rgb(38,38,38);
    text-align: right;
    min-width: 120px;
    max-width: 240px;
    transition: all 0.2s ease;
}
/* Hide number input spinners */
.settings-input[type=number]::-webkit-outer-spin-button,
.settings-input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.settings-input[type=number] {
    -moz-appearance: textfield;
}
.settings-row-control input[type="datetime-local"].settings-input,
.settings-row-control select.settings-input {
    text-align: right;
}

textarea.settings-input {
    min-height: 80px;
    padding: 10px;
    resize: vertical;
}
.settings-input:focus {
    border-color: transparent;
    box-shadow: 0 0 0 3px var(--focus-ring);
    background: rgb(245,245,245);
}
select.settings-input {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 32px;
    padding-left: 12px;
    cursor: pointer;
    text-align-last: right;
}
.settings-row-control .price-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.settings-row-control .price-input-wrapper .settings-input {
    padding-right: 32px;
}
.settings-row-control .price-input-wrapper .currency-label {
    position: absolute;
    right: 12px;
    font-size: 13px;
    font-weight: 500;
    color: rgb(38,38,38);
    pointer-events: none;
}

/* Wizard & Unit Picker Specific Styles */
.settings-card-padded { 
    padding: 20px; 
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.settings-desc-spaced { margin-top: 0; margin-bottom: 16px; }
.units-toolbar-margin { margin-bottom: 0; }
.units-search-wrapper { width: 100%; position: relative; }
.units-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 20px; pointer-events: none; }
.units-search-input { width: 100%; padding: 10px 10px 10px 40px; height: 44px; background: #f9f9f9; border: none; border-radius: 8px; font-size: 14px; outline: none; font-family: inherit; color: var(--text-strong); }
.units-toolbar-actions { display: flex; gap: 8px; margin-bottom: 20px; }
.btn-units-select { background: #f0f0f0; border: none; color: var(--text-strong); font-size: 13px; font-weight: 500; padding: 6px 14px; border-radius: 6px; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.btn-units-select:hover { background: #e4e4e4; }
.units-scroll-list { max-height: 400px; overflow-y: auto; }
.units-empty-state { padding: 12px; color: var(--muted); text-align: center; }
.unit-check-card { margin-bottom: 8px; }
.unit-check-card .switch-toggle { pointer-events: none; }
.settings-row-control .switch-toggle { margin-left: auto; }
.unit-card-content { font-size: 14px; font-weight: 500; color: var(--text-strong); }

.settings-row-no-border { border-bottom: none !important; }
.settings-row-divider { border-top: 1px solid #7c7c7c; margin-top: 4px; padding-top: 12px; }
.dark-theme .settings-row-divider { border-top-color: #7c7c7c; }
.accounting-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1px 6px;
    color: #94a3b8;
    border: 1px solid currentColor;
    border-radius: 4px;
    background: transparent;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
    margin-right: 6px;
}
.dark-theme .accounting-badge {
    color: #64748b;
}
.settings-row-control-column { flex-direction: column !important; align-items: flex-start !important; }
.w-100 { width: 100% !important; }
.max-w-100 { max-width: 100% !important; }
.justify-start { justify-content: flex-start !important; }
.text-left { text-align: left !important; }

/* Generic Info Details Card Styles */
.info-details-card {
    margin-top: 12px;
    padding: 16px;
    background: rgba(136, 136, 136, 0.08);
    border-radius: 8px;
    border: 0px;
}
.info-details-card .badge-text {
    font-size: 13px;
    font-weight: bold;
    color: rgb(38,38,38);
}
.info-details-card .label-hint-text {
    color: #7c7c7c !important;
    font-size: 13px;
    font-weight: 500;
}
.info-details-card .label-hint-text strong {
    color: #7c7c7c;
}
/* Widget Hover Utilities (CSP compliance) */
.hover-scale { transition: transform 0.2s; }
.hover-scale:hover { transform: scale(1.05) !important; }

.hover-opacity-primary { transition: opacity 0.2s, background 0.2s; }
.hover-opacity-primary:hover { opacity: 1 !important; background: var(--primary) !important; }

.hover-bg-light { transition: background 0.2s; }
.hover-bg-light:hover { background: var(--light) !important; }

/* --- SmartTable Sticky Columns & Hidden Scrollbars --- */
.smart-table-container,
.smart-table-wrapper {
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(100vh - 240px);
    width: 100%;
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE and Edge */
}

.smart-table-container::-webkit-scrollbar,
.smart-table-wrapper::-webkit-scrollbar {
    display: none !important; /* Chrome, Safari, Edge, Opera */
    width: 0 !important;
    height: 0 !important;
}
.smart-table {
    border-collapse: separate;
    border-spacing: 0;
}
.sticky-col-left {
    position: sticky;
    left: 0;
    z-index: 10;
    background: var(--bg-surface, #ffffff);
}
.smart-table-container.is-scrolling .sticky-col-left {
    box-shadow: 2px 0 5px rgba(0,0,0,0.05);
}
.sticky-col-right {
    position: sticky;
    right: 0;
    z-index: 10;
    background: var(--bg-surface, #ffffff);
}
.smart-table-container.is-scrolling .sticky-col-right {
    box-shadow: -2px 0 5px rgba(0,0,0,0.05);
}
.smart-table th.sticky-col-left, .smart-table th.sticky-col-right {
    z-index: 20;
    background: var(--panel, #ffffff);
}
.smart-table th {
    position: sticky;
    top: 0;
    z-index: 15;
    background: var(--panel, #ffffff);
}
.smart-table th::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: var(--border);
    z-index: 2;
}
.smart-table th, .smart-table td {
    white-space: nowrap;
}

.smart-table tbody tr.selected,
.smart-table tbody tr.selected td,
.smart-table tbody tr.table-row-selected,
.smart-table tbody tr.table-row-selected td,
tr.table-row-selected,
tr.table-row-selected td {
    background-color: var(--primary-light, #eff6ff) !important;
}

.smart-table tbody tr.selected td.sticky-col-left,
.smart-table tbody tr.selected td.sticky-col-right,
.smart-table tbody tr.table-row-selected td.sticky-col-left,
.smart-table tbody tr.table-row-selected td.sticky-col-right {
    background-color: var(--primary-light, #eff6ff) !important;
}

.dark-theme .smart-table tbody tr.selected,
.dark-theme .smart-table tbody tr.selected td,
.dark-theme .smart-table tbody tr.table-row-selected,
.dark-theme .smart-table tbody tr.table-row-selected td,
.dark-theme tr.table-row-selected,
.dark-theme tr.table-row-selected td {
    background-color: rgba(37, 99, 235, 0.15) !important;
}

/* Flash Highlight Animation for interactive rows */
@keyframes flashRow {
  0% { background-color: var(--primary-light, #e0f2fe); }
  100% { background-color: transparent; }
}
.flash-highlight {
  animation: flashRow 1s ease-out forwards;
}

/* --- COMMON SLIDE-OUT DRAWER --- */
.drawer-panel {
    position: fixed; 
    top: 20px; 
    bottom: 20px; 
    right: -540px; 
    width: calc(100% - 40px);
    max-width: 480px; 
    background: rgb(250,250,250) !important; 
    box-shadow: -8px 8px 32px rgba(0,0,0,0.12);
    display: flex; 
    flex-direction: column; 
    overflow: hidden;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid var(--border, rgba(0,0,0,0.05));
    border-radius: 17px;
    z-index: 9999;
}
.drawer-panel.open {
    right: 20px;
}
.dark-theme .drawer-panel {
    background: #1e1e24; 
    border: 1px solid #333; 
    box-shadow: -8px 8px 40px rgba(0,0,0,0.4); 
    color: #eee;
}

.drawer-panel-header {
    padding: 24px 32px; border-bottom: 1px solid var(--border, #eaeaea);
    display: flex; justify-content: space-between; align-items: center;
}
.drawer-panel-header h3 {
    margin: 0; font-size: 18px; font-weight: 600; color: var(--text, #111);
}

.drawer-panel-body {
    flex: 1; overflow-y: auto; padding: 24px 32px; display: flex; flex-direction: column; gap: 20px;
}
.drawer-panel-body:has(.drawer-tab-nav) {
    padding-top: 0;
}

.drawer-close-btn {
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; 
    background: var(--swepearl-hover-color); border: none; 
    border-radius: 50%; cursor: pointer; color: var(--text-strong); transition: background 0.2s, opacity 0.2s;
}
.drawer-close-btn:hover { opacity: 0.8; }
.dark-theme .drawer-close-btn { background: var(--swepearl-hover-color); color: var(--text-strong); }
.dark-theme .drawer-close-btn:hover { opacity: 0.8; }

/* --- PROPERTY LIST (Notion/Linear style) --- */
.property-list { display: flex; flex-direction: column; }
.property-row { display: flex; align-items: center; padding: 12px 8px; border-bottom: 1px solid var(--border, #f0f0f0); border-radius: 0px; transition: all 0.2s; margin: 0 -8px; }
.property-row:hover { background: var(--bg-secondary, #f9fafb); border-color: transparent; border-radius: 8px; }
.dark-theme .property-row { border-bottom-color: #333; }
.dark-theme .property-row:hover { background: #2a2a32; border-color: transparent; border-radius: 8px; }
.property-row:last-child { border-bottom: none; }

.property-label { 
    width: 160px; font-size: 13px; color: var(--text-muted, #6b7280); 
    display: flex; align-items: center; gap: 8px; 
}
.dark-theme .property-label { color: #9ca3af; }
.property-label .material-symbols-rounded { font-size: 16px; opacity: 0.7; }

.property-value { 
    flex: 1; font-size: 13px; font-weight: 500; color: var(--text, #111827); 
    display: flex; align-items: center; gap: 8px; word-break: break-word; 
}
.dark-theme .property-value { color: #eee; }

.property-group-title { 
    font-size: 11px; font-weight: 700; text-transform: uppercase; 
    color: var(--text-muted, #6b7280); letter-spacing: 0.8px; 
    margin: 32px 0 12px 0; 
}
.dark-theme .property-group-title { color: #9ca3af; }
.property-group-title:first-child { margin-top: 0; }

.action-button-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-drawer-action {
    flex: 1; border: 1px solid var(--border, #e5e7eb); border-radius: 8px; padding: 10px 14px; 
    font-size: 13px; font-weight: 500; color: var(--text-main, #374151); background: var(--bg-primary, #ffffff); 
    cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px;
    transition: all 0.2s; box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.btn-drawer-action:hover:not(:disabled) { background: var(--bg-secondary, #f9fafb); box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.btn-drawer-action:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.dark-theme .btn-drawer-action { background: #2a2a32; border-color: #3d3d47; color: #e5e7eb; box-shadow: none; }
.dark-theme .btn-drawer-action:hover:not(:disabled) { background: #3f3f46; border-color: #52525b; }

.btn-drawer-primary {
    background: var(--primary, #2563eb);
    color: #ffffff !important;
    border: 1px solid var(--primary-dark, #1d4ed8);
}
.btn-drawer-primary:hover:not(:disabled) {
    background: var(--primary-dark, #1d4ed8);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}
.dark-theme .btn-drawer-primary {
    background: var(--primary, #3b82f6);
    border-color: var(--primary, #3b82f6);
}
.dark-theme .btn-drawer-primary:hover:not(:disabled) {
    background: var(--primary-dark, #2563eb);
    border-color: var(--primary-dark, #2563eb);
}

.btn-drawer-action-danger {
    color: #dc2626; background: #fee2e2; border-color: #fca5a5;
}
.btn-drawer-action-danger:hover:not(:disabled) { background: #fecaca; }
.dark-theme .btn-drawer-action-danger { background: rgba(220, 38, 38, 0.1); border-color: rgba(220, 38, 38, 0.2); color: #ef4444; }

.drawer-tab-nav {
    position: sticky;
    top: 0;
    background: rgb(250,250,250) !important;
    z-index: 100;
    margin-left: -32px;
    margin-right: -32px;
    padding-left: 32px;
    padding-right: 32px;
    padding-bottom: 0;
    border-bottom: 1px solid var(--border, #e5e7eb);
    display: flex;
    gap: 16px;
    margin-top: 0;
    margin-bottom: 24px;
    height: 50px;
    align-items: stretch;
    box-sizing: border-box;
}
.dark-theme .drawer-tab-nav { border-color: #3d3d47; background: #1e1e24 !important; }
.drawer-tab {
    background: none;
    border: none;
    padding: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted, #6b7280);
    cursor: pointer;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    height: 100%;
    position: relative;
    box-sizing: border-box;
}
.drawer-tab.active {
    color: rgb(38,38,38) !important;
}
.drawer-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: rgb(38,38,38);
    z-index: 1;
}
.dark-theme .drawer-tab.active { color: #eee; }
.dark-theme .drawer-tab.active::after { background: #eee; }

.timeline-item { position: relative; margin-bottom: 16px; }
.timeline-dot { position: absolute; left: -21px; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary, #3b82f6); border: 2px solid var(--bg-primary, #fff); }
.dark-theme .timeline-dot { border-color: #2a2a32; }
.timeline-container { position: relative; padding-left: 0; border-left: none; margin-left: 0; }
.dark-theme .timeline-container { border-color: #3d3d47; }

.history-badge { background: var(--primary-light, #e0f2fe); color: var(--primary-dark, #0369a1); padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; margin-right: 6px; }
.dark-theme .history-badge { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }

/* Reusable Modern Badges */
.modern-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 11px !important;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    width: fit-content;
}
.modern-badge .material-symbols-rounded {
    font-size: 14px;
    margin: 0;
    padding: 0;
    display: block;
}
.modern-badge-rect {
    border-radius: 4px !important;
}
.modern-badge.badge-gray { background-color: #f8fafc; color: #475569; }
.modern-badge.badge-orange { background-color: #fff7ed; color: #ea580c; }
.modern-badge.badge-blue { background-color: #eff6ff; color: #2563eb; }
.modern-badge.badge-green { background-color: #f0fdf4; color: #16a34a; }
.modern-badge.badge-red { background-color: #fef2f2; color: #dc2626; }

/* Selected table row when drawer/modal is open */
tr.table-row-selected,
.coupon-row-btn.table-row-selected {
    background-color: var(--bg-secondary, #f0f4f8) !important;
}
.dark-theme tr.table-row-selected,
.dark-theme .coupon-row-btn.table-row-selected {
    background-color: #2a2a32 !important;
}

/* Sticky Bulk Footer */
.sticky-bulk-footer {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-width, 300px);
    right: 0;
    z-index: 900;
    
    /* Light glossymorphism */
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    
    border-top: 1px solid var(--border);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), left 0.25s ease;
}

@media (max-width: 760px) {
    .sticky-bulk-footer {
        left: 0;
    }
}

.app-shell.sidebar-collapsed .sticky-bulk-footer {
    left: 0;
}

.sticky-bulk-footer.is-visible {
    transform: translateY(0);
}

.sticky-bulk-footer-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.sticky-bulk-footer-actions .btn {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--swepearl-brand-color, #181822) !important;
    padding: 8px 16px;
    border-radius: 8px;
}

.sticky-bulk-footer-actions .btn:hover {
    background: var(--swepearl-hover-color, #f5f5f6) !important;
}

.sticky-bulk-footer-info {
    display: flex;
    align-items: center;
}

.bulk-footer-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--swepearl-brand-color, #181822);
    margin-right: 12px;
}

.bulk-footer-count {
    font-size: 13px;
    font-weight: 400;
    color: var(--muted, #64748b);
    padding-left: 12px;
    border-left: 1px solid var(--border);
}

.btn-bulk-close {
    margin-right: 8px !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 4px !important;
    color: var(--muted, #64748b) !important;
}
.btn-bulk-close:hover {
    color: var(--text-strong) !important;
}

.table-row-icon-box {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
}

.drawer-panel-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-surface);
    display: flex;
    width: 100%;
    flex-shrink: 0;
}

.drawer-panel-footer.justify-between {
    justify-content: space-between;
}

.drawer-panel-footer.justify-end {
    justify-content: flex-end;
}

.variant-option-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 8px;
}

.allergy-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.allergy-name {
    font-weight: normal;
    margin: 0;
    font-size: 13px;
    color: #7c7c7c;
}

/* Force padding for search inputs inside settings-row-stacked */
div.settings-row-stacked div.relative-input input.search-input-with-icon {
    padding-left: 38px !important;
}

/* Status switch wrapper and text alignment */
.status-switch-container {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 42px;
}
.status-switch-label-left {
    font-size: 13px;
    color: var(--text-color-light);
}
.status-switch-label-right {
    font-size: 13px;
    font-weight: 500;
}

/* Right-align date and time input values in webkit (Chrome/Safari) */
.settings-input[type="date"]::-webkit-datetime-edit,
.settings-input[type="time"]::-webkit-datetime-edit {
    display: inline-flex;
    justify-content: flex-end;
    width: 100%;
}

.settings-input.settings-input-time {
    min-width: 75px;
    max-width: 75px;
    width: 75px;
    text-align: right;
    padding: 0 10px 0 8px;
}
.settings-input.settings-input-time::-webkit-datetime-edit {
    justify-content: flex-end;
}

.settings-input.settings-input-date {
    min-width: 135px;
    max-width: 135px;
    width: 135px;
    text-align: right;
    padding: 0 10px 0 8px;
}
.settings-input.settings-input-date::-webkit-datetime-edit {
    justify-content: flex-end;
}

.mapping-rule-card {
    margin-bottom: 20px;
}

.mapping-rule-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light, #eee);
}

.sales-channels-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 8px;
    width: 100%;
}

.settings-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 12px;
}

.bulk-modal-form {
    padding: 12px;
    margin-bottom: 0;
}

.bulk-modal-input {
    text-align: right;
}

.account-modal-activity-log {
    display: none;
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}

.modal-tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    min-height: 0;
}

.account-modal-activity-log.show {
    display: block;
}

.account-modal-settings-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.modal-wizard-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.modal-wizard-layout {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.btn-delete-rule {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.btn-delete-rule:hover {
    background: rgba(220, 53, 69, 0.1) !important;
}

.searchable-select-dropdown.open-up {
    top: auto !important;
    bottom: calc(100% + 4px) !important;
    animation: dropdown-fade-in-up 120ms ease !important;
}

@keyframes dropdown-fade-in-up {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.searchable-select-group-header {
    padding: 8px 12px 4px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted, #71717a);
    background-color: var(--bg-hover, #fafafa);
    letter-spacing: 0.05em;
    pointer-events: none;
    border-bottom: 1px solid var(--border-light, rgba(0,0,0,0.03));
}

.account-name-cell-wrapper {
    cursor: pointer;
}

.account-name-cell-wrapper strong {
    transition: color 0.12s ease;
}

.account-name-cell-wrapper:hover strong {
    color: var(--primary, #3b82f6);
}

#global-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: var(--swepearl-active-color, rgb(66, 67, 150));
    z-index: 99999;
    transition: width 0.2s cubic-bezier(0.1, 0.8, 0.1, 1), opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.checkpoint-cell-dept {
    font-size: 11px;
    color: var(--text-muted);
}

.checkpoint-products-list {
    width: 100%;
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.checkpoint-product-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    gap: 12px;
    margin-bottom: 6px;
    width: 100%;
    box-sizing: border-box;
}

.checkpoint-product-row-info {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-strong);
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkpoint-product-row-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.checkpoint-product-domain-select {
    width: 180px;
    height: 32px;
    padding: 0 8px;
    font-size: 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-color-white, #ffffff);
}

.checkpoint-product-remove-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: var(--text-muted);
    transition: color 0.15s ease;
}

.checkpoint-product-remove-btn:hover {
    color: var(--danger);
}

.checkpoint-hardware-indicators {
    display: flex;
    gap: 8px;
    align-items: center;
}

.checkpoint-hardware-icon {
    font-size: 18px !important;
    color: var(--text-strong);
}

.checkpoint-hardware-icon.is-muted {
    color: var(--text-muted);
}

/* Reusable Modal Card Width Modifiers */
.modal-card-sm { max-width: 400px !important; }
.modal-card-md, .medium-card { max-width: 500px !important; }
.modal-card-lg { max-width: 760px !important; }
.modal-card-xl { max-width: 1000px !important; }

/* Reusable Layout & Utility Classes */
.pos-relative { position: relative !important; }
.pos-absolute { position: absolute !important; }
.d-flex { display: flex !important; }
.flex-col { flex-direction: column !important; }
.align-center { align-items: center !important; }
.justify-start { justify-content: flex-start !important; }
.w-100 { width: 100% !important; }
.max-w-100 { max-width: 100% !important; }
.h-100 { height: 100% !important; }

/* Spacing Utilities */
.gap-xs { gap: 4px !important; }
.gap-sm { gap: 8px !important; }
.gap-md { gap: 12px !important; }

/* Interactive/Cursor Utilities */
.cursor-pointer { cursor: pointer !important; }
.cursor-not-allowed { cursor: not-allowed !important; }
.pointer-events-none { pointer-events: none !important; }

/* Reusable Autocomplete Component Classes */
.autocomplete-search-container {
    position: relative;
    width: 100%;
}
.autocomplete-icon-left {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 20px;
    pointer-events: none;
}
.autocomplete-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    max-height: 250px;
    overflow-y: auto;
    margin-top: 4px;
    box-sizing: border-box;
}
.autocomplete-row-item {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: background 0.15s ease;
}
.autocomplete-row-item:hover {
    background: var(--hover);
}
.autocomplete-empty-state {
    padding: 12px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* Reusable Unit Selector Grid Component Classes */
.unit-grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px 12px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}
.unit-card-selector {
    margin: 0;
    padding: 12px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}
.units-select-all-btn {
    background: none;
    border: none;
    padding: 0;
    color: var(--primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
}
.units-select-all-btn:hover {
    text-decoration: none;
    opacity: 0.85;
}
.payment-brand-logo {
    height: 18px;
    width: auto;
    vertical-align: middle;
    margin-right: 6px;
    display: inline-block;
}
.payment-fallback-icon {
    margin-right: 6px;
    font-size: 18px !important;
    vertical-align: middle;
    display: inline-block;
}

/* Margins Spacing Utilities */
.margin-bottom-sm { margin-bottom: 8px !important; }
.margin-bottom-md { margin-bottom: 12px !important; }
.margin-bottom-lg { margin-bottom: 16px !important; }
.margin-bottom-xl { margin-bottom: 24px !important; }

/* Typography Helper Classes */
.font-sm { font-size: 13px !important; }
.font-xs { font-size: 11px !important; }

/* Text & Margin Helper Classes */
.text-uppercase { text-transform: uppercase !important; }
.margin-top-sm { margin-top: 4px !important; }
.margin-0 { margin: 0 !important; }
.grid-col-all { grid-column: 1 / -1 !important; }

/* Modal Body Layout Helpers */
.modal-body-fixed {
    overflow: hidden !important;
    min-height: 0 !important;
}

/* Autocomplete Modifier States */
.autocomplete-row-item.is-disabled {
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}
.autocomplete-row-item.is-selectable {
    cursor: pointer !important;
}

/* Text Color Utility Classes */
.text-strong { color: var(--text-strong) !important; }
.text-muted { color: var(--text-muted) !important; }

/* Padding Helper Classes */
.padding-vertical-sm { padding: 8px 0 !important; }

/* Table Header Custom Styling */
.no-header-bg th {
    background: transparent !important;
}

.font-mono {
    font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace !important;
}
.text-capitalize {
    text-transform: capitalize !important;
}
.badge-count-circle {
    background: var(--primary) !important;
    color: white !important;
    border-radius: 50% !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    width: 18px !important;
    height: 18px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: 2px !important;
}
.m-b-md { margin-bottom: 24px !important; }
.m-b-sm { margin-bottom: 16px !important; }
.m-r-sm { margin-right: 8px !important; }
.btn-rounded { border-radius: 20px !important; }
.btn-shadow { box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important; }
.pagination-container-layout {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 20px;
}
.bulk-close-btn {
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 4px !important;
    color: var(--muted) !important;
}

/* Transaction Details Drawer enhancements */
/* Premium Vertical Timeline Styling */
.timeline-wrapper {
    position: relative;
    padding-left: 20px;
    margin-left: 19px;
    border-left: 2px solid var(--border, #e2e8f0);
    padding-top: 4px;
    padding-bottom: 4px;
    max-width: 395px;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}
.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -26px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #94a3b8;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px #cbd5e1;
    transition: all 0.2s ease;
    z-index: 2;
}

.timeline-dot.succeeded { background: #10b981 !important; border-color: #ffffff !important; box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2) !important; }
.timeline-dot.updated { background: #3b82f6 !important; border-color: #ffffff !important; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important; }
.timeline-dot.pending { background: #f59e0b !important; border-color: #ffffff !important; box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2) !important; }
.timeline-dot.failed { background: #ef4444 !important; border-color: #ffffff !important; box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2) !important; }

.timeline-content-box {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.timeline-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.timeline-badge {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    line-height: 1.4;
}

.timeline-badge.badge-info,
.timeline-badge.badge-updated {
    background: #e0f2fe;
    color: #0369a1;
}

.timeline-badge.badge-success,
.timeline-badge.badge-created {
    background: #dcfce7;
    color: #15803d;
}

.timeline-badge.badge-danger,
.timeline-badge.badge-deleted {
    background: #fee2e2;
    color: #b91c1c;
}

.timeline-badge.badge-warning,
.timeline-badge.badge-pending {
    background: #fef3c7;
    color: #b45309;
}

.timeline-badge.badge-purple {
    background: #f3e8ff;
    color: #6b21a8;
}

.timeline-time {
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
    letter-spacing: 0.2px;
}

.timeline-desc {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-strong, #0f172a);
    line-height: 1.45;
}

.timeline-user {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 400;
    color: #64748b;
    margin-top: 4px;
}
.timeline-user .material-symbols-rounded {
    font-size: 14px;
    color: #94a3b8;
}
.receipt-line-item-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgb(240, 240, 240);
    transition: background 0.15s ease;
}
.dark-theme .receipt-line-item-row {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}
.receipt-line-item-row:hover {
    background: rgba(0, 0, 0, 0.02);
}
.dark-theme .receipt-line-item-row:hover {
    background: rgba(255, 255, 255, 0.02);
}
.receipt-line-item-row:last-child {
    border-bottom: none;
}
.receipt-line-item-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: rgba(59, 66, 159, 0.06);
    color: var(--primary, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dark-theme .receipt-line-item-icon-box {
    background: rgba(96, 165, 250, 0.1);
    color: #60a5fa;
}
.receipt-line-item-icon-box span {
    font-size: 18px;
}
.receipt-line-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.receipt-line-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-strong);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.receipt-line-item-meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}
.qty-badge {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-strong);
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 10px;
}
.dark-theme .qty-badge {
    background: rgba(255, 255, 255, 0.1);
}
.vat-text {
    color: var(--muted);
    font-size: 10px;
}
.receipt-line-item-sku {
    font-size: 10px;
    color: var(--muted);
    font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
}
.receipt-line-item-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-strong);
    white-space: nowrap;
}
.details-drawer-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    background: var(--hover);
    color: var(--text-muted);
}
.details-drawer-badge.b2b {
    background: rgba(16, 185, 129, 0.1) !important;
    color: #047857 !important;
}
.details-drawer-badge.b2c {
    background: rgba(59, 130, 246, 0.1) !important;
    color: #1d4ed8 !important;
}
.details-drawer-badge.pos {
    background: rgba(245, 158, 11, 0.1) !important;
    color: #b45309 !important;
}

.payment-event-card-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
}
.justify-space-between {
    justify-content: space-between !important;
}
.timeline-card-padding {
    padding: 16px 20px !important;
}

/* Product dropdown enrichment */
.product-dropdown-subtitle-layout {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 2px;
}
.product-dropdown-subtitle-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 11px;
}
.product-dropdown-subtitle-prices {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-strong);
    font-size: 11px;
    margin-top: 2px;
}
.product-dropdown-subtitle-prices span {
    background: var(--hover);
    padding: 1px 6px;
    border-radius: 4px;
}
.text-strong {
    color: var(--text-strong) !important;
    font-weight: 600 !important;
}

/* Premium Drawer Backdrop Blur & Overlay */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: transparent;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 9998;
}
.drawer-overlay.open {
    opacity: 1;
    pointer-events: none;
}

/* Drawer Layout Styles without Inline Rules */
.drawer-header-flex {
    display: flex;
    align-items: center;
    gap: 12px;
}
.drawer-header-icon-box {
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    background: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(38, 38, 38) !important;
    padding: 0 !important;
}
.drawer-header-icon {
    font-size: 24px !important;
}
.drawer-header-title-flex {
    display: flex;
    align-items: center;
    gap: 8px;
}
.drawer-header-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-strong);
    line-height: 1.2;
}
.drawer-header-subtitle {
    font-size: 12px;
    color: var(--muted);
    font-weight: 400;
    margin-top: 6px;
}
.drawer-tab-content {
    display: none;
}
.drawer-tab-content.active {
    display: block;
}
.drawer-spinner-container {
    display: flex;
    justify-content: center;
    padding: 40px;
}

/* Label Icon Alignment & Sizing */
.settings-row-label label .material-symbols-rounded {
    color: var(--text-strong) !important;
    font-size: 16px;
    vertical-align: middle;
    margin-right: 6px;
}

/* Action button row inside drawer settings card */
.drawer-action-row {
    display: flex;
    gap: 12px;
    width: 100%;
    flex: 1;
}
.drawer-action-row button {
    flex: 1;
}

/* Clear icon-only button helper with padding for target hits */
.btn-clear {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 4px 6px !important;
    color: var(--muted) !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12.5px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease;
}
.btn-clear:hover {
    color: var(--primary) !important;
}

/* Gray email link style without underline */
.email-link-gray {
    color: var(--muted) !important;
    text-decoration: none !important;
}
.email-link-gray:hover {
    color: var(--text-strong) !important;
    text-decoration: underline !important;
}

/* Description row inside settings card (below values) */
.settings-row-desc {
    display: block;
    padding: 0 16px 12px 16px;
    margin-top: -4px;
}
.settings-row-desc .settings-desc {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.4;
    display: block;
}

/* Custom styling for transaction, payout & settlement details drawer header icon */
#settlement-how-it-works-drawer .drawer-header-icon-box,
#settlement-details-drawer .drawer-header-icon-box,
#payouts-how-it-works-drawer .drawer-header-icon-box,
#payout-details-drawer .drawer-header-icon-box,
#transaction-details-drawer .drawer-header-icon-box,
#zreport-details-drawer .drawer-header-icon-box,
#zreport-how-it-works-drawer .drawer-header-icon-box,
#issued-details-panel .drawer-header-icon-box {
    background: none !important;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    color: rgb(38, 38, 38) !important;
    padding: 0 !important;
}
#settlement-how-it-works-drawer .drawer-header-icon,
#settlement-details-drawer .drawer-header-icon,
#payouts-how-it-works-drawer .drawer-header-icon,
#payout-details-drawer .drawer-header-icon,
#transaction-details-drawer .drawer-header-icon,
#zreport-details-drawer .drawer-header-icon,
#zreport-how-it-works-drawer .drawer-header-icon,
#issued-details-panel .drawer-header-icon {
    font-size: 24px !important;
}
#transaction-details-drawer .drawer-header-subtitle,
.timeline-desc,
.payment-event-details,
.payment-event-details span,
.payment-event-error,
.settings-row-control,
.settings-row-control span,
.settings-row-control strong,
.settings-row-control a {
    overflow-wrap: break-word;
    word-break: break-word;
}

.payment-event-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgb(240, 240, 240);
    transition: background 0.15s ease;
}
.dark-theme .payment-event-row {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}
.payment-event-row:hover {
    background: rgba(0, 0, 0, 0.02);
}
.dark-theme .payment-event-row:hover {
    background: rgba(255, 255, 255, 0.02);
}
.payment-event-row:last-child {
    border-bottom: none;
}
.payment-event-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.payment-event-icon-box.success {
    background: rgba(16, 185, 129, 0.06);
    color: #10b981;
}
.dark-theme .payment-event-icon-box.success {
    background: rgba(52, 211, 153, 0.1);
    color: #34d399;
}
.payment-event-icon-box.failed {
    background: rgba(239, 68, 68, 0.06);
    color: #ef4444;
}
.dark-theme .payment-event-icon-box.failed {
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
}
.payment-event-icon-box span {
    font-size: 18px;
}
.payment-event-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.payment-event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.payment-event-action {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-strong);
}
.payment-event-amount-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.payment-event-amount {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-strong);
}
.payment-event-details {
    font-size: 11px;
    color: var(--text-muted);
    font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.payment-event-card-details {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: var(--muted);
    font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
    margin-top: 1px;
}
.payment-event-card-details span {
    font-size: 13px;
}
.payment-event-error {
    font-size: 10px;
    color: #ef4444;
    font-weight: 600;
    margin-top: 1px;
}

/* Reusable pill-shaped status badges with icons for tables */
.status-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    width: fit-content;
    white-space: nowrap;
    cursor: help;
}
.status-badge-pill .pill-icon {
    font-size: 13px !important;
}

/* paid -> green */
.status-badge-pill.paid {
    background-color: #DDF8EC;
    color: #0F766E;
}
.dark-theme .status-badge-pill.paid {
    background-color: rgba(15, 118, 110, 0.15);
    color: #14b8a6;
}

/* refunded -> blue */
.status-badge-pill.refunded {
    background-color: #DBEAFE;
    color: #1D4ED8;
}
.dark-theme .status-badge-pill.refunded {
    background-color: rgba(29, 78, 216, 0.15);
    color: #60a5fa;
}

/* credited -> purple */
.status-badge-pill.credited {
    background-color: #EDE9FE;
    color: #7C3AED;
}
.dark-theme .status-badge-pill.credited {
    background-color: rgba(124, 58, 237, 0.15);
    color: #a78bfa;
}

/* unpaid -> slate/gray */
.status-badge-pill.unpaid {
    background-color: #F1F5F9;
    color: #475569;
}
.dark-theme .status-badge-pill.unpaid {
    background-color: rgba(71, 85, 105, 0.15);
    color: #94a3b8;
}

/* pending -> yellow/orange */
.status-badge-pill.pending {
    background-color: #FEF3C7;
    color: #B45309;
}
.dark-theme .status-badge-pill.pending {
    background-color: rgba(180, 83, 9, 0.15);
    color: #fbbf24;
}

/* failed / refused -> red */
.status-badge-pill.failed {
    background-color: #FEE4E2;
    color: #B42318;
}
.dark-theme .status-badge-pill.failed {
    background-color: rgba(180, 35, 24, 0.15);
    color: #f87171;
}

/* canceled -> darker slate */
.status-badge-pill.canceled {
    background-color: #e2e8f0;
    color: #334155;
}
.dark-theme .status-badge-pill.canceled {
    background-color: rgba(100, 116, 139, 0.15);
    color: #cbd5e1;
}

/* payment provider badge */
.payment-provider-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border: 1px solid rgb(38, 38, 38);
    background-color: transparent;
    color: rgb(38, 38, 38);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.dark-theme .payment-provider-badge {
    border-color: rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.9);
}

/* Z-Reports Layout Utilities */
.z-report-acc-header {
    padding: 8px 16px;
    background: var(--bg-color-alt);
    font-size: 12px;
}
.z-report-acc-container {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}
.z-report-acc-info {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.z-report-acc-values {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    font-size: 13px;
}
.z-col-count { width: 60px; }
.z-col-net { width: 90px; }
.z-col-vat { width: 90px; }
.z-col-gross { width: 100px; }

/* Reusable Widget Components & Heatmap Styles */
.widget-heatmap-wrapper {
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
}

.widget-subtitle {
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 16px;
}

.widget-heatmap-grid {
    display: grid;
    grid-template-columns: 48px repeat(7, 1fr);
    gap: 6px;
    flex: 1;
}

.widget-heatmap-header-cell {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    align-self: end;
    padding-bottom: 8px;
}

.widget-heatmap-time-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
}

.widget-heatmap-cell {
    border-radius: 6px;
    cursor: pointer;
    aspect-ratio: 1 / 1;
    width: 100%;
}

.widget-heatmap-legend {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 16px;
    gap: 8px;
    font-size: 11px;
    color: var(--muted);
}

.widget-heatmap-gradient-bar {
    width: 60px;
    height: 8px;
    background: linear-gradient(to right, rgba(74, 217, 104, 0.15), rgb(0, 137, 50));
    border-radius: 4px;
}

.widget-bottom-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 16px;
    margin-bottom: 16px;
}

.widget-metric-item {
    background: var(--bg-color-alt, #f9fafb);
    border-radius: 8px;
    padding: 12px;
}

.widget-metric-label {
    font-size: 12px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.widget-metric-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color);
}

.widget-metric-subtext {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}

/* Reusable Insight Banner Component */
.widget-insight-banner {
    border: none;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.widget-insight-banner.success {
    background: #f0fdf4;
    color: #166534;
}

.widget-insight-banner.info {
    background: #eff6ff;
    color: #1e40af;
}

.widget-insight-banner.warning {
    background: #fffbeb;
    color: #92400e;
}

.widget-insight-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

.widget-insight-banner.success .widget-insight-icon {
    color: #166534;
}

.widget-insight-banner.info .widget-insight-icon {
    color: #1e40af;
}

.widget-insight-banner.warning .widget-insight-icon {
    color: #92400e;
}

.widget-insight-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

/* Home Dashboard & Widget Library Catalog Styles */
.home-dashboard-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
    align-items: start;
}

@media (max-width: 1150px) {
    .home-dashboard-layout {
        grid-template-columns: 1fr;
    }
    .home-dashboard-sidebar {
        margin-top: 16px;
    }
}

.home-dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.home-sidebar-card {
    padding: 20px;
    background: var(--panel, var(--card-bg, #fff));
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: none !important;
}

.insight-center-theme-card {
    background: var(--surface, #ffffff);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color, rgba(0,0,0,0.06));
    margin-bottom: 20px;
    box-shadow: none !important;
}

.insight-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.insight-card-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.insight-card-header-icon {
    color: #64748b;
    font-size: 20px;
}

.insight-card-header-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #475569;
}

.insight-card-header-info {
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
}

.insight-card-list {
    display: flex;
    flex-direction: column;
}

.insight-card-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.insight-card-item-icon {
    font-size: 18px;
    color: #64748b;
    flex-shrink: 0;
    margin-top: 1px;
}

.insight-card-item-title {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.35;
    margin-bottom: 3px;
}

.insight-card-item-message {
    font-size: 13px;
    color: #64748b;
    line-height: 1.45;
}

.insight-card-divider {
    border-top: 1px solid #f1f5f9;
    margin: 12px 0;
}

.home-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.home-sidebar-title-flex {
    display: flex;
    align-items: center;
    gap: 8px;
}

.home-sidebar-title-icon {
    color: var(--primary);
    font-size: 20px;
}

.home-sidebar-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    color: var(--text-color, var(--text-main));
}

.home-sidebar-info-icon {
    font-size: 18px;
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
    transition: color 0.15s ease;
}
.home-sidebar-info-icon:hover {
    color: var(--text-secondary, #64748b);
}

/* ⏳ TIMELINE COMPONENT (Senaste Händelser) */
.timeline-container {
    display: flex;
    flex-direction: column;
    position: relative;
    padding-left: 0;
    margin-left: 0;
    border-left: none;
    padding-top: 6px;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    padding-bottom: 18px;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.timeline-item:last-child {
    padding-bottom: 2px;
}

.timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    top: 26px;
    left: 13px;
    width: 2px;
    height: calc(100% - 22px);
    background: var(--border-color, rgba(0, 0, 0, 0.08));
    z-index: 1;
}

.timeline-marker {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-surface, #f8fafc);
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 2;
    color: var(--text-secondary, #64748b);
    transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.timeline-item:hover .timeline-marker {
    background: var(--primary-light, rgba(59, 66, 159, 0.08));
    border-color: var(--primary, #3b429f);
    color: var(--primary, #3b429f);
    transform: scale(1.08);
}

.timeline-icon {
    font-size: 15px;
}

.timeline-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 2px;
}

.timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.timeline-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main, #1e293b);
    line-height: 1.3;
    transition: color 0.15s ease;
}

.timeline-item:hover .timeline-title {
    color: var(--primary, #3b429f);
}

.timeline-time {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted, #94a3b8);
    white-space: nowrap;
}

.timeline-detail {
    font-size: 12px;
    color: var(--text-secondary, #64748b);
    line-height: 1.4;
}

.home-action-center-card {
    padding: 18px 20px;
    margin-bottom: 20px;
    background: var(--panel, var(--card-bg, #fff));
    border-radius: 12px;
    border: 1px solid var(--border);
}

.home-action-center-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--swepearl-hover-color, var(--bg-surface, #f8fafc));
    border-radius: 10px;
    margin-bottom: 8px;
}

.home-action-center-item.danger { border-left: 4px solid var(--danger, #ef4444); }
.home-action-center-item.warning { border-left: 4px solid var(--warning, #f59e0b); }
.home-action-center-item.info { border-left: 4px solid var(--primary, #3b82f6); }

.home-action-center-icon-box {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-action-center-icon-box.danger { background: rgba(239, 68, 68, 0.1); color: var(--danger, #ef4444); }
.home-action-center-icon-box.warning { background: rgba(245, 158, 11, 0.1); color: var(--warning, #f59e0b); }
.home-action-center-icon-box.info { background: rgba(59, 130, 246, 0.1); color: var(--primary, #3b82f6); }

.home-spotlight-card {
    padding: 16px 20px;
    margin-bottom: 20px;
    background: var(--swepearl-hover-color, #f9fafb);
    border-radius: 12px;
    border: none;
    box-shadow: none;
}

.home-spotlight-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 8px;
}

.home-spotlight-icon {
    color: var(--text-color, rgb(38, 38, 38));
    font-size: 18px;
    margin-top: 2px;
}

.home-service-request-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.home-activity-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid var(--border);
}

.home-activity-item:hover {
    background-color: var(--swepearl-hover-color, rgba(0, 0, 0, 0.04));
}

.home-activity-icon-box {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--bg-surface, #f3f4f6);
    color: var(--text-color, rgb(38, 38, 38));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.home-activity-log-icon-box {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--swepearl-hover-color, var(--bg-surface));
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Widget Library Catalog & Drawer Styles */
.widget-catalog-container {
    padding: 4px 0;
}

.widget-catalog-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.widget-catalog-tabs {
    display: flex;
    align-items: center;
    background: var(--swepearl-hover-color, rgba(0,0,0,0.04));
    padding: 3px;
    border-radius: 10px;
    gap: 2px;
}

.widget-tab-btn {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s;
}

.widget-tab-btn.active {
    font-weight: 600;
    background: var(--panel, var(--card-bg, #fff));
    color: var(--text-color);
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.08));
}

.widget-catalog-search-wrapper {
    position: relative;
    min-width: 220px;
    flex: 1;
    max-width: 300px;
}

.widget-catalog-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 18px;
}

.widget-catalog-search-input {
    width: 100%;
    padding: 7px 12px 7px 34px;
    font-size: 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--panel, var(--card-bg, #fff));
    outline: none;
}

.widget-catalog-group {
    margin-bottom: 24px;
}

.widget-catalog-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 0;
    border-bottom: none;
}

.widget-catalog-group-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    color: var(--text-color, rgb(38, 38, 38));
}

.widget-catalog-group-badge {
    background: var(--swepearl-hover-color);
    color: var(--muted);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.widget-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.widget-catalog-card {
    background: var(--swepearl-hover-color, var(--bg-color-alt, #f9fafb));
    border: none;
    border-radius: 12px;
    box-shadow: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: none;
}

.widget-catalog-card:hover {
    border: none;
    box-shadow: none;
    transform: none;
}

.widget-catalog-card.locked {
    opacity: 0.75;
}

.widget-card-body-container {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
    gap: 12px;
}

.widget-card-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.widget-card-title-flex {
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-card-icon {
    color: var(--text-color, rgb(38, 38, 38));
    font-size: 20px;
    flex-shrink: 0;
}

.widget-card-title-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-color, rgb(38, 38, 38));
}

.widget-card-desc-text {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.45;
}

/* Catalog Footer CTA Button (Right Aligned, Subtle Muted Tone) */
.btn-catalog-cta {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 9px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    background: transparent !important;
    border: 1px solid var(--border, rgba(0, 0, 0, 0.12));
    color: var(--muted, #64748b);
    transition: all 0.15s ease;
    flex-shrink: 0;
    line-height: 1.4;
    white-space: nowrap;
}

.btn-catalog-cta span.material-symbols-rounded {
    font-size: 13px;
}

.btn-catalog-cta:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    color: var(--text-color, #1e293b);
    border-color: var(--muted, #94a3b8);
}

.btn-catalog-cta.remove {
    background: rgba(239, 68, 68, 0.08) !important;
    color: var(--danger, #ef4444);
    border-color: rgba(239, 68, 68, 0.35);
    font-weight: 600;
}

.btn-catalog-cta.remove:hover {
    background: rgba(239, 68, 68, 0.16) !important;
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.6);
}

.btn-catalog-cta.add:hover {
    background: rgba(99, 102, 241, 0.06) !important;
    color: var(--primary, #4f46e5);
    border-color: rgba(99, 102, 241, 0.3);
}

.widget-card-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    padding: 0;
    background: transparent !important;
    color: var(--text-color, rgb(38, 38, 38)) !important;
    cursor: help;
    flex-shrink: 0;
    transition: opacity 0.15s ease;
}

.widget-card-badge .widget-card-badge-icon,
.widget-card-badge span.material-symbols-rounded {
    font-size: 20px !important;
    color: var(--text-color, rgb(38, 38, 38)) !important;
}

.widget-card-badge.locked-badge,
.widget-card-badge.permission-badge {
    background: transparent !important;
    color: var(--text-color, rgb(38, 38, 38)) !important;
}

.widget-card-badge:hover {
    opacity: 0.7;
}

.btn-catalog-cta.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    border-color: rgba(0, 0, 0, 0.1);
}

/* Card Footer & Pill Tags (No Border) */
.widget-card-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 4px;
    border-top: none !important;
    margin-top: 4px;
}

.widget-card-pills-flex {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.widget-card-pill-tag {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 7px;
    border-radius: 6px;
    cursor: help;
    transition: background 0.15s ease, color 0.15s ease;
}

.widget-card-pill-tag:hover {
    background: rgba(0, 0, 0, 0.09);
    color: var(--text-color);
}

.widget-card-pill-tag.category-pill {
    font-weight: 500;
    color: var(--text-secondary);
}

.widget-catalog-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
}

.widget-catalog-empty-icon {
    font-size: 44px;
    margin-bottom: 8px;
    opacity: 0.5;
}

.widget-catalog-empty-title {
    font-size: 14px;
    font-weight: 600;
}

.widget-catalog-empty-sub {
    font-size: 12px;
    margin-top: 4px;
}

.btn-danger-soft {
    color: var(--danger, #ef4444) !important;
    border-color: rgba(239, 68, 68, 0.2) !important;
}

.btn-danger-soft:hover {
    background: rgba(239, 68, 68, 0.08) !important;
}

.drawer-footer-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* Header icon styling matching Transaction details drawer */
#ui-peek-drawer .drawer-header-icon-box {
    background: none !important;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    color: rgb(38, 38, 38) !important;
    padding: 0 !important;
}
#ui-peek-drawer .drawer-header-icon {
    font-size: 24px !important;
}

/* Updated Table Row Smooth Highlight */
@keyframes rowUpdatePulse {
    0% { background-color: rgba(59, 130, 246, 0.18); }
    100% { background-color: transparent; }
}

.table-row-updated-highlight {
    animation: rowUpdatePulse 2s ease-out;
}

/* --- STRIPE-LIKE CRISP SAAS FLOW CHART --- */
.saas-flow-canvas {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 24px 16px;
    margin: 16px 0;
    background-color: var(--bg-main, #f8fafc);
    background-image: radial-gradient(var(--border-color, rgba(0, 0, 0, 0.12)) 1.2px, transparent 1.2px);
    background-size: 16px 16px;
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
    border-radius: 16px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

.saas-flow-node {
    width: 100%;
    max-width: 380px;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    z-index: 2;
    cursor: default;
}

.saas-flow-node:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.04);
    border-color: rgba(59, 130, 246, 0.3);
}

.saas-flow-node-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.saas-flow-node-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

.saas-flow-node-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-strong, #1e293b);
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.saas-flow-node-tag {
    font-family: var(--font-mono, monospace);
    font-size: 11px;
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-muted, #64748b);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.saas-flow-node-desc {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted, #64748b);
    line-height: 1.45;
}

.saas-flow-connector {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 48px;
    width: 100%;
    z-index: 1;
}

.saas-flow-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.3) 0%, rgba(99, 102, 241, 0.3) 100%);
}

.saas-flow-pulse-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary, #3b82f6);
    box-shadow: 0 0 8px var(--primary, #3b82f6);
    animation: flowPulse 2.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes flowPulse {
    0% { top: 0%; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.saas-flow-badge {
    position: relative;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: #ffffff;
    color: var(--text-strong, #334155);
}

.saas-flow-badge .material-symbols-rounded {
    font-size: 13px;
}

/* --- CENTRAL GUIDE SYSTEM & DRAWER LAYOUT --- */
.guide-drawer-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-top: 4px;
}

.guide-section {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.guide-section-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.guide-section-icon {
    font-size: 20px;
}

.guide-section-body {
    flex: 1;
    min-width: 0;
}

.guide-section-title {
    margin: 0 0 6px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-strong);
    line-height: 1.35;
}

.guide-section-desc {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.guide-ordered-list,
.guide-unordered-list {
    margin: 0 0 8px 0;
    padding-left: 18px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

.guide-note-box {
    margin: 8px 0 0 0;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.45;
    background: var(--bg-main, rgba(0, 0, 0, 0.03));
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
}

.guide-note-box-enterprise {
    margin: 10px 0 0 0;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    background: var(--bg-main, rgba(0, 0, 0, 0.03));
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 14px;
}

.guide-text-muted {
    margin: 8px 0 0 0;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.guide-badges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11px;
    margin-top: 6px;
}

.guide-badge {
    background: var(--bg-main, #f1f5f9);
    color: var(--text-strong, #475569);
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 500;
}

.guide-badge-highlight {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary, #2563eb);
    font-weight: 600;
}

.guide-intro-label {
    margin: 0 0 6px 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-strong);
}

.guide-box-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

.guide-box-item {
    background: var(--bg-main, rgba(0, 0, 0, 0.03));
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* Animated CSS spinner loader for remote command execution badge */
.badge-spinner-icon .material-symbols-rounded,
.toast-spinner-icon .material-symbols-rounded {
    animation: badgeSpinLoader 1s linear infinite !important;
    display: inline-block !important;
}

@keyframes badgeSpinLoader {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}







