@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Inter:wght@400;500;600&display=swap');

:root {
    --ink: #232323;
    --paper: #f3efe8;
    --panel: #fffdfa;
    --navy: #2b3a4a;
    --bordeaux: #6e2f3a;
    --olive: #6b7454;
    --line: #d8d0c2;
    --muted: #7a7568;
    --good: #3f5a45;
    --avoid: #8a3b3b;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

h1, h2, h3, .brand {
    font-family: 'Fraunces', serif;
    font-weight: 500;
    letter-spacing: -0.01em;
}

a { color: var(--navy); }

.wrap {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

header.top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 28px 20px 18px;
    border-bottom: 1px solid var(--line);
    max-width: 780px;
    margin: 0 auto;
}

.brand {
    font-size: 22px;
    letter-spacing: 0.01em;
}
.brand span { color: var(--bordeaux); }

nav.tabs {
    display: flex;
    gap: 4px;
    margin: 22px 0 30px;
    border-bottom: 1px solid var(--line);
}
nav.tabs a {
    padding: 10px 14px;
    text-decoration: none;
    color: var(--muted);
    font-size: 14px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border-bottom: 2px solid transparent;
}
nav.tabs a.active {
    color: var(--ink);
    border-bottom-color: var(--bordeaux);
}

.logout { font-size: 13px; color: var(--muted); text-decoration: none; }

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 24px;
    margin-bottom: 20px;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 6px;
}

.btn {
    display: inline-block;
    background: var(--ink);
    color: #fff;
    border: none;
    padding: 12px 22px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    letter-spacing: 0.02em;
    border-radius: 2px;
    cursor: pointer;
    text-decoration: none;
}
.btn:hover { background: var(--navy); }
.btn.secondary {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line);
}
.btn.danger { background: var(--avoid); }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}
.card img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    display: block;
    background: #eee;
}
.card .noimg {
    width: 100%;
    aspect-ratio: 3/4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 12px;
    background: #eae5da;
}
.card .body { padding: 10px 12px 12px; }
.card .name { font-size: 14px; font-weight: 600; }
.card .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

.tag {
    display: inline-block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 7px;
    border-radius: 2px;
    margin-top: 6px;
}
.tag.gut { background: #e3ead9; color: var(--good); }
.tag.neutral { background: #ece8dd; color: var(--muted); }
.tag.vermeiden { background: #f2ded9; color: var(--avoid); }
.tag.unbekannt { background: #ece8dd; color: var(--muted); }

form label {
    display: block;
    font-size: 13px;
    margin: 14px 0 5px;
    color: var(--muted);
}
form input[type=text], form select, form textarea, form input[type=password] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 2px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    background: #fff;
}
form textarea { resize: vertical; min-height: 70px; }

.outfit-plate {
    border: 1px solid var(--line);
    background: var(--panel);
    padding: 26px;
    border-radius: 3px;
}
.outfit-row {
    display: flex;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    align-items: center;
}
.outfit-row:last-child { border-bottom: none; }
.outfit-row .num {
    font-family: 'Fraunces', serif;
    font-size: 22px;
    color: var(--bordeaux);
    width: 30px;
}
.outfit-row .thumb {
    width: 56px; height: 56px;
    object-fit: cover;
    border-radius: 2px;
    background: #eee;
    flex-shrink: 0;
}
.outfit-row .info { flex: 1; }
.overall {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    font-family: 'Fraunces', serif;
    font-size: 17px;
}

.flash { padding: 12px 16px; border-radius: 2px; margin-bottom: 18px; font-size: 14px; }
.flash.error { background: #f2ded9; color: var(--avoid); }
.flash.success { background: #e3ead9; color: var(--good); }

.login-wrap {
    max-width: 360px;
    margin: 90px auto;
    padding: 0 20px;
}

.empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}

.match-meter {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}
.match-meter .meter-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 10px;
}
.match-meter .meter-label {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 11px;
    color: var(--muted);
}
.match-meter .meter-num {
    font-family: 'Fraunces', serif;
    font-size: 30px;
    line-height: 1;
    color: var(--ink);
}
.match-meter .meter-num span { font-size: 15px; color: var(--muted); font-family: 'Inter', sans-serif; }

.meter-track {
    position: relative;
    height: 14px;
    background: repeating-linear-gradient(
        90deg,
        #e4ddce 0, #e4ddce 1px,
        transparent 1px, transparent 10%
    ), #ece6d8;
    border: 1px solid var(--line);
    border-radius: 2px;
    overflow: hidden;
}
.meter-fill {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 0%;
    background: linear-gradient(90deg, var(--navy), var(--bordeaux));
    transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}
.meter-fill.tier-high { background: linear-gradient(90deg, var(--good), #4f7a56); }
.meter-fill.tier-low { background: linear-gradient(90deg, var(--avoid), #a4514f); }

.meter-fill.shine::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.55) 48%, transparent 66%);
    background-size: 220% 100%;
    background-position: 140% 0;
    animation: sweep 1.4s ease-out 1.1s 1;
}
@keyframes sweep {
    to { background-position: -40% 0; }
}

.match-verdict {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    opacity: 0;
    transform: translateY(4px);
    animation: rise 0.5s ease-out 1.15s forwards;
}
@keyframes rise {
    to { opacity: 1; transform: translateY(0); }
}
.match-verdict .stamp {
    font-family: 'Fraunces', serif;
    font-size: 13px;
    letter-spacing: 0.04em;
    padding: 5px 12px;
    border: 1px solid currentColor;
    border-radius: 20px;
}
.stamp.tier-high { color: var(--good); }
.stamp.tier-mid-high { color: var(--navy); }
.stamp.tier-mid { color: var(--muted); }
.stamp.tier-low { color: var(--avoid); }

@media (prefers-reduced-motion: reduce) {
    .meter-fill, .match-verdict { animation: none !important; transition: none !important; }
    .meter-fill.shine::after { display: none; }
}

@media (max-width: 480px) {
    .grid { grid-template-columns: repeat(2, 1fr); }
    header.top { padding: 20px 16px; }
}
