/* Dil seçici, kılavuz ve sağdan-sola (Arapça) düzen. Renk/yazı tipi değişkenleri style.css'ten gelir. */

/* --- Giriş: kartın altında dil düğmeleri --- */
.login-body { flex-direction: column; }
.login-card { flex: none; } /* <main> olduğu için genel main{flex:1} kuralı kartı uzatıyordu */
.lang-row { display: flex; justify-content: center; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.lang-opt { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid var(--line);
  border-radius: var(--radius-pill); background: var(--surface); color: var(--text-mid); font-size: 0.82rem; font-weight: 600;
  transition: border-color var(--transition), color var(--transition), box-shadow var(--transition); }
.lang-opt:hover { border-color: var(--gold); color: var(--navy); }
.lang-opt.on { border-color: var(--navy); color: var(--navy); box-shadow: var(--shadow-sm); }
.lang-opt svg, .lang-list svg, .lang-cur svg:first-child { width: 22px; height: 15px; border-radius: 3px; flex: none;
  box-shadow: 0 0 0 1px rgba(20, 33, 37, 0.15); }

/* --- Panel: sağ üstte bayraklı menü --- */
.lang-menu { position: relative; margin-inline-start: auto; }
.lang-cur { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: var(--radius-pill); background: var(--surface); color: var(--navy); font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.04em; transition: border-color var(--transition), box-shadow var(--transition); }
.lang-cur:hover, .lang-cur[aria-expanded="true"] { border-color: var(--gold); box-shadow: var(--shadow-sm); }
.lang-cur svg:last-child { width: 10px; height: 6px; }
.lang-list { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; min-width: 170px; padding: 6px; z-index: 60;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); list-style: none;
  animation: lang-pop .22s var(--ease, ease) both; }
.lang-list[hidden] { display: none; }
.lang-list li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; cursor: pointer;
  font-size: 0.86rem; color: var(--text); }
.lang-list li:hover, .lang-list li:focus-visible { background: var(--brand-faint); outline: none; }
.lang-list li[aria-selected="true"] { background: var(--accent-faint); font-weight: 600; }
@keyframes lang-pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }

/* --- Kılavuz --- */
.guide-lang { display: none; }
html[lang="tr"] .guide-lang[data-l="tr"], html[lang="en"] .guide-lang[data-l="en"], html[lang="ar"] .guide-lang[data-l="ar"] { display: block; }
.guide-hero { padding: 28px; }
.guide-hero .page-sub { margin-bottom: 20px; max-width: 70ch; }
.guide-steps { list-style: none; counter-reset: gs; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.guide-steps li { counter-increment: gs; display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 14px;
  background: var(--brand-faint); position: relative; }
.guide-steps li::before { content: counter(gs); width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff;
  display: grid; place-items: center; font-family: var(--font-d); font-weight: 700; font-size: 0.8rem; }
.guide-steps b { font-family: var(--font-d); color: var(--navy); }
.guide-steps span { font-size: 0.88rem; color: var(--text-mid); line-height: 1.5; }
.guide-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; align-items: start; }
.guide-grid .card { margin-bottom: 0; }
.guide-grid h3 { font-size: 1.05rem; color: var(--navy); margin-bottom: 10px; }
.guide-grid h3 small { font-family: var(--font-b); font-weight: 500; font-size: 0.75rem; color: var(--text-lt); }
.guide-grid p, .guide-grid li { font-size: 0.9rem; line-height: 1.6; color: var(--text-mid); }
.guide-grid ul { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.guide-grid li { padding-inline-start: 16px; position: relative; }
.guide-grid li::before { content: ""; position: absolute; inset-inline-start: 0; top: 0.7em; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.guide-grid em { font-style: normal; font-weight: 600; color: var(--navy); background: var(--accent-faint); padding: 0 5px; border-radius: 4px; }
.guide-grid b { color: var(--text); }
.guide-grid code { font-family: var(--font-m); font-size: 0.82rem; background: #f1f2f2; padding: 1px 5px; border-radius: 4px; }
@media (max-width: 1024px) { .guide-steps { grid-template-columns: repeat(2, 1fr); } .guide-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .guide-steps { grid-template-columns: 1fr; } }

/* --- Arapça: yazı tipi + sağdan sola düzen --- */
html[lang="ar"] { --font-d: 'Noto Sans Arabic', 'Montserrat', system-ui, sans-serif; --font-b: 'Noto Sans Arabic', 'Hanken Grotesk', system-ui, sans-serif; }
html[dir="rtl"] .mono, html[dir="rtl"] [class*="email"], html[dir="rtl"] input[type="email"], html[dir="rtl"] code { direction: ltr; unicode-bidi: plaintext; }
html[dir="rtl"] .sidebar { left: auto; right: var(--gap); animation-name: sb-in-rtl; }
@keyframes sb-in-rtl { from { opacity: 0; transform: translateX(24px); } }
html[dir="rtl"] .app-main { margin-left: 0; margin-right: calc(var(--side-w) + var(--gap)); }
html[dir="rtl"] .nav-pill { box-shadow: inset -3px 0 0 var(--gold); }
html[dir="rtl"] .nav-item, html[dir="rtl"] .side-logout { text-align: right; }
html[dir="rtl"] .table th, html[dir="rtl"] .table td, html[dir="rtl"] .login-card form, html[dir="rtl"] .sub { text-align: right; }
html[dir="rtl"] .credit { right: auto; left: 14px; }
html[dir="rtl"] .card-head, html[dir="rtl"] .card-head-l { flex-direction: row; }
html[dir="rtl"] .funnel-arrow { transform: scaleX(-1); }
html[dir="rtl"] .side-nav, html[dir="rtl"] .side-foot { direction: rtl; }
html[dir="rtl"] input, html[dir="rtl"] select, html[dir="rtl"] textarea { text-align: right; }
html[dir="rtl"] input[type="password"], html[dir="rtl"] #username { direction: ltr; text-align: right; }
@media (max-width: 760px) { html[dir="rtl"] .credit { left: 10px; } }
