/* style.css - Temel Değişkenler, Reset, Genel Layout, Header ve Footer */
:root{
 --primary:#0ea5e9; --primary-dark:#0284c7; --primary-light:#bae6fd;
 --secondary:#06b6d4; --secondary-dark:#0891b2;
 --success:#10b981; --success-light:#a7f3d0;
 --warning:#f59e0b; --warning-light:#fde68a;
 --danger:#ef4444; --danger-light:#fecaca;
 --text:#1e293b; --text-muted:#64748b; --text-on-primary: #ffffff;
 --surface:#ffffff; --surface-light:#f8fafc; --surface-border:#e2e8f0; --border:#cbd5e1;
 --shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06);
 --shadow-lg:0 10px 25px -3px rgba(14,165,233,.1),0 4px 6px -2px rgba(14,165,233,.05);
 --radius:12px; --transition:all .3s cubic-bezier(.4,0,.2,1);
 --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* === TEMEL RESET === */
* {
    margin: 0; padding: 0; box-sizing: border-box;
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
body {
    font-family: var(--font-sans); background-color: var(--background);
    color: var(--text); line-height: 1.6; font-size: 16px;
}

/* === GENEL LAYOUT === */
.container {
    width: 100%; max-width: 1280px; margin-left: auto; margin-right: auto;
    padding-left: 1.5rem; padding-right: 1.5rem;
}
.site-header {
    background-color: var(--surface); border-bottom: 1px solid var(--border);
    padding-top: 1rem; padding-bottom: 1rem; box-shadow: var(--shadow);
    position: sticky; top: 0; z-index: 50;
}
.header-content { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--text); }
.logo i { color: var(--primary); font-size: 24px; }
.logo-text { font-weight: 700; font-size: 1.25rem; }
.nav-menu { display: flex; align-items: center; gap: 2rem; }
.nav-list { display: flex; gap: 1.5rem; list-style: none; }
.nav-list a { text-decoration: none; color: var(--text-muted); font-weight: 500; transition: color 0.2s ease; padding: 0.5rem 0; }
.nav-list a:hover,
.nav-list a.active { color: var(--primary); border-bottom: 2px solid var(--primary); }
.user-menu { display: flex; align-items: center; gap: 0.75rem; }
/* Yalnızca üst menüdeki kullanıcı adı. Panel karşılama kartındaki .user-info bloğu
   bu kuraldan etkilenmemelidir; aksi halde ad, e-posta ve tarih yan yana sıkışır. */
.user-menu > .user-info { display: flex; align-items: center; gap: 0.5rem; color: var(--text); font-weight: 500; }
.menu-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; }
.main-content { padding-top: 2.5rem; padding-bottom: 4rem; }

/* === GRID === */
.grid { display: grid; gap: 1.5rem; }
.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-span-2 { grid-column: span 2 / span 2; }

/* === KARTLAR === */
.card { 
    background-color: var(--surface); border-radius: var(--radius, 0.75rem); box-shadow: var(--shadow); 
    overflow: hidden; padding: 1.5rem; border: 1px solid var(--surface-border, #e5e7eb); 
}
.card-header { padding-bottom: 1rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.card-title { font-size: 1.25rem; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 0.5rem; }
.card-subtitle { font-size: 0.875rem; color: var(--text-muted); margin-top: 0.25rem; }

/* === GENEL FORMLAR === */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-weight: 500; margin-bottom: 0.5rem; font-size: 0.875rem; color: var(--text); }
.form-label.required::after { content: '*'; color: var(--danger); margin-left: 0.25rem; }
.form-control, .form-select { 
    display: block; width: 100%; padding: 0.75rem 1rem; font-size: 1rem; line-height: 1.5; color: var(--text); 
    background-color: var(--surface); background-clip: padding-box; border: 1px solid var(--border); 
    border-radius: var(--radius); transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; 
}
.form-control:focus, .form-select:focus { 
    color: var(--text); background-color: var(--surface); border-color: var(--primary); outline: 0; 
    box-shadow: 0 0 0 0.2rem rgba(14, 165, 233, 0.25); 
}
textarea.form-control { min-height: calc(1.5em + 1.5rem + 2px); resize: vertical; }
.form-control[readonly] { background-color: #e9ecef; opacity: 1; }
.form-text { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.3rem; }

/* Checkbox */
.form-checkbox { margin-bottom: 0.75rem; }

.password-toggle { position: relative; }
.toggle-password { position: absolute; top: 50%; right: 0.75rem; transform: translateY(-50%); 
    background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 0.5rem; 
}

/* === GENEL BUTONLAR === */
.btn { 
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; 
    border-radius: var(--radius); border: none; cursor: pointer; text-decoration: none; font-weight: 600; 
    font-size: 14px; transition: var(--transition); position: relative; overflow: hidden; 
}
.btn-primary{background:var(--primary);color:#fff}
.btn-primary:hover{background:var(--primary-dark);transform:translateY(-1px);box-shadow:var(--shadow-lg)}
.btn-success{background:var(--success);color:#fff}
.btn-success:hover{background:#0da271;transform:translateY(-1px);box-shadow:var(--shadow-lg)}
.btn-outline{background:transparent;color:var(--text);border:1px solid var(--border)}
.btn-outline:hover{background:var(--surface-light);border-color:var(--primary);color:var(--primary);transform:translateY(-1px)}
.btn-sm{padding:8px 16px;font-size:13px; border-radius: 8px;}
.btn-lg{padding:12px 24px;font-size:16px}
.btn:disabled, .btn.disabled { opacity: 0.65; cursor: not-allowed; box-shadow: none; transform: none; }

/* === ALERT (Bildirimler) === */
.alert { 
    position: relative; padding: 1rem 1.25rem; margin-bottom: 1.5rem; border: 1px solid transparent; 
    border-radius: var(--radius); display: flex; align-items: center; gap: 0.75rem; font-size: 0.9rem; 
}
.alert i { font-size: 1.25rem; }
.alert-success { color: #0f5132; background-color: #d1e7dd; border-color: #badbcc; }
.alert-danger, .alert-error { color: #842029; background-color: #f8d7da; border-color: #f5c2c7; }
.alert-warning { color: #664d03; background-color: #fff3cd; border-color: #ffecb5; }
.alert-info { color: #055160; background-color: #cff4fc; border-color: #b6effb; }

/* === FOOTER (Aynı isim ve yapıyı koru) === */
.site-footer { background-color: #111827; color: #d1d5db; padding-top: 3rem; padding-bottom: 3rem; margin-top: 4rem; }
.footer-content { display: flex; flex-direction: column; gap: 2.5rem; }
.footer-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.5rem; }
.footer-brand { display: flex; align-items: center; gap: 1rem; }
.footer-brand .brand-logo { width: 50px; height: 50px; background-color: rgba(255, 255, 255, 0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 1.5rem; }
.footer-brand h3 { font-size: 1.25rem; font-weight: 600; color: #fff; margin-bottom: 0.25rem; }
.footer-brand p { font-size: 0.875rem; color: #9ca3af; } 
.footer-social { display: flex; gap: 1rem; }
.social-link { color: #9ca3af; font-size: 1.25rem; transition: color 0.2s ease, transform 0.2s ease; }
.social-link:hover { color: #fff; transform: translateY(-2px); }
.footer-bottom { border-top: 1px solid #374151; padding-top: 2rem; }
.footer-copyright { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; font-size: 0.875rem; color: #9ca3af; }
.copyright-text { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.designer-link { color: #fff; font-weight: 500; text-decoration: none; transition: color 0.2s ease; }
.designer-link:hover { color: var(--primary); }
.copyright-year { text-align: right; }

/* === RESPONSIVE (Global) === */
@media (max-width: 768px) {
    /* Genel Responsive Düzenlemeler */
    /* Mobil menü: sağdan içeri kayan panel */
    .nav-menu {
        display: flex; flex-direction: column; gap: 0;
        position: fixed; top: 0; right: 0; bottom: 0;
        width: min(82vw, 320px); max-width: 100%;
        background: var(--surface); box-shadow: -16px 0 42px rgba(15, 23, 42, .18);
        padding: 0 0 24px; margin: 0;
        transform: translateX(100%); transition: transform .28s cubic-bezier(.4, 0, .2, 1);
        z-index: 1300; overflow-y: auto; overscroll-behavior: contain;
    }
    .nav-menu.active { transform: translateX(0); }
    .nav-menu{text-align:left}
    .nav-menu::before {
        content: "Menü"; display: block; padding: 18px 18px 12px; text-align: left;
        font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
        color: var(--text-light); border-bottom: 1px solid var(--border);
    }
    .nav-list { flex-direction: column; gap: 0; width: 100%; margin: 0; padding: 0; list-style: none; }
    .nav-list li { width: 100%; }
    .nav-list a {
        display: block; width: 100%; padding: 0.95rem 1.15rem;
        border-bottom: 1px solid #f1f5f7; font-weight: 600; font-size: .95rem;
        color: var(--text); text-decoration: none;
    }
    .nav-list a:hover { background: #f7fafb; color: var(--primary); }
    .nav-list a.active { border-left: 3px solid var(--primary); background-color: #f4f8fa; color: var(--primary); border-bottom: 1px solid #f1f5f7; }
    .user-menu { width: 100%; padding: 1rem 1.25rem 0; border-top: 0; flex-direction: column; gap: 0.6rem; align-items: stretch; }
    .user-menu > .user-info { justify-content: center; padding: .6rem .75rem; border-radius: 8px; background: #f4f8fa; font-size: .9rem; }
    .user-menu .btn { width: 100%; justify-content: center; }

    /* Menü açıkken sayfayı karartan perde */
    .nav-perde {
        position: fixed; inset: 0; background: rgba(15, 23, 42, .5);
        opacity: 0; visibility: hidden; transition: opacity .28s, visibility .28s; z-index: 1290;
    }
    .nav-perde.active { opacity: 1; visibility: visible; }
    body.menu-acik { overflow: hidden; }

    /* Menü ve hamburger düğmesi perdenin üstünde kalmalı (başlık kendi katmanını yaratır). */
    .site-header { z-index: 1300; }
    .menu-toggle { display: block; position: relative; z-index: 1310; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .footer-top, .footer-copyright { flex-direction: column; align-items: center; text-align: center; }
}

@media (max-width: 480px) {
    .container { padding-left: 1rem; padding-right: 1rem; }
}

/* === "Telefona ekle" bandı (PWA) === */
.pwa-bant{
    position:fixed;left:12px;right:12px;bottom:12px;z-index:9000;
    display:flex;align-items:center;gap:12px;
    padding:12px 14px;border-radius:14px;
    background:#ffffff;border:1px solid #dce9e7;
    box-shadow:0 12px 34px rgba(0,73,78,.16);
    transform:translateY(140%);opacity:0;transition:transform .32s ease,opacity .32s ease;
    max-width:520px;margin:0 auto;
    padding-bottom:calc(12px + env(safe-area-inset-bottom,0px));
}
.pwa-bant.gorunur{transform:translateY(0);opacity:1}
.pwa-ikon{width:42px;height:42px;border-radius:11px;flex:0 0 auto;object-fit:contain;background:#fff;border:1px solid #eef3f2}
.pwa-yazi{flex:1 1 auto;min-width:0;line-height:1.35}
.pwa-yazi b{display:block;font-size:14px;font-weight:700;color:#163b43}
.pwa-yazi span{display:block;margin-top:2px;font-size:12px;color:#5f777d}
.pwa-dugme{
    flex:0 0 auto;border:0;border-radius:8px;padding:10px 16px;cursor:pointer;
    background:#007f83;color:#fff;font:700 13px inherit;
}
.pwa-dugme:hover{background:#00696d}
.pwa-kapat{
    flex:0 0 auto;border:0;background:transparent;cursor:pointer;
    font-size:20px;line-height:1;color:#8ba3a8;padding:2px 4px;
}
.pwa-kapat:hover{color:#4f6970}
@media(max-width:420px){
    .pwa-yazi b{font-size:13px}
    .pwa-yazi span{font-size:11.5px}
    .pwa-dugme{padding:9px 13px;font-size:12.5px}
    .pwa-ikon{width:36px;height:36px}
}
