/* =========================================================
   Member Portal styles — layered on top of homepage-common.css
   (logged-in member screens reuse the public /home template)
   ========================================================= */

/* ---------- Login card ---------- */
.member-login-card {
    max-width: 460px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .06);
    padding: 40px 36px;
}
.member-login-card h2 {
    margin: 0 0 6px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
}
.member-login-sub { color: #777; margin: 0 0 24px; font-size: 14px; }
.member-login-form .form-group { margin-bottom: 18px; }
.member-login-form label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.member-login-form input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    box-sizing: border-box;
}
.member-btn {
    width: 100%;
    padding: 13px;
    border: 0;
    border-radius: 6px;
    background: #c8102e;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s;
}
.member-btn:hover { background: #a50d26; }
.member-login-help { margin-top: 22px; font-size: 13px; color: #777; text-align: center; }
.member-login-help a { color: #c8102e; font-weight: 600; }
.member-alert {
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 18px;
}
.member-alert.error { background: #fdecec; color: #c0392b; border: 1px solid #f5c6c6; }
.member-alert.success { background: #eaf6ec; color: #256b32; border: 1px solid #bcdfc4; }

/* ---------- My Page layout (sidebar + content) ---------- */
.member-layout {
    display: flex;
    gap: 34px;
    align-items: flex-start;
}
.member-sidebar {
    flex: 0 0 260px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .05);
}
.member-card {
    text-align: center;
    padding: 28px 20px 22px;
    background: #1a1a1a;
    color: #fff;
}
.member-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 12px;
    display: block;
    border: 3px solid rgba(255, 255, 255, .25);
}
.member-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #333;
    font-size: 36px;
    color: #888;
}
.member-card h3 { margin: 0; font-size: 17px; font-family: 'Montserrat', sans-serif; }
.member-korean { margin: 4px 0 0; font-size: 13px; color: #bbb; }
.member-menu { list-style: none; margin: 0; padding: 8px 0; }
.member-menu li a {
    display: block;
    padding: 13px 22px;
    color: #444;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-left: 3px solid transparent;
    transition: background .15s, border-color .15s, color .15s;
}
.member-menu li a i { width: 20px; margin-right: 8px; color: #c8102e; }
.member-menu li a:hover { background: #faf2f3; }
.member-menu li.active a { background: #faf2f3; border-left-color: #c8102e; color: #c8102e; }

.member-content {
    flex: 1 1 auto;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .05);
    padding: 34px 38px;
    min-width: 0;
}
.member-title {
    margin: 0 0 6px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    border-bottom: 2px solid #c8102e;
    padding-bottom: 14px;
}
.member-desc { color: #777; margin: 14px 0 26px; font-size: 14px; }
.member-subtitle { font-size: 15px; color: #c8102e; margin: 0 0 10px; text-transform: uppercase; letter-spacing: .5px; }
.member-note { margin-top: 22px; font-size: 13px; color: #888; }
.member-note a { color: #c8102e; font-weight: 600; }

/* ---------- Dashboard tiles ---------- */
.member-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; }
.member-tile {
    display: block;
    padding: 26px 22px;
    border: 1px solid #eee;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    text-align: center;
    transition: transform .15s, box-shadow .15s, border-color .15s;
}
.member-tile:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(0, 0, 0, .08); border-color: #c8102e; }
.member-tile i { font-size: 30px; color: #c8102e; margin-bottom: 12px; }
.member-tile h3 { margin: 0 0 6px; font-size: 16px; }
.member-tile p { margin: 0; font-size: 13px; color: #888; }

/* ---------- Info tables ---------- */
.member-info-group { margin-bottom: 28px; }
.member-info-table { width: 100%; border-collapse: collapse; }
.member-info-table th,
.member-info-table td { text-align: left; padding: 13px 12px; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
.member-info-table th { width: 200px; color: #555; font-weight: 700; background: #fafafa; }

/* ---------- Student analysis bars ---------- */
.member-analysis-list { display: flex; flex-direction: column; gap: 14px; }
.analysis-row { display: grid; grid-template-columns: 180px 1fr 44px 110px; align-items: center; gap: 14px; }
.analysis-label { font-weight: 600; font-size: 14px; }
.analysis-bar-wrap { background: #eee; border-radius: 20px; height: 14px; overflow: hidden; }
.analysis-bar { height: 100%; background: linear-gradient(90deg, #c8102e, #ff5a5a); border-radius: 20px; transition: width .4s; }
.analysis-score { font-weight: 700; color: #c8102e; text-align: right; }
.analysis-date { font-size: 12px; color: #999; text-align: right; }

/* ---------- Invoice table ---------- */
.member-table-wrap { overflow-x: auto; }
.member-invoice-table { width: 100%; border-collapse: collapse; }
.member-invoice-table th,
.member-invoice-table td { padding: 13px 14px; border-bottom: 1px solid #f0f0f0; font-size: 14px; text-align: left; }
.member-invoice-table thead th { background: #fafafa; color: #555; font-weight: 700; }
.status-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.status-badge.paid { background: #e6f6ec; color: #1e8449; }
.status-badge.unpaid { background: #fdecec; color: #c0392b; }
.status-badge.void { background: #eceef0; color: #6b7280; }
.member-link-btn { color: #c8102e; font-weight: 600; text-decoration: none; font-size: 13px; }
.member-link-btn:hover { text-decoration: underline; }

/* ---------- Empty state ---------- */
.member-empty { text-align: center; padding: 50px 20px; color: #aaa; }
.member-empty i { font-size: 44px; margin-bottom: 16px; display: block; }
.member-empty p { margin: 0; font-size: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .member-layout { flex-direction: column; }
    .member-sidebar { flex: 1 1 auto; width: 100%; }
    .analysis-row { grid-template-columns: 120px 1fr 40px; }
    .analysis-date { display: none; }
    .member-info-table th { width: 130px; }
}

/* === FITNESS TRACK CHART (Term Fitness Test Result Track) === */
.member-chart-box{background:#fff;border:1px solid #e8e8e8;border-radius:6px;padding:20px;margin-bottom:30px;height:320px;position:relative}
.member-chart-box canvas{max-height:280px}
@media (max-width:600px){.member-chart-box{height:280px;padding:12px}}
