/*
 * 织野 · 账户登录页（/account/login）
 * ------------------------------------------------------------------
 * 1:1 复刻 Shopify 客户账户登录页（account.thesak.com）的视觉，
 * 所有数值都取自原站 computed style 实测值，不是目测：
 *   页面底色    #fcfbf9（html/body 同色）
 *   内容列宽    379px，水平居中；内容块在头尾之间垂直居中
 *   标题        20px / 700 / 行高 24px
 *   次级文字    14px / rgba(0,0,0,.56)
 *   Shop 按钮   379×50，#5433EB，圆角 12
 *   邮箱框      379×49，白底、圆角 12、0.8px 黑边 + 1px 黑投影（≈1.8px 描边）
 *   圆角统一 12px；勾选框 20×20 圆角 8
 *   字体        Jost（拉丁）+ Noto Sans SC（中文回退）
 *
 * 本页刻意不复用 shop.css：这是 Shopify 自己的设计体系，
 * 与前台商店（The Sak 版式）不是一套 token，混在一起会互相污染。
 */

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

html,
body {
    margin: 0;
    padding: 0;
    background: #fcfbf9;
    /* 横竖屏切换时 iOS 会按容器宽度重新推算字号，导致整页字号跳变 */
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: Jost, "Noto Sans SC", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 12px;
    line-height: 1.35;
    color: #000;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

/* ---------- 头部：只有一枚居中品牌 ---------- */

.acct-header {
    display: flex;
    justify-content: center;
    padding: 40px 0 20px;
}

.acct-header__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 94px;
}

/* 原站此处是一张 180×94 的品牌图，这里用文字字标占同等位置 */
.acct-header__logo-text {
    font-size: 48px;
    font-weight: 500;
    letter-spacing: .1em;
    color: #1a1a1a;
}

/* ---------- 主区：垂直居中的 379px 列 ---------- */

.acct-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.acct-col { width: 100%; max-width: 379px; }

.acct-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 24px;
    color: #000;
}

.acct-sub {
    margin: 7px 0 0;
    font-size: 14px;
    color: rgba(0, 0, 0, .56);
}

/* 提示条（错误 / 演示提示），插在标题与 Shop 按钮之间 */

.acct-alert {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 16px 0 0;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.45;
}

.acct-alert--err { background: #fdecea; color: #8f2019; }
.acct-alert--ok { background: #e7f2e8; color: #1f5c26; }

.acct-alert svg {
    width: 16px;
    height: 16px;
    flex: none;
    margin-top: 2px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
}

/* ---------- Shop 快捷登录按钮 ---------- */

.acct-shop {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 50px;
    margin-top: 20px;
    border: 0;
    border-radius: 12px;
    background: #5433eb;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: background .15s ease;
}

.acct-shop:hover { background: #4a2bd8; }

.acct-shop svg {
    height: 17px;
    width: auto;
    fill: currentColor;
}

/* ---------- 「或」分隔 ---------- */

.acct-or {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 14px;
    padding: 0 2px;
}

.acct-or::before,
.acct-or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(0, 0, 0, .2);
}

.acct-or span {
    font-size: 14px;
    color: rgba(0, 0, 0, .56);
}

/* ---------- 邮箱框：浮动 label + 右侧箭头 ---------- */

.acct-field {
    position: relative;
    margin-top: 14px;
    height: 49px;
    border-radius: 12px;
    background: #fff;
    border: .8px solid #000;
    box-shadow: 0 0 0 1px #000;
}

.acct-field__label {
    position: absolute;
    left: 10px;
    top: 9px;
    font-size: 12px;
    color: #707070;
    pointer-events: none;
    transition: top .15s ease;
}

.acct-field__input {
    width: 100%;
    height: 100%;
    padding: 21px 46px 6px 10px;
    border: 0;
    background: transparent;
    border-radius: 12px;
    font: inherit;
    font-size: 14px;
    color: #000;
    outline: none;
}

/* 空且未聚焦时 label 居中偏上（原站实测 top:9px），有值或聚焦后上浮到 6px */
.acct-field:focus-within .acct-field__label,
.acct-field:has(.acct-field__input:not(:placeholder-shown)) .acct-field__label {
    top: 6px;
}

.acct-field__go {
    position: absolute;
    right: 7px;
    top: 7px;
    width: 34px;
    height: 35px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease;
}

.acct-field__go:hover { background: rgba(0, 0, 0, .06); }

.acct-field__go svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #000;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- 勾选行 ---------- */

.acct-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    cursor: pointer;
    font-size: 14px;
    color: #000;
}

.acct-check input {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    margin: 0;
    flex: none;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, .56);
    background: #fff center / 14px no-repeat;
    cursor: pointer;
}

.acct-check input:checked {
    background-color: #000;
    border-color: #000;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='m1.5 7.097 3.596 3.602c.104.105.156.157.216.175a.25.25 0 0 0 .16-.004c.059-.022.108-.077.206-.188L12.5 3' fill='none' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.acct-terms {
    margin: 20px 0 0;
    text-align: center;
    font-size: 12px;
    color: rgba(0, 0, 0, .56);
}

.acct-terms a:hover { text-decoration: underline; }

/* ---------- 页脚 ---------- */

.acct-footer {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.acct-footer a {
    font-size: 14px;
    color: #000;
}

.acct-footer a:hover { text-decoration: underline; }

/* ==================================================================
 * 会员体系扩展（与登录页同一套 token：#fcfbf9 底 / 圆角 12 / Jost 字体）
 * ================================================================== */

/* ---------- 黑色主按钮：注册提交 / 空购物车引导 ---------- */

.acct-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 50px;
    margin-top: 14px;
    border: 0;
    border-radius: 12px;
    background: #000;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: background .15s ease;
}

.acct-btn:hover { background: #2e2e2e; }

/* ---------- 辅助链接行（去注册 / 去登录 / 继续购物） ---------- */

.acct-alt {
    margin: 16px 0 0;
    text-align: center;
    font-size: 12px;
    color: rgba(0, 0, 0, .56);
}

.acct-alt a {
    color: #000;
    font-weight: 500;
}

.acct-alt a:hover { text-decoration: underline; }

/* ---------- 文字按钮（退出登录） ---------- */

.acct-linklike {
    border: 0;
    padding: 0;
    background: transparent;
    font-size: 12px;
    color: rgba(0, 0, 0, .56);
    text-decoration: underline;
    cursor: pointer;
}

.acct-linklike:hover { color: #000; }

/* ---------- 只读展示框：登录第二步显示已识别的邮箱 ---------- */

.acct-static {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    height: 49px;
    padding: 0 12px;
    border-radius: 12px;
    background: #f2f1ee;
    border: .8px solid #000;
    box-shadow: 0 0 0 1px #000;
}

.acct-static__value {
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acct-static__change {
    flex: none;
    font-size: 12px;
    color: rgba(0, 0, 0, .56);
    text-decoration: underline;
}

.acct-static__change:hover { color: #000; }

/* ---------- 账户中心 ---------- */

/* 订单列表比表单宽，单独放宽内容列 */
.acct-col--wide { max-width: 640px; }

.acct-userbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 4px;
}

.acct-userbar .acct-sub { margin-top: 0; }

.acct-h2 {
    margin: 28px 0 0;
    font-size: 16px;
    font-weight: 700;
    color: #000;
}

.acct-orders {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.acct-order {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 12px;
}

.acct-order__main {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.acct-order__no {
    font-size: 14px;
    font-weight: 500;
    color: #000;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acct-order__no:hover { text-decoration: underline; }

.acct-order__meta {
    font-size: 12px;
    color: rgba(0, 0, 0, .56);
}

.acct-order__side {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: none;
}

.acct-order__total {
    font-size: 14px;
    font-weight: 500;
}

/* 状态徽章：色值与订单状态语义对应，弱对比底色 + 深色字 */
.acct-badge {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.acct-badge--0 { background: #fdf3e0; color: #8a5b00; }  /* 待付款 */
.acct-badge--1 { background: #e7f2e8; color: #1f5c26; }  /* 已付款 */
.acct-badge--2 { background: #e8f0fb; color: #1f4a7c; }  /* 已发货 */
.acct-badge--3 { background: #e7f2e8; color: #1f5c26; }  /* 已完成 */
.acct-badge--4 { background: #f2f2f2; color: #6b6b6b; }  /* 已取消 */

.acct-empty {
    margin-top: 12px;
    padding: 18px 16px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 12px;
}

.acct-empty p {
    margin: 0 0 4px;
    font-size: 14px;
    color: rgba(0, 0, 0, .56);
}

/* ==================================================================
 * 响应式
 * ------------------------------------------------------------------
 * 断点跟 shop.css 取同一组（900 / 720 / 400），但**不要把两套 token 合并**：
 * 那边是 The Sak 商店的版式体系，这边是 Shopify 账户页的体系，
 * 混在一起只会互相污染。这里只处理三件事：
 *
 *   1) 防 iOS 聚焦放大 —— 见下面的 900 断点，原因同 shop.css 里那段注释
 *   2) 订单行在窄屏不再横向硬挤 —— 「单号 / 徽章 / 金额」三件并排在
 *      360px 下会把单号压成省略号，允许换行后金额掉到第二行右对齐
 *   3) 头部留白与 logo 高度在手机上收回一点，避免首屏被"吃掉"一半
 * ================================================================== */

@media (max-width: 900px) {
    /* 订单行：允许换行，右侧（徽章 + 金额）整体靠右掉到第二行 */
    .acct-order {
        flex-wrap: wrap;
        gap: 10px;
    }

    .acct-order__side {
        margin-left: auto;
    }
}

@media (max-width: 720px) {
    /* iOS Safari 聚焦 <16px 的输入框会放大整页；只管触发放大的那个控件，
       浮动 label 保持 12px（它不参与聚焦，抬上去反而会撞到输入文字） */
    .acct-field__input {
        font-size: 16px;
    }

    /* 密码框同款处理（account-login-password 复用 .acct-field 结构） */
    .acct-static__value {
        font-size: 15px;
    }

    .acct-header {
        padding: 28px 0 14px;
    }

    .acct-header__logo {
        height: 72px;
    }

    .acct-main {
        padding: 20px 16px 28px;
    }

    /* 用户名与「Log out」并排时允许换行，长邮箱/长名字不会顶掉按钮 */
    .acct-userbar {
        flex-wrap: wrap;
    }

    .acct-h2 {
        margin-top: 22px;
    }
}

@media (max-width: 400px) {
    .acct-header__logo {
        height: 62px;
    }

    .acct-title {
        font-size: 19px;
    }

    .acct-order {
        padding: 12px 13px;
    }
}
