/* ============================================
   Agency Portal — Ek Bileşenler & İyileştirmeler
   Version: 1.2.0
   Renk Teması: Pembe/Rose (#E91E63) — Influencer360 Marka Rengi
   ============================================ */

/* ============================================
   1. TAB NAVİGASYON
   ============================================ */
.agency-tab-nav {
    display: flex;
    gap: 2px;
    background: #F1F5F9;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 20px;
}

.agency-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    color: #64748B;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.agency-tab-btn:hover {
    color: var(--agency-primary);
    background: rgba(233,30,99,0.06);
}

.agency-tab-btn.active {
    background: #fff;
    color: var(--agency-primary);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.agency-tab-btn .badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--agency-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    border-radius: 9px;
}

.agency-tab-content { display: none; }
.agency-tab-content.active { display: block; }

/* ============================================
   2. TİMELINE
   ============================================ */
.agency-timeline {
    list-style: none;
    position: relative;
    padding: 0;
}

.agency-timeline::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #E2E8F0;
}

.agency-timeline-item {
    position: relative;
    padding: 0 0 20px 44px;
}

.agency-timeline-item:last-child { padding-bottom: 0; }

.agency-timeline-icon {
    position: absolute;
    left: 0;
    top: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #E2E8F0;
}

.agency-timeline-icon.pending  { background: #FEF3C7; color: #D97706; }
.agency-timeline-icon.success  { background: #D1FAE5; color: #059669; }
.agency-timeline-icon.info     { background: #DBEAFE; color: #2563EB; }
.agency-timeline-icon.danger   { background: #FEE2E2; color: #DC2626; }
.agency-timeline-icon.primary  { background: rgba(233,30,99,0.12); color: var(--agency-primary); }

.agency-timeline-body {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 12px 16px;
}

.agency-timeline-title {
    font-size: 13px;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 2px;
}

.agency-timeline-meta {
    font-size: 11px;
    color: #94A3B8;
}

.agency-timeline-text {
    font-size: 13px;
    color: #475569;
    margin-top: 6px;
    line-height: 1.6;
}

/* ============================================
   3. CHAT / DESTEK MESAJLARI
   ============================================ */
.agency-chat-area {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    max-height: 480px;
    overflow-y: auto;
    background: #F8FAFC;
    border-radius: 0 0 12px 12px;
}

.agency-chat-area::-webkit-scrollbar { width: 4px; }
.agency-chat-area::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 2px; }

.agency-chat-msg {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.agency-chat-msg.from-agency { flex-direction: row-reverse; }

.agency-chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.agency-chat-avatar.from-admin   { background: linear-gradient(135deg, #E91E63, #FF6B9D); }
.agency-chat-avatar.from-agency  { background: linear-gradient(135deg, #475569, #334155); }

.agency-chat-bubble {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.6;
    color: #0F172A;
}

.agency-chat-msg.from-admin  .agency-chat-bubble { background: #fff; border: 1px solid #E2E8F0; border-top-left-radius: 2px; }
.agency-chat-msg.from-agency .agency-chat-bubble { background: var(--agency-gradient); color: #fff; border-top-right-radius: 2px; }

.agency-chat-time {
    font-size: 10px;
    color: #94A3B8;
    margin-top: 4px;
}

.agency-chat-msg.from-agency .agency-chat-time { text-align: right; color: rgba(255,255,255,0.65); }

/* ============================================
   4. TOGGLE / SWITCH
   ============================================ */
.agency-toggle {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
}

.agency-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.agency-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #CBD5E1;
    border-radius: 24px;
    transition: 0.3s;
}

.agency-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    left: 3px;
    top: 3px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    transition: 0.3s;
}

.agency-toggle input:checked + .agency-toggle-slider { background: var(--agency-primary); }
.agency-toggle input:checked + .agency-toggle-slider::before { transform: translateX(18px); }

/* Share row with toggle */
.agency-share-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #F1F5F9;
}

.agency-share-row:last-child { border-bottom: none; }

.agency-share-row-label {
    font-size: 13px;
    font-weight: 600;
    color: #0F172A;
}

.agency-share-row-hint {
    font-size: 11px;
    color: #94A3B8;
    margin-top: 1px;
}

/* ============================================
   5. RADIO CARD (Talep Tipi Seçimi)
   ============================================ */
.agency-radio-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.agency-radio-card {
    position: relative;
    cursor: pointer;
}

.agency-radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.agency-radio-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 16px;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    background: #fff;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 100px;
}

.agency-radio-card:hover .agency-radio-card-inner {
    border-color: var(--agency-primary-light);
    background: rgba(233,30,99,0.04);
}

.agency-radio-card input:checked + .agency-radio-card-inner {
    border-color: var(--agency-primary);
    background: rgba(233,30,99,0.06);
    box-shadow: 0 0 0 3px rgba(233,30,99,0.12);
}

.agency-radio-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: rgba(233,30,99,0.1);
    color: var(--agency-primary);
}

.agency-radio-card-label {
    font-size: 13px;
    font-weight: 700;
    color: #0F172A;
}

.agency-radio-card-desc {
    font-size: 11px;
    color: #94A3B8;
    margin-top: 2px;
}

/* ============================================
   6. INFO LIST (Detay sayfaları)
   ============================================ */
.agency-info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.agency-info-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid #F1F5F9;
    font-size: 13px;
}

.agency-info-item:last-child { border-bottom: none; }

.agency-info-item-label {
    min-width: 130px;
    font-weight: 700;
    color: #94A3B8;
    flex-shrink: 0;
}

.agency-info-item-value {
    color: #0F172A;
    font-weight: 600;
    flex: 1;
}

/* ============================================
   7. STAT TREND (Dashboard için ek)
   ============================================ */
.agency-stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    margin-top: 4px;
}

.agency-stat-trend.up   { background: #D1FAE5; color: #059669; }
.agency-stat-trend.down { background: #FEE2E2; color: #DC2626; }

/* ============================================
   8. PAGE BREADCRUMB
   ============================================ */
.agency-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #94A3B8;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.agency-breadcrumb a {
    color: #94A3B8;
    text-decoration: none;
    font-weight: 600;
}

.agency-breadcrumb a:hover { color: var(--agency-primary); }

.agency-breadcrumb-sep {
    color: #CBD5E1;
    font-size: 10px;
}

.agency-breadcrumb-current {
    color: #475569;
    font-weight: 700;
}

/* ============================================
   9. STATUS STEP TRACKER (Talep durumu)
   ============================================ */
.agency-step-tracker {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.agency-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
    position: relative;
    min-width: 80px;
}

.agency-step::before {
    content: '';
    position: absolute;
    top: 16px;
    right: -50%;
    width: 100%;
    height: 2px;
    background: #E2E8F0;
    z-index: 0;
}

.agency-step:last-child::before { display: none; }

.agency-step.done::before { background: var(--agency-primary); }

.agency-step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    border: 2px solid #E2E8F0;
    background: #fff;
    color: #94A3B8;
    position: relative;
    z-index: 1;
}

.agency-step.done   .agency-step-circle { background: var(--agency-primary); border-color: var(--agency-primary); color: #fff; }
.agency-step.active .agency-step-circle { border-color: var(--agency-primary); color: var(--agency-primary); box-shadow: 0 0 0 4px rgba(233,30,99,0.12); }

.agency-step-label {
    font-size: 11px;
    font-weight: 700;
    color: #94A3B8;
    text-align: center;
    white-space: nowrap;
}

.agency-step.active .agency-step-label { color: var(--agency-primary); }
.agency-step.done   .agency-step-label { color: #059669; }

/* ============================================
   10. STATS COMPARISON ROW (Paylaşım durumu)
   ============================================ */
.agency-share-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.agency-share-stat {
    flex: 1;
    min-width: 120px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 14px 16px;
    text-align: center;
}

.agency-share-stat-num {
    font-size: 22px;
    font-weight: 800;
    color: #0F172A;
}

.agency-share-stat-label {
    font-size: 11px;
    color: #94A3B8;
    font-weight: 600;
    margin-top: 2px;
}

.agency-share-stat.shared .agency-share-stat-num { color: #059669; }
.agency-share-stat.total  .agency-share-stat-num { color: var(--agency-primary); }

/* ============================================
   11. FORM SECTIONS (Kayıt Formu için)
   ============================================ */
.agency-form-section {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #F1F5F9;
}

.agency-form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.agency-form-section-title {
    font-size: 14px;
    font-weight: 800;
    color: #0F172A;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.agency-form-section-title i { color: var(--agency-primary); font-size: 13px; }

.agency-form-section-desc {
    font-size: 12px;
    color: #94A3B8;
    margin-bottom: 16px;
}

.agency-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 600px) {
    .agency-form-row { grid-template-columns: 1fr; }
}

/* ============================================
   12. WELCOME BANNER ENHANCEMENT
   ============================================ */
.agency-welcome {
    position: relative;
    overflow: hidden;
}

.agency-welcome::after {
    content: '';
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 180px;
    height: 180px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    pointer-events: none;
}

.agency-welcome-actions {
    margin-top: 14px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.agency-welcome-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    transition: all 0.2s ease;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.agency-welcome-action-btn:hover {
    background: rgba(255,255,255,0.25);
    color: #fff;
    border-color: rgba(255,255,255,0.35);
}

/* ============================================
   13. NOTIFICATION ITEM
   ============================================ */
.agency-notif-list { display: flex; flex-direction: column; gap: 0; }

.agency-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid #F1F5F9;
    transition: background 0.15s;
    text-decoration: none;
    color: inherit;
}

.agency-notif-item:last-child { border-bottom: none; }
.agency-notif-item:hover { background: rgba(233,30,99,0.04); }
.agency-notif-item.unread { background: rgba(233,30,99,0.03); border-left: 3px solid var(--agency-primary); }

.agency-notif-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.agency-notif-icon.info    { background: #DBEAFE; color: #2563EB; }
.agency-notif-icon.success { background: #D1FAE5; color: #059669; }
.agency-notif-icon.warning { background: #FEF3C7; color: #D97706; }
.agency-notif-icon.danger  { background: #FEE2E2; color: #DC2626; }
.agency-notif-icon.primary { background: rgba(233,30,99,0.12); color: var(--agency-primary); }

.agency-notif-body { flex: 1; min-width: 0; }
.agency-notif-title { font-size: 13px; font-weight: 700; color: #0F172A; margin-bottom: 2px; }
.agency-notif-text  { font-size: 12px; color: #64748B; line-height: 1.5; }
.agency-notif-time  { font-size: 11px; color: #94A3B8; margin-top: 4px; }

.agency-notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--agency-primary);
    flex-shrink: 0;
    margin-top: 5px;
}

/* ============================================
   14. KANBAN PRIORITY TAG
   ============================================ */
.agency-priority-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.agency-priority-tag.high   { background: #FEE2E2; color: #DC2626; }
.agency-priority-tag.medium { background: #FEF3C7; color: #D97706; }
.agency-priority-tag.low    { background: #D1FAE5; color: #059669; }
.agency-priority-tag.urgent { background: #F3E8FF; color: #7C3AED; }

/* ============================================
   15. RESPONSIVE IMPROVEMENTS
   ============================================ */

/* Sidebar brand name gradient — pembe temalı */
.agency-sidebar-brand-name {
    background: linear-gradient(135deg, #fff 0%, #FFB3CC 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

@media (max-width: 992px) {
    .agency-portal-content {
        padding: 16px;
    }

    .agency-tab-nav {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .agency-tab-btn {
        flex: 0 0 auto;
    }

    .agency-radio-cards {
        grid-template-columns: 1fr 1fr;
    }

    .agency-step-tracker {
        gap: 0;
    }
}

@media (max-width: 768px) {
    .agency-sidebar {
        transform: translateX(-100%);
    }

    .agency-sidebar.open {
        transform: translateX(0);
    }

    .agency-sidebar-overlay.visible {
        display: block;
    }

    .agency-portal-main {
        margin-left: 0;
    }

    .agency-topbar-toggle {
        display: flex;
    }

    .agency-topbar-breadcrumb h1 {
        font-size: 14px;
    }

    .agency-welcome-title {
        font-size: 17px;
    }

    .agency-info-item {
        flex-direction: column;
        gap: 3px;
    }

    .agency-info-item-label {
        min-width: auto;
    }

    .agency-chat-bubble {
        max-width: 90%;
    }

    .agency-radio-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .agency-page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .agency-filter-bar {
        flex-direction: column;
    }

    .agency-search-input {
        min-width: 100%;
    }

    .agency-welcome {
        padding: 18px 20px;
    }
}

/* ============================================
   16. AGENCY PORTAL — SIDEBAR HEADER BRANDING
   ============================================ */
.agency-sidebar-header {
    background: #1a1a2e;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: relative;
}

.agency-sidebar-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(233,30,99,0.4), transparent);
}

/* Brand identity accent in sidebar */
.agency-sidebar-brand-subtitle {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #FF8FAB;
    margin-top: 2px;
}

/* ============================================
   17. BTN-AGENCY — Pembe Tema
   ============================================ */

.btn-agency {
    background: var(--agency-gradient);
    color: #fff !important;
    border: none;
    font-weight: 700;
}

.btn-agency:hover {
    background: var(--agency-gradient-hover);
    color: #fff;
    box-shadow: 0 4px 15px rgba(233,30,99,0.35);
    transform: translateY(-1px);
}

.btn-outline-agency {
    background: transparent;
    color: var(--agency-primary) !important;
    border: 1px solid var(--agency-primary) !important;
    font-weight: 700;
}

.btn-outline-agency:hover {
    background: rgba(233,30,99,0.08);
    color: var(--agency-primary);
}

/* Badge */
.badge.bg-agency {
    background: var(--agency-gradient) !important;
    color: #fff;
}

/* ============================================
   18. CARD HOVER & TRANSITIONS
   ============================================ */
.agency-card {
    transition: box-shadow 0.2s ease;
}

.agency-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Tablo satırları hover */
.agency-table tr:hover td {
    background: rgba(233,30,99,0.04);
    cursor: pointer;
}

/* Link rengi */
.agency-table a {
    color: var(--agency-primary);
    font-weight: 600;
}

.agency-table a:hover {
    color: var(--agency-primary-dark);
    text-decoration: underline;
}

/* ============================================
   19. AUTH LAYOUT ENHANCEMENT
   ============================================ */
.agency-auth-card {
    animation: authFadeIn 0.4s ease;
}

@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.agency-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    font-size: 12px;
    color: #94A3B8;
    font-weight: 600;
}

.agency-auth-divider::before,
.agency-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E2E8F0;
}

/* Portal type indicator */
.agency-portal-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(233,30,99,0.1);
    border: 1px solid rgba(233,30,99,0.2);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: var(--agency-primary);
    margin-bottom: 16px;
}

/* ============================================
   20. ANIMATION UTILITIES
   ============================================ */
.agency-fade-in {
    animation: agencyFadeIn 0.3s ease;
}

@keyframes agencyFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.agency-pulse {
    animation: agencyPulse 2s infinite;
}

@keyframes agencyPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Unread bildirim animasyonu */
.agency-menu-badge-pulse {
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(233,30,99,0.4); }
    50%       { box-shadow: 0 0 0 4px rgba(233,30,99,0); }
}