/**
 * Page Template Styles
 *
 * Styles for all page templates including:
 * - Auth pages (login, register)
 * - Dashboard
 * - Post ad
 * - Messages
 * - Search
 * - Category
 * - Ad single
 *
 * @package Tajheez
 * @version 1.0.0
 */

/* ==========================================================================
   AUTH PAGES (Login, Register)
   ========================================================================== */

.auth-page {
    min-height: 100vh;
    display: flex;
    background: var(--color-bg);
}

.auth-layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.auth-image {
    display: none;
    flex: 1;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    position: relative;
    overflow: hidden;
}

.auth-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../images/auth-pattern.svg') repeat;
    opacity: 0.1;
}

.auth-image-content {
    position: absolute;
    bottom: 4rem;
    inset-inline: 2rem;
    color: var(--color-white);
}

.auth-quote {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-style: italic;
    line-height: 1.4;
    margin: 0;
}

.auth-form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-8) var(--space-4);
}

.auth-form-container {
    width: 100%;
    max-width: 420px;
}

.auth-logo {
    display: block;
    margin-bottom: var(--space-8);
}

.auth-logo img {
    height: 40px;
    width: auto;
}

.auth-title {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 var(--space-2);
}

.auth-subtitle {
    color: var(--color-text-muted);
    margin: 0 0 var(--space-6);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.forgot-link {
    color: var(--color-primary);
    font-size: var(--text-sm);
    text-decoration: none;
}

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

.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    inset-inline-end: var(--space-3);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: var(--space-1);
    cursor: pointer;
    color: var(--color-text-muted);
}

.password-toggle:hover {
    color: var(--color-text);
}

.password-strength {
    margin-top: var(--space-2);
}

.strength-bar {
    height: 4px;
    background: var(--color-border);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    transition: width 0.3s, background 0.3s;
}

.strength-weak .strength-fill { background: var(--color-error); }
.strength-fair .strength-fill { background: var(--color-warning); }
.strength-good .strength-fill { background: var(--color-info); }
.strength-strong .strength-fill { background: var(--color-success); }

.strength-label {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: var(--space-1);
    display: block;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin: var(--space-6) 0;
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

.social-login {
    display: flex;
    gap: var(--space-3);
}

.btn-social {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    font-weight: 500;
    transition: all 0.2s;
}

.btn-social:hover {
    background: var(--color-bg-alt);
    border-color: var(--color-border-dark);
}

.auth-switch {
    text-align: center;
    margin-top: var(--space-6);
    color: var(--color-text-muted);
}

.auth-switch a {
    color: var(--color-primary);
    font-weight: 500;
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

@media (min-width: 1024px) {
    .auth-image {
        display: flex;
    }
}

/* Ensure auth form is always visible on mobile */
@media (max-width: 767px) {
    .auth-page {
        display: flex !important;
        visibility: visible !important;
    }

    .auth-layout {
        display: flex !important;
        visibility: visible !important;
    }

    .auth-form-section {
        display: flex !important;
        visibility: visible !important;
        padding: var(--space-6) var(--space-4);
    }

    .auth-form-container {
        display: block !important;
        visibility: visible !important;
    }

    .auth-form {
        display: flex !important;
        visibility: visible !important;
    }

    /* Ensure Sign In button is visible in header on auth pages */
    body.page-template-template-login .header-actions .btn-primary,
    body.page-template-template-register .header-actions .btn-primary,
    body.page-template-template-forgot-password .header-actions .btn-primary {
        display: inline-flex !important;
        visibility: visible !important;
    }
}

/* ==========================================================================
   DASHBOARD
   ========================================================================== */

.dashboard-page {
    padding: var(--space-6) 0;
    min-height: calc(100vh - 80px);
    background: var(--color-bg-alt);
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
}

.dashboard-sidebar {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: var(--space-4);
    box-shadow: var(--shadow-sm);
}

.dashboard-user {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--space-4);
}

.dashboard-user .user-avatar {
    flex-shrink: 0;
}

.dashboard-user .user-avatar img {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.dashboard-user .user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.dashboard-user .user-name,
.dashboard-user .user-email,
.dashboard-user .user-phone,
.dashboard-user .user-country {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dashboard-user .user-name svg,
.dashboard-user .user-email svg,
.dashboard-user .user-phone svg,
.dashboard-user .user-country svg {
    flex-shrink: 0;
    opacity: 0.6;
}

.dashboard-user .user-name {
    font-weight: 600;
    color: var(--color-text);
    font-size: var(--text-base);
}

.dashboard-user .user-email {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    word-break: break-all;
}

.dashboard-user .user-phone {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.dashboard-user .user-country {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    background: var(--color-bg-alt);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    margin-top: 4px;
}

/* Dashboard Navigation */
.dashboard-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.dashboard-nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-3);
    border-radius: var(--radius-lg);
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: 500;
    transition: all 0.2s ease;
}

.dashboard-nav-item:hover {
    background: var(--color-bg-alt);
    color: var(--color-text);
}

.dashboard-nav-item.is-active {
    background: var(--color-primary-light, rgba(101, 44, 143, 0.1));
    color: var(--color-primary);
}

.dashboard-nav-item svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.dashboard-nav-item .nav-badge {
    margin-left: auto;
    background: var(--color-primary);
    color: white;
    font-size: var(--text-xs);
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    display: none;
}

.dashboard-nav-item .nav-badge.badge-gold {
    background: var(--color-warning, #f59e0b);
}

.dashboard-nav-divider {
    height: 1px;
    background: var(--color-border);
    margin: var(--space-2) 0;
}

.dashboard-nav-item.nav-logout {
    color: var(--color-error, #ef4444);
}

.dashboard-nav-item.nav-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-error, #ef4444);
}

.sidebar-profile {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--space-4);
}

.profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.profile-name {
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.profile-email {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin: 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border-radius: var(--radius-lg);
    color: var(--color-text);
    text-decoration: none;
    transition: all 0.2s;
}

.nav-item:hover {
    background: var(--color-bg-alt);
}

.nav-item.active {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.nav-item svg {
    flex-shrink: 0;
}

.nav-badge {
    margin-inline-start: auto;
    background: var(--color-primary);
    color: var(--color-white);
    font-size: var(--text-xs);
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.dashboard-content {
    min-width: 0;
}

.dashboard-header {
    margin-bottom: var(--space-6);
}

.dashboard-title {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.dashboard-title svg {
    color: var(--color-primary);
    flex-shrink: 0;
}

.dashboard-subtitle {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-2);
    line-height: 1.5;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.stat-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-3);
}

.stat-icon.primary { background: var(--color-primary-light); color: var(--color-primary); }
.stat-icon.secondary { background: rgba(232, 165, 152, 0.2); color: var(--color-secondary); }
.stat-icon.accent { background: rgba(212, 175, 55, 0.2); color: var(--color-accent); }
.stat-icon.success { background: var(--color-success-light); color: var(--color-success); }

.stat-value {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
}

.stat-label {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin: 0;
}

.dashboard-section {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-6);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
}

.section-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

/* Dashboard Cards */
.dashboard-card {
    background: var(--color-white, #fff);
    border-radius: var(--radius-lg, 12px);
    padding: var(--space-6, 24px);
    margin-bottom: var(--space-6, 24px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.dashboard-card .card-title {
    font-size: var(--text-xl, 1.25rem);
    font-weight: 600;
    color: var(--color-text, #1d2327);
    margin-bottom: var(--space-5, 20px);
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

/* Quick Action Outlined Buttons - UX-014 */
.quick-action {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 12px 20px;
    border: 1.5px solid var(--color-primary);
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--color-primary);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.quick-action:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-1px);
}

.quick-action:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.quick-action:active {
    transform: translateY(0);
}

.quick-action-icon {
    font-size: 16px;
    line-height: 1;
}

/* Primary Quick Action - filled style for main CTA */
.quick-action--primary {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.quick-action--primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: white;
}

/* Warning Quick Action - for actions that need user attention */
.quick-action--warning {
    border-color: var(--color-warning, #f59e0b);
    color: var(--color-warning, #f59e0b);
}

.quick-action--warning:hover {
    background: var(--color-warning, #f59e0b);
    border-color: var(--color-warning, #f59e0b);
    color: white;
}

/* Phone Verification UI */
.phone-input-wrapper {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.phone-input-wrapper .form-control {
    flex: 1;
}

.btn-verify-phone {
    white-space: nowrap;
}

.phone-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--text-xs, 0.75rem);
    font-weight: 500;
    color: var(--color-success, #22c55e);
    background: rgba(34, 197, 94, 0.1);
    padding: 2px 8px;
    border-radius: var(--radius-full, 9999px);
    margin-inline-start: 8px;
}

.phone-verified-badge svg {
    stroke: var(--color-success, #22c55e);
}

.form-help--warning {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-sm, 0.875rem);
    color: var(--color-warning, #f59e0b);
    margin-top: 8px;
}

.form-help--warning svg {
    stroke: var(--color-warning, #f59e0b);
    flex-shrink: 0;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4);
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    color: var(--color-text);
    text-decoration: none;
    transition: all 0.2s;
}

.action-btn:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3);
    background: var(--color-bg-alt);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.activity-item:hover {
    background: var(--color-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

.activity-icon--message {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
}

.activity-icon--favorite {
    background: linear-gradient(135deg, #fce4ec, #f8bbd9);
}

.activity-icon--like {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
}

.activity-icon--view {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
}

.activity-icon--token {
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
}

.activity-icon--ad {
    background: linear-gradient(135deg, #f3e5f5, #e1bee7);
}

/* TC-TWEAK-017: Sold activity icon */
.activity-icon--sold {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-text {
    font-size: var(--text-sm);
    color: var(--color-text);
    margin: 0 0 var(--space-1);
    line-height: 1.4;
}

.activity-time {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.activity-time::before {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--color-text-muted);
    border-radius: 50%;
    opacity: 0.5;
}

.empty-activity {
    text-align: center;
    padding: var(--space-8) var(--space-4);
    color: var(--color-text-muted);
}

.empty-activity-icon {
    font-size: 48px;
    margin-bottom: var(--space-3);
    opacity: 0.5;
}

.empty-activity-text {
    font-size: var(--text-sm);
    margin: 0;
}

/* Card Header Row */
.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
}

.card-header-row .card-title {
    margin-bottom: 0;
}

.view-all-link {
    font-size: var(--text-sm);
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

.view-all-link:hover {
    text-decoration: underline;
}

/* Favorites Grid - Dashboard Section */
.favorites-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
}

@media (min-width: 768px) {
    .favorites-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .favorites-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.favorites-grid .ad-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.favorites-grid .ad-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.favorites-grid .ad-card-image {
    aspect-ratio: 4/3;
    overflow: hidden;
}

.favorites-grid .ad-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.favorites-grid .ad-card-content {
    padding: var(--space-3);
}

.favorites-grid .ad-card-title {
    font-size: var(--text-sm);
    font-weight: 600;
    margin: 0 0 var(--space-2) 0;
    line-height: 1.3;
}

.favorites-grid .ad-card-title a {
    color: var(--color-text);
    text-decoration: none;
}

.favorites-grid .ad-card-title a:hover {
    color: var(--color-primary);
}

.favorites-grid .ad-card-price {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-primary);
}

.favorites-grid .ad-card-location {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: var(--space-1);
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.favorites-grid .empty-state {
    text-align: center;
    padding: var(--space-8);
}

/* Recent Ads List */
.recent-ads-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

/* MY RECENT ADS - REDESIGNED LAYOUT */

.recent-ad-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #F8F9FA;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.2s ease;
    align-items: center;
    border: 1px solid transparent;
}

.recent-ad-item:hover {
    background: #FFFFFF;
    border-color: #E2E8F0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.recent-ad-image {
    width: 80px;
    height: 80px;
    border-radius: 0.5rem;
    overflow: hidden;
    flex-shrink: 0;
    background: #E2E8F0;
}

.recent-ad-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-ad-image .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    opacity: 0.4;
}

.recent-ad-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.recent-ad-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1A1A2E;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Badges Row - Status + Expiring inline */
.recent-ad-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.recent-ad-status {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.recent-ad-status.status-publish,
.recent-ad-status.status-active {
    background: #D4EDDA;
    color: #28A745;
}

.recent-ad-status.status-pending {
    background: #FFF3CD;
    color: #856404;
}

.recent-ad-status.status-expired {
    background: #F8D7DA;
    color: #DC3545;
}

.recent-ad-status.status-sold {
    background: #D1ECF1;
    color: #0C5460;
}

/* Expiring Badge - Gradient Style */
.recent-ad-expiring-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: linear-gradient(135deg, #FFB74D 0%, #F59E0B 100%);
    color: #1A1A2E;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.25);
}

.recent-ad-expiring-badge svg {
    width: 12px;
    height: 12px;
}

.recent-ad-expiring-badge.is-critical {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: #FFFFFF;
    animation: badge-pulse 1.5s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.02); opacity: 0.9; }
}

/* Featured Badge - Gold Style */
.recent-ad-featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: linear-gradient(135deg, #D4AF37 0%, #B8962E 100%);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(212, 175, 55, 0.3);
}

.recent-ad-featured-badge svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* Meta Row */
.recent-ad-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #6B7280;
}

.recent-ad-price {
    font-weight: 700;
    color: #652C8F;
    font-size: 13px;
}

/* Renew Button */
.btn-renew-compact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #652C8F;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-renew-compact:hover {
    background: #4A1F6B;
    transform: translateY(-1px);
}

.btn-renew-compact svg {
    width: 12px;
    height: 12px;
}

.btn-renew-compact.is-urgent {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    animation: button-pulse 2s ease-in-out infinite;
}

@keyframes button-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

/* Mobile */
@media (max-width: 767px) {
    .recent-ad-item {
        grid-template-columns: 60px 1fr;
    }

    .recent-ad-image {
        width: 60px;
        height: 60px;
    }

    .recent-ad-actions {
        grid-column: 2;
        margin-top: 0.5rem;
    }

    .btn-renew-compact {
        width: 100%;
        justify-content: center;
    }
}

/* Empty Ads State */
.empty-ads {
    text-align: center;
    padding: var(--space-8) var(--space-4);
    color: var(--color-text-muted);
}

.empty-ads-icon {
    font-size: 48px;
    margin-bottom: var(--space-3);
    opacity: 0.5;
}

.empty-ads-text {
    font-size: var(--text-sm);
    margin: 0 0 var(--space-4);
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .quick-actions {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .dashboard-layout {
        grid-template-columns: 280px 1fr;
    }
}

/* Mobile Dashboard Navigation - horizontal scrollable bar */
.dashboard-mobile-nav {
    display: none; /* Hidden by default, shown only on mobile */
}

@media (max-width: 1023px) {
    /* Hide sidebar on mobile */
    .dashboard-sidebar {
        display: none;
    }

    /* Show mobile nav on mobile/tablet */
    .dashboard-mobile-nav {
        display: flex;
        gap: var(--space-2);
        overflow-x: auto;
        overflow-y: hidden;
        scroll-behavior: smooth;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        background: var(--color-white);
        border-radius: var(--radius-lg);
        padding: var(--space-2);
        margin-bottom: var(--space-4);
        box-shadow: var(--shadow-sm);
    }

    .dashboard-mobile-nav::-webkit-scrollbar {
        display: none;
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: var(--space-2) var(--space-3);
        border-radius: var(--radius-md);
        text-decoration: none;
        color: var(--color-text-muted);
        font-size: 11px;
        font-weight: 500;
        white-space: nowrap;
        flex-shrink: 0;
        min-width: 64px;
        transition: all 0.2s ease;
    }

    .mobile-nav-item:hover {
        background: var(--color-bg-alt);
        color: var(--color-primary);
    }

    .mobile-nav-item.is-active {
        background: var(--color-primary-soft);
        color: var(--color-primary);
    }

    .mobile-nav-item svg {
        flex-shrink: 0;
    }

    /* Post Ad button - highlighted style */
    .mobile-nav-item.mobile-nav-post-ad {
        background: var(--color-primary);
        color: var(--color-white);
    }

    .mobile-nav-item.mobile-nav-post-ad:hover {
        background: var(--color-primary-dark);
        color: var(--color-white);
    }
}

/* ==========================================================================
   TOKENS EMPTY STATE
   ========================================================================== */

.tokens-empty-state {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: var(--space-12) var(--space-6);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.tokens-empty-icon {
    margin-bottom: var(--space-6);
    animation: float 3s ease-in-out infinite;
}

.tokens-empty-icon svg {
    filter: drop-shadow(0 4px 12px rgba(212, 175, 55, 0.3));
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.tokens-empty-title {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 var(--space-3);
}

.tokens-empty-subtitle {
    font-size: var(--text-base);
    color: var(--color-text-muted);
    line-height: 1.6;
    margin: 0 0 var(--space-8);
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.tokens-benefits-list {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-8);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    text-align: start;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.tokens-benefit-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--color-bg, #FDFBF7);
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
}

.tokens-benefit-item:hover {
    background: linear-gradient(135deg, rgba(101, 44, 143, 0.05) 0%, rgba(232, 165, 152, 0.05) 100%);
    transform: translateX(4px);
}

[dir="rtl"] .tokens-benefit-item:hover {
    transform: translateX(-4px);
}

.tokens-benefit-item svg {
    flex-shrink: 0;
    color: var(--color-primary, #652C8F);
    margin-top: 2px;
}

.tokens-benefit-item span {
    color: var(--color-text);
    font-size: var(--text-sm);
    line-height: 1.5;
}

.tokens-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-lg);
    font-weight: 600;
    background: linear-gradient(135deg, var(--color-primary, #652C8F) 0%, #7d3aa8 100%);
    border: none;
    box-shadow: 0 4px 16px rgba(101, 44, 143, 0.3);
    transition: all 0.3s ease;
}

.tokens-cta-btn:hover {
    background: linear-gradient(135deg, #7d3aa8 0%, var(--color-primary, #652C8F) 100%);
    box-shadow: 0 6px 24px rgba(101, 44, 143, 0.4);
    transform: translateY(-2px);
}

.tokens-cta-btn:active {
    transform: translateY(0);
}

.tokens-cta-btn svg {
    flex-shrink: 0;
}

.tokens-empty-footer {
    margin-top: var(--space-6);
    margin-bottom: 0;
}

.tokens-learn-more {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-primary, #652C8F);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tokens-learn-more:hover {
    color: #7d3aa8;
    gap: var(--space-3);
}

.tokens-learn-more svg {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.tokens-learn-more:hover svg {
    transform: translateX(2px);
}

[dir="rtl"] .tokens-learn-more:hover svg {
    transform: translateX(-2px);
}

/* Tokens Balance Card (when user has tokens) */
.tokens-balance-card {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-6);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
    border-radius: var(--radius-lg);
    border: 2px solid rgba(212, 175, 55, 0.2);
}

.tokens-balance-icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-warning, #D4AF37) 0%, #FFD700 100%);
    border-radius: var(--radius-full);
    color: var(--color-white);
}

.tokens-balance-info {
    flex: 1;
}

.tokens-balance-label {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin: 0 0 var(--space-1);
    font-weight: 500;
}

.tokens-balance-value {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: 700;
    color: var(--color-warning, #D4AF37);
    margin: 0;
}

/* Responsive Design for Tokens */
@media (max-width: 768px) {
    .tokens-empty-state {
        padding: var(--space-8) var(--space-4);
    }

    .tokens-empty-title {
        font-size: var(--text-xl);
    }

    .tokens-empty-subtitle {
        font-size: var(--text-sm);
    }

    .tokens-benefits-list {
        gap: var(--space-3);
    }

    .tokens-benefit-item {
        padding: var(--space-2) var(--space-3);
    }

    .tokens-cta-btn {
        width: 100%;
        padding: var(--space-3) var(--space-6);
        font-size: var(--text-base);
    }

    .tokens-balance-card {
        flex-direction: column;
        text-align: center;
    }

    .tokens-balance-card .btn {
        width: 100%;
    }
}

/* RTL Support for Tokens */
[dir="rtl"] .tokens-benefit-item svg {
    margin-left: var(--space-3);
    margin-right: 0;
}

[dir="rtl"] .tokens-learn-more svg {
    transform: scaleX(-1);
}

/* Coupon Redemption Card */
.coupon-redeem-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.coupon-redeem-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.coupon-redeem-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    border-radius: var(--radius-lg);
    color: var(--color-white);
}

.coupon-redeem-title h3 {
    margin: 0 0 var(--space-1);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-text);
}

.coupon-redeem-title p {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.coupon-redeem-form {
    display: flex;
    gap: var(--space-3);
}

.coupon-redeem-form input {
    flex: 1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.coupon-redeem-form .btn {
    flex-shrink: 0;
    min-width: 100px;
}

.coupon-redeem-message {
    margin-top: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
}

.coupon-message-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #15803d;
}

.coupon-message-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

.coupon-message-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #2563eb;
}

.coupon-link {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
    margin-left: var(--space-1);
}

.coupon-link:hover {
    text-decoration: none;
}

@media (max-width: 640px) {
    .coupon-redeem-form {
        flex-direction: column;
    }

    .coupon-redeem-form .btn {
        width: 100%;
    }
}

[dir="rtl"] .coupon-link {
    margin-left: 0;
    margin-right: var(--space-1);
}

/* Tokens Page Coupon Card */
.tokens-page-coupon {
    max-width: 600px;
    margin: 0 auto var(--space-6);
    padding: var(--space-5);
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* Dashboard Coupon Card */
.dashboard-coupon-card {
    margin-top: var(--space-4);
}

/* ==========================================================================
   POST AD
   ========================================================================== */

.post-ad-page {
    padding: var(--space-8) 0;
    min-height: calc(100vh - 80px);
    background: var(--color-bg-alt);
}

.post-ad-progress {
    max-width: 600px;
    margin: 0 auto var(--space-8);
}

.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--color-white);
    border: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--text-lg, 1.125rem);
    line-height: 1;
    color: var(--color-text-muted);
    transition: all 0.3s;
}

.progress-step.active .step-number {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}

.progress-step.completed .step-number {
    background: var(--color-success);
    border-color: var(--color-success);
    color: var(--color-white);
}

.step-label {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    display: none;
}

.progress-step.active .step-label {
    color: var(--color-primary);
    font-weight: 500;
}

.progress-line {
    flex: 1;
    height: 2px;
    background: var(--color-border);
    margin: 0 var(--space-2);
    max-width: 60px;
}

/* Progress arrow between steps */
.progress-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    margin: 0 var(--space-2);
    margin-top: 14px; /* Center with 48px circles: (48-20)/2 = 14px */
    color: var(--color-border);
    transition: color 0.3s;
}

.progress-arrow svg {
    width: 20px;
    height: 20px;
}

/* Arrow turns primary color when preceding step is completed */
.progress-step.completed + .progress-arrow {
    color: var(--color-success);
}

.progress-step.active + .progress-arrow {
    color: var(--color-primary);
}

.post-ad-form-container {
    max-width: 800px;
    margin: 0 auto;
}

.form-step {
    display: none !important;
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: relative;
}

.form-step.active {
    display: block !important;
}

/* Ensure step-actions stays within its parent */
.form-step .step-actions {
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   AD TYPE SELECTION - POST AD PAGE
   ========================================================================== */

/* Card Container */
.ad-type-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-5);
    margin-bottom: var(--space-6);
}

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

/* Individual Card */
.ad-type-card {
    cursor: pointer;
    position: relative;
}

.ad-type-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ad-type-card-inner {
    position: relative;
    padding: var(--space-6);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-xl);
    background: var(--color-white);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Hover State */
.ad-type-card:hover .ad-type-card-inner {
    border-color: var(--color-primary-light);
    box-shadow: 0 4px 12px rgba(101, 44, 143, 0.1);
}

/* Selected State - Standard */
.ad-type-card input:checked + .ad-type-card-inner {
    border-color: var(--color-primary);
    background: var(--color-primary-soft);
    box-shadow: 0 4px 16px rgba(101, 44, 143, 0.2);
}

/* Selected State - Featured */
.ad-type-card--featured input:checked + .ad-type-card-inner {
    border-color: var(--color-accent);
    background: var(--color-accent-soft);
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.25);
}

/* Disabled State (no tokens) */
.ad-type-card.is-disabled {
    cursor: not-allowed;
}

.ad-type-card.is-disabled .ad-type-card-inner {
    opacity: 0.6;
    background: var(--color-bg-alt);
}

.ad-type-card.is-disabled:hover .ad-type-card-inner {
    border-color: var(--color-border);
    box-shadow: none;
}

/* Focus State for Accessibility */
.ad-type-card input:focus-visible + .ad-type-card-inner {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

/* Recommended Badge */
.ad-type-badge {
    position: absolute;
    top: calc(-1 * var(--space-3));
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--color-accent) 0%, #B8962E 100%);
    color: var(--color-white);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

/* Icon Container */
.ad-type-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-4);
}

.ad-type-icon--standard {
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.ad-type-icon--featured {
    background: linear-gradient(135deg, var(--color-accent-soft) 0%, var(--color-accent-light) 100%);
    color: var(--color-accent);
}

/* Title */
.ad-type-title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--color-text);
    text-align: center;
    margin: 0 0 var(--space-3);
}

/* Description */
.ad-type-description {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    text-align: center;
    line-height: 1.6;
    margin: 0 0 var(--space-4);
    flex-grow: 1;
}

/* Benefits List */
.ad-type-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-4);
    flex-grow: 1;
}

.ad-type-benefits li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-text);
    margin-bottom: var(--space-2);
    line-height: 1.4;
}

.ad-type-benefits li svg {
    flex-shrink: 0;
    color: var(--color-success);
    margin-top: 2px;
}

/* Token Count Display */
.ad-type-token-count {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-top: auto;
}

.ad-type-token-count svg {
    color: var(--color-primary);
}

.ad-type-token-count strong {
    color: var(--color-text);
    font-weight: 600;
}

/* Featured Token Count Variant */
.ad-type-token-count--featured svg {
    color: var(--color-accent);
}

/* Buy CTA Section */
.ad-type-buy-cta {
    text-align: center;
    padding: var(--space-4);
    background: var(--color-accent-soft);
    border-radius: var(--radius-lg);
    margin-top: auto;
}

.ad-type-buy-cta .no-tokens-text {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin: 0 0 var(--space-3);
}

.ad-type-buy-cta .btn {
    width: 100%;
}

/* Accent Button for Buy Featured */
.btn-accent {
    background: linear-gradient(135deg, var(--color-accent) 0%, #B8962E 100%);
    color: var(--color-white);
    border: none;
}

.btn-accent:hover {
    background: linear-gradient(135deg, #B8962E 0%, var(--color-accent) 100%);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* ==========================================================================
   AD TYPE SELECTION - RTL SUPPORT
   ========================================================================== */

[dir="rtl"] .ad-type-benefits li {
    flex-direction: row-reverse;
    text-align: right;
}

[dir="rtl"] .ad-type-benefits li svg {
    margin-top: 2px;
}

[dir="rtl"] .ad-type-token-count {
    flex-direction: row-reverse;
}

[dir="rtl"] .step-actions .btn svg {
    transform: scaleX(-1);
}

/* ==========================================================================
   AD TYPE SELECTION - MOBILE RESPONSIVE
   ========================================================================== */

@media (max-width: 480px) {
    .ad-type-card-inner {
        padding: var(--space-4);
    }

    .ad-type-icon {
        width: 48px;
        height: 48px;
    }

    .ad-type-icon svg {
        width: 24px;
        height: 24px;
    }

    .ad-type-title {
        font-size: var(--text-lg);
    }

    .ad-type-benefits li {
        font-size: var(--text-xs);
    }
}

.step-header {
    text-align: center;
    margin-bottom: var(--space-6);
}

.step-title {
    font-family: var(--font-display);
    font-size: var(--text-3xl, 1.875rem);
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 var(--space-2);
}

.step-subtitle {
    font-size: var(--text-lg, 1.125rem);
    color: var(--color-text-muted);
    margin: 0;
}

.selected-category-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    padding: var(--space-3) var(--space-4);
    background: var(--color-primary-light, rgba(var(--color-primary-rgb), 0.1));
    border-radius: var(--radius-lg);
}

.selected-category-icon img {
    display: block;
    width: 24px;
    height: 24px;
}

.selected-category-name {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-primary);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.category-card {
    cursor: pointer;
}

.category-card input {
    display: none;
}

.category-card-inner {
    padding: var(--space-5);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-xl);
    text-align: center;
    transition: all 0.2s;
}

.category-card:hover .category-card-inner {
    border-color: var(--color-primary-light);
}

.category-card input:checked + .category-card-inner {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}

.category-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-lg);
    background: var(--color-bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-3);
    color: var(--color-primary);
    flex-shrink: 0;
    overflow: hidden;
}

/* Larger icons on desktop */
@media (min-width: 768px) {
    .category-icon {
        width: 96px;
        height: 96px;
    }
}

.category-icon img,
.category-icon-img {
    width: auto;
    height: auto;
    object-fit: contain;
    max-width: 56px;
    max-height: 56px;
    display: block;
}

/* Larger images on desktop */
@media (min-width: 768px) {
    .category-icon img,
    .category-icon-img {
        max-width: 64px;
        max-height: 64px;
    }
}

.category-icon span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    line-height: 1;
}

/* Larger emoji on desktop */
@media (min-width: 768px) {
    .category-icon span {
        font-size: 48px;
    }
}

.category-name {
    font-size: var(--text-lg, 1.125rem);
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 var(--space-1);
}

.category-desc {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin: 0;
}

.subcategory-section {
    margin-bottom: var(--space-6);
}

.subcategory-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.subcategory-pill {
    cursor: pointer;
}

.subcategory-pill input {
    display: none;
}

.subcategory-pill span {
    display: inline-block;
    padding: var(--space-2) var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    transition: all 0.2s;
}

.subcategory-pill:hover span {
    border-color: var(--color-primary);
}

.subcategory-pill input:checked + span {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}

.form-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.category-attributes {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border);
}

.attributes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
}

.step-actions {
    display: flex;
    justify-content: space-between;
    gap: var(--space-4);
    margin-top: var(--space-8);
    padding-top: var(--space-6);
    border-top: 1px solid var(--color-border);
}

.step-actions .btn {
    min-width: 140px;
}

/* Image Upload */
.upload-dropzone {
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}

/* Highlight when user tries to continue without images */
.upload-dropzone.highlight-required {
    border-color: var(--color-error, #dc2626);
    background: rgba(220, 38, 38, 0.05);
    animation: dropzone-pulse 0.5s ease-in-out 3;
}

@keyframes dropzone-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(220, 38, 38, 0.1);
    }
}

.dropzone-content h3 {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-text);
    margin: var(--space-4) 0 var(--space-1);
}

.dropzone-content p {
    color: var(--color-text-muted);
    margin: 0 0 var(--space-2);
}

.upload-hint {
    font-size: var(--text-sm);
    color: var(--color-text-light);
}

.upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.uploaded-images {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
    margin-top: var(--space-4);
}

.uploaded-image {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.uploaded-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.uploaded-image.uploading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-progress {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hide spinner when upload is complete */
.uploaded-image.uploaded .upload-progress {
    display: none;
}

.remove-image {
    position: absolute;
    top: var(--space-1);
    inset-inline-end: var(--space-1);
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: var(--color-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.uploaded-image:hover .remove-image {
    opacity: 1;
}

.image-tips {
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-top: var(--space-4);
}

.image-tips h4 {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 var(--space-2);
}

.image-tips ul {
    margin: 0;
    padding-inline-start: var(--space-4);
}

.image-tips li {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-1);
}

/* Review Preview */
.review-preview {
    display: grid;
    gap: var(--space-6);
}

.preview-card {
    background: var(--color-bg-alt);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.preview-images {
    aspect-ratio: 16/9;
    background: var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
}

.preview-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-content {
    padding: var(--space-4);
}

.preview-category {
    font-size: var(--text-sm);
    color: var(--color-primary);
    margin-bottom: var(--space-2);
}

.preview-title {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 var(--space-2);
}

.preview-description {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    margin: 0 0 var(--space-3);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.preview-meta {
    display: flex;
    justify-content: space-between;
    font-size: var(--text-sm);
}

.preview-price {
    font-weight: 600;
    color: var(--color-primary);
}

.preview-location {
    color: var(--color-text-muted);
}

.review-details {
    background: var(--color-bg-alt);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
}

.review-details h3 {
    font-size: var(--text-lg);
    font-weight: 600;
    margin: 0 0 var(--space-4);
}

.review-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin: 0;
}

.review-item {
    display: flex;
    justify-content: space-between;
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--color-border);
}

.review-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.review-item dt {
    color: var(--color-text-muted);
}

.review-item dd {
    font-weight: 500;
    color: var(--color-text);
    margin: 0;
}

.token-cost-box {
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-secondary-light) 100%);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    text-align: center;
    margin-top: var(--space-4);
}

.token-cost-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    color: var(--color-primary);
    margin-bottom: var(--space-2);
}

.token-cost-value {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: var(--space-2);
}

.token-amount {
    font-size: var(--text-4xl);
    font-weight: 700;
    color: var(--color-primary);
}

.token-label {
    font-size: var(--text-lg);
    color: var(--color-primary);
}

.token-balance {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-2);
}

/* Success Modal */
.success-content {
    text-align: center;
    padding: var(--space-8);
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    background: var(--color-success-light);
    color: var(--color-success);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-4);
}

.success-content h2 {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 var(--space-2);
}

.success-content p {
    color: var(--color-text-muted);
    margin: 0 0 var(--space-6);
}

.success-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
}

@media (min-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .step-label {
        display: block;
    }

    .uploaded-images {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ==========================================================================
   MESSAGES
   ========================================================================== */

.messages-page {
    height: calc(100vh - 80px);
    overflow: hidden;
}

.messages-layout {
    display: flex;
    height: 100%;
}

.conversations-sidebar {
    width: 100%;
    background: var(--color-white);
    border-inline-end: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
}

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

.sidebar-title {
    font-size: var(--text-xl);
    font-weight: 600;
    margin: 0;
}

.search-box {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background: var(--color-bg-alt);
    margin: var(--space-4);
    border-radius: var(--radius-lg);
}

.search-box svg {
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.search-box .search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: var(--text-sm);
    color: var(--color-text);
}

.search-box .search-input:focus {
    outline: none;
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
}

.conversation-item {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-4);
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--color-border);
}

.conversation-item:hover {
    background: var(--color-bg-alt);
}

.conversation-item.active {
    background: var(--color-primary-light);
}

.conversation-item.unread {
    background: rgba(101, 44, 143, 0.05);
}

.conversation-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
}

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

.conversation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-1);
}

.conversation-name {
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-time {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.conversation-preview {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.preview-text {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.unread-badge {
    background: var(--color-primary);
    color: var(--color-white);
    font-size: var(--text-xs);
    font-weight: 600;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.conversation-ad {
    font-size: var(--text-xs);
    color: var(--color-primary);
    margin-top: var(--space-1);
    display: block;
}

.chat-area {
    flex: 1;
    display: none;
    flex-direction: column;
    background: var(--color-bg-alt);
}

.chat-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-empty-content {
    text-align: center;
    color: var(--color-text-muted);
}

.chat-empty-content h2 {
    font-size: var(--text-xl);
    color: var(--color-text);
    margin: var(--space-4) 0 var(--space-2);
}

.chat-empty-content p {
    margin: 0;
}

.chat-active {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}

.back-to-list {
    display: flex;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex: 1;
}

.chat-name {
    font-size: var(--text-base);
    font-weight: 600;
    margin: 0;
}

.chat-status {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.chat-header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    min-height: 0;
}

.date-divider {
    text-align: center;
    margin: var(--space-4) 0;
}

.date-divider span {
    background: var(--color-bg-alt);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

.message {
    display: flex;
    max-width: 75%;
}

.message-sent {
    align-self: flex-end;
}

.message-received {
    align-self: flex-start;
}

.message-bubble {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-xl);
    max-width: 100%;
}

.message-sent .message-bubble {
    background: var(--color-primary);
    color: var(--color-white);
    border-bottom-right-radius: var(--radius-sm);
}

.message-received .message-bubble {
    background: var(--color-white);
    color: var(--color-text);
    border-bottom-left-radius: var(--radius-sm);
}

.message-content {
    word-wrap: break-word;
}

.message-image {
    max-width: 200px;
    border-radius: var(--radius-lg);
    margin-top: var(--space-2);
}

.message-meta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-1);
    font-size: var(--text-xs);
    opacity: 0.7;
}

.chat-input-area {
    padding: var(--space-4);
    background: var(--color-white);
    border-top: 1px solid var(--color-border);
    flex-shrink: 0;
}

.message-form {
    display: flex;
    align-items: flex-end;
    gap: var(--space-2);
}

.attach-btn {
    color: var(--color-text-muted);
}

.input-wrapper {
    flex: 1;
}

.message-input {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-3) var(--space-4);
    resize: none;
    font-family: inherit;
    font-size: var(--text-base);
    max-height: 120px;
}

.message-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.send-btn {
    border-radius: var(--radius-full);
}

@media (min-width: 768px) {
    .conversations-sidebar {
        width: 360px;
    }

    .chat-area {
        display: flex;
    }

    .back-to-list {
        display: none;
    }
}

@media (max-width: 767px) {
    .messages-layout.chat-open .conversations-sidebar {
        display: none;
    }

    .messages-layout.chat-open .chat-area {
        display: flex;
    }
}

/* ==========================================================================
   SEARCH RESULTS
   ========================================================================== */

.search-page {
    padding: var(--space-6) 0;
    min-height: calc(100vh - 80px);
    background: var(--color-bg-alt);
}

.search-header {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    margin-bottom: var(--space-6);
    box-shadow: var(--shadow-sm);
}

.search-header-content {
    margin-bottom: var(--space-4);
}

.search-title {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 var(--space-2);
}

.search-title span {
    color: var(--color-primary);
}

.search-count {
    color: var(--color-text-muted);
    margin: 0;
}

.search-form-large {
    display: flex;
}

.search-input-group {
    display: flex;
    align-items: center;
    flex: 1;
    gap: var(--space-3);
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
    padding: var(--space-2) var(--space-4);
}

.search-input-group svg {
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.search-input-large {
    flex: 1;
    border: none;
    background: transparent;
    font-size: var(--text-base);
    color: var(--color-text);
}

.search-input-large:focus {
    outline: none;
}

.search-layout {
    display: grid;
    gap: var(--space-6);
}

.search-filters {
    display: none;
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
}

.filters-title {
    font-size: var(--text-lg);
    font-weight: 600;
    margin: 0;
}

.filter-section {
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--color-border);
}

.filter-section:last-of-type {
    border-bottom: none;
}

.filter-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 var(--space-3);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.filter-option {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    font-size: var(--text-sm);
    color: var(--color-text);
}

.filter-option input {
    accent-color: var(--color-primary);
}

.filter-count {
    color: var(--color-text-muted);
    margin-inline-start: auto;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.price-input-group {
    flex: 1;
}

.price-input-group label {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    display: block;
    margin-bottom: var(--space-1);
}

.price-separator {
    color: var(--color-text-muted);
    padding-top: var(--space-4);
}

.rating-stars {
    color: var(--color-accent);
    margin-inline-end: var(--space-1);
}

.results-controls {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}

.sort-control {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
}

.sort-control label {
    color: var(--color-text-muted);
}

.form-select-sm {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    border-radius: var(--radius-md);
}

.view-toggle {
    display: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.view-btn {
    padding: var(--space-2);
    background: var(--color-white);
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: all 0.2s;
}

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

.view-btn.active {
    background: var(--color-primary);
    color: var(--color-white);
}

.filter-toggle-mobile {
    margin-inline-start: auto;
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.active-filter {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
}

.remove-filter {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: var(--text-lg);
    line-height: 1;
    padding: 0;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
}

.results-grid.view-list {
    grid-template-columns: 1fr;
}

.results-grid.view-list .ad-card {
    display: flex;
}

.results-grid.view-list .ad-card-image {
    width: 200px;
    flex-shrink: 0;
}

.results-grid.view-list .ad-card-content {
    flex: 1;
}

/* Filter Sheet (Mobile) */
.filter-sheet {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
}

.filter-sheet.active {
    display: block;
}

.filter-sheet-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.filter-sheet-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 80vh;
    background: var(--color-white);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    display: flex;
    flex-direction: column;
}

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

.filter-sheet-header h2 {
    font-size: var(--text-lg);
    font-weight: 600;
    margin: 0;
}

.filter-sheet-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-4);
}

.filter-sheet-footer {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-4);
    border-top: 1px solid var(--color-border);
}

.filter-sheet-footer .btn {
    flex: 1;
}

@media (min-width: 768px) {
    .results-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .view-toggle {
        display: flex;
    }

    .filter-toggle-mobile {
        display: none;
    }
}

/* iPad-specific fixes (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    /* Ensure ad card images display properly on iPad */
    .ad-card-image {
        display: block !important;
        visibility: visible !important;
        aspect-ratio: 4/3;
        min-height: 200px;
        height: auto !important;
    }

    .ad-card-image img {
        display: block !important;
        visibility: visible !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
        /* Force hardware acceleration on iPad Safari */
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }

    /* Ensure featured grid images display */
    .featured-grid .ad-card-image,
    .results-grid .ad-card-image {
        display: block !important;
    }
}

@media (min-width: 1024px) {
    .search-layout {
        grid-template-columns: 280px 1fr;
    }

    .search-filters {
        display: block;
    }

    .results-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================================================
   AD CARD (Shared Component)
   ========================================================================== */

.ad-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    position: relative;
}

.ad-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.ad-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.ad-card-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    /* Ensure minimum height for Safari/WebKit browsers (iPad fix) */
    min-height: 200px;
    /* Override any fixed height from style.css */
    height: auto !important;
}

.ad-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
    /* Ensure image is visible on all devices including iPad */
    display: block;
    /* WebKit-specific fix for image rendering */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.ad-card:hover .ad-card-image img {
    transform: scale(1.05);
}

.ad-badge {
    position: absolute;
    top: var(--space-3);
    inset-inline-start: var(--space-3);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: 600;
}

.ad-badge.featured {
    background: var(--color-accent);
    color: var(--color-text);
}

.favorite-btn {
    position: absolute;
    top: var(--space-3);
    inset-inline-end: var(--space-3);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--color-white);
    border: none;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    transition: all 0.2s;
    z-index: 1;
}

.favorite-btn:hover {
    color: var(--color-secondary);
}

.favorite-btn.active {
    color: var(--color-secondary);
}

.ad-card-content {
    padding: var(--space-4);
}

.ad-card-category {
    font-size: var(--text-xs);
    color: var(--color-primary);
    font-weight: 500;
    margin-bottom: var(--space-1);
}

.ad-card-title {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 var(--space-2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ad-card-rating {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    margin-bottom: var(--space-2);
    font-size: var(--text-sm);
}

.ad-card-rating .stars {
    color: var(--color-accent);
}

.ad-card-rating .rating-value {
    font-weight: 600;
    color: var(--color-text);
}

.ad-card-rating .review-count {
    color: var(--color-text-muted);
}

.ad-card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-3);
}

.meta-location {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.ad-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-3);
    border-top: 1px solid var(--color-border);
}

.ad-card-price {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--color-primary);
}

/* ==========================================================================
   LOADING & EMPTY STATES
   ========================================================================== */

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-8);
    color: var(--color-text-muted);
    gap: var(--space-3);
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-12);
    text-align: center;
    color: var(--color-text-muted);
}

.empty-state svg {
    margin-bottom: var(--space-4);
    opacity: 0.5;
}

.empty-state h2,
.empty-state h3 {
    font-size: var(--text-xl);
    color: var(--color-text);
    margin: 0 0 var(--space-2);
}

.empty-state p {
    margin: 0;
}

.empty-suggestions {
    margin-top: var(--space-6);
    text-align: start;
}

.empty-suggestions h3 {
    font-size: var(--text-base);
    margin-bottom: var(--space-2);
}

.empty-suggestions ul {
    margin: 0;
    padding-inline-start: var(--space-4);
}

.empty-suggestions li {
    font-size: var(--text-sm);
    margin-bottom: var(--space-1);
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-1);
    margin-top: var(--space-8);
}

.pagination-btn {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-white);
    color: var(--color-text);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.pagination-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}

.pagination-dots {
    padding: 0 var(--space-2);
    color: var(--color-text-muted);
}

/* ==========================================================================
   MODAL - Removed duplicate styles, see components.css for modal implementation
   ========================================================================== */

/* ==========================================================================
   AD GALLERY - Improved image layout
   ========================================================================== */

.ad-gallery {
    margin-bottom: var(--space-6);
}

.ad-gallery-main {
    position: relative;
    width: 100%;
    max-height: 500px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: var(--space-3);
    background: var(--color-bg-alt);
}

.ad-gallery-main img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

.ad-gallery-thumbs-wrapper {
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
}

.ad-gallery-thumbs-wrapper::-webkit-scrollbar {
    height: 6px;
}

.ad-gallery-thumbs-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.ad-gallery-thumbs-wrapper::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: var(--radius-full);
}

.ad-gallery-thumbs {
    display: flex;
    gap: var(--space-2);
    padding-bottom: var(--space-2);
}

.gallery-thumb {
    flex-shrink: 0;
    width: 100px;
    height: 80px;
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-fast);
    background: var(--color-bg-alt);
    padding: 0;
}

.gallery-thumb:hover {
    border-color: var(--color-primary-light);
    transform: translateY(-2px);
}

.gallery-thumb.is-active {
    border-color: var(--color-primary);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .ad-gallery-main {
        max-height: 300px;
    }

    .gallery-thumb {
        width: 80px;
        height: 64px;
    }
}

/* ==========================================================================
   AD DESCRIPTION (TC-TWEAK-025 & TC-TWEAK-026)
   ========================================================================== */

.ad-description {
    margin-top: var(--space-6);
}

.ad-description h3 {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-midnight);
    margin-bottom: var(--space-4);
}

.description-content {
    font-size: var(--text-base);
    line-height: 1.7;
    color: var(--color-slate);
    white-space: pre-line; /* Preserve line breaks */
}

/* Bullet point styling for converted - and * lists */
.description-content br + br {
    /* Double breaks create paragraph spacing */
    content: '';
    display: block;
    margin-top: var(--space-4);
}

/* ==========================================================================
   AD DETAILS TABLE
   ========================================================================== */

.ad-details-table {
    margin-top: var(--space-6);
}

.ad-details-table h3 {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-midnight);
    margin-bottom: var(--space-4);
}

.details-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.details-table th,
.details-table td {
    padding: var(--space-3) var(--space-4);
    text-align: left;
    border-bottom: 1px solid var(--color-sand);
}

.details-table tr:last-child th,
.details-table tr:last-child td {
    border-bottom: none;
}

.details-table th {
    width: 40%;
    font-weight: 500;
    color: var(--color-taupe);
    background: var(--color-pearl);
}

.details-table td {
    color: var(--color-charcoal);
    font-weight: 500;
}

/* RTL Support */
[dir="rtl"] .details-table th,
[dir="rtl"] .details-table td {
    text-align: right;
}

/* Contact Section */
.contact-section {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-top: var(--space-6);
    padding: var(--space-4);
    background: var(--color-pearl);
    border-radius: var(--radius-lg);
}

.seller-avatar-small {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--color-sand);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.seller-avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    flex: 1;
}

.contact-buttons .btn {
    flex: 1;
    min-width: 100px;
}

.contact-buttons .btn-outline {
    flex: 0;
    padding: var(--space-2) var(--space-3);
}

/* Sold Notice - replaces contact buttons for sold ads */
.sold-notice {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
    border: 1px solid #86EFAC;
    border-radius: var(--radius-md);
    color: #166534;
    font-weight: 600;
    font-size: var(--text-sm);
    width: 100%;
}

.sold-notice svg {
    color: #22C55E;
    flex-shrink: 0;
}

/* ==========================================================================
   DROPDOWN MENU
   ========================================================================== */

.dropdown-menu {
    position: fixed;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-2);
    min-width: 180px;
    z-index: 100;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    padding: var(--space-2) var(--space-3);
    border: none;
    background: none;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    color: var(--color-text);
    cursor: pointer;
    text-align: start;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--color-bg-alt);
}

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

.dropdown-item.text-danger:hover {
    background: rgba(220, 53, 69, 0.1);
}

/* ==========================================================================
   PAYMENT PAGES (Tokens, Payment, Success, Failure)
   ========================================================================== */

/* Tokens Page */
.tokens-page {
    padding: var(--space-16) 0;
}

.page-header {
    margin-bottom: var(--space-12);
}

.page-header-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.page-title {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: 600;
    color: var(--color-midnight);
    margin-bottom: var(--space-4);
}

.page-subtitle {
    font-size: var(--text-lg);
    color: var(--color-taupe);
    margin: 0;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-primary);
    margin-bottom: var(--space-6);
    transition: gap var(--transition-normal);
}

.back-link:hover {
    gap: var(--space-1);
    color: var(--color-primary-dark);
}

/* Token Balance Card */
.token-balance-card {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    background: var(--color-primary-gradient);
    padding: var(--space-8);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-12);
    box-shadow: var(--shadow-primary);
    color: var(--color-white);
}

.balance-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.balance-info {
    flex: 1;
}

.balance-label {
    font-size: var(--text-sm);
    opacity: 0.9;
    margin-bottom: var(--space-2);
}

.balance-amount {
    font-size: var(--text-3xl);
    font-weight: 700;
}

.balance-number {
    font-family: var(--font-display);
}

.balance-unit {
    font-size: var(--text-lg);
    opacity: 0.8;
}

/* Packages Grid */
.packages-loading,
.packages-error {
    text-align: center;
    padding: var(--space-16) var(--space-4);
}

.packages-error {
    color: var(--color-error);
}

.error-icon {
    margin: 0 auto var(--space-4);
    color: var(--color-error);
}

.packages-grid {
    display: grid;
    gap: var(--space-8);
    grid-template-columns: 1fr;
    margin-bottom: var(--space-16);
}

@media (min-width: 768px) {
    .packages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .packages-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Package Card */
.package-card {
    position: relative;
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-card);
    transition: all var(--transition-slow);
    border: 2px solid transparent;
}

.package-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-primary-light);
}

.package-card-popular {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-primary);
}

.package-badge {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    background: var(--color-accent);
    color: var(--color-white);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-badge);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
}

.package-badge-popular {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
}

.package-savings {
    position: absolute;
    top: var(--space-4);
    left: var(--space-4);
    background: var(--color-success);
    color: var(--color-white);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-badge);
    font-size: var(--text-xs);
    font-weight: 600;
}

.package-header {
    text-align: center;
    margin-bottom: var(--space-6);
}

.package-name {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--color-midnight);
    margin-bottom: var(--space-3);
}

.package-tokens {
    font-size: var(--text-4xl);
    font-weight: 700;
    color: var(--color-primary);
}

.package-tokens span {
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--color-taupe);
}

.package-price {
    text-align: center;
    margin-bottom: var(--space-6);
    padding: var(--space-4) 0;
    border-top: 1px solid var(--color-sand);
    border-bottom: 1px solid var(--color-sand);
}

.price-currency {
    font-size: var(--text-sm);
    color: var(--color-taupe);
}

.price-amount {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--color-midnight);
    margin-inline: var(--space-1);
}

/* Package Validity Badge (Legacy - keep for backward compatibility) */
.package-validity {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-primary);
    background: rgba(101, 44, 143, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
    margin: 0 auto var(--space-4);
    width: fit-content;
    transition: all var(--transition-base);
}

.package-validity svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.package-validity-unlimited {
    color: var(--color-accent);
    background: rgba(212, 175, 55, 0.12);
}

.package-card:hover .package-validity {
    background: rgba(101, 44, 143, 0.15);
    transform: scale(1.02);
}

.package-card:hover .package-validity-unlimited {
    background: rgba(212, 175, 55, 0.18);
}

/* Package Durations - Dual Display (Ad Duration + Use Within) */
.package-durations {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-3) 0;
    margin: var(--space-3) 0;
    border-top: 1px solid var(--color-sand);
}

.duration-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
}

.duration-icon {
    font-size: 16px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.duration-label {
    color: var(--color-taupe);
    font-weight: 500;
    flex-shrink: 0;
}

.duration-value {
    color: var(--color-midnight);
    font-weight: 600;
}

/* Ad Duration - Highlighted in primary color */
.duration-ad .duration-value {
    color: var(--color-primary);
}

/* Never Expires - Special styling */
.never-expires {
    color: #22c55e;
    font-weight: 600;
}

/* Token Type Badges */
.package-type-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    margin-bottom: var(--space-4);
}

.package-type-badge svg {
    flex-shrink: 0;
}

/* Ad Boost - Blue/Electric */
.package-type-boost .package-type-badge,
.package-type-badge.package-type-boost {
    background: linear-gradient(135deg, #EBF5FF 0%, #DBEAFE 100%);
    color: #1D4ED8;
}

.package-type-boost .package-type-badge svg {
    color: #3B82F6;
}

.package-card.package-type-boost {
    border-color: #BFDBFE;
}

.package-card.package-type-boost:hover {
    border-color: #3B82F6;
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.2);
}

/* Featured Ad - Gold/Star */
.package-type-featured .package-type-badge,
.package-type-badge.package-type-featured {
    background: linear-gradient(135deg, #FEF9C3 0%, #FDE68A 100%);
    color: #B45309;
}

.package-type-featured .package-type-badge svg {
    color: #F59E0B;
}

.package-card.package-type-featured {
    border-color: #FDE68A;
}

.package-card.package-type-featured:hover {
    border-color: #F59E0B;
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.2);
}

/* Premium - Purple/Royal */
.package-type-premium .package-type-badge,
.package-type-badge.package-type-premium {
    background: linear-gradient(135deg, #F3E8FF 0%, #E9D5FF 100%);
    color: #7C3AED;
}

.package-type-premium .package-type-badge svg {
    color: #8B5CF6;
}

.package-card.package-type-premium {
    border-color: #DDD6FE;
    background: linear-gradient(135deg, #FFFFFF 0%, #FAF5FF 100%);
}

.package-card.package-type-premium:hover {
    border-color: #8B5CF6;
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.25);
}

/* Package Type Description */
.package-type-desc {
    font-size: var(--text-xs);
    color: var(--color-taupe);
    margin: var(--space-1) 0 var(--space-3);
    text-align: center;
}

.package-description {
    font-size: var(--text-sm);
    color: var(--color-taupe);
    text-align: center;
    margin-bottom: var(--space-6);
}

/* UX-TWEAK-009: Formatted Description Styles */
.package-description p {
    margin: 0 0 var(--space-2, 0.5rem);
}

.package-description p:last-child {
    margin-bottom: 0;
}

.package-description strong {
    font-weight: 600;
    color: var(--color-text, #1A1A2E);
}

.package-description em {
    font-style: italic;
}

.package-description ul,
.package-description ol {
    text-align: left;
    margin: var(--space-2, 0.5rem) 0;
    padding-inline-start: var(--space-5, 1.25rem);
}

.package-description li {
    margin: var(--space-1, 0.25rem) 0;
    line-height: 1.5;
}

[dir="rtl"] .package-description ul,
[dir="rtl"] .package-description ol {
    text-align: right;
}

.package-features {
    list-style: none;
    margin-bottom: var(--space-6);
}

.package-features li {
    padding: var(--space-2) 0;
    padding-inline-start: var(--space-6);
    position: relative;
    font-size: var(--text-sm);
    color: var(--color-charcoal);
}

.package-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    inset-inline-start: 0;
    color: var(--color-success);
    font-weight: 700;
}

/* Token Features */
.token-features {
    margin-bottom: var(--space-16);
}

.features-title {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 600;
    color: var(--color-midnight);
    text-align: center;
    margin-bottom: var(--space-10);
}

.features-grid {
    display: grid;
    gap: var(--space-6);
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.feature-card {
    text-align: center;
    padding: var(--space-6);
    background: var(--color-pearl);
    border-radius: var(--radius-lg);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-4);
    background: var(--color-white);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
}

.feature-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-midnight);
    margin-bottom: var(--space-2);
}

.feature-text {
    font-size: var(--text-sm);
    color: var(--color-taupe);
    margin: 0;
}

/* Token FAQ */
.token-faq {
    max-width: 800px;
    margin: 0 auto;
    margin-bottom: var(--space-16);
}

.faq-title {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 600;
    color: var(--color-midnight);
    text-align: center;
    margin-bottom: var(--space-8);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.faq-item {
    background: var(--color-white);
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.faq-question {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-midnight);
    margin-bottom: var(--space-3);
}

.faq-answer {
    font-size: var(--text-base);
    color: var(--color-charcoal);
    margin: 0;
    line-height: var(--leading-relaxed);
}

/* Payment Page */
.payment-page {
    padding: var(--space-16) 0;
}

.payment-layout {
    display: grid;
    gap: var(--space-8);
    grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
    .payment-layout {
        grid-template-columns: 1fr 2fr;
        gap: var(--space-12);
    }
}

/* Order Summary */
.order-summary-card,
.payment-form-card {
    background: var(--color-white);
    padding: var(--space-8);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
}

.section-title {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--color-midnight);
    margin-bottom: var(--space-6);
}

.summary-loading {
    padding: var(--space-8) 0;
}

.package-info {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--color-sand);
}

.package-icon {
    width: 48px;
    height: 48px;
    background: var(--color-primary-soft);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    flex-shrink: 0;
}

.package-details {
    flex: 1;
}

.package-details .package-name {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-midnight);
    margin: 0 0 var(--space-1);
}

.package-details .package-tokens {
    font-size: var(--text-sm);
    color: var(--color-taupe);
    margin: 0;
}

/* Price Breakdown */
.price-breakdown {
    margin-bottom: var(--space-6);
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) 0;
    font-size: var(--text-base);
}

.price-row span:first-child {
    color: var(--color-charcoal);
}

.price-value {
    font-weight: 600;
    color: var(--color-midnight);
}

.price-row-total {
    border-top: 2px solid var(--color-sand);
    padding-top: var(--space-4);
    margin-top: var(--space-2);
}

.price-total {
    font-size: var(--text-xl);
    color: var(--color-primary);
}

.security-note {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background: var(--color-success-light);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    color: var(--color-success);
}

/* Payment Form */
.tap-card-element {
    margin-bottom: var(--space-4);
}

.tap-card-element:empty {
    display: none;
    margin-bottom: 0;
}

.billing-section {
    margin-bottom: var(--space-6);
}

.billing-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-midnight);
    margin-bottom: var(--space-4);
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
}

.form-row-2 {
    display: grid;
    gap: var(--space-4);
    grid-template-columns: 1fr 1fr;
}

.payment-methods {
    margin-top: var(--space-6);
    padding-top: var(--space-6);
    border-top: 1px solid var(--color-sand);
    text-align: center;
}

.payment-methods-label {
    font-size: var(--text-sm);
    color: var(--color-taupe);
    margin-bottom: var(--space-3);
}

.payment-methods-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.payment-methods-logos img {
    height: 32px;
    width: auto;
    opacity: 0.7;
    transition: opacity var(--transition-normal);
}

.payment-methods-logos img:hover {
    opacity: 1;
}

/* Payment Result Pages */
.payment-success-page,
.payment-failure-page {
    padding: var(--space-16) 0;
    min-height: 80vh;
}

.payment-result-container {
    max-width: 700px;
    margin: 0 auto;
}

.loading-state,
.success-state,
.error-state,
.failure-state {
    text-align: center;
}

.loading-spinner-large {
    width: 80px;
    height: 80px;
    border: 4px solid var(--color-sand);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--space-6);
}

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

.success-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto var(--space-6);
    background: var(--color-success-light);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-success);
}

.failure-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto var(--space-6);
    background: var(--color-error-light);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-error);
}

.result-title {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: 600;
    color: var(--color-midnight);
    margin-bottom: var(--space-4);
}

.result-subtitle {
    font-size: var(--text-lg);
    color: var(--color-taupe);
    margin-bottom: var(--space-10);
}

/* Payment Details Card */
.payment-details-card,
.error-details-card {
    background: var(--color-white);
    padding: var(--space-8);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    margin-bottom: var(--space-8);
}

.details-title {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--color-midnight);
    margin-bottom: var(--space-6);
    text-align: start;
}

.details-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-pearl);
}

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

.details-label {
    font-size: var(--text-sm);
    color: var(--color-taupe);
}

.details-value {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--color-midnight);
    text-align: end;
}

.details-value-highlight {
    color: var(--color-primary);
    font-size: var(--text-lg);
}

.receipt-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-4);
    background: var(--color-info-light);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    color: var(--color-info);
    margin-bottom: var(--space-8);
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    margin-bottom: var(--space-10);
}

@media (min-width: 640px) {
    .action-buttons {
        flex-direction: row;
        justify-content: center;
    }
}

/* Next Steps */
.next-steps {
    margin-bottom: var(--space-10);
}

.next-steps-title {
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--color-midnight);
    text-align: center;
    margin-bottom: var(--space-8);
}

.steps-grid {
    display: grid;
    gap: var(--space-6);
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.step-card {
    text-align: center;
    padding: var(--space-6);
    background: var(--color-pearl);
    border-radius: var(--radius-lg);
}

.step-number {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--space-4);
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xl);
    font-weight: 700;
}

.step-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-midnight);
    margin-bottom: var(--space-2);
}

.step-text {
    font-size: var(--text-sm);
    color: var(--color-taupe);
    margin: 0;
}

/* Error Details */
.error-info {
    margin-bottom: var(--space-6);
}

.error-reason {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--color-error-light);
    border-radius: var(--radius-md);
    color: var(--color-error);
    font-size: var(--text-base);
}

/* Common Issues */
.common-issues {
    margin-bottom: var(--space-10);
}

.issues-title {
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--color-midnight);
    text-align: center;
    margin-bottom: var(--space-8);
}

.issues-grid {
    display: grid;
    gap: var(--space-6);
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .issues-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.issue-card {
    padding: var(--space-6);
    background: var(--color-pearl);
    border-radius: var(--radius-lg);
}

.issue-icon {
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-3);
    background: var(--color-white);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
}

.issue-title {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--color-midnight);
    margin-bottom: var(--space-2);
}

.issue-text {
    font-size: var(--text-sm);
    color: var(--color-taupe);
    margin: 0;
}

/* Help Section */
.help-section {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    padding: var(--space-8);
    background: var(--color-pearl);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-8);
}

.help-icon {
    width: 60px;
    height: 60px;
    background: var(--color-primary-soft);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    flex-shrink: 0;
}

.help-content {
    flex: 1;
    text-align: start;
}

.help-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-midnight);
    margin-bottom: var(--space-2);
}

.help-text {
    font-size: var(--text-sm);
    color: var(--color-taupe);
    margin-bottom: var(--space-3);
}

.help-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-weight: 600;
    color: var(--color-primary);
    transition: gap var(--transition-normal);
}

.help-link:hover {
    gap: var(--space-2);
}

/* Alternative Payment */
.alternative-payment {
    text-align: center;
}

.alt-payment-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-midnight);
    margin-bottom: var(--space-4);
}

/* Loading Skeleton */
.loading-skeleton {
    display: inline-block;
    background: linear-gradient(90deg, var(--color-sand) 25%, var(--color-pearl) 50%, var(--color-sand) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

.skeleton-line {
    height: 1em;
    margin-bottom: 0.5em;
}

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

/* Alerts */
.alert {
    padding: var(--space-4);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-6);
    font-size: var(--text-sm);
}

.alert-error {
    background: var(--color-error-light);
    color: var(--color-error);
    border-left: 4px solid var(--color-error);
}

.alert-success {
    background: var(--color-success-light);
    color: var(--color-success);
    border-left: 4px solid var(--color-success);
}

.alert-info {
    background: var(--color-info-light);
    color: var(--color-info);
    border-left: 4px solid var(--color-info);
}

/* Button Loading State */
.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Responsive Adjustments */
@media (max-width: 767px) {
    .payment-page,
    .tokens-page {
        padding: var(--space-8) 0;
    }

    .page-title {
        font-size: var(--text-3xl);
    }

    .token-balance-card {
        flex-direction: column;
        text-align: center;
    }

    .help-section {
        flex-direction: column;
        text-align: center;
    }

    .help-content {
        text-align: center;
    }

    /* Token Package Durations - Mobile */
    .duration-item {
        font-size: var(--text-xs);
    }

    .duration-icon {
        font-size: 14px;
        width: 20px;
    }
}

/* ============================================
   OTP MODAL STYLES
   ============================================ */

/* Note: This .modal-overlay with flex is specifically for OTP modal pattern
   where overlay wraps content. For other modals like insufficient-tokens-modal,
   overlay is a backdrop layer only (see specific styles below) */
.otp-modal .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 41, 38, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    animation: fadeIn 0.3s ease-out;
    padding: var(--space-4);
}

.otp-modal .modal-content,
.modal-content {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-modal);
    max-width: 480px;
    width: 100%;
    max-height: 90vh; /* TC-TWEAK-B2-007: Prevent modal cutoff */
    overflow-y: auto; /* TC-TWEAK-B2-007: Allow scrolling if content is tall */
    padding: var(--space-8);
    animation: slideUp 0.3s ease-out;
}

.modal-header {
    text-align: center;
    margin-bottom: var(--space-6);
}

.modal-header h2 {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    color: var(--color-midnight);
    margin-bottom: var(--space-2);
}

.modal-header p {
    font-size: var(--text-sm);
    color: var(--color-taupe);
    margin-bottom: 0;
}

.modal-header strong {
    color: var(--color-primary);
    font-weight: 600;
}

.otp-form {
    margin-top: var(--space-6);
}

.otp-input {
    text-align: center;
    font-size: var(--text-xl);
    font-weight: 600;
    letter-spacing: 0.5em;
    padding: var(--space-5);
    font-family: monospace;
}

.otp-resend {
    text-align: center;
    margin-top: var(--space-6);
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-sand);
}

.otp-resend .btn {
    font-size: var(--text-sm);
}

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

/* Mobile responsive */
@media (max-width: 767px) {
    .modal-content {
        padding: var(--space-6);
    }

    .modal-header h2 {
        font-size: var(--text-xl);
    }

    .otp-input {
        font-size: var(--text-lg);
        letter-spacing: 0.3em;
    }
}

/* ==========================================================================
   CATEGORY PAGE
   ========================================================================== */

.category-content {
    padding-top: var(--space-6);
    padding-bottom: var(--space-12);
}

.category-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-8);
    align-items: start;
}

/* Filters Sidebar */
.filters-sidebar {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    position: sticky;
    top: calc(var(--header-height) + var(--space-4));
}

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

.filters-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.filters-close {
    display: none;
}

.filters-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.filter-label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.price-range-inputs {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.price-range-inputs .form-group {
    flex: 1;
    margin: 0;
}

.price-range-inputs .form-input {
    text-align: center;
    padding: var(--space-2) var(--space-3);
}

.price-separator {
    color: var(--color-text-muted);
    font-weight: 500;
}

.rating-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.rating-option {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.rating-option:hover {
    background: var(--color-bg-alt);
}

.rating-option input {
    margin: 0;
}

.rating-stars {
    color: var(--color-gold);
    font-size: var(--text-sm);
}

.rating-text {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.filter-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border);
}

/* Category Results */
.category-results {
    min-width: 0;
}

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

.results-count {
    font-size: var(--text-base);
    color: var(--color-text-muted);
}

.results-count .count-number {
    font-weight: 600;
    color: var(--color-text);
}

.results-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.filters-toggle {
    display: none;
}

.sort-dropdown .form-select {
    min-width: 180px;
}

/* Page Hero for Category */
.page-hero {
    background: linear-gradient(135deg, var(--color-cream) 0%, var(--color-white) 100%);
    padding: var(--space-8) 0;
}

.page-hero-content {
    text-align: center;
}

.page-hero .page-title {
    font-size: var(--text-3xl);
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 var(--space-3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
}

.page-hero .page-title .category-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    .page-hero .page-title .category-icon {
        width: 72px;
        height: 72px;
    }
}

.page-hero .page-title .category-icon-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

@media (min-width: 768px) {
    .page-hero .page-title .category-icon-img {
        width: 72px;
        height: 72px;
    }
}

.page-hero .page-subtitle {
    font-size: var(--text-lg);
    color: var(--color-text-muted);
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Subcategory Pills */
.subcategory-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2);
    margin-top: var(--space-6);
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: var(--space-2) var(--space-4);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    color: var(--color-text);
    text-decoration: none;
    transition: all var(--transition-fast);
}

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

.pill.is-active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}

/* Pagination */
.pagination {
    margin-top: var(--space-8);
}

.pagination-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}

.page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: var(--space-2);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    color: var(--color-text);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.page-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.page-btn.is-active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}

.page-dots {
    padding: 0 var(--space-2);
    color: var(--color-text-muted);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-12) var(--space-6);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: var(--space-4);
}

.empty-state h3 {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 var(--space-2);
}

.empty-state p {
    font-size: var(--text-base);
    color: var(--color-text-muted);
    margin: 0 0 var(--space-6);
}

/* Loading State */
.loading-state {
    display: contents;
}

.error-state {
    text-align: center;
    padding: var(--space-8);
    color: var(--color-error);
}

/* Mobile Responsive - Category Page */
@media (max-width: 991px) {
    .category-layout {
        grid-template-columns: 1fr;
    }

    .filters-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: var(--z-modal);
        border-radius: 0;
        transform: translateX(-100%);
        transition: transform var(--transition-normal);
        overflow-y: auto;
    }

    .filters-sidebar.is-open {
        transform: translateX(0);
    }

    .filters-close {
        display: flex;
    }

    .filters-toggle {
        display: flex;
    }
}

@media (max-width: 767px) {
    .page-hero {
        padding: var(--space-6) 0;
    }

    .page-hero .page-title {
        font-size: var(--text-2xl);
    }

    .page-hero .page-subtitle {
        font-size: var(--text-base);
    }

    .results-header {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-4);
    }

    .results-actions {
        justify-content: space-between;
    }

    .sort-dropdown .form-select {
        min-width: 140px;
    }
}

/* ========================================
   MY ADS SECTION
   ======================================== */

.my-ads-filters {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
}

.my-ads-filters .filter-group {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.my-ads-filters .filter-label {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    white-space: nowrap;
}

.my-ads-filters .form-select-sm {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    min-width: 150px;
}

.my-ads-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.my-ad-card {
    display: flex;
    gap: var(--space-4);
    padding: var(--space-4);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: box-shadow 0.2s ease;
}

.my-ad-card:hover {
    box-shadow: var(--shadow-md);
}

.my-ad-image {
    position: relative; /* Required for absolutely positioned badges */
    flex-shrink: 0;
    width: 120px;
    height: 90px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-surface);
}

.my-ad-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.my-ad-image .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--color-text-muted);
}

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

.my-ad-title {
    font-size: var(--text-base);
    font-weight: 600;
    margin: 0 0 var(--space-2);
}

.my-ad-title a {
    color: var(--color-text);
    text-decoration: none;
}

.my-ad-title a:hover {
    color: var(--color-primary);
}

.my-ad-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-2);
}

.my-ad-price {
    font-weight: 600;
    color: var(--color-primary);
}

.my-ad-status {
    display: inline-block;
    padding: var(--space-1) var(--space-2);
    font-size: var(--text-xs);
    font-weight: 500;
    border-radius: var(--radius-full);
    text-transform: capitalize;
}

.my-ad-status.status-publish,
.my-ad-status.status-active {
    background: var(--color-success-light, #d4edda);
    color: var(--color-success, #28a745);
}

.my-ad-status.status-pending {
    background: var(--color-warning-light, #fff3cd);
    color: var(--color-warning, #856404);
}

.my-ad-status.status-expired {
    background: var(--color-error-light, #f8d7da);
    color: var(--color-error, #dc3545);
}

.my-ad-status.status-sold {
    background: var(--color-info-light, #cce5ff);
    color: var(--color-info, #004085);
}

.my-ad-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    align-items: center;
}

.my-ad-featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: var(--space-1) var(--space-2);
    font-size: var(--text-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #D4AF37, #FFD700);
    color: #fff;
    text-shadow: 0 1px 1px rgba(0,0,0,0.2);
}

.my-ad-featured-badge svg {
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.2));
}

.my-ad-expiring-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: var(--space-1) var(--space-2);
    font-size: var(--text-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #FFB74D 0%, #F59E0B 100%);
    color: #1A1A2E;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.25);
}

.my-ad-expiring-badge.is-critical {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: #FFFFFF;
    animation: badge-pulse 1.5s ease-in-out infinite;
}

.my-ad-expiring-badge svg {
    flex-shrink: 0;
}

.my-ad-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 160px;
    flex-shrink: 0;
}

.ad-actions-row {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.btn-action-text {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: transparent;
    border: none;
    color: #6B7280;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s;
    text-decoration: none;
}

.btn-action-text:hover {
    color: #1F2937;
}

.btn-action-text.btn-action-danger:hover {
    color: #EF4444;
}

.btn-action-text.btn-action-success:hover {
    color: #10B981;
}

.ad-actions-promotional {
    gap: 8px;
}

.ad-actions-promotional .btn {
    flex: 1;
    justify-content: center;
}

.my-ad-actions .btn-sm {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    white-space: nowrap;
}

.btn-danger-outline {
    color: var(--color-error, #dc3545);
    border-color: var(--color-error, #dc3545);
    background: transparent;
}

.btn-danger-outline:hover {
    background: var(--color-error, #dc3545);
    color: white;
}

/* Delete Modal */
#delete-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

#delete-modal.active {
    display: flex;
}

#delete-modal .modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

#delete-modal .modal-container {
    position: relative;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    max-width: 400px;
    width: 90%;
    z-index: 1;
}

#delete-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-top: 1px solid var(--color-border);
}

.delete-ad-title {
    font-weight: 600;
    color: var(--color-text);
    margin-top: var(--space-2);
}

/* Empty state */
.my-ads-list .empty-state {
    text-align: center;
    padding: var(--space-12) var(--space-6);
}

.my-ads-list .empty-icon {
    font-size: 3rem;
    margin-bottom: var(--space-4);
}

.my-ads-list .empty-state h3 {
    margin: 0 0 var(--space-2);
}

.my-ads-list .empty-state p {
    color: var(--color-text-muted);
    margin-bottom: var(--space-4);
}

/* Responsive */
@media (max-width: 768px) {
    .my-ad-card {
        flex-direction: column;
    }

    .my-ad-image {
        width: 100%;
        height: 150px;
    }

    .my-ad-actions {
        flex-direction: row;
        justify-content: flex-end;
    }

    .my-ads-filters {
        flex-direction: column;
    }
}

/* ============================================
   AD SINGLE - ACTIONS CARD FIX
   ============================================ */

/* Fix Save/Share buttons layout to be on same row */
.sidebar-card.actions-card {
    display: flex;
    flex-direction: row;
    gap: var(--space-3);
    padding: var(--space-4);
}

.actions-card .action-btn {
    flex: 1;
    justify-content: center;
}

.actions-card .action-btn.is-active {
    color: var(--color-secondary);
}

/* Ensure responsive behavior */
@media (max-width: 480px) {
    .sidebar-card.actions-card {
        flex-direction: column;
    }
}

/* ==========================================================================
   OWNER ACTIONS CARD (UX-TWEAK-003, UX-TWEAK-007)
   ========================================================================== */

.owner-actions-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-4);
    margin-top: var(--space-4);
    background: var(--color-white);
    border: 1px solid var(--color-sand);
    border-radius: var(--radius-lg);
}

.sidebar-card-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-charcoal);
    margin: 0 0 var(--space-2) 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.owner-action-btn {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--color-pearl);
    border: 1px solid var(--color-sand);
    border-radius: var(--radius-md);
    color: var(--color-charcoal);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-normal);
}

.owner-action-btn:hover {
    background: var(--color-sand);
    color: var(--color-midnight);
}

.owner-action-btn svg {
    flex-shrink: 0;
}

/* Upgrade to Featured - Gold accent */
.owner-action-upgrade {
    background: linear-gradient(135deg, #FFFBF0 0%, #FFF8DC 100%);
    border-color: #D4AF37;
    color: #8B7500;
}

.owner-action-upgrade:hover {
    background: linear-gradient(135deg, #FFF8DC 0%, #FFE4A8 100%);
    border-color: #B8860B;
}

.owner-action-upgrade svg {
    color: #D4AF37;
}

/* Mark as Sold - Green accent */
.owner-action-sold {
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
    border-color: #10B981;
    color: #047857;
}

.owner-action-sold:hover {
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
    border-color: #059669;
}

.owner-action-sold svg {
    color: #10B981;
}

.owner-action-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* RTL Support */
[dir="rtl"] .owner-action-btn {
    flex-direction: row-reverse;
}

/* TC-TWEAK-017: Sold Status Indicator */
.owner-status-sold {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
    border: 1px solid #10B981;
    border-radius: var(--radius-md);
    color: #047857;
    font-size: var(--text-sm);
    font-weight: 600;
}

.owner-status-sold svg {
    color: #10B981;
    flex-shrink: 0;
}

[dir="rtl"] .owner-status-sold {
    flex-direction: row-reverse;
}

/* TC-TWEAK-017: Sold Badge on Ad Images */
.ad-card-badge-sold {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
    color: #ffffff !important;
}

/* ==========================================================================
   TOKEN WARNING COMPONENTS (Sprint 1: Insufficient Tokens UX)
   ========================================================================== */

/* Token Warning Banner */
.token-warning-banner {
    background: linear-gradient(135deg, #FFF3CD 0%, #FFF8DC 100%);
    border: 1px solid #FFC107;
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    padding-right: 48px;
    margin-bottom: var(--space-6);
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.15);
    position: relative;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.banner-content {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.banner-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 193, 7, 0.2);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-icon svg {
    color: #F59E0B;
    width: 24px;
    height: 24px;
}

.banner-text {
    flex: 1;
    min-width: 0;
}

.banner-title {
    font-size: var(--text-base);
    font-weight: 600;
    color: #92400E;
    margin: 0 0 var(--space-1);
}

.banner-message {
    font-size: var(--text-sm);
    color: #78350F;
    margin: 0;
    line-height: 1.5;
}

.banner-dismiss {
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    inset-inline-end: var(--space-2);
    background: none;
    border: none;
    padding: var(--space-2);
    cursor: pointer;
    color: #92400E;
    opacity: 0.6;
    transition: opacity 0.2s;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    width: 32px;
    height: 32px;
}

.banner-dismiss:hover {
    opacity: 1;
    background: rgba(146, 64, 14, 0.1);
}

.banner-dismiss:focus {
    outline: 2px solid #F59E0B;
    outline-offset: 2px;
}

/* Token Success Banner */
.token-success-banner {
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
    border: 1px solid #10B981;
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-bottom: var(--space-6);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
    animation: slideDown 0.3s ease-out, fadeOut 0.3s ease-out 4.7s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.token-success-banner .banner-content {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.token-success-banner .banner-icon {
    background: rgba(16, 185, 129, 0.2);
}

.token-success-banner .banner-icon svg {
    color: #059669;
}

.token-success-banner .banner-title {
    color: #065F46;
}

.token-success-banner .banner-message {
    color: #047857;
}

.token-success-banner strong {
    color: #059669;
    font-weight: 700;
}

/* WP-BATCH2-005: Draft Restore Banner */
.draft-restore-banner {
    background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
    border: 1px solid #3B82F6;
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    padding-right: 48px;
    margin-bottom: var(--space-6);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
    position: relative;
    animation: slideDown 0.3s ease-out;
}

.draft-restore-banner .banner-content {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.draft-restore-banner .banner-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-full);
}

.draft-restore-banner .banner-icon svg {
    color: #2563EB;
}

.draft-restore-banner .banner-text {
    flex: 1;
    min-width: 200px;
}

.draft-restore-banner .banner-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: #1E40AF;
    margin: 0 0 var(--space-1) 0;
}

.draft-restore-banner .banner-message {
    font-size: var(--text-sm);
    color: #1E3A8A;
    margin: 0;
}

.draft-restore-banner .banner-actions {
    display: flex;
    gap: var(--space-2);
    flex-shrink: 0;
}

.draft-restore-banner .btn-primary {
    background: #2563EB;
    border-color: #2563EB;
}

.draft-restore-banner .btn-primary:hover {
    background: #1D4ED8;
    border-color: #1D4ED8;
}

.draft-restore-banner .btn-outline {
    color: #1E40AF;
    border-color: #3B82F6;
}

.draft-restore-banner .btn-outline:hover {
    background: rgba(59, 130, 246, 0.1);
}

.draft-restore-banner .banner-dismiss {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    color: #3B82F6;
    transition: all 0.2s;
}

.draft-restore-banner .banner-dismiss:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #1E40AF;
}

/* RTL Support for Draft Restore Banner */
[dir="rtl"] .draft-restore-banner {
    padding-right: var(--space-4);
    padding-left: 48px;
}

[dir="rtl"] .draft-restore-banner .banner-dismiss {
    right: auto;
    left: var(--space-3);
}

/* Mobile responsive */
@media (max-width: 640px) {
    .draft-restore-banner .banner-content {
        flex-direction: column;
        align-items: flex-start;
        text-align: start;
    }

    .draft-restore-banner .banner-actions {
        width: 100%;
        justify-content: flex-start;
        margin-top: var(--space-2);
    }
}

/* Modal Base (if not already in components.css) */
/* TC-TWEAK-B2-007: Fix modal positioning - override components.css transform */
/* IMPORTANT: Exclude #contact-modal and #share-modal which have their own specific styles */
.modal:not(#contact-modal):not(#share-modal) {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    inset: 0 !important;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    animation: fadeIn 0.2s ease-out;
    /* Override transform from components.css that causes top-left positioning */
    transform: none !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    background: transparent !important;
}

/* TC-TWEAK-B2-007: Ensure modal displays centered when active */
/* IMPORTANT: Exclude #contact-modal and #share-modal which have their own specific styles */
.modal.is-open:not(#contact-modal):not(#share-modal),
.modal.is-active:not(#contact-modal):not(#share-modal) {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transform: none !important;
}

/* Ensure insufficient tokens modal displays correctly */
#insufficient-tokens-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    display: none;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 99999 !important;
    padding: var(--space-4) !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    /* Override transform from components.css that causes top-left positioning */
    transform: none !important;
    background: transparent !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#insufficient-tokens-modal.is-open {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* TC-TWEAK-B2-007: Contact, Share modals - complete fix for positioning */
/* These modals are styled as standalone centered dialog boxes */

/* Contact and Share modals - standalone centered dialog box */
#contact-modal,
#share-modal {
    /* Explicit positioning - centered on screen */
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    /* Size constraints */
    width: 90% !important;
    max-width: 480px !important;
    height: auto !important;
    max-height: 90vh !important;
    /* Visual styling */
    background: var(--color-white, #fff) !important;
    border-radius: var(--radius-xl, 16px) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    /* Layout */
    display: none;
    flex-direction: column !important;
    overflow-y: auto !important;
    /* Stacking - must be above backdrop (99999) */
    z-index: 100000 !important;
    /* Reset spacing */
    padding: 0 !important;
    margin: 0 !important;
    /* Hidden by default */
    opacity: 0;
    visibility: hidden;
    /* Ensure clickable */
    pointer-events: auto !important;
}

#contact-modal.is-active,
#share-modal.is-active {
    /* CRITICAL: Make visible */
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    /* Ensure all positioning is applied correctly */
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
}

/* Backdrop for contact/share modals */
#contact-modal-backdrop,
#share-modal-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.6) !important;
    z-index: 99999 !important;
    display: none;
}

#contact-modal-backdrop.is-active,
#share-modal-backdrop.is-active {
    display: block !important;
}

/* Modal content styling */
#contact-modal .modal-header,
#share-modal .modal-header {
    padding: var(--space-5, 20px) var(--space-6, 24px);
    border-bottom: 1px solid var(--color-gray-200, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#contact-modal .modal-body,
#share-modal .modal-body {
    padding: var(--space-6, 24px);
    flex: 1;
}

#contact-modal .modal-footer,
#share-modal .modal-footer {
    padding: var(--space-4, 16px) var(--space-6, 24px);
    border-top: 1px solid var(--color-gray-200, #e5e7eb);
    display: flex;
    gap: var(--space-3, 12px);
    justify-content: flex-end;
}

/* OTP modal - same fix */
#otp-verification-modal {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: var(--color-white, #fff) !important;
    border-radius: var(--radius-xl, 16px) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    max-width: 520px !important;
    width: 90% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    z-index: 100000 !important;
    display: none;
    flex-direction: column !important;
    padding: 0 !important;
    margin: 0 !important;
}

#otp-verification-modal.is-active {
    display: flex !important;
}

/* TC-WA-002 FIX: Ensure OTP modal backdrop is visible */
#otp-modal-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.6) !important;
    z-index: 99999 !important;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

#otp-modal-backdrop.is-active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* TC-TWEAK-017: Mark as Sold modals - override components.css positioning */
#mark-sold-modal,
#mark-sold-success-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    display: none;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 99999 !important;
    padding: var(--space-4) !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    transform: none !important;
    background: transparent !important;
    visibility: visible !important;
    opacity: 1 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    max-width: none !important;
    max-height: none !important;
    overflow: visible !important;
}

#mark-sold-modal.is-active,
#mark-sold-success-modal.is-active {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#mark-sold-modal .modal-backdrop,
#mark-sold-success-modal .modal-backdrop {
    position: absolute !important;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block !important;
    z-index: 1;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

#mark-sold-modal .modal-container,
#mark-sold-success-modal .modal-container {
    position: relative;
    z-index: 2;
    margin: auto;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Default modal overlay - backdrop layer only (not flex container) */
.modal .modal-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1;
    display: block;
}

/* Ensure insufficient tokens modal overlay is a pure backdrop */
#insufficient-tokens-modal .modal-overlay {
    position: absolute !important;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block !important;
    align-items: unset !important;
    justify-content: unset !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 1;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

#insufficient-tokens-modal .modal-container {
    position: relative;
    z-index: 2;
    margin: auto;
}

.modal-container {
    position: relative;
    background: var(--color-white);
    border-radius: var(--radius-xl);
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
    z-index: 2;
}

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

.modal-sm {
    max-width: 420px;
}

.modal-content {
    padding: var(--space-8) var(--space-6);
    text-align: center;
    position: relative;
}

.modal-close {
    position: absolute;
    top: var(--space-4);
    inset-inline-end: var(--space-4);
    background: none;
    border: none;
    padding: var(--space-2);
    cursor: pointer;
    color: var(--color-text-muted);
    transition: all 0.2s;
    border-radius: var(--radius-md);
}

.modal-close:hover {
    color: var(--color-text);
    background: var(--color-bg-alt);
}

.modal-close:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Modal Icon */
.modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-6);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-icon-warning {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
}

.modal-icon-warning svg {
    color: #D97706;
}

/* Modal Text */
.modal-title {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 var(--space-3);
}

.modal-description {
    font-size: var(--text-base);
    color: var(--color-text-muted);
    margin: 0 0 var(--space-6);
    line-height: 1.6;
}

/* Token Balance Display */
.token-balance-display {
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-bottom: var(--space-6);
    text-align: left;
}

.balance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) 0;
}

.balance-row:not(:last-child) {
    border-bottom: 1px solid var(--color-border);
}

.balance-label {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    font-weight: 500;
}

.balance-value {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--color-text);
}

.balance-required {
    color: var(--color-primary);
}

.balance-current {
    color: var(--color-text);
}

.balance-shortage {
    background: #FEF2F2;
    margin: var(--space-3) calc(var(--space-4) * -1) calc(var(--space-4) * -1);
    padding: var(--space-3) var(--space-4);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.balance-needed {
    color: #DC2626;
    font-weight: 700;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
}

.modal-actions .btn {
    flex: 1;
}

/* Responsive */
@media (max-width: 640px) {
    .banner-content {
        flex-direction: column;
        text-align: center;
    }

    .banner-dismiss {
        position: static;
        margin-top: var(--space-3);
        align-self: center;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: var(--space-6) var(--space-4);
    }

    .modal-actions {
        flex-direction: column-reverse;
    }

    .modal-actions .btn {
        width: 100%;
    }
}

/* RTL Support */
[dir="rtl"] .banner-dismiss {
    right: auto;
    left: var(--space-3);
}

[dir="rtl"] .modal-close {
    right: auto;
    left: var(--space-4);
}

[dir="rtl"] .token-balance-display {
    text-align: right;
}

/* ==========================================================================
   TOKEN VALIDITY SYSTEM (Sprint 2: Token Expiration Warnings)
   ========================================================================== */

/* Stat Card Warning Variant */
.stat-card-warning {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border: 1px solid #F59E0B;
}

.stat-card-warning .stat-icon {
    background: rgba(245, 158, 11, 0.2);
    color: #D97706;
}

.stat-card-warning .stat-value {
    color: #92400E;
}

.stat-card-warning .stat-label {
    color: #78350F;
}

.stat-link {
    display: inline-block;
    margin-top: var(--space-2);
    font-size: var(--text-sm);
    color: #D97706;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.stat-link:hover {
    color: #B45309;
    text-decoration: underline;
}

/* Dashboard Notice */
.dashboard-notice {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    margin-bottom: var(--space-6);
    box-shadow: var(--shadow-sm);
}

.dashboard-notice-warning {
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    border: 1px solid #FCD34D;
}

.notice-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.notice-icon svg {
    color: #D97706;
}

.notice-content {
    flex: 1;
    min-width: 0;
}

.notice-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: #92400E;
    margin: 0 0 var(--space-2);
}

.notice-message {
    font-size: var(--text-sm);
    color: #78350F;
    margin: 0 0 var(--space-3);
    line-height: 1.6;
}

.notice-expiry-date {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: #92400E;
    font-weight: 500;
    background: rgba(245, 158, 11, 0.1);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    display: inline-flex;
}

.notice-expiry-date svg {
    flex-shrink: 0;
    color: #D97706;
}

.notice-actions {
    flex-shrink: 0;
}

/* Dashboard Promo Banner (Boost Your Ad) */
.dashboard-promo-banner {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-5);
    background: linear-gradient(135deg, rgba(230, 230, 250, 0.3) 0%, rgba(253, 251, 247, 0.5) 100%);
    border: 2px solid var(--color-primary-light);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-6);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.dashboard-promo-banner:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.dashboard-promo-banner .promo-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(101, 44, 143, 0.3);
}

.dashboard-promo-banner .promo-icon svg {
    color: var(--color-white);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.dashboard-promo-banner .promo-content {
    flex: 1;
    min-width: 0;
}

.dashboard-promo-banner .promo-content h4 {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-primary-dark);
    margin: 0 0 var(--space-1);
}

.dashboard-promo-banner .promo-content p {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin: 0;
    line-height: 1.5;
}

.dashboard-promo-banner .btn {
    flex-shrink: 0;
    white-space: nowrap;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    padding: var(--space-3) var(--space-5);
    font-weight: 500;
    transition: all 0.2s ease;
}

.dashboard-promo-banner .btn:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(101, 44, 143, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-notice {
        flex-direction: column;
        text-align: center;
    }

    .notice-icon {
        margin: 0 auto;
    }

    .notice-actions {
        width: 100%;
    }

    .notice-actions .btn {
        width: 100%;
    }

    .dashboard-promo-banner {
        flex-direction: column;
        text-align: center;
        gap: var(--space-3);
        padding: var(--space-4);
    }

    .dashboard-promo-banner .promo-icon {
        width: 48px;
        height: 48px;
    }

    .dashboard-promo-banner .btn {
        width: 100%;
    }

    /* Modal responsive fixes */
    .modal-container,
    #insufficient-tokens-modal .modal-container {
        width: 95%;
        max-width: 95%;
        margin: auto;
    }

    .modal-content {
        padding: var(--space-6) var(--space-4);
    }

    .modal-actions {
        flex-direction: column;
        gap: var(--space-3);
    }

    .modal-actions .btn {
        width: 100%;
    }

    .modal-icon {
        width: 64px;
        height: 64px;
    }

    .modal-title {
        font-size: var(--text-xl);
    }
}

/* ==========================================================================
   PREMIUM SPOTLIGHT SECTION (Homepage)
   ========================================================================== */

.premium-spotlight-section {
    background: linear-gradient(135deg, #FAF5FF 0%, #FDF4FF 50%, #FFFBEB 100%);
    position: relative;
    overflow: hidden;
}

.premium-spotlight-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.premium-spotlight-section .container {
    position: relative;
    z-index: 1;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    margin-bottom: var(--space-3);
}

.section-badge svg {
    width: 14px;
    height: 14px;
}

/* Featured Category Badge */
.section-badge-category {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}

.section-badge-category .category-icon-img,
.section-badge-category .category-icon-emoji {
    width: 18px !important;
    height: 18px !important;
    font-size: 14px !important;
}

/* Featured Category Title - Inline Badge Styling */
.section-title-category {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.section-title-category .category-icon {
    display: flex;
    align-items: center;
    font-size: 24px;
}

.section-title-category .category-icon .category-icon-img {
    width: 24px !important;
    height: 24px !important;
}

.section-title-category .category-icon .category-icon-emoji {
    font-size: 24px !important;
}

.section-title-category .title-highlight {
    color: var(--color-primary);
}

/* Featured Category Section */
.featured-category-section {
    background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg) 100%);
    border-top: 1px solid var(--color-border-light);
}

.featured-category-section:nth-child(even) {
    background: linear-gradient(180deg, var(--color-white) 0%, var(--color-cream) 100%);
}

.view-all-premium {
    background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);
    color: white !important;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-all-premium:hover {
    background: linear-gradient(135deg, #6D28D9 0%, #5B21B6 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(109, 40, 217, 0.3);
}

.spotlight-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

@media (max-width: 1024px) {
    .spotlight-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.spotlight-card-wrapper {
    position: relative;
}

.spotlight-card-wrapper .ad-card {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #F59E0B, #7C3AED) border-box;
    transition: all 0.3s ease;
}

.spotlight-card-wrapper .ad-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(124, 58, 237, 0.2);
}

.spotlight-badge {
    position: absolute;
    top: var(--space-3);
    left: var(--space-3);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: var(--space-1);
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.spotlight-badge svg {
    width: 12px;
    height: 12px;
}

.spotlight-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    padding: var(--space-6);
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.spotlight-cta-text {
    margin: 0;
    font-size: var(--text-base);
    color: var(--color-charcoal);
    font-weight: 500;
}

.spotlight-cta .btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.spotlight-cta .btn svg {
    color: #F59E0B;
}

@media (max-width: 640px) {
    .spotlight-cta {
        flex-direction: column;
        text-align: center;
        gap: var(--space-3);
    }

    .premium-spotlight-section .section-header {
        flex-direction: column;
        text-align: center;
        gap: var(--space-4);
    }

    .view-all-premium {
        align-self: center;
    }
}

/* ==========================================================================
   PRICE DISPLAY COMPONENT (Currency Conversion Feature #6)
   ========================================================================== */

.price-display {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-2, 0.5rem);
}

/* Converted Price (Primary) */
.price-converted,
.price-original-only {
    font-weight: 700;
    color: var(--color-primary, #652C8F);
}

.price-currency {
    font-size: 0.85em;
    font-weight: 600;
    margin-inline-end: var(--space-1, 0.25rem);
}

.price-amount {
    font-size: inherit;
}

/* Original Price (Secondary) */
.price-original {
    font-size: var(--text-sm, 0.875rem);
    font-weight: 400;
    color: var(--color-text-muted, #6B7280);
    cursor: help;
}

/* Tooltip for Original Price */
.price-original[title] {
    text-decoration: underline dotted;
    text-underline-offset: 2px;
}

/* Call for Price - BHD 0 Display */
.price-call-for-price {
    font-size: var(--text-lg, 1.125rem);
    font-weight: 600;
    color: var(--color-primary, #652C8F);
    font-style: italic;
}

.ad-card .price-call-for-price {
    font-size: var(--text-base, 1rem);
}

/* Size Variants */
.price-display--sm {
    font-size: var(--text-sm, 0.875rem);
}

.price-display--sm .price-original {
    font-size: var(--text-xs, 0.75rem);
}

.price-display--lg {
    font-size: var(--text-2xl, 1.5rem);
}

.price-display--lg .price-original {
    font-size: var(--text-base, 1rem);
}

/* Detailed Format (Ad Single Page) */
.price-display--detailed {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2, 0.5rem);
}

.price-display--detailed .price-main {
    font-size: var(--text-3xl, 1.875rem);
    font-weight: 700;
    color: var(--color-primary, #652C8F);
    display: flex;
    align-items: baseline;
}

.price-display--detailed .price-currency {
    font-size: var(--text-xl, 1.25rem);
    margin-inline-end: var(--space-2, 0.5rem);
}

.price-conversion-info {
    display: flex;
    align-items: center;
    gap: var(--space-2, 0.5rem);
    font-size: var(--text-sm, 0.875rem);
    color: var(--color-text-muted, #6B7280);
    background: var(--color-bg-alt, #F5F3EE);
    padding: var(--space-2, 0.5rem) var(--space-3, 0.75rem);
    border-radius: var(--radius-md, 0.5rem);
}

.price-conversion-info svg {
    flex-shrink: 0;
    color: var(--color-info, #64B5F6);
}

.price-rate {
    font-size: var(--text-xs, 0.75rem);
    opacity: 0.8;
}

/* Card Context Styling */
.ad-card .price-display {
    font-size: var(--text-lg, 1.125rem);
}

.ad-card .price-original {
    display: block;
    width: 100%;
    margin-top: var(--space-1, 0.25rem);
}

/* ==========================================================================
   PRICE TYPE BADGES
   ========================================================================== */

.price-type-badge {
    display: inline-block;
    font-size: var(--text-xs, 0.75rem);
    font-weight: 500;
    padding: var(--space-1, 0.25rem) var(--space-2, 0.5rem);
    border-radius: var(--radius-sm, 0.25rem);
    margin-inline-start: var(--space-2, 0.5rem);
}

.price-type-badge--negotiable {
    background: var(--color-warning-light, #FFF8E1);
    color: #B45309;
}

.price-type-badge--starting {
    background: var(--color-info-light, #E3F2FD);
    color: #1D4ED8;
}

.price-type-badge--contact {
    background: var(--color-bg-alt, #F5F3EE);
    color: var(--color-text-muted, #6B7280);
}

/* ==========================================================================
   RTL SUPPORT FOR PRICE DISPLAY
   ========================================================================== */

[dir="rtl"] .price-display {
    flex-direction: row-reverse;
}

[dir="rtl"] .price-display--detailed {
    flex-direction: column;
    align-items: flex-end;
}

[dir="rtl"] .price-currency {
    margin-inline-start: var(--space-1, 0.25rem);
    margin-inline-end: 0;
}

[dir="rtl"] .price-conversion-info {
    flex-direction: row-reverse;
}

/* ==========================================================================
   MOBILE RESPONSIVE FOR PRICE DISPLAY
   ========================================================================== */

@media (max-width: 480px) {
    .price-display--detailed .price-main {
        font-size: var(--text-2xl, 1.5rem);
    }

    .price-display--detailed .price-currency {
        font-size: var(--text-lg, 1.125rem);
    }

    .price-conversion-info {
        flex-wrap: wrap;
        font-size: var(--text-xs, 0.75rem);
    }

    .price-rate {
        width: 100%;
        margin-top: var(--space-1, 0.25rem);
    }
}

/* ==========================================================================
   SPRINT 2 FEATURES: AD RENEWAL & UPGRADE
   ========================================================================== */

/* ==========================================================================
   EXPIRING SOON BADGE
   ========================================================================== */

.ad-badge--expiring {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1, 0.25rem);
    padding: var(--space-1, 0.25rem) var(--space-2, 0.5rem);
    background: linear-gradient(135deg, var(--color-warning, #FFB74D) 0%, #F59E0B 100%);
    color: #1A1A2E;
    font-size: var(--text-xs, 0.75rem);
    font-weight: 600;
    border-radius: var(--radius-sm, 0.25rem);
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
    animation: pulse-warning 2s ease-in-out infinite;
}

.ad-badge--expiring svg {
    flex-shrink: 0;
}

.ad-badge--expiring strong {
    font-weight: 700;
}

/* Critical: Less than 2 days */
.ad-badge--expiring.is-critical {
    background: linear-gradient(135deg, var(--color-error, #E57373) 0%, #DC2626 100%);
    color: var(--color-white, #FFFFFF);
    animation: pulse-critical 1.5s ease-in-out infinite;
}

/* Pulse animations */
@keyframes pulse-warning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

@keyframes pulse-critical {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.02); opacity: 0.9; }
}

/* Position in ad card */
.my-ad-card .ad-badge--expiring {
    position: absolute;
    top: var(--space-2, 0.5rem);
    left: var(--space-2, 0.5rem);
    z-index: 2;
}

/* ==========================================================================
   FEATURED BADGE
   ========================================================================== */

.ad-badge--featured {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1, 0.25rem);
    padding: var(--space-1, 0.25rem) var(--space-2, 0.5rem);
    background: linear-gradient(135deg, var(--color-accent, #D4AF37) 0%, #B8962E 100%);
    color: var(--color-white, #FFFFFF);
    font-size: var(--text-xs, 0.75rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    border-radius: var(--radius-sm, 0.25rem);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.ad-badge--featured svg {
    flex-shrink: 0;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

/* Position in ad card */
.my-ad-card .ad-badge--featured {
    position: absolute;
    top: var(--space-2, 0.5rem);
    left: var(--space-2, 0.5rem);
    z-index: 2;
}

/* When both badges exist, stack them */
.my-ad-card .ad-badge--featured ~ .ad-badge--expiring {
    top: calc(var(--space-2, 0.5rem) + 28px);
}

/* ==========================================================================
   RENEW BUTTON
   ========================================================================== */

.btn-renew {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2, 0.5rem);
    padding: var(--space-2, 0.5rem) var(--space-4, 1rem);
    background: linear-gradient(135deg, var(--color-primary, #652C8F) 0%, var(--color-primary-dark, #4A1F6B) 100%);
    color: var(--color-white, #FFFFFF);
    border: none;
    border-radius: var(--radius-md, 0.5rem);
    font-size: var(--text-sm, 0.875rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-renew:hover {
    background: linear-gradient(135deg, var(--color-primary-dark, #4A1F6B) 0%, var(--color-primary, #652C8F) 100%);
    box-shadow: 0 4px 12px rgba(101, 44, 143, 0.3);
    transform: translateY(-1px);
}

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

.btn-renew:focus-visible {
    outline: 3px solid var(--color-primary-light, #8B5CF6);
    outline-offset: 2px;
}

.btn-renew:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-renew svg {
    flex-shrink: 0;
}

/* Urgent variant (1-2 days remaining) */
.btn-renew.btn-renew--urgent {
    background: linear-gradient(135deg, var(--color-warning, #FFB74D) 0%, #F59E0B 100%);
    color: #1A1A2E;
    animation: btn-pulse 2s ease-in-out infinite;
}

@keyframes btn-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
}

/* ==========================================================================
   UPGRADE BUTTON
   ========================================================================== */

.btn-upgrade {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2, 0.5rem);
    padding: var(--space-2, 0.5rem) var(--space-4, 1rem);
    background: linear-gradient(135deg, var(--color-accent, #D4AF37) 0%, #B8962E 100%);
    color: var(--color-white, #FFFFFF);
    border: none;
    border-radius: var(--radius-md, 0.5rem);
    font-size: var(--text-sm, 0.875rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-upgrade:hover {
    background: linear-gradient(135deg, #B8962E 0%, var(--color-accent, #D4AF37) 100%);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
    transform: translateY(-1px);
}

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

.btn-upgrade:focus-visible {
    outline: 3px solid var(--color-accent-light, #F4E4BA);
    outline-offset: 2px;
}

.btn-upgrade:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-upgrade svg {
    flex-shrink: 0;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

.btn-accent {
    background: linear-gradient(135deg, var(--color-accent, #D4AF37) 0%, #B8962E 100%);
    color: var(--color-white, #FFFFFF);
}

.btn-accent:hover {
    background: linear-gradient(135deg, #B8962E 0%, var(--color-accent, #D4AF37) 100%);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

/* ==========================================================================
   MODAL ENHANCEMENTS FOR RENEWAL & UPGRADE
   ========================================================================== */

/* Override components.css modal styles to use flexbox centering */
#renewal-modal,
#upgrade-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    display: none;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 9999 !important;
    padding: var(--space-4) !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    /* Override transform from components.css that causes top-left positioning */
    transform: none !important;
    background: transparent !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#renewal-modal.is-active,
#upgrade-modal.is-active {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Fix modal wrapper - override components.css transform-based centering */
#renewal-modal,
#upgrade-modal,
#delete-account-modal {
    /* Reset conflicting styles from components.css */
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    /* Use flexbox centering */
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

#renewal-modal.is-open,
#renewal-modal.is-active,
#upgrade-modal.is-open,
#upgrade-modal.is-active,
#delete-account-modal.is-open,
#delete-account-modal.is-active {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Fix modal backdrop positioning - must be absolute within modal, not fixed */
#renewal-modal .modal-backdrop,
#upgrade-modal .modal-backdrop,
#delete-account-modal .modal-backdrop {
    position: absolute !important;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 0;
}

/* Ensure modal container is centered and above backdrop */
#renewal-modal .modal-container,
#upgrade-modal .modal-container,
#delete-account-modal .modal-container {
    position: relative;
    z-index: 1;
    margin: auto;
    background: var(--color-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-modal);
    max-width: 480px;
    width: 100%;
}

.modal-container--md {
    max-width: 520px;
}

.modal-header--featured {
    background: linear-gradient(135deg, var(--color-accent-soft, #FFFBF0) 0%, var(--color-white, #FFFFFF) 100%);
}

.modal-header--featured .modal-title {
    color: var(--color-text, #1A1A2E);
}

.modal-header--featured .modal-title svg {
    color: var(--color-accent, #D4AF37);
}

/* Section Labels */
.section-label {
    font-size: var(--text-sm, 0.875rem);
    font-weight: 600;
    color: var(--color-text-muted, #6B7280);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 var(--space-3, 0.75rem);
}

/* ==========================================================================
   RENEWAL AD CARD
   ========================================================================== */

.renewal-ad-card,
.upgrade-ad-card {
    display: flex;
    gap: var(--space-4, 1rem);
    padding: var(--space-4, 1rem);
    background: var(--color-bg-alt, #F5F3EE);
    border-radius: var(--radius-lg, 0.75rem);
    margin-bottom: var(--space-6, 1.5rem);
}

.renewal-ad-image,
.upgrade-ad-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md, 0.5rem);
    overflow: hidden;
    background: var(--color-border, #E5E7EB);
}

.renewal-ad-image img,
.upgrade-ad-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.renewal-ad-details,
.upgrade-ad-details {
    flex: 1;
    min-width: 0;
}

.renewal-ad-title,
.upgrade-ad-title {
    font-size: var(--text-base, 1rem);
    font-weight: 600;
    color: var(--color-text, #1A1A2E);
    margin: 0 0 var(--space-2, 0.5rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.renewal-ad-meta,
.upgrade-ad-meta {
    display: flex;
    flex-direction: column;
    gap: var(--space-2, 0.5rem);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-2, 0.5rem);
    font-size: var(--text-sm, 0.875rem);
    color: var(--color-text-muted, #6B7280);
}

.meta-item svg {
    flex-shrink: 0;
}

.meta-item strong {
    color: var(--color-text, #1A1A2E);
    font-weight: 600;
}

.meta-item--expiry svg {
    color: var(--color-warning, #FFB74D);
}

.meta-item--type svg {
    color: var(--color-accent, #D4AF37);
}

.meta-item--current-type svg {
    color: var(--color-text-muted, #6B7280);
}

.expiry-countdown {
    color: var(--color-warning, #FFB74D);
    font-weight: 500;
}

.expiry-countdown.is-critical {
    color: var(--color-error, #E57373);
}

/* ==========================================================================
   BENEFITS GRID (Upgrade Modal)
   ========================================================================== */

.upgrade-benefits {
    margin-bottom: var(--space-6, 1.5rem);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4, 1rem);
}

.benefit-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-4, 1rem);
    background: var(--color-white, #FFFFFF);
    border: 1px solid var(--color-border, #E5E7EB);
    border-radius: var(--radius-lg, 0.75rem);
    transition: all 0.2s ease;
}

.benefit-item:hover {
    border-color: var(--color-accent-light, #F4E4BA);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.1);
    transform: translateY(-2px);
}

.benefit-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-3, 0.75rem);
    background: var(--color-bg-alt, #F5F3EE);
    border-radius: var(--radius-md, 0.5rem);
    color: var(--color-text-muted, #6B7280);
}

.benefit-icon--gold {
    background: var(--color-accent-soft, #FFFBF0);
    color: var(--color-accent, #D4AF37);
}

.benefit-icon--primary {
    background: var(--color-primary-soft, #F3E8FF);
    color: var(--color-primary, #652C8F);
}

.benefit-title {
    font-size: var(--text-sm, 0.875rem);
    font-weight: 600;
    color: var(--color-text, #1A1A2E);
    margin: 0 0 var(--space-1, 0.25rem);
}

.benefit-desc {
    font-size: var(--text-xs, 0.75rem);
    color: var(--color-text-muted, #6B7280);
    margin: 0;
    line-height: 1.4;
}

/* ==========================================================================
   TOKEN TYPE SECTIONS (Multi-type renewal support)
   ========================================================================== */

.token-type-section {
    margin-bottom: var(--space-6, 1.5rem);
}

.token-type-header {
    display: flex;
    align-items: center;
    gap: var(--space-2, 0.5rem);
    margin-bottom: var(--space-4, 1rem);
    padding-bottom: var(--space-3, 0.75rem);
    border-bottom: 2px solid var(--color-border, #E5E7EB);
}

.token-type-icon {
    flex-shrink: 0;
    color: var(--color-primary, #652C8F);
}

#featured-section .token-type-icon {
    color: var(--color-accent, #D4AF37);
}

.token-type-title {
    font-size: var(--text-lg, 1.125rem);
    font-weight: 600;
    color: var(--color-text, #1A1A2E);
    margin: 0;
}

.no-tokens-card {
    display: flex;
    align-items: center;
    gap: var(--space-4, 1rem);
    padding: var(--space-5, 1.25rem);
    border: 2px dashed var(--color-border, #E5E7EB);
    border-radius: var(--radius-lg, 0.75rem);
    background: var(--color-gray-50, #F9FAFB);
}

.no-tokens-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-warning-light, #FEF3C7);
    color: var(--color-warning, #F59E0B);
}

.no-tokens-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4, 1rem);
}

.no-tokens-text {
    font-size: var(--text-sm, 0.875rem);
    color: var(--color-text-muted, #6B7280);
    margin: 0;
}

/* ==========================================================================
   PACKAGE LIST
   ========================================================================== */

.package-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3, 0.75rem);
    margin-bottom: var(--space-4, 1rem);
}

.package-option {
    cursor: pointer;
}

.package-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.package-option-inner {
    display: flex;
    align-items: center;
    gap: var(--space-4, 1rem);
    padding: var(--space-4, 1rem);
    border: 2px solid var(--color-border, #E5E7EB);
    border-radius: var(--radius-lg, 0.75rem);
    background: var(--color-white, #FFFFFF);
    transition: all 0.2s ease;
}

.package-option:hover .package-option-inner {
    border-color: var(--color-primary-light, #8B5CF6);
    background: var(--color-primary-soft, #F3E8FF);
}

.package-option input:checked + .package-option-inner {
    border-color: var(--color-primary, #652C8F);
    background: var(--color-primary-soft, #F3E8FF);
    box-shadow: 0 0 0 4px rgba(101, 44, 143, 0.1);
}

.package-option input:focus-visible + .package-option-inner {
    outline: 3px solid var(--color-primary, #652C8F);
    outline-offset: 2px;
}

/* Radio Indicator */
.package-option-select {
    flex-shrink: 0;
}

.radio-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border, #E5E7EB);
    border-radius: 50%;
    background: var(--color-white, #FFFFFF);
    transition: all 0.2s ease;
}

.package-option input:checked + .package-option-inner .radio-indicator {
    border-color: var(--color-primary, #652C8F);
    background: var(--color-primary, #652C8F);
}

.package-option input:checked + .package-option-inner .radio-indicator::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-white, #FFFFFF);
}

/* Package Info */
.package-option-info {
    flex: 1;
    min-width: 0;
}

.package-name {
    font-size: var(--text-base, 1rem);
    font-weight: 600;
    color: var(--color-text, #1A1A2E);
    margin: 0 0 var(--space-1, 0.25rem);
}

.package-new-expiry {
    display: flex;
    align-items: center;
    gap: var(--space-1, 0.25rem);
    font-size: var(--text-sm, 0.875rem);
    color: var(--color-success, #5D8A66);
    margin: 0;
}

.package-new-expiry svg {
    flex-shrink: 0;
}

.package-new-expiry strong {
    font-weight: 600;
}

/* Package Meta */
.package-option-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-1, 0.25rem);
}

.package-tokens {
    display: flex;
    align-items: baseline;
    gap: var(--space-1, 0.25rem);
}

.token-count {
    font-size: var(--text-xl, 1.25rem);
    font-weight: 700;
    color: var(--color-primary, #652C8F);
}

.token-label {
    font-size: var(--text-sm, 0.875rem);
    color: var(--color-text-muted, #6B7280);
}

.package-days {
    font-size: var(--text-sm, 0.875rem);
    font-weight: 600;
    color: var(--color-success, #5D8A66);
    background: var(--color-success-light, #E8F5E9);
    padding: var(--space-1, 0.25rem) var(--space-2, 0.5rem);
    border-radius: var(--radius-sm, 0.25rem);
}

/* ==========================================================================
   NO PACKAGES NOTICE
   ========================================================================== */

.no-packages-notice {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4, 1rem);
    padding: var(--space-5, 1.25rem);
    background: var(--color-warning-light, #FFF8E1);
    border: 1px solid var(--color-warning, #FFB74D);
    border-radius: var(--radius-lg, 0.75rem);
}

.no-packages-notice .notice-icon {
    flex-shrink: 0;
    color: var(--color-warning, #FFB74D);
}

.no-packages-notice .notice-content {
    flex: 1;
}

.no-packages-notice .notice-text {
    font-size: var(--text-sm, 0.875rem);
    color: var(--color-text, #1A1A2E);
    margin: 0 0 var(--space-3, 0.75rem);
}

/* ==========================================================================
   UPGRADE NOTE
   ========================================================================== */

.upgrade-note {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3, 0.75rem);
    padding: var(--space-4, 1rem);
    background: var(--color-info-light, #E3F2FD);
    border: 1px solid var(--color-info, #64B5F6);
    border-radius: var(--radius-lg, 0.75rem);
    margin-top: var(--space-4, 1rem);
}

.upgrade-note svg {
    flex-shrink: 0;
    color: var(--color-info, #64B5F6);
}

.upgrade-note p {
    font-size: var(--text-sm, 0.875rem);
    color: var(--color-text, #1A1A2E);
    margin: 0;
}

.upgrade-note strong {
    font-weight: 600;
}

/* ==========================================================================
   BUY MORE LINK
   ========================================================================== */

.buy-more-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2, 0.5rem);
    padding: var(--space-3, 0.75rem);
    background: var(--color-bg, #FDFBF7);
    border-radius: var(--radius-md, 0.5rem);
}

.buy-more-link .link-text {
    font-size: var(--text-sm, 0.875rem);
    color: var(--color-text-muted, #6B7280);
}

.buy-more-link .text-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1, 0.25rem);
    font-size: var(--text-sm, 0.875rem);
    font-weight: 600;
    color: var(--color-primary, #652C8F);
    text-decoration: none;
}

.buy-more-link .text-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   RTL SUPPORT
   ========================================================================== */

[dir="rtl"] .my-ad-card .ad-badge--expiring,
[dir="rtl"] .my-ad-card .ad-badge--featured {
    left: auto;
    right: var(--space-2, 0.5rem);
}

[dir="rtl"] .ad-badge--expiring,
[dir="rtl"] .ad-badge--featured {
    flex-direction: row-reverse;
}

[dir="rtl"] .btn-renew,
[dir="rtl"] .btn-upgrade {
    flex-direction: row-reverse;
}

[dir="rtl"] .btn-renew svg,
[dir="rtl"] .btn-upgrade svg {
    transform: scaleX(-1);
}

[dir="rtl"] .renewal-ad-card,
[dir="rtl"] .upgrade-ad-card {
    flex-direction: row-reverse;
}

[dir="rtl"] .meta-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .package-option-inner {
    flex-direction: row-reverse;
}

[dir="rtl"] .package-option-meta {
    align-items: flex-start;
}

[dir="rtl"] .package-new-expiry {
    flex-direction: row-reverse;
}

[dir="rtl"] .buy-more-link .text-link svg {
    transform: scaleX(-1);
}

/* ==========================================================================
   MOBILE RESPONSIVE
   ========================================================================== */

@media (max-width: 640px) {
    .btn-renew,
    .btn-upgrade {
        padding: var(--space-2, 0.5rem) var(--space-3, 0.75rem);
        font-size: var(--text-xs, 0.75rem);
    }

    .btn-renew .btn-text,
    .btn-upgrade .btn-text {
        display: none;
    }

    .modal {
        padding: 0;
        align-items: flex-end;
    }

    .modal-container {
        max-height: 85vh;
        border-radius: var(--radius-xl, 1rem) var(--radius-xl, 1rem) 0 0;
    }

    .modal-header {
        padding: var(--space-4, 1rem);
    }

    .modal-title {
        font-size: var(--text-lg, 1.125rem);
    }

    .modal-body {
        padding: var(--space-4, 1rem);
    }

    .renewal-ad-card,
    .upgrade-ad-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .renewal-ad-image,
    .upgrade-ad-image {
        width: 100%;
        height: 120px;
    }

    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-3, 0.75rem);
    }

    .package-option-inner {
        flex-wrap: wrap;
    }

    .package-option-meta {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-top: var(--space-2, 0.5rem);
        padding-top: var(--space-2, 0.5rem);
        border-top: 1px solid var(--color-border, #E5E7EB);
    }

    .modal-footer {
        flex-direction: column;
        padding: var(--space-4, 1rem);
    }

    .modal-footer .btn {
        width: 100%;
    }
}

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

/* ==========================================================================
   SPRINT 3 FEATURE #2: WELCOME TOKENS BANNER
   ========================================================================== */

.welcome-tokens-banner {
    display: flex;
    align-items: center;
    gap: var(--space-6, 1.5rem);
    background: linear-gradient(135deg, var(--color-primary-soft, #F3E8FF) 0%, var(--color-secondary-soft, #FDF2F0) 100%);
    border: 2px solid var(--color-primary, #652C8F);
    border-radius: var(--radius-lg, 12px);
    padding: var(--space-6, 1.5rem);
    margin-bottom: var(--space-6, 1.5rem);
    position: relative;
    box-shadow: 0 4px 16px rgba(101, 44, 143, 0.1);
    animation: slideInDown 0.5s ease-out;
}

.welcome-tokens-banner .banner-icon {
    font-size: 48px;
    line-height: 1;
    flex-shrink: 0;
}

.welcome-tokens-banner .banner-content {
    flex: 1;
}

.welcome-tokens-banner .banner-content h3 {
    font-family: var(--font-display);
    font-size: var(--text-2xl, 1.5rem);
    font-weight: 700;
    color: var(--color-primary, #652C8F);
    margin: 0 0 var(--space-2, 0.5rem);
}

.welcome-tokens-banner .banner-content p {
    font-size: var(--text-base, 1rem);
    color: var(--color-text, #1A1A2E);
    margin: 0 0 var(--space-3, 0.75rem);
    line-height: 1.5;
}

.welcome-tokens-banner .banner-content p:last-of-type {
    margin-bottom: var(--space-4, 1rem);
}

.welcome-tokens-banner .banner-content p.validity {
    font-size: var(--text-sm, 0.875rem);
    color: var(--color-text-muted, #6B7280);
    font-style: italic;
}

.welcome-tokens-banner .banner-content p.ad-duration-info {
    font-size: var(--text-sm, 0.875rem);
    color: var(--color-primary, #6B21A8);
    font-weight: 500;
    margin-top: var(--space-2, 0.5rem);
}

.welcome-tokens-banner .banner-content strong {
    color: var(--color-primary, #652C8F);
    font-weight: 600;
}

.welcome-tokens-banner .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3, 0.75rem) var(--space-6, 1.5rem);
    background: var(--color-primary, #652C8F);
    color: var(--color-white, #FFFFFF);
    border: none;
    border-radius: var(--radius-md, 8px);
    font-size: var(--text-base, 1rem);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(101, 44, 143, 0.2);
}

.welcome-tokens-banner .btn-primary:hover {
    background: var(--color-primary-dark, #4A1F6B);
    box-shadow: 0 4px 12px rgba(101, 44, 143, 0.3);
    transform: translateY(-2px);
}

.welcome-tokens-banner .dismiss-btn {
    position: absolute;
    top: var(--space-4, 1rem);
    right: var(--space-4, 1rem);
    inset-inline-end: var(--space-4, 1rem);
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: var(--radius-full, 50%);
    color: var(--color-text, #1A1A2E);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-tokens-banner .dismiss-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

.welcome-tokens-banner .dismiss-btn:active {
    transform: scale(0.95);
}

/* RTL Support */
[dir="rtl"] .welcome-tokens-banner .dismiss-btn {
    right: auto;
    left: var(--space-4, 1rem);
    inset-inline-end: auto;
    inset-inline-start: var(--space-4, 1rem);
}

/* Animations */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .welcome-tokens-banner {
        flex-direction: column;
        text-align: center;
        padding: var(--space-5, 1.25rem);
        gap: var(--space-4, 1rem);
    }

    .welcome-tokens-banner .banner-icon {
        font-size: 40px;
    }

    .welcome-tokens-banner .banner-content h3 {
        font-size: var(--text-xl, 1.25rem);
    }

    .welcome-tokens-banner .banner-content p {
        font-size: var(--text-sm, 0.875rem);
    }

    .welcome-tokens-banner .btn-primary {
        width: 100%;
        padding: var(--space-3, 0.75rem) var(--space-4, 1rem);
    }

    /* Token type sections responsive */
    .no-tokens-card {
        flex-direction: column;
        text-align: center;
        gap: var(--space-3, 0.75rem);
    }

    .no-tokens-content {
        flex-direction: column;
        text-align: center;
    }

    .package-option-inner {
        flex-wrap: wrap;
    }

    .package-option-meta {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding-top: var(--space-2, 0.5rem);
        border-top: 1px solid var(--color-border-light, #F3F4F6);
    }
}

/* ==========================================================================
   HOMEPAGE METRICS SECTION
   ========================================================================== */

/* Homepage Metrics Section */
.homepage-metrics {
    background: var(--color-bg-subtle, #f8f9fa);
    padding: var(--space-6, 1.5rem) 0;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
}

/* Metrics Header */
.metrics-header {
    text-align: center;
    margin-bottom: var(--space-4);
}

.metrics-title {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 var(--space-1) 0;
}

.metrics-subtitle {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin: 0;
}

.metrics-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-8, 2rem);
    flex-wrap: wrap;
}

.metric-item {
    display: flex;
    align-items: center;
    gap: var(--space-2, 0.5rem);
    padding: var(--space-3, 0.75rem) var(--space-4, 1rem);
    position: relative;
}

.metric-icon {
    font-size: 24px;
    line-height: 1;
}

.metric-value {
    font-size: var(--text-2xl, 1.5rem);
    font-weight: 700;
    color: var(--color-primary, #652C8F);
    line-height: 1;
}

.metric-label {
    font-size: var(--text-sm, 0.875rem);
    color: var(--color-text-muted, #6b7280);
    font-weight: 500;
    line-height: 1;
}

/* Divider between metrics */
.metric-item:not(:last-child)::after {
    content: '';
    display: block;
    width: 1px;
    height: 40px;
    background: var(--color-border, #e5e7eb);
    margin-left: var(--space-8, 2rem);
    position: absolute;
    right: calc(-1 * var(--space-8, 2rem));
    top: 50%;
    transform: translateY(-50%);
}

/* Responsive */
@media (max-width: 640px) {
    .homepage-metrics {
        padding: var(--space-4, 1rem) 0;
    }

    .metrics-title {
        font-size: var(--text-lg);
    }

    .metrics-grid {
        gap: var(--space-4, 1rem);
    }

    .metric-item {
        flex-direction: column;
        text-align: center;
        gap: var(--space-1, 0.25rem);
        padding: var(--space-2, 0.5rem) var(--space-3, 0.75rem);
    }

    .metric-item:not(:last-child)::after {
        display: none;
    }

    .metric-value {
        font-size: var(--text-xl, 1.25rem);
    }

    .metric-label {
        font-size: var(--text-xs, 0.75rem);
    }
}

/* ==========================================================================
   BACK BUTTON (Ad Single Page)
   ========================================================================== */

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2, 0.5rem);
    padding: var(--space-2, 0.5rem) var(--space-4, 1rem);
    margin-bottom: var(--space-4, 1rem);
    background: #f3f4f6;
    border: 2px solid #6b46c1;
    border-radius: var(--radius-md, 0.5rem);
    color: #6b46c1;
    font-family: var(--font-body);
    font-size: var(--text-sm, 0.875rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-back:hover {
    background: #ede9fe;
    border-color: #7c3aed;
    color: #7c3aed;
    transform: translateX(-2px);
}

.btn-back:active {
    transform: translateX(-3px);
}

.btn-back svg {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.btn-back:hover svg {
    transform: translateX(-2px);
}

/* RTL support */
[dir="rtl"] .btn-back:hover {
    transform: translateX(2px);
}

[dir="rtl"] .btn-back:active {
    transform: translateX(3px);
}

[dir="rtl"] .btn-back:hover svg {
    transform: translateX(2px) scaleX(-1);
}

[dir="rtl"] .btn-back svg {
    transform: scaleX(-1);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .btn-back {
        padding: var(--space-2, 0.5rem) var(--space-3, 0.75rem);
        font-size: var(--text-xs, 0.75rem);
    }

    .btn-back svg {
        width: 16px;
        height: 16px;
    }
}

/* ==========================================================================
   UX-TWEAK-001: WELCOME POP-UP FOR NON-LOGGED USERS
   ========================================================================== */

.welcome-popup-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 41, 38, 0.8);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-4, 1rem);
    animation: fadeIn 0.3s ease-out;
}

.welcome-popup-container {
    position: relative;
    background: var(--color-white, #FFFFFF);
    border-radius: var(--radius-2xl, 1rem);
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
    animation: popupSlideUp 0.4s ease-out;
}

@keyframes popupSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.welcome-popup-modal .modal-close {
    position: absolute;
    top: var(--space-4, 1rem);
    inset-inline-end: var(--space-4, 1rem);
    z-index: 10;
    background: transparent;
    border: none;
    padding: var(--space-2, 0.5rem);
    cursor: pointer;
    color: var(--color-text-muted, #6B7280);
    border-radius: var(--radius-md, 0.5rem);
    transition: all 0.2s ease;
}

.welcome-popup-modal .modal-close:hover {
    background: var(--color-bg-alt, #F9FAFB);
    color: var(--color-text, #1A1A2E);
}

.welcome-popup-content {
    padding: var(--space-10, 2.5rem) var(--space-8, 2rem);
    text-align: center;
}

.welcome-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto var(--space-6, 1.5rem);
    background: linear-gradient(135deg, var(--color-primary-soft, #F3E8FF) 0%, var(--color-secondary-soft, #FDF2F0) 100%);
    border-radius: var(--radius-full, 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse-welcome 2s ease-in-out infinite;
}

@keyframes pulse-welcome {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.welcome-icon svg {
    color: var(--color-accent, #D4AF37);
    filter: drop-shadow(0 2px 4px rgba(212, 175, 55, 0.3));
}

.welcome-icon-emoji {
    font-size: 48px;
    line-height: 1;
}

.welcome-popup-tokens {
    font-size: var(--text-xl, 1.25rem);
}

.welcome-popup-tokens strong {
    display: block;
    font-size: var(--text-2xl, 1.5rem);
    color: var(--color-primary, #652C8F);
    margin-top: var(--space-1, 0.25rem);
}

.welcome-popup-title {
    font-family: var(--font-display, 'Playfair Display', serif);
    font-size: var(--text-3xl, 1.875rem);
    font-weight: 700;
    color: var(--color-text, #1A1A2E);
    margin: 0 0 var(--space-2, 0.5rem);
    line-height: 1.3;
}

.welcome-popup-subtitle {
    font-size: var(--text-lg, 1.125rem);
    font-weight: 500;
    color: var(--color-primary, #652C8F);
    margin: 0 0 var(--space-4, 1rem);
}

.welcome-popup-description {
    font-size: var(--text-base, 1rem);
    color: var(--color-text-muted, #6B7280);
    line-height: 1.6;
    margin: 0 0 var(--space-3, 0.75rem);
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

.welcome-popup-ad-duration {
    font-size: var(--text-sm, 0.875rem);
    color: var(--color-primary, #6B21A8);
    font-weight: 500;
    margin: 0 0 var(--space-6, 1.5rem);
}

.welcome-popup-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-3, 0.75rem);
    margin-bottom: var(--space-4, 1rem);
}

.welcome-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: var(--space-4, 1rem) var(--space-6, 1.5rem);
    background: linear-gradient(135deg, var(--color-primary, #652C8F) 0%, var(--color-primary-dark, #4A1F6B) 100%);
    color: var(--color-white, #FFFFFF);
    border: none;
    border-radius: var(--radius-lg, 0.75rem);
    font-size: var(--text-base, 1rem);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(101, 44, 143, 0.3);
}

.welcome-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(101, 44, 143, 0.4);
}

.welcome-btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: var(--space-4, 1rem) var(--space-6, 1.5rem);
    background: transparent;
    color: var(--color-primary, #652C8F);
    border: 2px solid var(--color-primary, #652C8F);
    border-radius: var(--radius-lg, 0.75rem);
    font-size: var(--text-base, 1rem);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.welcome-btn-secondary:hover {
    background: var(--color-primary-soft, #F3E8FF);
}

.welcome-popup-dismiss {
    background: none;
    border: none;
    padding: var(--space-2, 0.5rem) var(--space-4, 1rem);
    color: var(--color-text-muted, #6B7280);
    font-size: var(--text-sm, 0.875rem);
    cursor: pointer;
    transition: color 0.2s ease;
}

.welcome-popup-dismiss:hover {
    color: var(--color-text, #1A1A2E);
    text-decoration: underline;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .welcome-popup-container {
        max-width: 100%;
        margin: var(--space-4, 1rem);
        border-radius: var(--radius-xl, 1rem);
    }

    .welcome-popup-content {
        padding: var(--space-8, 2rem) var(--space-5, 1.25rem);
    }

    .welcome-icon {
        width: 80px;
        height: 80px;
    }

    .welcome-icon svg {
        width: 48px;
        height: 48px;
    }

    .welcome-popup-title {
        font-size: var(--text-2xl, 1.5rem);
    }

    .welcome-popup-subtitle {
        font-size: var(--text-base, 1rem);
    }

    .welcome-popup-description {
        font-size: var(--text-sm, 0.875rem);
    }
}

/* RTL Support */
[dir="rtl"] .welcome-popup-modal .modal-close {
    right: auto;
    left: var(--space-4, 1rem);
}

/* ==========================================================================
   UX-TWEAK-002: TOKEN BANNER FOR LOGGED-IN USERS
   ========================================================================== */

.token-banner-section {
    background: var(--color-bg-subtle, #F9FAFB);
    padding: var(--space-6, 1.5rem) 0;
    border-bottom: 1px solid var(--color-border-light, #E5E7EB);
}

.token-banner {
    max-width: 900px;
    margin: 0 auto;
}

.token-banner-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6, 1.5rem);
}

.token-banner-loading .loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--color-border, #E5E7EB);
    border-top-color: var(--color-primary, #652C8F);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.token-banner-content {
    display: flex;
    align-items: center;
    gap: var(--space-6, 1.5rem);
    padding: var(--space-5, 1.25rem) var(--space-6, 1.5rem);
    border-radius: var(--radius-xl, 1rem);
    border: 2px solid transparent;
    animation: slideInDown 0.4s ease-out;
}

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

/* Welcome Tokens State - Purple gradient */
.token-banner--welcome {
    background: linear-gradient(135deg, var(--color-primary-soft, #F3E8FF) 0%, #EDE9FE 100%);
    border-color: var(--color-primary, #652C8F);
}

/* Has Tokens State - Gold gradient */
.token-banner--has-tokens {
    background: linear-gradient(135deg, var(--color-accent-soft, #FFFBF0) 0%, #FEF3C7 100%);
    border-color: var(--color-accent, #D4AF37);
}

/* No Tokens State - Subtle gray */
.token-banner--no-tokens {
    background: linear-gradient(135deg, #FFFFFF 0%, #F3F4F6 100%);
    border-color: var(--color-border, #E5E7EB);
}

.token-banner-icon {
    font-size: 48px;
    line-height: 1;
    flex-shrink: 0;
}

.token-banner-text {
    flex: 1;
    min-width: 0;
}

.token-banner-title {
    font-family: var(--font-display, 'Playfair Display', serif);
    font-size: var(--text-xl, 1.25rem);
    font-weight: 700;
    color: var(--color-text, #1A1A2E);
    margin: 0 0 var(--space-1, 0.25rem);
    line-height: 1.3;
}

/* Title color variations */
.token-banner--welcome .token-banner-title {
    color: var(--color-primary, #652C8F);
}

.token-banner--has-tokens .token-banner-title {
    color: var(--color-accent-dark, #B8962E);
}

.token-banner-desc {
    font-size: var(--text-base, 1rem);
    color: var(--color-text-muted, #6B7280);
    margin: 0;
    line-height: 1.5;
}

.token-banner-cta {
    flex-shrink: 0;
    padding: var(--space-3, 0.75rem) var(--space-6, 1.5rem);
    font-weight: 600;
    white-space: nowrap;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .token-banner-section {
        padding: var(--space-4, 1rem) 0;
    }

    .token-banner-content {
        flex-direction: column;
        text-align: center;
        padding: var(--space-5, 1.25rem);
        gap: var(--space-4, 1rem);
    }

    .token-banner-icon {
        font-size: 40px;
    }

    .token-banner-title {
        font-size: var(--text-lg, 1.125rem);
    }

    .token-banner-desc {
        font-size: var(--text-sm, 0.875rem);
    }

    .token-banner-cta {
        width: 100%;
        justify-content: center;
    }
}

/* RTL Support - Same reading order as LTR: Icon → Text → CTA */
/* In RTL: Icon on RIGHT (reading start), CTA on LEFT (reading end) */
[dir="rtl"] .token-banner-content {
    flex-direction: row;
}

[dir="rtl"] .token-banner-icon {
    order: 0; /* visual RIGHT - first in reading order */
}

[dir="rtl"] .token-banner-text {
    order: 1; /* middle */
    text-align: right;
}

[dir="rtl"] .token-banner-cta {
    order: 2; /* visual LEFT - last in reading order */
}

@media (max-width: 768px) {
    [dir="rtl"] .token-banner-content {
        flex-direction: column;
    }

    [dir="rtl"] .token-banner-icon,
    [dir="rtl"] .token-banner-cta,
    [dir="rtl"] .token-banner-text {
        order: unset;
    }

    [dir="rtl"] .token-banner-text {
        text-align: center;
    }
}

/* Token expiry styling */
.token-expiry {
    display: inline-block;
    margin-top: var(--space-1, 0.25rem);
    padding: var(--space-1, 0.25rem) var(--space-2, 0.5rem);
    font-size: var(--text-sm, 0.875rem);
    font-weight: 600;
    color: #B45309;
    background: rgba(251, 191, 36, 0.2);
    border-radius: var(--radius-sm, 4px);
}

.token-banner--welcome .token-expiry {
    color: var(--color-primary-dark, #4C1D95);
    background: rgba(139, 92, 246, 0.15);
}

/* ==========================================================================
   SAFETY ALERTS (UX-TWEAK-013)
   ========================================================================== */

.safety-alert {
    display: flex;
    gap: var(--space-4);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
}

.safety-alert-warning {
    background: #FFF3CD;
    border: 1px solid #FFE69C;
}

.safety-alert-info {
    background: #E0E7FF;
    border: 1px solid #C7D2FE;
}

.safety-alert-compact {
    padding: var(--space-3);
    margin-bottom: var(--space-3);
}

.safety-alert-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.safety-alert-warning .safety-alert-icon {
    color: #B45309;
}

.safety-alert-info .safety-alert-icon {
    color: #4338CA;
}

.safety-alert-content {
    flex: 1;
}

.safety-alert-title {
    display: block;
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--color-charcoal);
    margin-bottom: var(--space-1);
}

.safety-alert-text {
    font-size: var(--text-sm);
    color: var(--color-taupe);
    margin: 0 0 var(--space-2) 0;
    line-height: 1.5;
}

.safety-alert-link {
    font-size: var(--text-sm);
    font-weight: 500;
    color: #6B21A8;
    text-decoration: none;
}

.safety-alert-link:hover {
    text-decoration: underline;
}

/* Compact alert for messaging header */
.safety-alert-compact .safety-alert-content {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.safety-alert-compact .safety-alert-title {
    display: inline;
    margin-bottom: 0;
}

.safety-alert-compact .safety-alert-text {
    display: inline;
    margin: 0;
}

/* RTL Support */
[dir="rtl"] .safety-alert {
    flex-direction: row-reverse;
}

[dir="rtl"] .safety-alert-content {
    text-align: right;
}

[dir="rtl"] .safety-alert-link {
    direction: rtl;
}

/* Contact Safety Modal */
.contact-safety-modal .modal-content {
    max-width: 480px;
}

.contact-safety-tips {
    background: var(--color-pearl);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    margin-bottom: var(--space-5);
}

.contact-safety-tips ul {
    list-style: none;
    padding: 0;
    margin: var(--space-3) 0 0 0;
}

.contact-safety-tips li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-2) 0;
    color: var(--color-charcoal);
    font-size: var(--text-sm);
    line-height: 1.5;
}

.contact-safety-tips li::before {
    content: "•";
    color: #B45309;
    font-weight: bold;
}

.contact-phone-display {
    background: var(--color-white);
    border: 1px solid var(--color-sand);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    margin-top: var(--space-4);
}

.contact-phone-display .phone-icon {
    color: var(--color-primary);
}

.contact-phone-display .phone-number {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-charcoal);
    direction: ltr;
}

.contact-modal-actions {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-4);
}

.contact-modal-actions .btn {
    flex: 1;
}

/* Safety Tips Page */
.safety-tips-page {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-8) var(--space-4);
}

.safety-tips-header {
    text-align: center;
    margin-bottom: var(--space-10);
}

.safety-tips-header h1 {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    color: var(--color-charcoal);
    margin-bottom: var(--space-4);
}

.safety-tips-intro {
    font-size: var(--text-lg);
    color: var(--color-taupe);
    max-width: 600px;
    margin: 0 auto;
}

.safety-section {
    margin-bottom: var(--space-10);
}

.safety-section h2 {
    font-size: var(--text-2xl);
    color: var(--color-charcoal);
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-3);
    border-bottom: 2px solid var(--color-sand);
}

.safety-tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.safety-tip-item {
    display: flex;
    gap: var(--space-4);
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--color-pearl);
}

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

.safety-tip-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: var(--text-sm);
}

.safety-tip-content h3 {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--color-charcoal);
    margin-bottom: var(--space-1);
}

.safety-tip-content p {
    font-size: var(--text-sm);
    color: var(--color-taupe);
    margin: 0;
    line-height: 1.6;
}

.safety-contact-section {
    background: var(--color-primary-soft);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    text-align: center;
}

.safety-contact-section h2 {
    border-bottom: none;
    margin-bottom: var(--space-3);
}

.safety-contact-section p {
    color: var(--color-taupe);
    margin-bottom: var(--space-4);
}

.safety-contact-section a {
    color: var(--color-primary);
    font-weight: 500;
    text-decoration: none;
}

.safety-contact-section a:hover {
    text-decoration: underline;
}

/* Common scams section */
.scams-list {
    display: grid;
    gap: var(--space-3);
}

.scam-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    background: var(--color-error-light);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-error);
}

[dir="rtl"] .scam-item {
    border-left: none;
    border-right: 4px solid var(--color-error);
}

.scam-item svg {
    flex-shrink: 0;
    color: var(--color-error);
}

.scam-item span {
    font-size: var(--text-sm);
    color: var(--color-charcoal);
}

/* RTL for safety tips page */
[dir="rtl"] .safety-tip-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .safety-tip-content {
    text-align: right;
}

[dir="rtl"] .scam-item {
    flex-direction: row-reverse;
}

/* Post Ad Success Safety Tip */
.post-ad-safety-tip {
    background: #E0F2FE;
    border: 1px solid #BAE6FD;
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin-top: var(--space-6);
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
}

.post-ad-safety-tip-icon {
    flex-shrink: 0;
    color: #0284C7;
}

.post-ad-safety-tip-content {
    flex: 1;
}

.post-ad-safety-tip-title {
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--color-charcoal);
    margin-bottom: var(--space-1);
}

.post-ad-safety-tip-text {
    font-size: var(--text-sm);
    color: var(--color-taupe);
    margin: 0;
    line-height: 1.5;
}

[dir="rtl"] .post-ad-safety-tip {
    flex-direction: row-reverse;
}

[dir="rtl"] .post-ad-safety-tip-content {
    text-align: right;
}

/* ============================================================================
   WA-005 & WA-006: WhatsApp Contact & OTP Verification Styles
   ============================================================================ */

/* WA-006: WhatsApp Button */
.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: #25D366;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-whatsapp:hover {
    background-color: #128C7E;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

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

.btn-whatsapp svg {
    flex-shrink: 0;
}

/* WhatsApp Unavailable Message */
.whatsapp-unavailable {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background-color: #FEF2F2;
    border: 1px solid #FEE2E2;
    border-radius: 8px;
    color: #991B1B;
    font-size: 14px;
}

.whatsapp-unavailable svg {
    flex-shrink: 0;
    color: #DC2626;
}

/* Disabled Contact Buttons (for non-logged-in users) */
.contact-buttons .btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.contact-buttons .btn-disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Sign In to Contact Seller Button */
.btn-signin-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.btn-signin-contact:hover {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(101, 44, 143, 0.3);
}

.btn-signin-contact:active {
    transform: translateY(0);
}

.btn-signin-contact svg {
    flex-shrink: 0;
}

[dir="rtl"] .btn-signin-contact {
    flex-direction: row-reverse;
}

/* RTL Support */
[dir="rtl"] .btn-whatsapp {
    flex-direction: row-reverse;
}

[dir="rtl"] .whatsapp-unavailable {
    flex-direction: row-reverse;
}

/* ============================================================================
   WA-005: OTP Verification Modal
   ============================================================================ */

/* OTP Modal Container */
.otp-modal {
    max-width: 520px;
}

.otp-modal .modal-header {
    border-bottom: 1px solid #E5E7EB;
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.otp-modal .modal-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

.otp-modal .modal-title svg {
    color: #6B21A8;
}

.otp-modal .modal-body {
    padding: 24px 32px;
}

.otp-modal .modal-footer {
    border-top: 1px solid #E5E7EB;
    padding-top: 16px;
    margin-top: 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* OTP Sections */
.otp-section {
    display: block;
}

/* Initial State */
.otp-info-text {
    font-size: 15px;
    color: #4B5563;
    margin-bottom: 16px;
    line-height: 1.5;
}

.otp-phone-display {
    background-color: #F3F4F6;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 24px;
    letter-spacing: 1px;
}

.otp-security-note {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6B7280;
    margin-top: 16px;
    padding: 12px;
    background-color: #F9FAFB;
    border-radius: 6px;
}

.otp-security-note svg {
    flex-shrink: 0;
    color: #6B21A8;
}

/* Success Message */
.otp-success-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background-color: #F0FDF4;
    border: 2px solid #10B981;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #065F46;
}

.otp-success-message svg {
    flex-shrink: 0;
    color: #10B981;
}

.otp-success-message strong {
    font-weight: 600;
}

/* OTP Label */
.otp-label {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 16px;
}

/* OTP Inputs Container */
.otp-inputs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: nowrap; /* TC-WA-002 FIX: Prevent wrapping */
    overflow: visible; /* TC-WA-002 FIX: Ensure all inputs visible */
}

/* Individual OTP Input Box */
.otp-input {
    width: 56px;
    height: 64px;
    min-width: 40px; /* TC-WA-002 FIX: Ensure minimum width on mobile */
    border: 2px solid #D1D5DB;
    border-radius: 8px;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    background-color: #FFFFFF;
    color: #111827;
    transition: all 0.2s ease;
    outline: none;
    padding: 0; /* TC-WA-002 FIX: Remove padding that might hide digits */
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    caret-color: #6B21A8; /* TC-WA-002 FIX: Style caret */
    flex-shrink: 0; /* TC-WA-002 FIX: Prevent shrinking */
}

.otp-input:focus {
    border-color: #6B21A8;
    box-shadow: 0 0 0 3px rgba(107, 33, 168, 0.1);
}

.otp-input.error {
    border-color: #EF4444;
    background-color: #FEF2F2;
}

.otp-input.success {
    border-color: #10B981;
    background-color: #F0FDF4;
}

/* OTP Timer */
.otp-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: #F97316;
    margin-bottom: 16px;
}

.otp-timer svg {
    flex-shrink: 0;
}

.otp-timer strong {
    font-weight: 600;
    font-size: 15px;
}

/* OTP Error Message */
.otp-error-message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background-color: #FEF2F2;
    border: 2px solid #EF4444;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #991B1B;
}

.otp-error-message svg {
    flex-shrink: 0;
    color: #EF4444;
}

/* Simple OTP Error (inline text) */
.otp-error {
    color: #DC2626;
    font-size: var(--text-sm, 0.875rem);
    text-align: center;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: rgba(220, 38, 38, 0.08);
    border-radius: var(--radius-sm, 6px);
}

/* OTP Success State */
.otp-success {
    text-align: center;
    padding: var(--space-6, 24px) 0;
}

.otp-success .success-icon {
    width: 64px;
    height: 64px;
    background: rgba(34, 197, 94, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.otp-success .success-icon svg {
    stroke: var(--color-success, #22c55e);
}

.otp-success h4 {
    font-size: var(--text-xl, 1.25rem);
    font-weight: 600;
    color: var(--color-text, #1d2327);
    margin: 0 0 8px;
}

.otp-success p {
    color: var(--color-text-secondary, #666);
    margin: 0 0 20px;
}

/* OTP Resend Section */
.otp-resend {
    text-align: center;
    margin-top: 20px;
}

.otp-resend p {
    font-size: 14px;
    color: #6B7280;
    margin-bottom: 8px;
}

/* TC-WA-005 FIX: Enhanced btn-link styling for visibility */
.btn-link {
    background: none;
    border: none;
    color: #6B21A8;
    font-size: 14px;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 8px 16px;
    display: inline-block;
}

.btn-link:hover:not(:disabled) {
    color: #581C87;
    background: rgba(107, 33, 168, 0.1);
    border-radius: 4px;
}

.btn-link:disabled {
    color: #9CA3AF;
    cursor: not-allowed;
    text-decoration: none;
    opacity: 0.6;
}

/* TC-WA-005: OTP resend button when enabled */
#btn-resend-otp:not(:disabled) {
    color: #6B21A8;
    font-weight: 600;
    text-decoration: underline;
}

#resend-countdown {
    font-size: 13px;
    color: #9CA3AF;
    font-weight: 400;
}

/* Success State */
.otp-success-card {
    text-align: center;
    padding: 32px 24px;
}

.otp-success-card svg {
    color: #10B981;
    margin-bottom: 16px;
}

.otp-success-card h4 {
    font-size: 22px;
    font-weight: 700;
    color: #065F46;
    margin-bottom: 12px;
}

.otp-success-card p {
    font-size: 15px;
    color: #047857;
    margin-bottom: 8px;
}

.otp-redirect-text {
    font-size: 14px !important;
    color: #6B7280 !important;
    font-style: italic;
}

/* Spinner Animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

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

/* Mobile Responsive Styles */
@media (max-width: 640px) {
    .otp-modal {
        max-width: 100%;
        margin: 16px;
    }

    .otp-modal .modal-body {
        padding: 20px 16px;
    }

    .otp-inputs {
        gap: 8px;
    }

    .otp-input {
        width: 48px;
        height: 56px;
        font-size: 20px;
    }

    .otp-modal .modal-footer {
        flex-direction: column-reverse;
    }

    .otp-modal .modal-footer .btn {
        width: 100%;
    }
}

/* RTL Support for OTP Modal */
[dir="rtl"] .otp-modal .modal-title {
    flex-direction: row-reverse;
}

[dir="rtl"] .otp-security-note {
    flex-direction: row-reverse;
}

[dir="rtl"] .otp-success-message {
    flex-direction: row-reverse;
}

[dir="rtl"] .otp-timer {
    flex-direction: row-reverse;
}

[dir="rtl"] .otp-error-message {
    flex-direction: row-reverse;
}

[dir="rtl"] .otp-resend {
    text-align: center;
}

[dir="rtl"] .otp-modal .modal-footer {
    justify-content: flex-start;
}

/* Accessibility */
.otp-input:focus-visible {
    outline: 3px solid #6B21A8;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .otp-input {
        border-width: 3px;
    }

    .otp-input:focus {
        border-width: 3px;
        box-shadow: 0 0 0 4px rgba(107, 33, 168, 0.2);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .btn-whatsapp,
    .otp-input,
    .btn-link,
    .spinner {
        transition: none;
        animation: none;
    }
}

/* Print Styles */
@media print {
    .otp-modal,
    .modal-backdrop {
        display: none !important;
    }
}

/* ============================================
   REGISTRATION OTP MODAL FIX
   Fix for #otp-modal generated in template-register.php
   ============================================ */

/* Modal overlay - fullscreen centered */
#otp-modal.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.6) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 99999 !important;
    padding: 20px !important;
    box-sizing: border-box !important;
}

/* Modal content box */
#otp-modal .modal-content {
    background: #fff !important;
    border-radius: 16px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    max-width: 420px !important;
    width: 100% !important;
    padding: 32px !important;
    position: relative !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
}

/* OTP input field - wide enough for 6 digits */
#otp-modal .otp-input,
#otp-modal #otp-code {
    width: 100% !important;
    max-width: 280px !important;
    margin: 0 auto !important;
    display: block !important;
    text-align: center !important;
    font-size: 24px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5em !important;
    padding: 16px 20px !important;
    border: 2px solid #D1D5DB !important;
    border-radius: 8px !important;
    font-family: monospace !important;
}

#otp-modal #otp-code:focus {
    border-color: #6B21A8 !important;
    box-shadow: 0 0 0 3px rgba(107, 33, 168, 0.1) !important;
    outline: none !important;
}

/* Mobile responsive */
@media (max-width: 480px) {
    #otp-modal .modal-content {
        padding: 24px 20px !important;
        margin: 10px !important;
    }

    #otp-modal .otp-input,
    #otp-modal #otp-code {
        font-size: 20px !important;
        letter-spacing: 0.3em !important;
        padding: 14px 16px !important;
    }
}

/* ==========================================================================
   IMAGE LIGHTBOX
   ========================================================================== */

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: zoom-out;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    cursor: default;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox-overlay.active .lightbox-image {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 100000;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 100000;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev {
    left: 20px;
}

.lightbox-nav.next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
}

/* Lightbox trigger styles */
.lightbox-trigger {
    cursor: zoom-in;
    position: relative;
}

.lightbox-trigger::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.2s ease;
    pointer-events: none;
}

.lightbox-trigger:hover::after {
    background: rgba(0, 0, 0, 0.1);
}

/* RTL Support */
[dir="rtl"] .lightbox-nav.prev {
    left: auto;
    right: 20px;
}

[dir="rtl"] .lightbox-nav.next {
    right: auto;
    left: 20px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .lightbox-nav.prev {
        left: 10px;
    }

    .lightbox-nav.next {
        right: 10px;
    }

    [dir="rtl"] .lightbox-nav.prev {
        left: auto;
        right: 10px;
    }

    [dir="rtl"] .lightbox-nav.next {
        right: auto;
        left: 10px;
    }
}

/* ==========================================================================
   REPORT MODALS
   ========================================================================== */

/* Report Modal Positioning */
#report-ad-modal,
#report-category-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: var(--space-4, 16px);
    box-sizing: border-box;
    transform: none !important;
    background: transparent !important;
    max-width: none !important;
}

#report-ad-modal.is-active,
#report-category-modal.is-active {
    display: flex !important;
}

#report-ad-modal-backdrop,
#report-category-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(45, 41, 38, 0.6);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

#report-ad-modal-backdrop.is-active,
#report-category-modal-backdrop.is-active {
    display: block;
    opacity: 1;
}

/* Report Modal Container */
#report-ad-modal .modal-header,
#report-ad-modal .modal-body,
#report-ad-modal .modal-footer,
#report-category-modal .modal-header,
#report-category-modal .modal-body,
#report-category-modal .modal-footer {
    background: var(--color-white, #ffffff);
}

#report-ad-modal > .modal-header:first-child,
#report-category-modal > .modal-header:first-child {
    border-radius: var(--radius-xl, 16px) var(--radius-xl, 16px) 0 0;
}

#report-ad-modal > .modal-footer:last-child,
#report-category-modal > .modal-footer:last-child {
    border-radius: 0 0 var(--radius-xl, 16px) var(--radius-xl, 16px);
}

/* Modal Inner Container */
#report-ad-modal .modal-header,
#report-category-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4, 16px) var(--space-6, 24px);
    border-bottom: 1px solid var(--color-border, #e5e2df);
}

#report-ad-modal .modal-title,
#report-category-modal .modal-title {
    font-family: var(--font-display, 'Cormorant Garamond', serif);
    font-size: var(--text-xl, 1.25rem);
    font-weight: 600;
    color: var(--color-midnight, #2d2926);
    margin: 0;
}

#report-ad-modal .modal-close,
#report-category-modal .modal-close {
    background: none;
    border: none;
    padding: var(--space-2, 8px);
    cursor: pointer;
    color: var(--color-taupe, #8b8178);
    border-radius: var(--radius-full, 50%);
    transition: background 0.2s ease, color 0.2s ease;
}

#report-ad-modal .modal-close:hover,
#report-category-modal .modal-close:hover {
    background: var(--color-bg-alt, #f8f5f2);
    color: var(--color-midnight, #2d2926);
}

#report-ad-modal .modal-body,
#report-category-modal .modal-body {
    padding: var(--space-6, 24px);
    max-height: 60vh;
    overflow-y: auto;
}

#report-ad-modal .modal-footer,
#report-category-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3, 12px);
    padding: var(--space-4, 16px) var(--space-6, 24px);
    border-top: 1px solid var(--color-border, #e5e2df);
}

[dir="rtl"] #report-ad-modal .modal-footer,
[dir="rtl"] #report-category-modal .modal-footer {
    flex-direction: row-reverse;
}

/* Report Modal Content Container */
#report-ad-modal > *,
#report-category-modal > * {
    position: relative;
    z-index: 1;
}

/* Create a visual container */
#report-ad-modal::before,
#report-category-modal::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 500px;
    background: var(--color-white, #ffffff);
    border-radius: var(--radius-xl, 16px);
    box-shadow: 0 16px 48px rgba(45, 41, 38, 0.15);
    z-index: 0;
    /* Height will be determined by content */
    height: auto;
    min-height: 200px;
}

/* Wrap modal content properly */
#report-ad-modal,
#report-category-modal {
    flex-direction: column;
}

#report-ad-modal > .modal-header,
#report-ad-modal > .modal-body,
#report-ad-modal > .modal-footer,
#report-category-modal > .modal-header,
#report-category-modal > .modal-body,
#report-category-modal > .modal-footer {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Remove the pseudo-element approach, use a simpler method */
#report-ad-modal::before,
#report-category-modal::before {
    display: none;
}

/* Report Reference */
.report-reference {
    background: var(--color-bg-alt, #f8f5f2);
    border-radius: var(--radius-md, 8px);
    padding: var(--space-3, 12px) var(--space-4, 16px);
    margin-bottom: var(--space-4, 16px);
}

.report-reference-label {
    font-size: var(--text-sm, 0.875rem);
    color: var(--color-taupe, #8b8178);
    margin-right: var(--space-2, 8px);
}

[dir="rtl"] .report-reference-label {
    margin-right: 0;
    margin-left: var(--space-2, 8px);
}

.report-reference-title {
    font-weight: 600;
    color: var(--color-text, #4a4543);
}

/* Report Success State */
.report-success {
    text-align: center;
    padding: var(--space-6, 24px) 0;
}

.report-success-icon {
    color: var(--color-success, #5d8a66);
    margin-bottom: var(--space-4, 16px);
}

.report-success-icon svg {
    width: 64px;
    height: 64px;
}

.report-success-title {
    font-size: var(--text-xl, 1.25rem);
    font-weight: 600;
    color: var(--color-text, #4a4543);
    margin-bottom: var(--space-2, 8px);
}

.report-success-message {
    color: var(--color-taupe, #8b8178);
    margin-bottom: var(--space-4, 16px);
}

.report-success-reference {
    font-size: var(--text-sm, 0.875rem);
    color: var(--color-taupe, #8b8178);
}

.report-success-reference strong {
    color: var(--color-primary, #652c8f);
    font-family: var(--font-mono, monospace);
}

/* Report Error State */
.report-error {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2, 8px);
    padding: var(--space-3, 12px);
    background: var(--color-error-bg, #ffebee);
    border-radius: var(--radius-md, 8px);
    color: var(--color-error, #e57373);
    margin-top: var(--space-3, 12px);
}

.report-error svg {
    flex-shrink: 0;
    margin-top: 2px;
}

/* Report Form Styles */
.report-form .form-group {
    margin-bottom: var(--space-4, 16px);
}

.report-form .form-label {
    display: block;
    font-weight: 500;
    color: var(--color-text, #4a4543);
    margin-bottom: var(--space-2, 8px);
}

.report-form .form-label .required {
    color: var(--color-error, #e57373);
}

.report-form .form-label .form-hint {
    font-weight: 400;
    color: var(--color-taupe, #8b8178);
    font-size: var(--text-sm, 0.875rem);
}

.report-form .form-select,
.report-form .form-input,
.report-form .form-textarea {
    width: 100%;
    padding: var(--space-3, 12px);
    border: 1px solid var(--color-border, #ede9e3);
    border-radius: var(--radius-md, 8px);
    font-size: var(--text-base, 1rem);
    background: var(--color-white, #fff);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.report-form .form-select:focus,
.report-form .form-input:focus,
.report-form .form-textarea:focus {
    outline: none;
    border-color: var(--color-primary, #652c8f);
    box-shadow: 0 0 0 3px var(--color-primary-soft, rgba(101, 44, 143, 0.1));
}

.report-form .form-textarea {
    resize: vertical;
    min-height: 100px;
}

.report-form .character-count {
    display: block;
    text-align: right;
    font-size: var(--text-xs, 0.75rem);
    color: var(--color-taupe, #8b8178);
    margin-top: var(--space-1, 4px);
}

[dir="rtl"] .report-form .character-count {
    text-align: left;
}

/* Report Button in Ad Actions */
.btn-report {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2, 8px);
    padding: var(--space-2, 8px) var(--space-3, 12px);
    font-size: var(--text-sm, 0.875rem);
    color: var(--color-taupe, #8b8178);
    background: transparent;
    border: 1px solid var(--color-border, #ede9e3);
    border-radius: var(--radius-md, 8px);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-report:hover {
    color: var(--color-error, #e57373);
    border-color: var(--color-error, #e57373);
    background: var(--color-error-bg, #ffebee);
}

/* Category Feedback Link */
.category-feedback-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1, 4px);
    font-size: var(--text-sm, 0.875rem);
    color: var(--color-primary, #652c8f);
    text-decoration: none;
    transition: color 0.2s;
}

.category-feedback-link:hover {
    color: var(--color-primary-dark, #4a1f6b);
    text-decoration: underline;
}

/* Category Feedback Section (on categories page) */
.category-feedback-section {
    text-align: center;
    margin-top: var(--space-8, 32px);
    padding-top: var(--space-6, 24px);
    border-top: 1px solid var(--color-border, #e8e8e8);
}

.category-feedback-text {
    font-size: var(--text-base, 1rem);
    color: var(--color-text-muted, #757575);
    margin: 0;
}

.category-feedback-text .category-feedback-link {
    margin-inline-start: var(--space-1, 4px);
}

/* Category Feedback Inline (on post-ad form) */
.category-feedback-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2, 8px);
    padding: var(--space-4, 16px) 0;
    font-size: var(--text-sm, 0.875rem);
    color: var(--color-text-muted, #757575);
}

.category-feedback-inline .category-feedback-icon {
    display: flex;
    opacity: 0.6;
}

.category-feedback-inline .category-feedback-link {
    margin-inline-start: var(--space-1, 4px);
}

/* Loading state in buttons */
.report-submit-btn .btn-loading {
    display: flex;
    align-items: center;
    gap: var(--space-2, 8px);
}

.report-submit-btn .loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ==========================================================================
   SHARE & EARN SECTION
   ========================================================================== */

/* Share & Earn Container */
.share-earn-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

/* Card Descriptions */
.dashboard-card .card-description {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-4);
    line-height: 1.5;
}

/* Progress Card */
.share-earn-progress-card {
    margin-bottom: var(--space-6);
}

.share-earn-progress-card .card-title {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
}

.share-earn-progress-card .card-title svg {
    color: var(--color-primary);
    flex-shrink: 0;
}

/* Milestone Progress */
.milestone-progress {
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-bottom: var(--space-6);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-3);
}

.progress-label {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    font-weight: 500;
}

.progress-count {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-primary);
}

.milestone-progress .progress-bar {
    height: 8px;
    background: var(--color-border);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-3);
}

.milestone-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-dark, #6B21A8));
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
    min-width: 4px;
}

.progress-hint {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin: 0;
    text-align: center;
}

.progress-hint strong {
    font-weight: 700;
    color: var(--color-primary);
}

/* Reward Preference */
.reward-preference-section {
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--color-border);
}

.reward-preference-section .form-label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-3);
    display: block;
}

.reward-preference-options {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    padding: var(--space-3) var(--space-4);
    background: var(--color-bg-alt);
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    transition: all 0.2s;
    flex: 1;
    min-width: 150px;
}

.radio-option:hover {
    border-color: var(--color-primary-light, #DDD6FE);
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.radio-option input[type="radio"]:checked + span {
    color: var(--color-primary);
    font-weight: 600;
}

.radio-option span {
    font-size: var(--text-sm);
    color: var(--color-text);
}

/* Total Earned Stats */
.total-earned {
    text-align: center;
}

.earned-label {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-2);
}

.earned-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-4);
}

.earned-item {
    font-size: var(--text-base);
    color: var(--color-text);
}

.earned-item strong {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-primary);
    margin-right: var(--space-1);
}

.earned-divider {
    color: var(--color-border);
    font-weight: 300;
}

/* Generate Coupon Card */
.share-earn-generate-card {
    margin-bottom: var(--space-6);
}

.share-earn-generate-card .card-title {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.share-earn-generate-card .card-title svg {
    color: var(--color-primary);
    flex-shrink: 0;
}

/* Coupon Allowance */
.coupon-allowance {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    padding: var(--space-3);
    background: var(--color-bg-alt);
    border-radius: var(--radius-md);
}

.allowance-label {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.allowance-count {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-primary);
}

/* Generate Button */
.share-earn-generate-card .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
}

/* My Coupons Section */
.my-coupons-section {
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-6);
}

.coupons-heading {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-4);
}

/* Coupons Table */
.coupons-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}

.coupons-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.coupons-table thead {
    background: var(--color-bg-alt);
}

.coupons-table th {
    text-align: left;
    padding: var(--space-3) var(--space-4);
    font-weight: 600;
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--color-border);
}

.coupons-table td {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

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

.coupons-table tbody tr:hover {
    background: var(--color-bg-alt);
}

/* Table Cell Styles */
.coupon-code-cell {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 0.5px;
    font-size: var(--text-base);
}

.coupon-discount-badge {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-success);
    background: rgba(34, 197, 94, 0.1);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.coupon-usage-cell {
    color: var(--color-text-muted);
}

.coupon-expiry-cell {
    color: var(--color-text-muted);
    white-space: nowrap;
}

/* Action Buttons */
.coupon-actions-cell {
    display: flex;
    gap: var(--space-2);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-white);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-primary-light, #F3E8FF);
}

.btn-icon.btn-whatsapp:hover {
    border-color: #25D366;
    color: #25D366;
    background: rgba(37, 211, 102, 0.1);
}

/* No Coupons State */
.no-coupons-state {
    text-align: center;
    padding: var(--space-6);
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--color-border);
}

.no-coupons-state p {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin: 0;
}

/* Responsive */
@media (max-width: 640px) {
    .reward-preference-options {
        flex-direction: column;
    }

    .radio-option {
        min-width: auto;
    }

    .earned-stats {
        flex-direction: column;
        gap: var(--space-2);
    }

    .earned-divider {
        display: none;
    }

    /* Mobile table - card style */
    .coupons-table thead {
        display: none;
    }

    .coupons-table,
    .coupons-table tbody,
    .coupons-table tr,
    .coupons-table td {
        display: block;
    }

    .coupons-table tbody tr {
        padding: var(--space-4);
        margin-bottom: var(--space-3);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-lg);
        background: var(--color-white);
    }

    .coupons-table tbody tr:last-child {
        margin-bottom: 0;
    }

    .coupons-table td {
        padding: var(--space-2) 0;
        border-bottom: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .coupons-table td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: var(--text-xs);
        color: var(--color-text-muted);
        text-transform: uppercase;
    }

    .coupons-table td:last-child {
        justify-content: flex-end;
        padding-top: var(--space-3);
        border-top: 1px solid var(--color-border);
        margin-top: var(--space-2);
    }

    .coupons-table td:last-child::before {
        display: none;
    }

    .coupons-table-wrapper {
        border: none;
    }
}

/* RTL Support */
[dir="rtl"] .earned-item strong {
    margin-right: 0;
    margin-left: var(--space-1);
}

[dir="rtl"] .coupons-table th,
[dir="rtl"] .coupons-table td {
    text-align: right;
}

[dir="rtl"] .coupon-code-cell {
    letter-spacing: normal;
}

[dir="rtl"] .coupon-actions-cell {
    flex-direction: row-reverse;
}
