/* PTSFLEX Platform — statik tasarım (Plan4flex referans) */

:root {
    --bg: #f0f2f7;
    --surface: #ffffff;
    --sidebar: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-active: #ffffff;
    --sidebar-hover: #1e293b;
    --border: #e2e8f0;
    --text: #0f172a;
    --muted: #64748b;
    --accent: #2563eb;
    --accent-soft: #dbeafe;
    --green: #059669;
    --orange: #d97706;
    --red: #dc2626;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    --font: "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
}

/* Login */
.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
}

.login-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 2.5rem;
    width: min(400px, 92vw);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.login-brand { text-align: center; margin-bottom: 1.5rem; }
.login-brand h1 { margin: 0.5rem 0 0; font-size: 1.5rem; }
.login-brand p { color: var(--muted); font-size: 0.9rem; margin: 0.25rem 0 0; }

.logo-mark {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    color: #fff;
    font-weight: 800;
    font-size: 0.75rem;
    border-radius: 10px;
}

.login-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.login-form input {
    display: block;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
    background: #f8fafc;
}

.login-note { font-size: 0.75rem; color: var(--muted); text-align: center; margin-top: 1rem; }

/* Lang switch */
.lang-switch {
    display: flex;
    gap: 0.2rem;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 0.2rem;
}

.lang-switch--login { justify-content: center; margin-bottom: 1.25rem; }

.lang-switch a {
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--muted);
}

.lang-switch a.is-active { background: var(--accent); color: #fff; }

.topbar .lang-switch { background: var(--surface); border: 1px solid var(--border); }

/* App shell */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 260px;
    background: var(--sidebar);
    color: var(--sidebar-text);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1rem;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-nav { padding: 0.75rem 0; flex: 1; }

.nav-group { margin-bottom: 0.5rem; }

.nav-group-label {
    display: block;
    padding: 0.5rem 1rem 0.25rem;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
}

.sidebar-nav ul { list-style: none; margin: 0; padding: 0; }

.sidebar-nav a {
    display: block;
    padding: 0.45rem 1rem;
    margin: 0 0.5rem;
    border-radius: 6px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.875rem;
}

.sidebar-nav a:hover { background: var(--sidebar-hover); color: #e2e8f0; }
.sidebar-nav a.is-active { background: var(--accent); color: #fff; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.topbar-user { font-size: 0.85rem; color: var(--muted); }
.topbar-user a { color: var(--accent); margin-left: 0.75rem; }

.content { padding: 1.5rem; flex: 1; overflow-y: auto; }

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.page-header h1 { margin: 0; font-size: 1.5rem; letter-spacing: -0.02em; }
.subtitle { color: var(--muted); margin: 0.25rem 0 0; font-size: 0.95rem; }
.lead { color: var(--muted); max-width: 720px; margin-bottom: 1.5rem; }

.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--accent-soft);
    color: var(--accent);
}

.badge--design { background: #fef3c7; color: #92400e; }

.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow);
}

.stat-value { display: block; font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; }
.stat-label { font-size: 0.8rem; color: var(--muted); }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.card h3 { margin: 0 0 0.5rem; font-size: 1rem; }
.card p { margin: 0; font-size: 0.875rem; color: var(--muted); }
.card .badge { margin-top: 0.75rem; }

.table-wrap {
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
th { background: #f8fafc; font-weight: 600; color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; }
tr:last-child td { border-bottom: none; }

.btn {
    display: inline-block;
    padding: 0.65rem 1.25rem;
    border: none;
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.btn--primary { background: var(--accent); color: #fff; width: 100%; }

/* Chat */
.chat-panel, .ai-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    max-width: 640px;
    box-shadow: var(--shadow);
}

.chat-msg, .ai-bubble { margin-bottom: 1rem; padding: 0.75rem 1rem; border-radius: 10px; max-width: 85%; }
.chat-msg--other, .ai-bubble--assistant { background: #f1f5f9; margin-right: auto; }
.chat-msg--user, .ai-bubble--user { background: var(--accent-soft); margin-left: auto; }
.chat-msg strong, .ai-bubble strong { font-size: 0.75rem; color: var(--muted); }
.chat-msg time { font-size: 0.7rem; color: var(--muted); }

.chat-input-mock input, .ai-input-mock input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
    font: inherit;
}

@media (max-width: 900px) {
    .app-shell { flex-direction: column; }
    .sidebar { width: 100%; max-height: 40vh; }
}
