/* ═══════════════════════════════════════════════════════════════════
   MILAGRON UI - TEMEL KATMAN  (uptown.css yerine geçer)
   ───────────────────────────────────────────────────────────────────
   Reset, tipografi, grid, section/card iskeleti ve yardımcı sınıflar.

   TASARIM SÖZLEŞMESİ (bilerek korunan davranışlar):
   - html font-size %62.5  →  1rem = 10px. Panelin tamamı ve 95 dosyadaki
     sayfa içi stiller bu ölçeğe göre yazılmış. Değiştirilirse her sayfa
     bozulur.
   - body text-align:center, .content ise text-align:left ile geri alır.
   - Grid float tabanlı Skeleton yüzdeleri. Sayısal değerler birebir aynı;
     yalnızca görsel katman yenilendi.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Reset ──────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    -ms-overflow-style: none;
}

html {
    height: 100%;
    font-size: 62.5%;
    /* 1rem = 10px  (DEĞİŞTİRME) */
    font-family: var(--mg-font);
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

body {
    box-sizing: border-box;
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: var(--mg-font);
    font-size: 1.4em;
    line-height: 2rem;
    font-weight: 400;
    letter-spacing: -.011em;
    color: var(--mg-text);
    background-color: var(--mg-bg);
    text-align: center;
    fill: currentColor;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-variant-numeric: tabular-nums lining-nums;
}

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
    display: block;
}

audio,
canvas,
progress,
video {
    display: inline-block;
    vertical-align: baseline;
}

audio:not([controls]) {
    display: none;
    height: 0;
}

template,
[hidden] {
    display: none;
}

img {
    max-width: 100%;
    border: 0;
    vertical-align: middle;
}

svg:not(:root) {
    overflow: hidden;
}

svg,
path {
    fill: currentColor;
}

figure {
    margin: 0;
}

/* ── Tipografi ──────────────────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    margin-bottom: 2rem;
    color: var(--mg-text);
    font-weight: 600;
    letter-spacing: -.018em;
}

h1 {
    font-size: 2.4rem;
    line-height: 3.2rem;
}

h2 {
    font-size: 2.1rem;
    line-height: 2.8rem;
}

h3 {
    font-size: 1.8rem;
    line-height: 2.4rem;
}

h4 {
    font-size: 1.7rem;
    line-height: 2.4rem;
}

h5 {
    font-size: 1.5rem;
    line-height: 2.2rem;
    font-weight: 600;
}

h6 {
    font-size: 1.1rem;
    line-height: 1.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--mg-text-subtle);
}

@media (min-width: 550px) {
    h1 {
        font-size: 2.8rem;
        line-height: 3.6rem;
    }

    h2 {
        font-size: 2.3rem;
        line-height: 3rem;
    }

    h3 {
        font-size: 1.9rem;
        line-height: 2.6rem;
    }
}

p {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--mg-text-secondary);
}

strong,
b {
    font-weight: 600;
    color: var(--mg-text);
}

em {
    font-style: normal;
    color: var(--mg-text-muted);
}

small {
    font-size: var(--mg-text-sm);
}

mark {
    background: var(--mg-warning-bg);
    color: var(--mg-warning-text);
    padding: 0 .3rem;
    border-radius: var(--mg-radius-xs);
}

abbr[title] {
    border-bottom: 1px dotted var(--mg-border-strong);
    cursor: help;
    text-decoration: none;
}

dfn {
    font-style: italic;
}

sub,
sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

sup {
    top: -.5em;
}

sub {
    bottom: -.25em;
}

hr {
    margin: 0;
    border-width: 0;
    border-collapse: collapse;
    border-top: 1px solid var(--mg-border);
}

a {
    text-decoration: none;
    cursor: pointer;
    color: var(--mg-accent);
    transition: color var(--mg-transition);
}

a:hover,
a:focus,
a:active {
    color: var(--mg-accent-600);
    outline: none;
}

a:focus-visible {
    outline: none;
    border-radius: var(--mg-radius-xs);
    box-shadow: var(--mg-ring);
}

/* ── Listeler ───────────────────────────────────────────────────── */
ul {
    list-style: disc outside;
}

ol {
    list-style: decimal outside;
}

ol,
ul {
    padding-left: 0;
    margin-top: 0;
    margin-left: 2rem;
    margin-bottom: 0;
}

ul ul,
ul ol,
ol ol,
ol ul {
    margin: 0 0 0 3rem;
}

li {
    color: var(--mg-text-secondary);
}

/* ── Kod ────────────────────────────────────────────────────────── */
code,
samp {
    font-family: var(--mg-font-mono);
    font-size: .92em;
    padding: .2rem .5rem;
    margin: 0 .2rem;
    white-space: nowrap;
    color: var(--mg-text);
    background: var(--mg-surface-3);
    border: 1px solid var(--mg-border);
    border-radius: var(--mg-radius-sm);
}

pre {
    overflow: auto;
    margin: 0 0 1.5rem;
}

pre>code {
    display: block;
    padding: 1.2rem 1.6rem;
    margin: 0;
    overflow: auto;
    white-space: pre;
    border-radius: var(--mg-radius-md);
}

/* ═══════════════════════════════════════════════════════════════════
   GRID  (Skeleton yüzdeleri birebir korunur)
   ═══════════════════════════════════════════════════════════════════ */
.row,
.column,
.columns {
    margin-bottom: 1.5rem;
}

.row:only-child {
    margin-bottom: 0;
}

.column,
.columns {
    width: 100%;
    float: left;
    box-sizing: border-box;
}

@media (min-width: 550px) {

    .column,
    .columns {
        margin-left: 2%;
        margin-bottom: 0;
    }

    .column:first-child,
    .column:only-child,
    .columns:first-child,
    .columns:only-child {
        margin-left: 0;
    }

    .column.one,
    .columns.one {
        width: 8.16666666667%;
    }

    .column.two,
    .columns.two {
        width: 16.3333333333%;
    }

    .column.three,
    .columns.three {
        width: 23.5%;
    }

    .column.four,
    .columns.four {
        width: 32%;
    }

    .column.five,
    .columns.five {
        width: 40.8333333333%;
    }

    .column.six,
    .columns.six {
        width: 49%;
    }

    .column.seven,
    .columns.seven {
        width: 57.1666666667%;
    }

    .column.eight,
    .columns.eight {
        width: 65.3333333334%;
    }

    .column.nine,
    .columns.nine {
        width: 73.5%;
    }

    .column.ten,
    .columns.ten {
        width: 81.6666666667%;
    }

    .column.eleven,
    .columns.eleven {
        width: 89.8333333334%;
    }

    .column.twelve,
    .columns.twelve {
        width: 100%;
        margin-left: 0;
    }

    .column.one-third,
    .columns.one-third {
        width: 32.6666666667%;
    }

    .column.two-thirds,
    .columns.two-thirds {
        width: 65.3333333333%;
    }

    .column.one-half,
    .columns.one-half {
        width: 49%;
    }
}

/* ── Sayfa iskeleti (main / section / aside / article) ──────────── */
main {
    position: relative;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

section {
    display: block;
    width: 100%;
    text-align: left;
    margin: 0 auto;
}

@media (min-width: 550px) {
    section {
        display: flex;
        align-items: stretch;
        flex-direction: row;
    }
}

section+section {
    padding-top: 2rem;
    border-top: 1px solid var(--mg-border);
}

section aside {
    flex: 1;
    padding: 0 2rem;
    box-sizing: border-box;
}

@media (min-width: 550px) {
    section aside {
        flex: 1 0 24rem;
    }
}

section aside h2 {
    margin: 0;
    padding: 2rem 0;
    font-weight: 600;
    font-size: 1.6rem;
    line-height: 1.6em;
}

section aside p {
    color: var(--mg-text-muted);
    line-height: 1.5;
}

section article {
    display: flex;
    flex: 1;
    flex-direction: column;
}

@media (min-width: 550px) {
    section article {
        flex: 2 1 48rem;
        flex-direction: row;
        margin: 0 2rem;
    }
}

/* ── Kart ───────────────────────────────────────────────────────────
   Eski tema kartı yalnız gölgeyle ayırıyordu. Yeni tema ince bir
   kenarlık + çok yumuşak gölge kullanıyor: koyu temada da okunur. */
section .card,
.card,
.popupCard {
    display: inline-block;
    width: 100%;
    color: var(--mg-text);
    box-sizing: border-box;
    margin-bottom: 0;
    padding: 2rem;
    background-color: var(--mg-surface);
    border: 1px solid var(--mg-border);
    border-radius: var(--mg-radius-xl);
    box-shadow: var(--mg-shadow-xs);
}

@media (min-width: 550px) {

    section .card,
    .card,
    .popupCard {
        box-shadow: var(--mg-shadow-sm);
        margin-bottom: 2rem;
    }
}

section .card~h1:first-of-type,
section .card~h2:first-of-type,
section .card~h3:first-of-type,
section .card~h4:first-of-type,
section .card~h5:first-of-type,
section .card~h6:first-of-type {
    margin-top: 0;
}

section .card.secondary,
.card.secondary {
    background-color: var(--mg-surface-2);
}

section .card.has-sections,
.card.has-sections {
    padding: 0;
}

section .card .card-section,
.card .card-section {
    padding: 2rem;
    border-bottom: 1px solid var(--mg-border-subtle);
}

section .card .card-section:last-child,
.card .card-section:last-child {
    border-bottom: 0;
}

section .card .card-section~h1:first-of-type,
section .card .card-section~h2:first-of-type,
section .card .card-section~h3:first-of-type,
section .card .card-section~h4:first-of-type,
section .card .card-section~h5:first-of-type,
section .card .card-section~h6:first-of-type {
    margin-top: 0;
}

section .card p,
.card p {
    color: var(--mg-text-secondary);
}

/* Kart başlığı / gövdesi: bazı sayfalarda .card-header + .card-body
   kalıbı kullanılıyor, tema düzeyinde tutarlı hale getiriliyor. */
.card>.card-header {
    margin: -2rem -2rem 2rem;
    padding: 1.6rem 2rem;
    border-bottom: 1px solid var(--mg-border-subtle);
    font-weight: 600;
}

/* ── Clearfix ───────────────────────────────────────────────────── */
main::after,
.row::after,
.cf {
    content: "";
    display: table;
    clear: both;
}

/* ═══════════════════════════════════════════════════════════════════
   YARDIMCI SINIFLAR
   ═══════════════════════════════════════════════════════════════════ */
.full-width {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.max-full-width {
    max-width: 100%;
    box-sizing: border-box;
}

.align-left {
    text-align: left;
}

.align-center {
    text-align: center;
}

.align-right {
    text-align: right;
}

.overflow-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.hide-scrollbars ::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.hide-scrollbars ::-webkit-scrollbar-thumb {
    display: none;
}

.emphasis {
    font-weight: 600;
    color: var(--mg-text);
}

.subdued {
    font-weight: 400;
    color: var(--mg-text-muted);
}

.highlight-warning {
    background: var(--mg-warning-bg);
    color: var(--mg-warning-text);
    border-radius: var(--mg-radius-sm);
    padding: 0 .4rem;
}

/* Renk yardımcıları: eski temadaki anlamlar korunur (metin rengi),
   tonlar yeni palete taşındı. */
.blue {
    color: var(--mg-info-solid);
}

.green {
    color: var(--mg-success-solid);
}

.yellow {
    color: var(--mg-warning-solid);
}

.orange {
    color: var(--mg-warning-solid);
}

.red {
    color: var(--mg-danger-solid);
}

.grey {
    color: var(--mg-text-subtle);
}

.lightblue {
    color: var(--mg-info-text);
}

/* ── Boş durum ──────────────────────────────────────────────────── */
.zero-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--mg-text-muted);
}

.zero-state h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--mg-text);
}

.zero-state h1+* {
    margin-top: 0;
}

.zero-state article {
    display: block;
    margin: 0 auto;
    max-width: 46rem;
}

/* ── Yan öğeler (etiket + buton yan yana) ───────────────────────── */
.side-elements {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.side-elements label {
    margin-bottom: 0;
}

/* ── İpucu balonu ───────────────────────────────────────────────── */
.tip {
    position: relative;
    cursor: help;
    border-bottom: 1px dotted var(--mg-border-strong);
}

.tip:hover::after {
    content: attr(aria-label);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    background: var(--mg-neutral-900);
    color: var(--mg-neutral-0);
    padding: .6rem 1rem;
    border-radius: var(--mg-radius-md);
    font-size: var(--mg-text-sm);
    font-weight: 500;
    white-space: nowrap;
    z-index: 40;
    box-shadow: var(--mg-shadow-lg);
}

.tip:hover::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--mg-neutral-900);
    z-index: 41;
}

/* ── Seçim rengi ────────────────────────────────────────────────── */
::selection {
    background: var(--mg-accent-100);
    color: var(--mg-accent-700);
}

/* ── İnce kaydırma çubuğu ───────────────────────────────────────── */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--mg-border-strong) transparent;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--mg-border-strong);
    border-radius: var(--mg-radius-full);
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--mg-text-subtle);
    background-clip: content-box;
}

/* Hareket azaltma tercihi olan kullanıcılarda geçişler kapatılır. */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
