:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --bg: #f1f5f9;
    --card: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --border: #e2e8f0;
    --radius: 12px;
}

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

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    font-size: 16px;
    line-height: 1.5;
}

header {
    background: var(--primary);
    color: #fff;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 { font-size: 1.2rem; font-weight: 700; display: flex; align-items: center; gap: .5rem; }
header nav a {
    color: #fff;
    text-decoration: none;
    margin-left: 1.2rem;
    font-size: .95rem;
    opacity: .9;
    transition: opacity .2s;
}
header nav a:hover { opacity: 1; text-decoration: underline; }
header nav a.btn-nav {
    background: rgba(255,255,255,.18);
    padding: .3rem .8rem;
    border-radius: 6px;
}

main { max-width: 900px; margin: 2rem auto; padding: 0 1rem 3rem; }

.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    padding: 1.8rem;
    margin-bottom: 1.5rem;
}

h2 { font-size: 1.25rem; margin-bottom: 1.2rem; color: var(--primary); }
h3 { font-size: 1rem; margin-bottom: .8rem; color: var(--text); }

label { display: block; font-size: .88rem; font-weight: 600; color: var(--muted); margin-bottom: .3rem; }

input[type=text], input[type=email], input[type=password], select, textarea {
    width: 100%;
    padding: .6rem .85rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: .97rem;
    color: var(--text);
    background: #f8fafc;
    transition: border-color .2s, box-shadow .2s;
    margin-bottom: 1rem;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
    background: #fff;
}
textarea { min-height: 80px; resize: vertical; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media(max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .65rem 1.4rem;
    border: none;
    border-radius: 8px;
    font-size: .97rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .1s;
    text-decoration: none;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger  { background: var(--danger);  color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-sm { padding: .35rem .8rem; font-size: .85rem; border-radius: 6px; }

.alert {
    padding: .85rem 1.1rem;
    border-radius: 8px;
    margin-bottom: 1.2rem;
    font-weight: 500;
}
.alert-success { background: #dcfce7; color: #166534; border-left: 4px solid var(--success); }
.alert-error   { background: #fee2e2; color: #991b1b; border-left: 4px solid var(--danger); }
.alert-info    { background: #dbeafe; color: #1e40af; border-left: 4px solid var(--primary); }

/* Paket-Karten */
.paket-liste { display: flex; flex-direction: column; gap: .9rem; }
.paket-card {
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.2rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    background: #fff;
    transition: box-shadow .2s;
}
.paket-card:hover { box-shadow: 0 3px 10px rgba(0,0,0,.09); }
.paket-card.abgeholt { background: #f0fdf4; border-color: #bbf7d0; opacity: .75; }

.paket-info { flex: 1; }
.paket-info .empfaenger { font-size: 1.05rem; font-weight: 700; }
.paket-info .wohnung { font-size: .85rem; color: var(--muted); margin-bottom: .3rem; }
.paket-info .meta { font-size: .82rem; color: var(--muted); }
.paket-info .beschreibung { font-style: italic; font-size: .9rem; margin-top: .3rem; }

.badge {
    display: inline-block;
    padding: .2rem .7rem;
    border-radius: 99px;
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-success { background: #dcfce7; color: #166534; }

.paket-actions { display: flex; flex-direction: column; gap: .5rem; align-items: flex-end; }

/* Filter-Leiste */
.filter-bar {
    display: flex;
    gap: .8rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1.2rem;
}
.filter-bar select, .filter-bar input { margin: 0; width: auto; flex: 1; min-width: 160px; }

/* Login */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 60%, #60a5fa 100%);
}
.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 40px rgba(0,0,0,.22);
    text-align: center;
}
.login-card .logo { font-size: 3rem; margin-bottom: .5rem; }
.login-card h1 { font-size: 1.3rem; color: var(--primary); margin-bottom: .4rem; }
.login-card p.subtitle { color: var(--muted); font-size: .9rem; margin-bottom: 1.5rem; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
@media(max-width:550px){ .stats { grid-template-columns: 1fr; } }
.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.1rem;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
}
.stat-card .stat-num { font-size: 2rem; font-weight: 800; color: var(--primary); }
.stat-card .stat-label { font-size: .82rem; color: var(--muted); margin-top: .2rem; }

/* Tabs */
.tabs { display: flex; gap: .5rem; margin-bottom: 1.2rem; border-bottom: 2px solid var(--border); }
.tab-btn {
    background: none; border: none; padding: .6rem 1.2rem;
    font-size: .97rem; font-weight: 600; cursor: pointer;
    color: var(--muted); border-bottom: 3px solid transparent;
    margin-bottom: -2px; transition: color .2s, border-color .2s;
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 1.5rem; }
