/* ============================================
   Melikşah Gayrimenkul — Dashboard CSS
   Tek kaynak stil dosyası (tüm sayfalar)
   ============================================ */

/* ===== CSS VARIABLES ===== */
:root {
    --sidebar-w:      200px;

    /* Marka */
    --primary:        #0a2342;
    --primary-light:  #0f3460;
    --accent:         #c5a059;
    --accent-hover:   #b8913d;
    --accent-light:   #fdf8f0;

    /* Arka planlar */
    --bg:             #f1f5f9;
    --white:          #ffffff;
    --bg-secondary:   #f8fafc;

    /* Metin */
    --text:           #1e293b;
    --text-secondary: #64748b;
    --text-tertiary:  #94a3b8;

    /* Kenarlıklar */
    --border:         #e2e8f0;
    --border-light:   #f1f5f9;

    /* Durum */
    --danger:         #ef4444;
    --success:        #10b981;
    --warning:        #f59e0b;
    --info:           #3b82f6;
    --indigo:         #6366f1;
    --purple:         #8b5cf6;

    /* Boyutlar */
    --radius:         12px;
    --radius-sm:      8px;
    --radius-xs:      6px;

    /* Gölgeler */
    --shadow:         0 1px 4px rgba(0,0,0,0.06), 0 2px 12px rgba(0,0,0,0.04);
    --shadow-md:      0 4px 20px rgba(0,0,0,0.09);
    --shadow-sm:      0 1px 3px rgba(0,0,0,0.06);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a      { text-decoration: none; color: inherit; }
button { font-family: inherit; }

/* ===== LAYOUT ===== */
.layout-wrapper { display: flex; min-height: 100vh; }

.main-content {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.page-content { flex: 1; padding: 28px 32px; }

/* ===== SIDEBAR ===== */
.sidebar {
    --sb-bg:          #0f172a;
    --sb-bg-hover:    rgba(255,255,255,.06);
    --sb-bg-active:   rgba(99,102,241,.12);
    --sb-accent:      #6366f1;
    --sb-accent-glow: rgba(99,102,241,.3);
    --sb-text:        #94a3b8;
    --sb-text-active: #f1f5f9;
    --sb-border:      rgba(255,255,255,.07);
    --sb-section:     #475569;

    width: var(--sidebar-w);
    min-height: 100vh;
    background: var(--sb-bg);
    position: fixed;
    top: 0; left: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid var(--sb-border);
}

.sidebar-logo {
    padding: 18px 16px 14px;
    border-bottom: 1px solid var(--sb-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.sidebar-logo-inner { display: flex; align-items: center; gap: 10px; }
.sidebar-logo-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--sb-accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 600; color: #fff;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px var(--sb-accent-glow);
}
.brand-name  { display: block; font-size: 13px; font-weight: 600; color: #f1f5f9; letter-spacing: .01em; line-height: 1.2; }
.brand-sub   { display: block; font-size: 9.5px; color: #475569; letter-spacing: .04em; margin-top: 1px; }
.brand-badge {
    font-size: 9px; font-weight: 500;
    background: rgba(99,102,241,.18); color: #818cf8;
    padding: 3px 8px; border-radius: 20px;
    letter-spacing: .04em;
    border: 1px solid rgba(99,102,241,.25);
    white-space: nowrap; flex-shrink: 0;
}

.sidebar-nav {
    flex: 1;
    padding: 6px 0 12px;
    overflow-y: auto; overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.08) transparent;
}
.sidebar-nav::-webkit-scrollbar       { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 2px; }

.nav-section {
    font-size: 9px; font-weight: 600;
    color: var(--sb-section);
    text-transform: uppercase; letter-spacing: .1em;
    padding: 14px 16px 5px;
}
.nav-item { margin: 1px 8px; }
.nav-link {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px;
    border-radius: 7px;
    color: var(--sb-text);
    font-size: 12.5px;
    text-decoration: none;
    transition: all .15s ease;
    position: relative; white-space: nowrap;
}
.nav-link:hover  { color: var(--sb-text-active); background: var(--sb-bg-hover); }
.nav-link.active { color: var(--sb-text-active); background: var(--sb-bg-active); }
.nav-link.active::before {
    content: '';
    position: absolute;
    left: -8px; top: 6px; bottom: 6px;
    width: 3px;
    background: var(--sb-accent);
    border-radius: 0 3px 3px 0;
    box-shadow: 0 0 8px var(--sb-accent-glow);
}
.nav-icon {
    width: 20px;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; opacity: .65; flex-shrink: 0;
    transition: opacity .15s;
}
.nav-link:hover .nav-icon,
.nav-link.active .nav-icon { opacity: 1; color: var(--sb-accent); }
.nav-label { flex: 1; }
.nav-ext   { opacity: .35; font-size: 9px; }

.nav-badge {
    background: var(--danger); color: #fff;
    font-size: 9px; font-weight: 700;
    padding: 2px 6px; border-radius: 10px; line-height: 1.4;
    animation: pulse-badge 2s ease-in-out infinite;
}
@keyframes pulse-badge {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
    50%       { box-shadow: 0 0 0 3px rgba(239,68,68,.25); }
}
.nav-count {
    font-size: 10px; color: var(--sb-section);
    background: rgba(255,255,255,.06);
    padding: 2px 6px; border-radius: 10px;
}
.nav-link--danger { color: rgba(248,113,113,.7); }
.nav-link--danger:hover { color: #f87171; background: rgba(239,68,68,.08); }

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--sb-border);
    flex-shrink: 0;
}
.sidebar-user {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 8px;
    text-decoration: none;
    transition: background .15s; cursor: pointer;
}
.sidebar-user:hover { background: var(--sb-bg-hover); }
.sidebar-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 600; color: #fff; flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
    display: block; font-size: 12px; font-weight: 500; color: #e2e8f0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-role  { display: block; font-size: 10px; color: var(--sb-section); margin-top: 1px; }
.sidebar-user-arrow { font-size: 9px; color: var(--sb-section); opacity: .5; flex-shrink: 0; }

/* ===== TOPBAR ===== */
.topbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 32px; height: 52px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100; flex-shrink: 0;
}
.topbar-left  { display: flex; align-items: center; gap: 12px; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.topbar-date  { font-size: .78rem; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
.topbar-date i { color: var(--accent); }

.sidebar-toggle {
    display: none; background: none; border: none;
    cursor: pointer; font-size: 1.1rem; color: var(--text-secondary);
    padding: 6px 8px; border-radius: var(--radius-xs); transition: .15s;
}
.sidebar-toggle:hover { background: var(--bg); color: var(--text); }

/* ===== OVERLAY ===== */
.sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.5); z-index: 999; backdrop-filter: blur(2px);
}

/* ===== PAGE HEADER ===== */
.page-header {
    display: flex; justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px; gap: 12px; flex-wrap: wrap;
}
.page-header-left h2,
.page-header h2 {
    font-size: 1.15rem; font-weight: 600; color: var(--text);
    display: flex; align-items: center; gap: 8px;
}
.page-header-left small,
.page-header small {
    display: block; font-size: .75rem;
    color: var(--text-secondary); margin-top: 3px;
}
.page-header-actions { display: flex; gap: 8px; align-items: center; }

.wave { animation: wave-anim .8s ease-in-out; display: inline-block; }
@keyframes wave-anim {
    0%,100% { transform: rotate(0deg); }
    25%      { transform: rotate(20deg); }
    75%      { transform: rotate(-10deg); }
}

/* ===== STAT CARDS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px; margin-bottom: 22px;
}
.stat-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px;
    display: flex; align-items: center; gap: 14px;
    position: relative; overflow: hidden;
    transition: border-color .2s, box-shadow .2s, transform .15s;
    box-shadow: var(--shadow);
}
.stat-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.stat-card::before {
    content: ''; position: absolute;
    left: 0; top: 0; bottom: 0; width: 3px;
}
.stat-card--blue::before   { background: var(--info); }
.stat-card--green::before  { background: var(--success); }
.stat-card--slate::before  { background: var(--text-tertiary); }
.stat-card--amber::before  { background: var(--warning); }
.stat-card--indigo::before { background: var(--indigo); }
.stat-card--purple::before { background: var(--purple); }

.stat-icon {
    width: 42px; height: 42px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; flex-shrink: 0;
}
.stat-card--blue   .stat-icon { background: #dbeafe; color: var(--info); }
.stat-card--green  .stat-icon { background: #d1fae5; color: var(--success); }
.stat-card--slate  .stat-icon { background: var(--bg-secondary); color: var(--text-secondary); }
.stat-card--amber  .stat-icon { background: #fef3c7; color: var(--warning); }
.stat-card--indigo .stat-icon { background: #e0e7ff; color: var(--indigo); }
.stat-card--purple .stat-icon { background: #ede9fe; color: var(--purple); }

.stat-value { font-size: 1.5rem; font-weight: 600; color: var(--text); line-height: 1; }
.stat-label { font-size: .72rem; color: var(--text-secondary); margin-top: 4px; }
.stat-hint  { font-size: .67rem; color: var(--text-tertiary); margin-top: 2px; }
.stat-hint--up   { color: var(--success) !important; }
.stat-hint--warn { color: var(--warning) !important; }

/* ===== QUICK ACTIONS ===== */
.quick-actions { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }

/* ===== CARDS ===== */
.card {
    background: var(--white); border-radius: var(--radius);
    border: 1px solid var(--border); box-shadow: var(--shadow);
    overflow: hidden; margin-bottom: 20px;
}
.card-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 20px; border-bottom: 1px solid var(--border-light);
}
.card-header h3 {
    font-size: .875rem; font-weight: 600; color: var(--text);
    display: flex; align-items: center; gap: 8px; margin: 0;
}
.card-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--indigo); flex-shrink: 0; }
.card-body { padding: 20px; }

/* ===== BUTTONS ===== */
.btn {
    padding: 8px 16px; border-radius: var(--radius-sm);
    font-weight: 500; cursor: pointer; border: none;
    transition: all .15s; font-size: .825rem;
    display: inline-flex; align-items: center; gap: 7px;
    font-family: inherit; line-height: 1;
    white-space: nowrap; text-decoration: none;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); }
.btn-accent  { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); }
.btn-indigo  { background: var(--indigo); color: #fff; }
.btn-indigo:hover { background: #4f46e5; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; }
.btn-danger  { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #d97706; }
.btn-outline {
    background: transparent; border: 1px solid var(--border);
    color: var(--text-secondary);
}
.btn-outline:hover { background: var(--bg); color: var(--text); border-color: #cbd5e1; }

/* Quick-action butonu */
.btn-qa {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 14px; border-radius: var(--radius-sm);
    font-size: .8rem; font-weight: 500;
    border: 1px solid var(--border);
    background: var(--white); color: var(--text-secondary);
    transition: all .15s; cursor: pointer;
    font-family: inherit; text-decoration: none; white-space: nowrap;
}
.btn-qa:hover { border-color: #cbd5e1; color: var(--text); background: var(--bg-secondary); }
.btn-qa--primary { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.btn-qa--primary:hover { background: #4f46e5; border-color: #4f46e5; color: #fff; }

/* WhatsApp hikaye butonu */
.btn-story { background: #1a1a2e; color: #fff; border-color: #1a1a2e; }
.btn-story:hover { background: #25D366; border-color: #25D366; color: #fff; }

.btn-sm   { padding: 5px 11px; font-size: .75rem; border-radius: var(--radius-xs); gap: 5px; }
.btn-icon {
    width: 32px; height: 32px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--radius-xs);
}

/* ===== BADGES ===== */
.badge {
    padding: 2px 9px; border-radius: 20px;
    font-size: .67rem; font-weight: 600;
    display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
}
.badge-inline {
    background: var(--danger); color: #fff;
    font-size: .58rem; font-weight: 700;
    padding: 2px 5px; border-radius: 10px; line-height: 1.4;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger  { background: #fee2e2; color: #b91c1c; }
.badge-info    { background: #dbeafe; color: #1e40af; }
.badge-muted   { background: var(--bg-secondary); color: #475569; }

/* ===== STATUS BADGE ===== */
.status-badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: .7rem; font-weight: 500;
    padding: 3px 10px; border-radius: 20px; white-space: nowrap;
}
.status-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.status-badge--active  { background: #d1fae5; color: #065f46; }
.status-badge--active::before  { background: var(--success); }
.status-badge--passive { background: #fef3c7; color: #92400e; }
.status-badge--passive::before { background: var(--warning); }
.status-badge--draft   { background: var(--bg-secondary); color: #475569; }
.status-badge--draft::before   { background: var(--text-tertiary); }

/* ===== TABLE ===== */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th {
    text-align: left; color: var(--text-secondary);
    font-size: .68rem; text-transform: uppercase;
    letter-spacing: .06em; font-weight: 600;
    padding: 10px 18px; background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light); white-space: nowrap;
}
td {
    padding: 12px 18px; border-bottom: 1px solid var(--border-light);
    font-size: .83rem; vertical-align: middle; color: var(--text);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--bg-secondary); }

.listing-title  { font-weight: 500; display: block; }
.listing-agent  { font-size: .68rem; color: var(--text-secondary); margin-top: 2px; display: block; }
.location-text  { color: var(--text-secondary); font-size: .77rem; }
.price-text     { font-weight: 600; white-space: nowrap; }
.date-text      { color: var(--text-secondary); font-size: .77rem; white-space: nowrap; }

.action-btns { display: flex; gap: 4px; justify-content: flex-end; }
.action-btn {
    width: 28px; height: 28px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border); color: var(--text-secondary);
    font-size: .72rem; transition: all .12s; text-decoration: none;
}
.action-btn:hover         { border-color: #cbd5e1; color: var(--text); background: var(--bg-secondary); }
.action-btn--view:hover   { color: var(--info);    border-color: var(--info); }
.action-btn--edit:hover   { color: var(--indigo);  border-color: var(--indigo); }
.action-btn--delete:hover { color: var(--danger);  border-color: var(--danger); }

/* ===== FORMS ===== */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block; margin-bottom: 6px;
    font-weight: 500; font-size: .8rem; color: var(--text);
}
.form-group label .req { color: var(--danger); margin-left: 2px; }

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%; padding: 9px 12px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: .85rem; font-family: inherit; color: var(--text);
    background: var(--white);
    transition: border-color .15s, box-shadow .15s; outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--indigo);
    box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-hint { font-size: .72rem; color: var(--text-secondary); margin-top: 4px; }

.grid-2    { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3    { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 16px; }

/* ===== ALERTS ===== */
.alert {
    padding: 11px 15px; border-radius: var(--radius-sm);
    margin-bottom: 16px;
    display: flex; align-items: center; gap: 10px;
    font-size: .845rem; font-weight: 500;
}
.alert i { flex-shrink: 0; }
.alert-success { background: #d1fae5; color: #065f46; border-left: 3px solid var(--success); }
.alert-danger  { background: #fee2e2; color: #b91c1c; border-left: 3px solid var(--danger); }
.alert-warning { background: #fef3c7; color: #92400e; border-left: 3px solid var(--warning); }
.alert-info    { background: #dbeafe; color: #1e40af; border-left: 3px solid var(--info); }

/* ===== TOAST ===== */
#toast-container {
    position: fixed; bottom: 24px; right: 24px;
    z-index: 9999; display: flex; flex-direction: column; gap: 8px;
}
.toast {
    background: #1e293b; color: #fff;
    padding: 12px 16px; border-radius: 10px;
    display: flex; align-items: center; gap: 10px;
    min-width: 260px; max-width: 340px;
    box-shadow: 0 8px 28px rgba(0,0,0,.2);
    font-size: .845rem; animation: toastIn .3s ease;
    border-left: 3px solid var(--accent);
}
.toast.toast-success { border-left-color: var(--success); }
.toast.toast-danger  { border-left-color: var(--danger); }
.toast.toast-warning { border-left-color: var(--warning); }
.toast.toast-info    { border-left-color: var(--info); }
.toast i { font-size: .95rem; flex-shrink: 0; }
.toast-msg  { flex: 1; }
.toast-close {
    background: none; border: none; color: rgba(255,255,255,.4);
    cursor: pointer; font-size: .95rem; padding: 0 0 0 8px;
    flex-shrink: 0; line-height: 1;
}
@keyframes toastIn  { from { transform: translateX(110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { to   { transform: translateX(110%); opacity: 0; } }

/* ===== FILTER BAR ===== */
.filter-bar {
    background: var(--white);
    padding: 12px 16px; border-radius: var(--radius);
    border: 1px solid var(--border); margin-bottom: 16px;
    display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}
.filter-bar input,
.filter-bar select {
    padding: 7px 11px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); font-size: .83rem;
    outline: none; font-family: inherit;
    background: var(--white); color: var(--text); transition: border-color .15s;
}
.filter-bar input:focus,
.filter-bar select:focus { border-color: var(--indigo); }
.filter-bar input { flex: 1; min-width: 160px; }

/* ===== BULK ACTION BAR ===== */
.bulk-bar {
    display: none;
    background: #fffbeb; border: 1px solid #fde68a;
    border-radius: var(--radius);
    padding: 10px 16px; margin-bottom: 14px;
    align-items: center; gap: 12px; flex-wrap: wrap;
}
.bulk-bar.visible { display: flex; }
.bulk-bar-count { font-size: .84rem; font-weight: 600; color: #92400e; }

/* ===== LISTING CARDS ===== */
.listing-card {
    background: var(--white); border-radius: var(--radius);
    overflow: hidden; display: flex;
    border: 1px solid var(--border); box-shadow: var(--shadow);
    margin-bottom: 12px;
    transition: box-shadow .2s, transform .15s;
    position: relative;
}
.listing-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.listing-card-check {
    position: absolute; top: 10px; left: 10px; z-index: 2;
    cursor: pointer; width: 17px; height: 17px; accent-color: var(--indigo);
}

.listing-card-img { width: 190px; height: 135px; flex-shrink: 0; }
.listing-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.listing-card-img-empty {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-secondary); color: var(--text-tertiary); font-size: 1.6rem;
}

.listing-card-body {
    flex: 1; padding: 14px 18px;
    display: flex; flex-direction: column; justify-content: center; min-width: 0;
}
.listing-card-title {
    font-size: .9rem; font-weight: 600; color: var(--text); margin-bottom: 5px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.listing-card-meta  { color: var(--text-secondary); font-size: .76rem; margin-bottom: 6px; }
.listing-card-price { font-size: 1rem; font-weight: 700; color: var(--primary); }
.listing-card-foot  { margin-top: 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.listing-card-date  { color: var(--text-secondary); font-size: .75rem; }

.listing-card-actions {
    display: flex; flex-direction: column; gap: 7px;
    padding: 14px; background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    justify-content: center; min-width: 120px;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex; gap: 4px; justify-content: center;
    margin-top: 20px; flex-wrap: wrap; align-items: center;
}
.page-btn {
    min-width: 33px; height: 33px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--radius-xs); font-size: .82rem; font-weight: 500;
    border: 1px solid var(--border); color: var(--text-secondary);
    background: var(--white); transition: all .15s;
    padding: 0 8px; text-decoration: none;
}
.page-btn:hover  { border-color: var(--indigo); color: var(--indigo); }
.page-btn.active { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.page-btn.disabled { opacity: .35; pointer-events: none; }

/* ===== UPLOAD ZONE ===== */
.upload-zone {
    border: 2px dashed var(--border); padding: 28px 20px;
    text-align: center; border-radius: var(--radius);
    cursor: pointer; transition: all .2s; background: var(--bg-secondary);
}
.upload-zone:hover           { border-color: var(--indigo); background: #eef2ff; }
.upload-zone.optimizing      { border-color: var(--indigo) !important; background: #eef2ff; }
.upload-zone.upload-zone--done { border-color: var(--success) !important; background: #f0fdf4; }
.upload-zone i   { font-size: 1.75rem; color: var(--text-tertiary); margin-bottom: 10px; display: block; }
.upload-zone p   { margin: 0; font-weight: 500; font-size: .875rem; color: var(--text); }
.upload-zone span { font-size: .73rem; color: var(--text-secondary); display: block; margin-top: 4px; }

/* ===== EDIT LISTING — Media Grid ===== */
.edit-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 140px));
    gap: 12px; margin-bottom: 16px;
}
.edit-media-item {
    position: relative; border-radius: var(--radius-sm);
    overflow: hidden; border: 2px solid var(--border);
    background: var(--bg-secondary); cursor: grab;
    transition: border-color .2s, transform .2s;
}
.edit-media-item:active  { cursor: grabbing; }
.edit-media-item:hover   { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.edit-media-item--main   { border-color: var(--indigo); }
.edit-media-item img     { width: 100%; height: 100px; object-fit: cover; display: block; }
.sortable-ghost          { opacity: .35; background: #e0e7ff; border-color: var(--indigo) !important; }

.edit-media-controls {
    position: absolute; top: 5px; right: 5px;
    display: flex; flex-direction: column; gap: 4px;
    opacity: 0; transition: opacity .18s; z-index: 10;
}
.edit-media-item:hover .edit-media-controls { opacity: 1; }

.edit-ctrl-btn {
    width: 26px; height: 26px; border-radius: 6px;
    border: none; cursor: pointer; font-size: .7rem;
    display: flex; align-items: center; justify-content: center;
    background: rgba(15,23,42,.65); color: rgba(255,255,255,.85);
    transition: background .15s, transform .15s;
    backdrop-filter: blur(4px);
}
.edit-ctrl-btn:hover            { transform: scale(1.1); }
.edit-ctrl-btn--star:hover,
.edit-ctrl-btn--star-active     { background: var(--warning); color: #fff; }
.edit-ctrl-btn--delete:hover    { background: var(--danger);  color: #fff; }

.edit-media-badge {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: var(--indigo); color: #fff;
    font-size: .58rem; font-weight: 700;
    text-align: center; padding: 3px 0; letter-spacing: .06em;
}
.edit-photo-hint {
    font-size: .75rem; color: var(--text-tertiary);
    display: flex; align-items: center; gap: 5px;
}
.edit-loading {
    text-align: center; padding: 24px; color: var(--text-secondary);
    font-size: .85rem; display: flex; align-items: center;
    justify-content: center; gap: 8px;
}
.edit-form-actions {
    display: flex; gap: 10px; justify-content: flex-end;
    padding-bottom: 40px; margin-top: 4px;
}

/* ===== MEDIA GRID (genel) ===== */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px,1fr)); gap: 10px; }
.media-item {
    position: relative; border-radius: var(--radius-sm);
    overflow: hidden; aspect-ratio: 4/3; border: 1px solid var(--border);
}
.media-item img { width: 100%; height: 100%; object-fit: cover; }
.media-item .btn-remove {
    position: absolute; top: 4px; right: 4px;
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--danger); color: #fff; border: none;
    cursor: pointer; font-size: .65rem;
    display: flex; align-items: center; justify-content: center;
    transition: transform .15s;
}
.media-item .btn-remove:hover { transform: scale(1.15); }

/* ===== STEPPER ===== */
.stepper {
    display: flex; justify-content: space-between;
    margin: 0 auto 28px; max-width: 640px; position: relative;
}
.stepper::before {
    content: ''; position: absolute;
    top: 17px; left: 10%; width: 80%;
    height: 2px; background: var(--border); z-index: 1;
}
.stepper-step { position: relative; z-index: 2; text-align: center; flex: 1; }
.stepper-circle {
    width: 34px; height: 34px; border: 2px solid var(--border);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 5px; font-weight: 600; font-size: .8rem;
    color: var(--text-secondary); background: var(--white); transition: all .25s;
}
.stepper-label { font-size: .6rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .5px; }
.stepper-step.active .stepper-circle    { border-color: var(--indigo); color: var(--indigo); transform: scale(1.08); box-shadow: 0 0 0 4px rgba(99,102,241,.12); }
.stepper-step.active .stepper-label    { color: var(--primary); }
.stepper-step.completed .stepper-circle { background: var(--indigo); border-color: var(--indigo); color: #fff; }

/* ===== SELECTION CARDS ===== */
.selection-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); gap: 12px; }
.select-card {
    border: 2px solid var(--border); border-radius: var(--radius);
    padding: 20px 12px; text-align: center; cursor: pointer;
    transition: all .2s; background: var(--white);
    position: relative; user-select: none;
}
.select-card:hover    { border-color: var(--indigo); background: #eef2ff; transform: translateY(-2px); }
.select-card.selected { border-color: var(--indigo); background: #eef2ff; box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.select-card.selected::after {
    content: "\f058"; font-family: "Font Awesome 6 Free"; font-weight: 900;
    position: absolute; top: 7px; right: 9px;
    color: var(--indigo); font-size: .82rem;
}
.select-card i    { font-size: 1.65rem; color: var(--primary); margin-bottom: 8px; display: block; }
.select-card span { font-weight: 600; font-size: .82rem; color: var(--primary); }

/* ===== FORM STEPS ===== */
.step-content { display: none; }
.step-content.active { display: block; animation: stepIn .3s ease; }
@keyframes stepIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.form-nav {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border);
}

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 52px 24px; color: var(--text-secondary); }
.empty-state > i { font-size: 2.5rem; color: var(--border); margin-bottom: 14px; display: block; }
.empty-state p { font-size: .875rem; margin-bottom: 14px; }
.empty-state-icon {
    width: 50px; height: 50px; border-radius: 14px;
    background: var(--bg-secondary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; margin: 0 auto 14px; color: var(--text-tertiary);
}

/* ===== RANK / PROGRESS ===== */
.rank-badge {
    background: var(--primary); color: #fff;
    width: 26px; height: 26px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; font-size: .75rem; font-weight: 700;
}
.progress-bar  { background: var(--border); height: 6px; border-radius: 10px; overflow: hidden; width: 100px; }
.progress-fill { background: var(--indigo); height: 100%; border-radius: 10px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); box-shadow: 8px 0 30px rgba(0,0,0,.2); }
    .sidebar-overlay.open { display: block; }
    .main-content { margin-left: 0; }
    .sidebar-toggle { display: flex; }
    .page-content { padding: 18px 20px; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .topbar { padding: 0 20px; }
}

@media (max-width: 600px) {
    .listing-card { flex-direction: column; }
    .listing-card-img { width: 100%; height: 170px; }
    .listing-card-actions {
        flex-direction: row; min-width: unset;
        border-left: none; border-top: 1px solid var(--border);
    }
    .stats-grid { grid-template-columns: 1fr; }
    .topbar { padding: 0 14px; }
    .page-content { padding: 14px 16px; }
    .selection-grid { grid-template-columns: 1fr 1fr; }
    .filter-bar { flex-direction: column; }
    .filter-bar input { min-width: unset; width: 100%; }
    #toast-container { left: 12px; right: 12px; bottom: 12px; }
    .toast { min-width: unset; max-width: unset; }
    .quick-actions { gap: 6px; }
    .edit-media-grid { grid-template-columns: repeat(auto-fill, minmax(110px,110px)); }
    .bulk-bar { gap: 8px; }
}