/* ============================================================
   ECOM HUB — Marka teması
   Phoenix (Bootstrap 5) temasının üzerine giydirilir.
   Palet kaynağı: ecomhub.com.tr  (assets/css/styles.css :root)
   ============================================================ */

:root {
    /* --- marka --- */
    --eh-green:        #14f58f;   /* marka yeşili */
    --eh-green-600:    #0ddb7e;
    --eh-green-700:    #0bb96a;
    --eh-green-800:    #087a4a;   /* beyaz üzerine metin/link için koyu ton */
    --eh-green-900:    #04343a;   /* koyu zemin */
    --eh-green-soft:   #e6fef4;
    --eh-green-line:   #b3f7da;
    --eh-accent:       #14f58f;

    /* #14f58f parlak: üzerine beyaz yazı okunmaz. Yeşil zeminde bu renk kullanılır. */
    --eh-on-green:     #04343a;

    /* --- nötr --- */
    --eh-ink:          #1b2021;   /* headingcolor */
    --eh-ink-2:        #30363f;   /* navcolor */
    --eh-body:         #333333;
    --eh-muted:        #6e8497;
    --eh-border:       #dee2e6;
    --eh-gray:         #f1f1f1;
    --eh-light:        #f8f8f8;
    --eh-white:        #ffffff;
    --eh-red:          #e91e1e;

    --eh-radius:       10px;
    --eh-shadow:       0 1px 2px rgba(4,52,58,.06), 0 8px 24px rgba(4,52,58,.06);

    /* Phoenix/Bootstrap değişkenlerini markaya çek */
    --phoenix-primary:        #14f58f;
    --phoenix-primary-rgb:    20, 245, 143;
    --bs-primary:             #14f58f;
    --bs-primary-rgb:         20, 245, 143;
    --bs-link-color:          #14f58f;
    --bs-link-hover-color:    #087a4a;
    --bs-body-font-family:    'Jost', 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

body,
div, p, span, a, b, strong, label,
h1, h2, h3, h4, h5, h6,
button, input, select, textarea, table {
    font-family: 'Jost', 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

body {
    background: var(--eh-light);
    color: var(--eh-body);
}

/* ---------- Bootstrap primary geçersiz kılmaları ---------- */
.btn-primary {
    --bs-btn-color:           #04343a;
    --bs-btn-hover-color:     #04343a;
    --bs-btn-active-color:    #04343a;
    --bs-btn-disabled-color:  #04343a;
    --bs-btn-bg:              #14f58f;
    --bs-btn-border-color:    #14f58f;
    --bs-btn-hover-bg:        #0ddb7e;
    --bs-btn-hover-border-color: #0ddb7e;
    --bs-btn-active-bg:       #0bb96a;
    --bs-btn-active-border-color: #04343a;
    --bs-btn-disabled-bg:     #7fb9a5;
    --bs-btn-disabled-border-color: #7fb9a5;
}
.btn-outline-primary {
    --bs-btn-color:           #14f58f;
    --bs-btn-border-color:    #14f58f;
    --bs-btn-hover-color:     #04343a;
    --bs-btn-hover-bg:        #14f58f;
    --bs-btn-hover-border-color: #14f58f;
    --bs-btn-active-color:    #04343a;
    --bs-btn-active-bg:       #0ddb7e;
    --bs-btn-active-border-color: #087a4a;
}
.text-primary   { color: var(--eh-green) !important; }
.bg-primary     { background-color: var(--eh-green) !important; }
.border-primary { border-color: var(--eh-green) !important; }
a               { color: var(--eh-green-800); }
a:hover         { color: var(--eh-green-700); }

.form-control:focus,
.form-select:focus {
    border-color: var(--eh-green);
    box-shadow: 0 0 0 .2rem rgba(20, 245, 143, .15);
}
.form-check-input:checked {
    background-color: var(--eh-green);
    border-color: var(--eh-green);
}

/* ---------- Üst bar ---------- */
.eh-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    height: 62px;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 22px;
    background: var(--eh-white);
    border-bottom: 1px solid var(--eh-border);
    box-shadow: 0 1px 2px rgba(4,52,58,.04);
}
.eh-topbar .eh-logo img { height: 30px; display: block; }
.eh-topbar .eh-logo     { display: flex; align-items: center; text-decoration: none; }

.eh-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 26px;
    padding: 0 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    background: var(--eh-green-soft);
    color: var(--eh-green-800);
    border: 1px solid var(--eh-green-line);
}
.eh-role-badge.is-admin      { background:#eef2f7; color:#30363f; border-color:#dbe3ec; }
.eh-role-badge.is-influencer { background:#f3ecfb; color:#5b3fa0; border-color:#e3d6f6; }

.eh-topbar-spacer { flex: 1 1 auto; }

.eh-user {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--eh-ink);
}
.eh-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: var(--eh-green);
    color: var(--eh-on-green);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .5px;
}
.eh-user { cursor: default; }
.eh-user-meta         { line-height: 1.2; }
.eh-user-meta .n      { font-size: 13px; font-weight: 600; color: var(--eh-ink); }
.eh-user-meta .r      { font-size: 11px; color: var(--eh-muted); }

/* ---------- Üst bar bağlantıları + çıkış ---------- */
.eh-ust-link {
    display: inline-flex; align-items: center; gap: 7px;
    height: 34px; padding: 0 13px;
    border: 1px solid var(--eh-border); border-radius: 8px;
    background: #fff; color: var(--eh-ink-2);
    font-size: 13px; font-weight: 600; text-decoration: none;
    transition: border-color .15s, color .15s, background .15s;
    white-space: nowrap;
}
.eh-ust-link:hover { border-color: var(--eh-green); color: var(--eh-green); background: var(--eh-green-soft); }

.eh-cikis {
    display: inline-flex; align-items: center; gap: 7px;
    height: 34px; padding: 0 15px;
    border: 1px solid #f0d4d4; border-radius: 8px;
    background: #fff; color: #c0392b;
    font-size: 13px; font-weight: 700; text-decoration: none;
    transition: background .15s, border-color .15s, color .15s;
    white-space: nowrap;
}
.eh-cikis:hover { background: #c0392b; border-color: #c0392b; color: #fff; }

@media (max-width: 768px) {
    .eh-ust-link span { display: none; }
    .eh-ust-link, .eh-cikis { padding: 0 11px; }
    .eh-cikis span { display: none; }
}

/* ---------- Taklit (impersonation) şeridi ---------- */
.eh-impersonate-bar {
    background: #fff8e6;
    border-bottom: 1px solid #f3e2b4;
    color: #7a5c00;
    font-size: 13px;
    padding: 8px 22px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.eh-impersonate-bar a {
    color: #7a5c00;
    font-weight: 700;
    text-decoration: underline;
}

/* ---------- Kenar menü ---------- */
.eh-shell   { display: flex; min-height: calc(100vh - 62px); align-items: stretch; }
.eh-sidebar {
    width: 248px;
    flex: 0 0 248px;
    background: var(--eh-white);
    border-right: 1px solid var(--eh-border);
    padding: 18px 12px;
}
.eh-nav-group {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #9fb0bf;
    padding: 16px 12px 8px;
}
.eh-nav-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    margin-bottom: 2px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--eh-ink-2);
    text-decoration: none;
    transition: background .15s, color .15s;
}
.eh-nav-link i    { font-size: 16px; width: 18px; text-align: center; color: var(--eh-muted); }
.eh-nav-link:hover{ background: var(--eh-green-soft); color: var(--eh-green-800); }
.eh-nav-link:hover i { color: var(--eh-green); }
.eh-nav-link.active  { background: var(--eh-green); color: var(--eh-on-green); }
.eh-nav-link.active i{ color: var(--eh-on-green); }

.eh-main    { flex: 1 1 auto; min-width: 0; padding: 26px 28px 60px; }

/* ---------- Sayfa başlığı ---------- */
.eh-page-head { margin-bottom: 22px; }
.eh-page-head h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--eh-ink);
    margin: 0 0 4px;
    letter-spacing: -.3px;
}
.eh-page-head p { font-size: 14px; color: var(--eh-muted); margin: 0; }

/* ---------- Kart / KPI ---------- */
.eh-card {
    background: var(--eh-white);
    border: 1px solid var(--eh-border);
    border-radius: var(--eh-radius);
    box-shadow: var(--eh-shadow);
    padding: 20px;
}
.eh-kpi        { display: flex; flex-direction: column; gap: 6px; }
.eh-kpi .label { font-size: 12px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: var(--eh-muted); }
.eh-kpi .value { font-size: 26px; font-weight: 700; color: var(--eh-ink); letter-spacing: -.5px; }
.eh-kpi .delta { font-size: 12px; font-weight: 600; color: var(--eh-green-800); }
.eh-kpi .delta.down { color: var(--eh-red); }

.eh-kpi-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: grid; place-items: center;
    background: var(--eh-green-soft);
    color: var(--eh-green-800);
    font-size: 18px;
}

/* ---------- Boş durum ---------- */
.eh-empty {
    text-align: center;
    padding: 54px 20px;
    color: var(--eh-muted);
}
.eh-empty i     { font-size: 36px; color: var(--eh-green-line); display: block; margin-bottom: 12px; }
.eh-empty h4    { font-size: 16px; font-weight: 600; color: var(--eh-ink); margin: 0 0 6px; }
.eh-empty p     { font-size: 13px; margin: 0; }

/* ---------- Alt bilgi ---------- */
.eh-footer {
    border-top: 1px solid var(--eh-border);
    background: var(--eh-white);
    padding: 16px 28px;
    font-size: 12px;
    color: var(--eh-muted);
    display: flex;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}
.eh-footer a { color: var(--eh-muted); text-decoration: none; }
.eh-footer a:hover { color: var(--eh-green); }

/* ---------- Mobil ---------- */
.eh-menu-toggle { display: none; background: none; border: 0; font-size: 20px; color: var(--eh-ink-2); padding: 4px 6px; cursor: pointer; }

@media (max-width: 992px) {
    .eh-menu-toggle { display: block; }
    .eh-sidebar {
        position: fixed;
        top: 62px; bottom: 0; left: 0;
        z-index: 1030;
        transform: translateX(-100%);
        transition: transform .22s ease;
        box-shadow: 0 10px 40px rgba(4,52,58,.18);
    }
    .eh-sidebar.open { transform: translateX(0); }
    .eh-main         { padding: 20px 16px 48px; }
    .eh-user-meta    { display: none; }
}
