/* ==========================================================================
   PayPlus Simulator - Enterprise Design System (Fintech 2026 Edition)
   ========================================================================== */

:root {
    --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    
    /* Color Palette */
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-primary-active: #1e40af;
    --color-primary-light: #eff6ff;
    --color-primary-border: #bfdbfe;
    
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #0ea5e9;
    
    /* Neutral / Slate Palette */
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --slate-950: #090d16;
    
    /* Layout */
    --sider-bg: #090d16;
    --sider-active-bg: rgba(37, 99, 235, 0.12);
    --sider-active-text: #60a5fa;
    --header-bg: #ffffff;
    --app-bg: #f8fafc;
    
    /* Shadows & Radii */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    --shadow-subtle: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.06), 0 4px 16px -2px rgba(15, 23, 42, 0.04);
    --shadow-float: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --shadow-glow: 0 0 15px rgba(37, 99, 235, 0.35);
}

/* Base Reset & Typography */
html, body {
    font-family: var(--font-primary) !important;
    background-color: var(--app-bg) !important;
    color: var(--slate-800);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    line-height: 1.5;
}

code, pre, kbd, samp, .font-mono {
    font-family: var(--font-mono) !important;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--slate-300);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--slate-400);
}

/* AntDesign Overrides for Modern Aesthetic */
.ant-layout {
    font-family: var(--font-primary) !important;
    background: var(--app-bg) !important;
}

.ant-layout-sider {
    background: var(--sider-bg) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12) !important;
}

.ant-layout-header {
    font-family: var(--font-primary) !important;
    line-height: normal !important;
}

/* Modern Sider Menu */
.ant-menu-dark {
    background: transparent !important;
    font-family: var(--font-primary) !important;
}

.ant-menu-dark .ant-menu-item,
.ant-menu-dark .ant-menu-submenu-title {
    margin: 4px 8px !important;
    border-radius: var(--radius-md) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    color: var(--slate-400) !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    height: 42px !important;
    line-height: 42px !important;
}

.ant-menu-dark .ant-menu-item:hover,
.ant-menu-dark .ant-menu-submenu-title:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.06) !important;
    transform: translateX(2px);
}

.ant-menu-dark .ant-menu-item-selected {
    background: var(--sider-active-bg) !important;
    color: var(--sider-active-text) !important;
    font-weight: 600 !important;
    border-left: 3px solid #3b82f6 !important;
    border-radius: 2px var(--radius-md) var(--radius-md) 2px !important;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.15) !important;
}

.ant-menu-dark .ant-menu-submenu-arrow {
    color: var(--slate-400) !important;
}

/* Sider Submenu Inner Container */
.ant-menu-dark.ant-menu-inline .ant-menu-sub {
    background: rgba(0, 0, 0, 0.2) !important;
    border-radius: var(--radius-md);
    margin: 2px 6px;
    padding: 4px 0;
}

/* Business Flow Colored Icon Badges */
.biz-badge {
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    margin-right: 10px;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.ant-menu-item:hover .biz-badge {
    transform: scale(1.1);
}

.badge-dash { background: linear-gradient(135deg, #3b82f6, #6366f1); }
.badge-live { background: linear-gradient(135deg, #06b6d4, #2563eb); }
.badge-token { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.badge-outward { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.badge-inward { background: linear-gradient(135deg, #10b981, #059669); }
.badge-refund { background: linear-gradient(135deg, #f59e0b, #d97706); }
.badge-merchant { background: linear-gradient(135deg, #ec4899, #be185d); }
.badge-status { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.badge-oauth { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.badge-mmqr { background: linear-gradient(135deg, #10b981, #2563eb); }
.badge-settings { background: linear-gradient(135deg, #64748b, #475569); }
.badge-master { background: linear-gradient(135deg, #6366f1, #4338ca); }

/* Pulsating Realtime Green Indicator */
.pulse-indicator {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 0 10px !important;
    height: 26px !important;
    max-height: 26px !important;
    line-height: 24px !important;
    background: #ecfdf5 !important;
    border: 1px solid #a7f3d0 !important;
    border-radius: 13px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    color: #065f46 !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
}

.pulse-dot {
    width: 7px;
    height: 7px;
    min-width: 7px;
    border-radius: 50%;
    background: #10b981;
    position: relative;
}

.pulse-dot::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    animation: pulse-ring 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(2.2); opacity: 0; }
    100% { transform: scale(2.2); opacity: 0; }
}

/* Modern Pill Host Tag */
.host-pill-tag {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 0 10px !important;
    height: 26px !important;
    max-height: 26px !important;
    line-height: 24px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 13px !important;
    font-size: 11.5px !important;
    font-weight: 500 !important;
    color: #475569 !important;
    letter-spacing: 0.2px !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
}

/* Instant Language Toggle Pill */
.btn-lang-toggle {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    height: 28px !important;
    max-height: 28px !important;
    padding: 0 12px !important;
    border-radius: 14px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 26px !important;
    box-sizing: border-box !important;
}

/* Modern Soft Filter Pills */
.filter-pill-btn {
    border: 1px solid transparent;
    background: #f1f5f9;
    color: #475569;
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px;
    line-height: 1.5;
    white-space: nowrap !important;
}

.filter-pill-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.filter-pill-btn.active {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

/* Modern Soft Badges: Always on single line with nowrap */
.badge-soft-purple,
.badge-soft-green,
.badge-soft-blue,
.badge-soft-red,
.badge-soft-gold {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    border-radius: 12px !important;
    padding: 2px 9px !important;
    font-weight: 600 !important;
    font-size: 11px !important;
    line-height: 16px !important;
    letter-spacing: 0.2px !important;
    box-sizing: border-box !important;
}

.badge-soft-purple {
    background: #f3e8ff !important;
    color: #7e22ce !important;
    border: 1px solid #e9d5ff !important;
}

.badge-soft-green {
    background: #ecfdf5 !important;
    color: #047857 !important;
    border: 1px solid #a7f3d0 !important;
}

.badge-soft-blue {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border: 1px solid #bfdbfe !important;
}

.badge-soft-red {
    background: #fef2f2 !important;
    color: #b91c1c !important;
    border: 1px solid #fecaca !important;
}

.badge-soft-gold {
    background: #fffbeb !important;
    color: #b45309 !important;
    border: 1px solid #fde68a !important;
}

/* Modern Ant Design Cards */
.ant-card {
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--slate-200) !important;
    box-shadow: var(--shadow-card) !important;
    background: #ffffff !important;
    transition: box-shadow 0.2s ease, border-color 0.2s ease !important;
}

.ant-card:hover {
    border-color: #cbd5e1 !important;
    box-shadow: var(--shadow-float) !important;
}

.ant-card-head {
    border-bottom: 1px solid var(--slate-100) !important;
    font-weight: 700 !important;
    color: var(--slate-900) !important;
    font-size: 15px !important;
    padding: 0 20px !important;
}

.ant-card-body {
    padding: 20px !important;
}

/* Modern Tabs */
.ant-tabs-nav {
    margin-bottom: 20px !important;
}

.ant-tabs-tab {
    font-weight: 500 !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
    padding: 10px 16px !important;
}

.ant-tabs-tab:hover {
    color: var(--color-primary) !important;
}

.ant-tabs-tab-active .ant-tabs-tab-btn {
    color: var(--color-primary) !important;
    font-weight: 700 !important;
}

.ant-tabs-ink-bar {
    background: linear-gradient(90deg, #2563eb, #3b82f6) !important;
    height: 3px !important;
    border-radius: 3px !important;
}

/* Primary Buttons with Micro-animation */
.ant-btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    border: none !important;
    border-radius: var(--radius-md) !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.ant-btn-primary:hover, .ant-btn-primary:focus {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35) !important;
    transform: translateY(-1px);
}

.ant-btn-primary:active {
    transform: translateY(0);
}

/* Ant Table Modernization */
.ant-table {
    border-radius: var(--radius-md) !important;
    overflow: hidden;
    font-family: var(--font-primary) !important;
}

.ant-table-thead > tr > th {
    background: #f8fafc !important;
    color: var(--slate-600) !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-bottom: 1px solid var(--slate-200) !important;
}

.ant-table-tbody > tr:hover > td {
    background: #f8fafc !important;
}

.ant-table-tbody > tr > td {
    border-bottom: 1px solid var(--slate-100) !important;
    font-size: 13px !important;
}

/* Dark Terminal Code Viewer */
.terminal-viewer {
    background: #090d16 !important;
    color: #e2e8f0 !important;
    border: 1px solid #1e293b !important;
    border-radius: var(--radius-md) !important;
    font-family: var(--font-mono) !important;
    font-size: 12px !important;
    line-height: 1.6 !important;
    padding: 12px 16px !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

/* Quick Filter Badges */
.filter-btn {
    border-radius: var(--radius-full) !important;
    font-weight: 500 !important;
    font-size: 12px !important;
    padding: 2px 12px !important;
    height: 28px !important;
    transition: all 0.2s ease !important;
}

/* Page Header Title Section */
.page-header-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--slate-200);
}

.page-title-box {
    display: flex;
    align-items: center;
    gap: 14px;
}

.page-title-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.page-title-text {
    font-size: 20px;
    font-weight: 800;
    color: var(--slate-900);
    letter-spacing: -0.02em;
    margin-bottom: 2px;
}

.page-desc-text {
    font-size: 13px;
    color: var(--slate-500);
    margin: 0;
}

/* ========================================================
   Modern Form Controls (Inputs, Selects, Numbers, Buttons)
   - Harmonized 32px height matching .ant-btn
   - Uniform rounded corners (var(--radius-md) = 8px)
   - Subtle slate-300 borders with indigo glow on focus
   ======================================================== */

.ant-input:not(textarea),
.ant-input-affix-wrapper,
.ant-input-number,
.ant-select-single:not(.ant-select-customize-input) .ant-select-selector,
.ant-select:not(.ant-select-customize-input) .ant-select-selector {
    height: 32px !important;
    min-height: 32px !important;
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--slate-300) !important;
    box-sizing: border-box !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-size: 13px !important;
}

/* Affix Wrapper (with clear icon or prefix/suffix) */
.ant-input-affix-wrapper {
    padding: 0 11px !important;
    display: inline-flex !important;
    align-items: center !important;
}

.ant-input-affix-wrapper .ant-input {
    border: none !important;
    height: 28px !important;
    line-height: 28px !important;
    box-shadow: none !important;
    padding: 0 !important;
    background: transparent !important;
}

/* Focus and Hover states */
.ant-input:not(textarea):hover,
.ant-input-affix-wrapper:hover,
.ant-input-number:hover,
.ant-select:not(.ant-select-disabled):hover .ant-select-selector {
    border-color: #818cf8 !important;
}

.ant-input:not(textarea):focus,
.ant-input-focused,
.ant-input-affix-wrapper-focused,
.ant-input-number-focused,
.ant-select-focused:not(.ant-select-disabled) .ant-select-selector {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.18) !important;
    outline: none !important;
}

/* Ant Select Item & Placement Alignment */
.ant-select-single:not(.ant-select-customize-input) .ant-select-selector {
    padding: 0 11px !important;
    display: flex !important;
    align-items: center !important;
}

.ant-select-single .ant-select-selector .ant-select-selection-item,
.ant-select-single .ant-select-selector .ant-select-selection-placeholder {
    line-height: 30px !important;
    display: flex !important;
    align-items: center !important;
    font-size: 13px !important;
}

.ant-select-arrow {
    color: var(--slate-400) !important;
    right: 10px !important;
}

/* Input Number Controls */
.ant-input-number-input {
    height: 30px !important;
    line-height: 30px !important;
}

.ant-input-number-handler-wrap {
    border-top-right-radius: var(--radius-md) !important;
    border-bottom-right-radius: var(--radius-md) !important;
}

/* Textarea exception: do not constrain height to 32px */
textarea.ant-input {
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--slate-300) !important;
    font-size: 13px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

textarea.ant-input:hover {
    border-color: #818cf8 !important;
}

textarea.ant-input:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.18) !important;
}

/* Global button height and radius consistency */
.ant-btn {
    border-radius: var(--radius-md) !important;
    height: 32px !important;
    line-height: 30px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 500 !important;
}

.ant-btn-sm {
    height: 26px !important;
    line-height: 24px !important;
    border-radius: 13px !important;
}

/* ========================================================
   API Endpoint Banner (Test Runner Dev URL Box)
   ======================================================== */
.endpoint-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 16px;
    margin-bottom: 18px;
    background: #f8fafc;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
}

.endpoint-banner:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.endpoint-banner-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.endpoint-banner-tag-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.endpoint-method-badge {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
}

.endpoint-protocol-badge {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.endpoint-url-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 3px 10px;
    display: inline-flex;
    align-items: center;
}

.endpoint-url-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12.5px;
    font-weight: 600;
    color: #1e293b;
    word-break: break-all;
}

.endpoint-desc-text {
    font-size: 11.5px;
    color: #64748b;
    font-weight: 500;
}

.btn-copy-endpoint {
    border-radius: 6px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    height: 28px !important;
    line-height: 26px !important;
    border-color: #cbd5e1 !important;
    color: #334155 !important;
    transition: all 0.2s ease !important;
}

.btn-copy-endpoint:hover {
    color: #4f46e5 !important;
    border-color: #818cf8 !important;
    background: #eef2ff !important;
    transform: translateY(-1px);
}


