/* ==================================================================
 * ROLE THEME — Rol bazlı merkezi renk token'ları
 * ==================================================================
 * Tek doğruluk kaynağı: her kullanıcı rolünün (kulvarın) TEK ana rengi
 * vardır; tüm yüzeyler (navbar rol rozeti, akış rol etiketi, sidebar
 * avatar çerçevesi, ortak listesi ikonları, rol değiştirme modalı)
 * renklerini buradaki token'lardan alır.
 *
 * Renk çapası: sağ üstteki "Tedarikçi Paneli" rozeti (amber) — diğer
 * roller de navbar rozet paletiyle hizalanmıştır.
 *
 *   ROL           ANA RENK   AİLE
 *   Tedarikçi     amber      #d97706
 *   Müteahhit     mavi       #3b82f6
 *   Danışman      mor        #7c3aed
 *   Belediye      indigo     #4f46e5
 *   Mülk Sahibi   yeşil      #16a34a
 *   Ziyaretçi     gri        #6b7280
 *
 * Token şeması (her rol için):
 *   --role-X         : ana renk (ikon, accent bar, ring)
 *   --role-X-hover   : hover tonu (bir kademe koyu)
 *   --role-X-active  : active/pressed tonu (iki kademe koyu)
 *   --role-X-text    : açık zemin üstünde okunur koyu metin
 *   --role-X-bg      : açık zemin (badge/chip arka planı)
 *   --role-X-bg-2    : açık zemin gradyan ucu
 *   --role-X-border  : açık zemin kenarlığı
 *   --role-X-soft    : saydam vurgu (ince border/glow)
 *
 * Kural: bileşen CSS'lerinde rol rengi HEX olarak yazılmaz; yalnız bu
 * token'lar kullanılır. Yeni yüzey eklerken .role-theme--<rol> sarmalayıcı
 * sınıfı + jenerik --role-accent* değişkenleri de kullanılabilir.
 * ================================================================== */

:root {
    /* --- Tedarikçi (amber) --- */
    --role-supplier: #d97706;
    --role-supplier-hover: #b45309;
    --role-supplier-active: #92400e;
    --role-supplier-text: #b45309;
    --role-supplier-bg: #fffbeb;
    --role-supplier-bg-2: #fef3c7;
    --role-supplier-border: #fde68a;
    --role-supplier-soft: rgba(217, 119, 6, 0.25);
    --role-supplier-ring-2: #b45309;

    /* --- Müteahhit (mavi) --- */
    --role-contractor: #3b82f6;
    --role-contractor-hover: #1d4ed8;
    --role-contractor-active: #1e40af;
    --role-contractor-text: #285d77;
    --role-contractor-bg: #dbeafe;
    --role-contractor-bg-2: #eff6ff;
    --role-contractor-border: #bfdbfe;
    --role-contractor-soft: rgba(59, 130, 246, 0.25);
    --role-contractor-ring-2: #285d77;

    /* --- Danışman (mor) --- */
    --role-consultant: #7c3aed;
    --role-consultant-hover: #6d28d9;
    --role-consultant-active: #5b21b6;
    --role-consultant-text: #6d28d9;
    --role-consultant-bg: #ede9fe;
    --role-consultant-bg-2: #f5f3ff;
    --role-consultant-border: #ddd6fe;
    --role-consultant-soft: rgba(124, 58, 237, 0.22);
    --role-consultant-ring-2: #6d28d9;

    /* --- Belediye / Kamu (indigo) --- */
    --role-municipality: #4f46e5;
    --role-municipality-hover: #4338ca;
    --role-municipality-active: #3730a3;
    --role-municipality-text: #3730a3;
    --role-municipality-bg: #e0e7ff;
    --role-municipality-bg-2: #eef2ff;
    --role-municipality-border: #c7d2fe;
    --role-municipality-soft: rgba(79, 70, 229, 0.22);
    --role-municipality-ring-2: #3730a3;

    /* --- Mülk Sahibi (yeşil) --- */
    --role-owner: #16a34a;
    --role-owner-hover: #15803d;
    --role-owner-active: #14532d;
    --role-owner-text: #166534;
    --role-owner-bg: #dcfce7;
    --role-owner-bg-2: #f0fdf4;
    --role-owner-border: #bbf7d0;
    --role-owner-soft: rgba(34, 197, 94, 0.22);
    --role-owner-ring-2: #15803d;

    /* --- Ziyaretçi / Bireysel (gri) --- */
    --role-visitor: #6b7280;
    --role-visitor-hover: #4b5563;
    --role-visitor-active: #374151;
    --role-visitor-text: #374151;
    --role-visitor-bg: #e5e7eb;
    --role-visitor-bg-2: #f1f5f9;
    --role-visitor-border: #d1d5db;
    --role-visitor-soft: rgba(148, 163, 184, 0.25);
    --role-visitor-ring-2: #4b5563;
}

/* ------------------------------------------------------------------
 * Jenerik rol sarmalayıcıları — bileşen tek sete (--role-accent*)
 * bakar, rengi sarmalayıcı sınıf belirler. Sidebar kartındaki mevcut
 * .role-<rol> sınıfları da aynı eşlemeyi alır.
 * ------------------------------------------------------------------ */
.role-theme--supplier,
.role-supplier {
    --role-accent: var(--role-supplier);
    --role-accent-hover: var(--role-supplier-hover);
    --role-accent-active: var(--role-supplier-active);
    --role-accent-text: var(--role-supplier-text);
    --role-accent-bg: var(--role-supplier-bg);
    --role-accent-bg-2: var(--role-supplier-bg-2);
    --role-accent-border: var(--role-supplier-border);
    --role-accent-soft: var(--role-supplier-soft);
    --ring-color-1: var(--role-supplier);
    --ring-color-2: var(--role-supplier-ring-2);
}

.role-theme--contractor,
.role-contractor {
    --role-accent: var(--role-contractor);
    --role-accent-hover: var(--role-contractor-hover);
    --role-accent-active: var(--role-contractor-active);
    --role-accent-text: var(--role-contractor-text);
    --role-accent-bg: var(--role-contractor-bg);
    --role-accent-bg-2: var(--role-contractor-bg-2);
    --role-accent-border: var(--role-contractor-border);
    --role-accent-soft: var(--role-contractor-soft);
    --ring-color-1: var(--role-contractor);
    --ring-color-2: var(--role-contractor-ring-2);
}

.role-theme--consultant,
.role-consultant {
    --role-accent: var(--role-consultant);
    --role-accent-hover: var(--role-consultant-hover);
    --role-accent-active: var(--role-consultant-active);
    --role-accent-text: var(--role-consultant-text);
    --role-accent-bg: var(--role-consultant-bg);
    --role-accent-bg-2: var(--role-consultant-bg-2);
    --role-accent-border: var(--role-consultant-border);
    --role-accent-soft: var(--role-consultant-soft);
    --ring-color-1: var(--role-consultant);
    --ring-color-2: var(--role-consultant-ring-2);
}

.role-theme--municipality,
.role-municipality {
    --role-accent: var(--role-municipality);
    --role-accent-hover: var(--role-municipality-hover);
    --role-accent-active: var(--role-municipality-active);
    --role-accent-text: var(--role-municipality-text);
    --role-accent-bg: var(--role-municipality-bg);
    --role-accent-bg-2: var(--role-municipality-bg-2);
    --role-accent-border: var(--role-municipality-border);
    --role-accent-soft: var(--role-municipality-soft);
    --ring-color-1: var(--role-municipality);
    --ring-color-2: var(--role-municipality-ring-2);
}

.role-theme--owner,
.role-owner {
    --role-accent: var(--role-owner);
    --role-accent-hover: var(--role-owner-hover);
    --role-accent-active: var(--role-owner-active);
    --role-accent-text: var(--role-owner-text);
    --role-accent-bg: var(--role-owner-bg);
    --role-accent-bg-2: var(--role-owner-bg-2);
    --role-accent-border: var(--role-owner-border);
    --role-accent-soft: var(--role-owner-soft);
    --ring-color-1: var(--role-owner);
    --ring-color-2: var(--role-owner-ring-2);
}

.role-theme--visitor,
.role-visitor {
    --role-accent: var(--role-visitor);
    --role-accent-hover: var(--role-visitor-hover);
    --role-accent-active: var(--role-visitor-active);
    --role-accent-text: var(--role-visitor-text);
    --role-accent-bg: var(--role-visitor-bg);
    --role-accent-bg-2: var(--role-visitor-bg-2);
    --role-accent-border: var(--role-visitor-border);
    --role-accent-soft: var(--role-visitor-soft);
    --ring-color-1: var(--role-visitor);
    --ring-color-2: var(--role-visitor-ring-2);
}

/* ------------------------------------------------------------------
 * Sidebar profil kartı — mevcut markup'a dokunmadan rol rengi uygula
 * (accent bar + avatar fallback Bootstrap utility'lerini token'a bağla)
 * ------------------------------------------------------------------ */
.role-supplier .fsl-accent-bar,
.role-contractor .fsl-accent-bar,
.role-consultant .fsl-accent-bar,
.role-municipality .fsl-accent-bar,
.role-owner .fsl-accent-bar,
.role-visitor .fsl-accent-bar {
    background-color: var(--role-accent) !important;
}

.role-supplier .fsl-avatar-fallback,
.role-contractor .fsl-avatar-fallback,
.role-consultant .fsl-avatar-fallback,
.role-municipality .fsl-avatar-fallback,
.role-owner .fsl-avatar-fallback,
.role-visitor .fsl-avatar-fallback {
    background-color: var(--role-accent-bg) !important;
    color: var(--role-accent) !important;
}

/* ------------------------------------------------------------------
 * "Çözüm Ortakları" listesi ikon kutuları
 * ------------------------------------------------------------------ */
.role-partner-icon {
    background-color: var(--role-accent-bg);
    color: var(--role-accent);
}

/* ------------------------------------------------------------------
 * Danışman utility sınıfları — Bootstrap'ta mor karşılığı olmadığı
 * için (info=turkuaz yanlıştı) color_class="consultant" ile kullanılır.
 * Yüzeyler: feed sidebar rol pili, ipucu kutusu, profil linki, CTA.
 * ------------------------------------------------------------------ */
.bg-consultant {
    background-color: var(--role-consultant) !important;
}

.bg-consultant-subtle {
    background-color: var(--role-consultant-bg) !important;
}

.text-consultant {
    color: var(--role-consultant-text) !important;
}

.btn-outline-consultant {
    color: var(--role-consultant-text);
    border-color: var(--role-consultant);
}

.btn-outline-consultant:hover,
.btn-outline-consultant:focus {
    background-color: var(--role-consultant);
    border-color: var(--role-consultant);
    color: #fff;
}
