/* =====================================================================
   E-ART  ·  Tasarim Sistemi — Bilesenler
   ===================================================================== */

/* ------------------------------------------------------- UST CUBUK */
.app-bar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    height: calc(var(--appbar-h) + var(--safe-t));
    padding: var(--safe-t) var(--sp-3) 0;
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--border);
}
.app-bar__title {
    flex: 1;
    min-width: 0;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.app-bar__sub { font-size: 11px; font-weight: 500; color: var(--text-3); margin-top: -3px; }
.app-bar__actions { display: flex; align-items: center; gap: var(--sp-1); }

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 40px; height: 40px;
    border-radius: var(--r-sm);
    color: var(--text-2);
    transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
    position: relative;
    flex-shrink: 0;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.icon-btn:active { transform: scale(.94); }
.icon-btn--accent { color: var(--primary); }
.icon-btn__dot {
    position: absolute; top: 7px; right: 7px;
    min-width: 16px; height: 16px; padding: 0 4px;
    display: grid; place-items: center;
    background: var(--danger); color: #fff;
    font-size: 9px; font-weight: 700; line-height: 1;
    border-radius: 99px;
    border: 2px solid var(--surface);
}

/* Marka logosu */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand:hover { text-decoration: none; }
.brand__mark {
    width: 34px; height: 34px;
    display: grid; place-items: center;
    border-radius: 11px;
    background: linear-gradient(140deg, var(--primary) 0%, var(--primary-600) 55%, var(--accent) 130%);
    color: #fff;
    box-shadow: 0 4px 12px var(--primary-soft);
    flex-shrink: 0;
}
.brand__mark .icon { width: 19px; height: 19px; }
.brand__name { font-size: 16px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.brand__tag { font-size: 10px; color: var(--text-3); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }

/* ------------------------------------------------------ ALT MENU */
.tabbar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 45;
    display: grid;
    /* Kapali modullerde sekme sayisi azalabilir */
    grid-template-columns: repeat(var(--tab-count, 5), 1fr);
    height: calc(var(--tabbar-h) + var(--safe-b));
    padding-bottom: var(--safe-b);
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-top: 1px solid var(--border);
}
.tabbar__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-3);
    font-size: 10px;
    font-weight: 600;
    text-decoration: none;
    position: relative;
    transition: color var(--t-fast);
    -webkit-tap-highlight-color: transparent;
}
.tabbar__item:hover { text-decoration: none; color: var(--text-2); }
.tabbar__item .icon { width: 22px; height: 22px; transition: transform var(--t); }
.tabbar__item.is-active { color: var(--primary); }
.tabbar__item.is-active .icon { transform: translateY(-1px); }
.tabbar__item.is-active::before {
    content: '';
    position: absolute; top: 0; left: 50%;
    width: 26px; height: 3px;
    transform: translateX(-50%);
    background: var(--primary);
    border-radius: 0 0 4px 4px;
}
.tabbar__item .icon-btn__dot { top: 4px; right: 50%; margin-right: -18px; }

.tabbar__fab {
    display: grid; place-items: center;
    width: 46px; height: 46px;
    margin: 0 auto;
    border-radius: 15px;
    background: linear-gradient(140deg, var(--primary), var(--primary-600));
    color: #fff;
    box-shadow: 0 6px 16px var(--primary-soft);
    transition: transform var(--t-fast);
}
.tabbar__item:active .tabbar__fab { transform: scale(.92); }

/* ------------------------------------------------- MASAUSTU KENAR */
.sidebar { display: none; }

@media (min-width: 1024px) {
    .app { flex-direction: row; }
    .sidebar {
        display: flex;
        flex-direction: column;
        width: var(--sidebar-w);
        flex-shrink: 0;
        height: 100dvh;
        position: sticky;
        top: 0;
        background: var(--surface);
        border-right: 1px solid var(--border);
        padding: var(--sp-4) var(--sp-3);
        gap: var(--sp-4);
        overflow-y: auto;
    }
    .sidebar__nav { display: flex; flex-direction: column; gap: 2px; }
    .sidebar__group { margin-top: var(--sp-4); }
    .sidebar__label {
        font-size: 10px; font-weight: 700; text-transform: uppercase;
        letter-spacing: .09em; color: var(--text-3);
        padding: 0 10px var(--sp-2);
    }
    .sidebar__link {
        display: flex; align-items: center; gap: 11px;
        padding: 9px 11px;
        border-radius: var(--r-sm);
        color: var(--text-2);
        font-size: 13.5px; font-weight: 600;
        text-decoration: none;
        transition: background var(--t-fast), color var(--t-fast);
    }
    .sidebar__link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
    .sidebar__link.is-active { background: var(--primary-weak); color: var(--primary); }
    .sidebar__link .icon { width: 18px; height: 18px; }
    .sidebar__link .badge { margin-left: auto; }

    .main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
    .tabbar { display: none; }
    .page { padding-bottom: var(--sp-8); max-width: 900px; }
    .page--wide { max-width: 1280px; }
    .app-bar { padding-inline: var(--sp-5); }
}

/* ---------------------------------------------------------- KARTLAR */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.card--flat { box-shadow: none; }
.card--pad { padding: var(--sp-4); }
.card__head {
    display: flex; align-items: center; gap: var(--sp-3);
    padding: var(--sp-4) var(--sp-4) var(--sp-3);
}
.card__head h3, .card__head h2 { flex: 1; min-width: 0; font-size: 15px; }
.card__body { padding: 0 var(--sp-4) var(--sp-4); }
.card__body--full { padding: 0; }
.card__foot {
    padding: var(--sp-3) var(--sp-4);
    border-top: 1px solid var(--border);
    background: var(--surface-2);
    display: flex; align-items: center; gap: var(--sp-2);
}
.card__link {
    display: block; color: inherit; text-decoration: none;
    transition: background var(--t-fast);
}
.card__link:hover { text-decoration: none; background: var(--surface-2); }

.section-title {
    display: flex; align-items: center; gap: var(--sp-2);
    font-size: 12px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .07em; color: var(--text-3);
    margin-bottom: var(--sp-2);
}
.section-title .icon { width: 15px; height: 15px; }
.section-title a { margin-left: auto; font-size: 12px; text-transform: none; letter-spacing: 0; font-weight: 600; }

/* --------------------------------------------------------- DUGMELER */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 16px;
    height: 42px;
    border-radius: var(--r-sm);
    font-size: 14px;
    font-weight: 650;
    letter-spacing: -.01em;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.975); }
.btn:disabled, .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn .icon { width: 17px; height: 17px; }

.btn--primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 2px 8px var(--primary-soft); }
.btn--primary:hover { background: var(--primary-600); }

.btn--secondary { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn--secondary:hover { background: var(--surface-3); }

.btn--ghost { background: transparent; color: var(--text-2); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }

.btn--outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn--outline:hover { background: var(--primary-weak); }

.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { filter: brightness(.94); }

.btn--success { background: var(--success); color: #fff; }
.btn--success:hover { filter: brightness(.94); }

.btn--soft-danger  { background: var(--danger-weak);  color: var(--danger); }
.btn--soft-success { background: var(--success-weak); color: var(--success); }
.btn--soft-warning { background: var(--warning-weak); color: var(--warning); }
.btn--soft-info    { background: var(--info-weak);    color: var(--info); }
.btn--soft-primary { background: var(--primary-weak); color: var(--primary); }

.btn--sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: var(--r-xs); }
.btn--xs { height: 28px; padding: 0 9px; font-size: 12px; border-radius: var(--r-xs); gap: 5px; }
.btn--xs .icon, .btn--sm .icon { width: 15px; height: 15px; }
.btn--lg { height: 50px; font-size: 15.5px; border-radius: var(--r); }
.btn--block { display: flex; width: 100%; }
.btn--icon { width: 42px; padding: 0; }

.btn-group { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.btn-group--fill > .btn { flex: 1; }

/* Yuzen eylem dugmesi */
.fab {
    position: fixed;
    right: 16px;
    bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px);
    z-index: 44;
    width: 54px; height: 54px;
    display: grid; place-items: center;
    border-radius: 18px;
    background: linear-gradient(140deg, var(--primary), var(--primary-600));
    color: #fff;
    box-shadow: var(--shadow-lg), 0 8px 20px var(--primary-soft);
    transition: transform var(--t);
}
.fab:hover { transform: translateY(-2px); text-decoration: none; }
.fab:active { transform: scale(.93); }
@media (min-width: 1024px) { .fab { bottom: 24px; right: 24px; } }

/* --------------------------------------------------------- ROZETLER */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px;
    border-radius: var(--r-full);
    font-size: 11.5px;
    font-weight: 650;
    line-height: 1.4;
    white-space: nowrap;
}
.badge--success { background: var(--success-weak); color: var(--success); }
.badge--warning { background: var(--warning-weak); color: var(--warning); }
.badge--danger  { background: var(--danger-weak);  color: var(--danger); }
.badge--info    { background: var(--info-weak);    color: var(--info); }
.badge--primary { background: var(--primary-weak); color: var(--primary); }
.badge--neutral { background: var(--neutral-weak); color: var(--neutral); }
.badge--solid   { background: var(--primary); color: var(--on-primary); }
.badge--dot::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 13px;
    border-radius: var(--r-full);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-2);
    font-size: 13px; font-weight: 600;
    text-decoration: none;
    transition: all var(--t-fast);
    cursor: pointer;
}
.chip:hover { text-decoration: none; border-color: var(--border-strong); color: var(--text); }
.chip.is-active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.chip .icon { width: 15px; height: 15px; }
.chip__count { font-size: 11px; opacity: .7; }

/* --------------------------------------------------------- AVATARLAR */
.avatar {
    width: 42px; height: 42px;
    border-radius: 13px;
    display: grid; place-items: center;
    font-size: 14px; font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--primary);
    letter-spacing: -.02em;
    user-select: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--xs { width: 26px; height: 26px; border-radius: 8px; font-size: 10px; }
.avatar--sm { width: 34px; height: 34px; border-radius: 11px; font-size: 12px; }
.avatar--lg { width: 56px; height: 56px; border-radius: 17px; font-size: 19px; }
.avatar--xl { width: 76px; height: 76px; border-radius: 22px; font-size: 25px; }
.avatar--ring { box-shadow: 0 0 0 3px var(--surface), 0 0 0 4.5px var(--primary-soft); }

.avatar-stack { display: flex; }
.avatar-stack .avatar { margin-left: -10px; box-shadow: 0 0 0 2px var(--surface); }
.avatar-stack .avatar:first-child { margin-left: 0; }

/* --------------------------------------------------------- LISTELER */
.list { display: flex; flex-direction: column; }
.list > * + * { border-top: 1px solid var(--border); }

.list-item {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    color: inherit;
    text-decoration: none;
    transition: background var(--t-fast);
    min-height: 62px;
}
a.list-item:hover, button.list-item:hover { background: var(--surface-2); text-decoration: none; }
.list-item__body { flex: 1; min-width: 0; }
.list-item__title { display: block; min-width: 0; font-size: 14.5px; font-weight: 650; letter-spacing: -.01em; }
.list-item__meta { font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 1px; }
.list-item__meta .icon { width: 13px; height: 13px; }
.list-item__side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.list-item__chev { color: var(--text-3); flex-shrink: 0; }
.list-item--compact { min-height: 48px; padding-block: var(--sp-2); }

.dot-sep::before { content: '·'; margin: 0 2px; }

/* ---------------------------------------------------------- ISTATISTIK */
.stat {
    padding: var(--sp-3);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    display: flex; flex-direction: column; gap: 6px;
    box-shadow: var(--shadow-xs);
    min-width: 0;
}
.stat__icon {
    width: 32px; height: 32px;
    border-radius: 10px;
    display: grid; place-items: center;
    background: var(--primary-weak);
    color: var(--primary);
}
.stat__icon .icon { width: 17px; height: 17px; }
.stat__value { font-size: 21px; font-weight: 750; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat__label { font-size: 11.5px; color: var(--text-3); font-weight: 600; line-height: 1.3; }
.stat__delta { font-size: 11px; font-weight: 650; display: inline-flex; align-items: center; gap: 3px; }

.stat--success .stat__icon { background: var(--success-weak); color: var(--success); }
.stat--warning .stat__icon { background: var(--warning-weak); color: var(--warning); }
.stat--danger  .stat__icon { background: var(--danger-weak);  color: var(--danger); }
.stat--info    .stat__icon { background: var(--info-weak);    color: var(--info); }
.stat--accent  .stat__icon { background: var(--accent-weak);  color: var(--accent); }

/* Kahraman kart */
.hero {
    position: relative;
    padding: var(--sp-5) var(--sp-4);
    border-radius: var(--r-xl);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-600) 48%, var(--accent) 150%);
    color: #fff;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--primary-soft);
}
.hero::after {
    content: '';
    position: absolute; inset: -40% -20% auto auto;
    width: 260px; height: 260px;
    background: radial-gradient(circle, rgba(255,255,255,.22), transparent 62%);
    pointer-events: none;
}
.hero h2 { color: #fff; font-size: 20px; }
.hero p { color: rgba(255,255,255,.82); font-size: 13.5px; }
.hero__stats { display: flex; gap: var(--sp-4); margin-top: var(--sp-4); position: relative; }
.hero__stat b { display: block; font-size: 20px; font-weight: 750; letter-spacing: -.02em; }
.hero__stat span { font-size: 11px; color: rgba(255,255,255,.75); font-weight: 600; }

/* ----------------------------------------------------------- FORMLAR */
.form { display: flex; flex-direction: column; gap: var(--sp-4); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label {
    font-size: 12.5px;
    font-weight: 650;
    color: var(--text-2);
    display: flex; align-items: center; gap: 5px;
}
.field__label .req { color: var(--danger); }
.field__hint { font-size: 11.5px; color: var(--text-3); }
.field__error { font-size: 12px; color: var(--danger); display: flex; align-items: center; gap: 4px; }
.field__error .icon { width: 13px; height: 13px; }

.input, .select, .textarea {
    width: 100%;
    padding: 0 13px;
    height: 44px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-sm);
    /* 16px: iOS Safari odaklanmada sayfayi yakinlastirmasin */
    font-size: 16px;
    color: var(--text);
    transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
    appearance: none;
    -webkit-appearance: none;
}
.textarea { height: auto; min-height: 100px; padding: 11px 13px; resize: vertical; line-height: 1.55; }
/* Sinifsiz form alanlari da 16px olsun (iOS odak yakinlastirmasi) */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),
select, textarea { font-size: 16px; }

.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--ring);
}
.input:disabled, .select:disabled, .textarea:disabled { background: var(--surface-2); color: var(--text-3); cursor: not-allowed; }
.input.is-error, .select.is-error, .textarea.is-error { border-color: var(--danger); }
.input[type="date"], .input[type="time"], .input[type="datetime-local"] { min-height: 44px; }

.select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238A90A8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    padding-right: 36px;
    cursor: pointer;
}

.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.input-group .btn { border-radius: 0 var(--r-sm) var(--r-sm) 0; height: auto; }

.input-icon { position: relative; }
.input-icon .icon {
    position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
    color: var(--text-3); width: 17px; height: 17px; pointer-events: none;
}
.input-icon .input { padding-left: 40px; }

/* Onay kutusu / radyo */
.check {
    display: flex; align-items: flex-start; gap: 10px;
    cursor: pointer; user-select: none;
    padding: 9px 11px;
    border-radius: var(--r-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    transition: border-color var(--t-fast), background var(--t-fast);
}
.check:hover { border-color: var(--border-strong); }
.check input { width: 18px; height: 18px; accent-color: var(--primary); margin-top: 1px; flex-shrink: 0; cursor: pointer; }
.check__text { font-size: 13.5px; line-height: 1.4; }
.check__text small { display: block; color: var(--text-3); font-size: 11.5px; }
.check:has(input:checked) { border-color: var(--primary); background: var(--primary-weak); }

.check--plain { border: 0; background: none; padding: 4px 0; }
.check--plain:has(input:checked) { background: none; }

/* Anahtar */
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track {
    width: 44px; height: 26px;
    border-radius: 99px;
    background: var(--surface-3);
    position: relative;
    transition: background var(--t);
    flex-shrink: 0;
}
.switch__track::after {
    content: '';
    position: absolute; top: 3px; left: 3px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: transform var(--t);
}
.switch input:checked + .switch__track { background: var(--primary); }
.switch input:checked + .switch__track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch__track { box-shadow: var(--ring); }

/* Bolumlu secim */
.segmented {
    display: flex;
    padding: 3px;
    background: var(--surface-2);
    border-radius: var(--r-sm);
    gap: 2px;
}
.segmented__item {
    flex: 1;
    text-align: center;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 650;
    color: var(--text-2);
    text-decoration: none;
    transition: all var(--t-fast);
    white-space: nowrap;
}
.segmented__item:hover { text-decoration: none; color: var(--text); }
.segmented__item.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }

/* Dosya yukleme */
.file-drop {
    border: 1.5px dashed var(--border-strong);
    border-radius: var(--r);
    padding: var(--sp-5);
    text-align: center;
    color: var(--text-3);
    cursor: pointer;
    transition: all var(--t-fast);
    background: var(--surface-2);
}
.file-drop:hover, .file-drop.is-over { border-color: var(--primary); color: var(--primary); background: var(--primary-weak); }
.file-drop input { display: none; }

/* -------------------------------------------------------- TABLOLAR */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--r-lg);
    /* Kaydirilabilir oldugunu belli eden kenar golgeleri */
    background:
        linear-gradient(to right, var(--surface) 30%, transparent) 0 0,
        linear-gradient(to left,  var(--surface) 30%, transparent) 100% 0,
        radial-gradient(farthest-side at 0 50%, rgba(0,0,0,.16), transparent) 0 0,
        radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.16), transparent) 100% 0;
    background-repeat: no-repeat;
    background-size: 36px 100%, 36px 100%, 12px 100%, 12px 100%;
    background-attachment: local, local, scroll, scroll;
}
.table { font-size: 13.5px; min-width: 100%; }
.table th {
    text-align: left;
    padding: 11px var(--sp-3);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-3);
    background: var(--surface-2);
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
}
.table th a { color: inherit; }
.table td {
    padding: 11px var(--sp-3);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--t-fast); }
.table tbody tr:hover { background: var(--surface-2); }
.table--compact th, .table--compact td { padding: 8px 10px; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Ilk sutun (genelde ad/baslik) sikisip satira bolunmesin; tablo yatay kaydirilir */
.table td:first-child { min-width: 128px; }
.table--compact td:first-child { min-width: 100px; }
.table__empty td { text-align: center; padding: var(--sp-6); color: var(--text-3); }

/* --------------------------------------------------- DERS PROGRAMI */
.timetable-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.timetable {
    min-width: 720px;
    border-collapse: separate;
    border-spacing: 3px;
    font-size: 11.5px;
}
.timetable th {
    padding: 8px 4px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-2);
    background: var(--surface-2);
    border-radius: var(--r-xs);
    text-align: center;
}
.timetable th.is-today { background: var(--primary-weak); color: var(--primary); }
.timetable td { padding: 0; vertical-align: top; }
.timetable__time {
    width: 52px;
    font-family: var(--font-num);
    font-size: 10.5px;
    color: var(--text-3);
    text-align: right;
    padding-right: 6px !important;
    white-space: nowrap;
    vertical-align: top;
}
.timetable__cell {
    min-height: 34px;
    border-radius: var(--r-xs);
    background: var(--surface-2);
    transition: background var(--t-fast);
}
.timetable__cell:hover { background: var(--surface-3); }
.tt-event {
    display: block;
    padding: 5px 7px;
    border-radius: var(--r-xs);
    background: var(--primary-weak);
    border-left: 3px solid var(--primary);
    color: var(--text);
    text-decoration: none;
    font-size: 11px;
    line-height: 1.35;
    height: 100%;
    overflow: hidden;
}
.tt-event:hover { text-decoration: none; filter: brightness(.97); }
.tt-event b { display: block; font-weight: 700; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-event span { color: var(--text-3); font-size: 10px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Randevu saat izgarasi */
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: var(--sp-2); }
.slot {
    padding: 10px 6px;
    border-radius: var(--r-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    text-align: center;
    font-size: 13px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: all var(--t-fast);
    position: relative;
}
.slot small { display: block; font-size: 10px; font-weight: 600; color: var(--text-3); margin-top: 1px; }
.slot--free:hover { border-color: var(--primary); background: var(--primary-weak); color: var(--primary); }
.slot--free.is-selected { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.slot--free.is-selected small { color: rgba(255,255,255,.8); }
.slot--busy { background: var(--danger-weak); border-color: transparent; color: var(--danger); cursor: not-allowed; }
.slot--past, .slot--off { background: var(--surface-2); color: var(--text-3); cursor: not-allowed; opacity: .65; }

/* ------------------------------------------------------ BOS DURUMLAR */
.empty {
    display: flex; flex-direction: column; align-items: center;
    text-align: center;
    padding: var(--sp-8) var(--sp-4);
    gap: var(--sp-2);
}
.empty__icon {
    width: 64px; height: 64px;
    display: grid; place-items: center;
    border-radius: 20px;
    background: var(--surface-2);
    color: var(--text-3);
    margin-bottom: var(--sp-2);
}
.empty__icon .icon { width: 28px; height: 28px; }
.empty h4 { font-size: 15px; }
.empty p { font-size: 13px; color: var(--text-3); max-width: 300px; }

/* --------------------------------------------------------- UYARILAR */
.alert {
    display: flex; align-items: flex-start; gap: 11px;
    padding: 13px 15px;
    border-radius: var(--r);
    font-size: 13.5px;
    line-height: 1.5;
    border: 1px solid transparent;
}
.alert .icon { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert__body { flex: 1; min-width: 0; }
.alert__body b { display: block; margin-bottom: 2px; }
.alert--success { background: var(--success-weak); color: var(--success); }
.alert--warning { background: var(--warning-weak); color: var(--warning); }
.alert--danger  { background: var(--danger-weak);  color: var(--danger); }
.alert--info    { background: var(--info-weak);    color: var(--info); }
.alert--neutral { background: var(--surface-2); color: var(--text-2); border-color: var(--border); }

/* Bildirim baloncuklari */
.toasts {
    position: fixed;
    left: 50%;
    top: calc(var(--safe-t) + 12px);
    transform: translateX(-50%);
    z-index: 90;
    display: flex; flex-direction: column; gap: var(--sp-2);
    width: min(440px, calc(100vw - 24px));
    pointer-events: none;
}
.toast {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 15px;
    border-radius: var(--r);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    font-size: 13.5px;
    font-weight: 550;
    pointer-events: auto;
    animation: toast-in var(--t-slow) both;
}
.toast.is-out { animation: toast-out 220ms both; }
.toast__icon { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.toast__icon .icon { width: 15px; height: 15px; }
.toast--success .toast__icon { background: var(--success-weak); color: var(--success); }
.toast--error   .toast__icon { background: var(--danger-weak);  color: var(--danger); }
.toast--warning .toast__icon { background: var(--warning-weak); color: var(--warning); }
.toast--info    .toast__icon { background: var(--info-weak);    color: var(--info); }
/* Dokunma hedefi en az 36px olsun */
.toast__close {
    margin-left: auto; margin-right: -6px;
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; flex-shrink: 0;
    color: var(--text-3); background: none; border: 0; cursor: pointer;
}
.toast__close:hover { color: var(--text); }

@keyframes toast-in  { from { opacity: 0; transform: translateY(-14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-10px) scale(.97); } }

/* --------------------------------------------------------- KATMANLAR */
.backdrop {
    position: fixed; inset: 0;
    background: var(--overlay);
    backdrop-filter: blur(3px);
    z-index: 60;
    opacity: 0;
    animation: fade-in var(--t) forwards;
}
@keyframes fade-in { to { opacity: 1; } }

.sheet {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 70;
    background: var(--surface);
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    box-shadow: var(--shadow-xl);
    max-height: 88dvh;
    display: flex; flex-direction: column;
    padding-bottom: var(--safe-b);
    animation: sheet-up var(--t-slow) both;
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
.sheet__grip { width: 38px; height: 4px; border-radius: 99px; background: var(--border-strong); margin: 10px auto 4px; flex-shrink: 0; }
.sheet__head { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); }
.sheet__head h3 { flex: 1; font-size: 16px; }
.sheet__body { padding: 0 var(--sp-4) var(--sp-4); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet__foot { padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--border); display: flex; gap: var(--sp-2); }

@media (min-width: 640px) {
    .sheet {
        left: 50%; bottom: auto; top: 50%;
        transform: translate(-50%, -50%);
        width: min(560px, calc(100vw - 40px));
        border-radius: var(--r-xl);
        animation: modal-in var(--t-slow) both;
        max-height: 86dvh;
    }
    @keyframes modal-in {
        from { opacity: 0; transform: translate(-50%, -46%) scale(.97); }
        to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    }
    .sheet__grip { display: none; }
}

/* Acilir menu */
.dropdown { position: relative; }
.dropdown__menu {
    position: absolute;
    right: 0; top: calc(100% + 6px);
    min-width: 190px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: var(--shadow-lg);
    padding: 5px;
    z-index: 50;
    animation: dd-in 140ms both;
}
@keyframes dd-in { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
.dropdown__item {
    display: flex; align-items: center; gap: 9px;
    width: 100%;
    padding: 9px 11px;
    border-radius: var(--r-xs);
    font-size: 13.5px;
    font-weight: 550;
    color: var(--text-2);
    text-decoration: none;
    text-align: left;
    transition: background var(--t-fast);
}
.dropdown__item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.dropdown__item .icon { width: 16px; height: 16px; }
.dropdown__item--danger { color: var(--danger); }
.dropdown__sep { height: 1px; background: var(--border); margin: 4px 0; }

/* ------------------------------------------------------------ CESITLI */
.progress {
    height: 7px;
    background: var(--surface-3);
    border-radius: 99px;
    overflow: hidden;
}
.progress__bar {
    height: 100%;
    background: var(--primary);
    border-radius: 99px;
    transition: width var(--t-slow);
}
.progress--success .progress__bar { background: var(--success); }
.progress--warning .progress__bar { background: var(--warning); }
.progress--danger  .progress__bar { background: var(--danger); }

.meter-row { display: flex; align-items: center; gap: 10px; }
.meter-row__label { flex: 1; min-width: 0; font-size: 13px; }
.meter-row__value { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; width: 52px; text-align: right; }
.meter-row .progress { flex: 1.4; }

.timeline { position: relative; padding-left: 26px; }
.timeline::before {
    content: ''; position: absolute; left: 8px; top: 6px; bottom: 6px;
    width: 2px; background: var(--border);
}
.timeline__item { position: relative; padding-bottom: var(--sp-4); }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
    content: ''; position: absolute; left: -22px; top: 5px;
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--surface); border: 2px solid var(--primary);
}
.timeline__item--muted::before { border-color: var(--border-strong); }

.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); }
@media (min-width: 520px) { .menu-grid { grid-template-columns: repeat(4, 1fr); } }
.menu-tile {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 7px;
    padding: var(--sp-4) 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    text-decoration: none;
    color: var(--text-2);
    text-align: center;
    transition: all var(--t-fast);
    min-height: 92px;
}
.menu-tile:hover { text-decoration: none; border-color: var(--primary); color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.menu-tile__icon {
    width: 40px; height: 40px;
    border-radius: 13px;
    display: grid; place-items: center;
    background: var(--primary-weak);
    color: var(--primary);
}
.menu-tile span { font-size: 11.5px; font-weight: 650; line-height: 1.25; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 5px; flex-wrap: wrap; }
.pagination a, .pagination span {
    min-width: 36px; height: 36px;
    display: grid; place-items: center;
    padding: 0 9px;
    border-radius: var(--r-xs);
    font-size: 13px; font-weight: 650;
    color: var(--text-2);
    text-decoration: none;
    border: 1px solid var(--border);
    background: var(--surface);
}
.pagination a:hover { text-decoration: none; border-color: var(--primary); color: var(--primary); }
.pagination .is-active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.pagination .is-disabled { opacity: .4; pointer-events: none; }

.divider-text {
    display: flex; align-items: center; gap: var(--sp-3);
    color: var(--text-3); font-size: 12px; font-weight: 600;
}
.divider-text::before, .divider-text::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.kv { display: grid; grid-template-columns: minmax(96px, auto) 1fr; gap: 8px var(--sp-3); font-size: 13.5px; }
.kv dt { color: var(--text-3); font-weight: 600; font-size: 12.5px; }
.kv dd { color: var(--text); font-weight: 550; word-break: break-word; }

.skeleton {
    background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: var(--r-xs);
}
@keyframes shimmer { to { background-position: -200% 0; } }

.tag-color { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }

.stat-line { display: flex; align-items: baseline; gap: 5px; }
.stat-line b { font-size: 17px; font-weight: 750; font-variant-numeric: tabular-nums; }
.stat-line span { font-size: 11.5px; color: var(--text-3); }

/* Yukleme gostergesi */
.spinner {
    width: 18px; height: 18px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.is-loading { position: relative; pointer-events: none; opacity: .7; }

/* Giris ekrani */
.auth {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--sp-4);
}
.auth__wrap { width: 100%; max-width: 420px; }
.auth__card {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg);
    padding: var(--sp-6) var(--sp-5) var(--sp-5);
}
.auth__logo {
    width: 62px; height: 62px;
    border-radius: 20px;
    display: grid; place-items: center;
    background: linear-gradient(140deg, var(--primary) 0%, var(--primary-600) 55%, var(--accent) 130%);
    color: #fff;
    margin: 0 auto var(--sp-4);
    box-shadow: 0 10px 26px var(--primary-soft);
}
.auth__logo .icon { width: 30px; height: 30px; }
.auth__demo { display: grid; gap: 6px; }
.auth__demo-btn {
    display: flex; align-items: center; gap: 9px;
    padding: 9px 11px;
    border-radius: var(--r-sm);
    border: 1px solid var(--border);
    background: var(--surface-2);
    font-size: 12.5px;
    text-align: left;
    transition: all var(--t-fast);
    width: 100%;
}
.auth__demo-btn:hover { border-color: var(--primary); background: var(--primary-weak); }
.auth__demo-btn b { display: block; font-size: 12.5px; }
.auth__demo-btn small { color: var(--text-3); font-size: 11px; }

/* Nota oyunu */
.game-stage {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: var(--sp-5) var(--sp-4);
    text-align: center;
}
.staff-svg { margin: 0 auto; max-width: 320px; width: 100%; }
.note-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-2); margin-top: var(--sp-4); }
@media (min-width: 480px) { .note-keys { grid-template-columns: repeat(7, 1fr); } }
.note-key {
    padding: 14px 4px;
    border-radius: var(--r-sm);
    border: 1px solid var(--border);
    background: var(--surface-2);
    font-weight: 700;
    font-size: 14px;
    transition: all var(--t-fast);
}
.note-key:hover { border-color: var(--primary); background: var(--primary-weak); color: var(--primary); }
.note-key.is-right { background: var(--success); border-color: var(--success); color: #fff; }
.note-key.is-wrong { background: var(--danger); border-color: var(--danger); color: #fff; }

.piano { display: flex; position: relative; height: 130px; user-select: none; justify-content: center; }
.piano__white {
    width: 44px; height: 130px;
    background: #fff; border: 1px solid #C8CBD8;
    border-radius: 0 0 7px 7px;
    display: flex; align-items: flex-end; justify-content: center;
    padding-bottom: 9px;
    font-size: 11px; font-weight: 700; color: #6B7189;
    transition: background var(--t-fast);
}
.piano__white:active, .piano__white.is-on { background: var(--primary-weak); }
.piano__black {
    position: absolute; top: 0;
    width: 28px; height: 82px;
    background: #22242F;
    border-radius: 0 0 5px 5px;
    z-index: 2;
}
.piano__black:active, .piano__black.is-on { background: var(--primary); }

/* ------------------------------------------------------------ AY TAKVIMI */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal__dow {
    text-align: center;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-3);
    padding: 6px 0;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.cal__cell {
    min-height: 62px;
    border-radius: var(--r-xs);
    background: var(--surface-2);
    padding: 5px 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}
.cal__cell--empty { background: transparent; }
.cal__cell--today { background: var(--primary-weak); box-shadow: inset 0 0 0 1.5px var(--primary); }
.cal__day { font-size: 11.5px; font-weight: 700; color: var(--text-2); }
.cal__cell--today .cal__day { color: var(--primary); }
.cal__ev {
    font-size: 9.5px;
    font-weight: 650;
    line-height: 1.25;
    padding: 2px 4px;
    border-radius: 4px;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cal__more { font-size: 9px; color: var(--text-3); font-weight: 600; }

@media (min-width: 640px) {
    .cal__cell { min-height: 84px; }
    .cal__ev { font-size: 10.5px; }
}

/* ------------------------------------------------------------ MESAJLAR */
.chat { display: flex; flex-direction: column; gap: var(--sp-3); }
.msg { display: flex; gap: 9px; max-width: 86%; }
.msg--own { margin-left: auto; flex-direction: row-reverse; }
.msg__bubble {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r) var(--r) var(--r) 4px;
    padding: 10px 13px;
    font-size: 14px;
    line-height: 1.5;
    min-width: 0;
    word-break: break-word;
}
.msg--own .msg__bubble {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--on-primary);
    border-radius: var(--r) var(--r) 4px var(--r);
}
.msg__meta { font-size: 10.5px; color: var(--text-3); margin-top: 4px; }
.msg--own .msg__meta { text-align: right; }
.msg__name { font-size: 11.5px; font-weight: 700; color: var(--text-2); margin-bottom: 3px; }

.composer {
    position: sticky;
    bottom: calc(var(--tabbar-h) + var(--safe-b));
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: var(--sp-2);
    display: flex;
    gap: var(--sp-2);
    align-items: flex-end;
    box-shadow: var(--shadow);
}
@media (min-width: 1024px) { .composer { bottom: var(--sp-4); } }
.composer textarea { min-height: 44px; max-height: 140px; }

/* ------------------------------------------------------------ MODUL KARTLARI
   Kurumun acik/kapali modullerini secmek icin buyuk, dokunmasi kolay kartlar. */
.module-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-2);
}
@media (min-width: 560px)  { .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .module-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.module-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: var(--sp-3);
    min-height: 64px;
    padding: var(--sp-3) var(--sp-4) var(--sp-3) var(--sp-3);
    border: 1.5px solid var(--border);
    border-radius: var(--r);
    background: var(--surface);
    cursor: pointer;
    transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
    -webkit-tap-highlight-color: transparent;
}
.module-card:hover { border-color: var(--border-strong); }
.module-card:focus-within { box-shadow: var(--ring); border-color: var(--primary); }
.module-card input { position: absolute; opacity: 0; pointer-events: none; }

.module-card__icon {
    display: grid; place-items: center;
    width: 38px; height: 38px;
    flex-shrink: 0;
    border-radius: 12px;
    background: var(--surface-2);
    color: var(--text-3);
    transition: background var(--t-fast), color var(--t-fast);
}
.module-card__icon .icon { width: 19px; height: 19px; }

.module-card__body  { flex: 1; min-width: 0; }
.module-card__title { display: block; font-size: 14.5px; font-weight: 650; letter-spacing: -.01em; }
.module-card__desc  { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 2px; }

.module-card__mark {
    display: grid; place-items: center;
    width: 22px; height: 22px;
    flex-shrink: 0;
    border-radius: var(--r-full);
    border: 1.5px solid var(--border-strong);
    background: var(--surface);
    color: transparent;
    transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.module-card__mark .icon { width: 13px; height: 13px; stroke-width: 3; }

.module-card.is-on {
    border-color: var(--primary);
    background: var(--primary-soft);
}
.module-card.is-on .module-card__icon { background: var(--primary-weak); color: var(--primary); }
.module-card.is-on .module-card__mark {
    background: var(--primary); border-color: var(--primary); color: var(--on-primary);
}

/* ====================================================== ÖĞRENCİ (ÇOCUK) ARAYÜZÜ
   Küçük yaş grubunun rahat kullanabilmesi için: büyük dokunma hedefleri,
   iri tipografi, az sayı — çok görsel ipucu. */

/* Selamlama */
.kid-hero {
    position: relative;
    display: flex; align-items: center; gap: var(--sp-4);
    padding: var(--sp-5) var(--sp-4);
    border-radius: var(--r-xl);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-600) 55%, var(--accent) 165%);
    color: #fff;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--primary-soft);
}
.kid-hero::after {
    content: '';
    position: absolute; inset: -45% -25% auto auto;
    width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(255,255,255,.22), transparent 62%);
    pointer-events: none;
}
.kid-hero__avatar {
    width: 58px; height: 58px; flex-shrink: 0;
    display: grid; place-items: center;
    border-radius: 20px;
    background: rgba(255,255,255,.2);
    border: 2px solid rgba(255,255,255,.35);
    font-size: 20px; font-weight: 750; color: #fff;
    overflow: hidden;
}
.kid-hero__avatar img { width: 100%; height: 100%; object-fit: cover; }
.kid-hero__text { position: relative; min-width: 0; display: block; }
.kid-hero__hi   { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.kid-hero__sub  { display: block; font-size: 14px; color: rgba(255,255,255,.86); margin-top: 4px; }

/* Büyük eylem kartı */
.kid-card {
    display: flex; align-items: center; gap: var(--sp-4);
    min-height: 84px;
    padding: var(--sp-4);
    border-radius: var(--r-lg);
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: inherit; text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
a.kid-card:hover, button.kid-card:hover {
    text-decoration: none; border-color: var(--primary); box-shadow: var(--shadow);
}
a.kid-card:active, button.kid-card:active { transform: scale(.985); }

.kid-card__icon {
    display: grid; place-items: center;
    width: 52px; height: 52px; flex-shrink: 0;
    border-radius: 17px;
    background: var(--primary-weak); color: var(--primary);
}
.kid-card__icon .icon { width: 25px; height: 25px; }
.kid-card__body  { flex: 1; min-width: 0; }
.kid-card__title { display: block; font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.kid-card__meta  { display: block; font-size: 13px; color: var(--text-2); margin-top: 3px; }

/* Renk varyantları */
.kid-card--accent  .kid-card__icon { background: var(--accent-weak);  color: var(--accent); }
.kid-card--success .kid-card__icon { background: var(--success-weak); color: var(--success); }
.kid-card--info    .kid-card__icon { background: var(--info-weak);    color: var(--info); }
.kid-card--warning .kid-card__icon { background: var(--warning-weak); color: var(--warning); }

/* Ödev kartı */
.kid-task {
    display: flex; flex-direction: column; gap: var(--sp-3);
    padding: var(--sp-4);
    border-radius: var(--r-lg);
    border: 1.5px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.kid-task--late { border-color: var(--danger); background: var(--danger-weak); }
.kid-task--done { border-color: var(--success); background: var(--success-weak); }
.kid-task__top   { display: flex; align-items: flex-start; gap: var(--sp-3); }
.kid-task__title { display: block; font-size: 16px; font-weight: 700; letter-spacing: -.02em; line-height: 1.3; }
.kid-task__meta  { display: block; font-size: 13px; color: var(--text-2); margin-top: 4px; }
.kid-task__foot  { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }

/* İlerleme halkası */
.kid-ring { display: flex; align-items: center; gap: var(--sp-4); }
.kid-ring__circle {
    position: relative;
    width: 88px; height: 88px; flex-shrink: 0;
    border-radius: 50%;
    display: grid; place-items: center;
    background: conic-gradient(var(--ring-color, var(--primary)) calc(var(--pct, 0) * 1%), var(--surface-3) 0);
}
.kid-ring__circle::before {
    content: '';
    position: absolute; inset: 9px;
    border-radius: 50%;
    background: var(--surface);
}
.kid-ring__value {
    position: relative;
    font-size: 21px; font-weight: 800; letter-spacing: -.03em;
    font-family: var(--font-num);
}

/* Rozet şeridi */
.kid-badges { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.kid-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 12px;
    border-radius: var(--r-full);
    background: var(--surface-2);
    font-size: 13px; font-weight: 650;
}
.kid-badge .icon { width: 15px; height: 15px; }
.kid-badge--on { background: var(--accent-weak); color: var(--accent); }

/* Büyük kısayol kutuları */
.kid-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
@media (min-width: 640px) { .kid-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kid-tile {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: var(--sp-2);
    min-height: 96px;
    padding: var(--sp-3);
    border-radius: var(--r-lg);
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: inherit; text-decoration: none; text-align: center;
    font-size: 13.5px; font-weight: 650;
    transition: transform var(--t-fast), border-color var(--t-fast);
}
.kid-tile:hover  { text-decoration: none; border-color: var(--primary); }
.kid-tile:active { transform: scale(.97); }
.kid-tile__icon {
    display: grid; place-items: center;
    width: 46px; height: 46px;
    border-radius: 15px;
    background: var(--primary-weak); color: var(--primary);
}
.kid-tile__icon .icon { width: 23px; height: 23px; }

@media (max-width: 380px) {
    .kid-hero { padding: var(--sp-4) var(--sp-3); gap: var(--sp-3); }
    .kid-hero__avatar { width: 50px; height: 50px; border-radius: 17px; font-size: 18px; }
    .kid-hero__hi { font-size: 19px; }
    .kid-card { padding: var(--sp-3); gap: var(--sp-3); min-height: 76px; }
    .kid-card__icon { width: 46px; height: 46px; border-radius: 15px; }
    .kid-tile { min-height: 88px; }
}

/* --------------------------------------------- COK DAR EKRANLAR (<=380px) */
@media (max-width: 380px) {
    .app-bar { padding-inline: var(--sp-2); gap: 2px; }
    .app-bar__title { font-size: 15.5px; }
    .icon-btn { width: 36px; height: 36px; }
    .icon-btn .icon { width: 19px; height: 19px; }
    .brand__mark { width: 30px; height: 30px; border-radius: 10px; }
    .brand__mark .icon { width: 17px; height: 17px; }
    .page { padding-inline: var(--sp-3); }
    .bleed { margin-inline: calc(var(--sp-3) * -1); padding-inline: var(--sp-3); }
    .card--pad, .card__head, .card__body { padding-inline: var(--sp-3); }
    .stat { padding: 10px; }
    .stat__value { font-size: 19px; }
    .menu-grid { gap: 6px; }
    /* Cok dar ekranda ikincil ust cubuk dugmeleri gizlenir */
    .hide-xxs { display: none !important; }
}
