/* Midasoft sitesi: ana sayfa + portal. Renkler tek yerde (değişkenler); sağdan sola dillerde
   (html[dir=rtl]) mantıksal özellikler (margin-inline, inset-inline) sayesinde düzen kendiliğinden döner. */
:root {
  --brand: #003185;
  --brand-2: #175df5;
  --ink: #1d2433;
  --muted: #5d6779;
  --line: #dde2ea;
  --bg: #f4f6fa;
  --card: #ffffff;
  --ok: #1e7b3c;
  --warn: #a15c00;
  --bad: #b3261e;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 2px 8px rgba(16, 24, 40, .06);
  --shadow-hi: 0 4px 10px rgba(16, 24, 40, .08), 0 14px 32px rgba(0, 49, 133, .12);
  --accent: #ffb020;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Arabic", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.45; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; text-align: end; white-space: nowrap; }
.hidden { display: none !important; }

/* Üst şerit */
.top { background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.top .logo img { height: 34px; display: block; }
.top nav { display: flex; gap: 18px; flex: 1; }
.top nav a { color: var(--ink); font-weight: 500; padding: 6px 2px; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; }
.top nav a:hover { color: var(--brand); text-decoration: none; }
.top nav a.active { color: var(--brand); border-bottom-color: var(--brand); }
.top .right { display: flex; align-items: center; gap: 10px; }

/* Düğmeler, alanlar */
button, .btn {
  font: inherit; border: 1px solid var(--brand); background: var(--brand); color: #fff;
  padding: 8px 16px; border-radius: 8px; cursor: pointer; font-weight: 600; display: inline-block;
  transition: background .15s, border-color .15s, transform .1s, box-shadow .15s;
}
button:active, .btn:active { transform: translateY(1px); }
.btn.small { padding: 4px 12px; font-size: .875rem; }
button:hover, .btn:hover { background: var(--brand-2); border-color: var(--brand-2); text-decoration: none; }
button.ghost, .btn.ghost { background: transparent; color: var(--brand); }
button.ghost:hover, .btn.ghost:hover { background: #eaf0fb; }
button.danger { background: var(--bad); border-color: var(--bad); }
button.small { padding: 4px 10px; font-size: .875rem; }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea {
  font: inherit; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--ink); min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #bcd0f7; border-color: var(--brand-2); }
label { display: block; font-size: .875rem; color: var(--muted); margin-bottom: 3px; }
.field { margin-bottom: 12px; }
.field input, .field select, .field textarea { width: 100%; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; }
.checks label { display: flex; gap: 6px; align-items: center; color: var(--ink); font-size: .95rem; }
.field input[type=checkbox], .checks input { width: auto; margin: 0; }
.field > label:has(> input[type=checkbox]) { display: flex; gap: 8px; align-items: center; color: var(--ink); }

/* Kartlar */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.section { padding: 32px 0; }
.section h2 { font-size: 1.5rem; }

/* Ana sayfa */
.hero {
  color: #fff; padding: 64px 0 72px; position: relative; overflow: hidden;
  background:
    radial-gradient(900px 400px at 85% -10%, rgba(255, 255, 255, .16), transparent 60%),
    radial-gradient(700px 380px at -10% 110%, rgba(23, 93, 245, .55), transparent 60%),
    linear-gradient(135deg, #00215c 0%, var(--brand) 45%, #0b4fd1 100%);
}
.hero::after { /* hafif nokta deseni */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .12;
  background-image: radial-gradient(#fff 1px, transparent 1px); background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
}
.hero .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); letter-spacing: -.01em; }
.hero p { font-size: 1.15rem; max-width: 640px; opacity: .92; }
.hero .actions { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.hero .btn { background: #fff; color: var(--brand); border-color: #fff; padding: 10px 20px; }
.hero .btn:hover { box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }
.hero .btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.hero .btn.ghost:hover { background: rgba(255, 255, 255, .12); }
.hero-points { list-style: none; padding: 0; margin: 26px 0 0; display: flex; gap: 10px 22px; flex-wrap: wrap; opacity: .95; }
.hero-points li::before { content: "✓"; color: var(--accent); font-weight: 800; margin-inline-end: 8px; }

/* Bülten şeridi */
.news {
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .25); border-radius: 16px;
  padding: 22px 24px 16px; backdrop-filter: blur(6px); box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}
.news-track { display: grid; }
.news-item { grid-area: 1 / 1; opacity: 0; transform: translateY(8px); transition: opacity .5s, transform .5s; pointer-events: none; }
.news-item.on { opacity: 1; transform: none; pointer-events: auto; }
.news-item img { width: 100%; max-height: 160px; object-fit: cover; border-radius: 10px; margin-bottom: 12px; }
.news-item h3 { font-size: 1.3rem; margin-bottom: 6px; }
.news-date { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); font-weight: 700; margin-bottom: 4px; }
.news-body { opacity: .92; }
.news-body p { font-size: 1rem; margin: 0 0 10px; }
.news .btn { background: var(--accent); border-color: var(--accent); color: #1d2433; }
.news-dots { display: flex; gap: 6px; justify-content: center; margin-top: 12px; min-height: 8px; }
.news-dots button { width: 8px; height: 8px; padding: 0; border-radius: 99px; border: 0; background: rgba(255, 255, 255, .45); transition: width .25s, background .25s; }
.news-dots button.on { width: 22px; background: #fff; }

.home-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: start; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { background: none; color: var(--muted); border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 8px 12px; }
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.lift { transition: transform .18s, box-shadow .18s, border-color .18s; }
.lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-hi); border-color: #c8d4ea; }
.rate-scroll { max-height: 520px; overflow-y: auto; }
.product { display: flex; gap: 14px; align-items: flex-start; }
.product img { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; flex: none; box-shadow: 0 2px 8px rgba(16, 24, 40, .12); }
.product h3 { font-size: 1.05rem; margin-bottom: 4px; }
.product p { margin: 0 0 10px; color: var(--muted); font-size: .92rem; }
.platforms { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { display: inline-block; font-size: .78rem; padding: 2px 8px; border-radius: 999px; background: #eef2f8; color: var(--muted); }
.badge.ok { background: #e3f3e8; color: var(--ok); }
.badge.warn { background: #fdf0dc; color: var(--warn); }
.badge.bad { background: #fbe4e2; color: var(--bad); }

/* Kurlar */
.rates select { width: 100%; margin-bottom: 10px; }
.rates table { width: 100%; }
.rates .small { font-size: .82rem; }
.rates .meta { font-size: .82rem; color: var(--muted); margin-top: 8px; }

/* Tablolar */
table { border-collapse: collapse; width: 100%; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover { background: #f1f5fd; }
.table-wrap { overflow-x: auto; }

/* Portal */
.portal { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 24px 0; }
.side { display: flex; flex-direction: column; gap: 2px; }
.side a { padding: 9px 12px; border-radius: 8px; color: var(--ink); font-weight: 500; }
.side a.active { background: #e6edfb; color: var(--brand); }
.side a:hover { text-decoration: none; background: #eef2f8; }
.side-head { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 14px 12px 4px; font-weight: 700; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar h2 { margin: 0; flex: 1; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.stat .v { font-size: 1.8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .k { color: var(--muted); font-size: .9rem; }
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.detail .card h3 { font-size: 1.05rem; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: .95rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.login { max-width: 380px; margin: 60px auto; }
.error { color: var(--bad); margin: 8px 0; min-height: 1.2em; }
.note { background: #fff7e6; border: 1px solid #f3d9a4; border-radius: 8px; padding: 10px 12px; font-size: .92rem; }

/* Pencere */
dialog { border: 0; border-radius: var(--radius); padding: 0; box-shadow: 0 10px 40px rgba(0, 0, 0, .25); width: min(640px, 94vw); }
dialog::backdrop { background: rgba(16, 24, 40, .45); }
dialog .head { padding: 16px 20px; border-bottom: 1px solid var(--line); font-weight: 700; }
dialog .body { padding: 16px 20px; max-height: 70vh; overflow: auto; }
dialog .foot { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }

/* Alt şerit */
.foot-site { margin-top: 40px; background: #0d1830; color: #c5cede; padding: 36px 0 0; font-size: .92rem; }
.foot-site .muted { color: #93a0b8; }
.foot-site a { color: #dfe6f3; display: block; margin: 4px 0; }
.foot-site h4 { color: #fff; margin: 0 0 10px; font-size: .95rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.foot-logo { height: 30px; filter: brightness(0) invert(1); opacity: .9; }
.foot-copy { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 28px; padding: 14px 20px; color: #7f8ba3; font-size: .85rem; }

/* Sayfa başlığı şeridi (Hakkımızda, İletişim …) */
.band { background: linear-gradient(135deg, #00215c, var(--brand) 60%, #0b4fd1); color: #fff; padding: 34px 0; }
.band h1 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.1rem); }

/* Belge (sayfa metni) */
.doc { max-width: 860px; font-size: 1.02rem; line-height: 1.65; }
.doc h2 { font-size: 1.35rem; margin: 1.4em 0 .5em; color: var(--brand); }
.doc h3 { font-size: 1.1rem; margin: 1.2em 0 .4em; }
.doc h2:first-child, .doc h3:first-child { margin-top: 0; }
.doc ul { padding-inline-start: 1.3em; }
.doc li { margin: .25em 0; }
.small { font-size: .85rem; }
.preview { margin-top: 10px; background: var(--bg); box-shadow: none; }

/* İletişim */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.branches { display: grid; gap: 14px; }
.branch h3 { color: var(--brand); }
.ci { display: grid; grid-template-columns: 90px 1fr; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.ci:last-of-type { border-bottom: 0; }
.ci-k { color: var(--muted); font-size: .85rem; }
.mt { margin-top: 26px; }
.hp { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }
.sent { text-align: center; padding: 30px 10px; }
.sent-mark { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: #e3f3e8; color: var(--ok); font-size: 2rem; line-height: 64px; font-weight: 800; }
textarea { width: 100%; resize: vertical; }

/* Portal: mesajlar, çok dilli alanlar */
.msg { margin-bottom: 12px; padding: 16px 18px; }
.msg.unread { border-inline-start: 4px solid var(--brand-2); }
.msg-head { display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.msg-at { margin-inline-start: auto; font-size: .85rem; }
.msg-subj { font-weight: 600; margin-top: 6px; }
.msg-body { white-space: pre-wrap; margin: 8px 0 12px; }
.msg-act { display: flex; gap: 8px; }
.ltabs { display: flex; gap: 4px; margin-bottom: 6px; }
.ltabs button { padding: 2px 10px; font-size: .8rem; background: #eef2f8; color: var(--muted); border-color: var(--line); }
.ltabs button.on { background: var(--brand); color: #fff; border-color: var(--brand); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

@media (max-width: 860px) {
  .home-grid, .portal, .detail, .grid2, .hero-grid, .contact-grid, .foot-grid { grid-template-columns: 1fr; }
  .top .wrap { flex-wrap: wrap; height: auto; padding-top: 8px; padding-bottom: 8px; gap: 8px 16px; }
  .top nav { order: 3; flex-basis: 100%; overflow-x: auto; gap: 16px; }
  .top .right { margin-inline-start: auto; }
  .side { flex-direction: row; overflow-x: auto; }
}
