/* ============================================
   SERİSAYFA - Ana Stil Dosyası
   Tasarım: Pembe (#E91E63) ana renk, beyaz kartlar, yuvarlak hatlar
   ============================================ */

/* CSS Reset & Variables */
:root {
    --primary: #E91E63;
    --primary-dark: #C2185B;
    --primary-darker: #AD1457;
    --primary-light: #F8BBD0;
    --primary-bg: #FCE4EC;
    
    --bg-page: #F5F7FA;
    --bg-card: #FFFFFF;
    --bg-input: #F9FAFB;
    
    --text-dark: #1A1A1A;
    --text-body: #374151;
    --text-light: #6B7280;
    --text-muted: #9CA3AF;
    
    --border: #E5E7EB;
    --border-light: #F3F4F6;
    
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    
    --gold: #FFD700;
    --gold-dark: #FFA500;
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
    
    --radius-sm: 8px;
    --radius: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 999px;
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-page);
    color: var(--text-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    max-width: 100%;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; display: block; }

button { font-family: inherit; cursor: pointer; border: none; background: none; }

input, textarea, select {
    font-family: inherit;
    font-size: 14px;
    color: var(--text-dark);
}

input:focus, textarea:focus, select:focus { outline: none; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ============================================
   HEADER / NAVBAR
   ============================================ */
.site-header {
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-light);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    line-height: 1;
    flex-shrink: 0;
}

.logo-img {
    height: 48px;
    width: auto;
    display: block;
    max-width: 100%;
}

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

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    color: var(--text-body);
    font-weight: 500;
    font-size: 14px;
    border-radius: var(--radius-full);
    border: 1px solid transparent;
    transition: var(--transition);
}

.nav-link:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

.nav-link .icon-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.nav-link.active {
    background: var(--bg-page);
    color: var(--primary);
}

.btn-post-ad {
    background: var(--primary);
    color: white !important;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
    transition: var(--transition);
}

.btn-post-ad:hover {
    background: var(--primary-dark);
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(233, 30, 99, 0.4);
}

.btn-post-ad i {
    font-size: 14px;
}

/* User dropdown in navbar */
.user-menu {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    background: var(--bg-page);
    transition: var(--transition);
}

.user-menu-btn:hover { background: var(--primary-bg); }

.user-menu-btn .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-menu-btn .name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 200;
}

.user-menu.open .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-body);
    font-size: 14px;
    font-weight: 500;
}

.user-dropdown a:hover {
    background: var(--bg-page);
    color: var(--primary);
}

.user-dropdown a i {
    width: 18px;
    color: var(--text-light);
}

.user-dropdown hr { border: none; border-top: 1px solid var(--border-light); margin: 6px 0; }

/* ============================================
   HERO SECTION (Anasayfa)
   ============================================ */
.hero {
    position: relative;
    background-image: 
        linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.55)),
        url('https://images.unsplash.com/photo-1486312338219-ce68d2c6f44d?w=1600&q=80');
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-lg);
    margin: 24px 0;
    padding: 80px 40px;
    color: white;
    text-align: center;
    overflow: hidden;
}

.hero-title {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 16px;
    max-width: 700px;
    margin: 0 auto 36px;
    opacity: 0.95;
    line-height: 1.6;
}

.search-box {
    background: white;
    border-radius: var(--radius-full);
    padding: 8px;
    display: flex;
    align-items: center;
    max-width: 760px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
    gap: 4px;
}

.search-field {
    flex: 1;
    padding: 12px 20px;
    text-align: left;
    border-right: 1px solid var(--border);
}

.search-field:last-of-type { border-right: none; }

.search-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.search-field select {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 13px;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
}

.search-btn {
    background: var(--primary);
    color: white;
    padding: 16px 32px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    white-space: nowrap;
}

.search-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.02);
}

/* Arama sayfası üst filtre formu (search.php) */
.search-filter-form {
    background: white;
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 12px;
    align-items: center;
}

.search-filter-form .form-input-flat,
.search-filter-form select {
    min-width: 0;
}

/* ============================================
   CATEGORIES GRID (Anasayfa)
   ============================================ */
.categories-section {
    padding: 40px 0;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 24px;
}

.cat-group {
    margin-bottom: 32px;
}

.cat-group-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding-left: 4px;
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.cat-card {
    background: white;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.cat-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.cat-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.cat-card-header:hover {
    background: var(--primary-bg);
}

.cat-card-subs {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}

.cat-card-subs li a {
    display: block;
    padding: 10px 16px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 13px;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

.cat-card-subs li a:hover {
    background: var(--primary-bg);
    color: var(--primary);
    padding-left: 22px;
}

.cat-card-subs li:last-child a {
    border-bottom: none;
}

.cat-card-more {
    display: block;
    padding: 12px 16px;
    background: var(--primary-bg);
    color: var(--primary);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    transition: var(--transition);
    border-top: 1px solid var(--border-light);
}

.cat-card-more:hover {
    background: var(--primary);
    color: white;
}

.cat-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.cat-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
}

/* ============================================
   AD CARDS (İlan Kartları)
   ============================================ */
.ads-section { padding: 40px 0; }

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

.ad-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 20px;
    position: relative;
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

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

.ad-card.premium {
    background: white;
    border: 2px solid var(--primary);
    box-shadow: 0 4px 14px rgba(233, 30, 99, 0.08);
}

.ad-card.premium:hover {
    box-shadow: 0 10px 24px rgba(233, 30, 99, 0.18);
}

.premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: white;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(255, 165, 0, 0.35);
    margin-bottom: 12px;
}

.premium-badge i { font-size: 10px; }

.premium-crown {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(255, 165, 0, 0.4);
    color: white;
    font-size: 14px;
    z-index: 2;
}

.ad-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.ad-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

.ad-username {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.ad-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.3;
}

.ad-description {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 12px;
    min-height: 40px;
}

.ad-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}

.ad-time {
    color: var(--text-muted);
    font-weight: 500;
}

.ad-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 14px;
}

.ad-favorite {
    position: absolute;
    bottom: 8px;
    left: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
    font-size: 12px;
}

.ad-favorite:hover, .ad-favorite.active {
    color: var(--primary);
    background: white;
}

/* ============================================
   FOOTER
   ============================================ */
/* ============================================
   SITE FOOTER (modern, SEO-uyumlu, çok kolonlu)
   ============================================ */
.site-footer {
    background: #1a1a1a;
    color: #d1d5db;
    margin-top: auto;
    padding: 64px 0 0;
    font-size: 14px;
    line-height: 1.7;
}

.footer-main {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
}

.footer-col h3 {
    color: white;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 20px;
    position: relative;
    padding-bottom: 12px;
}

.footer-col h3::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 36px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    margin-bottom: 16px;
}

.footer-brand-img {
    height: 42px;
    width: auto;
    display: block;
    max-width: 100%;
}

.footer-brand .footer-brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), #C2185B);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    margin-right: 10px;
}

.footer-about {
    color: #9ca3af;
    margin-bottom: 20px;
}

.footer-socials {
    display: flex;
    gap: 10px;
}

.footer-socials a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #262626;
    color: #d1d5db;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: var(--transition);
    text-decoration: none;
}

.footer-socials a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-links a::before {
    content: "›";
    color: var(--primary);
    font-weight: 700;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 4px;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    color: #9ca3af;
}

.footer-contact-item i {
    color: var(--primary);
    margin-top: 3px;
    flex-shrink: 0;
    width: 16px;
    text-align: center;
}

.footer-bottom {
    border-top: 1px solid #262626;
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: #6b7280;
}

.footer-bottom a {
    color: #9ca3af;
    text-decoration: none;
    margin-left: 16px;
    transition: var(--transition);
}

.footer-bottom a:hover {
    color: var(--primary);
}

/* Anasayfa "Son İlanlar" - mobilde son 3 ilanı gizle */
@media (max-width: 768px) {
    .home-latest-ads .ad-card:nth-child(n+4) {
        display: none;
    }

    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .footer-bottom {
        justify-content: center;
        text-align: center;
    }

    .footer-bottom a {
        margin: 0 8px;
    }
}

@media (max-width: 480px) {
    .footer-main {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .site-footer {
        padding-top: 48px;
    }
    .container { padding: 0 12px; }
    .hero { padding: 36px 16px; }
    .hero-title { font-size: 24px; }
    .hero-subtitle { font-size: 14px; }
}

/* ============================================
   AUTH PAGES (Login/Register)
   ============================================ */
.auth-page {
    min-height: calc(100vh - 80px);
    background-image:
        linear-gradient(rgba(255,255,255,0.6), rgba(255,255,255,0.6)),
        url('https://images.unsplash.com/photo-1486312338219-ce68d2c6f44d?w=1600&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    padding: 40px 24px;
}

.auth-container {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.auth-info {
    color: var(--text-dark);
}

.auth-info h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.auth-info p {
    font-size: 16px;
    margin-bottom: 28px;
    color: var(--text-body);
}

.btn-secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    padding: 18px 48px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(233, 30, 99, 0.3);
}

.btn-secondary-action:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 30, 99, 0.4);
}

.auth-form-wrapper {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-md);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.auth-form-wrapper.wide {
    grid-column: 1 / -1;
    max-width: 720px;
    margin: 0 auto;
}

.form-group { margin-bottom: 20px; }

.form-input {
    width: 100%;
    padding: 18px 24px;
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    background: white;
    font-size: 15px;
    color: var(--text-dark);
    transition: var(--transition);
}

.form-input::placeholder { color: var(--text-muted); }

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(233, 30, 99, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.btn-primary {
    width: 100%;
    background: var(--primary);
    color: white;
    padding: 18px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(233, 30, 99, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(233, 30, 99, 0.4);
}

.form-link {
    color: var(--primary);
    font-size: 13px;
    text-align: right;
    display: block;
    margin-top: 12px;
    font-weight: 500;
}

.form-divider {
    text-align: center;
    margin: 24px 0;
    color: var(--text-light);
    font-size: 13px;
    position: relative;
}

.social-login {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
}

.social-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    font-size: 22px;
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.social-btn.google { color: #DB4437; }
.social-btn.facebook { color: #1877F2; }
.social-btn.twitter { color: #1DA1F2; }

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-body);
}

.auth-footer a { font-weight: 600; }

/* ============================================
   FLASH MESSAGES
   ============================================ */
.flash {
    padding: 14px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.flash.success { background: #D1FAE5; color: #065F46; }
.flash.error { background: #FEE2E2; color: #991B1B; }
.flash.warning { background: #FEF3C7; color: #92400E; }
.flash.info { background: #DBEAFE; color: #1E40AF; }

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */
.dashboard {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: calc(100vh - 80px);
    background: var(--bg-page);
}

.sidebar {
    background: white;
    border-right: 1px solid var(--border-light);
    padding: 32px 16px;
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    overflow-y: auto;
}

.sidebar-logo {
    padding: 0 12px;
    margin-bottom: 32px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.sidebar-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius);
    color: var(--text-body);
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
}

.sidebar-link:hover {
    background: var(--bg-page);
    color: var(--primary);
}

.sidebar-link.active {
    background: var(--primary);
    color: white;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.sidebar-link .badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.sidebar-link.active .badge { background: white; color: var(--primary); }

.dashboard-main {
    padding: 32px 40px;
    overflow-x: hidden;
}

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

.dashboard-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.dashboard-subtitle {
    color: var(--text-light);
    font-size: 14px;
}

.dashboard-user {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
}

.dashboard-user .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

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

/* Stat Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.stat-label {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1;
}

.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: var(--radius-full);
}

.stat-trend.up { background: #D1FAE5; color: var(--success); }
.stat-trend.down { background: #FEE2E2; color: var(--danger); }

/* Section Card */
.section-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    border: 1px solid var(--border-light);
}

.section-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Active Ads List */
.active-ads-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.active-ad-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-page);
    border-radius: var(--radius);
    transition: var(--transition);
}

.active-ad-item:hover { background: var(--primary-bg); }

.active-ad-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.active-ad-info { flex: 1; }
.active-ad-title { font-weight: 600; color: var(--text-dark); margin-bottom: 2px; font-size: 14px; }
.active-ad-desc { font-size: 13px; color: var(--text-light); }

.active-ad-badge {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.active-ad-badge.premium { background: var(--gold); color: var(--text-dark); }
.active-ad-badge.standard { background: var(--bg-page); color: var(--text-light); border: 1px solid var(--border); }

.active-ad-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

.btn-icon:hover { background: var(--primary); color: white; }

.btn-icon.danger:hover { background: var(--danger); color: white; }

/* ============================================
   CREATE AD FORM
   ============================================ */
.form-section {
    background: white;
    border-radius: var(--radius-md);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-input-flat {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-input);
    font-size: 14px;
    color: var(--text-dark);
    transition: var(--transition);
}

.form-input-flat:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}

textarea.form-input-flat { min-height: 120px; resize: vertical; }

select.form-input-flat { cursor: pointer; }

/* Premium Plan Selector */
.premium-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: var(--bg-page);
    border-radius: var(--radius);
    margin: 20px 0;
}

.premium-toggle label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
}

.checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: 6px;
    background: white;
    cursor: pointer;
    appearance: none;
    position: relative;
    transition: var(--transition);
}

.checkbox:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox:checked::after {
    content: "✓";
    color: white;
    font-size: 14px;
    font-weight: 700;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.plan-card {
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

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

.plan-card.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.plan-card.selected .plan-price { color: white; }
.plan-card.selected .plan-duration { color: rgba(255,255,255,0.9); }

/* ============================================
   PLAN CHOICE - radio kart tabanlı seçim
   (yeni create-ad.php "Standart/Öncelikli Listeleme")
   ============================================ */
.plan-choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.plan-choice input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.plan-choice label {
    position: relative;
    display: block;
    padding: 22px 24px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-page);
    cursor: pointer;
    transition: var(--transition);
    min-height: 88px;
}

.plan-choice label:hover {
    border-color: var(--primary-light);
    background: white;
}

.plan-choice input[type="radio"]:checked + label {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(233, 30, 99, 0.08);
}

.plan-choice input[type="radio"]:checked + label::after {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 14px;
    right: 14px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.plan-choice input[type="radio"]:focus-visible + label {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.plan-choice-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
    padding-right: 32px; /* check ikonuna yer aç */
}

.plan-choice-info {
    font-size: 13px;
    color: var(--text-light);
}

@media (max-width: 600px) {
    .plan-choice {
        grid-template-columns: 1fr;
    }
}

.plan-duration {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-body);
    margin-bottom: 8px;
}

.plan-price {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
}

.plan-price small { font-size: 14px; font-weight: 500; }

.plan-recommended {
    position: absolute;
    top: -10px;
    right: 16px;
    background: var(--gold);
    color: var(--text-dark);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.message-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-page);
    border-radius: var(--radius);
    margin-top: 16px;
}

.message-toggle label {
    flex: 1;
    font-size: 14px;
    color: var(--text-dark);
    cursor: pointer;
}

.message-toggle small {
    display: block;
    color: var(--text-light);
    font-size: 12px;
    margin-top: 2px;
}

/* Switch */
.switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

/* ============================================
   MS-TOGGLE - mesaj ayarı için yeni switch
   (eski .switch yerine, daha sağlam ve namespace'i temiz)
   ============================================ */
.ms-toggle {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: var(--bg-page);
    border-radius: var(--radius);
    margin-top: 16px;
}

.ms-switch {
    position: relative;
    display: inline-block;
    flex: 0 0 44px;
    width: 44px;
    height: 24px;
}

.ms-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    margin: 0;
    width: 0;
    height: 0;
}

.ms-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #d1d5db;
    border-radius: 999px;
    cursor: pointer;
    transition: 0.25s ease;
}

.ms-slider::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: 0.25s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.ms-switch input:checked + .ms-slider {
    background: var(--primary);
}

.ms-switch input:checked + .ms-slider::before {
    transform: translateX(20px);
}

.ms-text {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    color: var(--text-dark);
    line-height: 1.4;
}

.ms-text strong {
    display: block;
    font-weight: 600;
}

.ms-text small {
    display: block;
    color: var(--text-light);
    font-size: 12px;
    margin-top: 2px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.switch-slider {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
}

.switch-slider::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.switch input:checked + .switch-slider { background: var(--primary); }
.switch input:checked + .switch-slider::before { transform: translateX(20px); }

/* ============================================
   PAYMENT PAGE
   ============================================ */
.payment-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 40px;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: var(--shadow-md);
}

.payment-amount {
    text-align: center;
    padding: 24px 0;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 32px;
}

.payment-amount-label {
    font-size: 13px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.payment-amount-value {
    font-size: 42px;
    font-weight: 800;
    color: var(--primary);
}

.payment-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.payment-success {
    text-align: center;
    padding: 60px 40px;
    background: white;
    border-radius: var(--radius-md);
    max-width: 600px;
    margin: 40px auto;
    box-shadow: var(--shadow-md);
}

.success-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

.payment-success h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.payment-success p {
    color: var(--text-light);
    margin-bottom: 24px;
    line-height: 1.6;
}

/* ============================================
   MESSAGES PAGE
   ============================================ */
.messages-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 0;
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    height: calc(100vh - 200px);
    min-height: 600px;
    box-shadow: var(--shadow-sm);
}

.conversations-list {
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
}

.conversations-search {
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
}

.conversations-search input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-page);
    border: none;
    border-radius: var(--radius-full);
    font-size: 13px;
}

.conversations-search input:focus { background: white; box-shadow: 0 0 0 2px var(--primary-light); }

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

.conversation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: var(--transition);
}

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

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

.conv-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

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

.conv-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.conv-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conv-time {
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-left: 8px;
}

.conv-preview {
    font-size: 13px;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conv-unread {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Chat panel */
.chat-panel {
    display: flex;
    flex-direction: column;
    background: var(--bg-page);
}

.chat-back-btn {
    display: none;                                   /* Sadece mobil aktif sohbette görünür */
}

.chat-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-light);
    background: white;
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header .avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

.chat-header-info h3 {
    font-size: 15px;
    color: var(--text-dark);
    font-weight: 600;
}

.chat-status {
    font-size: 12px;
    color: var(--success);
    font-weight: 500;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message-bubble {
    max-width: 70%;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.message-bubble.received {
    background: white;
    color: var(--text-dark);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.message-bubble.sent {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.message-time {
    display: block;
    font-size: 11px;
    margin-top: 4px;
    opacity: 0.7;
}

.message-date-separator {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    margin: 8px 0;
    font-weight: 500;
}

.typing-indicator {
    align-self: flex-start;
    padding: 12px 18px;
    background: white;
    border-radius: var(--radius-md);
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-sm);
    font-size: 13px;
    color: var(--text-light);
    font-style: italic;
}

.chat-input-area {
    padding: 16px 24px;
    background: white;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-input {
    flex: 1;
    padding: 14px 20px;
    background: var(--bg-page);
    border: none;
    border-radius: var(--radius-full);
    font-size: 14px;
}

.chat-input:focus { background: white; box-shadow: 0 0 0 2px var(--primary-light); }

.btn-send {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-send:hover { background: var(--primary-dark); transform: scale(1.05); }

.empty-chat {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: var(--text-muted);
    text-align: center;
    padding: 40px;
}

.empty-chat i { font-size: 64px; margin-bottom: 16px; opacity: 0.3; }

/* ============================================
   AD DETAIL PAGE
   ============================================ */
.ad-detail {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    padding: 32px 0;
}

.ad-detail-main {
    background: white;
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.ad-detail-image {
    width: 100%;
    height: 400px;
    border-radius: var(--radius);
    object-fit: cover;
    margin-bottom: 24px;
    background: var(--bg-page);
}

.ad-detail-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.ad-detail-meta {
    display: flex;
    gap: 24px;
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
}

.ad-detail-meta span { display: inline-flex; align-items: center; gap: 6px; }

.ad-detail-price {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 24px;
}

.ad-detail-description {
    color: var(--text-body);
    line-height: 1.7;
    font-size: 15px;
}

.ad-detail-sidebar {
    background: white;
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.seller-card {
    text-align: center;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 24px;
}

.seller-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 12px;
    object-fit: cover;
    border: 3px solid var(--primary-bg);
}

.seller-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.seller-joined {
    font-size: 12px;
    color: var(--text-light);
}

.btn-block {
    width: 100%;
    padding: 14px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
    transition: var(--transition);
}

.btn-block.primary { background: var(--primary); color: white; }
.btn-block.primary:hover { background: var(--primary-dark); }
.btn-block.outline { background: white; color: var(--text-dark); border: 1px solid var(--border); }
.btn-block.outline:hover { background: var(--bg-page); border-color: var(--primary); color: var(--primary); }
.btn-block.disabled { background: var(--bg-page); color: var(--text-muted); cursor: not-allowed; }

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 32px 0;
}

.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: white;
    color: var(--text-body);
    font-weight: 500;
    font-size: 14px;
    border: 1px solid var(--border-light);
    transition: var(--transition);
    padding: 0 12px;
}

.pagination a:hover { background: var(--primary-bg); color: var(--primary); border-color: var(--primary-light); }

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

.pagination .disabled { opacity: 0.4; cursor: not-allowed; }

/* ============================================
   ADMIN PANEL
   ============================================ */
.admin-table {
    width: 100%;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.admin-table thead { background: var(--bg-page); }

.admin-table th {
    text-align: left;
    padding: 14px 16px;
    font-size: 12px;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-light);
}

.admin-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-body);
    font-size: 14px;
}

.admin-table tbody tr:hover { background: var(--bg-page); }

.admin-table tbody tr:last-child td { border-bottom: none; }

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.approved { background: #D1FAE5; color: #065F46; }
.status-badge.pending { background: #FEF3C7; color: #92400E; }
.status-badge.rejected { background: #FEE2E2; color: #991B1B; }
.status-badge.expired { background: #E5E7EB; color: #4B5563; }

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-sm.btn-approve { background: var(--success); color: white; }
.btn-sm.btn-approve:hover { background: #059669; }
.btn-sm.btn-reject { background: var(--danger); color: white; }
.btn-sm.btn-reject:hover { background: #DC2626; }
.btn-sm.btn-view { background: var(--bg-page); color: var(--text-dark); border: 1px solid var(--border); }
.btn-sm.btn-view:hover { background: var(--primary-bg); color: var(--primary); }

/* ============================================
   AVATAR PLACEHOLDER (initials)
   ============================================ */
.avatar-initials {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-transform: uppercase;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .ads-grid { grid-template-columns: repeat(2, 1fr); }
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
    .auth-container { grid-template-columns: 1fr; gap: 32px; }
    .auth-info { text-align: center; }
    .ad-detail { grid-template-columns: 1fr; }
    .ad-detail-sidebar { position: static; }
}

@media (max-width: 768px) {
    .navbar { height: 72px; }
    .logo-img { height: 36px; }

    /* Mobil: ikonların altına küçük label göster, dikey düzen */
    .nav-link {
        flex-direction: column;
        gap: 3px;
        padding: 4px 6px;
        font-size: 10px;
        line-height: 1.1;
        text-align: center;
        border-radius: var(--radius-sm);
        min-width: 48px;
    }
    .nav-link span { font-size: 10px; }
    .nav-link .icon-circle {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    .btn-post-ad {
        flex-direction: column;
        gap: 3px;
        padding: 6px 10px;
        font-size: 10px;
        line-height: 1.1;
        text-align: center;
        min-width: 56px;
    }
    .btn-post-ad span { font-size: 10px; }
    .btn-post-ad i { font-size: 16px; }

    /* Avatar yanındaki "Admin" gibi isim yazısını mobilde gizle (avatar yeterli) */
    .user-menu-btn .name { display: none; }
    .user-menu-btn { padding: 4px; }
    .user-menu-btn .avatar, .user-menu-btn .avatar-initials {
        width: 36px !important;
        height: 36px !important;
        font-size: 13px !important;
    }
    .user-menu-btn i.fa-chevron-down { display: none; }

    /* Dashboard navbar: kullanıcı kartı mobilde kompakt - sadece avatar */
    .dashboard-user {
        padding: 2px;
        gap: 0;
        background: transparent;
        box-shadow: none;
    }
    .dashboard-user .name { display: none; }
    .dashboard-user .avatar,
    .dashboard-user .avatar-initials {
        width: 36px !important;
        height: 36px !important;
        font-size: 13px !important;
    }

    .hero { padding: 48px 24px; margin: 16px 0; }
    .hero-title { font-size: 28px; }
    .search-box { flex-direction: column; padding: 12px; gap: 6px; border-radius: var(--radius-lg); }
    .search-field { width: 100%; border-right: none; border-bottom: 1px solid var(--border-light); padding: 10px 14px; }
    .search-field:last-of-type { border-bottom: none; }
    .search-field label { font-size: 11px; }
    .search-field select { font-size: 14px; }
    .search-btn { width: 100%; padding: 14px 24px; }

    /* Arama sayfası filtre formu mobil */
    .search-filter-form {
        grid-template-columns: 1fr 1fr;
        padding: 14px;
        gap: 10px;
    }
    .search-filter-form > input[type="text"] { grid-column: 1 / -1; }
    .search-filter-form > button { grid-column: 1 / -1; width: 100%; }
    .search-filter-form select { font-size: 14px; }
    .cat-grid { grid-template-columns: 1fr; }
    .ads-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .plan-grid { grid-template-columns: 1fr; }
    .dashboard { grid-template-columns: 1fr; }
    .sidebar { position: fixed; left: -260px; top: 72px; height: calc(100vh - 72px); z-index: 50; transition: var(--transition); }
    .sidebar.open { left: 0; }
    .dashboard-main { padding: 16px; }
    /* ============================================
       === MESAJLAŞMA — MOBİL (SIFIRDAN, SAĞLAM) ===
       Yaklaşım: position:fixed ile viewport'a yapıştır.
       Parent height hesabı YOK, dvh/vh/grid karmaşası YOK.
       Sohbet açıkken layout viewport'u kaplar.
       ============================================ */

    /* === Sohbet AÇIK DEĞİL (sadece konuşma listesi) === */
    /* Inline akışta normal görünür, mevcut dashboard yapısı korunur */
    .messages-layout {
        display: block;                              /* Grid kapatıldı */
        height: auto;
        min-height: auto;
        background: white;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-sm);
        overflow: visible;
    }
    /* Mobilde sohbet seçilmediyse chat-panel (empty-chat dahil) gizli, sadece liste görünür */
    .messages-layout:not(.chat-active) .chat-panel {
        display: none;
    }
    .conversations-list {
        display: flex;
        flex-direction: column;
        border-right: none;
    }
    .conversations-search { padding: 12px; }
    .conversations-search input { padding: 10px 14px; font-size: 14px; }
    .conversation-item { padding: 12px; }
    .conv-avatar { width: 44px; height: 44px; }
    .conv-name { font-size: 14px; }
    .conv-preview { font-size: 12px; }
    .conv-time { font-size: 10px; }

    /* === Sohbet AÇIK (URL'de ?c=X var, .messages-layout.has-active class'ı eklenir JS ile) === */
    /* Aynı zamanda chat-panel'in chat-header'ı varsa = sohbet açık demek (PHP koşulu) */
    .messages-layout.chat-active {
        position: fixed;
        inset: 0;                                    /* top:0 right:0 bottom:0 left:0 */
        z-index: 9999;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        background: white;
        display: flex;                               /* tek child (chat-panel) tam yer kaplar */
        flex-direction: column;
    }
    .messages-layout.chat-active .conversations-list { display: none; }

    .messages-layout.chat-active .chat-panel {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        min-height: 0;
        background: var(--bg-page);
        height: 100%;                                /* fixed parent içinde tam yükseklik */
    }

    /* Chat üst bar */
    .messages-layout.chat-active .chat-header {
        flex-shrink: 0;
        padding: 10px 12px;
        padding-top: calc(10px + env(safe-area-inset-top, 0px));
        gap: 10px;
        background: white;
        border-bottom: 1px solid var(--border-light);
        display: flex;
        align-items: center;
    }
    .messages-layout.chat-active .chat-back-btn {
        display: flex !important;                    /* mobilde göster */
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        flex-shrink: 0;
        color: var(--text-dark);
        font-size: 18px;
        text-decoration: none;
        margin-right: 4px;
    }
    .messages-layout.chat-active .chat-header .avatar,
    .messages-layout.chat-active .chat-header .avatar-initials {
        width: 38px !important;
        height: 38px !important;
        font-size: 14px !important;
        flex-shrink: 0;
    }
    .messages-layout.chat-active .chat-header-info {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
    }
    .messages-layout.chat-active .chat-header-info h3 {
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .messages-layout.chat-active .chat-header-info > div {
        font-size: 11px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Mesajlar alanı - tek scroll bölgesi */
    .messages-layout.chat-active .chat-messages {
        flex: 1 1 0;
        min-height: 0;                               /* flex item scroll için kritik */
        overflow-y: auto;
        overflow-x: hidden;
        padding: 12px;
        gap: 8px;
        display: flex;
        flex-direction: column;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    /* Mesaj balonları */
    .messages-layout.chat-active .message-bubble {
        max-width: 78%;
        padding: 9px 13px;
        font-size: 14px;
        line-height: 1.4;
        word-break: break-word;
        overflow-wrap: anywhere;
    }
    .messages-layout.chat-active .message-time {
        font-size: 10px;
    }
    .messages-layout.chat-active .message-date-separator {
        font-size: 11px;
        margin: 6px 0;
    }

    /* Input alanı - alt sabit */
    .messages-layout.chat-active .chat-input-area {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 10px;
        padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
        background: white;
        border-top: 1px solid var(--border-light);
    }
    .messages-layout.chat-active .chat-input {
        flex: 1 1 auto;
        min-width: 0;
        padding: 10px 14px;
        font-size: 16px;                             /* iOS auto-zoom önleme */
    }
    .messages-layout.chat-active .btn-send {
        flex: 0 0 42px;
        width: 42px;
        height: 42px;
    }
    .messages-layout.chat-active .btn-send i {
        font-size: 14px;
    }

    /* Empty state (sohbet seçilmediyse zaten chat-active yok) */
    .empty-chat { padding: 32px 20px; }
    .empty-chat i { font-size: 40px; }

    /* Dashboard sayfası mesajlaşmada açıkken header gizli kalsın (fixed layout viewport'u kaplıyor)
       Site header z-index'i 1000 civarı, biz 9999 verdik → bizim üste çıkar.
       Body scroll'unu da kilitlemek gerekirse JS ile yapacağız. */

    /* ============================================
       === DASHBOARD MOBİL DÜZELTMESİ (A'DAN Z'YE) ===
       Bu blok mobile bloğun en altında — cascade ile diğer
       mobil kurallarının üzerine yazıyor.
       ============================================ */

    /* Container & navbar daralt */
    .container { padding: 0 12px; }
    .navbar { gap: 8px; }
    .nav-actions { gap: 4px; }
    .logo-img { height: 32px; }

    /* Eski user-menu-btn isim daraltma (public siteden kalan) */
    .user-menu-btn .name {
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Dashboard kullanıcı kartı — mobilde sadece avatar, kart görünümü kalkar */
    .dashboard-user {
        padding: 0 !important;
        gap: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        border-radius: 50% !important;
    }
    .dashboard-user .name { display: none !important; }
    .dashboard-user .avatar,
    .dashboard-user .avatar-initials {
        width: 36px !important;
        height: 36px !important;
        font-size: 13px !important;
    }

    /* "Ücretsiz İlan Ver" → "İlan Ver" (CSS ile kısalt, HTML'e dokunmadan) */
    .btn-post-ad {
        padding: 8px 12px !important;
        font-size: 11px !important;
        font-weight: 600 !important;
        line-height: 1 !important;
        min-width: 0 !important;
        flex-direction: row !important;
        gap: 6px !important;
        text-align: left !important;
        white-space: nowrap !important;
    }
    .btn-post-ad span { display: none !important; }   /* "Ücretsiz İlan Ver" yazısı gizle */
    .btn-post-ad::after {
        content: "İlan Ver";                          /* yerine kısa yazı */
        font-size: 11px;
        font-weight: 600;
    }
    .btn-post-ad i { font-size: 14px !important; }

    /* Çok dar ekranlar (≤360px): sadece "+" ikonu */
    @media (max-width: 360px) {
        .btn-post-ad::after { display: none; }
        .btn-post-ad i { font-size: 18px !important; }
        .btn-post-ad { padding: 10px !important; }
    }

    /* Dashboard içerik tipografisi — daha kompakt */
    .dashboard-title { font-size: 22px; }
    .dashboard-subtitle { font-size: 13px; line-height: 1.4; }
    .dashboard-header { margin-bottom: 16px; }

    /* Bölüm/stat kartları kompakt */
    .section-card { padding: 16px; margin-bottom: 16px; }
    .section-card-title { font-size: 15px; }
    .stat-card { padding: 16px; }
    .stat-value { font-size: 28px; }
    .stat-label { font-size: 12px; }
    .stats-grid { gap: 12px; margin-bottom: 20px; }

    /* Aktif ilanlar listesi */
    .active-ad-item { padding: 12px; }
    .active-ad-title { font-size: 13px; }
    .active-ad-desc { font-size: 12px; }
    .active-ad-icon { width: 40px; height: 40px; font-size: 14px; }
    .active-ad-actions { gap: 6px; }
    .btn-icon { width: 32px; height: 32px; font-size: 13px; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-page); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
