/* ═══════════════════════════════════════════════════════════════
   MDGRUPPE Site Tracker — Mobile PWA CSS
   Dark header, white cards, gold accent, system fonts.
   ═══════════════════════════════════════════════════════════════ */

:root {
    --st-bg: #F5F5F5;
    --st-dark: #1A1A1A;
    --st-gold: #C9920E;
    --st-green: #1B8A3A;
    --st-red: #C0392B;
    --st-blue: #1E4488;
    --st-border: #E0E0E0;
    --st-muted: #999;
    --st-r: 10px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--st-bg);
    color: var(--st-dark);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Header ── */
.st-header {
    background: var(--st-dark);
    color: #fff;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.st-header-title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.st-header-sub {
    font-size: 12px;
    color: var(--st-muted);
}
.st-header-btn {
    background: none;
    border: none;
    color: var(--st-gold);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 0;
}

/* ── Container ── */
.st-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 16px;
}

/* ── Cards ── */
.st-card {
    background: #fff;
    border-radius: var(--st-r);
    padding: 20px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.st-card-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--st-muted);
    margin-bottom: 12px;
}

/* ── Buttons ── */
.st-btn {
    display: block;
    width: 100%;
    min-height: 56px;
    border: none;
    border-radius: var(--st-r);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    line-height: 56px;
    margin-bottom: 10px;
    transition: opacity 0.15s;
}
.st-btn:active { opacity: 0.8; }
.st-btn-gold { background: var(--st-gold); color: #fff; }
.st-btn-dark { background: var(--st-dark); color: #fff; }
.st-btn-green { background: var(--st-green); color: #fff; }
.st-btn-outline { background: #fff; color: var(--st-dark); border: 2px solid var(--st-border); }
.st-btn-red { background: var(--st-red); color: #fff; }
.st-btn-sm { min-height: 44px; line-height: 44px; font-size: 14px; }
.st-btn-lg { min-height: 64px; line-height: 64px; font-size: 18px; }

/* ── Radio Options (large touch targets) ── */
.st-option {
    display: block;
    min-height: 52px;
    padding: 14px 16px;
    margin-bottom: 8px;
    background: #fff;
    border: 2px solid var(--st-border);
    border-radius: var(--st-r);
    font-size: 15px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.st-option.selected {
    border-color: var(--st-gold);
    background: rgba(201, 146, 14, 0.06);
}
.st-option:active { background: rgba(0,0,0,0.03); }

/* ── Inputs ── */
.st-input {
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    border: 2px solid var(--st-border);
    border-radius: var(--st-r);
    font-size: 16px;
    font-family: inherit;
    background: #fff;
    -webkit-appearance: none;
}
.st-input:focus { outline: none; border-color: var(--st-gold); }
.st-input-lg { font-size: 24px; text-align: center; min-height: 56px; font-weight: 600; }
.st-select {
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    border: 2px solid var(--st-border);
    border-radius: var(--st-r);
    font-size: 16px;
    font-family: inherit;
    background: #fff;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' fill='none' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}
.st-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px 16px;
    border: 2px solid var(--st-border);
    border-radius: var(--st-r);
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
}
.st-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--st-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ── PIN Pad ── */
.st-pin-display {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}
.st-pin-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--st-border);
    background: #fff;
    transition: background 0.15s;
}
.st-pin-dot.filled { background: var(--st-gold); border-color: var(--st-gold); }
.st-pin-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 300px;
    margin: 0 auto;
}
.st-pin-key {
    min-height: 56px;
    border: none;
    border-radius: var(--st-r);
    background: #fff;
    font-size: 22px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: background 0.1s;
}
.st-pin-key:active { background: #f0f0f0; }
.st-pin-key.del { font-size: 16px; color: var(--st-red); }

/* ── Status Badges ── */
.st-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.st-badge-pending { background: #f0f0f0; color: var(--st-muted); }
.st-badge-confirmed { background: rgba(27,138,58,0.1); color: var(--st-green); }
.st-badge-flagged { background: rgba(200,57,43,0.1); color: var(--st-red); }

/* ── Summary Row ── */
.st-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}
.st-summary-label { color: var(--st-muted); }
.st-summary-value { font-weight: 600; }

/* ── Log List ── */
.st-log-item {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}
.st-log-item:last-child { border-bottom: none; }
.st-log-main { font-size: 14px; font-weight: 500; }
.st-log-sub { font-size: 12px; color: var(--st-muted); margin-top: 2px; }

/* ── Step Indicator ── */
.st-steps {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}
.st-step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--st-border);
}
.st-step-dot.active { background: var(--st-gold); }
.st-step-dot.done { background: var(--st-green); }

/* ── Success Screen ── */
.st-success {
    text-align: center;
    padding: 40px 20px;
}
.st-success-icon { font-size: 64px; margin-bottom: 16px; }
.st-success-title { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.st-success-sub { font-size: 14px; color: var(--st-muted); margin-bottom: 24px; }

/* ── Offline Banner ── */
.st-offline {
    background: var(--st-gold);
    color: #fff;
    text-align: center;
    padding: 8px;
    font-size: 13px;
    font-weight: 600;
    display: none;
}
.st-offline.show { display: block; }

/* ── Welcome ── */
.st-welcome { font-size: 18px; font-weight: 600; }
.st-welcome-sub { font-size: 14px; color: var(--st-muted); }
.st-welcome-date { font-size: 13px; color: var(--st-muted); margin-top: 4px; }

/* ── Confirm List ── */
.st-confirm-item {
    background: #fff;
    border-radius: var(--st-r);
    padding: 14px;
    margin-bottom: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.st-confirm-worker { font-weight: 600; font-size: 14px; }
.st-confirm-detail { font-size: 13px; color: var(--st-muted); margin-top: 2px; }
.st-confirm-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.st-confirm-actions .st-btn { flex: 1; min-height: 40px; line-height: 40px; font-size: 13px; margin: 0; }

/* ── Footer ── */
.st-footer {
    text-align: center;
    padding: 20px;
    font-size: 11px;
    color: #ccc;
}

@media (min-width: 481px) {
    .st-container { padding: 20px; }
}
