/* Entity AI - dashb.css (Complete Modern Light theme styling) */

:root {
    --bg-light: #f3f6fc;
    --sidebar-bg: #ffffff;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    
    --accent-blue: #0066fe;
    --accent-purple: #8b5cf6;
    --accent-purple-light: rgba(139, 92, 246, 0.08);
    
    --icon-purple: #8b5cf6;
    --icon-blue: #3b82f6;
    --icon-green: #10b981;
    --icon-orange: #f97316;
    
    --trend-green: #10b981;
    --trend-red: #ef4444;
}

body.dashboard-body {
    background-color: var(--bg-light);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

/* ==========================================================================
   AUTHENTICATION & EMBEDDED CHECKOUT STYLES
   ========================================================================== */
.auth-section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-light);
    padding: 24px;
    box-sizing: border-box;
    position: relative;
    width: 100%;
}

.btn-back-home {
    position: absolute;
    top: 24px;
    left: 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s;
}

.btn-back-home:hover {
    color: var(--text-main);
}

.auth-card, .payment-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    box-sizing: border-box;
    text-align: center;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header img.logo-img {
    height: 42px;
    margin-bottom: 20px;
}

.auth-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 8px 0;
}

.auth-header p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 32px;
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.auth-tab.active {
    color: var(--accent-blue);
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-blue);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.input-group label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-group input {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 16px; /* 16px min prevents iOS Safari auto-zoom on focus */
    color: var(--text-main);
    outline: none;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.input-group input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 254, 0.1);
}

.btn-submit {
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 12px rgba(0, 102, 254, 0.15);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

.btn-submit:hover {
    background: #0056d6;
    transform: translateY(-1px);
}

.error-msg {
    color: var(--trend-red);
    font-size: 13.5px;
    text-align: center;
    font-weight: 600;
}

.auth-type-toggle {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 8px;
}

.auth-type-toggle label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Payment Plan specific details */
.payment-section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-light);
    padding: 24px;
    box-sizing: border-box;
}

.badge {
    background: rgba(0, 102, 254, 0.08);
    color: var(--accent-blue);
    font-size: 11px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 99px;
    display: inline-block;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.plan-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    text-align: left;
}

.plan-info h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
}

.plan-info p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

.plan-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
}

/* Wallet and Credit Card Animation */
.wallet-container {
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 20px;
    perspective: 1000px;
}

.wallet-wrapper {
    position: relative;
    width: 220px;
    height: 140px;
}

.wallet-back {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 220px;
    height: 120px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    z-index: 1;
}

.wallet-front {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 220px;
    height: 105px;
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    border-radius: 0 0 16px 16px;
    border-top: 10px solid #1e293b;
    z-index: 3;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
}

.wallet-pocket {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border: 2px dashed rgba(255,255,255,0.08);
    border-radius: 8px;
}

.credit-card {
    position: absolute;
    bottom: 10px;
    left: 20px;
    width: 180px;
    height: 110px;
    background: linear-gradient(135deg, #8b5cf6 0%, #0066fe 100%);
    border-radius: 10px;
    z-index: 2;
    padding: 12px;
    box-sizing: border-box;
    color: white;
    font-family: monospace;
    font-size: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    transition: all 0.7s cubic-bezier(0.25, 1, 0.5, 1);
    transform-origin: bottom center;
}

/* Card states */
.credit-card.tucked {
    transform: translateY(35px) scale(0.95);
    z-index: 2;
}

.credit-card.out {
    transform: translateY(-50px) rotate(-8deg) scale(1.05);
    z-index: 4;
    box-shadow: 0 15px 30px rgba(139, 92, 246, 0.25);
}

.credit-card.success {
    transform: translateY(35px) scale(0.95);
    animation: success-pulse 1.2s ease infinite alternate;
}

.card-logo {
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 1px;
    text-align: right;
    margin-bottom: 12px;
    font-family: 'Outfit', sans-serif;
}

.card-chip {
    width: 24px;
    height: 18px;
    background: linear-gradient(135deg, #e5c060 0%, #b89742 100%);
    border-radius: 4px;
    margin-bottom: 12px;
}

.card-number {
    font-size: 10px;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
}

.card-holder {
    font-size: 8px;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* Sparkles */
.sparkles-container {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    display: none;
}

.credit-card.sparkle-active .sparkles-container {
    display: block;
}

.sparkle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    filter: drop-shadow(0 0 4px #8b5cf6);
    animation: sparkle-anim 0.8s ease-out forwards;
}

@keyframes sparkle-anim {
    0% { transform: scale(0) rotate(0deg); opacity: 1; }
    50% { opacity: 1; }
    100% { transform: scale(1.5) translate(var(--x), var(--y)) rotate(180deg); opacity: 0; }
}

@keyframes success-pulse {
    0% { filter: drop-shadow(0 0 5px rgba(139, 92, 246, 0.4)); }
    100% { filter: drop-shadow(0 0 25px rgba(139, 92, 246, 0.9)); }
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   MAIN DASHBOARD LAYOUT & DESIGN SYSTEM
   ========================================================================== */
.dashboard-layout {
    width: 100%;
    min-height: 100vh;
    display: flex;
    box-sizing: border-box;
}

/* Sidebar Styling */
.dashboard-sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 32px 24px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    box-sizing: border-box;
    overflow-y: auto;
    transition: width 0.3s ease, padding 0.3s ease;
}

/* Sidebar transition and collapse overrides */
.dashboard-content {
    transition: margin-left 0.3s ease;
}

.dashboard-sidebar.collapsed {
    width: 80px;
    padding: 32px 12px;
}

.dashboard-sidebar.collapsed .sidebar-header {
    align-items: center !important;
}

.dashboard-sidebar.collapsed .sidebar-user-row,
.dashboard-sidebar.collapsed .sidebar-nav .nav-group,
.dashboard-sidebar.collapsed .sidebar-nav li a span,
.dashboard-sidebar.collapsed .logo-pill,
.dashboard-sidebar.collapsed .sidebar-new-project-btn span {
    display: none !important;
}

.dashboard-sidebar.collapsed .sidebar-new-project-btn {
    padding: 12px !important;
    width: 44px;
    height: 44px;
    border-radius: 50% !important;
    min-width: 0 !important;
    justify-content: center;
}

.dashboard-sidebar.collapsed .sidebar-nav li a {
    justify-content: center;
    padding: 12px 0;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    margin: 0 auto 6px auto;
}

.dashboard-sidebar.collapsed .sidebar-footer {
    display: none !important;
}

.dashboard-sidebar.collapsed .sidebar-mobile-close {
    display: none !important;
}

.dashboard-content.expanded {
    margin-left: 80px;
}

.logo-box {
    margin-bottom: 24px;
}

.logo-box img {
    height: 38px;
    object-fit: contain;
}

.sidebar-user-info {
    margin-bottom: 28px;
}

#user-display-name {
    color: var(--text-main);
    font-size: 15px;
    font-weight: 600;
    display: block;
}

#user-display-agency {
    color: var(--accent-purple);
    font-size: 12px;
    font-weight: 700;
    display: block;
    margin-top: 4px;
}

/* New Project Button (Blue Pill) */
.sidebar-new-project-btn {
    background: var(--accent-blue) !important;
    color: white !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    border-radius: 99px !important;
    padding: 12px 24px !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 8px 16px rgba(0, 102, 254, 0.15) !important;
    transition: all 0.2s ease !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-bottom: 28px;
}

.sidebar-new-project-btn:hover {
    background: #0056d6 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 10px 20px rgba(0, 102, 254, 0.2) !important;
}

.sidebar-separator {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 0 0 28px 0;
}

/* Sidebar Nav */
.sidebar-nav .nav-group {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0 0 28px 0;
}

.sidebar-nav li {
    margin-bottom: 6px;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--text-muted) !important;
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 500;
    border-radius: 99px;
    transition: all 0.2s ease;
}

.sidebar-nav li.disabled a {
    opacity: 0.5;
    cursor: not-allowed;
}

.sidebar-nav li a i,
.sidebar-nav li a img.nav-icon-png {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.sidebar-nav li.active a,
.sidebar-nav li a:hover {
    background: var(--accent-purple-light) !important;
    color: var(--accent-purple) !important;
}

.sidebar-nav li.active a i,
.sidebar-nav li a:hover i {
    color: var(--accent-purple) !important;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 20px;
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 14.5px;
    cursor: pointer;
    padding: 10px 16px;
    border-radius: 99px;
    width: 100%;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: #f1f5f9;
    color: #ef4444;
}

/* Main Layout content */
.dashboard-content {
    margin-left: 280px;
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.dash-main-area {
    padding: 40px 48px;
    flex: 1;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* Top Nav actions */
.dash-top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.dash-top-title h1 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 6px 0;
}

.dash-top-title p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

.dash-top-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Analytics Search Bar */
.dash-search-bar {
    position: relative;
}

.dash-search-bar i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 16px;
    height: 16px;
}

.dash-search-bar input {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 99px;
    padding: 10px 16px 10px 44px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-main);
    outline: none;
    width: 200px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.01);
    transition: all 0.2s;
}

.dash-search-bar input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 254, 0.1);
}

/* Date Picker Pill */
.dash-date-picker {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 99px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.01);
    transition: all 0.2s;
}

.dash-date-picker:hover {
    border-color: #cbd5e1;
}

/* Notification Bell */
.dash-notif-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    color: var(--text-main);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.01);
    transition: all 0.2s;
}

.dash-notif-btn:hover {
    border-color: #cbd5e1;
}

.dash-notif-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: white;
    font-size: 9px;
    font-weight: 800;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-light);
}

/* Notifications Dropdown Menu */
.notif-dropdown-menu {
    position: absolute;
    top: 52px;
    right: 0;
    width: 360px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    display: none;
    flex-direction: column;
    z-index: 1100;
    overflow: hidden;
    cursor: default;
}

.notif-dropdown-menu.show {
    display: flex;
}

.notif-dropdown-header {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.notif-dropdown-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #f8fafc;
}

.notif-clear-all {
    background: none;
    border: none;
    font-size: 13px;
    font-weight: 600;
    color: #3b82f6;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.notif-clear-all:hover {
    color: #60a5fa;
}

.notif-dropdown-content {
    max-height: 380px;
    overflow-y: auto;
}

/* Scrollbar styles */
.notif-dropdown-content::-webkit-scrollbar {
    width: 6px;
}
.notif-dropdown-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}
.notif-dropdown-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 99px;
}
.notif-dropdown-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s;
    text-align: left;
}

.notif-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notif-icon-box.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.notif-icon-box.success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.notif-icon-box.info {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.notif-icon-box i, .notif-icon-box svg {
    width: 16px;
    height: 16px;
}

.notif-details {
    flex: 1;
    min-width: 0;
}

.notif-title {
    margin: 0 0 4px 0;
    font-size: 13.5px;
    font-weight: 600;
    color: #f1f5f9;
    line-height: 1.4;
}

.notif-desc {
    margin: 0 0 6px 0;
    font-size: 12.5px;
    color: #94a3b8;
    line-height: 1.4;
    word-wrap: break-word;
}

.notif-time {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
}

.notif-empty-state {
    padding: 40px 20px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}


/* User Avatar Dropdown Area */
.dash-user-avatar-wrap {
    position: relative;
}

.dash-user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14.5px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
    user-select: none;
}

.dash-user-avatar:hover {
    transform: scale(1.03);
}

/* Avatar Dropdown Menu */
.avatar-dropdown-menu {
    position: absolute;
    top: 52px;
    right: 0;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 180px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    display: none;
    z-index: 1000;
    overflow: hidden;
}

.avatar-dropdown-menu.show {
    display: block;
}

.avatar-dropdown-item {
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.avatar-dropdown-item:hover {
    background: #f8fafc;
}

.avatar-dropdown-item.logout {
    color: #ef4444;
    border-top: 1px solid var(--border-color);
}

/* Metrics Cards Section */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.metric-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.01), 0 2px 6px rgba(0, 0, 0, 0.01);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    position: relative;
}

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

.metric-icon-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.metric-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.metric-icon.purple { background: rgba(139, 92, 246, 0.1); color: var(--icon-purple); }
.metric-icon.blue { background: rgba(59, 130, 246, 0.1); color: var(--icon-blue); }
.metric-icon.green { background: rgba(16, 185, 129, 0.1); color: var(--icon-green); }
.metric-icon.orange { background: rgba(249, 115, 22, 0.1); color: var(--icon-orange); }

.metric-icon i {
    width: 18px;
    height: 18px;
}

.metric-title {
    color: var(--text-muted);
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.metric-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.metric-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
}

/* Trend Capsules */
.metric-trend {
    position: absolute;
    top: 24px;
    right: 24px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 99px;
}

.metric-trend.up {
    color: var(--trend-green);
}

.metric-trend.down {
    color: var(--trend-red);
}

/* 2-Column Content Layout */
.dash-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    align-items: start;
}

.dash-left-col {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Cards Panels (White Cards with large shadow/radius) */
.panel-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.01);
    box-sizing: border-box;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
}

.panel-header-title h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 6px 0;
}

.panel-header-title p {
    font-size: 13.5px;
    color: var(--text-muted);
    margin: 0;
}

.panel-action-link {
    color: var(--accent-blue);
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.2s;
}

.panel-action-link:hover {
    opacity: 0.8;
}

/* Competitors List layout */
.competitors-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.competitor-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.comp-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.1), 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Blur effect for realistic mock logo */
.comp-logo-blur {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #cbd5e1, #94a3b8);
    filter: blur(4px);
    opacity: 0.85;
}

.comp-logo i {
    position: absolute;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.comp-info {
    flex: 1;
}

.comp-name {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.comp-url {
    font-size: 12px;
    color: var(--text-muted);
}

.comp-progress-wrap {
    width: 320px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.comp-progress-bar {
    flex: 1;
    height: 7px;
    background: #f1f5f9;
    border-radius: 99px;
    overflow: hidden;
}

.comp-progress-fill {
    height: 100%;
    background: var(--accent-purple);
    border-radius: 99px;
}

.comp-score {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    width: 40px;
    text-align: right;
}

.comp-trend {
    font-size: 12.5px;
    font-weight: 600;
    width: 60px;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
}

.comp-trend.up { color: var(--trend-green); }
.comp-trend.down { color: var(--trend-red); }

.panel-footer-live {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 28px;
    font-size: 12.5px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.panel-footer-live span.live-dot {
    width: 7px;
    height: 7px;
    background-color: var(--trend-green);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px var(--trend-green);
}

/* Active Plan Card (Right Panel) */
.plan-summary-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.plan-summary-card:hover {
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.plan-summary-card.selected {
    background: rgba(139, 92, 246, 0.025);
    border-color: rgba(139, 92, 246, 0.25);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.05);
}

.plan-summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: transparent;
    transition: background-color 0.3s ease;
}

.plan-summary-card.selected::before {
    background: var(--accent-purple);
}

.plan-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.plan-badge-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.badge-tier {
    background: var(--accent-purple-light);
    color: var(--accent-purple);
    font-size: 10.5px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
    letter-spacing: 0.05em;
    width: fit-content;
}

.badge-status {
    background: rgba(16, 185, 129, 0.08);
    color: var(--trend-green);
    font-size: 10.5px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
}

.plan-summary-header {
    margin-bottom: 24px;
}

.plan-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 4px;
}

.plan-date {
    font-size: 12.5px;
    color: var(--text-muted);
}

.plan-health-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.plan-health-val {
    color: var(--text-main);
    font-weight: 700;
}

/* Visibility Health Slider Bar */
.plan-health-slider {
    height: 10px;
    border-radius: 99px;
    margin-bottom: 24px;
    position: relative;
    /* Red-Yellow-Green continuous gradient */
    background: linear-gradient(to right, #ef4444, #f59e0b, #10b981);
    overflow: hidden;
}

.plan-health-slider-fill {
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 0 99px 99px 0;
    float: right;
    transition: width 0.3s;
}

/* Audit Dashboard Button (Purple gradient) */
.btn-audit-dash {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: white;
    border: none;
    border-radius: 99px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
    transition: all 0.2s ease;
}

.btn-audit-dash:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.3);
}

.btn-audit-dash.outline {
    background: transparent;
    border: 1.5px solid var(--accent-purple);
    color: var(--accent-purple);
    box-shadow: none;
}

.btn-audit-dash.outline:hover {
    background: rgba(139, 92, 246, 0.04);
    border-color: var(--accent-purple);
    color: var(--accent-purple);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.1);
    transform: translateY(-1px);
}

/* Dashed Add project button */
.btn-add-project-dashed {
    width: 100%;
    padding: 16px;
    background: transparent;
    border: 2px dashed var(--border-color);
    color: var(--text-muted);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-add-project-dashed:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: rgba(0, 102, 254, 0.02);
}

/* ==========================================
   NEW CARD: Recent Audits Showcase
   ========================================== */
.recent-audits-card {
    margin-top: 32px;
}

.recent-audits-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.audit-stack-item {
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: #ffffff;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.audit-stack-item:hover {
    border-color: #cbd5e1;
}

.audit-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.audit-item-project {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-main);
}

.audit-item-date {
    font-size: 12px;
    color: var(--text-muted);
}

/* Recent Audit metrics layout */
.audit-item-metrics {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.audit-item-metric-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.audit-item-metric-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    width: 120px;
}

.audit-item-metric-bar-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.audit-item-metric-bar {
    flex: 1;
    height: 6px;
    background: #f1f5f9;
    border-radius: 99px;
    overflow: hidden;
}

.audit-item-metric-fill {
    height: 100%;
    border-radius: 99px;
}

.audit-item-metric-fill.purple { background-color: var(--accent-purple); }
.audit-item-metric-fill.orange { background-color: var(--icon-orange); }
.audit-item-metric-fill.blue { background-color: var(--accent-blue); }

.audit-item-metric-score {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-main);
    width: 35px;
    text-align: right;
}

/* Empty State / Modern Stylish "-" Empty States */
.empty-state-stylish {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    border: 1px dashed var(--border-color);
    border-radius: 20px;
}

.empty-state-stylish .stylish-dash {
    font-size: 64px;
    font-weight: 300;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1;
}

.empty-state-stylish h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 8px 0;
}

.empty-state-stylish p {
    font-size: 13.5px;
    color: var(--text-muted);
    margin: 0 0 20px 0;
    max-width: 320px;
    line-height: 1.5;
}

.empty-state-stylish button {
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 99px;
    padding: 10px 24px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 102, 254, 0.1);
    transition: all 0.2s;
}

.empty-state-stylish button:hover {
    background: #0056d6;
}

/* ==========================================
   SECONDARY TABS: Prompts, Models, Comply, Tools
   ========================================== */
.detail-content-section {
    width: 100%;
}

.content-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.01);
}

.content-card h3 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 12px 0;
}

/* Prompts styling */
.package-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.01);
}

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

.package-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.package-date {
    font-size: 12.5px;
    color: var(--text-muted);
}

.package-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 16px 0;
}

.package-files {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.file-badge {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    transition: all 0.2s;
}

.file-badge:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.file-badge i {
    width: 14px;
    height: 14px;
    color: var(--accent-blue);
}

/* Token Store styling */
.token-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 24px;
}

/* Modal and setup fields styling */
.setup-modal-content {
    background: #ffffff !important;
    border-radius: 24px !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1) !important;
}

.setup-input {
    background: #ffffff !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
    border-radius: 8px !important;
    padding: 12px !important;
}

.setup-input:focus {
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 0 3px rgba(0, 102, 254, 0.1) !important;
}

/* ==========================================
   ADMIN PANEL: White theme
   ========================================== */
.admin-editor-tabs {
    background-color: #f8fafc;
}

.admin-input, .admin-textarea {
    background: #ffffff !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
    border-radius: 8px !important;
    padding: 12px !important;
}

.admin-input:focus, .admin-textarea:focus {
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 0 3px rgba(0, 102, 254, 0.1) !important;
}

.admin-history-col .history-list {
    background: #ffffff !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
}

/* Parallax Parallaxes */
.core-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
}

.core-main-title {
    color: var(--text-main) !important;
}

.core-subtitle {
    color: var(--text-muted) !important;
}

.agent-card {
    background: #ffffff !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
}

.agent-card h4 {
    color: var(--text-main) !important;
}

.agent-card p {
    color: var(--text-muted) !important;
}

/* Mobile Sidebar Overlay */
@media (max-width: 1024px) {
    .dashboard-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .dashboard-sidebar.open {
        transform: translateX(0);
    }
    
    .dashboard-content {
        margin-left: 0;
    }
    
    .dash-main-area {
        padding: 24px;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .dash-content-grid {
        grid-template-columns: 1fr;
    }

    .mobile-header-bar {
        display: flex !important;
    }
}

@media (max-width: 640px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   MOBILE RESPONSIVE: AUTH, PAYMENT & ONBOARDING (< 480px)
   ========================================================= */
@media (max-width: 520px) {

    /* Auth & Payment section: full-screen scroll, no centering clipping */
    .auth-section,
    .payment-section {
        align-items: flex-start !important;
        padding: 16px !important;
        min-height: 100dvh;
        overflow-y: auto !important;
        box-sizing: border-box !important;
    }

    /* Cards shrink to fill screen */
    .auth-card,
    .payment-card {
        padding: 24px 20px !important;
        border-radius: 16px !important;
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }

    /* Logo + headings */
    .auth-header img.logo-img {
        height: 34px !important;
    }
    .auth-header h2 {
        font-size: 20px !important;
    }
    .auth-header p {
        font-size: 13px !important;
    }

    /* Signup side-by-side name fields: stack vertically */
    .auth-form [style*="display: flex; gap: 16px"] {
        flex-direction: column !important;
        gap: 0 !important;
    }
    .auth-form [style*="min-width: 160px"] {
        min-width: 0 !important;
        width: 100% !important;
    }

    /* Plan details: stack plan name & price */
    .plan-details {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
    .plan-price {
        font-size: 18px !important;
    }

    /* Wallet animation: scale down on small screens */
    .wallet-container {
        height: 140px !important;
        margin-bottom: 12px !important;
    }
    .wallet-wrapper {
        width: 170px !important;
        height: 110px !important;
        transform: scale(0.85);
        transform-origin: center center;
    }
    .wallet-back,
    .wallet-front {
        width: 170px !important;
    }
    .credit-card {
        width: 140px !important;
        height: 88px !important;
        left: 15px !important;
        font-size: 8px !important;
    }
    .credit-card.out {
        transform: translateY(-40px) rotate(-8deg) scale(1.02) !important;
    }

    /* Buttons full width */
    .btn-submit {
        padding: 13px 12px !important;
        font-size: 14px !important;
    }

    /* Back home button reposition so it doesn't clip */
    .btn-back-home {
        position: static !important;
        display: inline-flex !important;
        margin-bottom: 16px !important;
        font-size: 13px !important;
    }

    /* Auth section: add top padding so back button is visible */
    .auth-section {
        padding-top: 20px !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
    }

    /* Auth type toggle (Individual / Agency) */
    .auth-type-toggle {
        flex-direction: column !important;
        gap: 12px !important;
        align-items: flex-start !important;
        margin-bottom: 16px !important;
    }

    /* Onboarding card */
    #onboarding-modal .payment-card {
        padding: 24px 20px !important;
    }
}

/* Mobile Dashboard main area */
@media (max-width: 480px) {
    .dash-main-area {
        padding: 16px !important;
    }
    .dash-top-nav {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        margin-bottom: 20px !important;
    }
    .dash-top-actions {
        width: 100% !important;
    }
    .dash-top-title h1 {
        font-size: 20px !important;
    }
    .audit-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Mobile header bar: hidden on desktop */
.mobile-header-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 90;
}

/* ===== Project Plan Card - Inline Setup Form ===== */
.project-setup-form {
    margin-top: 16px;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.project-setup-form input,
.project-setup-form textarea,
.project-setup-form select {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 13px;
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    background: #f8fafc;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

.project-setup-form input:focus,
.project-setup-form textarea:focus,
.project-setup-form select:focus {
    border-color: var(--accent-purple);
    background: #fff;
}

.project-setup-form textarea {
    resize: vertical;
    min-height: 64px;
}

.project-setup-form label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
    display: block;
}

.setup-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.btn-submit-setup {
    background: var(--accent-purple);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 4px;
    transition: opacity 0.2s;
}

.btn-submit-setup:hover {
    opacity: 0.88;
}

/* Status Pipeline Bar */
.status-pipeline {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 14px 0 10px 0;
}

.pipeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    position: relative;
}

.pipeline-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 60%;
    right: -40%;
    height: 2px;
    background: var(--border-color);
    z-index: 0;
}

.pipeline-step.done:not(:last-child)::after {
    background: var(--trend-green);
}

.pipeline-step.active-step:not(:last-child)::after {
    background: linear-gradient(to right, var(--accent-purple), var(--border-color));
}

.pipeline-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--border-color);
    border: 2px solid #e2e8f0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #fff;
    font-weight: 800;
    transition: all 0.3s;
}

.pipeline-step.done .pipeline-dot {
    background: var(--trend-green);
    border-color: var(--trend-green);
}

.pipeline-step.active-step .pipeline-dot {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

.pipeline-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    white-space: nowrap;
}

.pipeline-step.done .pipeline-label,
.pipeline-step.active-step .pipeline-label {
    color: var(--text-main);
}

/* Visibility Index Bar inside card */
.vci-bar-wrap {
    margin-top: 14px;
}

.vci-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.vci-bar-label strong {
    color: var(--text-main);
    font-size: 13px;
}

.vci-bar-track {
    height: 6px;
    background: #e8edf5;
    border-radius: 99px;
    overflow: hidden;
}

.vci-bar-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #8b5cf6, #0066fe);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-open-project {
    width: 100%;
    margin-top: 14px;
    padding: 9px 0;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: #fff;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-open-project:hover {
    background: var(--accent-purple);
    color: #fff;
    border-color: var(--accent-purple);
}

.btn-open-project.selected-project {
    background: linear-gradient(135deg, #8b5cf6, #0066fe);
    color: #fff;
    border: none;
}

/* Plan Selection Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
}

.modal-content {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 36px;
    width: 90%;
    max-width: 520px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-sizing: border-box;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}

.close-modal {
    background: transparent;
    border: none;
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s ease;
}

.close-modal:hover {
    color: var(--text-main);
}

/* Plan Options container */
.plan-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Individual Plan Option */
.plan-option {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    position: relative;
    background: #ffffff;
    transition: all 0.2s ease;
}

.plan-option:hover {
    border-color: var(--accent-blue);
    background: rgba(0, 102, 254, 0.02);
    transform: translateY(-1px);
}

.plan-option.featured {
    border-color: rgba(139, 92, 246, 0.3);
    background: rgba(139, 92, 246, 0.01);
}

.plan-option.featured:hover {
    border-color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.03);
}

.plan-info h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
}

.plan-info p {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
}

.plan-option strong {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
}

.plan-option.featured strong {
    color: var(--accent-purple);
}

/* Premium Real-time Scan Panel styling matching the image */
.real-time-scan-panel {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.01);
    box-sizing: border-box;
    margin-bottom: 32px;
}

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

.scan-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.scan-header-left h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
}

.scan-header-left i {
    width: 24px;
    height: 24px;
    color: #16a34a; /* Forest green */
}

.scan-header-right {
    display: flex;
    align-items: center;
    gap: 24px;
    font-family: 'Outfit', sans-serif;
}

.scan-status-item {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.scan-status-item span.status-val {
    font-weight: 800;
    margin-left: 4px;
}

.scan-status-item span.status-val.scanning {
    color: #16a34a;
}

.scan-status-item span.status-val.risk-moderate {
    color: #d97706; /* amber/gold */
}

.scan-status-item span.status-val.risk-low {
    color: #16a34a;
}

.scan-status-item span.status-val.risk-high {
    color: #ef4444;
}

.scan-status-item span.status-val.awaiting {
    color: #64748b;
}

.scan-sub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.geo-guard-badge {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
    padding: 6px 16px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.geo-guard-badge i {
    width: 14px;
    height: 14px;
}

.live-metrics-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    color: var(--text-muted);
    font-weight: 600;
}

.live-metrics-label i {
    width: 16px;
    height: 16px;
}

.scan-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.scan-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.scan-card:hover {
    background: #f8fafc;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.02);
    border-color: #cbd5e1;
}

.scan-card.selected-card {
    background: #f8fafc; /* light grey style for Hallucination Risk */
    border-color: var(--border-color);
}

.overview-circ-chart {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.overview-circ-chart svg {
    width: 100%;
    height: 100%;
}

.overview-circ-val {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
}

.overview-circ-label {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    line-height: 1.3;
}

.trend-capsule {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 99px;
    width: fit-content;
}

.trend-capsule.up {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.trend-capsule.down {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.trend-capsule.neutral {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
}

/* Dynamic Tab Cards (Prompts, Models, Comply) styles */
.package-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.01);
    box-sizing: border-box;
}

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

.package-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.package-date {
    font-size: 12px;
    color: var(--text-muted);
}

.package-desc, .package-body {
    font-size: 14px;
    color: var(--text-main);
    line-height: 1.6;
    margin: 0;
}

.package-files {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.file-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    color: var(--text-main);
    font-weight: 600;
    transition: all 0.2s;
}

.file-badge:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

/* PREMIUM AUDIT DASHBOARD UI */
.audit-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}
.audit-grid.full { grid-template-columns: 1fr; }
.audit-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}
.audit-card h4 { margin: 0 0 20px 0; font-size: 16px; color: var(--text-main); display: flex; align-items: center; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--border-color);}
.audit-card h4 i { color: #0088ff; }

/* Circular Progress Bars */
.circ-wrap {
    display:flex; flex-direction:column; align-items:center; gap:8px;
}
.circ-title { font-size: 12px; font-weight: 600; color: var(--text-muted); text-align: center; max-width: 120px; }
.circ-chart {
    position: relative;
    width: 80px; height: 80px;
}
.circ-chart svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.circ-bg { fill: none; stroke: #f3f4f6; stroke-width: 8; }
.circ-fg { fill: none; stroke-width: 8; stroke-linecap: round; transition: stroke-dasharray 1s ease-out; }
.circ-val {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 700; color: var(--text-main);
}
.color-green { stroke: #10b981; }
.color-yellow { stroke: #f59e0b; }
.color-red { stroke: #ef4444; }
.color-blue { stroke: #3b82f6; }
.text-green { color: #10b981!important; }
.text-yellow { color: #f59e0b!important; }
.text-red { color: #ef4444!important; }

.circ-row { display: flex; justify-content: space-around; gap: 16px; flex-wrap: wrap; }
.stats-list { list-style: none; padding: 0; margin: 0; }
.stats-list li { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px dashed var(--border-color); font-size: 14px; color: var(--text-muted);}
.stats-list li:last-child { border: none; }
.stats-val { font-weight: 700; color: var(--text-main); }

#agency-fields {
    display: none;
    flex-direction: column;
    gap: 20px;
}
