/* WoNieCar Audit-Portal — style.css */
:root {
    --color-primary:   #1a56db;
    --color-secondary: #6c757d;
    --color-success:   #0f9e5e;
    --color-warning:   #d97706;
    --color-danger:    #dc2626;
    --color-bg:        #f9fafb;
    --color-card:      #ffffff;
    --color-border:    #e5e7eb;
    --color-text:      #111827;
    --color-muted:     #6b7280;
    --radius:          6px;
    --shadow:          0 1px 3px rgba(0,0,0,.1);
    --font:            system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 15px;
    line-height: 1.5;
}

/* ── Layout ── */
.layout { display: flex; min-height: 100vh; }

nav.sidebar {
    width: 220px;
    background: #1e293b;
    color: #cbd5e1;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0;
}

nav.sidebar .brand {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    padding: 0 1.25rem 1.5rem;
    border-bottom: 1px solid #334155;
}

nav.sidebar a {
    display: block;
    padding: .5rem 1.25rem;
    color: #94a3b8;
    text-decoration: none;
    font-size: .875rem;
    transition: background .15s;
}
nav.sidebar a:hover, nav.sidebar a.active {
    background: #334155;
    color: #fff;
}
nav.sidebar .nav-section {
    padding: .75rem 1.25rem .25rem;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #475569;
}

nav.sidebar .spacer { flex: 1; }
nav.sidebar .user-info {
    padding: 1rem 1.25rem;
    border-top: 1px solid #334155;
    font-size: .8rem;
    color: #64748b;
}

.main-content {
    flex: 1;
    padding: 2rem;
    overflow-x: auto;
}

/* ── Cards ── */
.card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--color-border);
}

.card-title { font-size: 1.1rem; font-weight: 600; }

/* ── Buttons ── */
.btn {
    display: inline-block;
    padding: .45rem .9rem;
    border-radius: var(--radius);
    font-size: .875rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: opacity .15s;
}
.btn:hover { opacity: .85; }
.btn-primary   { background: var(--color-primary); color: #fff; }
.btn-secondary { background: var(--color-secondary); color: #fff; }
.btn-success   { background: var(--color-success); color: #fff; }
.btn-danger    { background: var(--color-danger); color: #fff; }
.btn-outline   { background: transparent; border-color: var(--color-border); color: var(--color-text); }
.btn-sm { padding: .25rem .6rem; font-size: .8rem; }

/* ── Tables ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th, td { padding: .6rem .9rem; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: #f8fafc; font-weight: 600; color: var(--color-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
tr:hover td { background: #f0f4ff; }

/* ── Forms ── */
label { display: block; margin-bottom: .3rem; font-weight: 500; font-size: .875rem; }
input[type=text], input[type=password], input[type=email], input[type=number],
input[type=date], input[type=file], select, textarea {
    width: 100%;
    padding: .5rem .75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: .875rem;
    font-family: var(--font);
    background: #fff;
    transition: border-color .15s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(26,86,219,.15);
}
.form-group { margin-bottom: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

/* ── Alerts / Badges ── */
.alert { padding: .75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: .875rem; }
.alert-error   { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

.badge { display: inline-block; padding: .2rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.badge-ok   { background: #dcfce7; color: #166534; }
.badge-warn { background: #fef9c3; color: #854d0e; }
.badge-err  { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }

/* ── Freigabe-Checkliste ── */
.freigabe-box {
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    border: 2px solid;
}
.freigabe-ok   { background: #f0fdf4; border-color: #86efac; }
.freigabe-warn { background: #fffbeb; border-color: #fcd34d; }
.freigabe-box-title { font-weight: 700; font-size: 1rem; margin-bottom: .6rem; }
.freigabe-checklist { list-style: none; padding: 0; margin: 0 0 .5rem 0; display: flex; flex-direction: column; gap: .3rem; }
.freigabe-checklist li { font-size: .92rem; }
.check-ok   { color: #166534; }
.check-fail { color: #991b1b; font-weight: 600; }
.freigabe-override-info {
    margin-top: .5rem; padding: .4rem .75rem;
    background: #fff7ed; border: 1px solid #fed7aa;
    border-radius: var(--radius); font-size: .88rem; color: #92400e;
}

/* ── Stats/KPIs ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { background: var(--color-card); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.25rem; text-align: center; }
.stat-card .stat-value { font-size: 2rem; font-weight: 700; color: var(--color-primary); }
.stat-card .stat-label { font-size: .8rem; color: var(--color-muted); margin-top: .25rem; }

/* ── Login Page ── */
body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1e293b 0%, #1a56db 100%);
}
.login-box {
    background: #fff;
    border-radius: 10px;
    padding: 2.5rem;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.login-box h1 { margin-bottom: .25rem; font-size: 1.5rem; }
.login-box .subtitle { color: var(--color-muted); font-size: .875rem; margin-bottom: 1.5rem; }
.login-box label { display: block; margin-bottom: .3rem; font-size: .875rem; font-weight: 500; margin-top: .75rem; }
.login-box input { width: 100%; padding: .5rem .75rem; border: 1px solid var(--color-border); border-radius: var(--radius); font-size: .875rem; }
.login-box button { width: 100%; margin-top: 1.25rem; padding: .65rem; background: var(--color-primary); color: #fff; border: none; border-radius: var(--radius); font-size: 1rem; font-weight: 600; cursor: pointer; }
.login-box button:hover { background: #1648c0; }

/* ── Misc ── */
.page-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 1.5rem; }
.text-muted { color: var(--color-muted); }
.text-danger { color: var(--color-danger); }
.text-success { color: var(--color-success); }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.flex { display: flex; }
.gap-2 { gap: .5rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.text-right { text-align: right; }

.filter-bar { display: flex; gap: .75rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1.25rem; }
.filter-bar .form-group { margin-bottom: 0; }
.filter-bar select, .filter-bar input { min-width: 160px; }

/* ── File Drop Zone ── */
.drop-zone {
    border: 2px dashed var(--color-border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    color: var(--color-muted);
    transition: border-color .2s;
    cursor: pointer;
}
.drop-zone:hover { border-color: var(--color-primary); color: var(--color-primary); }
