* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
       background: #f4f6f8; color: #1f2937; }
h1, h3 { color: #003a70; }
small.muted, .muted { color: #6b7280; }

.layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: #003a70; color: #fff; padding: 1rem; }
.sidebar .brand { margin-bottom: 1rem; }
.sidebar .brand strong { display: block; font-size: 1.1rem; }
.sidebar .brand small { color: #c0d4ec; }
.sidebar hr { border-color: #1d4f86; margin: .8rem 0; }
.sidebar small.muted { color: #c0d4ec; display: block; margin: .25rem 0; }

.nav { display: flex; flex-direction: column; gap: .25rem; }
.nav .nav-link { color: #c0d4ec; text-decoration: none; padding: .4rem .6rem;
                 border-radius: 4px; }
.nav .nav-link:hover { background: #1d4f86; color: #fff; }
.nav .nav-link.active { background: #ed1c24; color: #fff; }

.main { padding: 1.5rem 2rem; }
.content { max-width: 1200px; }

.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin: .5rem 0; }
.row > input, .row > select { padding: .5rem; border: 1px solid #cbd5e1; border-radius: 4px; }

.card { background: #fff; padding: 1rem 1.25rem; border-radius: 6px;
        box-shadow: 0 1px 3px rgba(0,0,0,.08); margin-bottom: 1rem; }

.search-box { display: flex; gap: .5rem; margin: 1rem 0; }
.search-box input { flex: 1; padding: .6rem; border: 1px solid #cbd5e1; border-radius: 4px; font-size: 1rem; }

.btn-primary, .btn-secondary, .btn-link {
    padding: .5rem 1rem; border-radius: 4px; cursor: pointer; border: 0;
    font-size: .95rem; text-decoration: none; display: inline-block;
}
.btn-primary { background: #003a70; color: #fff; }
.btn-primary:hover { background: #1d4f86; }
.btn-primary:disabled { background: #94a3b8; cursor: not-allowed; }
.btn-secondary { background: #ed1c24; color: #fff; }
.btn-link { color: #003a70; background: transparent; border: 1px solid #003a70; padding: .25rem .5rem; }
.btn-link:hover { background: #003a70; color: #fff; }

.data-table { width: 100%; border-collapse: collapse; background: #fff;
              border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.data-table th, .data-table td { padding: .6rem .8rem; border-bottom: 1px solid #e5e7eb; text-align: left; }
.data-table th { background: #003a70; color: #fff; font-weight: 600; }
.data-table tr:hover td { background: #f9fafb; }

.badge { display: inline-block; background: #e0e7ff; color: #1e3a8a;
         padding: .15rem .5rem; border-radius: 999px; font-size: .85rem; margin-right: .25rem; }

.log { background: #0f172a; color: #e2e8f0; padding: 1rem; border-radius: 6px;
       font-family: monospace; font-size: .85rem; max-height: 500px; overflow-y: auto; }
.log > div { padding: .15rem 0; border-bottom: 1px solid #1e293b; }

.sema-list { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1rem 0; }
.sema { margin: 0; background: #fff; padding: .5rem; border: 1px solid #e5e7eb;
        border-radius: 4px; max-width: 500px; }
.sema img { max-width: 100%; height: auto; }
.sema figcaption { font-size: .85rem; color: #6b7280; text-align: center; margin-top: .25rem; }

.poz-search { margin: .5rem 0; }
.poz-search input { padding: .5rem; border: 1px solid #cbd5e1; border-radius: 4px; width: 300px; }

/* Auth (login / setup) — modal/popup hissi */
.auth-layout {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background:
        radial-gradient(circle 700px at 50% 30%, rgba(29, 79, 134, 0.35), transparent 60%),
        radial-gradient(circle 500px at 25% 85%, rgba(237, 28, 36, 0.08), transparent 55%),
        radial-gradient(circle 500px at 80% 90%, rgba(0, 58, 112, 0.25), transparent 55%),
        #08111f;
    position: relative;
    padding: 1rem;
}
.auth-layout::before {
    /* hafif film grain dokusu - modal backdrop hissi */
    content: '';
    position: absolute; inset: 0;
    background-image:
        radial-gradient(rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 4px 4px;
    pointer-events: none;
}
.auth-main {
    width: 100%; max-width: 420px;
    position: relative; z-index: 1;
    animation: auth-fade-in 320ms cubic-bezier(.2,.8,.2,1);
}
@keyframes auth-fade-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.auth-card {
    background: #fff;
    padding: 2rem 1.85rem 1.6rem;
    border-radius: 16px;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 0 90px rgba(29, 79, 134, 0.18);
    position: relative;
    overflow: hidden;
    animation: auth-popup-scale 320ms cubic-bezier(.2,.8,.2,1);
}
@keyframes auth-popup-scale {
    from { opacity: 0; transform: scale(0.94) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.auth-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, #ed1c24 0%, #ed1c24 30%, #003a70 30%, #003a70 100%);
}
.auth-card h1 { display: none; }

.auth-brand {
    text-align: center;
    margin-bottom: 1.75rem;
}
.auth-brand-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 64px; height: 64px;
    background: linear-gradient(135deg, #003a70, #1d4f86);
    color: #fff;
    border-radius: 18px;
    font-size: 30px;
    margin-bottom: 1rem;
    box-shadow:
        0 10px 24px rgba(0, 58, 112, 0.35),
        0 0 0 4px #fff,
        0 0 0 5px rgba(0, 58, 112, 0.08);
}
.auth-brand-title {
    font-size: 1.5rem; font-weight: 700;
    color: #003a70; margin: 0;
    letter-spacing: -0.01em;
}
.auth-brand-subtitle {
    font-size: 0.875rem; color: #6b7280;
    margin-top: 0.35rem;
}

.auth-card label {
    display: block;
    margin: 1rem 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: #4b5563;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.auth-card label input {
    display: block; width: 100%;
    margin-top: 0.45rem;
    padding: 0.78rem 0.9rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 9px;
    font-size: 1rem;
    color: #111827;
    background: #fafbfc;
    transition: border-color 150ms ease, background 150ms ease, box-shadow 200ms ease;
    text-transform: none;
    font-weight: 400;
    letter-spacing: 0;
}
.auth-card label input:hover { border-color: #cbd5e1; }
.auth-card label input:focus {
    outline: none;
    border-color: #003a70;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 58, 112, 0.12);
}
.auth-card label small.muted {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    margin-left: 0.4rem;
    color: #9ca3af;
}

.auth-btn {
    background: linear-gradient(135deg, #003a70, #1d4f86);
    color: #fff;
    padding: 0.9rem 1rem;
    border: none;
    border-radius: 9px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    margin-top: 1.5rem;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 14px rgba(0, 58, 112, 0.28);
    transition: transform 120ms ease, box-shadow 220ms ease, filter 200ms ease;
}
.auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(0, 58, 112, 0.4);
    filter: brightness(1.06);
}
.auth-btn:active { transform: translateY(0); filter: brightness(0.98); }

.auth-error {
    background: #fef2f2;
    color: #991b1b;
    padding: 0.75rem 0.95rem;
    border-radius: 9px;
    border-left: 3px solid #ed1c24;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    display: flex; align-items: center; gap: 0.5rem;
}
.auth-error::before { content: '⚠'; font-size: 1rem; }

.auth-ok {
    background: #f0fdf4;
    color: #166534;
    padding: 0.75rem 0.95rem;
    border-radius: 9px;
    border-left: 3px solid #22c55e;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f1f5f9;
    font-size: 0.78rem;
    color: #9ca3af;
    letter-spacing: 0.03em;
}

.nav-logout-form { margin: 0; padding: 0; }
.nav-logout-btn { background: none; border: none; color: #c0d4ec; padding: .4rem .6rem;
                  text-align: left; width: 100%; cursor: pointer; font: inherit;
                  border-radius: 4px; }
.nav-logout-btn:hover { background: #1d4f86; color: #fff; }

/* Geri butonu (Urun, YedekParcaDetay vb.) */
.back-btn {
    background: #fff;
    color: #003a70;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0.4rem 0.85rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 1rem;
    transition: all 150ms ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.back-btn:hover {
    background: #f1f5f9;
    border-color: #003a70;
    transform: translateX(-2px);
}

/* Floating poz tooltip — sema-viewer.js tarafından body'ye eklenir */
.poz-tooltip-floating {
    display: none;
    position: fixed;
    z-index: 10000;
    background: #fff;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
    min-width: 280px;
    max-width: 360px;
    font-size: 12px;
    line-height: 1.5;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.18),
        0 0 0 1px rgba(0, 0, 0, 0.04);
    pointer-events: none;
    animation: poz-tooltip-in 140ms cubic-bezier(.2,.8,.2,1);
}
@keyframes poz-tooltip-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.poz-tooltip-floating .poz-tooltip-row {
    display: flex; gap: 12px; align-items: flex-start;
}
.poz-tooltip-floating .poz-thumb {
    width: 90px; height: 90px;
    object-fit: contain;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    flex-shrink: 0;
}
.poz-tooltip-floating .poz-tooltip-meta { flex: 1; min-width: 0; }

.poz-tooltip-floating .poz-tooltip-header {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}
.poz-tooltip-floating .poz-badge {
    background: #ed1c24;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.poz-tooltip-floating .poz-title {
    font-size: 14px;
    color: #003a70;
    font-weight: 700;
    line-height: 1.3;
}
.poz-tooltip-floating .poz-ypn {
    font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
    font-size: 12.5px;
    font-weight: 600;
    color: #003a70;
    background: #f1f5f9;
    padding: 5px 8px;
    border-radius: 5px;
    margin: 6px 0;
    word-break: break-all;
    border: 1px solid #e2e8f0;
}
.poz-tooltip-floating .poz-tooltip-rows {
    display: flex; flex-direction: column; gap: 3px;
    margin-top: 4px;
}
.poz-tooltip-floating .poz-tooltip-meta-row {
    display: flex; gap: 8px; align-items: baseline;
    font-size: 11px;
}
.poz-tooltip-floating .poz-tooltip-meta-row > span {
    color: #9ca3af;
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    min-width: 38px;
    font-weight: 600;
}
.poz-tooltip-floating .poz-tooltip-meta-row > b {
    color: #1f2937;
    font-weight: 600;
}
.poz-tooltip-floating .poz-aciklama {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
    font-size: 11px;
    color: #475569;
    font-style: italic;
}
