/* ==========================================
   REN 90 Hari Challenge - Style
   Theme: Kuning-Hitam Bold
   ========================================== */

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

:root {
    --yellow: #FFD500;
    --yellow-dark: #FFC107;
    --yellow-glow: rgba(255,213,0,0.35);
    --black: #0A0A0A;
    --black-2: #1A1A1A;
    --black-3: #2A2A2A;
    --grey: #666;
    --grey-light: #E5E5E5;
    --white: #FFFFFF;
    --off-white: #FAFAFA;
    --red: #E53935;
    --green: #43A047;
    --blue: #1E88E5;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.25);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

body {
    font-family: var(--font);
    background: var(--off-white);
    color: var(--black);
    font-size: 16px;
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ========== TOPBAR ========== */
.topbar {
    background: var(--black);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--yellow);
    text-decoration: none;
    font-weight: 900;
    letter-spacing: 0.5px;
}
.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--yellow);
    color: var(--black);
    border-radius: 8px;
    font-size: 18px;
    box-shadow: 0 2px 10px rgba(255,213,0,0.35);
    flex-shrink: 0;
}
.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}
.brand-line1 {
    font-size: 14px;
    color: var(--yellow);
    letter-spacing: 0.5px;
    font-weight: 900;
}
.brand-line2 {
    font-size: 10px;
    color: var(--yellow-dark);
    letter-spacing: 1.2px;
    font-weight: 800;
    margin-top: 2px;
}
.topnav {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.topnav a {
    color: var(--white);
    text-decoration: none;
    padding: 8px 14px;
    font-weight: 700;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.15s;
}
.topnav a:hover { background: var(--black-3); color: var(--yellow); }
.topnav a.logout { color: #FF6B6B; }

/* ========== LAYOUT ========== */
.wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 16px 60px;
}

/* ========== HERO HEADER ========== */
.hero-header {
    background: linear-gradient(135deg, var(--black) 0%, var(--black-3) 100%);
    color: var(--white);
    border-radius: var(--radius);
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.hero-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--yellow-glow) 0%, transparent 70%);
    pointer-events: none;
}
.hero-day {
    background: var(--yellow);
    color: var(--black);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 900;
    font-size: 20px;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(255,213,0,0.4);
    flex-shrink: 0;
    position: relative;
}
.hero-title { flex: 1; position: relative; }
.hero-name {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.3px;
}
.hero-date {
    color: var(--yellow);
    font-size: 13px;
    font-weight: 600;
    margin-top: 4px;
}
.hero-badge {
    background: var(--red);
    color: var(--white);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 900;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(229,57,53,0.4);
    position: relative;
}

/* ========== STATS ROW (REN dashboard) ========== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}
.stat {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px 12px;
    text-align: center;
    box-shadow: var(--shadow);
    border-bottom: 4px solid var(--black);
}
.stat-score { border-bottom-color: var(--yellow); }
.stat-streak { border-bottom-color: var(--red); }
.stat-longest { border-bottom-color: var(--green); }
.stat-label {
    font-size: 10px;
    font-weight: 800;
    color: var(--grey);
    letter-spacing: 0.5px;
}
.stat-value {
    font-size: 30px;
    font-weight: 900;
    color: var(--black);
    margin-top: 4px;
    line-height: 1;
}
.stat-value span {
    font-size: 14px;
    color: var(--grey);
    font-weight: 700;
}

/* ========== BANNER ========== */
.banner-bar {
    background: linear-gradient(90deg, var(--yellow) 0%, #FFB300 100%);
    color: var(--black);
    padding: 12px 16px;
    border-radius: var(--radius);
    text-align: center;
    font-weight: 900;
    font-size: 14px;
    letter-spacing: 1px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}
.banner-emoji { display: inline-block; margin: 0 8px; }

/* ========== SECTION HEADER ========== */
.section-h {
    font-size: 18px;
    font-weight: 900;
    color: var(--black);
    margin: 24px 0 12px;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--yellow);
    display: inline-block;
}

/* ========== TASK LIST (minimalist) ========== */
.task-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }

.task-row {
    background: var(--white);
    border: 1px solid #EEE;
    border-radius: 10px;
    padding: 14px 18px;
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    gap: 16px;
    transition: all 0.15s;
    cursor: pointer;
}
.task-row:hover { border-color: var(--black); }
.task-row.done { background: #FAFAFA; border-color: #EEE; }
.task-row.done .task-title { text-decoration: line-through; color: #999; }
.task-row.done .task-target { color: #BBB; }
.task-row.done .task-num { background: #E5E5E5; color: #999; }

.task-check { display: block; position: relative; cursor: pointer; }
.task-checkbox { position: absolute; opacity: 0; pointer-events: none; }
.check-visual {
    display: block;
    width: 22px;
    height: 22px;
    border: 2px solid #CCC;
    border-radius: 5px;
    background: var(--white);
    transition: all 0.15s;
    position: relative;
}
.task-row:hover .check-visual { border-color: var(--black); }
.task-checkbox:checked + .check-visual {
    background: var(--black);
    border-color: var(--black);
}
.task-checkbox:checked + .check-visual::after {
    content: '✓';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: var(--yellow);
    font-weight: 900;
    font-size: 14px;
    line-height: 1;
}

.task-num {
    background: transparent;
    color: #999;
    width: auto;
    min-width: 24px;
    height: auto;
    border-radius: 0;
    display: block;
    font-weight: 800;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
    text-align: right;
    flex-shrink: 0;
}
.task-icon { display: none; }
.task-title { font-weight: 700; color: var(--black); font-size: 15px; line-height: 1.35; letter-spacing: -0.1px; }
.task-target { font-size: 12px; color: #999; font-weight: 500; margin-top: 3px; letter-spacing: 0.2px; }

/* ========== METRICS CARD ========== */
.metrics-card, .report-card, .admin-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}
.metrics-card h3, .report-card h3, .admin-card h3 {
    margin: 0 0 16px;
    color: var(--black);
    font-weight: 900;
    font-size: 16px;
    border-left: 4px solid var(--yellow);
    padding-left: 10px;
}
.metrics-form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    align-items: end;
}
.metric-group { display: flex; flex-direction: column; }
.metric-group.full { grid-column: 1 / -1; }
.metric-group label {
    font-size: 12px;
    font-weight: 700;
    color: var(--grey);
    margin-bottom: 4px;
}
.metric-group input, .metric-group textarea, .form-row input, .form-row select, .form-row textarea {
    padding: 10px 12px;
    border: 2px solid var(--grey-light);
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    transition: border-color 0.15s;
}
.metric-group input:focus, .form-row input:focus, .metric-group textarea:focus, .form-row textarea:focus, .form-row select:focus {
    outline: none;
    border-color: var(--yellow);
    box-shadow: 0 0 0 3px var(--yellow-glow);
}
.btn-save, .btn-primary {
    grid-column: 1 / -1;
    background: var(--black);
    color: var(--yellow);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 900;
    font-size: 14px;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.15s;
    margin-top: 10px;
}
.btn-save:hover, .btn-primary:hover { background: var(--yellow); color: var(--black); }
.save-status {
    color: var(--green);
    font-weight: 700;
    font-size: 13px;
    margin-left: 10px;
    opacity: 0;
    transition: opacity 0.3s;
}
.save-status.show { opacity: 1; }

/* ========== REPORT ========== */
.report-card textarea {
    width: 100%;
    padding: 12px;
    border: 2px dashed var(--grey-light);
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    background: #FFFEF5;
    resize: vertical;
}
.btn-copy {
    background: var(--green);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 900;
    cursor: pointer;
    margin-top: 12px;
    font-size: 14px;
    letter-spacing: 0.5px;
    transition: all 0.15s;
}
.btn-copy:hover { background: #2E7D32; }
.btn-copy.copied { background: var(--yellow); color: var(--black); }

/* ========== FOOTER ========== */
.foot {
    background: var(--black);
    color: var(--white);
    padding: 20px 16px;
    text-align: center;
    margin-top: 40px;
}
.foot-motto {
    color: var(--yellow);
    font-weight: 900;
    font-size: 14px;
    letter-spacing: 1px;
}
.foot-copyright {
    font-size: 12px;
    color: var(--grey);
    margin-top: 6px;
}

/* ========== LOGIN PAGE ========== */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--black);
    background-image:
        radial-gradient(circle at 20% 30%, var(--yellow-glow) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(229,57,53,0.15) 0%, transparent 40%);
    padding: 20px;
}
.login-box {
    background: var(--white);
    border-radius: 20px;
    padding: 40px 30px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    border-top: 8px solid var(--yellow);
}
.login-brand { text-align: center; margin-bottom: 30px; }
.login-badge {
    width: 70px;
    height: 70px;
    background: var(--yellow);
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin-bottom: 16px;
    box-shadow: 0 8px 20px rgba(255,213,0,0.4);
}
.login-brand h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 900;
    color: var(--black);
    line-height: 1.1;
    letter-spacing: -0.5px;
}
.login-brand h1 span { color: var(--yellow-dark); }
.login-tagline {
    font-size: 11px;
    color: var(--grey);
    font-weight: 700;
    letter-spacing: 1px;
    margin-top: 10px;
}
.login-form label {
    display: block;
    font-weight: 800;
    font-size: 12px;
    color: var(--grey);
    margin-bottom: 6px;
    margin-top: 14px;
    letter-spacing: 0.5px;
}
.login-form input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--grey-light);
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.15s;
}
.login-form input:focus {
    outline: none;
    border-color: var(--yellow);
    box-shadow: 0 0 0 4px var(--yellow-glow);
}
.login-form .btn-primary {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    margin-top: 20px;
}
.login-help {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--grey);
}

/* ========== ALERTS ========== */
.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 700;
    font-size: 14px;
}
.alert-error { background: #FFEBEE; color: #C62828; border-left: 5px solid #C62828; }
.alert-ok { background: #E8F5E9; color: #2E7D32; border-left: 5px solid #2E7D32; }

/* ========== STATS GRID (leader) ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.stat-tile {
    background: var(--white);
    padding: 20px 16px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--yellow);
}
.stat-tile.good { border-top-color: var(--green); }
.stat-tile.bad { border-top-color: var(--red); }
.stat-tile-num {
    font-size: 32px;
    font-weight: 900;
    color: var(--black);
    line-height: 1;
}
.stat-tile-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--grey);
    margin-top: 6px;
    letter-spacing: 0.3px;
}

/* ========== FILTER BAR ========== */
.filter-bar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-btn {
    background: var(--white);
    border: 2px solid var(--black);
    color: var(--black);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}
.filter-btn:hover { background: var(--yellow); }
.filter-btn.active { background: var(--black); color: var(--yellow); }

/* ========== REN CARD (leader view) ========== */
.ren-list { display: flex; flex-direction: column; gap: 10px; }
.ren-card {
    background: var(--white);
    padding: 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: 2fr 1.5fr 2fr auto;
    align-items: center;
    gap: 16px;
    border-left: 5px solid var(--yellow);
}
.ren-card.perfect { border-left-color: var(--green); background: linear-gradient(90deg, #E8F5E9 0%, #FFFFFF 30%); }
.ren-card.zero { border-left-color: var(--red); background: linear-gradient(90deg, #FFEBEE 0%, #FFFFFF 30%); }
.ren-name { font-weight: 900; font-size: 15px; color: var(--black); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ren-phone { font-size: 12px; color: var(--grey); font-weight: 600; margin-top: 2px; }
.badge-perfect { background: var(--green); color: var(--white); padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 900; letter-spacing: 0.5px; }
.badge-alert { background: var(--red); color: var(--white); padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 900; }
.ren-score { text-align: center; }
.score-num { font-weight: 900; font-size: 22px; color: var(--black); }
.score-bar { background: var(--grey-light); height: 8px; border-radius: 4px; overflow: hidden; margin-top: 4px; }
.score-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--yellow), var(--yellow-dark)); border-radius: 4px; transition: width 0.3s; }
.ren-metrics { display: flex; gap: 12px; font-weight: 700; font-size: 13px; color: var(--grey); flex-wrap: wrap; }
.ren-detail-btn {
    background: var(--black);
    color: var(--yellow);
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 800;
    font-size: 12px;
    white-space: nowrap;
    transition: all 0.15s;
}
.ren-detail-btn:hover { background: var(--yellow); color: var(--black); }

.back-link {
    display: inline-block;
    color: var(--grey);
    text-decoration: none;
    font-weight: 700;
    margin-bottom: 16px;
    font-size: 14px;
}
.back-link:hover { color: var(--black); }

/* ========== LEADERBOARD ========== */
.lb-tabs { display: flex; gap: 4px; margin-bottom: 20px; flex-wrap: wrap; background: var(--white); border-radius: 10px; padding: 4px; box-shadow: var(--shadow); }
.lb-tab { flex: 1; text-align: center; padding: 10px 12px; text-decoration: none; color: var(--grey); font-weight: 800; font-size: 13px; border-radius: 8px; transition: all 0.15s; min-width: 80px; }
.lb-tab:hover { color: var(--black); background: var(--off-white); }
.lb-tab.active { background: var(--black); color: var(--yellow); }

.podium {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    align-items: end;
    margin: 20px 0 30px;
    padding: 20px 10px 0;
}
.podium-slot { text-align: center; }
.podium-medal { font-size: 40px; margin-bottom: 8px; }
.podium-name { font-weight: 900; font-size: 14px; color: var(--black); margin-bottom: 4px; }
.podium-metric { font-size: 12px; color: var(--grey); font-weight: 700; margin-bottom: 8px; }
.podium-block { background: var(--grey-light); color: var(--black); font-weight: 900; font-size: 24px; padding: 20px 0; border-radius: 10px 10px 0 0; }
.podium-slot.rank-1 .podium-block { background: linear-gradient(180deg, var(--yellow) 0%, var(--yellow-dark) 100%); padding: 40px 0; }
.podium-slot.rank-2 .podium-block { background: linear-gradient(180deg, #CFD8DC 0%, #B0BEC5 100%); padding: 30px 0; }
.podium-slot.rank-3 .podium-block { background: linear-gradient(180deg, #FFAB91 0%, #FF8A65 100%); padding: 20px 0; }

.lb-list { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.lb-row { display: grid; grid-template-columns: 60px 1fr auto; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--grey-light); gap: 12px; }
.lb-row:last-child { border-bottom: none; }
.lb-row.top3 { background: linear-gradient(90deg, #FFFDE7 0%, #FFFFFF 100%); }
.lb-row.me { background: var(--yellow-glow); border-left: 5px solid var(--yellow); }
.lb-rank { font-weight: 900; font-size: 18px; color: var(--grey); }
.lb-row.top3 .lb-rank { color: var(--yellow-dark); }
.lb-name { font-weight: 800; color: var(--black); }
.me-tag { background: var(--yellow); color: var(--black); padding: 2px 8px; border-radius: 8px; font-size: 10px; font-weight: 900; margin-left: 6px; }
.lb-metric { font-weight: 900; font-size: 20px; color: var(--black); text-align: right; }
.lb-metric span { font-size: 12px; color: var(--grey); font-weight: 700; }
.lb-metric .lb-sub { display: block; font-size: 11px; color: var(--grey); font-weight: 600; margin-top: 2px; letter-spacing: 0.3px; }
.podium-metric small { color: var(--grey); font-weight: 600; font-size: 11px; letter-spacing: 0.3px; }

/* ========== ADMIN ========== */
.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}
.form-row { display: flex; flex-direction: column; margin-bottom: 12px; }
.form-row label { font-weight: 700; font-size: 13px; color: var(--grey); margin-bottom: 4px; }

.user-table-wrap { overflow-x: auto; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); }
.user-table { width: 100%; border-collapse: collapse; }
.user-table th { background: var(--black); color: var(--yellow); text-align: left; padding: 12px 14px; font-size: 12px; font-weight: 800; letter-spacing: 0.5px; }
.user-table td { padding: 12px 14px; border-bottom: 1px solid var(--grey-light); font-size: 14px; }
.user-table tr.inactive-row { opacity: 0.5; }

.role-badge { padding: 3px 10px; border-radius: 10px; font-size: 10px; font-weight: 900; letter-spacing: 0.5px; }
.role-admin { background: var(--red); color: var(--white); }
.role-leader { background: var(--blue); color: var(--white); }
.role-ren { background: var(--yellow); color: var(--black); }

.btn-mini { background: var(--off-white); border: 1px solid var(--grey-light); padding: 6px 10px; border-radius: 6px; font-weight: 700; font-size: 12px; cursor: pointer; margin: 0 2px; transition: all 0.15s; }
.btn-mini:hover { background: var(--yellow); border-color: var(--yellow); }
.btn-mini.danger:hover { background: var(--red); color: var(--white); border-color: var(--red); }
.action-cell { white-space: nowrap; }

/* ========== ACTIVITY CALENDAR ========== */
.activity-cal { display: grid; grid-template-columns: repeat(15, 1fr); gap: 6px; padding: 20px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); }
.cal-cell { aspect-ratio: 1; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.cal-cell.none { background: var(--grey-light); color: var(--grey); }
.cal-cell.low { background: #FFF9C4; color: #F57F17; }
.cal-cell.mid { background: var(--yellow); color: var(--black); }
.cal-cell.high { background: var(--green); color: var(--white); }
.cal-legend { display: flex; gap: 16px; padding: 10px 0; font-size: 12px; font-weight: 700; color: var(--grey); align-items: center; }
.cal-legend .cal-cell { width: 18px; height: 18px; margin-right: 4px; font-size: 0; }
.cal-legend span { display: flex; align-items: center; }

/* ========== HISTORY LIST ========== */
.history-list { display: flex; flex-direction: column; gap: 6px; }
.history-row { background: var(--white); padding: 12px 16px; border-radius: 8px; display: grid; grid-template-columns: 150px 1fr 70px; align-items: center; gap: 12px; box-shadow: var(--shadow); }
.hr-date { font-weight: 700; font-size: 13px; color: var(--grey); }
.hr-bar { background: var(--grey-light); height: 10px; border-radius: 5px; overflow: hidden; }
.hr-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--yellow), var(--green)); border-radius: 5px; }
.hr-score { text-align: right; font-weight: 900; color: var(--black); }

/* ========== BADGES SHOWCASE ========== */
.badge-showcase { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
.badge-showcase h3 { margin: 0 0 16px; color: var(--black); font-weight: 900; font-size: 16px; border-left: 4px solid var(--yellow); padding-left: 10px; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.badge-tile { background: var(--off-white); padding: 16px 12px; border-radius: 10px; text-align: center; opacity: 0.4; filter: grayscale(1); border: 2px dashed var(--grey-light); transition: all 0.2s; }
.badge-tile.earned { opacity: 1; filter: none; background: linear-gradient(135deg, var(--yellow) 0%, var(--yellow-dark) 100%); border-color: var(--black); box-shadow: 0 4px 12px var(--yellow-glow); }
.badge-icon { font-size: 40px; }
.badge-name { font-weight: 900; font-size: 13px; margin-top: 4px; color: var(--black); }
.badge-req { font-size: 11px; color: var(--grey); margin-top: 2px; font-weight: 700; }

/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 720px) {
    .topbar-inner { padding: 10px 12px; flex-wrap: wrap; }
    .brand { font-size: 18px; }
    .topnav a { padding: 6px 10px; font-size: 12px; }
    .wrap { padding: 16px 12px 40px; }
    .hero-header { padding: 18px 14px; gap: 12px; flex-wrap: wrap; }
    .hero-name { font-size: 18px; }
    .hero-day { font-size: 16px; padding: 6px 12px; }
    .hero-badge { font-size: 11px; padding: 5px 10px; }
    .stats-row { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .stat { padding: 12px 6px; }
    .stat-value { font-size: 22px; }
    .stat-label { font-size: 9px; }
    .task-row { grid-template-columns: auto auto 1fr; padding: 12px 14px; gap: 12px; }
    .task-title { font-size: 14px; }
    .metrics-form { grid-template-columns: 1fr 1fr; }
    .metric-group.full { grid-column: 1 / -1; }
    .admin-grid { grid-template-columns: 1fr; }
    .ren-card { grid-template-columns: 1fr; text-align: left; gap: 8px; }
    .ren-score { text-align: left; }
    .activity-cal { grid-template-columns: repeat(10, 1fr); }
    .history-row { grid-template-columns: 100px 1fr 60px; font-size: 12px; }
}
