/* ============================================================
   ValuMap — Ana Stil Dosyası
   ============================================================ */

:root {
    --fresh:    #10b981; --fresh-bg:  #ecfdf5;
    --recent:   #3b82f6; --recent-bg: #eff6ff;
    --old:      #f59e0b; --old-bg:    #fffbeb;
    --stale:    #ef4444; --stale-bg:  #fef2f2;
    --brand:    #0f172a;
    --accent:   #4f46e5;
    --t2:       #64748b;
    --bg:       #f8fafc;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; }
body { height: 100vh; width: 100vw; overflow: hidden; background: var(--bg); color: var(--brand); font-size: 13px; }
#app { display: flex; height: 100%; }

/* ---- SIDEBAR ---- */
#panel { width: 380px; min-width: 380px; background: white; border-right: 1px solid #e2e8f0; z-index: 1000; display: flex; flex-direction: column; }
.sidebar-header { padding: 24px; border-bottom: 1px solid #f1f5f9; }

.logo { font-family: 'Outfit', sans-serif; font-size: 1.4rem; color: var(--brand); margin-bottom: 20px; display: flex; align-items: center; gap: 10px; letter-spacing: -0.5px; }
.logo i { background: var(--brand); color: white; padding: 8px; border-radius: 10px; font-size: 1rem; }

.legend { display: flex; justify-content: space-between; align-items: center; padding: 10px 4px; margin-bottom: 16px; border-bottom: 1px solid #f1f5f9; }
.leg-item { display: flex; align-items: center; gap: 5px; border: 1px solid #b0b0c1; border-radius: 20px; padding: 7px 17px; }
.leg-dot  { width: 7px; height: 7px; border-radius: 50%; }
.leg-txt  { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: -0.2px; }

#search-input { width: 100%; padding: 14px 14px 14px 42px; border-radius: 12px; border: 1.5px solid #e2e8f0; font-size: 0.9rem; outline: none; margin-bottom: 12px; transition: 0.2s; }
#search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(79,70,229,0.1); }

.quick-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 6px 12px; background: #f1f5f9; border-radius: 8px; font-size: 0.75rem; font-weight: 600; cursor: pointer; transition: 0.2s; }
.tag:hover { background: var(--brand); color: white; }

#list { overflow-y: auto; flex: 1; padding: 16px; background: #fcfcfd; }
.list-card { background: white; padding: 16px; border-radius: 14px; margin-bottom: 12px; border: 2px solid var(--card-color); cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: 0.2s; }
.list-card:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0,0,0,0.05); }

.sbox { margin: 16px; padding: 24px; background: #f8faff; border-radius: 16px; border: 1px dashed #cbd5e1; text-align: center; }
.sbox-em { font-size: 1.5rem; display: block; margin-bottom: 8px; }
.sbox-t  { font-weight: 700; font-size: 0.9rem; color: var(--brand); margin-bottom: 4px; }
.sbox-s  { font-size: 0.8rem; color: var(--t2); line-height: 1.4; }

/* ---- MAP ---- */
#map { flex: 1; position: relative; }
.custom-pin { background: white; border-radius: 10px; padding: 8px 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); text-align: center; min-width: 120px; border: 2px solid var(--c); position: relative; }
.custom-pin::after { content: ''; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); border-left: 8px solid transparent; border-right: 8px solid transparent; border-top: 8px solid var(--c); }

/* ---- DRAWER ---- */
#drawer { position: fixed; bottom: -100%; left: 50%; transform: translateX(-50%); width: 100%; max-width: 520px; background: white; border-radius: 28px 28px 0 0; z-index: 2000; transition: 0.4s cubic-bezier(0.25,1,0.5,1); box-shadow: 0 -10px 40px rgba(0,0,0,0.2); }
#drawer.open { bottom: 0; }
.overlay { position: fixed; inset: 0; background: rgba(15,23,42,0.4); backdrop-filter: blur(4px); display: none; z-index: 1999; }

.tabs { display: flex; padding: 0 24px; border-bottom: 1px solid #f1f5f9; }
.tab  { padding: 14px 0; cursor: pointer; font-weight: 700; font-size: 0.82rem; color: #94a3b8; border-bottom: 2px solid transparent; margin-right: 20px; transition: 0.15s; }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.u-badge        { font-size: 9px; font-weight: 700; padding: 3px 7px; border-radius: 5px; text-transform: uppercase; margin-left: 6px; }
.u-badge.global { background: #fff7ed; color: #c2410c; border: 1px solid #ffedd5; }
.u-badge.uzman  { background: #e0e7ff; color: #4338ca; }
.u-badge.yerel  { background: #eff6ff; color: #1d4ed8; }
.u-badge.rehber { background: #f0fdf4; color: #15803d; }
.u-badge.yeni   { background: #f1f5f9; color: #475569; }
.p-status { font-size: 9px; font-weight: 700; padding: 4px 10px; border-radius: 8px; margin-top: 10px; display: inline-block; }

#report-form { padding: 16px 24px; border-top: 1px solid #f1f5f9; display: none; }
.report-row { display: flex; gap: 8px; }
.report-row .inp { margin-bottom: 0; }

/* ---- MAP CONTROLS ---- */
.map-fab { position: absolute; z-index: 800; border: none; cursor: pointer; font-family: 'Inter', sans-serif; }

#auth-btn { top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; background: white; box-shadow: 0 2px 10px rgba(0,0,0,0.2); display: grid; place-items: center; font-size: 1.1rem; color: var(--brand); transition: 0.2s; }
#auth-btn:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.25); }
#auth-btn .av { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: white; display: grid; place-items: center; font-weight: 700; font-size: 0.82rem; }

#place-btn { bottom: 80px; right: 14px; padding: 11px 18px; border-radius: 24px; background: var(--brand); color: white; box-shadow: 0 4px 14px rgba(0,0,0,0.3); display: flex; align-items: center; gap: 8px; font-size: 0.82rem; font-weight: 600; transition: 0.2s; }
#place-btn:hover, #place-btn.active { background: var(--accent); }

#place-hint { bottom: 130px; right: 14px; background: rgba(15,23,42,0.85); color: white; padding: 8px 14px; border-radius: 10px; font-size: 0.78rem; display: none; position: absolute; z-index: 800; white-space: nowrap; }

#mob-toggle { top: 14px; left: 14px; width: 44px; height: 44px; border-radius: 50%; background: white; box-shadow: 0 2px 10px rgba(0,0,0,0.2); display: none; place-items: center; font-size: 1rem; color: var(--brand); }

/* ---- MODAL ---- */
.modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,0.5); backdrop-filter: blur(6px); z-index: 2099; display: none; }
.modal-overlay.open { display: block; }
.modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(0.95); background: white; border-radius: 20px; padding: 28px; width: 92%; max-width: 400px; z-index: 2100; display: none; opacity: 0; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.modal.open { display: block; animation: popIn 0.25s forwards; }
@keyframes popIn { to { opacity: 1; transform: translate(-50%,-50%) scale(1); } }

.modal-title { font-family: 'Outfit', sans-serif; font-size: 1.2rem; font-weight: 800; margin-bottom: 20px; }
.modal-x { position: absolute; right: 20px; top: 20px; cursor: pointer; color: var(--t2); background: none; border: none; font-size: 1rem; }

.inp { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1.5px solid #e2e8f0; font-size: 0.875rem; font-family: 'Inter', sans-serif; outline: none; margin-bottom: 10px; transition: 0.2s; }
.inp:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,70,229,0.08); }

.btn-p { width: 100%; padding: 13px; border-radius: 10px; background: var(--brand); color: white; border: none; cursor: pointer; font-weight: 700; font-size: 0.88rem; font-family: 'Inter', sans-serif; transition: 0.2s; }
.btn-p:hover { background: var(--accent); }
.btn-ghost { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 0.82rem; font-family: 'Inter', sans-serif; margin-top: 10px; width: 100%; padding: 6px; font-weight: 600; }

.divider { text-align: center; color: var(--t2); font-size: 0.78rem; margin: 12px 0; position: relative; }
.divider::before, .divider::after { content: ''; position: absolute; top: 50%; width: 40%; height: 1px; background: #e2e8f0; }
.divider::before { left: 0; } .divider::after { right: 0; }

.user-info   { display: flex; align-items: center; gap: 12px; padding: 14px; background: #f8fafc; border-radius: 12px; margin-bottom: 16px; }
.user-avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--brand); display: grid; place-items: center; color: white; font-weight: 700; font-size: 0.9rem; flex-shrink: 0; }
.btn-danger  { width: 100%; padding: 12px; border-radius: 10px; background: #fef2f2; color: #ef4444; border: 1.5px solid #fecaca; cursor: pointer; font-weight: 700; font-family: 'Inter', sans-serif; font-size: 0.85rem; }

/* ---- SOURCE FILTER CHIPS ---- */
.src-chip { display: flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 10px; border: 1.5px solid #e2e8f0; background: #f8fafc; cursor: pointer; transition: 0.2s; user-select: none; flex: 1; justify-content: center; }
.src-chip--active { background: #f0f4ff; border-color: #c7d2fe; }
.src-chip-icon  { font-size: 0.75rem; color: #94a3b8; transition: 0.2s; }
.src-chip--active .src-chip-icon { color: var(--accent); }
.src-chip-text  { font-size: 0.73rem; font-weight: 700; color: #94a3b8; transition: 0.2s; white-space: nowrap; }
.src-chip--active .src-chip-text { color: var(--accent); }
.src-chip-check { width: 16px; height: 16px; border-radius: 5px; background: #c7d2fe; display: grid; place-items: center; font-size: 0.55rem; color: var(--accent); opacity: 0; transition: 0.2s; flex-shrink: 0; }
.src-chip--active .src-chip-check { opacity: 1; }

/* ---- TOAST ---- */
#toast-container { position: fixed; top: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 12px; pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 14px; padding: 16px 20px; background: white; border-radius: 16px; box-shadow: 0 8px 32px rgba(15,23,42,0.15), 0 2px 8px rgba(15,23,42,0.08); min-width: 300px; max-width: 360px; pointer-events: all; animation: toastIn 0.35s cubic-bezier(0.34,1.56,0.64,1) forwards; border-left: 4px solid var(--toast-color, var(--accent)); position: relative; overflow: hidden; }
.toast.out { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn  { from { opacity: 0; transform: translateX(60px) scale(0.95); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(60px); } }
.toast-icon  { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; font-size: 1.1rem; background: var(--toast-icon-bg, #eff6ff); color: var(--toast-color, var(--accent)); }
.toast-body  { flex: 1; }
.toast-title { font-weight: 700; font-size: 0.85rem; color: var(--brand); margin-bottom: 3px; }
.toast-msg   { font-size: 0.78rem; color: var(--t2); line-height: 1.4; }
.toast-close { background: none; border: none; cursor: pointer; color: #cbd5e1; font-size: 0.85rem; padding: 0; flex-shrink: 0; margin-top: -2px; }
.toast-close:hover { color: var(--brand); }
.toast-progress { position: absolute; bottom: 0; left: 0; height: 3px; background: var(--toast-color, var(--accent)); opacity: 0.3; animation: toastProgress var(--toast-duration, 4s) linear forwards; }
@keyframes toastProgress { from { width: 100%; } to { width: 0%; } }
.toast-points { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 4px 10px; background: linear-gradient(135deg,#fef9c3,#fef3c7); border-radius: 20px; font-size: 0.75rem; font-weight: 700; color: #92400e; border: 1px solid #fde68a; }

/* ---- LOADING SPINNER ---- */
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid #e2e8f0; border-top-color: var(--accent); border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- MOBILE ---- */
@media (max-width: 768px) {
    #panel { position: fixed; left: 0; top: 0; height: 100%; z-index: 1050; transform: translateX(-100%); transition: transform 0.3s; }
    #panel.mob-open { transform: translateX(0); }
    #map { width: 100vw; }
    #mob-toggle { display: grid; }
}
