* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f4f6f9;
    color: #1f2937;
}

/* ---------- Login page ---------- */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #f4f6f9;
    padding: 24px;
}
.login-wrapper {
    display: flex;
    width: 100%;
    max-width: 900px;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,.15);
}
.login-illustration {
    flex: 1 1 45%;
    position: relative;
    background: linear-gradient(135deg, #0f766e, #134e4a);
    min-height: 480px;
    display: flex;
    align-items: flex-end;
}
.illustration-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.illustration-caption {
    position: relative; z-index: 1; color: #fff; padding: 24px 28px;
}
.login-logo-img { max-height: 56px; max-width: 160px; margin-bottom: 10px; background: #fff; border-radius: 8px; padding: 4px; }
.illustration-caption h2 { margin: 0; font-size: 32px; letter-spacing: 1px; }
.illustration-caption p { margin: 4px 0 0; font-size: 14px; opacity: .9; }

.login-box {
    flex: 1 1 55%;
    background: #fff;
    padding: 40px;
}
.login-box h1 { font-size: 20px; margin: 0 0 4px; }
.login-box .subtitle { color: #6b7280; font-size: 13px; margin-bottom: 16px; }
.login-box label { display: block; font-size: 13px; margin-bottom: 4px; margin-top: 12px; }
.login-box input, .login-box select {
    width: 100%; padding: 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px;
}
.password-field { position: relative; }
.password-field input { padding-right: 40px; }
.toggle-password {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; font-size: 16px; padding: 4px;
}
.btn-login {
    width: 100%; margin-top: 20px; padding: 10px; background: #0f766e; color: #fff;
    border: none; border-radius: 6px; font-size: 14px; cursor: pointer;
}
.btn-login:hover { background: #0d5f58; }
.level-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.level-tabs a {
    flex: 1; text-align: center; padding: 6px 8px; border-radius: 6px; text-decoration: none;
    font-size: 12px; color: #374151; background: #f3f4f6;
}
.level-tabs a.active, .level-tabs a:hover { background: #0f766e; color: #fff; }
.login-links { text-align: center; margin-top: 14px; font-size: 13px; }
.login-links a { color: #0f766e; }
.login-disclaimer {
    text-align: center; font-size: 11px; color: #9ca3af; margin-top: 20px; line-height: 1.6;
}
.alert { padding: 10px; border-radius: 6px; font-size: 13px; margin-top: 12px; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-success { background: #dcfce7; color: #166534; }

@media (max-width: 720px) {
    .login-wrapper { flex-direction: column; }
    .login-illustration { min-height: 160px; }
}

/* ---------- App shell ---------- */
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
    width: 230px; background: #111827; color: #e5e7eb; padding: 20px 0; flex-shrink: 0;
}
.sidebar-brand { font-weight: 700; font-size: 18px; padding: 0 20px 20px; }
.app-sidebar nav { display: flex; flex-direction: column; }
.app-sidebar a {
    color: #d1d5db; text-decoration: none; padding: 10px 20px; font-size: 14px;
}
.app-sidebar a:hover, .app-sidebar a.active { background: #1f2937; color: #fff; }
.nav-group-title {
    font-size: 11px; text-transform: uppercase; color: #6b7280; padding: 14px 20px 4px;
}

.app-main { flex: 1; display: flex; flex-direction: column; }
.app-topbar {
    background: #fff; padding: 14px 24px; display: flex; align-items: center;
    justify-content: space-between; border-bottom: 1px solid #e5e7eb;
}
.app-topbar h1 { font-size: 18px; margin: 0; }
.topbar-right { display: flex; align-items: center; gap: 16px; font-size: 13px; }
.level-switch a { margin: 0 4px; padding: 4px 8px; border-radius: 4px; text-decoration: none; color: #374151; }
.level-switch a.active, .level-switch a:hover { background: #0f766e; color: #fff; }
.badge-level { background: #e5e7eb; padding: 4px 10px; border-radius: 4px; }
.btn-logout { color: #b91c1c; text-decoration: none; }

.app-content { padding: 24px; }

.marquee-bar {
    background: #fef3c7; color: #92400e; overflow: hidden; white-space: nowrap;
    padding: 6px 0; font-size: 13px; border-bottom: 1px solid #fde68a;
}
.marquee-track {
    display: inline-block; padding-left: 100%; animation: marquee-scroll 18s linear infinite;
}
@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* ---------- Dashboard ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat-card { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.stat-label { display: block; font-size: 13px; color: #6b7280; }
.stat-value { display: block; font-size: 28px; font-weight: 700; margin-top: 6px; }
.muted { color: #6b7280; font-size: 13px; }

/* ---------- Tables & forms ---------- */
.data-table { width: 100%; border-collapse: collapse; background: #fff; }
.data-table th, .data-table td { padding: 10px 12px; border-bottom: 1px solid #e5e7eb; font-size: 14px; text-align: left; }
.data-table th { background: #f9fafb; }
.toolbar { margin-bottom: 16px; display: flex; justify-content: space-between; }
.btn { display: inline-block; padding: 8px 14px; border-radius: 6px; text-decoration: none; font-size: 13px; border: none; cursor: pointer; }
.btn-primary { background: #0f766e; color: #fff; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-secondary { background: #e5e7eb; color: #111827; }
.form-card { background: #fff; padding: 20px; border-radius: 10px; max-width: 480px; }
.form-card label { display: block; font-size: 13px; margin: 10px 0 4px; }
.form-card input, .form-card select, .form-card textarea {
    width: 100%; padding: 8px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px;
}

/* ---------- Sampul Rapor ---------- */
.sampul-sheet {
    background: #fff; padding: 40px; max-width: 640px; text-align: center;
    border: 3px double #0f766e; min-height: 900px;
}
.sampul-logo { max-height: 80px; margin-bottom: 10px; }
.sampul-kop { font-size: 15px; margin: 0 0 30px; letter-spacing: .5px; }
.sampul-title { font-size: 20px; line-height: 1.5; margin: 0 0 40px; }
.sampul-photo-box {
    width: 120px; height: 160px; border: 1px solid #333; margin: 0 auto 40px;
    display: flex; align-items: center; justify-content: center; font-size: 12px; color: #6b7280;
}
.sampul-identity { margin: 0 auto; font-size: 14px; text-align: left; border-collapse: collapse; }
.sampul-identity td { padding: 3px 6px; vertical-align: top; }
.sampul-identity td:first-child { white-space: nowrap; }

/* ---------- Print / Rapor ---------- */
@media print {
    .app-sidebar, .app-topbar, .no-print { display: none !important; }
    .app-content { padding: 0; }
}
