* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container { max-width: 1200px; margin: 0 auto; padding: 20px; flex: 1; }

/* Navbar */
.navbar {
    background: #1a1a2e;
    color: #fff;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.nav-brand a { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.nav-menu { display: flex; gap: 16px; flex: 1; align-items: center; }
.nav-menu a { color: #ccc; text-decoration: none; font-size: 0.9rem; }
.nav-menu a:hover { color: #fff; }
.nav-user { display: flex; align-items: center; gap: 12px; font-size: 0.85rem; color: #aaa; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
    color: #333;
    background: #e0e0e0;
    transition: background 0.2s;
}
.btn:hover { background: #d0d0d0; }
.btn-primary { background: #0066cc; color: #fff; }
.btn-primary:hover { background: #0055aa; }
.btn-success { background: #28a745; color: #fff; }
.btn-success:hover { background: #218838; }
.btn-danger { background: #dc3545; color: #fff; }
.btn-danger:hover { background: #c82333; }
.btn-sm { padding: 5px 10px; font-size: 0.8rem; }
.btn-block { display: block; width: 100%; text-align: center; }

/* Cards */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 24px;
    margin-bottom: 20px;
}
.card h2 { margin-bottom: 16px; font-size: 1.2rem; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.9rem; }
.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}
.form-control:focus { border-color: #0066cc; outline: none; }
textarea.form-control { min-height: 100px; resize: vertical; }

/* Tables */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eee; font-size: 0.9rem; }
th { background: #f8f8f8; font-weight: 600; }
tr:hover { background: #fafafa; }

/* Status badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
}
.badge-yeni { background: #17a2b8; }
.badge-fabrika_incelemede { background: #ffc107; color: #333; }
.badge-musteri_yanit_bekleniyor { background: #fd7e14; }
.badge-fabrika_tekrar_incelemede { background: #6f42c1; }
.badge-onaylandi_degisim { background: #28a745; }
.badge-onaylandi_iscilik { background: #20c997; }
.badge-kapandi { background: #6c757d; }

/* Timeline */
.timeline { border-left: 3px solid #ddd; padding-left: 20px; margin: 20px 0; }
.timeline-item { position: relative; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #f0f0f0; }
.timeline-item:last-child { border-bottom: none; }
.timeline-item::before {
    content: '';
    position: absolute;
    left: -27px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #0066cc;
}
.timeline-meta { font-size: 0.8rem; color: #888; margin-bottom: 4px; }
.timeline-content { font-size: 0.9rem; }

/* Login page */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #1a1a2e;
}
.login-box {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.login-box h1 { text-align: center; margin-bottom: 8px; font-size: 1.4rem; }
.login-box p.subtitle { text-align: center; color: #888; margin-bottom: 24px; font-size: 0.9rem; }

/* Alert */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}
.alert-danger { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }

/* Dashboard stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.stat-card .stat-number { font-size: 2rem; font-weight: 700; color: #0066cc; }
.stat-card .stat-label { font-size: 0.85rem; color: #888; margin-top: 4px; }

/* Footer */
.footer {
    text-align: center;
    padding: 16px;
    color: #999;
    font-size: 0.8rem;
    border-top: 1px solid #eee;
}

/* Grid helpers */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

@media (max-width: 768px) {
    .navbar { flex-direction: column; gap: 8px; }
    .grid-2 { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}
