/* =====================================================
   LMY Frontend Panel CSS — .lmy-frontend-panel scope
   ===================================================== */
*, *::before, *::after { box-sizing: border-box; }

.lmy-frontend-panel {
    min-height: 100vh;
    background: #f1f5f9;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    color: #1e293b;
    display: flex;
    flex-direction: column;
}

/* ── Layout ── */
.lmy-panel-layout { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.lmy-sidebar {
    width: 260px;
    min-width: 260px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    overflow-y: auto;
    z-index: 200;
    transition: transform .3s ease;
}
.lmy-sidebar-logo {
    padding: 24px 20px 18px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.lmy-sidebar-logo h2 { color: #f8fafc; font-size: 1.15rem; margin: 0 0 4px; font-weight: 700; }
.lmy-sidebar-logo small { color: #64748b; font-size: .78rem; }
.lmy-sidebar-user {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    display: flex;
    align-items: center;
    gap: 12px;
}
.lmy-user-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
    font-weight: 700;
    flex-shrink: 0;
}
.lmy-user-name { font-size: .9rem; font-weight: 600; color: #f1f5f9; line-height: 1.2; }
.lmy-user-role { font-size: .75rem; color: #64748b; }

/* Nav */
.lmy-nav-section { padding: 14px 0 4px; }
.lmy-nav-title { padding: 0 20px 8px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #475569; }
.lmy-nav-items { display: flex; flex-direction: column; }
.lmy-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: #94a3b8;
    text-decoration: none;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: .9rem;
    transition: all .2s;
    border-left: 3px solid transparent;
}
.lmy-nav-item:hover { color: #f1f5f9; background: rgba(255,255,255,.05); border-left-color: #667eea; }
.lmy-nav-item.active { color: #fff; background: rgba(102,126,234,.2); border-left-color: #667eea; }
.lmy-nav-icon { width: 20px; text-align: center; font-size: 1rem; flex-shrink: 0; }
.lmy-nav-text { flex: 1; }
.lmy-nav-arrow { font-size: .8rem; color: #475569; }

/* Sidebar footer */
.lmy-sidebar-footer { margin-top: auto; padding: 16px 20px; border-top: 1px solid rgba(255,255,255,.06); }
.lmy-logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    text-decoration: none;
    font-size: .88rem;
    transition: color .2s;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.lmy-logout-btn:hover { color: #ef4444; }

/* ── Main Content ── */
.lmy-main-content {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.lmy-topbar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.lmy-topbar-title { font-size: 1.15rem; font-weight: 700; color: #1e293b; margin: 0; }
.lmy-topbar-actions { display: flex; align-items: center; gap: 10px; }

.lmy-content-area { padding: 28px; flex: 1; }

/* ── Hoş Geldin ekranı ── */
.lmy-welcome { text-align: center; padding: 40px 20px; }
.lmy-welcome h2 { font-size: 1.6rem; color: #1e293b; margin-bottom: 8px; }
.lmy-welcome p { color: #64748b; margin-bottom: 32px; }
.lmy-module-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; max-width: 900px; margin: 0 auto; }
.lmy-module-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all .25s;
    text-align: center;
}
.lmy-module-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.12); border-color: #667eea; }
.lmy-module-card .lmy-module-icon { width: 60px; height: 60px; border-radius: 14px; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; }
.lmy-module-card h4 { margin: 0 0 6px; font-size: 1rem; font-weight: 700; color: #1e293b; }
.lmy-module-card p { margin: 0; font-size: .82rem; color: #64748b; }

/* ── Yükleme göstergesi ── */
.lmy-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    flex-direction: column;
    gap: 16px;
    color: #64748b;
}
.lmy-loading-spinner {
    width: 40px; height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: lmySpin .7s linear infinite;
}
@keyframes lmySpin { to { transform: rotate(360deg); } }

/* ── Panel tipi badge ── */
.lmy-panel-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 600;
}
.lmy-panel-calisan .lmy-panel-type-badge { background: #dbeafe; color: #1e40af; }
.lmy-panel-musteri .lmy-panel-type-badge { background: #d1fae5; color: #065f46; }
.lmy-panel-genel .lmy-panel-type-badge   { background: #f3e8ff; color: #6d28d9; }

/* ── Overlay (mobil) ── */
.lmy-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 150;
}

/* ── Hamburger ── */
.lmy-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: #475569;
    font-size: 1.4rem;
}

/* ── Giriş ekranı ── */
.lmy-login-required { display: flex; align-items: center; justify-content: center; min-height: 50vh; padding: 40px; }
.lmy-login-card { background: #fff; border-radius: 14px; padding: 40px 32px; text-align: center; box-shadow: 0 8px 32px rgba(0,0,0,.1); max-width: 380px; width: 100%; }
.lmy-login-icon { font-size: 3rem; margin-bottom: 16px; }
.lmy-login-card h3 { font-size: 1.4rem; margin-bottom: 8px; color: #1e293b; }
.lmy-login-card p { color: #64748b; margin-bottom: 24px; }

/* Butonlar (frontend) */
.lmy-btn { display: inline-flex; align-items: center; gap: 7px; padding: 10px 20px; border-radius: 8px; border: none; font-size: .9rem; font-weight: 500; cursor: pointer; text-decoration: none; transition: all .2s; }
.lmy-btn-primary { background: #667eea; color: #fff !important; }
.lmy-btn-primary:hover { background: #5468d4; color: #fff !important; transform: translateY(-1px); }
.lmy-btn-success { background: #10b981; color: #fff !important; }
.lmy-btn-success:hover { background: #059669; }
.lmy-btn-danger { background: #ef4444; color: #fff !important; }
.lmy-btn-outline { background: transparent; border: 1px solid #d1d5db; color: #374151 !important; }
.lmy-btn-outline:hover { background: #f8fafc; }
.lmy-btn-sm { padding: 5px 12px; font-size: .82rem; }

/* Alert / Mesaj */
.lmy-alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: .9rem; }
.lmy-alert-success { background: #ecfdf5; border-left: 4px solid #10b981; color: #065f46; }
.lmy-alert-error   { background: #fef2f2; border-left: 4px solid #ef4444; color: #991b1b; }
.lmy-alert-warning { background: #fffbeb; border-left: 4px solid #f59e0b; color: #92400e; }
.lmy-alert-info    { background: #eff6ff; border-left: 4px solid #3b82f6; color: #1e40af; }
.lmy-no-access { text-align: center; padding: 40px; color: #64748b; }

/* Tablo */
.lmy-table { width: 100%; border-collapse: collapse; font-size: .9rem; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.lmy-table th { background: #f8fafc; color: #374151; font-weight: 600; padding: 12px 16px; text-align: left; border-bottom: 2px solid #e2e8f0; }
.lmy-table td { padding: 11px 16px; border-bottom: 1px solid #f1f5f9; color: #1e293b; vertical-align: middle; }
.lmy-table tbody tr:hover { background: #f8fafc; }
.lmy-table-responsive { overflow-x: auto; }

/* Form */
.lmy-form-group { margin-bottom: 18px; }
.lmy-form-label { display: block; margin-bottom: 5px; font-weight: 600; color: #374151; font-size: .9rem; }
.lmy-form-label .required { color: #ef4444; }
.lmy-form-control { width: 100%; padding: 10px 14px; border: 1px solid #d1d5db; border-radius: 8px; font-size: .92rem; color: #1e293b; background: #fff; transition: border-color .2s, box-shadow .2s; }
.lmy-form-control:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,.12); }
select.lmy-form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M0 0l6 8 6-8z' fill='%236b7280'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }

/* Badge */
.lmy-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: .75rem; font-weight: 600; }
.lmy-badge-success   { background: #d1fae5; color: #065f46; }
.lmy-badge-warning   { background: #fef3c7; color: #92400e; }
.lmy-badge-danger    { background: #fee2e2; color: #991b1b; }
.lmy-badge-info      { background: #dbeafe; color: #1e40af; }
.lmy-badge-secondary { background: #f1f5f9; color: #475569; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .lmy-sidebar { transform: translateX(-100%); }
    .lmy-sidebar.open { transform: translateX(0); }
    .lmy-overlay.show { display: block; }
    .lmy-main-content { margin-left: 0; }
    .lmy-hamburger { display: flex; }
    .lmy-content-area { padding: 16px; }
    .lmy-module-cards { grid-template-columns: 1fr 1fr; }
    .lmy-welcome { padding: 20px 10px; }
}
@media (max-width: 480px) {
    .lmy-module-cards { grid-template-columns: 1fr; }
    .lmy-table th, .lmy-table td { padding: 8px 10px; font-size: .82rem; }
}
