/* ===========================================================
   Kres SaaS — Design System
   Palet (memory-enforced): #FF6B6B / #4ECDC4
   =========================================================== */

:root {
    --color-primary: #FF6B6B;
    --color-primary-600: #ff5252;
    --color-primary-50: #fff1f1;
    --color-secondary: #4ECDC4;
    --color-secondary-600: #38b2ac;
    --color-secondary-50: #e6f9f7;

    --color-bg: #f6f7fb;
    --color-surface: #ffffff;
    --color-border: #e5e7eb;
    --color-muted: #6b7280;
    --color-text: #1f2937;
    --color-text-soft: #4b5563;

    --color-success: #10b981;
    --color-danger: #ef4444;
    --color-warning: #f59e0b;
    --color-info: #3b82f6;

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(17,24,39,.06);
    --shadow: 0 4px 12px rgba(17,24,39,.08);
    --shadow-lg: 0 10px 30px rgba(17,24,39,.12);

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

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg);
    font-size: 14px; line-height: 1.5;
}

a { color: var(--color-primary-600); text-decoration: none; }
a:hover { color: var(--color-primary); }

/* ===== Layout ===== */
.app-shell { display: flex; min-height: 100vh; }
.app-main  { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.app-content { padding: 24px 28px; flex: 1; }

.topbar {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 12px 24px; display: flex; align-items: center;
    justify-content: space-between; gap: 16px;
}
.topbar .brand { font-weight: 700; color: var(--color-primary); font-size: 18px; }
.topbar .brand span { color: var(--color-secondary); }
.topbar .user-chip { display: flex; align-items: center; gap: 10px; color: var(--color-text-soft); }
.topbar .user-chip .avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600;
}

/* ===== Sidebar ===== */
.sidebar {
    width: 248px; background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    display: flex; flex-direction: column; padding: 20px 12px;
    position: sticky; top: 0; height: 100vh;
}
.sidebar .logo {
    padding: 4px 12px 20px; font-size: 18px; font-weight: 700;
    color: var(--color-primary);
}
.sidebar .logo span { color: var(--color-secondary); }
.sidebar .nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar .nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: var(--radius-sm);
    color: var(--color-text-soft); font-weight: 500;
    transition: background .15s, color .15s;
}
.sidebar .nav-item:hover { background: var(--color-primary-50); color: var(--color-primary); }
.sidebar .nav-item.active {
    background: linear-gradient(90deg, var(--color-primary-50), transparent);
    color: var(--color-primary); font-weight: 600;
}
.sidebar .nav-icon {
    width: 22px; display: inline-flex; align-items: center; justify-content: center;
    font-size: 16px; line-height: 1; flex-shrink: 0;
    filter: grayscale(.15);
}
.sidebar .nav-item.active .nav-icon,
.sidebar .nav-item:hover .nav-icon { filter: none; }
.sidebar .nav-section {
    padding: 14px 14px 6px; text-transform: uppercase; font-size: 11px;
    letter-spacing: .06em; color: var(--color-muted);
}

/* ===== Cards ===== */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 20px; box-shadow: var(--shadow-sm);
}
.card h3, .card h2 { margin-top: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
}
.stat .label { color: var(--color-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.stat .value { font-size: 28px; font-weight: 700; color: var(--color-text); margin-top: 8px; }
.stat .hint  { color: var(--color-muted); font-size: 12px; margin-top: 6px; }
.stat.primary   { border-top: 3px solid var(--color-primary); }
.stat.secondary { border-top: 3px solid var(--color-secondary); }
.stat.success   { border-top: 3px solid var(--color-success); }
.stat.warning   { border-top: 3px solid var(--color-warning); }

/* ===== Page header ===== */
.page-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; gap: 16px; flex-wrap: wrap;
}
.page-header h1 { margin: 0; font-size: 22px; }
.page-header .subtitle { color: var(--color-muted); font-size: 13px; margin-top: 4px; }

/* ===== Forms ===== */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-weight: 500; margin-bottom: 6px; color: var(--color-text-soft); }
.form-control {
    width: 100%; padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 14px; font-family: inherit;
    background: var(--color-surface);
    transition: border-color .15s, box-shadow .15s;
}
.form-control:focus {
    outline: none; border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(255,107,107,.15);
}
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px; border-radius: var(--radius-sm);
    border: 1px solid transparent; font-weight: 600; font-size: 14px;
    cursor: pointer; transition: all .15s;
    text-decoration: none;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-600); color: #fff; }
.btn-secondary { background: var(--color-secondary); color: #fff; }
.btn-secondary:hover { background: var(--color-secondary-600); color: #fff; }
.btn-outline { background: transparent; border-color: var(--color-border); color: var(--color-text-soft); }
.btn-outline:hover { border-color: var(--color-primary); color: var(--color-primary); }
.btn-danger { background: var(--color-danger); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* ===== Tables ===== */
.table-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; }
/* Dar ekranda kolonlar ezilmesin; kart icinde yatay kaydirilir (sayfa tasmaz) */
@media (max-width: 640px) { .table { min-width: 560px; } }
.table th, .table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--color-border); }
.table th { background: #fafafa; font-weight: 600; color: var(--color-text-soft); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.table tbody tr:hover { background: #fafafa; }
.table tbody tr:last-child td { border-bottom: none; }

/* ===== Badges ===== */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-primary { background: var(--color-primary-50); color: var(--color-primary); }
.badge-secondary { background: var(--color-secondary-50); color: var(--color-secondary-600); }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-muted   { background: #f3f4f6; color: #4b5563; }

/* ===== Alerts ===== */
.alert {
    padding: 12px 16px; border-radius: var(--radius-sm);
    border-left: 4px solid; margin-bottom: 16px;
}
.alert-success { background: #d1fae5; border-color: var(--color-success); color: #065f46; }
.alert-danger  { background: #fee2e2; border-color: var(--color-danger);  color: #991b1b; }
.alert-warning { background: #fef3c7; border-color: var(--color-warning); color: #92400e; }
.alert-info    { background: #dbeafe; border-color: var(--color-info);    color: #1e40af; }

/* ===== Auth page ===== */
.auth-shell {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--color-primary-50), var(--color-secondary-50));
    padding: 24px;
}
.auth-card {
    width: 100%; max-width: 420px;
    background: var(--color-surface); border-radius: var(--radius-lg);
    padding: 36px 32px; box-shadow: var(--shadow-lg);
}
.auth-card .brand {
    font-size: 22px; font-weight: 700; text-align: center; margin-bottom: 6px;
    color: var(--color-primary);
}
.auth-card .brand span { color: var(--color-secondary); }
.auth-card .subtitle { text-align: center; color: var(--color-muted); margin-bottom: 28px; font-size: 13px; }
.auth-card .btn { width: 100%; justify-content: center; }
.auth-card .alt { text-align: center; margin-top: 18px; font-size: 13px; color: var(--color-muted); }

/* ===== Public (marketing) ===== */
.public-hero {
    padding: 72px 24px 64px; text-align: center;
    background: linear-gradient(135deg, var(--color-primary-50), var(--color-secondary-50));
}
.public-hero h1 { font-size: 42px; margin: 0 0 12px; color: var(--color-text); }
.public-hero h1 span { color: var(--color-primary); }
.public-hero p.lead { font-size: 16px; color: var(--color-text-soft); max-width: 640px; margin: 0 auto 28px; }
.public-nav { display: flex; align-items: center; justify-content: space-between; padding: 16px 28px; background: var(--color-surface); border-bottom: 1px solid var(--color-border); }
.public-nav .brand { font-weight: 700; color: var(--color-primary); }
.public-nav .links { display: flex; gap: 20px; }
.public-section { padding: 48px 24px; max-width: 1100px; margin: 0 auto; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.plan-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; }
.plan-card h3 { margin: 0 0 6px; color: var(--color-primary); }
.plan-card .price { font-size: 28px; font-weight: 700; margin: 12px 0; }
.plan-card ul { padding-left: 18px; color: var(--color-text-soft); }
.plan-card.featured { border: 2px solid var(--color-primary); box-shadow: var(--shadow-lg); transform: translateY(-4px); }

/* ===== Veli Portali (animasyonlu, cocuksu) ===== */
.vp-shell {
    min-height: 100vh;
    background:
      radial-gradient(1200px 600px at 10% 10%, #fff6d5 0, transparent 60%),
      radial-gradient(900px 700px at 90% 90%, #d5f6f2 0, transparent 55%),
      linear-gradient(135deg, #fff1f1 0%, #e6f9f7 100%);
    position: relative; overflow: hidden;
    display: grid; place-items: center; padding: 24px;
    font-family: var(--font-sans);
}
.vp-bubble {
    position: absolute; border-radius: 50%; filter: blur(.5px);
    opacity: .85; will-change: transform;
    animation: vpFloat 10s ease-in-out infinite;
}
.vp-bubble.b1 { width: 80px;  height: 80px;  top: 10%;  left: 8%;  background: #FFD6A5; animation-delay: 0s; }
.vp-bubble.b2 { width: 120px; height: 120px; top: 60%;  left: 6%;  background: #BDE0FE; animation-delay: 1.5s; }
.vp-bubble.b3 { width: 64px;  height: 64px;  top: 20%;  right: 12%; background: #CDB4DB; animation-delay: 3s; }
.vp-bubble.b4 { width: 140px; height: 140px; bottom: 8%; right: 6%; background: #B5EAD7; animation-delay: 2s; }
.vp-bubble.b5 { width: 50px;  height: 50px;  top: 45%;  right: 28%; background: #FFADAD; animation-delay: 4s; }
.vp-bubble.b6 { width: 70px;  height: 70px;  bottom: 25%;left: 35%; background: #FDFFB6; animation-delay: .5s; }
@keyframes vpFloat {
    0%,100% { transform: translate(0,0) scale(1); }
    50%     { transform: translate(10px,-18px) scale(1.05); }
}

.vp-emoji {
    position: absolute; font-size: 28px;
    animation: vpSpin 18s linear infinite; opacity: .85; pointer-events: none;
}
.vp-emoji.e1 { top: 14%; left: 22%; animation-duration: 14s; }
.vp-emoji.e2 { top: 28%; right: 20%; animation-duration: 22s; }
.vp-emoji.e3 { bottom: 22%; left: 18%; animation-duration: 16s; }
.vp-emoji.e4 { bottom: 14%; right: 32%; animation-duration: 20s; }
@keyframes vpSpin {
    0%   { transform: translateY(0) rotate(0); }
    50%  { transform: translateY(-10px) rotate(180deg); }
    100% { transform: translateY(0) rotate(360deg); }
}

.vp-card {
    position: relative; z-index: 5;
    width: 100%; max-width: 440px;
    background: #fff; border-radius: 28px;
    padding: 36px 32px 28px;
    box-shadow: 0 30px 80px rgba(255,107,107,.18), 0 10px 30px rgba(78,205,196,.15);
    animation: vpCardIn .6s cubic-bezier(.16,1,.3,1);
}
.vp-card::before {
    content: ""; position: absolute; inset: -2px;
    border-radius: 30px; pointer-events: none;
    background: linear-gradient(135deg, #FF6B6B, #FFD166, #06D6A0, #4ECDC4);
    z-index: -1; filter: blur(14px); opacity: .25;
}
@keyframes vpCardIn {
    from { opacity: 0; transform: translateY(24px) scale(.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.vp-mascot {
    width: 96px; height: 96px; margin: -62px auto 10px;
    background: linear-gradient(135deg, #FF6B6B, #4ECDC4);
    border-radius: 50%;
    display: grid; place-items: center;
    font-size: 46px;
    box-shadow: 0 12px 28px rgba(255,107,107,.35);
    animation: vpBounce 2.6s ease-in-out infinite;
}
@keyframes vpBounce {
    0%,100% { transform: translateY(0) rotate(-4deg); }
    50%     { transform: translateY(-8px) rotate(4deg); }
}

.vp-title {
    text-align: center; font-size: 24px; font-weight: 800;
    margin: 4px 0 2px; color: #1f2937;
    letter-spacing: -.01em;
}
.vp-title span { background: linear-gradient(90deg, #FF6B6B, #4ECDC4);
    -webkit-background-clip: text; background-clip: text; color: transparent; }
.vp-sub { text-align: center; color: #6b7280; font-size: 14px; margin-bottom: 22px; }

.vp-field {
    position: relative; margin-bottom: 14px;
}
.vp-field label {
    position: absolute; left: 18px; top: 14px;
    font-size: 13px; color: #9ca3af; pointer-events: none;
    transition: all .2s ease; background: #fff; padding: 0 6px;
}
.vp-field input {
    width: 100%; padding: 16px 18px 14px;
    border: 2px solid #e5e7eb; border-radius: 14px;
    font-size: 15px; background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
    font-family: inherit;
}
.vp-field input:focus {
    outline: none; border-color: #4ECDC4;
    box-shadow: 0 0 0 4px rgba(78,205,196,.15);
}
.vp-field input:focus + label,
.vp-field input:not(:placeholder-shown) + label {
    top: -8px; font-size: 11.5px; color: #4ECDC4; font-weight: 600;
}
.vp-field .ico {
    position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
    font-size: 20px; opacity: .55;
}

.vp-btn {
    width: 100%; border: 0; cursor: pointer;
    padding: 16px 18px; border-radius: 14px;
    font-size: 16px; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, #FF6B6B, #4ECDC4);
    box-shadow: 0 12px 24px rgba(255,107,107,.28);
    transition: transform .15s ease, box-shadow .2s ease;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: 8px;
}
.vp-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(255,107,107,.35); }
.vp-btn:active { transform: translateY(0); }
.vp-btn:disabled { opacity: .7; cursor: wait; }
.vp-btn .arr { transition: transform .2s ease; }
.vp-btn:hover .arr { transform: translateX(3px); }

.vp-alt { text-align: center; margin-top: 18px; font-size: 13px; color: #6b7280; }
.vp-alt a { color: #FF6B6B; font-weight: 600; }

.vp-hint {
    margin-top: 16px; font-size: 12.5px; color: #6b7280;
    background: #fafafa; border-radius: 12px; padding: 10px 12px; text-align: center;
}

/* ===== Veli Dashboard ===== */
.pd-shell {
    min-height: 100vh;
    background:
      radial-gradient(900px 500px at 8% 0%, #fff3d6 0, transparent 55%),
      radial-gradient(900px 700px at 100% 100%, #d9f6f2 0, transparent 55%),
      linear-gradient(160deg, #fff5f1 0%, #ecfbf8 100%);
    padding: 0 0 60px;
    font-family: var(--font-sans);
    position: relative; overflow-x: hidden;
}
.pd-shell::before,
.pd-shell::after {
    content: ""; position: absolute; border-radius: 50%; filter: blur(1px); opacity: .55;
    pointer-events: none; animation: vpFloat 12s ease-in-out infinite;
}
.pd-shell::before { width: 220px; height: 220px; top: 80px; right: -60px; background: #FFD6A5; }
.pd-shell::after  { width: 180px; height: 180px; bottom: 40px; left: -40px; background: #BDE0FE; animation-delay: 2s; }

.pd-topbar {
    max-width: 1100px; margin: 0 auto; padding: 18px 22px;
    display: flex; align-items: center; justify-content: space-between;
    position: relative; z-index: 2;
}
.pd-logo { font-weight: 800; font-size: 18px; color: #1f2937; letter-spacing: -.01em; }
.pd-logo span { background: linear-gradient(90deg, #FF6B6B, #4ECDC4);
    -webkit-background-clip: text; background-clip: text; color: transparent; }
.pd-topbar .pd-nav { display: flex; gap: 6px; align-items: center; }
.pd-navlink {
    padding: 8px 14px; border-radius: 999px; text-decoration: none;
    font-size: 13.5px; font-weight: 600; color: #4b5563;
    transition: all .18s ease;
    white-space: nowrap; line-height: 1.2;
}
.pd-navlink:hover { background: rgba(255,107,107,.08); color: #FF6B6B; }
.pd-navlink.is-active {
    background: linear-gradient(135deg, #FF6B6B, #4ECDC4);
    color: #fff; box-shadow: 0 6px 18px rgba(255,107,107,.28);
}
.pd-logout {
    border: 0; cursor: pointer; background: transparent; padding: 8px 14px;
    border-radius: 999px; font-size: 13.5px; font-weight: 600; color: #6b7280;
    white-space: nowrap;
}
.pd-logout:hover { background: rgba(0,0,0,.05); color: #1f2937; }

/* Desktop'ta ikon ve etiket ayni satirda */
.pd-nav-ico { font-size: 15px; line-height: 1; }
.pd-nav-lbl { margin-left: 4px; }
.pd-nav-badge {
    background: #DC2626; color: #fff; font-size: 10px; font-weight: 800;
    padding: 1px 6px; border-radius: 8px; margin-left: 4px;
}

/* ============ MOBILE: BOTTOM TAB BAR ============ */
@media (max-width: 768px) {
    .pd-topbar {
        padding: 14px 16px;
        flex-direction: row; align-items: center; justify-content: space-between;
        z-index: 9999 !important; /* fixed cocugun stacking context'ini yukseltir */
    }
    /* Üst nav'ı alt sabit bara çevir — daima ekranda görünür */
    .pd-topbar .pd-nav,
    .pd-shell .pd-nav {
        position: fixed !important;
        bottom: 0 !important; left: 0 !important; right: 0 !important;
        top: auto !important;
        width: 100% !important;
        z-index: 9999 !important;
        background: #fff !important;
        border-top: 1px solid #f1f5f9;
        box-shadow: 0 -4px 16px rgba(0,0,0,.08);
        display: grid !important; grid-template-columns: repeat(5, 1fr) !important;
        gap: 0 !important; padding: 6px 0 !important;
        padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px)) !important;
        margin: 0 !important;
        transform: translateZ(0); /* iOS Safari icin yeni layer zorla */
        -webkit-backface-visibility: hidden;
    }
    /* Her grid hucresi (form dahil) tam genislik */
    .pd-topbar .pd-nav > *,
    .pd-shell .pd-nav > * {
        width: 100% !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    /* Form icindeki cikis butonu da tam genislikte */
    .pd-topbar .pd-nav > form > .pd-logout,
    .pd-shell .pd-nav > form > .pd-logout {
        width: 100% !important;
    }
    .pd-navlink, .pd-logout {
        display: flex !important; flex-direction: column !important;
        align-items: center !important; justify-content: center !important;
        gap: 3px !important; padding: 6px 2px !important; min-width: 0 !important;
        background: transparent !important; box-shadow: none !important;
        color: #6b7280 !important; border-radius: 12px;
        font-size: 11px; line-height: 1; font-weight: 600;
        position: relative;
        text-align: center;
        box-sizing: border-box;
    }
    .pd-nav-ico { font-size: 22px; line-height: 1; }
    .pd-nav-lbl { margin-left: 0; font-size: 10.5px; line-height: 1.1; }
    .pd-navlink.is-active {
        color: #FF6B6B !important;
        background: linear-gradient(180deg, rgba(255,107,107,.10), rgba(78,205,196,.06)) !important;
    }
    .pd-navlink.is-active .pd-nav-ico { transform: scale(1.1); }
    .pd-nav-badge {
        position: absolute; top: 2px; right: 18%;
        margin: 0; padding: 1px 5px; font-size: 9.5px;
    }

    /* Sayfa içeriğinin altında alt-bar kadar boşluk bırak */
    .pd-container { padding: 0 14px calc(80px + env(safe-area-inset-bottom, 0px)); }
    .pd-hero { padding: 16px !important; }
    .pd-hero h1 { font-size: 20px !important; }

    .pd-subnav {
        display: flex !important;
        gap: 6px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        flex-wrap: nowrap !important;
        margin: 8px -14px 12px !important;
        padding: 6px 14px !important;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        max-width: calc(100% + 28px);
    }
    .pd-subnav::-webkit-scrollbar { display: none; }
    .pd-subnav-item {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        font-size: 12.5px !important;
        padding: 7px 12px !important;
        scroll-snap-align: start;
    }
    .pd-kids { overflow-x: auto; flex-wrap: nowrap !important;
        margin: 0 -14px; padding: 4px 14px;
        scrollbar-width: none;
    }
    .pd-kids::-webkit-scrollbar { display: none; }
    .pd-kid { flex-shrink: 0; }
}

.pd-subnav-item {
    padding: 8px 14px; border-radius: 999px; text-decoration: none;
    font-size: 13px; font-weight: 600; color: #6b7280; background: #fff;
    border: 1px solid #f1f5f9; transition: all .18s ease; white-space: nowrap;
}
.pd-subnav-item:hover { border-color: #4ECDC4; color: #0f766e; }
.pd-subnav-item.is-active {
    background: linear-gradient(135deg, #FF6B6B, #4ECDC4);
    color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(78,205,196,.28);
}

.pd-kpi {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px; margin-bottom: 16px;
}
.pd-kpi-card {
    background: #fff; border-radius: 16px; padding: 16px 18px;
    box-shadow: 0 6px 18px rgba(0,0,0,.04); border: 1px solid #f1f5f9;
}
.pd-kpi-label { font-size: 11.5px; color: #9ca3af; text-transform: uppercase; font-weight: 700; letter-spacing: .04em; }
.pd-kpi-value { font-size: 22px; font-weight: 800; color: #1f2937; margin-top: 6px; }
.pd-kpi-sub { font-size: 12px; color: #6b7280; margin-top: 2px; }

.pd-skill-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pd-skill-label { flex: 0 0 140px; font-size: 13px; font-weight: 600; color: #374151; }
.pd-skill-bar { flex: 1; height: 10px; background: #f1f5f9; border-radius: 999px; overflow: hidden; }
.pd-skill-fill { height: 100%; background: linear-gradient(90deg, #FF6B6B, #4ECDC4); border-radius: 999px; }
.pd-skill-score { flex: 0 0 40px; text-align: right; font-weight: 800; color: #4ECDC4; }

.pd-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.pd-table th, .pd-table td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; text-align: left; }
.pd-table th { font-size: 11.5px; color: #9ca3af; text-transform: uppercase; font-weight: 700; letter-spacing: .04em; }
.pd-table tr:last-child td { border-bottom: 0; }
.pd-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }

.pd-container { max-width: 1100px; margin: 0 auto; padding: 0 22px; position: relative; z-index: 2; }

.pd-hero {
    background: linear-gradient(135deg, #FF6B6B 0%, #FFB88C 45%, #4ECDC4 100%);
    border-radius: 28px; padding: 30px 32px;
    color: #fff; box-shadow: 0 24px 60px rgba(255,107,107,.25);
    display: flex; align-items: center; gap: 22px;
    position: relative; overflow: hidden;
    animation: pdHeroIn .65s cubic-bezier(.16,1,.3,1);
}
@keyframes pdHeroIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.pd-hero::after {
    content: ""; position: absolute; right: -60px; top: -60px;
    width: 240px; height: 240px; border-radius: 50%;
    background: rgba(255,255,255,.14); pointer-events: none;
}
.pd-avatar {
    width: 82px; height: 82px; border-radius: 50%;
    background: rgba(255,255,255,.2); backdrop-filter: blur(8px);
    display: grid; place-items: center; font-size: 36px;
    border: 3px solid rgba(255,255,255,.45);
    animation: vpBounce 3s ease-in-out infinite;
    flex-shrink: 0;
}
.pd-hero-text h1 { margin: 0 0 4px; font-size: 22px; font-weight: 800; }
.pd-hero-text .pd-hello { font-size: 14px; opacity: .95; margin-bottom: 6px; }
.pd-hero-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,.22); padding: 5px 12px;
    border-radius: 999px; font-size: 12px; font-weight: 600;
    backdrop-filter: blur(6px);
}

.pd-stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px; margin-top: -28px; margin-bottom: 20px;
    position: relative; z-index: 3;
}
.pd-stat {
    background: #fff; border-radius: 18px; padding: 18px 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,.06);
    display: flex; align-items: center; gap: 14px;
    transition: transform .2s ease, box-shadow .2s ease;
    animation: pdStatIn .5s both;
}
.pd-stat:nth-child(1) { animation-delay: .05s; }
.pd-stat:nth-child(2) { animation-delay: .12s; }
.pd-stat:nth-child(3) { animation-delay: .19s; }
.pd-stat:nth-child(4) { animation-delay: .26s; }
@keyframes pdStatIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.pd-stat:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(0,0,0,.08); }
.pd-stat .pd-stat-icon {
    width: 46px; height: 46px; border-radius: 14px;
    display: grid; place-items: center; font-size: 22px;
    background: linear-gradient(135deg, #FFE3DA, #D9F6F2);
}
.pd-stat .pd-stat-label { font-size: 11.5px; color: #9ca3af; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.pd-stat .pd-stat-value { font-size: 22px; font-weight: 800; color: #1f2937; line-height: 1; margin-top: 4px; }

.pd-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; margin-top: 24px; }
@media (max-width: 900px) { .pd-grid { grid-template-columns: 1fr; } }

.pd-card {
    background: #fff; border-radius: 22px; padding: 22px 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,.05);
    animation: pdStatIn .6s both;
}
.pd-card h3 {
    margin: 0 0 14px; font-size: 16px; font-weight: 800; color: #1f2937;
    display: flex; align-items: center; gap: 8px;
}
.pd-card h3 .pd-dot {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    background: linear-gradient(135deg, #FF6B6B, #4ECDC4);
}
.pd-empty { color: #9ca3af; font-size: 14px; padding: 16px; text-align: center;
    background: #fafafa; border-radius: 12px; }

.pd-timeline { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; }
.pd-day {
    flex: 0 0 auto; width: 60px; padding: 10px 8px; border-radius: 14px;
    background: #f8f9fb; text-align: center; border: 2px solid transparent;
    transition: all .18s ease;
}
.pd-day.ok { background: linear-gradient(135deg, #C3F0E8, #E6F9F7); color: #059669; border-color: rgba(6,152,96,.2); }
.pd-day.no { background: linear-gradient(135deg, #FFD9D9, #FFEAEA); color: #B91C1C; border-color: rgba(185,28,28,.18); }
.pd-day.warn { background: linear-gradient(135deg, #FFE7C2, #FFF4D9); color: #B45309; border-color: rgba(180,83,9,.2); }
.pd-day .pd-day-num { font-size: 18px; font-weight: 800; line-height: 1; }
.pd-day .pd-day-mon { font-size: 10.5px; opacity: .85; margin-top: 3px; }
.pd-day .pd-day-ico { font-size: 16px; margin-top: 6px; }

.pd-report {
    padding: 14px 16px; border-radius: 16px; margin-bottom: 10px;
    background: linear-gradient(135deg, #FFF6EC 0%, #EAFBF7 100%);
    border-left: 4px solid #4ECDC4;
}
.pd-report .pd-report-date { font-size: 12.5px; color: #6b7280; font-weight: 600; }
.pd-report .pd-report-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.pd-tag {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
    background: #fff; color: #4b5563; border: 1px solid rgba(0,0,0,.06);
}
.pd-tag.mood-happy   { background: #FFF4D9; color: #B45309; }
.pd-tag.mood-neutral { background: #EEF2FF; color: #4338CA; }
.pd-tag.mood-sad     { background: #FFE5E5; color: #B91C1C; }
.pd-report-note { margin-top: 8px; font-size: 13.5px; color: #374151; }

.pd-ann {
    padding: 14px 16px; border-radius: 16px; margin-bottom: 10px;
    background: #fff; border: 1px solid #f1f1f3;
    transition: all .18s ease;
}
.pd-ann:hover { transform: translateX(3px); border-color: #ffd0cd; }
.pd-ann .pd-ann-title { font-weight: 800; color: #1f2937; font-size: 14.5px; }
.pd-ann .pd-ann-meta  { font-size: 11.5px; color: #9ca3af; margin-top: 2px; }
.pd-ann .pd-ann-body  { font-size: 13.5px; color: #4b5563; margin-top: 8px; line-height: 1.5; }

/* Profile page */
.pd-profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 24px; }
@media (max-width: 800px) { .pd-profile-grid { grid-template-columns: 1fr; } }
.pd-field-label { font-size: 12px; color: #9ca3af; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.pd-field-value { font-size: 14.5px; color: #1f2937; font-weight: 600; padding: 10px 0; border-bottom: 1px dashed #eee; }

/* Status badge tones */
.pd-status { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px;
    font-size: 12.5px; font-weight: 700; background: rgba(255,255,255,.22); color: #fff; backdrop-filter: blur(6px); }
.pd-status.tone-ok     { background: rgba(16,185,129,.25); }
.pd-status.tone-warn   { background: rgba(245,158,11,.28); }
.pd-status.tone-danger { background: rgba(239,68,68,.3); }
.pd-status.tone-info   { background: rgba(59,130,246,.3); }
.pd-status.tone-muted  { background: rgba(255,255,255,.18); }

/* Child picker */
.pd-kids { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 8px; }
.pd-kid {
    display: inline-flex; align-items: center; gap: 8px;
    background: #fff; padding: 8px 14px 8px 8px; border-radius: 999px;
    text-decoration: none; color: #4b5563; font-size: 13.5px; font-weight: 600;
    border: 2px solid transparent; box-shadow: 0 6px 16px rgba(0,0,0,.04);
    transition: all .18s ease;
}
.pd-kid:hover { transform: translateY(-1px); }
.pd-kid.is-active {
    border-color: #4ECDC4; color: #0f766e;
    box-shadow: 0 8px 22px rgba(78,205,196,.2);
}
.pd-kid-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg, #FF6B6B, #4ECDC4);
    color: #fff; font-weight: 800; font-size: 12px;
    display: grid; place-items: center;
}

/* Alerts strip */
.pd-alerts { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.pd-alert {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; border-radius: 14px; font-size: 13.5px; font-weight: 600;
    animation: pdStatIn .4s both;
}
.pd-alert .pd-alert-ico { font-size: 20px; }
.pd-alert.tone-danger { background: #FFE5E5; color: #991B1B; border-left: 4px solid #EF4444; }
.pd-alert.tone-warn   { background: #FFF4D9; color: #92400E; border-left: 4px solid #F59E0B; }
.pd-alert.tone-info   { background: #E0F2FE; color: #075985; border-left: 4px solid #3B82F6; }
.pd-alert.tone-ok     { background: #D1FAE5; color: #065F46; border-left: 4px solid #10B981; }

/* Today grid (summary tiles) */
.pd-today {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px; margin-top: 18px;
}
.pd-tile {
    background: #fff; border-radius: 16px; padding: 14px 16px;
    box-shadow: 0 6px 20px rgba(0,0,0,.04);
    display: flex; flex-direction: column; gap: 4px; min-height: 92px;
    border: 1px solid #f3f4f6; position: relative; overflow: hidden;
}
.pd-tile::after {
    content: ""; position: absolute; right: -20px; top: -20px;
    width: 70px; height: 70px; border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,107,107,.08), rgba(78,205,196,.12));
}
.pd-tile-ico { font-size: 22px; line-height: 1; position: relative; z-index: 1; }
.pd-tile-label { font-size: 11.5px; color: #9ca3af; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }
.pd-tile-value { font-size: 17px; color: #1f2937; font-weight: 800; line-height: 1.2; }
.pd-tile-sub { font-size: 11.5px; color: #6b7280; margin-top: 2px; }
.pd-tile.is-muted .pd-tile-value { color: #9ca3af; font-weight: 600; font-size: 14px; font-style: italic; }

/* Full-width sections */
.pd-section {
    background: #fff; border-radius: 22px; padding: 22px 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,.05);
    margin-top: 18px;
    animation: pdStatIn .6s both;
}
.pd-section h3 { margin: 0 0 14px; font-size: 16px; font-weight: 800; color: #1f2937;
    display: flex; align-items: center; gap: 8px; }
.pd-section h3 .pd-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    background: linear-gradient(135deg, #FF6B6B, #4ECDC4); }
.pd-section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.pd-section-head h3 { margin-bottom: 0; }
.pd-section-link { color: #4ECDC4; font-size: 13px; font-weight: 700; text-decoration: none; }

/* Menu card */
.pd-menu { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.pd-menu-item {
    padding: 12px 14px; border-radius: 14px;
    background: linear-gradient(135deg, #FFF6EC 0%, #FFEDE0 100%);
    border-left: 4px solid #F59E0B;
}
.pd-menu-item:nth-child(2) { background: linear-gradient(135deg, #EAFBF7 0%, #D9F6F2 100%); border-left-color: #4ECDC4; }
.pd-menu-item:nth-child(3) { background: linear-gradient(135deg, #F3E8FF 0%, #EDE9FE 100%); border-left-color: #8B5CF6; }
.pd-menu-item .pd-menu-label { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; }
.pd-menu-item .pd-menu-value { font-size: 14px; color: #1f2937; margin-top: 4px; font-weight: 600; }

/* Event item */
.pd-event {
    display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px dashed #eee;
}
.pd-event:last-child { border-bottom: 0; }
.pd-event-date {
    flex: 0 0 54px; width: 54px; text-align: center;
    background: linear-gradient(135deg, #FF6B6B, #4ECDC4); color: #fff;
    padding: 8px 4px; border-radius: 12px;
    font-weight: 800; line-height: 1;
}
.pd-event-date .d { font-size: 20px; }
.pd-event-date .m { font-size: 10px; margin-top: 4px; opacity: .9; }
.pd-event-info .t { font-size: 14.5px; font-weight: 800; color: #1f2937; }
.pd-event-info .sub { font-size: 12.5px; color: #6b7280; margin-top: 2px; }

/* Invoice row */
.pd-inv {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 14px; border-radius: 14px; background: #fafafa;
    margin-bottom: 8px; border-left: 4px solid #9ca3af;
}
.pd-inv.is-overdue { border-left-color: #EF4444; background: #FFF5F5; }
.pd-inv.is-partial { border-left-color: #F59E0B; background: #FFFCEE; }
.pd-inv .t { font-size: 14px; font-weight: 800; color: #1f2937; }
.pd-inv .s { font-size: 12px; color: #6b7280; margin-top: 2px; }
.pd-inv .amt { font-size: 16px; font-weight: 800; color: #1f2937; }

/* Quick actions */
.pd-actions {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px; margin-top: 4px;
}
.pd-action {
    display: flex; flex-direction: column; gap: 6px; align-items: center;
    text-decoration: none; color: #374151; text-align: center;
    padding: 14px 10px; border-radius: 14px;
    background: linear-gradient(135deg, #FFF6EC 0%, #EAFBF7 100%);
    border: 1px solid transparent;
    transition: all .18s ease; font-size: 13px; font-weight: 700;
}
.pd-action:hover { transform: translateY(-2px); border-color: #4ECDC4; box-shadow: 0 8px 20px rgba(78,205,196,.16); }
.pd-action .ico { font-size: 26px; }

/* Doc item */
.pd-doc {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 14px; border-radius: 12px; background: #fafafa;
    margin-bottom: 6px;
}
.pd-doc .t { font-size: 13.5px; font-weight: 700; color: #1f2937; }
.pd-doc .s { font-size: 11.5px; color: #6b7280; }

/* Child selector */
.pd-children { display: flex; gap: 10px; overflow-x: auto; padding: 6px 2px 14px; margin-top: 14px; }
.pd-child-chip {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 10px;
    padding: 10px 14px 10px 10px; border-radius: 999px;
    background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.06);
    color: #4b5563; text-decoration: none; font-weight: 600; font-size: 13.5px;
    transition: all .2s ease; border: 2px solid transparent;
}
.pd-child-chip:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.1); }
.pd-child-chip .pd-child-av {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, #FF6B6B, #4ECDC4);
    color: #fff; font-weight: 800; font-size: 14px;
    display: grid; place-items: center;
}
.pd-child-chip.is-active {
    border-color: #FF6B6B; color: #1f2937;
    background: linear-gradient(135deg, #fff, #FFF2EF);
}

/* Status pill on hero */
.pd-status-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; border-radius: 999px;
    font-size: 12.5px; font-weight: 700; margin-top: 8px;
    background: rgba(255,255,255,.25); color: #fff;
    backdrop-filter: blur(6px);
}
.pd-status-pill.tone-ok      { background: #E8F7F0; color: #047857; }
.pd-status-pill.tone-danger  { background: #FDE4E4; color: #991B1B; }
.pd-status-pill.tone-warn    { background: #FFF0D5; color: #92400E; }
.pd-status-pill.tone-info    { background: #DFF1FF; color: #1E40AF; }
.pd-status-pill.tone-muted   { background: rgba(255,255,255,.28); color: #fff; }
.pd-status-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(255,255,255,.35); animation: pdPulse 1.6s ease-in-out infinite; }
@keyframes pdPulse { 0%,100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.25); opacity: .5; } }

/* Alerts strip */
.pd-alerts { display: flex; flex-direction: column; gap: 8px; margin: 18px 0 6px; }
.pd-alert {
    padding: 12px 16px; border-radius: 14px;
    display: flex; align-items: center; gap: 12px;
    font-size: 13.5px; font-weight: 600;
    animation: pdStatIn .45s both;
}
.pd-alert.tone-danger { background: linear-gradient(90deg, #FEE2E2, #FFEFEF); color: #991B1B; border-left: 4px solid #DC2626; }
.pd-alert.tone-warn   { background: linear-gradient(90deg, #FFF4D9, #FFFBEB); color: #92400E; border-left: 4px solid #F59E0B; }
.pd-alert.tone-info   { background: linear-gradient(90deg, #DFF1FF, #EEF7FF); color: #1E40AF; border-left: 4px solid #3B82F6; }
.pd-alert .pd-alert-ico { font-size: 20px; }

/* Today summary chips */
.pd-today {
    background: linear-gradient(160deg, #FFFAF3 0%, #EAFBF7 100%);
    border-radius: 22px; padding: 22px 24px;
    border: 1px solid rgba(255,107,107,.1);
    box-shadow: 0 10px 30px rgba(0,0,0,.04);
    margin-top: 8px;
}
.pd-today-row {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px; margin-top: 12px;
}
.pd-chip {
    background: #fff; border-radius: 14px; padding: 12px 14px;
    display: flex; flex-direction: column; gap: 3px;
    border: 1px solid rgba(0,0,0,.05);
    transition: transform .18s ease;
}
.pd-chip:hover { transform: translateY(-2px); }
.pd-chip .pd-chip-label { font-size: 11px; color: #9ca3af; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.pd-chip .pd-chip-value { font-size: 14.5px; color: #1f2937; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.pd-chip .pd-chip-sub { font-size: 11.5px; color: #6b7280; }
.pd-teacher-note {
    background: #fff; border-radius: 14px; padding: 14px 16px;
    border-left: 4px solid #4ECDC4; margin-top: 12px;
    font-size: 14px; color: #374151; line-height: 1.5;
}
.pd-teacher-note strong { color: #0F766E; }

/* Quick actions */
.pd-quick {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px; margin-top: 18px;
}
.pd-quick-btn {
    background: #fff; border: 1px solid #f1f1f3; border-radius: 14px;
    padding: 14px 12px; text-align: center; text-decoration: none;
    color: #374151; font-weight: 600; font-size: 12.5px;
    transition: all .2s ease; display: flex; flex-direction: column; gap: 6px; align-items: center;
    cursor: pointer;
}
.pd-quick-btn:hover { transform: translateY(-3px); border-color: #ffd0cd; background: linear-gradient(135deg,#fff,#FFF6EC); }
.pd-quick-btn .pd-quick-ico { font-size: 24px; }

/* Payment / events card variants */
.pd-pay-row, .pd-ev-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 12px; background: #fafafa; border-radius: 12px; margin-bottom: 8px;
    gap: 12px;
}
.pd-pay-row .pd-pay-total { font-weight: 800; font-size: 15px; color: #1f2937; }
.pd-pay-row.tone-danger { background: linear-gradient(135deg, #FEE2E2, #FFEFEF); }
.pd-pay-row.tone-warn   { background: linear-gradient(135deg, #FFF4D9, #FFFBEB); }
.pd-ev-date {
    min-width: 48px; text-align: center; background: #fff;
    border-radius: 10px; padding: 4px 6px; border: 1px solid #eee;
}
.pd-ev-date .pd-ev-d { font-size: 18px; font-weight: 800; color: #FF6B6B; line-height: 1; }
.pd-ev-date .pd-ev-m { font-size: 10.5px; color: #6b7280; font-weight: 700; text-transform: uppercase; }

/* Section title */
.pd-section-title {
    font-size: 13px; color: #6b7280; font-weight: 800; text-transform: uppercase;
    letter-spacing: .06em; margin: 26px 0 12px; display: flex; align-items: center; gap: 8px;
}
.pd-section-title::before {
    content: ""; width: 20px; height: 2px; background: linear-gradient(90deg, #FF6B6B, #4ECDC4);
    border-radius: 2px;
}

/* ===== Toast / Bildirim ===== */
.toast-stack {
    position: fixed; top: 20px; right: 20px; z-index: 9999;
    display: flex; flex-direction: column; gap: 10px;
    max-width: 380px; pointer-events: none;
}
.toast {
    pointer-events: auto;
    background: var(--color-surface);
    border-left: 4px solid var(--color-info);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 14px 18px 14px 16px;
    display: flex; gap: 12px; align-items: flex-start;
    animation: toastIn .28s cubic-bezier(.16,1,.3,1);
    min-width: 280px;
}
.toast.toast-success { border-left-color: var(--color-success); }
.toast.toast-error,
.toast.toast-danger   { border-left-color: var(--color-danger); }
.toast.toast-warning  { border-left-color: var(--color-warning); }
.toast.toast-info     { border-left-color: var(--color-info); }
.toast .icon {
    width: 24px; height: 24px; flex: 0 0 24px; border-radius: 50%;
    display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px;
}
.toast.toast-success .icon { background: var(--color-success); }
.toast.toast-error  .icon,
.toast.toast-danger .icon  { background: var(--color-danger); }
.toast.toast-warning .icon { background: var(--color-warning); }
.toast.toast-info    .icon { background: var(--color-info); }
.toast .body { flex: 1; font-size: 13.5px; color: var(--color-text); line-height: 1.45; }
.toast .body strong { display: block; margin-bottom: 2px; font-size: 13.5px; }
.toast .close {
    background: none; border: 0; cursor: pointer; color: var(--color-muted);
    font-size: 18px; line-height: 1; padding: 0 2px;
}
.toast.out { animation: toastOut .22s ease forwards; }
@keyframes toastIn  { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { to   { opacity: 0; transform: translateX(16px); } }

/* Modal (onay) */
.modal-backdrop {
    position: fixed; inset: 0; background: rgba(17,24,39,.45);
    display: grid; place-items: center; z-index: 9998; padding: 20px;
    animation: fadeIn .18s ease;
}
.modal-card {
    background: var(--color-surface); border-radius: var(--radius-lg);
    width: 100%; max-width: 420px; padding: 24px;
    box-shadow: var(--shadow-lg); animation: popIn .22s cubic-bezier(.16,1,.3,1);
}
.modal-card h3 { margin: 0 0 8px; font-size: 17px; }
.modal-card p  { margin: 0 0 20px; color: var(--color-text-soft); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn  { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }

/* ===== Utility ===== */
.d-flex { display: flex; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.text-center { text-align: center; }
.text-muted { color: var(--color-muted); }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
/* Hamburger toggle — her zaman DOM'da, sadece mobilde gorunur */
.sidebar-toggle {
    display: none;
    background: none; border: 1px solid var(--color-border);
    border-radius: var(--radius); cursor: pointer;
    font-size: 20px; line-height: 1;
    width: 38px; height: 38px;
    align-items: center; justify-content: center;
    color: var(--color-text); flex-shrink: 0;
}
.sidebar-toggle:hover { background: var(--color-primary-50); }

/* Overlay */
.sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(17,24,39,.4);
    z-index: 99;
    opacity: 0; transition: opacity .25s;
}
.sidebar-overlay.visible {
    display: block; opacity: 1;
}

@media (max-width: 900px) {
    .sidebar-toggle { display: inline-flex; }
    .sidebar {
        position: fixed; left: -280px; top: 0; bottom: 0;
        width: 260px; height: 100vh;
        transition: left .28s cubic-bezier(.4,0,.2,1);
        z-index: 200;
        box-shadow: none;
        overflow-y: auto;
    }
    .sidebar.open {
        left: 0;
        box-shadow: 8px 0 24px rgba(0,0,0,.12);
    }
    .app-main { margin-left: 0 !important; }
    .app-content { padding: 16px; }
    .topbar { padding: 12px 16px; gap: 8px; }
    /* Dar ekranda /slug ve kullanici adini gizle; kurum adi kisaltilir, avatar + bell + cikis kalsin */
    .topbar strong { max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .topbar .text-muted { display: none; }
    .topbar .user-chip > div:not(.avatar) { display: none; }
    .topbar .d-flex.gap-3 { gap: 10px !important; }
}

/* ===== Pill (radio/checkbox chip) ===== */
.pill {
    cursor: pointer;
    display: inline-flex; align-items: center;
    padding: 6px 12px; border-radius: 20px;
    border: 1.5px solid #e5e7eb; background: #fff;
    font-size: 13px; line-height: 1.2;
    user-select: none;
    transition: background .12s, border-color .12s, transform .08s, box-shadow .12s;
}
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill:hover { border-color: #cbd5e1; background: #f8fafc; }
.pill:active { transform: scale(.96); }

/* mood (yeşil vurgu) */
.pill-mood.is-active {
    border-color: #4ECDC4; background: #ECFDF5; color: #047857;
    font-weight: 600; box-shadow: 0 0 0 3px rgba(78,205,196,.15);
}
.pill-mood.is-active::after {
    content: " ✓"; color: #047857; font-weight: 700; margin-left: 4px;
}

/* health (kırmızı vurgu) */
.pill-health { padding: 4px 10px; font-size: 12.5px; border-color: #FECACA; }
.pill-health:hover { border-color: #FCA5A5; background: #FEF2F2; }
.pill-health.is-active {
    border-color: #DC2626; background: #FEE2E2; color: #B91C1C;
    font-weight: 600; box-shadow: 0 0 0 3px rgba(220,38,38,.15);
}
.pill-health.is-active::after {
    content: " ✓"; color: #B91C1C; font-weight: 700; margin-left: 4px;
}

/* keyboard fokus */
.pill input:focus-visible + .pill-content,
.pill:focus-within { outline: 2px solid #4ECDC4; outline-offset: 2px; }

/* ===== Student Avatar (paylasilan) ===== */
.student-avatar {
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; overflow: hidden; flex-shrink: 0;
    object-fit: cover; vertical-align: middle;
    background: #f3f4f6; color: #fff; font-weight: 700;
    border: 1px solid rgba(0,0,0,0.05);
    text-transform: uppercase; line-height: 1;
}
.student-avatar.is-fallback {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
}
img.student-avatar { background: #f3f4f6; }
.student-avatar-xs { width: 24px; height: 24px; font-size: 10px; }
.student-avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.student-avatar-md { width: 48px; height: 48px; font-size: 18px; }
.student-avatar-lg { width: 96px; height: 96px; font-size: 36px; border: 2px solid #fff; box-shadow: 0 4px 14px rgba(0,0,0,0.08); }
.student-avatar-xl { width: 128px; height: 128px; font-size: 48px; border: 3px solid #fff; box-shadow: 0 6px 20px rgba(0,0,0,0.10); }
