/* =====================================================================
   Cosmos Account Center — 白色平台風
   ===================================================================== */

:root {
    --ac-bg:      #f4f5f7;
    --ac-card:    #ffffff;
    --ac-line:    #e6e8eb;
    --ac-text:    #33373d;
    --ac-dim:     #8a919a;
    --ac-red:     #d7342a;
    --ac-red-bg:  #fdf1f0;
    --ac-green:   #29a35a;
    --ac-orange:  #f5a623;
}

* { box-sizing: border-box; }

body.ac-body {
    margin: 0;
    background: var(--ac-bg);
    color: var(--ac-text);
    font-family: 'Noto Sans TC', -apple-system, 'Segoe UI', sans-serif;
    font-size: 14px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.ac-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

a { color: var(--ac-red); text-decoration: none; }
a:hover { color: #b02a22; }

/* ── Topbar ─────────────────────────────────────────────────────── */
.ac-topbar {
    background: #fff;
    border-bottom: 1px solid var(--ac-line);
}
.ac-topbar .ac-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.ac-brand { display: flex; align-items: center; gap: 10px; }
.ac-brand-logo { height: 40px; width: auto; }
.ac-brand-logo-lg { height: 72px; }
.ac-brand-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--ac-text);   /* 與帳號文字同灰（#33373d） */
    letter-spacing: .01em;
}
.ac-topbar-right { display: flex; align-items: center; gap: 12px; }
.ac-avatar-sm {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: #dfe2e6;
    color: #9aa1aa;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}
.ac-username { font-weight: 500; }
.ac-pill-btn {
    border: 1px solid #cfd4d9;
    background: #fff;
    color: var(--ac-dim);
    border-radius: 999px;
    font-size: 12px;
    padding: 3px 14px;
    cursor: pointer;
    transition: color .15s, border-color .15s;
}
.ac-pill-btn:hover { color: var(--ac-red); border-color: var(--ac-red); }
.ac-region {
    border: 1px solid var(--ac-line);
    border-radius: 6px;
    color: var(--ac-dim);
    font-size: 13px;
    padding: 5px 10px;
    background: #fff;
}

/* 進入遊戲官網（頁首入口；平台目前只服務 SF，多款時自動變下拉） */
.ac-game-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid var(--ac-line);
    background: #fff;
    color: var(--ac-text);
    border-radius: 6px;
    font-size: 13px;
    padding: 5px 12px;
    text-decoration: none;
    cursor: pointer;
    transition: color .15s, border-color .15s;
}
.ac-game-link:hover { color: var(--ac-red); border-color: var(--ac-red); }
.ac-game-menu { position: relative; }
.ac-game-list {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 160px;
    background: #fff;
    border: 1px solid var(--ac-line);
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,.08);
    overflow: hidden;
    z-index: 30;
}
.ac-game-list.open { display: block; }
.ac-game-list a {
    display: block;
    padding: 9px 14px;
    color: var(--ac-text);
    text-decoration: none;
    font-size: 13px;
}
.ac-game-list a:hover { background: #f5f6f8; color: var(--ac-red); }

/* ── Tabs ───────────────────────────────────────────────────────── */
.ac-tabs { background: #fff; border-bottom: 1px solid var(--ac-line); }
.ac-tabs .ac-container { display: flex; }
.ac-tabs a {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding: 14px 8px 12px;
    color: var(--ac-text);
    font-size: 15px;
    border-bottom: 3px solid transparent;
    transition: color .15s;
    white-space: nowrap;
}
.ac-tabs a:hover { color: var(--ac-red); }
.ac-tabs a.active {
    color: var(--ac-red);
    font-weight: 700;
    border-bottom-color: var(--ac-red);
}

/* ── Main / cards ───────────────────────────────────────────────── */
.ac-main { padding: 28px 0 40px; flex: 1; }

.ac-card {
    background: var(--ac-card);
    border: 1px solid var(--ac-line);
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 20px;
}
.ac-card-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ac-card-title .more { font-size: 13px; font-weight: 400; color: #4a90d9; }

/* ── Profile card ───────────────────────────────────────────────── */
.ac-profile { text-align: center; }
.ac-avatar-lg {
    width: 84px; height: 84px;
    border-radius: 12px;
    background: #e8eaed;
    color: #aab0b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    margin-bottom: 10px;
}
.ac-profile-name { font-size: 17px; font-weight: 700; }
.ac-profile-usn { color: var(--ac-dim); font-size: 13px; margin-bottom: 14px; }
.ac-profile hr { border: 0; border-top: 1px solid var(--ac-line); margin: 16px 0; }

.ac-menu { text-align: left; }
.ac-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ac-text);
    padding: 9px 4px;
    font-size: 14px;
    border-radius: 6px;
}
.ac-menu a:hover { background: #f6f7f8; color: var(--ac-red); }
.ac-menu .bi { color: #aab0b8; font-size: 16px; }
.ac-menu .ac-tag {
    margin-left: auto;
    border: 1px solid var(--ac-red);
    color: var(--ac-red);
    border-radius: 999px;
    font-size: 12px;
    padding: 1px 12px;
}

/* ── Security gauge ─────────────────────────────────────────────── */
.ac-gauge-wrap { display: flex; gap: 34px; align-items: flex-start; }
.ac-gauge {
    --p: 15;
    --tone: var(--ac-orange);
    width: 150px; height: 150px;
    border-radius: 50%;
    background: conic-gradient(var(--tone) calc(var(--p) * 1%), #edeff2 0);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
}
.ac-gauge::before {
    content: attr(data-label);
    width: 118px; height: 118px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #c3c9d0;
    font-weight: 500;
}
.ac-gauge.tone-mid  { --tone: #f0c542; }
.ac-gauge.tone-high { --tone: var(--ac-green); }
.ac-gauge.tone-high::before { color: var(--ac-green); }

.ac-checklist { flex: 1; }
.ac-check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    font-size: 14px;
}
.ac-check-row .bi-exclamation-circle-fill { color: var(--ac-red); font-size: 16px; }
.ac-check-row .bi-check-circle-fill { color: var(--ac-green); font-size: 16px; }
.ac-action {
    display: inline-block;
    border: 1px solid var(--ac-red);
    color: var(--ac-red);
    background: #fff;
    border-radius: 999px;
    font-size: 12px;
    padding: 2px 16px;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.6;
    transition: background .15s, color .15s;
}
.ac-action:hover { background: var(--ac-red-bg); color: var(--ac-red); }
.ac-check-row .ac-action { margin-left: auto; }
.ac-check-more { color: #4a90d9; font-size: 13px; margin-top: 8px; display: inline-block; }

/* ── Tables ─────────────────────────────────────────────────────── */
.ac-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ac-table th {
    background: #f2f4f6;
    color: var(--ac-text);
    font-weight: 500;
    padding: 10px 14px;
    text-align: center;
}
.ac-table td {
    padding: 13px 14px;
    text-align: center;
    border-bottom: 1px solid #f0f2f4;
    color: var(--ac-text);
}
.ac-table td .sub { display: block; color: var(--ac-dim); font-size: 12px; }
.ac-table-hint { color: var(--ac-dim); font-size: 13px; margin: 0 0 12px; }
.ac-empty {
    text-align: center;
    color: var(--ac-dim);
    padding: 28px 0;
    font-size: 13px;
}

/* ── 客服附件上傳 ───────────────────────────────────────────────── */
.ac-upload {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border: 1px dashed #cfd4d9;
    border-radius: 8px;
    background: #f7f8fa;
    color: var(--ac-dim);
    font-size: 14px;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
}
.ac-upload:hover { border-color: var(--ac-red); color: var(--ac-red); background: var(--ac-red-bg); }
.ac-upload .bi { font-size: 17px; }
.ac-upload-preview {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.ac-upload-preview img {
    width: 84px;
    height: 84px;
    object-fit: cover;
    border: 1px solid var(--ac-line);
    border-radius: 8px;
}

/* ── Login page ─────────────────────────────────────────────────── */
.ac-login-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}
.ac-login-card {
    width: 400px;
    max-width: 100%;
    background: #fff;
    border: 1px solid var(--ac-line);
    border-radius: 12px;
    padding: 36px 34px;
    box-shadow: 0 8px 30px rgba(35, 45, 60, .06);
}
.ac-login-card .ac-brand { justify-content: center; margin-bottom: 6px; }
.ac-login-sub {
    text-align: center;
    color: var(--ac-dim);
    font-size: 13px;
    margin-bottom: 24px;
}
.ac-input {
    width: 100%;
    border: 1px solid #d4d9de;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    margin-bottom: 14px;
    font-family: inherit;
}
.ac-input:focus {
    outline: none;
    border-color: var(--ac-red);
    box-shadow: 0 0 0 3px rgba(215, 52, 42, .12);
}
.ac-agree {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--ac-dim, #6b7280);
    margin: 2px 0 16px;
    line-height: 1.5;
    cursor: pointer;
}
.ac-agree input { margin-top: 3px; flex: none; }
.ac-agree a { color: var(--ac-red); }
.ac-btn-primary {
    width: 100%;
    background: var(--ac-red);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 11px 0;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s;
}
.ac-btn-primary:hover { background: #c02d24; }
.ac-login-links {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    font-size: 13px;
}
.ac-login-links a { color: var(--ac-dim); }
.ac-login-links a:hover { color: var(--ac-red); }
.ac-alert {
    background: var(--ac-red-bg);
    border: 1px solid #f3c9c5;
    color: var(--ac-red);
    border-radius: 8px;
    font-size: 13px;
    padding: 9px 14px;
    margin-bottom: 16px;
}
.ac-alert-info {
    background: #eff6ff;
    border-color: #cfe2f8;
    color: #2563eb;
}

/* ── Footer ─────────────────────────────────────────────────────── */
.ac-footer {
    border-top: 1px solid var(--ac-line);
    background: #fff;
    color: var(--ac-dim);
    font-size: 12.5px;
    padding: 16px 0;
    text-align: center;
}

@media (max-width: 767.98px) {
    .ac-gauge-wrap { flex-direction: column; align-items: center; }
    .ac-tabs a { width: 33.33%; }
    .ac-brand-name { font-size: 17px; }
}
