:root {
    --bg-dark: #F8F9FC;
    --bg-surface: #FFFFFF;
    --bg-card: rgba(255, 255, 255, 0.8);
    --text-primary: #121212;
    --text-secondary: #45474D;
    --text-muted: #6A6A71;
    --white: #FFFFFF;
    --accent-blue: #4285F4;
    --accent-red: #EA4335;
    --accent-yellow: #FBBC05;
    --accent-green: #34A853;
    --primary-color: #eae0c5;
    --primary-hover-color: #574922;
    --success: var(--accent-green);
    --error: var(--accent-red);
    --warning: var(--accent-yellow);
    --danger: var(--accent-red);
    --font-main: 'Google Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-code: 'Google Sans Code', 'Roboto Mono', monospace;
    --glass-blur: blur(16px);
    --border-subtle: 1px solid rgba(33, 34, 38, 0.08);
    --shadow-glow: 0 12px 40px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(33, 34, 38, 0.02);
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-lg: 12px;
    --radius-md: 6px;
    --radius-sm: 4px;
    --sidebar-bg: #FFFFFF;
    --border-color: rgba(33, 34, 38, 0.08);
    --card-bg: #FFFFFF;
}

/* Bulk Processing Classes */
.table-processing {
    background-color: rgba(66, 133, 244, 0.05) !important;
    position: relative;
}
.table-processing::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent-blue);
    animation: pulse-blue 1.5s infinite;
}
.table-success-brief {
    background-color: rgba(52, 168, 83, 0.1) !important;
    transition: background-color 0.5s ease;
}
.table-danger-brief {
    background-color: rgba(234, 67, 53, 0.1) !important;
}
@keyframes pulse-blue {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* Gold Gradient Class */
.gold-gradient {
    background: linear-gradient(45deg, #b08d4b 0%, #e6d4a8 50%, #b08d4b 100%);
}

.row-actions {
    opacity: 1;
    margin-top: 4px;
}
.row-actions a {
    text-decoration: none;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.row-actions .action-edit {
    color: #b08d4b !important;
}
.row-actions .action-history {
    color: #86868b !important;
}
.row-actions .action-publish {
    color: #4285F4 !important;
}
.row-actions a:hover {
    filter: brightness(0.8);
    text-decoration: underline;
}
.row-actions .separator {
    color: #e0e0e0;
    margin: 0 4px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-main); background-color: var(--bg-dark); color: var(--text-primary); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
p { margin-bottom: 1rem; }
/* Body gets the dark background so no light strip shows through */
body.auth-page {
    background:
        radial-gradient(ellipse 70% 55% at 20% 15%, rgba(50,50,65,0.55) 0%, transparent 65%),
        radial-gradient(ellipse 60% 50% at 80% 80%, rgba(30,30,40,0.4) 0%, transparent 60%),
        linear-gradient(160deg, #131313 0%, #0e0e0e 40%, #111111 70%, #0a0a0a 100%) !important;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background: transparent;
}

/* Auth page language switcher */
.auth-lang-switcher {
    position: fixed;
    top: 20px;
    right: 24px;
    z-index: 100;
}
.auth-lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #1f1f1f 0%, #3a3a3a 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 0 15px;
    height: 34px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    font-family: var(--font-main);
}
.auth-lang-btn:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.25);
    transform: translateY(-1px);
}
.auth-lang-btn .fi { width: 16px; height: 12px; border-radius: 2px; flex-shrink: 0; }
.auth-lang-arrow { font-size: 9px; opacity: 0.5; transition: transform 0.2s; }
.auth-lang-switcher.open .auth-lang-arrow { transform: rotate(180deg); }
.auth-lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #1a1a1a;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 8px;
    min-width: 140px;
    display: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}
.auth-lang-switcher.open .auth-lang-dropdown { display: block; }
.auth-lang-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.auth-lang-item .fi { width: 16px; height: 12px; border-radius: 2px; flex-shrink: 0; }
.auth-lang-item:hover { background: rgba(255,255,255,0.07); color: #fff; text-decoration: none; }
.auth-lang-item.active { color: #fff; background: rgba(212,175,55,0.12); }

/* Inner centering wrapper  - no extra background or min-height stacking */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 24px;
    position: relative;
    z-index: 1;
}

#particle-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

.login-card {
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 3.5rem;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.03);
    animation: fadeIn 0.6s ease-out;
    position: relative;
    z-index: 1;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.auth-logo { text-align: center; margin-bottom: 2.5rem; }
.auth-logo img { max-width: 220px; height: auto; }
.auth-page .auth-logo img { filter: brightness(0) invert(1); }
.auth-title { font-size: 1.25rem; font-weight: 500; margin-bottom: 1.5rem; text-align: center; letter-spacing: -0.03em; color: #ffffff; }

/* Dark-theme form overrides (auth pages only) */
.auth-page .form-group label { color: rgba(255,255,255,0.5); }
.auth-page .form-group input:not([type="checkbox"]):not([type="radio"]) {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #ffffff;
    border-radius: 10px;
}
.auth-page .form-group input::placeholder { color: rgba(255,255,255,0.2); }
.auth-page .form-group input:focus {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.28);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.05);
}
.auth-page .toggle-password { color: rgba(255,255,255,0.35); }
.auth-page .toggle-password:hover { color: rgba(255,255,255,0.75); }
.auth-page .btn-primary { background: #ffffff; color: #0a0a0a; border-radius: 10px; }
.auth-page .btn-primary:hover { background: #e8e8e8; box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.auth-page .auth-footer { color: rgba(255,255,255,0.35); }

.auth-footer-minimal {
    padding: 4rem 1rem;
    text-align: center;
    border-top: 1px solid rgba(0,0,0,0.03);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    position: relative;
    z-index: 1;
}

/* Hide footer when modal is open */
#terms-modal ~ .auth-footer-minimal,
body:has(#terms-modal[style*="flex"]) .auth-footer-minimal {
    pointer-events: none;
    opacity: 0.5;
}
.auth-footer-minimal .footer-meta-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.45);
}
.auth-footer-minimal .footer-copyright {
    font-weight: 600;
    color: rgba(255,255,255,0.75);
}
.auth-footer-minimal .footer-divider-line {
    width: 1px;
    height: 12px;
    background: rgba(255,255,255,0.2);
}
.auth-footer-minimal .footer-dev-badge {
    background: rgba(255,255,255,0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(255,255,255,0.55);
}
.auth-footer-minimal .footer-notice {
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    margin: 0;
    max-width: 400px;
    line-height: 1.5;
    text-align: center;
    opacity: 0.8;
}
.auth-page .auth-link { color: rgba(255,255,255,0.7); }
.auth-page .auth-link:hover { color: #ffffff; }
.auth-page .error-message { color: #ff6b6b; }
.auth-page .complexity-notice { color: rgba(255,255,255,0.4); }
.auth-page .complexity-notice.invalid { color: #ff6b6b; }
.auth-page .auth-notice { color: rgba(255,255,255,0.75) !important; }
.auth-page .auth-loader { border-color: rgba(255,255,255,0.1); border-top-color: #ffffff; }
.auth-page .auth-status-text { color: rgba(255,255,255,0.5); }
#app { display: flex; min-height: 100vh; }
.sidebar { 
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px; 
    /* Fade to transparent at bottom to show animation */
    background: linear-gradient(to bottom, #ffffff 50%, rgba(255,255,255,0) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(0, 0, 0, 0.1); 
    display: flex; 
    flex-direction: column; 
    padding: 2.4rem 1.5rem; 
    z-index: 1000;
    box-shadow: 2px 0 13px rgba(0, 0, 0, 0.03);
    overflow: visible; /* Allow logout button to pop out if needed */
}
.sidebar-background-graphic {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 600px; /* Bigger height */
    z-index: -1;
    opacity: 1; /* Full opacity, let the gradient handle subtlety if needed, or keep it visible */
    pointer-events: none;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden; /* Clip the animation here, not the sidebar */
    border-bottom-left-radius: 0;
}
.sidebar-background-graphic::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #ffffff 10%, rgba(255,255,255,0) 80%);
    z-index: 1;
}
.sidebar-background-graphic dotlottie-player {
    width: 100%;
    height: 100%;
    transform: rotate(90deg) scale(2.5); /* Massive scale to cover padding/gaps */
    opacity: 0.8;
}
.logo { padding: 0 0.5rem; margin-bottom: 2.5rem; text-align: center; }
.logo img { max-width: 200px; height: auto; display: inline-block; }
.logo h1 { display: none; }
nav { overflow-y: auto; margin-right: -10px; padding-right: 10px; }
nav::-webkit-scrollbar { width: 4px; }
nav::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 4px; }
nav ul { list-style: none; flex-grow: 1; }
nav li { margin-bottom: 4px; }
nav a { 
    text-decoration: none; 
    color: var(--text-primary); /* Almost black */
    padding: 12px 16px; 
    display: block; 
    border-radius: 6px; 
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); 
    font-weight: 500; /* Not too fat */
    font-size: 0.85rem; /* Slightly smaller for elegance */
    letter-spacing: 0.05em;
    text-transform: uppercase; /* Main uppercase */
}
nav li.active a, nav a:hover { 
    background-color: rgba(0, 0, 0, 0.03); 
    color: #000000; 
    transform: translateX(4px);
}
nav li.active a {
    background-color: #1a1a1a;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(0);
}
.nav-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 24px 16px 8px 16px;
    margin-top: 8px;
}
.nav-item a {
    text-transform: none;
    letter-spacing: normal;
    font-size: 0.9rem;
    padding: 10px 16px;
}
nav li.settings-sub { 
    margin-left: 24px; 
    margin-bottom: 2px; 
    position: relative; 
    padding-left: 12px;
}
/* L-shaped connector */
nav li.settings-sub::before {
    content: '';
    position: absolute;
    left: 0;
    top: -14px; 
    bottom: 50%;
    width: 12px;
    border-left: 1px solid rgba(0,0,0,0.15); /* Thinner, slightly darker line */
    border-bottom: 1px solid rgba(0,0,0,0.15);
    border-bottom-left-radius: 8px; /* Smoother curve */
}
nav li.settings-sub a { 
    padding: 8px 16px; 
    font-size: 0.9rem; 
    color: #4a4a4a;
}
nav li.settings-sub.active a {
    background-color: #1a1a1a;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-weight: 500;
}
.user-profile { 
    margin-top: auto; 
    display: flex; 
    align-items: center; 
    padding: 14px; 
    background: rgba(255, 255, 255, 0.8); 
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    border-radius: 12px; 
    position: relative; 
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

.user-profile:hover { 
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06); 
    transform: translateY(-2px);
}

.avatar-container {
    position: relative;
    margin-right: 12px;
    flex-shrink: 0;
}

.avatar { 
    width: 40px; 
    height: 40px; 
    background: #1d1d1f; 
    color: white; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-weight: 600; 
    font-size: 0.85rem; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); 
}

.logout-btn { 
    position: absolute; 
    top: -8px; 
    right: -8px; 
    width: 22px; 
    height: 22px; 
    background: #000; 
    box-shadow: 2px 2px 8px rgba(0,0,0,0.2); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: white; 
    text-decoration: none; 
    border-radius: 50%; 
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); 
    z-index: 20;
}

.logout-btn:hover {
    background: #333;
    transform: scale(1.1);
    color: white;
}


.status-badge {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 14px;
    height: 14px;
    background: linear-gradient(45deg, #b08d4b 0%, #e6d4a8 50%, #b08d4b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1d1d1f;
    border: 1.5px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.info { flex: 1; min-width: 0; }

.info .name { 
    font-weight: 600; 
    font-size: 0.8rem; 
    line-height: 1.2; 
    color: #1d1d1f; 
    margin-bottom: 1px; 
}

.profile-links { display: flex; align-items: center; gap: 4px; margin-bottom: 4px; }

.edit-profile-link, .logout-link-text { 
    font-size: 0.65rem; 
    color: #86868b; 
    text-decoration: none; 
    transition: color 0.2s; 
    font-weight: 500; 
}
.edit-profile-link:hover, .logout-link-text:hover { color: #000; }
.profile-links .separator { font-size: 0.65rem; color: #86868b; opacity: 0.5; }

.credits-label {
    font-size: 0.55rem;
    font-weight: 700;
    color: #574922; /* Dark Brown to match value */
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 6px;
    line-height: 1;
}


.user-meta-row { 
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}


.credits-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    min-height: 24px;
    height: auto;
    border-radius: 28px;
    transition: all 0.2s ease;
    border: 1px solid rgba(0,0,0,0.05);
    min-width: fit-content;
}

.credits-chip.gold-gradient {
    background: linear-gradient(45deg, #b08d4b 0%, #e6d4a8 50%, #b08d4b 100%);
    box-shadow: 0 2px 8px rgba(176, 141, 75, 0.2);
}

.credits-chip .value {
    font-size: 0.7rem;
    font-weight: 700;
    color: #574922;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.credits-badge-large {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    padding: 15px 25px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(176, 141, 75, 0.2);
    border: 1px solid rgba(176, 141, 75, 0.1);
}
.credits-badge-large .value {
    font-size: 2.2rem;
    font-weight: 800;
    color: #574922;
    line-height: 1;
}
.credits-badge-large .label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #574922;
    opacity: 0.9;
    text-transform: lowercase;
}


.plan-card-visual {
    background: #f5f5f7;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.plan-card-visual.gold-variant {
    background: linear-gradient(135deg, #b08d4b 0%, #e6d4a8 50%, #b08d4b 100%);
    box-shadow: 0 8px 24px rgba(176, 141, 75, 0.2);
    border: none;
}

.plan-visual-icon {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1d1d1f;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    flex-shrink: 0;
}

.plan-visual-icon svg { width: 24px; height: 24px; }

.plan-visual-info { flex: 1; }

.plan-visual-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #86868b;
    display: block;
    margin-bottom: 2px;
}

.plan-card-visual.gold-variant .plan-visual-label { color: rgba(29, 29, 31, 0.6); }

.plan-visual-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1d1d1f;
    line-height: 1.2;
}

.plan-status-pill {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #f5f5f7;
    color: #86868b;
    margin-top: 4px;
}

.plan-status-pill.status-active {
    background: #e8f5e9;
    color: #2e7d32;
}

.plan-status-pill.status-past-due {
    background: #fff4e5;
    color: #c05621;
}




/* Gold gradient on credits navigation active state */
.credits nav li.active a:hover {
    background: linear-gradient(45deg, #b08d4b 0%, #e6d4a8 50%, #b08d4b 100%) !important;
    color: #1a1a1a;
}
.content { flex-grow: 1; padding: 2rem 3rem; margin-left: 280px; width: calc(100% - 280px); position: relative; }
header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
header h2 { font-size: 1.5rem; font-weight: 400; letter-spacing: 0.02em; text-transform: uppercase; }
.store-name-highlight {
    text-transform: none;
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.9em;
}
.grid > div { margin-top: 20px; }
.content-filters { display: flex; gap: 1.5rem; margin-bottom: 2rem; padding: 1.5rem 0 0 0; border-radius: 12px; box-shadow: var(--shadow-sm); align-items: flex-end; flex-wrap: wrap; }
.filter-group { display: flex; flex-direction: column; gap: 0.5rem; }
.filter-group label { font-size: 0.8rem; font-weight: 500; color: var(--text-muted); }
.filter-group select, .filter-group input { padding: 0.6rem 2.5rem 0.6rem 1rem; border: 1px solid var(--border-color); border-radius: 8px; font-size: 0.9rem; min-width: 180px; }
.filter-group.search-group { flex-grow: 1; }
.filter-group.search-group input { width: 100%; }
.filter-important select { border-color: #000000 !important; font-weight: 600; box-shadow: 0 0 0 1px rgba(0,0,0,0.05); }
.filter-important label { color: #000000 !important; font-weight: 700; }

/* Stats and Cards */
/* Dashboard Refinement */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-bottom: 2.5rem; }

/* Minimalist Dashboard */
.stat-card { 
    background: #fff; 
    padding: 1.25rem; 
    border-radius: 12px; 
    border: 1px solid #f0f0f0; 
    position: relative; 
    transition: var(--transition-smooth);
    min-height: auto;
}

.stat-card:hover { border-color: #e0e0e0; }
.stat-card::before { display: none; }

.stat-card h3 { 
    font-size: 0.7rem; 
    color: #888; 
    text-transform: uppercase; 
    letter-spacing: 0.05em; 
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.stat-card .value { 
    font-size: 1.75rem; 
    font-weight: 600; 
    color: #1a1a1a;
    line-height: 1.2;
}

.stat-icon { display: none; }

/* Credits Card - Subtle highlight */
.stat-card.gold-variant { background: #fff !important; border: 1px solid #d4af37 !important; }
.stat-card.gold-variant .value { color: #d4af37 !important; }

/* Available Credits Variant */
.stat-card.gold-variant {
    background: linear-gradient(135deg, #d4af37 0%, #f9e29c 100%) !important;
    border: none !important;
}
.stat-card.gold-variant h3 { color: rgba(29, 29, 31, 0.5) !important; }
.stat-card.gold-variant .value { color: #1d1d1f !important; }
.stat-card.gold-variant .stat-icon { filter: none; opacity: 0.25; color: #1d1d1f; }
.stat-card.gold-variant::before { background: linear-gradient(135deg, #fff 0%, transparent 70%); opacity: 0.2; }

.dashboard-section { width: 100%; margin-bottom: 1.5rem; }

.chart-card { background: #fff; padding: 1.5rem; border-radius: 12px; border: 1px solid #f0f0f0; display: flex; flex-direction: column; }
.chart-card h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 1.5rem; color: #1a1a1a; flex-shrink: 0; }
.chart-container { height: 350px; width: 100%; position: relative; }

/* Minimal Activity List */
.scrollable-activity { 
    max-height: 400px; 
    overflow-y: auto; 
    padding-right: 8px;
}
.scrollable-activity::-webkit-scrollbar { width: 4px; }
.scrollable-activity::-webkit-scrollbar-thumb { background: #f0f0f0; border-radius: 4px; }

.activity-list { display: flex; flex-direction: column; }
.activity-item { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 0.85rem 0; 
    border-bottom: 1px solid #f5f5f5; 
}
.activity-item:last-child { border-bottom: none; }

.activity-content { flex: 1; }
.activity-title { font-size: 0.85rem; font-weight: 500; color: #1a1a1a; margin: 0; }
.activity-meta { font-size: 0.7rem; color: #999; display: flex; align-items: center; gap: 0.5rem; margin-top: 2px; }
.activity-status { background: none !important; padding: 0 !important; color: #999 !important; font-weight: 400 !important; text-transform: none !important; letter-spacing: normal !important; }

.activity-time { text-align: right; font-size: 0.7rem; color: #bbb; min-width: 60px; margin-left: 1rem; }
.credits-spent { color: #d4af37 !important; font-weight: 500; }

.activity-footer { 
    margin-top: 1rem; 
    padding-top: 1rem; 
    border-top: 1px solid #f5f5f5; 
    display: flex; 
    justify-content: center; 
}

.btn-more { 
    background: #1a1a1a; 
    color: #fff; 
    border: none; 
    padding: 10px 32px; 
    border-radius: 8px; 
    font-size: 0.75rem; 
    font-weight: 700; 
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.btn-more:hover { 
    background: #000; 
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.stat-card.items { padding: 0; }
.store-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.5rem; }
.icon-btn { background: none; border: none; padding: 4px; cursor: pointer; color: var(--text-primary); transition: var(--transition-smooth); display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); background-color: rgba(33, 34, 38, 0.05); }
.icon-btn:hover { background-color: rgba(33, 34, 38, 0.8); color: var(--white); }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; margin-bottom: 2rem; }
.settings-column h4, .settings-section h4 { font-size: 1rem; font-weight: 600; margin-bottom: 1.5rem; color: var(--text-primary); border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem; }
.form-row { display: flex; gap: 1.5rem; }
.form-group.half { flex: 1; }
.mb-3 { margin-bottom: 1rem; }
.settings-section { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border-color); }
.section-header { margin-bottom: 1rem; }

/* Form Elements */
select { width: 100%; padding: 1rem 1.25rem; background: rgba(33, 34, 38, 0.02); border: 1px solid rgba(33, 34, 38, 0.08); border-radius: var(--radius-md); color: var(--text-primary); font-family: var(--font-main); font-size: 1rem; transition: var(--transition-smooth); appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' 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 1.25rem center; background-size: 1.25rem; }
select:focus { outline: none; border-color: var(--text-primary); background-color: #FFFFFF; box-shadow: 0 0 0 4px rgba(33, 34, 38, 0.05); }

.table-container { background-color: var(--card-bg); border-radius: var(--radius-md); border: 1px solid var(--border-color); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 1rem; background-color: rgba(33, 34, 38, 0.02); color: var(--text-muted); font-size: 0.85rem; border-bottom: 1px solid var(--border-color); }
td { padding: 1rem; border-bottom: 1px solid var(--border-color); font-size: 0.9rem; }
.badge { padding: 0.25rem 0.6rem; border-radius: 1rem; font-size: 0.6rem; font-weight: 600; background-color: rgba(0, 0, 0, 0.05); color: var(--text-primary); }
.badge-success { background-color: rgba(52, 168, 83, 0.1); color: var(--success); }
.badge-warning { background-color: rgba(251, 188, 5, 0.1); color: var(--accent-yellow); }
.badge-secondary { background-color: #f1f3f4; color: #5f6368; border: 1px solid #dadce0; }
.badge-info { background-color: #e8f0fe; color: #1967d2; border: 1px solid #1967d2; }
.badge-primary { background-color: #1a1a1a; color: #ffffff; }
.badge-dark { background-color: #3c4043; color: #ffffff; }
.badge-outline-primary { background: transparent; border: 1px solid #1967d2; color: #1967d2; }
.form-group { margin-bottom: 2rem; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 0.75rem; letter-spacing: 0.01em; }
.form-group input:not([type="checkbox"]):not([type="radio"]) { width: 100%; padding: 1rem 1.25rem; background: rgba(33, 34, 38, 0.02); border: 1px solid rgba(33, 34, 38, 0.08); border-radius: var(--radius-md); color: var(--text-primary); font-family: var(--font-main); font-size: 1rem; transition: var(--transition-smooth); }
.form-group input[type="checkbox"], .form-group input[type="radio"] { width: auto; height: auto; cursor: pointer; }
.form-group input:focus { outline: none; border-color: var(--text-primary); background: #FFFFFF; box-shadow: 0 0 0 4px rgba(33, 34, 38, 0.05); }
.password-wrapper { position: relative; }
.toggle-password { position: absolute; right: 1.25rem; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; padding: 0.25rem; transition: var(--transition-smooth); }
.toggle-password:hover { color: var(--text-primary); }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 1rem 2rem; font-family: var(--font-main); font-weight: 500; font-size: 1rem; border-radius: var(--radius-md); cursor: pointer; transition: var(--transition-smooth); border: none; gap: 0.75rem; letter-spacing: 0.01em; }
.btn.wide { width: 100%; }
.btn-primary { background: var(--text-primary); color: #FFFFFF; }
.btn-secondary { background: rgba(33, 34, 38, 0.05); color: var(--text-primary); }
.btn-outline-secondary { background: transparent; border: 1px solid var(--border-color); color: var(--text-primary); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.8rem; }
.btn-primary:hover { background: #000000; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); }
.btn-secondary:hover { background: rgba(33, 34, 38, 0.1); }
.btn-outline-secondary:hover { background: rgba(33, 34, 38, 0.05); }
.btn-block { width: 100%; }
.auth-footer { text-align: center; font-size: 0.8rem; color: var(--text-secondary); font-weight: 400; }
.auth-link { color: var(--accent-blue); text-decoration: none; font-weight: 500; transition: var(--transition-smooth); }
.auth-link:hover { text-decoration: underline; }
.error-message { color: var(--accent-red); font-size: 0.875rem; margin-top: 1.25rem; text-align: center; }
.auth-success-box { background: rgba(52, 168, 83, 0.05); border: 1px solid rgba(52, 168, 83, 0.1); border-radius: var(--radius-md); padding: 2rem; margin-top: 2rem; text-align: center; display: none; }
.auth-success-title { color: var(--accent-green); font-weight: 600; margin-bottom: 0.75rem; font-size: 1.125rem; }
.auth-success-text { font-size: 1rem; color: var(--text-secondary); }
.complexity-notice { font-size: 0.8125rem; color: var(--text-muted); margin-top: 0.75rem; transition: var(--transition-smooth); opacity: 0; height: 0; overflow: hidden; }
.complexity-notice.visible { opacity: 1; height: auto; margin-bottom: 0.75rem; }
.complexity-notice.invalid { color: var(--accent-red); }
/* Modal styles moved to bottom */
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.close-modal { background: none; border: none; font-size: 1.75rem; cursor: pointer; color: var(--text-muted); line-height: 1; padding: 0.5rem; transition: var(--transition-smooth); display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.close-modal:hover { background-color: rgba(33, 34, 38, 0.05); color: var(--text-primary); }
.auth-tabs { display: flex; gap: 1rem; margin-bottom: 2rem; border-bottom: 1px solid var(--border-color); }
.auth-tab { padding: 0.75rem 1rem; background: none; border: none; border-bottom: 2px solid transparent; color: var(--text-muted); cursor: pointer; font-family: var(--font-main); font-weight: 500; transition: var(--transition-smooth); }
.auth-tab.active { color: var(--text-primary); border-bottom-color: var(--text-primary); }
.auth-tab-or { display: flex; align-items: center; color: var(--text-muted); font-size: 0.8rem; padding-bottom: 2px; }
.dashboard-empty-state { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(4px); z-index: 100; display: flex; align-items: center; justify-content: center; text-align: center; }
.empty-state-content { background: var(--bg-surface); padding: 3rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-glow); max-width: 400px; border: var(--border-subtle); line-height: 1.5em; }
.empty-state-content h2 { margin-bottom: 1rem; font-size: 1.5rem; }
.empty-state-content p { color: var(--text-secondary); font-size: 1.1rem; margin-bottom: 2rem; }
.view { position: relative; min-height: 400px; }
.auth-status-container { text-align: center; margin-top: 2.5rem; min-height: 150px; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.auth-loader { border: 4px solid rgba(33, 34, 38, 0.05); border-top: 4px solid var(--text-primary); border-radius: 50%; width: 48px; height: 48px; animation: spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite; margin-bottom: 2rem; }
.auth-status-text { font-size: 1.125rem; color: var(--text-secondary); }
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.modal-content.modal-sm { max-width: 400px; }
.text-center { text-align: center; }
.text-danger { color: var(--accent-red); }
.btn-danger { background-color: var(--accent-red); color: #FFFFFF; }
.btn-danger:hover { background-color: #d32f2f; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(234, 67, 53, 0.2); }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.banner-card { background: #f8f9fa; padding: 1rem 1.5rem; }
.score-badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.score-high { background: #e6f4ea; color: #1e7e34; }
.score-mid { background: #fff4e5; color: #b45d00; }
.score-low { background: #fce8e6; color: #d93025; }
.view-badge { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 4px; background: #f1f3f4; font-size: 10px; margin-right: 4px; cursor: help; border: 1px solid #dadce0; }
.view-badge.active { background: #e8f0fe; border-color: #1967d2; color: #1967d2; }
.product-row-expanded { background: #f8f9fa; }
.expanded-content { padding: 1.5rem; }
.view-details-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.view-detail-card { background: white; border: 1px solid #dadce0; border-radius: 8px; padding: 1rem; }
.floating-pagination { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); border-radius: 100px; padding: 12px 32px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08); z-index: 1000; display: flex; align-items: center; gap: 20px; transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.floating-pagination:hover { background: rgba(0, 0, 0, 0.75); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12); bottom: 35px; }
.floating-pagination .pagination-info { font-size: 14px; color: var(--white); font-weight: 500; white-space: nowrap; }
.floating-pagination .btn { border-radius: 50px; padding: 6px 16px; font-size: 13px; font-weight: 500; border: none; background: rgba(40, 40, 40, 0.5); color: var(--white); transition: all 0.2s ease; }
.floating-pagination .btn:hover { background: rgba(0, 0, 0, 0.08); transform: translateY(-1px); }
.floating-pagination .btn-primary { background: var(--primary-color); color: var(--text-primary); }
.floating-pagination .btn-primary:hover { background: var(--primary-color); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); }
.sortable { cursor: pointer; user-select: none; transition: background 0.2s; }
.sortable:hover { background: rgba(0, 0, 0, 0.02); }
.sort-icon { font-size: 0.8em; margin-left: 5px; opacity: 0.3; }
.store-card { background: white; border: 1px solid #dadce0; border-radius: 12px; padding: 1.5rem; transition: all 0.3s ease; display: flex; flex-direction: column; justify-content: space-between; }
.store-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); border-color: var(--primary-color); }
.store-card h3 { margin: 0 0 0.5rem 0; font-size: 1.25rem; }
.store-card .store-url { color: #5f6368; font-size: 0.875rem; margin-bottom: 1.5rem; display: block; }
.store-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.stat-item { background: #f8f9fa; padding: 0.75rem; border-radius: 8px; text-align: center; }
.stat-label { display: block; font-size: 0.75rem; color: #5f6368; margin-bottom: 0.25rem; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-value { font-weight: 600; font-size: 1.125rem; }

/* ============================================
   TRANSLATION COVERAGE DASHBOARD (Phase 10)
   ============================================ */
.translation-coverage-section { margin-top: 2rem; margin-bottom: 2rem; }
.translation-coverage-section h3 { font-size: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); }

.coverage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.coverage-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: box-shadow 0.2s;
}
.coverage-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.06); }

.coverage-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}
.coverage-store-name { font-size: 0.95rem; font-weight: 600; margin: 0 0 2px 0; }

/* Language Distribution Badges */
.lang-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.lang-detect-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(33,34,38,0.06);
    border: 1px solid rgba(33,34,38,0.10);
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: default;
}
.lang-flag { font-weight: 700; color: var(--text-primary); }
.lang-count { color: var(--text-muted); font-weight: 500; }

/* Inline language badge used on table rows */
.language-badge, .lang-badge {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    background: rgba(33,34,38,0.06);
    border: 1px solid rgba(33,34,38,0.10);
    margin-left: 4px;
    vertical-align: middle;
}
.lang-badge-unknown { background: #f3f4f6; color: #9ca3af; border-color: #e5e7eb; }
.lang-badge-mismatch { background: #fef3c7; color: #92400e; border-color: #fde68a; } /* source lang ≠ target */
.lang-badge-ok { background: #d1fae5; color: #065f46; border-color: #a7f3d0; } /* matches target */

/* Untranslated content breakdown rows */
.coverage-untranslated { border-top: 1px solid var(--border-color); padding-top: 0.75rem; }

.coverage-type-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-radius: 6px;
    transition: background 0.15s;
    font-size: 0.85rem;
}
.coverage-type-row:hover { background: rgba(33,34,38,0.04); padding-left: 6px; margin-left: -6px; }
.coverage-type-icon { font-size: 1rem; }
.coverage-type-label { flex: 1; font-weight: 500; }
.coverage-type-count { font-weight: 700; min-width: 28px; text-align: right; }
.coverage-type-arrow { color: var(--text-muted); font-size: 0.8rem; }

.coverage-all-good { padding-top: 0.5rem; }

/* Coverage scan row */
.coverage-scan-row small { font-size: 0.75rem; }

/* btn-xs utility */
.btn-xs { padding: 3px 8px; font-size: 0.72rem; border-radius: 4px; }

.view-section { padding-bottom: 120px; }

/* ============================================
   BULK ACTION BAR
   ============================================ */

/* Page Guide / Instructions Card */
.page-guide-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.page-guide-card::before {
    content: "💡";
    position: absolute;
    right: -20px;
    top: -20px;
    font-size: 120px;
    opacity: 0.04;
    transform: rotate(15deg);
    pointer-events: none;
    user-select: none;
}
.btn-close-guide {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    line-height: 1;
    transition: color 0.2s;
    z-index: 2;
}
.btn-close-guide:hover {
    color: #4a5568;
}
.page-guide-card.hidden {
    display: none;
}
.guide-content {
    position: relative;
}
.guide-description {
    color: #1a1a1b;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}
.guide-steps {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
}
.guide-steps.expanded {
    max-height: 2000px;
    transition: max-height 1s ease-in-out;
}
.guide-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}
.guide-list li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #45474d;
    line-height: 1.6;
}
.guide-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #b08d4b;
    font-weight: bold;
}
.btn-toggle-guide {
    background: none;
    border: none;
    color: #b08d4b;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
    margin-top: 5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.btn-toggle-guide:hover {
    text-decoration: underline;
}
.bulk-action-bar { 
    position: fixed; 
    bottom: 30px; 
    left: 50%; 
    transform: translateX(-50%); 
    background: linear-gradient(45deg, #b08d4b 0%, #e6d4a8 50%, #b08d4b 100%); 
    backdrop-filter: blur(20px) saturate(180%); 
    -webkit-backdrop-filter: blur(20px) saturate(180%); 
    border: 1px solid rgba(176, 141, 75, 0.4); 
    border-radius: 100px; 
    padding: 12px 32px; 
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08); 
    z-index: 1001; 
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); 
    max-width: 90%; 
}

.bulk-action-bar:hover { 
    background: linear-gradient(45deg, #c49d5b 0%, #f0e4b8 50%, #c49d5b 100%); 
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15); 
    bottom: 35px; 
}

/* Content Layout */
.bulk-action-content { 
    display: flex; 
    align-items: center; 
    gap: 24px; 
    flex-wrap: wrap; 
}

/* Selection Info */
.bulk-selection-info { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    font-size: 14px; 
    font-weight: 500; 
    color: #1d1d1f; 
    white-space: nowrap; 
}

.bulk-selection-info input[type="checkbox"] { 
    display: none; 
}

/* Engraved Circle Badge for Count */
.selection-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 50px;
    font-weight: 700;
    font-size: 15px;
    color: rgba(0, 0, 0, 0.8);
    box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.3), 
                inset -1px -1px 2px rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
}

.selection-text {
    font-weight: 500;
    color: #1d1d1f;
}

/* Clear Button */
.bulk-selection-info .clear-btn { 
    background: rgba(0, 0, 0, 0.7); 
    border: 1px solid rgba(0, 0, 0, 0.3); 
    color: #ffffff; 
    cursor: pointer; 
    padding: 6px 14px; 
    font-size: 13px; 
    border-radius: 50px;
    font-weight: 600; 
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.bulk-selection-info .clear-btn:hover { 
    background: #000000;
    border-color: #000000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Legacy btn-link support (remove if not used elsewhere) */
.bulk-selection-info .btn-link { 
    background: none; 
    border: none; 
    color: #1a1a1a; 
    cursor: pointer; 
    padding: 0; 
    font-size: 14px; 
    text-decoration: none; 
    font-weight: 600; 
}

.bulk-selection-info .btn-link:hover { 
    text-decoration: underline; 
}

/* Action Buttons Container */
.bulk-actions { 
    display: flex; 
    gap: 8px; 
    flex-wrap: wrap; 
}

/* Individual Action Buttons */
.bulk-actions .btn { 
    border-radius: 50px; 
    padding: 8px 16px; 
    font-size: 13px; 
    font-weight: 600; 
    border: 1px solid rgba(0, 0, 0, 0.2); 
    background: #1a1a1a; 
    color: #ffffff; 
    transition: all 0.2s ease; 
    display: inline-flex; 
    align-items: center; 
    gap: 6px; 
    white-space: nowrap; 
}

.bulk-actions .btn:hover { 
    background: #000000; 
    border-color: #000000; 
    transform: translateY(-2px); 
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3); 
}

.bulk-actions .btn.btn-success { 
    background: #1a1a1a; 
    border-color: rgba(0, 0, 0, 0.3); 
}

.bulk-actions .btn.btn-success:hover { 
    background: #000000; 
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4); 
}

.bulk-actions .btn svg { 
    flex-shrink: 0; 
}

/* Product Checkbox */
.product-checkbox { 
    width: 18px; 
    height: 18px; 
    cursor: pointer; 
    accent-color: #1a1a1a; 
}
.product-tabs { 
    display: flex; 
    gap: 4px; 
    margin-bottom: 24px; 
    background: #ffffff; /* White background */
    padding: 4px; 
    border-radius: 8px; /* Slightly tighter container radius */
    width: fit-content;
    border: 1px solid rgba(0,0,0,0.1); /* Slightly more visible border */
}
.tab-btn { 
    background: none; 
    border: none; 
    padding: 12px 28px; /* Slightly larger padding */
    font-size: 1rem; /* Bigger text */
    font-weight: 500; 
    color: #6e6e73; 
    cursor: pointer; 
    border-radius: 6px; 
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); 
    display: inline-flex; 
    align-items: center; 
    gap: 10px; /* More gap for bigger text */
    position: relative; 
    top: 0;
}
.tab-btn svg { opacity: 0.7; transition: opacity 0.2s; width: 18px; height: 18px; /* Slightly bigger icon */ }
.tab-btn:hover { 
    color: #1d1d1f; 
    background: rgba(0,0,0,0.04);
}
.tab-btn:hover svg { opacity: 1; }
.tab-btn.active { 
    color: #ffffff; 
    background: #000000; 
    box-shadow: 0 4px 4px rgba(0,0,0,0.15); 
    font-weight: 500;
    transform: scale(1); 
    border-bottom: none;
}
.tab-btn.active svg { 
    opacity: 1; 
    color: #eae0c5; /* Gold icon */
}
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Selection Dropdown */
/* Selection Dropdown */
.selection-header .dropdown {
    position: relative;
}

.selection-header .dropdown-toggle {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    padding: 6px 10px !important;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.selection-header .dropdown-toggle:hover,
.selection-header .dropdown.show .dropdown-toggle {
    background: rgba(0,0,0,0.05);
    color: var(--text-primary);
}

.selection-header .dropdown-toggle::after {
    display: none;
}

.selection-header .dropdown-menu {
    display: none;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 10px;
    padding: 6px;
    min-width: 180px;
    margin-top: 8px;
    left: 0;
    background: #ffffff;
    animation: dropdownFadeIn 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.selection-header .dropdown.show .dropdown-menu {
    display: block;
}

.selection-header .dropdown-item {
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    transition: all 0.1s;
}

.selection-header .dropdown-item i {
    width: 20px;
    text-align: center;
    margin-right: 10px;
    font-size: 1rem;
    opacity: 0.7;
}

.selection-header .dropdown-item:hover {
    background: var(--bg-dark);
    color: var(--text-primary);
    transform: translateX(2px);
}

.selection-header .dropdown-item.text-danger {
    color: var(--danger);
}

.selection-header .dropdown-item.text-danger:hover {
    background: #fff5f5;
    color: #c53030 !important;
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.selection-header .custom-control {
    display: none; /* Hide original checkbox container */
}

.editable-cell { position: relative; cursor: text; padding: 8px; border-radius: 4px; transition: background 0.2s; }
.editable-cell:hover { background: rgba(0, 113, 227, 0.05); }
.editable-cell:hover::after { content: '✏️'; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 12px; opacity: 0.5; }
.editable-cell.editing { background: #fff; box-shadow: 0 0 0 2px #0071e3; }
.editable-cell input { width: 100%; border: none; background: none; padding: 0; font-size: inherit; font-family: inherit; }
.editable-cell input:focus { outline: none; }
.cat-keyword-cell .cell-value { color: #1a73e8; border-bottom: 1px dashed #1a73e8; cursor: pointer; display: inline-block; min-width: 60px; min-height: 18px; font-size: 12px; }
.tooltip-icon { cursor: help; opacity: 0.5; margin-left: 4px; font-size: 14px; }

/* Stat savings sub-line */
.stat-savings {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.67rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #d4af37;
}

/* Tooltip trigger icon */
.tooltip-trigger { cursor: help; opacity: 0.35; margin-left: 4px; font-size: 11px; font-style: normal; user-select: none; transition: opacity 0.15s; vertical-align: middle; }
.tooltip-trigger:hover { opacity: 0.75; }

/* Tooltip bubble */
.tooltip-bubble {
    position: fixed; z-index: 9999; max-width: 280px;
    background: #1a1a1a; color: #f0f0f0; border-radius: 10px;
    padding: 11px 14px; font-size: 0.775rem; line-height: 1.55;
    box-shadow: 0 8px 30px rgba(0,0,0,0.28);
    pointer-events: none; opacity: 0; transition: opacity 0.15s ease;
}
.tooltip-bubble.visible { opacity: 1; }
.tooltip-bubble code { background: rgba(255,255,255,0.15); border-radius: 3px; padding: 1px 5px; font-size: 0.73rem; }
.tooltip-bubble em { color: #f0c040; font-style: normal; font-weight: 500; }
.info-card { background: #f8f9fa; border: 1px solid #e0e0e0; border-radius: 8px; padding: 20px; height: 100%; }
.info-icon { font-size: 32px; margin-bottom: 10px; }
.info-card h5 { font-size: 16px; font-weight: 600; margin-bottom: 10px; }
.info-card ul { margin: 0; padding-left: 20px; }
.sync-controls .form-group label { font-weight: 500; margin-bottom: 8px; }
@media (max-width: 992px) {
    .view-details-grid { grid-template-columns: 1fr 1fr; }
    .bulk-action-bar { 
        bottom: 0 !important; 
        left: 0 !important; 
        right: 0 !important; 
        transform: none !important; 
        width: 100% !important; 
        max-width: 100% !important; 
        border-radius: 0 !important; 
        padding: 8px 12px !important; 
        border-left: none !important; 
        border-right: none !important; 
        border-bottom: none !important; 
    }
}

@media (max-width: 768px) {
    .content-filters { flex-direction: column; align-items: stretch; }
    .filter-group { width: 100%; }
    .filter-group select, .filter-group input { width: 100%; }
    .view-details-grid { grid-template-columns: 1fr; }
    .data-table th, .data-table td {
        white-space: normal !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
        min-width: 100px;
    }
    .data-table th.selection-header, .data-table td:first-child {
        min-width: 50px !important;
        width: 50px !important;
    }
    .data-table th:nth-child(2), .data-table td:nth-child(2) {
        min-width: 150px !important;
    }
    .floating-pagination { width: 90%; padding: 10px 20px; gap: 10px; }
    .floating-pagination .pagination-info { display: none; }

    .bulk-action-content { gap: 16px; }
    .bulk-selection-info span { display: none; }
    .bulk-actions .btn { padding: 6px 12px; font-size: 12px; }
    .bulk-actions .btn svg { width: 14px; height: 14px; }
    .product-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 4px; }
    .tab-btn { padding: 10px 16px; font-size: 13px; white-space: nowrap; }
    .tab-btn svg { width: 14px; height: 14px; }
}


.sync-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; }
.sync-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.sync-attributes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; max-height: 400px; overflow-y: auto; padding: 1rem; background: rgba(33, 34, 38, 0.02); border-radius: 8px; }
.info-item { display: flex; gap: 1rem; }
.info-item-icon { font-size: 1.5rem; flex-shrink: 0; }
.info-item-text h6 { margin-bottom: 0.25rem; font-size: 0.9rem; font-weight: 600; }
.info-item-text p { margin: 0; line-height: 1.4; }
.card-header { margin-bottom: 1.5rem; }
.card-header h3, .card-header h4 { margin-bottom: 0.25rem; }
.cursor-pointer { cursor: pointer; }
.border-top { border-top: 1px solid var(--border-color); }
.pt-4 { padding-top: 1.5rem; }
.btn-lg { padding: 1rem 2.5rem; font-size: 1.1rem; }
@media (max-width: 1200px) { .sync-layout { grid-template-columns: 1fr; } .sync-side-content { order: -1; } }
@media (max-width: 768px) { .sync-settings-grid { grid-template-columns: 1fr; } }
.sync-attr-item { padding: 0.5rem; border-radius: 6px; transition: var(--transition-smooth); }
.sync-attr-item:hover { background: rgba(33, 34, 38, 0.05); }
.cursor-pointer { cursor: pointer; }
.mb-0 { margin-bottom: 0; }
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); z-index: 1100; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(10px); opacity: 0; visibility: hidden; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.modal-content { background: var(--card-bg); padding: 2.5rem; border-radius: 24px; box-shadow: 0 30px 60px rgba(0,0,0,0.15); max-width: 750px; width: 90%; position: relative; border: 1px solid rgba(255,255,255,0.1); }
.modal-sm { max-width: 400px; }
.modal-lg { max-width: 1000px; }
.banner-card { border: none !important; box-shadow: 0 10px 30px rgba(0,0,0,0.25); background: linear-gradient(135deg, #1a1a1a 0%, #3a3a3a 50%, #2a2a2a 100%) !important; overflow: hidden; border-radius: 20px; padding: 1.5rem 2rem; color: #fff !important; }
.banner-card h4, .banner-card p, .banner-card span { color: #fff !important; }
.banner-card .text-muted { color: rgba(255,255,255,0.6) !important; }
.progress-bar-container { background: rgba(255,255,255,0.15); height: 10px; border-radius: 10px; overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,0.3); }
.progress-bar-fill { background: linear-gradient(90deg, var(--primary-color), #4facfe); height: 100%; transition: width 0.8s cubic-bezier(0.65, 0, 0.35, 1); border-radius: 10px; }
.font-weight-bold { font-weight: 700; }
.mt-1 { margin-top: 0.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-4 { margin-bottom: 1.5rem; }
.d-flex { display: flex !important; gap: 15px; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.align-items-center { align-items: center !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.gap-2 { gap: 0.5rem !important; }
.text-muted { color: var(--text-muted) !important; }
.small { font-size: 0.85rem !important; }
@keyframes modalFadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.modal.active { opacity: 1; visibility: visible; }
.modal.active .modal-content { animation: modalFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 10000; display: none; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.modal-overlay.active { display: flex; }

/* SEO Comparison Modal Styles */
.seo-comparison-container {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
}

.comparison-row {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.comparison-row:last-child {
    border-bottom: none;
}

.card.border-primary {
    border-color: var(--primary) !important;
    background: rgba(0, 113, 227, 0.02);
}

.copy-btn {
    font-size: 0.75rem;
    padding: 2px 8px;
}

.btn-xs {
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

.text-monospace {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9em;
}

/* System Template Border (Gold) */
.card.border-warning {
    border-color: #d4af37 !important; /* Premium Gold */
    background: rgba(212, 175, 55, 0.05);
}

/* Premium Gold Button */
.btn-gold {
    background: linear-gradient(135deg, #d4af37 0%, #c5a028 100%);
    border: none;
    color: white;
    box-shadow: 0 2px 4px rgba(212, 175, 55, 0.2);
    transition: all 0.3s ease;
}

.btn-gold:hover {
    background: linear-gradient(135deg, #e5c14d 0%, #d4af37 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(212, 175, 55, 0.3);
    color: white;
}

.data-table .fi { margin-right: 5px; }

/* ------------------------------------------------------------------
   Template Editor Styles (Migrated from Inline)
   ------------------------------------------------------------------ */

:root {
    --apple-bg: #F8F9FC; /* Adjusted to match --bg-dark */
    --apple-card-bg: #FFFFFF;
    --apple-text: #1d1d1f;
    --apple-text-secondary: #86868b;
    --apple-primary: #0071e3;
    --apple-primary-hover: #0077ed;
    --apple-border: #d2d2d7;
    --apple-input-bg: #FAFAFC; /* Slightly lighter than main bg */
    --apple-focus-ring: rgba(0, 113, 227, 0.2);
    --apple-danger: #ff3b30;
}

.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Typography */
.page-title {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #1d1d1f;
}

.section-title {
    font-size: 19px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0;
}

.section-subtitle {
    font-size: 13px;
    color: var(--apple-text-secondary);
    margin-top: 4px;
    margin-bottom: 0;
}

.input-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    color: var(--apple-text-secondary);
    margin-bottom: 8px;
    display: block;
}

.input-hint {
    font-size: 13px;
    color: var(--apple-text-secondary);
    margin-top: 6px;
}

/* Cards */
.apple-card {
    background: var(--apple-card-bg);
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.04);
    overflow: hidden;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.02);
    padding-top: 18px;
}

.card-header-clean {
    padding: 24px 32px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    background: rgba(255,255,255,0.8);
    backdrop-filter: saturate(180%) blur(20px);
}

.card-body-clean {
    padding: 32px;
}

.bg-alt {
    background-color: rgba(245, 245, 247, 0.5);
}

/* Inputs */
.apple-input {
    background: var(--apple-input-bg);
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 17px;
    color: var(--apple-text);
    transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
    box-shadow: none !important;
}

.apple-input:focus {
    background: #FFFFFF;
    border-color: var(--apple-primary);
    box-shadow: 0 0 0 4px var(--apple-focus-ring) !important;
}

.apple-input::placeholder {
    color: #a1a1a6;
}

/* Buttons */
.btn-primary-apple {
    background: var(--apple-primary);
    color: white;
    border: none;
    border-radius: 980px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: all 0.2s ease;
}

.btn-primary-apple:hover {
    background: var(--apple-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,113,227,0.3);
}

.btn-secondary-apple {
    background: rgba(0,113,227,0.1);
    color: var(--apple-primary);
    border: none;
    border-radius: 980px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-secondary-apple:hover {
    background: rgba(0,113,227,0.15);
    color: var(--apple-primary-hover);
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #d2d2d7;
    background: white;
    color: var(--apple-text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: #f5f5f7;
    border-color: #c7c7cc;
}

.btn-link-apple {
    color: var(--apple-primary);
    font-weight: 500;
    text-decoration: none;
    font-size: 14px;
}
.btn-link-apple:hover {
    text-decoration: underline;
}

.btn-danger-icon {
    color: #86868b;
    background: transparent;
    border: none;
    font-size: 16px;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
}
.btn-danger-icon:hover {
    color: var(--apple-danger);
    background: rgba(255, 59, 48, 0.1);
}

/* Rules List */
.rules-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rule-row {
    background: white;
    border-radius: 14px;
    padding: 16px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.rule-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.06);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
    line-height: 1;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state p {
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* System Badge */
.system-badge {
    background: #fff3cd;
    color: #856404;
    font-weight: 600;
    font-size: 11px;
    padding: 6px 12px;
    border-radius: 20px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border: 1px solid #ffeeba;
}

/* Animations */
.fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hover-lift {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.hover-lift:hover {
    transform: translateY(-2px);
}

/* Read-Only Overrides for System Templates */
/* This makes the form look like a spec sheet */
input:disabled, textarea:disabled, select:disabled {
    background-color: transparent !important;
    border: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    color: var(--apple-text) !important;
    font-weight: 500;
    cursor: text;
    appearance: none; /* Hides select arrow */
    -webkit-appearance: none;
    box-shadow: none !important;
    resize: none; 
}

/* Special styling for disabled rule rows to look cleaner */
.rule-row:has(input:disabled) {
    box-shadow: none;
    background: transparent;
    border-bottom: 1px solid #e5e5e5;
    border-radius: 0;
    padding: 12px 0;
    margin-bottom: 0;
}
.rule-row:has(input:disabled):last-child {
    border-bottom: none;
}
.rule-row:has(input:disabled) .remove-rule-btn {
    display: none;
}

/* JS Inline Replacement Utility Classes */
.rule-field-col {
    flex: 1;
    min-width: 200px;
}

.rule-instruction-col {
    flex: 2;
    min-width: 300px;
}

.rule-actions-col {
    height: 70px;
    padding-bottom: 5px;
}

.text-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em; /* Ensures consistent height without cutting off */
}

.text-clamp-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
}

.template-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 16px !important;
    padding: 8px;
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08) !important;
    border-color: rgba(0, 113, 227, 0.2) !important;
}

.template-card.border-primary {
    border-color: var(--apple-primary) !important;
    background: linear-gradient(180deg, rgba(0, 113, 227, 0.03) 0%, rgba(255, 255, 255, 1) 100%) !important;
    box-shadow: 0 0 15px rgba(0, 113, 227, 0.1) !important;
}

.transition-all {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.template-card .card-body {
    padding: 1.5rem !important;
}

.card.border-warning.template-card {
    border-color: #d4af37 !important;
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.05) 0%, rgba(255, 255, 255, 1) 100%) !important;
}

/* ============================================
   STRIPE TOP-UP MODAL (Phase 11)
   ============================================ */
#topup-modal { 
    display: none; 
    position: fixed; 
    z-index: 10001; 
    left: 0; top: 0; width: 100%; height: 100%; 
    background-color: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#topup-modal .modal-content {
    background: #ffffff; 
    padding: 40px; 
    border-radius: 24px; 
    width: 90%; 
    max-width: 650px; 
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
    position: relative;
    border: 1px solid rgba(255,255,255,0.2);
}

.tier-card {
    background: #ffffff;
    border: 1px solid #f0f0f0; 
    padding: 30px 20px; 
    border-radius: 20px; 
    text-align: center;
    transition: all 0.3s ease;
    cursor: default;
    position: relative;
}

.tier-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
    border-color: #667eea;
}

.tier-card.popular {
    border: 2px solid #667eea;
    background: #f8faff;
    transform: scale(1.05);
    z-index: 1;
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #667eea;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 12px;
    letter-spacing: 0.1em;
}

.tier-card h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #1a1a1a;
    font-weight: 600;
}

.tier-price {
    font-size: 32px;
    font-weight: 700;
    margin: 15px 0;
    color: #1a1a1a;
}

.tier-description {
    font-size: 13px;
    color: #888;
    margin-bottom: 20px;
}

.tier-btn {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

.tier-card.popular .tier-btn {
    background: #667eea;
    border-color: #667eea;
}



/* Modal Close Styling */
.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #a0aec0;
    cursor: pointer;
    line-height: 1;
    padding: 8px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
.modal-close:hover {
    color: #4a5568;
}

/* Bulk Processing feedback */
.table-processing {
    background-color: rgba(66, 133, 244, 0.05) !important;
    transition: background-color 0.3s ease;
}

.table-success-brief {
    background-color: rgba(52, 168, 83, 0.15) !important;
    transition: background-color 0.3s ease;
}

.table-danger-brief {
    background-color: rgba(234, 67, 53, 0.15) !important;
    transition: background-color 0.3s ease;
}

@keyframes pulse-bg {
    0% { background-color: rgba(66, 133, 244, 0.05); }
    50% { background-color: rgba(66, 133, 244, 0.15); }
    100% { background-color: rgba(66, 133, 244, 0.05); }
}

.table-processing td {
    animation: pulse-bg 2s infinite ease-in-out;
}

/* ============================================
   DASHBOARD FOOTER REFINEMENT (Phase 11 - Apple Style)
   ============================================ */
.dashboard-footer {
    margin-top: 8rem;
    margin-bottom: -2rem;
    padding: 2.5rem 3rem;
    border-top: 1px solid rgba(0,0,0,0.03);
    margin-left: -3rem;
    margin-right: -3rem;
    width: calc(100% + 6rem);
}

.footer-apple-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #86868b; /* Apple Secondary Text */
}

.footer-left, .footer-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.footer-divider {
    width: 1px;
    height: 12px;
    background: #d2d2d7;
    display: inline-block;
}

.footer-brand {
    font-weight: 600;
    color: #1d1d1f; /* Apple Primary Text */
}

.footer-tag {
    background: #f5f5f7;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    color: #515154;
}

.footer-link {
    color: #06c;
    text-decoration: none;
    transition: 0.2s;
}

.footer-link:hover {
    text-decoration: underline;
}

.footer-changelog-trigger {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-changelog-trigger:hover {
    color: #1d1d1f;
}

.footer-author-avatar {
    width: 32px;
    height: 32px;
    background: #1a1a1a;
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
}

/* ============================================
   RESPONSIVE DESIGN (Phase 11)
   ============================================ */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 10000;
        box-shadow: 20px 0 50px rgba(0,0,0,0.2);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 1.5rem !important;
    }
    
    header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1.5rem;
    }
    
    header .actions {
        width: 100%;
        justify-content: space-between;
    }

    .mobile-nav-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        margin-right: 10px;
    }

    .mobile-top-bar {
        display: flex !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 60px;
        background: #ffffff;
        border-bottom: 1px solid #f0f0f0;
        z-index: 9998;
        padding: 0 1rem;
        align-items: center;
        justify-content: space-between;
        box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    }

    .m-left, .m-right {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .m-logo {
        height: 24px;
        width: auto;
    }

    .m-action-btn {
        background: none;
        border: none;
        font-size: 1.2rem;
        padding: 8px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .m-avatar {
        width: 32px;
        height: 32px;
        background: #1a1a1a;
        color: #fff;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 10px;
        font-weight: 700;
        text-decoration: none;
        margin-left: 5px;
    }

    .content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 1.5rem !important;
        margin-top: 60px !important; /* Spacing for fixed bar */
    }
    
    header {
        display: flex !important;
        margin-bottom: 1.5rem !important;
        justify-content: flex-start !important;
        align-items: center !important;
        padding-top: 10px !important;
    }
    header h2 {
        font-size: 1.6rem !important;
        font-weight: 600 !important;
        color: #1a1a1a !important;
        margin: 0 !important;
    }
    header .actions {
        display: none !important; /* Hide desktop actions since they are in mobile-top-bar */
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.4);
        backdrop-filter: blur(4px);
        z-index: 9999;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .dashboard-footer {
        margin-left: -1.5rem !important;
        margin-right: -1.5rem !important;
        width: calc(100% + 3rem) !important;
        padding: 3rem 1.5rem !important;
    }

    .footer-apple-row {
        flex-direction: column !important;
        gap: 2rem !important;
        align-items: flex-start !important;
        text-align: left !important;
    }
    
    .footer-left, .footer-right {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
        width: 100% !important;
    }
    
    .footer-divider {
        display: none !important;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .content-filters {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .filter-group {
        width: 100% !important;
    }

    .filter-group select, .filter-group input {
        min-width: 100% !important;
    }

    .login-card {
        padding: 2rem 1.5rem !important;
        max-width: 460px !important;
    }

    .auth-logo img {
        max-width: 180px !important;
    }
}

/* Checkbox Group & Custom Checkbox Styles */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.custom-checkbox input[type="checkbox"] {
    margin-right: 0.5rem;
    cursor: pointer;
}

.custom-checkbox small {
    margin-left: 0.25rem;
}

.form-section {
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 6px;
}
