/* ===== OxyTrack — Mobile-First CSS ===== */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700&family=DM+Sans:wght@400;500&display=swap');

:root {
    --bg:        #f0f7f2;
    --surface:   #ffffff;
    --forest:    #1a3a2a;
    --green:     #2d7a4f;
    --mint:      #4db87a;
    --blue:      #2a6b8a;
    --teal:      #1e8c7a;
    --sage:      #5a8a6a;
    --text:      #1a2e22;
    --muted:     #6b8a75;
    --border:    #d4e8da;
    --shadow:    0 4px 20px rgba(30,80,50,0.10);
    --radius:    16px;
}

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

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* ===== HEADER ===== */
header {
    background: var(--forest);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.logo {
    font-family: 'Sora', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.leaf { font-size: 1.4rem; }

.back {
    color: var(--mint);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-add {
    background: var(--mint);
    color: var(--forest);
    padding: 8px 16px;
    border-radius: 24px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn-add:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(77,184,122,0.4);
}

/* ===== MAIN ===== */
main { max-width: 480px; margin: 0 auto; padding: 0 16px 40px; }

/* ===== IMPACT HERO ===== */
.impact-hero {
    position: relative;
    overflow: hidden;
    margin: 20px 0 4px;
    border-radius: 20px;
    background: linear-gradient(135deg, #1a3a2a 0%, #1e5c4a 50%, #1a4a6a 100%);
    padding: 36px 24px 32px;
    text-align: center;
    box-shadow: 0 6px 28px rgba(26,58,42,0.22);
}

/* decorative soft orbs */
.impact-hero-bg { position: absolute; inset: 0; pointer-events: none; }

.orb {
    position: absolute;
    border-radius: 50%;
    opacity: 0.18;
    filter: blur(36px);
}

.orb-1 {
    width: 180px; height: 180px;
    background: #4db87a;
    top: -40px; left: -40px;
}

.orb-2 {
    width: 140px; height: 140px;
    background: #2a9fd6;
    bottom: -30px; right: -20px;
}

.impact-hero-content { position: relative; z-index: 1; }

.impact-title {
    font-family: 'Sora', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.impact-sub {
    color: rgba(255,255,255,0.72);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 18px;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.streak-badge {
    display: inline-block;
    background: var(--border);
    color: var(--muted);
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.9rem;
    font-weight: 600;
}

.streak-badge.active {
    background: linear-gradient(135deg, #ff6b35, #f7c948);
    color: #fff;
    box-shadow: 0 3px 12px rgba(255,107,53,0.3);
}

.streak-msg {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

.streak-fire { background: rgba(255,107,53,0.18); color: #ff6b35; }
.streak-hero { background: rgba(247,201,72,0.22); color: #c8960a; }

/* ===== CARDS ===== */
.cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 20px 0;
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px 16px;
    box-shadow: var(--shadow);
    border-top: 4px solid transparent;
    transition: transform 0.2s;
}

.card:hover { transform: translateY(-3px); }

.card-green  { border-top-color: var(--green); }
.card-blue   { border-top-color: var(--blue); }
.card-teal   { border-top-color: var(--teal); }
.card-sage   { border-top-color: var(--sage); }

.card-icon { font-size: 1.8rem; margin-bottom: 6px; }

.card-value {
    font-family: 'Sora', sans-serif;
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.1;
}

.unit {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--muted);
    margin-left: 2px;
}

.card-label {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 4px;
    font-weight: 500;
}

/* ===== RECENT ===== */
.recent { margin-top: 8px; }

.recent h2 {
    font-family: 'Sora', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--forest);
}

.activity-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.activity-list li {
    background: var(--surface);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(30,80,50,0.07);
}

.act-date {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--forest);
    min-width: 48px;
}

.act-items {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.act-items span {
    background: var(--bg);
    border-radius: 8px;
    padding: 3px 8px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--green);
}

.empty {
    text-align: center;
    color: var(--muted);
    padding: 32px;
    background: var(--surface);
    border-radius: var(--radius);
    font-size: 0.95rem;
}

.empty a { color: var(--green); font-weight: 600; }

/* ===== FORM ===== */
.form-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px 20px;
    margin-top: 16px;
    box-shadow: var(--shadow);
}

.field {
    margin-bottom: 22px;
}

.field label {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 6px;
    color: var(--forest);
}

.input-hint {
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 6px;
}

input[type="date"],
input[type="number"] {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    color: var(--text);
    background: var(--bg);
    transition: border-color 0.2s;
    -webkit-appearance: none;
}

input[type="date"]:focus,
input[type="number"]:focus {
    outline: none;
    border-color: var(--mint);
    background: #fff;
}

/* Checkbox */
.field-check { margin-top: 8px; }

.check-label {
    display: flex !important;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 500 !important;
}

.check-label input[type="checkbox"] { display: none; }

.checkmark {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid var(--border);
    background: var(--bg);
    flex-shrink: 0;
    transition: all 0.2s;
    position: relative;
}

.check-label input:checked + .checkmark {
    background: var(--mint);
    border-color: var(--mint);
}

.check-label input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -52%);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
}

/* Submit */
.btn-submit {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--green), var(--teal));
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: 'Sora', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 14px rgba(45,122,79,0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45,122,79,0.4);
}

.btn-submit:active { transform: translateY(0); }

/* Alert */
.alert {
    border-radius: 10px;
    padding: 12px 16px;
    margin: 12px 0;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert-error   { background: #fde8e8; color: #b91c1c; border: 1px solid #f5c2c2; }
.alert-success { background: #e6f7ed; color: #1a6b3a; border: 1px solid #a8dbb9; }

/* ===== RESPONSIVE ===== */
@media (min-width: 480px) {
    main { padding: 0 24px 48px; }
    .card-value { font-size: 2rem; }
    .impact-title { font-size: 1.55rem; }
}
