/* style.css - GooUzman Full Optimized CSS */

:root {
    --tg-theme-bg-color: #181818;
    --tg-theme-text-color: #ffffff;
    --tg-theme-hint-color: #9e9e9e;
    --tg-theme-button-color: #5288c1;
    --tg-theme-secondary-bg-color: #242424;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--tg-theme-bg-color, #181818);
    color: var(--tg-theme-text-color, #ffffff);
    padding: 24px;
    padding-bottom: 60px;
}

/* --- FORM KONTEYNER VE HEADER --- */
.form-container { 
    width: 100%; 
    max-width: 400px; 
    margin: 0 auto; 
}

.header { 
    display: flex; 
    align-items: center; 
    margin-bottom: 24px; 
}

.back-btn { 
    background: none; 
    border: none; 
    font-size: 24px; 
    color: var(--tg-theme-text-color); 
    cursor: pointer; 
    padding-right: 16px; 
}

.header h2 { 
    font-size: 22px; 
    font-weight: 700; 
}

.form-card { 
    background-color: var(--tg-theme-secondary-bg-color, #242424); 
    padding: 24px; 
    border-radius: 16px; 
}

/* --- GİRDİ ALANLARI (INPUTS) --- */
.row { display: flex; gap: 12px; }
.input-group { flex: 1; margin-bottom: 20px; }

.input-group label { 
    display: block; 
    font-size: 13px; 
    color: var(--tg-theme-hint-color, #9e9e9e); 
    margin-bottom: 8px; 
    font-weight: 500; 
}

.input-field {
    width: 100%; 
    padding: 14px 16px; 
    border-radius: 12px; 
    border: 1px solid #333; 
    background: var(--tg-theme-bg-color, #181818); 
    color: var(--tg-theme-text-color, #ffffff); 
    font-size: 15px; 
    outline: none; 
}

.input-field:focus { 
    border-color: var(--tg-theme-button-color, #5288c1); 
}

/* --- BUTONLAR --- */
.main-btn {
    width: 100%; 
    padding: 16px; 
    border: none; 
    border-radius: 14px;
    font-size: 17px; 
    font-weight: 600;
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    color: white; 
    margin-top: 12px; 
    cursor: pointer;
    text-align: center;
    transition: transform 0.1s;
}

.main-btn:active { transform: scale(0.98); }

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

/* Giriş sayfasındaki ikincil butonlar için */
.secondary-btn {
    background: #2a2a2a !important; 
    border: 1px solid #444 !important;
    color: white !important;
}

/* Hesabım sayfasındaki Çıkış butonu */
.btn-logout {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #ef4444 !important; 
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
}

/* --- İŞLETME KARTLARI --- */
.business-card {
    background: var(--tg-theme-secondary-bg-color, #242424);
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: stretch; 
    border: 1px solid rgba(255,255,255,0.05);
    transition: 0.2s;
}

.business-info h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.location-text { font-size: 13px; color: var(--tg-theme-hint-color); }

/* --- ANALİZ VE PUANLAMA --- */
.rating-badge {
    background: #FFF9C4; 
    color: #9E7D00; 
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.stats-row {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 10px;
}

.growth-text {
    font-size: 0.8rem;
    font-weight: 600;
}
.growth-text.info { color: #0ea5e9; font-style: italic; } 
.growth-text.positive { color: #10b981; } 
.growth-text.neutral { color: var(--tg-theme-hint-color); } 
.growth-text.negative { color: #ef4444; } 

.period-text {
    font-size: 0.75rem;
    color: var(--tg-theme-hint-color);
    font-weight: 400;
}

/* --- PROFİL VE YÖNETİM --- */
.avatar-large {
    width: 60px; height: 60px;
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
    color: white; border-radius: 50%;
    margin: 0 auto 12px auto;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: bold;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.user-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--tg-theme-text-color);
    margin-bottom: 4px;
}

.user-role {
    font-size: 14px;
    color: var(--tg-theme-hint-color);
    font-weight: 500;
}

.account-actions {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-add {
    background: rgba(14, 165, 233, 0.15);
    color: #0ea5e9;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.outline-card {
    border: 1px solid #0ea5e9;
    background: rgba(14, 165, 233, 0.05);
}
.form-title { font-size: 15px; margin-bottom: 12px; color: #0ea5e9; font-weight: 600;}

.section-title {
    font-size: 13px; color: var(--tg-theme-hint-color);
    margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px;
}

/* --- SEO SKOR BARI (DETAY VE LİSTE) --- */
.seo-container {
    background-color: var(--tg-theme-secondary-bg-color, #242424);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.05);
}

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

.seo-label {
    font-weight: 600;
    color: var(--tg-theme-hint-color, #9e9e9e);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.seo-value-text {
    font-size: 20px !important;
    font-weight: 800 !important;
    color: var(--tg-theme-text-color, #ffffff);
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.progress-bg {
    background: var(--tg-theme-bg-color, #181818);
    border-radius: 20px;
    height: 14px;
    width: 100%;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
}

.progress-fill {
    height: 100%;
    width: 0%;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.5s;
    border-radius: 20px;
}

.bg-red { background: linear-gradient(90deg, #ef4444, #f87171); box-shadow: 0 0 10px rgba(239, 68, 68, 0.3); }
.bg-yellow { background: linear-gradient(90deg, #f59e0b, #fbbf24); box-shadow: 0 0 10px rgba(245, 158, 11, 0.3); }
.bg-green { background: linear-gradient(90deg, #10b981, #34d399); box-shadow: 0 0 10px rgba(16, 185, 129, 0.3); }

.text-red { color: #ef4444 !important; }
.text-yellow { color: #f59e0b !important; }
.text-green { color: #10b981 !important; }

/* --- İŞLETME DETAY VE AI ANALİZ --- */
.ai-card {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: white;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-box {
    background-color: var(--tg-theme-secondary-bg-color, #242424);
    padding: 16px 10px;
    border-radius: 14px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
}

.stat-value {
    font-weight: 700;
    font-size: 16px;
    color: var(--tg-theme-text-color, #ffffff);
    display: block;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 10px;
    color: var(--tg-theme-hint-color, #9e9e9e);
    text-transform: uppercase;
    font-weight: 600;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.info-row:last-child { border-bottom: none; }

.info-icon {
    font-size: 20px;
    min-width: 36px; height: 36px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
}

.info-content small {
    display: block;
    color: var(--tg-theme-hint-color, #9e9e9e);
    font-size: 11px;
    margin-bottom: 2px;
}

.info-content span {
    color: var(--tg-theme-text-color, #ffffff);
    font-weight: 600;
    font-size: 15px;
    line-height: 1.4;
    display: block;
}

/* --- YARDIMCI VE YÜKLEME SINIFLARI --- */
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-align-center { display: flex; align-items: center; }
.text-center { text-align: center; }
.full-width { flex: 1; }
.hidden { display: none !important; }
.mb-24 { margin-bottom: 24px; }
.clickable-card { cursor: pointer; }
.card-disabled { opacity: 0.6; }

.status-msg { font-size: 12px; text-align: center; margin-top: 10px; font-weight: 500;}
.list-loader {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top: 3px solid var(--tg-theme-button-color);
    width: 24px; height: 24px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}
.loader { 
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 3px solid #ffffff;
    width: 18px; height: 18px;
    animation: spin 1s linear infinite;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.slide-down { animation: slideDown 0.3s ease-out; }
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.update-text {
    text-align: center;
    color: var(--tg-theme-hint-color, #9e9e9e);
    font-size: 12px;
    margin-top: 24px;
    font-style: italic;
}
/* --- UYELIK SAYFASI EKSTRA STİLLERİ --- */

/* İşlem geçmişinin 20 ay boyunca uzayıp gitmemesi için kaydırma alanı */
.scroll-area {
    max-height: 280px; /* Yaklaşık 5-6 işlemden sonra kaydırma başlar */
    overflow-y: auto;
    padding-right: 8px;
}

/* Scrollbar'ı telefonlar için kibarlaştıralım */
.scroll-area::-webkit-scrollbar {
    width: 4px;
}

.scroll-area::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* Fiyat Etiketi */
.price-badge {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    padding: 6px 10px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
}

/* Durum Rozeti (Özel Renkler) */
.rating-badge.bg-green {
    background: #10b981 !important;
    color: white !important;
}

.rating-badge.bg-red {
    background: #ef4444 !important;
    color: white !important;
}

/* İptal Butonu Stili */
.btn-logout {
    background: rgba(239, 68, 68, 0.08) !important;
    color: #ef4444 !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
}
/* --- BOTTOM SHEET MODAL (PREMIUM LOOK) --- */
.sheet-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: flex-end;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.sheet-overlay.active {
    visibility: visible;
    opacity: 1;
}

.bottom-sheet {
    width: 100%;
    background: var(--tg-theme-secondary-bg-color, #242424);
    padding: 20px 24px 40px 24px;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -10px 25px rgba(0,0,0,0.5);
}

.sheet-overlay.active .bottom-sheet {
    transform: translateY(0);
}

.sheet-handle {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin: -10px auto 20px auto;
}

.clickable-row {
    cursor: pointer;
    transition: background 0.2s;
}

.clickable-row:active {
    background: rgba(255, 255, 255, 0.05);
}

.clickable-row .info-content small {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--tg-theme-button-color); /* i ikonunu renklendirelim */
}
/* Bottom Sheet içindeki yazıların tasarımı */
#sheetContent b {
    color: var(--tg-theme-button-color); /* Başlıklar mavi/cyan olsun */
    font-weight: 600;
}

#sheetContent li span:last-child {
    color: var(--tg-theme-hint-color); /* Açıklamalar daha soft gri olsun */
    opacity: 0.9;
}
#sheetContent span:last-child {
    color: #e0e0e0 !important; /* Standart gri yerine daha parlak gümüş tonu */
    line-height: 1.5;
}

#sheetContent h3 {
    text-shadow: 0 2px 4px rgba(0,0,0,0.3); /* Başlık daha çok patlasın */
}
/* --- BOTTOM SHEET MODAL (KARANLIK VE NET) --- */
.bottom-sheet {
    width: 100%;
    /* Arka planı koyulaştırdık (Senin temanla uyumlu #1c1c1c) */
    background: #1c1c1c !important; 
    padding: 24px;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.8); /* Gölgeyi artırdık ki derinlik olsun */
    border-top: 1px solid rgba(255,255,255,0.1); /* Üst kenara ince çizgi */
}

/* Pencere açıldığında arka planı iyice karartalım */
.sheet-overlay {
    background: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(8px); /* Arkadaki yazıları bulanıklaştır, odak modalda kalsın */
}
