/*
 * FırsatAdası panel teması — Filament 4 üzerine hafif katman (admin + işletme paneli).
 * FilamentAsset::register ile yüklenir; `php artisan filament:assets` → public/css/app/firsatadasi-panel.css
 * (Dockerfile imaj derlemesinde çalıştırır). Renk değişkenleri (--fa-*) App\Support\Brand'den
 * filament.admin.theme kancasıyla satır içi gelir; burada literal marka HEX'i yok.
 * Seçiciler Filament'in kararlı fi-* sınıfları veya kendi fa-* sınıflarımızla sınırlıdır.
 */

/* ---------- Yoğunluk (Next.js / shadcn ölçeği) ----------
 * İç sayfalarda kök yazı boyutu 14 px: Filament rem tabanlı olduğu için metin, boşluk, kenar çubuğu
 * ve bileşenler birlikte orantılı küçülür. Giriş sayfalarında .fi-layout yok → 16 px kalır. */
html.fi:has(.fi-layout) { font-size: 14px; }

/* ---------- Zemin ve yazı tipi ---------- */
.fi-body, .fi-main-ctn { background-color: var(--fa-bg); }
.fi-body { font-family: 'Poppins', ui-sans-serif, system-ui, sans-serif; color: var(--fa-text); }

/* ---------- Marka (kenar çubuğu / üst bar) ---------- */
.fa-brand { display: flex; align-items: center; gap: .625rem; }
.fa-brand-mark { width: 2rem; height: 2rem; flex: 0 0 auto; border-radius: 9px; object-fit: cover; display: block; }
.fa-brand-text {
    font-weight: 600; font-size: 1.05rem; line-height: 1.1; color: var(--fa-text);
    letter-spacing: -.01em; white-space: nowrap;
}
.fa-brand-accent { color: var(--fa-brand); }
.fa-brand-text small {
    display: block; margin-top: 3px;
    font-size: .68rem; font-weight: 500; letter-spacing: .04em; color: var(--fa-muted);
}

/* ---------- Kenar çubuğu ---------- */
.fi-sidebar-group-label {
    text-transform: uppercase; letter-spacing: .08em;
    font-size: 11px; font-weight: 600; color: var(--fa-muted);
}
.fi-sidebar-item-label { font-weight: 500; }
.fi-sidebar-item.fi-active .fi-sidebar-item-btn,
.fi-sidebar-item.fi-active .fi-sidebar-item-button { background-color: var(--fa-primary-soft); }
.fi-sidebar-item.fi-active .fi-sidebar-item-label,
.fi-sidebar-item.fi-active .fi-sidebar-item-icon { color: var(--fa-primary); }
.dark .fi-sidebar-item.fi-active .fi-sidebar-item-label,
.dark .fi-sidebar-item.fi-active .fi-sidebar-item-icon { color: #FDBA74; }

/* ---------- Başlıklar ---------- */
.fi-header-heading { font-weight: 600; letter-spacing: -.015em; font-size: 1.6rem; line-height: 1.25; }
.fi-header-subheading { font-size: .95rem; }
.fi-header-subheading { color: var(--fa-text-2); }
.fi-section-header-heading { font-weight: 600; }
.fi-section-header-description { color: var(--fa-muted); }

/* ---------- Kartlar / tablolar ---------- */
.fi-section, .fi-wi-stats-overview-stat, .fi-ta-ctn, .fi-wi-chart, .fi-wi-widget { border-radius: var(--fa-radius); }
.fi-section, .fi-ta-ctn, .fi-wi-stats-overview-stat, .fi-wi-chart {
    box-shadow: 0 1px 2px rgba(31, 31, 31, .04);
}
.fi-ta-header-cell { font-size: 12px; font-weight: 500; letter-spacing: .02em; color: var(--fa-text-2); }
.fi-ta-row { transition: background-color .12s ease; }
.fi-ta-empty-state-heading { font-weight: 600; }
.fi-wi-stats-overview-stat-label { font-weight: 500; color: var(--fa-text-2); }
.fi-wi-stats-overview-stat-value { font-weight: 600; letter-spacing: -.02em; font-size: 1.75rem; }
.fi-wi-stats-overview-stat-description { font-size: .82rem; }
.fi-sidebar-item-label { font-size: .95rem; }
.fi-badge { font-weight: 500; }
.fi-modal-heading { font-weight: 600; }

/* Kaydet çubuğu: uzun formlarda görünür kalsın (yapışkan, sade). */
.fi-resource-edit-record-page .fi-form-actions,
.fi-resource-create-record-page .fi-form-actions {
    position: sticky; bottom: 0; z-index: 20;
    margin-top: 1rem; padding: .75rem 1rem;
    border-radius: var(--fa-radius);
    background: var(--fa-surface);
    border: 1px solid var(--fa-border);
    box-shadow: 0 -4px 16px rgba(31, 31, 31, .05);
}

/* Form içindeki salt-okunur değerler. */
.fa-stat-value { font-size: 1.6rem; font-weight: 600; letter-spacing: -.02em; color: var(--fa-text); }
.fa-muted { color: var(--fa-muted); }
.fa-link { color: var(--fa-primary); font-weight: 600; }

/* Grafikler ölçülü yükseklikte; geniş ekranda içerik ölçülü genişlikte. */
.fi-wi-chart canvas { max-height: 280px !important; }
@media (min-width: 1600px) { .fi-main { max-width: 1480px; margin-inline: auto; } }

/* ---------- Kontrol paneli: İşlem Bekleyenler / Son Etkinlik ---------- */
.fa-queue { display: flex; flex-direction: column; }
.fa-queue-row {
    display: flex; align-items: center; gap: .75rem;
    padding: .7rem .25rem; border-top: 1px solid var(--fa-border);
    color: inherit; text-decoration: none; border-radius: 8px;
}
.fa-queue-row:first-child { border-top: 0; }
.fa-queue-row:hover { background: var(--fa-surface-2); }
.fa-queue-row:focus-visible { outline: 2px solid var(--fa-primary); outline-offset: 2px; }
.fa-queue-ic {
    width: 2.1rem; height: 2.1rem; flex: 0 0 auto; border-radius: 10px;
    display: grid; place-items: center; background: var(--fa-surface-2); color: var(--fa-text-2);
}
.fa-queue-ic.is-warning { background: #FEF3C7; color: #92400E; }
.fa-queue-ic.is-info { background: var(--fa-info-soft); color: var(--fa-info); }
.fa-queue-ic.is-danger { background: #FEE2E2; color: #991B1B; }
.fa-queue-ic.is-brand { background: var(--fa-primary-soft); color: var(--fa-primary); }
.dark .fa-queue-ic.is-warning { background: rgba(161, 98, 7, .2); color: #FCD34D; }
.dark .fa-queue-ic.is-danger { background: rgba(185, 28, 28, .2); color: #FCA5A5; }
.fa-queue-body { min-width: 0; flex: 1 1 auto; }
.fa-queue-title { display: block; font-weight: 500; font-size: .9rem; line-height: 1.3; }
.fa-queue-hint { display: block; font-size: .78rem; color: var(--fa-muted); line-height: 1.35; }
.fa-queue-count {
    min-width: 2rem; padding: .15rem .55rem; border-radius: 999px; text-align: center;
    font-weight: 600; font-size: .85rem; background: var(--fa-surface-2); color: var(--fa-text);
}
.fa-queue-row.has-items .fa-queue-count { background: var(--fa-primary); color: #fff; }
.fa-queue-empty { display: flex; gap: .6rem; align-items: center; padding: .9rem .25rem; color: var(--fa-muted); font-size: .9rem; }

/* ---------- İşletme paneli hızlı işlemler ---------- */
.fa-quick { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.fa-quick a {
    display: flex; gap: .75rem; align-items: center; padding: .9rem 1rem;
    border: 1px solid var(--fa-border); border-radius: 12px; background: var(--fa-surface);
    color: inherit; text-decoration: none; min-height: 64px;
}
.fa-quick a:hover { border-color: var(--fa-primary); }
.fa-quick a:focus-visible { outline: 2px solid var(--fa-primary); outline-offset: 2px; }
.fa-quick a.is-primary { background: var(--fa-primary); border-color: var(--fa-primary); color: #fff; }
.fa-quick a.is-primary .fa-quick-hint { color: rgba(255, 255, 255, .85); }
.fa-quick-title { font-weight: 600; font-size: .92rem; line-height: 1.25; }
.fa-quick-hint { font-size: .78rem; color: var(--fa-muted); line-height: 1.3; }
.fa-biz-meta { display: flex; flex-wrap: wrap; gap: .4rem 1rem; color: var(--fa-text-2); font-size: .85rem; }
.fa-role-chip {
    display: inline-flex; align-items: center; padding: .1rem .55rem; border-radius: 999px;
    background: var(--fa-primary-soft); color: var(--fa-primary); font-weight: 500; font-size: .78rem;
}

/* ================================================================
   Giriş ekranları (yönetim + işletme): tam ekran iki sütun
   Sol: marka sütunu (.fa-auth-aside, iki panelde aynı kurumsal gradyan)
   Sağ: form (.fi-simple-main-ctn) · alt bilgi (.fa-auth-foot); ayırıcı çizgi yok
   ================================================================ */
.fi-simple-footer, .fi-footer { display: none !important; }
.fa-auth-help { margin: 1.25rem 0 0; font-size: .82rem; line-height: 1.55; color: var(--fa-muted); }

.fi-simple-layout:has(> .fa-auth-aside) { background: var(--fa-surface); min-height: 100dvh; }
.dark .fi-simple-layout:has(> .fa-auth-aside) { background: var(--fa-bg); }

/* Form: sola hizalı başlık, daha geniş ve ferah alanlar. */
.fi-simple-layout:has(> .fa-auth-aside) .fi-simple-main {
    margin: 0; width: 100%; max-width: 27rem; padding: 0;
    background: transparent; box-shadow: none; --tw-ring-shadow: 0 0 #0000; border: 0;
}
.fi-simple-layout:has(> .fa-auth-aside) .fi-simple-header { align-items: flex-start; text-align: left; margin-bottom: .5rem; }
.fi-simple-layout:has(> .fa-auth-aside) .fi-simple-header-heading {
    font-size: 1.85rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; text-align: left;
}
.fi-simple-layout:has(> .fa-auth-aside) .fi-simple-header-subheading {
    font-size: .98rem; color: var(--fa-text-2); text-align: left; margin-top: .4rem;
}
.fi-simple-layout:has(> .fa-auth-aside) .fi-input { padding-block: .7rem; }
.fi-simple-layout:has(> .fa-auth-aside) .fi-btn { min-height: 2.9rem; font-size: .95rem; }

/* Alt bilgi (sağ sütun). */
.fa-auth-foot {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem;
    padding: 1.25rem clamp(1.5rem, 4vw, 3.5rem); font-size: .78rem; color: var(--fa-muted);
}
.fa-auth-foot a { color: var(--fa-primary); font-weight: 500; text-decoration: none; }
.fa-auth-foot a:hover { text-decoration: underline; }

/* Marka sütunu. */
.fa-auth-aside {
    position: relative; overflow: hidden; color: #fff;
    background: linear-gradient(135deg, var(--fa-brand) 0%, var(--fa-brand-secondary) 100%);
}
.fa-auth-aside-inner { position: relative; z-index: 1; }
.fa-auth-watermark {
    position: absolute; z-index: 0; pointer-events: none; opacity: .09;
    width: 70%; max-width: 520px; right: -12%; bottom: -14%;
}
.fa-auth-brand { display: flex; align-items: center; gap: .7rem; }
.fa-auth-brand img { width: 2.5rem; height: 2.5rem; }
.fa-auth-brand-text { font-weight: 600; font-size: 1.2rem; line-height: 1.1; letter-spacing: -.01em; }
.fa-auth-brand-text small { display: block; font-size: .7rem; font-weight: 500; letter-spacing: .06em; opacity: .9; margin-top: 3px; }
.fa-auth-copy h2 { font-weight: 600; font-size: 2rem; line-height: 1.2; letter-spacing: -.02em; margin: 0; }
.fa-auth-copy p { font-size: 1.05rem; line-height: 1.55; margin: .9rem 0 0; opacity: .95; max-width: 30rem; }
.fa-auth-copy ul { list-style: none; padding: 0; margin: 1.75rem 0 0; display: grid; gap: .6rem; }
.fa-auth-copy li { display: flex; gap: .6rem; align-items: center; font-size: .95rem; font-weight: 500; }
.fa-auth-copy li::before {
    content: ''; width: .45rem; height: .45rem; border-radius: 999px; background: currentColor; flex: 0 0 auto; opacity: .9;
}
.fa-auth-legal { font-size: .78rem; opacity: .85; margin: 0; }

@media (min-width: 1024px) {
    .fi-simple-layout:has(> .fa-auth-aside) {
        display: grid; grid-template-columns: minmax(380px, 46%) 1fr; grid-template-rows: 1fr auto;
    }
    .fa-auth-aside { grid-column: 1; grid-row: 1 / -1; min-height: 100dvh; display: flex; flex-direction: column; }
    .fa-auth-aside-inner {
        flex: 1 1 auto; display: flex; flex-direction: column; justify-content: space-between; gap: 3rem;
        padding: 3rem clamp(2.5rem, 5vw, 4.5rem);
    }
    .fi-simple-layout:has(> .fa-auth-aside) .fi-simple-main-ctn {
        grid-column: 2; grid-row: 1; display: flex; align-items: center; justify-content: center;
        padding: 3rem clamp(1.5rem, 4vw, 3.5rem);
    }
    .fa-auth-foot { grid-column: 2; grid-row: 2; }
}

@media (max-width: 1023.98px) {
    /* Kısa marka bandı; form hemen görünür; alt bilgi sayfanın dibine iner (beyaz boşluk kalmaz). */
    .fi-simple-layout:has(> .fa-auth-aside) { display: flex; flex-direction: column; }
    .fa-auth-aside { width: 100%; align-self: stretch; }
    .fa-auth-aside-inner { padding: 1.1rem 1.25rem; }
    .fa-auth-copy, .fa-auth-legal { display: none; }
    .fa-auth-watermark { width: 9rem; right: -1.5rem; bottom: -3rem; top: auto; }
    .fi-simple-layout:has(> .fa-auth-aside) .fi-simple-main-ctn {
        flex: 1 0 auto; padding: 2rem 1.25rem 2.5rem; align-items: flex-start; justify-content: center;
    }
    .fa-auth-foot { width: 100%; margin-top: auto; }
}
