/* ======================================================================
   GymPubs - Liquid Glass tema (yesil / siyah), mobil oncelikli
   ====================================================================== */

:root {
    /* zemin */
    --bg:         #050705;
    --bg-2:       #080C08;

    /* cam yuzeyler */
    --glass:        rgba(255, 255, 255, 0.045);
    --glass-2:      rgba(255, 255, 255, 0.075);
    --glass-strong: rgba(255, 255, 255, 0.10);
    --glass-line:   rgba(255, 255, 255, 0.10);
    --glass-line-2: rgba(255, 255, 255, 0.16);
    --glass-inset:  rgba(255, 255, 255, 0.14);
    --blur:         22px;

    /* metin */
    --text:     #EAF4EC;
    --text-dim: #C3D8C9;
    --muted:    #93A99A;

    /* yesil */
    --green:      #22C55E;
    --green-soft: #4ADE80;
    --green-lite: #86EFAC;
    --green-deep: #0F7A3A;
    --green-05:   rgba(34, 197, 94, 0.05);
    --green-10:   rgba(34, 197, 94, 0.10);
    --green-18:   rgba(34, 197, 94, 0.18);
    --green-35:   rgba(34, 197, 94, 0.35);
    --green-glow: rgba(34, 197, 94, 0.30);

    --red:       #FF5C5C;
    --red-10:    rgba(255, 92, 92, 0.12);
    --red-35:    rgba(255, 92, 92, 0.35);
    --amber:     #FBBF24;
    --amber-10:  rgba(251, 191, 36, 0.12);
    --amber-35:  rgba(251, 191, 36, 0.35);
    --sky:       #5CC8FF;

    --r-sm: 12px;
    --r:    18px;
    --r-lg: 26px;
    --r-xl: 32px;

    --tap: 46px;
    --topbar-h: 60px;
    --nav-h: 66px;

    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.35);
    --shadow:    0 14px 40px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    background: var(--bg);
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font);
    background: transparent; /* zemin html'de; asagidaki isik katmanlari uzerine biner */
    color: var(--text);
    font-size: 16px;
    line-height: 1.55;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
}

/* --- arka plan: derin siyah uzerinde yesil isik lekeleri --- */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(60% 42% at 12% -4%,  rgba(34, 197, 94, 0.42), transparent 68%),
        radial-gradient(55% 38% at 95% 6%,   rgba(16, 185, 129, 0.30), transparent 70%),
        radial-gradient(70% 45% at 50% 108%, rgba(34, 197, 94, 0.26), transparent 72%),
        radial-gradient(50% 35% at 85% 62%,  rgba(5, 150, 105, 0.16), transparent 75%);
    pointer-events: none;
}

/* cam etkisinin okunmasi icin ince doku */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.016) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.016) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: radial-gradient(70% 55% at 50% 0%, #000, transparent 75%);
    -webkit-mask-image: radial-gradient(70% 55% at 50% 0%, #000, transparent 75%);
    pointer-events: none;
}

body.has-bottomnav {
    padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 26px);
}

a { color: var(--green-soft); text-decoration: none; }
a:hover { color: var(--green-lite); }

h1, h2, h3, h4 { margin: 0 0 10px; line-height: 1.22; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: 24px; }
h2 { font-size: 19px; }
h3 { font-size: 17px; }
p  { margin: 0 0 12px; }

img { max-width: 100%; height: auto; display: block; }

hr { border: 0; border-top: 1px solid var(--glass-line); margin: 20px 0; }

::selection { background: var(--green-35); color: #fff; }

/* ---------------------------------------------------------------- cam */

.glass {
    background: var(--glass);
    -webkit-backdrop-filter: blur(var(--blur)) saturate(165%);
    backdrop-filter: blur(var(--blur)) saturate(165%);
    border: 1px solid var(--glass-line);
    box-shadow: var(--shadow), inset 0 1px 0 var(--glass-inset);
}

@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
    :root { --glass: rgba(22, 30, 23, 0.92); --glass-2: rgba(28, 38, 29, 0.95); }
}

/* ---------------------------------------------------------------- layout */

.wrap {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 16px 14px 28px;
}

.wrap-wide { max-width: 1060px; }

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 18px;
}

.page-head h1 { margin: 0; }
.page-head .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

.muted { color: var(--muted); }
.dim   { color: var(--text-dim); }
.small { font-size: 13.5px; }
.tiny  { font-size: 12px; }
.center { text-align: center; }
.right  { text-align: right; }
.nowrap { white-space: nowrap; }
.mt0 { margin-top: 0 !important; }
.mt1 { margin-top: 10px; }
.mt2 { margin-top: 18px; }
.mt3 { margin-top: 26px; }
.mb0 { margin-bottom: 0 !important; }
.mb1 { margin-bottom: 10px; }
.mb2 { margin-bottom: 18px; }
.flex { display: flex; gap: 12px; align-items: center; }
.flex-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.hide { display: none !important; }

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 12px; }

@media (min-width: 540px) {
    .grid-2 { grid-template-columns: 1fr 1fr; }
}

/* ---------------------------------------------------------------- topbar */

.topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    height: calc(var(--topbar-h) + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) 12px 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    background: linear-gradient(180deg, rgba(5, 7, 5, 0.82), rgba(5, 7, 5, 0.42));
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    backdrop-filter: blur(20px) saturate(160%);
    border-bottom: 1px solid var(--glass-line);
}

.wordmark {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin-top: calc(env(safe-area-inset-top, 0px) / 2);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.045em;
    color: var(--text);
    display: inline-flex;
    align-items: center;
}

.wordmark b {
    font-weight: 800;
    background: linear-gradient(135deg, var(--green-lite), var(--green));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.wordmark:hover { color: var(--text); }

.topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.icon-btn {
    position: relative;
    width: 42px;
    height: 42px;
    min-width: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.icon-btn:hover, .icon-btn:active {
    background: var(--glass-2);
    border-color: var(--glass-line);
    color: var(--text);
}

.icon-btn svg { width: 21px; height: 21px; }

.badge-dot {
    position: absolute;
    top: 4px;
    right: 3px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 10px;
    background: linear-gradient(135deg, #FF6B6B, #E11D48);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 19px;
    text-align: center;
    border: 2px solid #060806;
    box-shadow: 0 2px 10px rgba(225, 29, 72, 0.5);
}

/* ------------------------------------------------------------ bildirimler */

.notif-panel {
    position: absolute;
    top: calc(100% - 6px);
    right: 10px;
    width: min(360px, calc(100vw - 20px));
    border-radius: var(--r-lg);
    overflow: hidden;
    z-index: 70;
    background: rgba(12, 17, 13, 0.82);
    -webkit-backdrop-filter: blur(26px) saturate(170%);
    backdrop-filter: blur(26px) saturate(170%);
    border: 1px solid var(--glass-line-2);
    box-shadow: var(--shadow-lg), inset 0 1px 0 var(--glass-inset);
    animation: pop 0.18s ease;
}

@keyframes pop {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}

.notif-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--glass-line);
    font-weight: 700;
    font-size: 14px;
}

.notif-list { max-height: 58vh; overflow-y: auto; }

.notif-item {
    display: block;
    padding: 13px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-size: 14px;
}

.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: var(--glass-2); color: var(--text); }
.notif-item.unread { background: linear-gradient(90deg, var(--green-10), transparent); }
.notif-item.unread .t { color: var(--green-lite); }
.notif-item .t { font-weight: 600; display: block; }
.notif-empty { padding: 26px 14px; text-align: center; color: var(--muted); font-size: 14px; }

/* ------------------------------------------------------------- alt menu */

.bottomnav {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
    z-index: 55;
    width: min(500px, calc(100vw - 20px));
    display: flex;
    padding: 6px;
    border-radius: 24px;
    background: rgba(10, 15, 11, 0.72);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-line-2);
    box-shadow: var(--shadow-lg), inset 0 1px 0 var(--glass-inset);
}

.bottomnav a {
    flex: 1 1 0;
    min-height: 54px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border-radius: 18px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--muted);
    padding: 6px 2px;
    transition: color 0.18s ease, background 0.18s ease;
}

.bottomnav a svg { width: 22px; height: 22px; }

.bottomnav a.active {
    color: var(--green-lite);
    background: linear-gradient(180deg, var(--green-18), var(--green-05));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 6px 18px rgba(34, 197, 94, 0.14);
}

/* ----------------------------------------------------------------- admin */

.admin-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 12px;
    background: rgba(6, 9, 6, 0.7);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    border-bottom: 1px solid var(--glass-line);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.admin-strip::-webkit-scrollbar { display: none; }

.admin-strip a {
    flex: 0 0 auto;
    padding: 9px 15px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    background: var(--glass);
    border: 1px solid var(--glass-line);
    color: var(--text-dim);
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
}

.admin-strip a.active {
    background: linear-gradient(135deg, var(--green-18), var(--green-05));
    border-color: var(--green-35);
    color: var(--green-lite);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.admin-strip .count {
    background: linear-gradient(135deg, #FF6B6B, #E11D48);
    color: #fff;
    border-radius: 999px;
    font-size: 11px;
    padding: 1px 7px;
    font-weight: 800;
}

/* ----------------------------------------------------------------- kart */

.card {
    position: relative;
    background: var(--glass);
    -webkit-backdrop-filter: blur(var(--blur)) saturate(165%);
    backdrop-filter: blur(var(--blur)) saturate(165%);
    border: 1px solid var(--glass-line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow), inset 0 1px 0 var(--glass-inset);
    padding: 16px;
    overflow: hidden;
}

/* cam uzerinde ince isik yansimasi */
.card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 40%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent);
    pointer-events: none;
}

.card > * { position: relative; }

.card + .card { margin-top: 12px; }

a.card { text-decoration: none; transition: transform 0.12s ease, border-color 0.18s ease; }
a.card:active { transform: scale(0.99); }
a.card:hover { border-color: var(--glass-line-2); }
.card-tight { padding: 12px 14px; }

.card-accent {
    border-color: var(--green-35);
    background: linear-gradient(145deg, var(--green-10), var(--glass) 55%);
}

.card-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 9px;
}

.card-title svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--green-soft); }
.card-title .badge, .card-title .btn { margin-left: auto; }

.section-title {
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin: 26px 0 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--glass-line), transparent);
}

.empty {
    padding: 32px 18px;
    text-align: center;
    color: var(--muted);
    background: var(--glass);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px dashed var(--glass-line-2);
    border-radius: var(--r-lg);
    font-size: 14px;
}

/* --------------------------------------------------------------- butonlar */

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--tap);
    padding: 12px 18px;
    border-radius: 16px;
    border: 1px solid var(--glass-line-2);
    background: var(--glass-2);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    font-weight: 650;
    letter-spacing: -0.01em;
    cursor: pointer;
    text-align: center;
    user-select: none;
    overflow: hidden;
    box-shadow: var(--shadow-sm), inset 0 1px 0 var(--glass-inset);
    transition: transform 0.1s ease, filter 0.18s ease, background 0.18s ease;
}

.btn:hover { color: var(--text); filter: brightness(1.12); }
.btn:active { transform: scale(0.975); }
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }

.btn-primary {
    background: linear-gradient(145deg, var(--green-soft), var(--green) 46%, var(--green-deep));
    border-color: rgba(134, 239, 172, 0.5);
    color: #04240F;
    font-weight: 800;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.18);
    box-shadow: 0 10px 28px var(--green-glow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-primary:hover { color: #04240F; }

.btn-outline {
    background: var(--green-10);
    border-color: var(--green-35);
    color: var(--green-lite);
}

.btn-ghost {
    background: var(--glass);
    border-color: var(--glass-line);
    color: var(--text-dim);
}

.btn-danger {
    background: var(--red-10);
    border-color: var(--red-35);
    color: #FFA8A8;
}

.btn-danger:hover { background: rgba(255, 92, 92, 0.22); color: #fff; }

.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 8px 14px; font-size: 14px; border-radius: 13px; }
.btn-xs { min-height: 36px; padding: 6px 11px; font-size: 13px; border-radius: 11px; }
.btn:disabled, .btn[disabled] { opacity: 0.45; cursor: not-allowed; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row .btn { flex: 1 1 auto; }
.btn-row form { display: contents; }

.fab {
    position: fixed;
    right: 16px;
    bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 24px);
    z-index: 50;
    min-height: 54px;
    padding: 0 20px;
    border-radius: 999px;
}

/* --------------------------------------------------------------- formlar */

.field { margin-bottom: 15px; }

.label {
    display: block;
    font-size: 12.5px;
    font-weight: 650;
    letter-spacing: 0.01em;
    color: var(--text-dim);
    margin-bottom: 7px;
}

.input, .select, .textarea {
    width: 100%;
    min-height: var(--tap);
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.035);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-line);
    border-radius: 15px;
    color: var(--text);
    font-family: inherit;
    font-size: 16px;
    appearance: none;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.textarea { min-height: 100px; resize: vertical; line-height: 1.55; }

.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--green-35);
    background: rgba(34, 197, 94, 0.06);
    box-shadow: 0 0 0 4px var(--green-10), inset 0 1px 2px rgba(0, 0, 0, 0.25);
}

.input::placeholder, .textarea::placeholder { color: var(--muted); }

.select {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2376877C' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    background-size: 18px;
    padding-right: 40px;
}

/* Native acilir liste: isletim sistemi cizer, en azindan renkleri uyumlu olsun */
.select option { background: #0B120C; color: var(--text); padding: 10px; }
.select optgroup { background: #0B120C; color: var(--green-soft); font-weight: 700; }

/* secici listesindeki ogeler buton olarak kullanilir */
button.item {
    width: 100%;
    font-family: inherit;
    font-size: inherit;
    text-align: left;
    cursor: pointer;
}

#pkList { max-height: 44vh; overflow-y: auto; padding-right: 2px; }
#pkGroups .pill { cursor: pointer; font-family: inherit; }

.hint { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.45; }

.check {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: var(--tap);
    padding: 8px 12px;
    border-radius: 14px;
    background: var(--glass);
    border: 1px solid var(--glass-line);
    font-size: 14.5px;
    cursor: pointer;
}

.check input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--green);
    flex: 0 0 auto;
}

input[type="file"] {
    width: 100%;
    font-size: 13.5px;
    color: var(--text-dim);
    padding: 8px 0;
}

input[type="file"]::file-selector-button {
    background: var(--glass-2);
    color: var(--text);
    border: 1px solid var(--glass-line-2);
    border-radius: 12px;
    padding: 10px 14px;
    margin-right: 12px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    min-height: 40px;
    cursor: pointer;
}

input[type="date"] { min-height: var(--tap); }

/* --------------------------------------------------------------- uyarilar */

.alert {
    padding: 13px 15px;
    border-radius: var(--r);
    font-size: 14px;
    margin-bottom: 14px;
    border: 1px solid transparent;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
    line-height: 1.5;
}

.alert-ok   { background: var(--green-10); border-color: var(--green-35); color: var(--green-lite); }
.alert-err  { background: var(--red-10);   border-color: var(--red-35);   color: #FFA8A8; }
.alert-info { background: var(--glass);    border-color: var(--glass-line); color: var(--text-dim); }
.alert-warn { background: var(--amber-10); border-color: var(--amber-35); color: #FDE68A; }

/* --------------------------------------------------------------- rozetler */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.01em;
    background: var(--glass-2);
    border: 1px solid var(--glass-line);
    color: var(--text-dim);
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.badge svg { width: 13px; height: 13px; }

.badge-green { background: var(--green-18); border-color: var(--green-35); color: var(--green-lite); }
.badge-red   { background: var(--red-10);   border-color: var(--red-35);   color: #FFA8A8; }
.badge-amber { background: var(--amber-10); border-color: var(--amber-35); color: #FDE68A; }
.badge-off   { background: var(--glass); color: var(--muted); }

.badge-pr {
    background: linear-gradient(135deg, var(--green-lite), var(--green));
    border-color: transparent;
    color: #04240F;
    box-shadow: 0 3px 12px var(--green-glow);
}

/* --------------------------------------------------------------- listeler */

.list { display: flex; flex-direction: column; gap: 11px; }

.item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 14px;
    background: var(--glass);
    -webkit-backdrop-filter: blur(var(--blur)) saturate(165%);
    backdrop-filter: blur(var(--blur)) saturate(165%);
    border: 1px solid var(--glass-line);
    border-radius: var(--r);
    box-shadow: var(--shadow-sm), inset 0 1px 0 var(--glass-inset);
    color: var(--text);
    transition: transform 0.12s ease, border-color 0.18s ease, background 0.18s ease;
}

a.item:active { transform: scale(0.99); }
a.item:hover { background: var(--glass-2); color: var(--text); border-color: var(--glass-line-2); }

.item.active-item {
    border-color: var(--green-35);
    background: linear-gradient(135deg, var(--green-10), var(--glass) 60%);
}

.item-title { font-weight: 650; font-size: 15px; letter-spacing: -0.01em; }
.item-sub { font-size: 12.5px; color: var(--muted); }
.item-actions { margin-left: auto; display: flex; gap: 7px; align-items: center; flex: 0 0 auto; }
.item-actions svg { width: 18px; height: 18px; }

.thumb {
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    border-radius: 14px;
    object-fit: cover;
    background: var(--glass-2);
    border: 1px solid var(--glass-line);
}

.thumb-lg {
    width: 100%;
    height: 170px;
    border-radius: var(--r-lg);
    object-fit: cover;
    border: 1px solid var(--glass-line);
}

/* kutuphane sayfasindaki buyuk hareket fotografi */
.ex-photo {
    width: 100%;
    height: 190px;
    object-fit: cover;
    object-position: center;
    border-radius: var(--r);
    border: 1px solid var(--glass-line);
    background: var(--glass-2);
}

.thumb-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
}

.thumb-ph svg { width: 22px; height: 22px; }

/* ------------------------------------------------------------- istatistik */

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }

@media (min-width: 540px) {
    .stats { grid-template-columns: repeat(4, 1fr); }
    .stats-2 { grid-template-columns: repeat(2, 1fr); }
}

.stat {
    position: relative;
    background: var(--glass);
    -webkit-backdrop-filter: blur(var(--blur)) saturate(165%);
    backdrop-filter: blur(var(--blur)) saturate(165%);
    border: 1px solid var(--glass-line);
    border-radius: var(--r);
    padding: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-sm), inset 0 1px 0 var(--glass-inset);
}

.stat::after {
    content: "";
    position: absolute;
    right: -24px;
    top: -24px;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--green-18), transparent 70%);
    pointer-events: none;
}

.stat .n {
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--green-lite), var(--green));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat .l { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.35; }

/* --------------------------------------------------------------- tablolar */

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

table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }

table.tbl th, table.tbl td {
    padding: 11px 9px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: middle;
}

table.tbl th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    font-weight: 700;
    white-space: nowrap;
}

table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: rgba(255, 255, 255, 0.025); }

/* --------------------------------------------------------- program gunleri */

.day-card {
    background: var(--glass);
    -webkit-backdrop-filter: blur(var(--blur)) saturate(165%);
    backdrop-filter: blur(var(--blur)) saturate(165%);
    border: 1px solid var(--glass-line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm), inset 0 1px 0 var(--glass-inset);
    overflow: hidden;
}

.day-card + .day-card { margin-top: 12px; }

.day-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent);
    border-bottom: 1px solid var(--glass-line);
}

.day-head .d { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.day-head .n { font-size: 12.5px; color: var(--green-soft); font-weight: 600; }
.day-body { padding: 10px 16px 16px; }

.day-off { opacity: 0.62; }

.ex-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.ex-row:last-child { border-bottom: 0; }

.ex-no {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    border-radius: 10px;
    background: var(--green-18);
    border: 1px solid var(--green-35);
    color: var(--green-lite);
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ex-name { font-weight: 620; font-size: 14.5px; letter-spacing: -0.01em; }
.ex-meta { font-size: 12.5px; color: var(--green-soft); font-weight: 600; }
.ex-note { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.order-btns { display: flex; flex-direction: column; gap: 3px; }

.order-btns button {
    width: 36px;
    height: 27px;
    border-radius: 9px;
    border: 1px solid var(--glass-line);
    background: var(--glass-2);
    color: var(--text-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-btns button svg { width: 15px; height: 15px; }
.order-btns button:disabled { opacity: 0.25; cursor: default; }
.order-btns button:active:not(:disabled) { background: var(--green-18); color: var(--green-lite); }

/* --------------------------------------------------------- antrenman modu */

.w-ex {
    background: var(--glass);
    -webkit-backdrop-filter: blur(var(--blur)) saturate(165%);
    backdrop-filter: blur(var(--blur)) saturate(165%);
    border: 1px solid var(--glass-line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm), inset 0 1px 0 var(--glass-inset);
    margin-bottom: 12px;
    overflow: hidden;
}

.w-ex-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent);
    border-bottom: 1px solid var(--glass-line);
}

.w-ex-head .nm { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.w-ex-head .sr { font-size: 12px; color: var(--green-soft); font-weight: 650; }
.w-ex-body { padding: 12px 16px 16px; }

.prev-line {
    font-size: 12.5px;
    color: var(--text-dim);
    background: rgba(34, 197, 94, 0.055);
    border: 1px solid var(--green-18);
    border-radius: 13px;
    padding: 9px 12px;
    margin-bottom: 12px;
    line-height: 1.5;
}

.prev-line b { color: var(--green-soft); font-weight: 650; }

.set-grid {
    display: grid;
    grid-template-columns: 32px 1fr 1fr 42px;
    gap: 9px;
    align-items: center;
    margin-bottom: 9px;
}

.set-grid .sn {
    font-size: 13px;
    font-weight: 800;
    color: var(--muted);
    text-align: center;
}

.set-grid .input {
    min-height: 50px;
    text-align: center;
    font-weight: 700;
    font-size: 17px;
    padding: 10px 6px;
    border-radius: 14px;
}

.set-grid-head {
    font-size: 10.5px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    text-align: center;
    margin-bottom: 7px;
}

.rm-set {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    border: 1px solid var(--glass-line);
    background: var(--glass);
    color: var(--muted);
    cursor: pointer;
    font-size: 19px;
    line-height: 1;
}

.rm-set:active { background: var(--red-10); color: #FFA8A8; border-color: var(--red-35); }

.sticky-save {
    position: sticky;
    bottom: calc(env(safe-area-inset-bottom, 0px) + var(--nav-h) + 16px);
    z-index: 40;
    padding-top: 10px;
}

/* -------------------------------------------------------------- not defteri */

.log-day {
    position: relative;
    padding-left: 22px;
    margin-bottom: 14px;
}

.log-day::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 26px;
    bottom: -14px;
    width: 2px;
    background: linear-gradient(180deg, var(--green-35), transparent);
}

.log-day:last-child::before { display: none; }

.log-dot {
    position: absolute;
    left: 0;
    top: 16px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16), 0 0 14px var(--green-glow);
}

.set-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--glass-2);
    border: 1px solid var(--glass-line);
    font-size: 12.5px;
    font-weight: 650;
    color: var(--text-dim);
    font-variant-numeric: tabular-nums;
}

.chip b { color: var(--text); font-weight: 750; }

.chip-pr {
    background: linear-gradient(135deg, var(--green-lite), var(--green));
    border-color: transparent;
    color: #04240F;
}

.chip-pr b { color: #04240F; }

/* -------------------------------------------------------------- grafik */

.chart-box { position: relative; width: 100%; height: 250px; }
.chart-box canvas { width: 100% !important; height: 100% !important; }

/* --------------------------------------------------------------- modal */

.modal-back {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(0, 0, 0, 0.55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

@media (min-width: 540px) { .modal-back { align-items: center; } }

.modal {
    width: 100%;
    max-width: 540px;
    max-height: 88vh;
    overflow-y: auto;
    background: rgba(12, 17, 13, 0.9);
    -webkit-backdrop-filter: blur(26px) saturate(170%);
    backdrop-filter: blur(26px) saturate(170%);
    border: 1px solid var(--glass-line-2);
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 540px) { .modal { border-radius: var(--r-xl); } }

/* ---------------------------------------------------------- acilir bolum */

details.card > summary,
details.day-card > summary {
    list-style: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 14.5px;
    min-height: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

details > summary::-webkit-details-marker { display: none; }

details.card > summary svg { width: 18px; height: 18px; color: var(--green-soft); }

details.card > summary::after {
    content: "";
    margin-left: auto;
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.2s ease;
}

details.card[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }

.sub-toggle {
    cursor: pointer;
    list-style: none;
    font-size: 13px;
    font-weight: 650;
    color: var(--green-soft);
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sub-toggle::-webkit-details-marker { display: none; }

/* ------------------------------------------------------- giris ekranlari */

.auth-wrap {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px 18px calc(32px + env(safe-area-inset-bottom, 0px));
    max-width: 440px;
    margin: 0 auto;
}

.auth-logo { text-align: center; margin-bottom: 24px; }

.auth-logo .wm {
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -0.055em;
}

.auth-logo .wm b {
    background: linear-gradient(135deg, var(--green-lite), var(--green));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-logo .sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }

.auth-card {
    background: var(--glass);
    -webkit-backdrop-filter: blur(26px) saturate(170%);
    backdrop-filter: blur(26px) saturate(170%);
    border: 1px solid var(--glass-line-2);
    border-radius: var(--r-xl);
    padding: 22px 18px;
    box-shadow: var(--shadow-lg), inset 0 1px 0 var(--glass-inset);
}

.auth-alt { text-align: center; margin-top: 18px; font-size: 14px; color: var(--muted); }

/* --------------------------------------------------------------- cesitli */

.pill-row { display: flex; gap: 8px; flex-wrap: wrap; }

.pill {
    padding: 8px 15px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
    border-radius: 999px;
    background: var(--glass);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid var(--glass-line);
    font-size: 13px;
    color: var(--text-dim);
    font-weight: 620;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.pill svg { width: 16px; height: 16px; flex: 0 0 auto; }

.pill.active {
    background: linear-gradient(135deg, var(--green-18), var(--green-05));
    border-color: var(--green-35);
    color: var(--green-lite);
}

.scroll-x {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.scroll-x::-webkit-scrollbar { display: none; }
.scroll-x > * { flex: 0 0 auto; }

.divider-text {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 18px 0;
}

.divider-text::before, .divider-text::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--glass-line);
}

.toast {
    position: fixed;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 26px);
    z-index: 95;
    background: rgba(12, 17, 13, 0.92);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--green-35);
    color: var(--text);
    padding: 12px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 650;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.install-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--green-10), var(--glass));
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border: 1px solid var(--green-35);
    border-radius: var(--r);
    padding: 13px 14px;
    margin-bottom: 16px;
    box-shadow: inset 0 1px 0 var(--glass-inset);
}

/* hero - panel ust karti */
.hero {
    position: relative;
    border-radius: var(--r-xl);
    padding: 20px 18px;
    margin-bottom: 16px;
    overflow: hidden;
    background:
        linear-gradient(140deg, rgba(34, 197, 94, 0.2), rgba(255, 255, 255, 0.04) 46%, rgba(255, 255, 255, 0.02));
    -webkit-backdrop-filter: blur(26px) saturate(170%);
    backdrop-filter: blur(26px) saturate(170%);
    border: 1px solid var(--glass-line-2);
    box-shadow: var(--shadow), inset 0 1px 0 var(--glass-inset);
}

.hero::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -60px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--green-18), transparent 68%);
    pointer-events: none;
}

.hero h1 { font-size: 23px; margin-bottom: 2px; }
.hero .date { font-size: 13px; color: var(--text-dim); }

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

/* ======================================================================
   Canli tonlar + kayit akisi (sonradan eklendi)
   ====================================================================== */

/* Gri yerine yesil tonlu, daha canli ikincil butonlar */
.btn-ghost {
    background: linear-gradient(145deg, rgba(34, 197, 94, 0.14), rgba(34, 197, 94, 0.05));
    border-color: rgba(34, 197, 94, 0.3);
    color: var(--green-lite);
}

.btn-ghost:hover { background: rgba(34, 197, 94, 0.2); color: #fff; }

.pill {
    background: linear-gradient(145deg, rgba(34, 197, 94, 0.12), rgba(255, 255, 255, 0.04));
    border-color: rgba(34, 197, 94, 0.26);
    color: #CFEBD8;
}

.pill.active {
    background: linear-gradient(145deg, var(--green-soft), var(--green));
    border-color: transparent;
    color: #04240F;
    box-shadow: 0 6px 18px var(--green-glow);
}

.badge { color: #CFEBD8; }
.item-sub { color: #9DB5A6; }

.admin-strip a {
    background: linear-gradient(145deg, rgba(34, 197, 94, 0.12), rgba(255, 255, 255, 0.04));
    border-color: rgba(34, 197, 94, 0.26);
    color: #CFEBD8;
}

.admin-strip a.active {
    background: linear-gradient(145deg, var(--green-soft), var(--green));
    border-color: transparent;
    color: #04240F;
}

.empty { color: #9DB5A6; }

/* Panel kategorileri: tasmayan izgara */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 16px;
    margin-bottom: 26px;
}

@media (min-width: 520px) {
    .cat-grid { grid-template-columns: repeat(4, 1fr); }
}

.cat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 82px;
    padding: 12px 8px;
    border-radius: var(--r);
    background: linear-gradient(150deg, rgba(34, 197, 94, 0.16), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(34, 197, 94, 0.28);
    box-shadow: inset 0 1px 0 var(--glass-inset);
    color: #DDF3E4;
    font-size: 12.5px;
    font-weight: 650;
    line-height: 1.25;
    text-align: center;
}

.cat:hover { color: #fff; border-color: var(--green); }
.cat:active { transform: scale(0.98); }
.cat svg { width: 22px; height: 22px; color: var(--green-lite); }

/* Kayit akisi ikonlari */
.log-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.log-icon svg { width: 21px; height: 21px; }

.log-icon-workout {
    background: linear-gradient(145deg, var(--green-soft), var(--green-deep));
    color: #04240F;
}

.log-icon-pr {
    background: linear-gradient(145deg, #FDE68A, #F59E0B);
    color: #3B2606;
}

.log-icon-body {
    background: linear-gradient(145deg, #93D7FF, #2B9FE0);
    color: #05243A;
}

/* alt menude 6 oge sigsin */
.bottomnav a { font-size: 9.5px; letter-spacing: -0.03em; padding: 6px 1px; }
.bottomnav a span { white-space: nowrap; }
.bottomnav a svg { width: 21px; height: 21px; }

/* ======================================================================
   Profil fotoğrafı (Instagram mantığı: kare kırpma, yuvarlak gösterim)
   ====================================================================== */

.avatar {
    display: block;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    background: var(--glass-2);
    border: 2px solid rgba(34, 197, 94, 0.45);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.avatar-xs { width: 32px; height: 32px; border-width: 1.5px; }
.avatar-sm { width: 44px; height: 44px; }
.avatar-xl { width: 104px; height: 104px; }

.avatar-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--green-lite);
    background: linear-gradient(145deg, rgba(34, 197, 94, 0.28), rgba(255, 255, 255, 0.05));
}

.avatar-xl.avatar-ph { font-size: 40px; }
.avatar-sm.avatar-ph { font-size: 18px; }
.avatar-xs.avatar-ph { font-size: 13px; }

.profile-head { text-align: center; margin-bottom: 20px; }

.avatar-wrap {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.avatar-edit {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--green-soft), var(--green));
    color: #04240F;
    border: 3px solid #0A0F0B;
    box-shadow: 0 4px 14px var(--green-glow);
}

.avatar-edit svg { width: 16px; height: 16px; }

/* üst bardaki küçük profil fotoğrafı */
.topbar-avatar {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    margin-top: calc(env(safe-area-inset-top, 0px) / 2);
    display: flex;
    align-items: center;
}

/* kapak fotoğrafı konum ayarı */
.cover-preview {
    width: 100%;
    height: 170px;
    border-radius: var(--r);
    overflow: hidden;
    border: 1px solid var(--glass-line);
    background: var(--glass-2);
}

.cover-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.range {
    width: 100%;
    height: 38px;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.range::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--green-deep), var(--green-soft));
    border: 1px solid var(--glass-line);
}

.range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 26px;
    height: 26px;
    margin-top: -10px;
    border-radius: 50%;
    background: #EAF4EC;
    border: 3px solid var(--green);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
}

.range::-moz-range-track {
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--green-deep), var(--green-soft));
}

.range::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #EAF4EC;
    border: 3px solid var(--green);
}
