/* Graifurt-style member auth & account pages */
.gf-member-page {
    background: #f8fafc;
    min-height: calc(100vh - 140px);
    padding: 48px 24px 72px;
    font-family: var(--gf-font, 'Inter Tight', system-ui, sans-serif);
    color: var(--gf-text, #0f172a);
}

.gf-member-wrap {
    max-width: 420px;
    margin: 0 auto;
}

.gf-member-wrap--form {
    max-width: 720px;
}

.gf-member-wrap--wide {
    max-width: var(--site-max-width, 1600px);
}

.gf-member-head {
    margin-bottom: 28px;
    text-align: center;
}

.gf-member-head--left {
    text-align: left;
    margin-bottom: 32px;
}

.gf-member-head h1 {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.gf-member-head p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
}

.gf-member-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 32px 36px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.gf-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 16px;
}

.gf-form-grid .gf-field {
    margin-bottom: 0;
}

.gf-form-grid .gf-field--full {
    grid-column: 1 / -1;
}

.gf-form-actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.gf-form-actions .gf-btn {
    width: auto;
    min-width: 160px;
    padding-left: 28px;
    padding-right: 28px;
}

.gf-form-actions .gf-member-foot {
    margin-top: 0;
    text-align: left;
}

.gf-field {
    margin-bottom: 16px;
}

.gf-field:last-of-type {
    margin-bottom: 20px;
}

.gf-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
}

.gf-input {
    width: 100%;
    padding: 11px 14px;
    font-family: inherit;
    font-size: 15px;
    color: #0f172a;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gf-input::placeholder {
    color: #94a3b8;
}

.gf-input:focus {
    outline: none;
    border-color: #FF3B30;
    box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.12);
}

.gf-input:disabled {
    background: #f1f5f9;
    color: #64748b;
    cursor: not-allowed;
}

select.gf-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='%2364748b' d='M4.5 6l3.5 3.5L11.5 6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.gf-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 640px) {
    .gf-form-grid {
        grid-template-columns: 1fr;
    }

    .gf-form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .gf-form-actions .gf-btn {
        width: 100%;
    }

    .gf-form-actions .gf-member-foot {
        text-align: center;
    }
}

@media (max-width: 520px) {
    .gf-field-row {
        grid-template-columns: 1fr;
    }
}

textarea.gf-input {
    resize: vertical;
    min-height: 88px;
}

.gf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: #FF3B30;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.gf-btn:hover {
    background: #E0352B;
}

.gf-btn--sm {
    width: auto;
    padding: 10px 18px;
    font-size: 14px;
}

.gf-btn--ghost {
    width: auto;
    color: #334155;
    background: #fff;
    border: 1px solid #e2e8f0;
}

.gf-btn--ghost:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.gf-member-foot {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #64748b;
}

.gf-member-foot a {
    color: #FF3B30;
    text-decoration: none;
    font-weight: 500;
}

.gf-member-foot a:hover {
    color: #E0352B;
}

.gf-alert {
    padding: 11px 14px;
    margin-bottom: 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.45;
}

.gf-alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.gf-alert-success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.gf-alert-info {
    background: #fff5f5;
    color: #C62828;
    border: 1px solid #bae6fd;
}

/* Account dashboard layout */
.gf-account-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.gf-account-nav {
    position: sticky;
    top: 88px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
}

.gf-account-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gf-account-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.gf-account-link i {
    font-size: 16px;
    width: 18px;
    color: #94a3b8;
}

.gf-account-link:hover {
    background: #f8fafc;
    color: #0f172a;
}

.gf-account-link.is-active {
    background: rgba(255, 59, 48, 0.08);
    color: #E0352B;
}

.gf-account-link.is-active i {
    color: #FF3B30;
}

.gf-account-count {
    margin-left: auto;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.gf-account-link.is-active .gf-account-count {
    background: rgba(255, 59, 48, 0.15);
    color: #E0352B;
}

.gf-account-nav-foot {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.gf-btn--block {
    width: 100%;
    justify-content: center;
}

.gf-account-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.gf-panel-desc {
    margin: -8px 0 20px;
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
}

.gf-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.gf-panel-head .gf-panel-title {
    margin: 0;
}

.gf-panel-link {
    font-size: 13px;
    font-weight: 500;
    color: #FF3B30;
    text-decoration: none;
}

.gf-panel-link:hover {
    color: #E0352B;
}

.gf-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #94a3b8;
}

.gf-form-grid--single {
    grid-template-columns: 1fr;
    max-width: 480px;
}

.gf-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.gf-stat {
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fafbfc;
}

.gf-stat-label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
}

.gf-stat-value {
    font-size: 22px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.2;
}

.gf-stat-value--sm {
    font-size: 16px;
}

.gf-dl {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.gf-dl div {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px;
    font-size: 14px;
}

.gf-dl dt {
    margin: 0;
    color: #64748b;
    font-weight: 500;
}

.gf-dl dd {
    margin: 0;
    color: #0f172a;
    line-height: 1.45;
}

.gf-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.gf-quick-link {
    font-size: 14px;
    font-weight: 500;
    color: #FF3B30;
    text-decoration: none;
}

.gf-quick-link:hover {
    color: #E0352B;
}

.gf-order--wide {
    align-items: flex-start;
}

.gf-order-items {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}

.gf-order-items li + li {
    margin-top: 2px;
}

.gf-order-items-more {
    color: #94a3b8;
    font-style: italic;
}

.gf-order-try {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
}

/* Account page — legacy grid fallback */
.gf-account-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 900px) {
    .gf-account-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
        gap: 24px;
    }
}

@media (max-width: 900px) {
    .gf-account-layout {
        grid-template-columns: 1fr;
    }

    .gf-account-nav {
        position: static;
        padding: 8px;
    }

    .gf-account-menu {
        flex-direction: row;
        overflow-x: auto;
        gap: 6px;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .gf-account-link {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .gf-account-nav-foot {
        flex-direction: row;
    }

    .gf-account-nav-foot .gf-btn--block {
        width: auto;
        flex: 1;
    }

    .gf-stat-grid {
        grid-template-columns: 1fr;
    }

    .gf-dl div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

.gf-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
}

.gf-panel-title {
    margin: 0 0 20px;
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}

.gf-panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.gf-order-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gf-order {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fafbfc;
}

.gf-order-id {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
}

.gf-order-meta {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
}

.gf-order-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    background: #fff5f5;
    color: #E0352B;
}

.gf-order-status.is-done {
    background: #f0fdf4;
    color: #15803d;
}

.gf-order-status.is-cancel {
    background: #fef2f2;
    color: #b91c1c;
}

.gf-order-side {
    text-align: right;
    flex-shrink: 0;
}

.gf-order-total {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
}

.gf-order-link {
    font-size: 13px;
    color: #FF3B30;
    text-decoration: none;
    font-weight: 500;
}

.gf-order-link:hover {
    color: #E0352B;
}

.gf-empty {
    text-align: center;
    padding: 40px 16px;
    color: #64748b;
    font-size: 14px;
}

.gf-empty i {
    display: block;
    font-size: 28px;
    color: #cbd5e1;
    margin-bottom: 12px;
}

.gf-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    background: #fff5f5;
    color: #E0352B;
    vertical-align: middle;
}

@media (max-width: 480px) {
    .gf-member-page {
        padding: 32px 16px 56px;
    }

    .gf-member-card,
    .gf-panel {
        padding: 22px 18px;
    }

    .gf-order {
        flex-direction: column;
    }

    .gf-order-side {
        text-align: left;
    }
}
