/* ===== TiF: ortak stil =====
   Sakin, kurumsal SaaS görünümü. Renkler AppTheme.cs ile aynı. */
:root {
    --brand: #1E40AF;
    --brand-600: #1D4ED8;
    --brand-50: #EFF4FF;
    --accent: #0EA5E9;
    --ink: #0F172A;
    --muted: #64748B;
    --line: #E2E8F0;
    --canvas: #F5F7FB;
    --ok: #059669;
    --warn: #D97706;
    --bad: #DC2626;
    --radius: 12px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .08);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, .07), 0 2px 4px -2px rgba(15, 23, 42, .06);
}

html, body {
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--canvas);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-600); }
h1:focus { outline: none; }

/* --- MudBlazor ince ayarları --- */
.mud-paper.mud-elevation-1 { box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.mud-card { border-radius: var(--radius) !important; }
.mud-paper { border-radius: var(--radius); }
.mud-button-root { border-radius: 10px !important; }
.mud-button-filled.mud-button-filled-primary { box-shadow: 0 1px 2px rgba(30, 64, 175, .25); }
.mud-chip { font-weight: 600; }
.mud-list-item { border-radius: 10px; }
.mud-simple-table table { font-size: .875rem; }
.mud-simple-table thead th { color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: .7rem; letter-spacing: .05em; }

/* Üst bar ve yan menü */
.app-bar { border-bottom: 1px solid var(--line) !important; }
.app-drawer { border-inline-end: 1px solid var(--line) !important; }
.app-drawer .mud-nav-link { border-radius: 10px; margin: 2px 10px; padding: 8px 12px; }
.app-drawer .mud-nav-link.active { background: var(--brand-50); color: var(--brand); font-weight: 600; }
.app-drawer .mud-nav-link.active .mud-nav-link-icon { color: var(--brand); }

/* Marka */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand-name { font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; }
.brand-sub { font-weight: 500; color: var(--muted); }
.demo-pill {
    font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
    color: #92400E; background: #FEF3C7; border: 1px solid #FDE68A; border-radius: 999px; padding: 2px 8px;
}

/* Sayfa başlığı */
.page-title { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; margin: 0 0 4px; }
.page-sub { color: var(--muted); font-size: .9rem; margin: 0 0 16px; }

/* Bakiye kartı */
.hero-card {
    background: linear-gradient(135deg, #1E40AF 0%, #1D4ED8 55%, #2563EB 100%);
    color: #fff; border-radius: 16px; padding: 20px; box-shadow: var(--shadow-md); position: relative; overflow: hidden;
}
.hero-card::after {
    content: ""; position: absolute; inset-inline-end: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}
.hero-card .label { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.hero-card .value { font-size: 3rem; font-weight: 800; line-height: 1.1; letter-spacing: -.03em; }
.hero-card .unit { font-size: 1rem; font-weight: 500; opacity: .9; margin-inline-start: 6px; }
.hero-card .meta { font-size: .85rem; opacity: .9; }
.hero-card .mud-button-root { background: #fff !important; color: var(--brand) !important; }

/* Telefon alt gezinme çubuğu */
.bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1200;
    display: flex; justify-content: space-around;
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px);
    border-top: 1px solid var(--line);
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 0px));
}
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 500; color: var(--muted); text-decoration: none; min-width: 60px; padding: 4px 0; border-radius: 10px; }
.bottom-nav a.active { color: var(--brand); font-weight: 700; }
.bottom-nav a.active .mud-icon-root { background: var(--brand-50); border-radius: 999px; padding: 2px 14px; box-sizing: content-box; }

/* İzin türü düğmeleri: telefonda 2x2 */
.leave-types { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.leave-types .mud-button-root { min-height: 52px; justify-content: flex-start; padding-inline-start: 14px; }

/* ===== Giriş ve hesap sayfaları (statik, Bootstrap üzerinde) ===== */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr; background: var(--canvas); }
@media (min-width: 960px) { .auth-shell { grid-template-columns: 1.05fr 1fr; } }

.auth-hero {
    display: none; position: relative; overflow: hidden; color: #fff; padding: 56px;
    background: radial-gradient(1200px 600px at -10% -20%, #3B82F6 0%, transparent 60%),
                linear-gradient(160deg, #0B1E5B 0%, #1E40AF 60%, #1D4ED8 100%);
}
@media (min-width: 960px) { .auth-hero { display: flex; flex-direction: column; justify-content: space-between; } }
.auth-hero h2 { font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; margin: 0 0 14px; max-width: 520px; }
.auth-hero p { color: rgba(255, 255, 255, .82); font-size: 1rem; max-width: 480px; margin: 0; }
.auth-hero .brand, .auth-hero .brand-sub { color: #fff; }
.auth-hero .brand-sub { opacity: .75; }
.auth-features { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; max-width: 480px; }
.auth-features li { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; color: rgba(255, 255, 255, .92); }
.auth-features .dot {
    flex: 0 0 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, .12);
    display: inline-flex; align-items: center; justify-content: center; font-size: 1rem;
}
.auth-features b { display: block; color: #fff; }
.auth-foot { font-size: .8rem; color: rgba(255, 255, 255, .6); }

.auth-main { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.auth-card {
    width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line); border-radius: 16px;
    box-shadow: var(--shadow-md); padding: 32px 28px;
}
/* Telefonda kutu içinde kutu olmasın: zemin beyaz, kart düz; dokunma alanları en az 48 px */
@media (max-width: 600px) {
    .auth-shell { background: #fff; }
    .auth-main { align-items: flex-start; padding: 20px 18px 28px; }
    .auth-card { border: 0; box-shadow: none; padding: 8px 4px; border-radius: 0; }
    .auth-card .form-control { height: 50px; }
    .auth-card .btn-primary { height: 52px; }
}
.auth-card .brand { margin-bottom: 22px; }
.auth-card h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; margin: 0 0 6px; }
.auth-card .lead { color: var(--muted); font-size: .92rem; margin: 0 0 22px; }
.auth-card label { font-size: .82rem; font-weight: 600; color: #334155; margin-bottom: 6px; display: block; }
.auth-card .form-control {
    height: 46px; border-radius: 10px; border: 1px solid #CBD5E1; font-size: 16px; padding: 0 14px; /* 16 px altı: iPhone dokununca sayfayı büyütür */
}
.auth-card .form-control:focus { border-color: var(--brand-600); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.auth-card .btn-primary {
    height: 48px; border-radius: 10px; font-weight: 600; font-size: 1rem;
    background: var(--brand); border-color: var(--brand); box-shadow: 0 1px 2px rgba(30, 64, 175, .25);
}
.auth-card .btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); }
.auth-card .form-check-label { font-size: .88rem; color: #334155; }
.auth-note {
    margin-top: 20px; padding: 12px 14px; border-radius: 10px; background: #F8FAFC; border: 1px dashed var(--line);
    font-size: .8rem; color: var(--muted);
}
/* Microsoft ile giriş (Microsoft'un düğme kuralları: beyaz zemin, koyu yazı, dört renkli işaret) */
.ms-btn { width: 100%; height: 50px; display: flex; align-items: center; justify-content: center; gap: 10px; background: #fff; color: #2F2F2F;
    border: 1px solid #8C8C8C; border-radius: 10px; font-weight: 600; font-size: 1rem; cursor: pointer; }
.ms-btn:hover { background: #F4F4F2; }
.auth-or { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: var(--muted); font-size: .82rem; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-back { display: block; text-align: center; margin-top: 18px; font-size: .92rem; font-weight: 500; color: var(--brand-600); text-decoration: none; }
.auth-back:hover { text-decoration: underline; }
/* Telefon: WhatsApp ve arama düğmeleri (en az 36 px dokunma alanı) */
.contact-btns { display: inline-flex; gap: 4px; align-items: center; }
.contact-btns .cbtn { display: inline-flex; align-items: center; gap: 4px; min-width: 36px; min-height: 36px; justify-content: center; padding: 0 8px;
    border-radius: 999px; border: 1px solid #E6E6E2; color: #141414; text-decoration: none; font-size: .82rem; font-weight: 600; background: #fff; }
.contact-btns .cbtn.wa { color: #128C4A; }
.contact-btns .cbtn:hover { background: #F4F4F2; }
.cbtn-remind { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid #CDE9D8;
    color: #128C4A; text-decoration: none; font-size: .8rem; font-weight: 600; background: #F3FBF6; }
/* TiF: yapay zekâ alanlarındaki trustfuture imzası (siyah zemin, mavi çizgi) */
.tfai { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 5px; border-radius: 999px; background: #141414; color: #fff;
    font-size: .68rem; font-weight: 500; letter-spacing: .02em; line-height: 1.4; white-space: nowrap; vertical-align: middle; }
.tfai b { font-weight: 800; }
/* TiF işareti: i'nin gövdesi iğne, noktası kıvılcım (TifName). Yazıyla aynı boyda, renk zemine göre */
.tifname { white-space: nowrap; }
.tifname .tif-i { height: .98em; width: auto; margin: 0 .07em; vertical-align: -.04em; }
.tifname .tif-needle { fill: currentColor; }
.tifname .tif-spark { fill: #1F64A8; }
.tfai .tifname .tif-spark { fill: #5B9BDB; }
.auth-hero .tifname .tif-spark { fill: currentColor; } /* mavi zeminde mavi kıvılcım görünmez */
/* TiF cevabına geri bildirim (👍 / 👎 + sebep) */
.tif-feedback { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; margin-top: 6px; color: #5E5E5B; font-size: .8rem; }
/* TiF çalışırken: iğne dikiş atar (TifWorking) */
.tif-working { display: flex; align-items: center; gap: 10px; margin: 10px 0; color: #5E5E5B; font-size: .85rem; }
.tif-working svg { flex: none; max-width: 45%; height: auto; }
.tif-working .tif-still { display: none; }
@media (prefers-reduced-motion: reduce) { .tif-working .tif-anim { display: none; } .tif-working .tif-still { display: inline; } }
.auth-mobile-brand { display: flex; justify-content: center; margin-bottom: 18px; }
@media (min-width: 960px) { .auth-mobile-brand { display: none; } }

/* Hesap yönetim sayfaları (şifre değiştir vb.) */
.account-page { max-width: 760px; margin: 0 auto; padding: 32px 20px; }
.account-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 20px; border-bottom: 1px solid #E6E6E2; }
.account-tab { padding: 10px 14px; font-weight: 600; font-size: .92rem; color: #5E5E5B; text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.account-tab.active { color: #141414; border-bottom-color: #1F64A8; }
.account-body .form-control { font-size: 16px; } /* iPhone yakınlaşmasın */
.account-body .btn-primary { background: var(--brand); border-color: var(--brand); border-radius: 10px; font-weight: 600; font-size: 1rem; height: 50px; }
.account-body .btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); }
.account-page h1, .account-page h2, .account-page h3 { letter-spacing: -.02em; }

/* Doğrulama ve hata */
.validation-message, .text-danger { color: var(--bad) !important; font-size: .85rem; }
.blazor-error-boundary { background: #b32121; padding: 1rem 1rem 1rem 1rem; color: white; }
.blazor-error-boundary::after { content: "An error has occurred." }

/* ui-ux-pro-max denemesinden alınanlar: masaüstü iki sütun, gerçek ikonlar, belirgin odak, yumuşak geçiş */
@media (min-width: 1100px) {
    .home-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 24px; align-items: start; }
}
.auth-features .dot svg { width: 18px; height: 18px; }
.mud-button-root, .mud-card, .mud-list-item, .bottom-nav a { transition: background-color .2s ease, box-shadow .2s ease, color .2s ease; }
.mud-card:hover { box-shadow: var(--shadow-md); }
:focus-visible { outline: 3px solid rgba(37, 99, 235, .55) !important; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

/* Dil seçici (giriş ekranı) */
.lang-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px; margin-bottom: 14px; font-size: .82rem; color: var(--muted); }
.lang-links a { color: var(--muted); text-decoration: none; padding: 2px 4px; border-radius: 6px; }
.lang-links a:hover { color: var(--brand); }
.lang-links a.active { color: var(--brand); font-weight: 700; }

/* Sağdan sola diller (Arapça): Inter Arapça harf içermez, sistem yazı tipine düşer */
[dir="rtl"] body, [dir="rtl"] .mud-typography { font-family: 'Segoe UI', Tahoma, 'Noto Sans Arabic', Arial, sans-serif; }
[dir="rtl"] .auth-features li { text-align: right; }
:lang(zh) body { font-family: 'Inter', 'Microsoft JhengHei', 'PingFang HK', 'Noto Sans TC', sans-serif; }

/* Yazdırma: yalnızca sayfa içeriği (menüler ve üst çubuk gizli). Org şeması yatay basılır. */
@media print {
    .app-bar, .app-drawer, .bottom-nav, .mud-snackbar-provider, .no-print { display: none !important; }
    .mud-main-content { padding: 0 !important; margin: 0 !important; }
    body { background: #fff; }
    @page { size: A4 landscape; margin: 10mm; }
}

/* Günlük zaman çizelgesi (çalışan kartı ve pano) */
.timeline { display: flex; flex-wrap: wrap; gap: 4px 6px; font-size: .78rem; color: var(--muted); }
.timeline .tl { background: var(--canvas); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.timeline .tl b { color: var(--ink); font-weight: 600; margin-inline-end: 3px; }

/* Durum etiketleri (pano, ana sayfa kutusu) */
.pill { display: inline-block; font-size: .7rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; letter-spacing: .01em; vertical-align: middle; }
.s-office { background: #DCFCE7; color: #166534; }
.s-field { background: #DBEAFE; color: #1E40AF; }
.s-remote { background: #EDE9FE; color: #5B21B6; }
.s-other { background: #F1F5F9; color: #334155; }
.s-onleave { background: #FEF3C7; color: #92400E; }
.s-missing { background: #FEE2E2; color: #991B1B; }
.now-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.now-chips button { all: unset; cursor: pointer; }
.now-chips .pill { font-size: .8rem; padding: 3px 10px; }
.now-chips .sel .pill { outline: 2px solid var(--ink); outline-offset: 1px; }

/* Tutanak: mikrofon dinlerken nabız */
.minutes-tell .mic-on { animation: mic-pulse 1.1s ease-in-out infinite; }
@keyframes mic-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(211, 47, 47, .45); } 50% { box-shadow: 0 0 0 10px rgba(211, 47, 47, 0); } }
.minutes { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.minutes .pre { white-space: pre-wrap; }

/* İş planı */
.plan-week { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); }
.plan-day.is-today { outline: 2px solid #1F64A8; }
.plan-slot { display: flex; gap: .5rem; align-items: flex-start; padding: .4rem 0 .4rem .5rem; border-inline-start: 3px solid #c8c8c4; margin-top: .35rem; }
.plan-slot.on { border-inline-start-color: #1F64A8; }
.plan-slot.done { border-inline-start-color: #2e7d32; opacity: .8; }
.plan-slot.late { border-inline-start-color: #d32f2f; }
.plan-time { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; min-width: 6.2rem; }
.plan-month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.plan-month-head { text-align: center; font-size: .75rem; color: #5E5E5B; padding: .25rem 0; }
.plan-month-cell { min-height: 3.2rem; padding: .25rem; background: var(--mud-palette-surface); border: 1px solid #E6E6E2; display: flex; flex-direction: column; gap: .2rem; color: inherit; text-decoration: none; }
.plan-month-cell.other { opacity: .45; }
.plan-month-cell.is-today { outline: 2px solid #1F64A8; }
.plan-slot.cancelled { border-inline-start-color: #9e9e9e; opacity: .6; }
.plan-slot.cancelled .plan-time, .plan-slot.cancelled b { text-decoration: line-through; }

/* Ürün imzası: trustfuture.ai (her ekranda) */
.made-by { display: inline-flex; align-items: center; gap: .35rem; color: #141414; font-size: .8rem; letter-spacing: .01em; opacity: .8; }
.made-by-name b { font-weight: 800; }
.made-by-tld { color: #5E5E5B; }
.drawer-made-by { padding: 1rem 1.25rem 1.25rem; margin-top: auto; }
.page-made-by { display: flex; justify-content: center; padding: 1.5rem 0 .5rem; }
.auth-made-by { display: flex; justify-content: center; margin-top: 1.25rem; }
:root[data-theme="dark"] .made-by, .mud-theme-dark .made-by { color: #F4F4F2; }
