/* ==========================================================================
   校园卡模块
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 校园卡主页
   -------------------------------------------------------------------------- */
.m-card {
    min-height: 100vh;
    background: var(--bg);
}

.card-header {
    position: relative;
    height: 10.4rem;
    background: #f4f4f6 url("../../assets/img/card-header.png") top center / 100% auto no-repeat;
}

.card-profile {
    position: relative;
    z-index: 1;
    padding: 1.6rem 0 0 0.8125rem;
    color: var(--navy);
}

.profile-row {
    display: flex;
    align-items: baseline;
    font-size: 1rem;
    line-height: 1.7rem;
    white-space: nowrap;
}

.profile-row .k {
    flex: 0 0 auto;
    width: 4em;
    font-size: 0.875rem;
    white-space: nowrap;
    text-align: justify;
    text-align-last: justify;
}

.profile-row .v {
    overflow: hidden;
    max-width: 9em;
    margin-left: 0.55em;
    text-overflow: ellipsis;
}

.profile-row .v.is-empty {
    opacity: 0.55;
}

/* 付款码 */
.pay {
    position: absolute;
    top: 1.65rem;
    right: 1.4rem;
    width: 2.125rem;
    color: var(--navy);
    text-align: center;
}

.pay svg {
    display: block;
    width: 100%;
    height: auto;
}

.pay span {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.72rem;
    line-height: 1;
    white-space: nowrap;
}

/* 余额卡片 */
.stats {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    margin: 1.15rem 1.625rem 0;
    padding: 0.7rem 0.55rem 0;
    border-radius: 0.5rem;
    background: #ffffff;
    box-shadow: 0 0.1rem 0.5rem rgba(0, 0, 0, 0.07);
}

.stat {
    text-align: center;
}

.stat__label {
    font-size: 0.8125rem;
    line-height: 1.15rem;
    color: #7f7f7f;
}

.stat__value {
    margin-top: 0.5rem;
    font-size: 1rem;
    line-height: 1.25rem;
    font-weight: 600;
    color: #ea4552;
}

/* 应用区 */
.apps {
    margin-top: 1.25rem;
    background: #ffffff;
}

.apps__head {
    position: relative;
    display: flex;
    align-items: center;
    height: 2.25rem;
    padding: 0 0.9rem;
    border-bottom: 1px solid #f0f0f0;
}

.apps__head::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 0.1875rem;
    height: 1.375rem;
    transform: translateY(-50%);
    background: var(--indigo);
}

.apps__title {
    font-size: 0.875rem;
    color: var(--text);
}

.apps__more {
    display: flex;
    align-items: center;
    margin-left: auto;
    font-size: 0.875rem;
    color: var(--muted);
}

.apps__more svg {
    width: 0.9rem;
    height: 0.9rem;
    margin-left: 0.15rem;
}

.app-grid {
    display: flex;
    flex-wrap: wrap;
    padding: 0.75rem 0.625rem 0;
}

.app {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 25%;
    height: 4.25rem;
    text-align: center;
}

.app img {
    width: auto;
    height: 1.6rem;
    object-fit: contain;
}

.app__label {
    /* 与原站一致：单行显示，放不下时用省略号截断（不换行） */
    width: 100%;
    margin-top: 0.42rem;
    overflow: hidden;
    font-size: 0.8125rem;
    line-height: 1.1rem;
    color: var(--text);
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* 卡片内容收缩时避免文本贴边 */
.app:active img {
    transform: scale(0.95);
}

/* --------------------------------------------------------------------------
   2. 基本信息 / 更多信息
   -------------------------------------------------------------------------- */
.m-basic {
    min-height: 100vh;
    background: var(--bg-grey);
}

.basic-list {
    background: #ffffff;
}

.basic-row {
    display: flex;
    align-items: center;
    height: 2.75rem;
    padding: 0 0.875rem 0 0.75rem;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    font-size: 1rem;
    color: #363636;
}

.basic-row__k {
    flex: 0 0 auto;
    width: 4em;
    font-size: 0.875rem;
    white-space: nowrap;
    text-align: justify;
    text-align-last: justify;
}

.basic-row__v {
    overflow: hidden;
    max-width: 64%;
    margin-left: auto;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.is-red {
    color: var(--red);
}

.is-grey {
    color: var(--grey);
}

.is-pink {
    color: var(--pink);
}

/* 提示条 */
.notice {
    display: flex;
    align-items: center;
    height: 2.75rem;
    padding-left: 3.6rem;
    background: var(--bg-grey);
}

.notice svg {
    flex: 0 0 auto;
    width: 1.4rem;
    height: 1.4rem;
}

.notice p {
    margin: 0 0 0 0.85rem;
    font-size: 0.8125rem;
    color: #ff0000;
}

/* 更多信息列表 */
.more-list {
    background: #ffffff;
}

.more-item {
    display: flex;
    align-items: center;
    height: 3.5rem;
    padding: 0 0.9rem 0 0.75rem;
    border-bottom: 1px solid var(--line);
}

.more-item img {
    width: auto;
    height: 1.5rem;
    object-fit: contain;
}

.more-item__label {
    margin-left: 0.9rem;
    font-size: 1rem;
    color: var(--text);
}

.more-item svg {
    width: 0.95rem;
    height: 0.95rem;
    margin-left: auto;
}

/* --------------------------------------------------------------------------
   3. 底部标签栏
   -------------------------------------------------------------------------- */
.tabbar {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 30;
    display: flex;
    width: 100%;
    max-width: 536px;
    height: calc(3.0625rem + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    transform: translateX(-50%);
    background: #ffffff;
    border-top: 1px solid #cccccc;
}

.tab {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    font-size: 0.6875rem;
    color: var(--grey);
}

.tab img {
    width: auto;
    height: 1.35rem;
}

.tab.is-active {
    color: var(--blue);
}

/* --------------------------------------------------------------------------
   4. 拾获卡信息（设置）
   -------------------------------------------------------------------------- */
.m-settings {
    min-height: 100vh;
    background: var(--bg-grey);
}

.form-list {
    background: #ffffff;
}

.form-row {
    display: flex;
    align-items: center;
    height: 2.75rem;
    padding: 0 0.875rem 0 0.75rem;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    font-size: 1rem;
}

.form-row label {
    flex: 0 0 auto;
    width: 4em;
    font-size: 0.875rem;
    color: #363636;
    white-space: nowrap;
    text-align: justify;
    text-align-last: justify;
}

.form-row input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    /* 不低于 16px，避免 iOS 聚焦时自动放大页面 */
    font-size: max(16px, 1rem);
    font-family: inherit;
    line-height: normal;
    color: #333333;
    text-align: right;
}

.form-row input::placeholder {
    color: #c4c4c4;
}

.btn-primary {
    display: block;
    width: calc(100% - 1.75rem);
    height: 2.75rem;
    margin: 1.25rem auto 0;
    border-radius: 0.5rem;
    background: var(--blue);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.btn-primary:active {
    opacity: 0.85;
}

.btn-text {
    display: block;
    margin: 0.9rem auto 0;
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
    color: #888888;
}

.settings-hint {
    margin: 1.1rem 1.6rem 0;
    font-size: 0.75rem;
    line-height: 1.6;
    color: #999999;
    text-align: center;
}
